blob: 3ea33938ebc6a03c597339c4ea4987d357efc600 [file] [log] [blame]
ager@chromium.orgea91cc52011-05-23 06:06:11 +00001// Copyright 2011 the V8 project authors. All rights reserved.
christian.plesner.hansen43d26ec2008-07-03 15:10:15 +00002// Redistribution and use in source and binary forms, with or without
3// modification, are permitted provided that the following conditions are
4// met:
5//
6// * Redistributions of source code must retain the above copyright
7// notice, this list of conditions and the following disclaimer.
8// * Redistributions in binary form must reproduce the above
9// copyright notice, this list of conditions and the following
10// disclaimer in the documentation and/or other materials provided
11// with the distribution.
12// * Neither the name of Google Inc. nor the names of its
13// contributors may be used to endorse or promote products derived
14// from this software without specific prior written permission.
15//
16// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
28#ifndef V8_BUILTINS_H_
29#define V8_BUILTINS_H_
30
kasperl@chromium.org71affb52009-05-26 05:44:31 +000031namespace v8 {
32namespace internal {
christian.plesner.hansen43d26ec2008-07-03 15:10:15 +000033
sgjesse@chromium.orgb302e562010-02-03 11:26:59 +000034// Specifies extra arguments required by a C++ builtin.
35enum BuiltinExtraArguments {
36 NO_EXTRA_ARGUMENTS = 0,
37 NEEDS_CALLED_FUNCTION = 1
38};
39
40
41// Define list of builtins implemented in C++.
42#define BUILTIN_LIST_C(V) \
43 V(Illegal, NO_EXTRA_ARGUMENTS) \
44 \
45 V(EmptyFunction, NO_EXTRA_ARGUMENTS) \
46 \
svenpanne@chromium.org3c93e772012-01-02 09:26:59 +000047 V(InternalArrayCodeGeneric, NO_EXTRA_ARGUMENTS) \
sgjesse@chromium.orgb302e562010-02-03 11:26:59 +000048 V(ArrayCodeGeneric, NO_EXTRA_ARGUMENTS) \
49 \
50 V(ArrayPush, NO_EXTRA_ARGUMENTS) \
51 V(ArrayPop, NO_EXTRA_ARGUMENTS) \
ager@chromium.org5c838252010-02-19 08:53:10 +000052 V(ArrayShift, NO_EXTRA_ARGUMENTS) \
53 V(ArrayUnshift, NO_EXTRA_ARGUMENTS) \
54 V(ArraySlice, NO_EXTRA_ARGUMENTS) \
55 V(ArraySplice, NO_EXTRA_ARGUMENTS) \
fschneider@chromium.org086aac62010-03-17 13:18:24 +000056 V(ArrayConcat, NO_EXTRA_ARGUMENTS) \
sgjesse@chromium.orgb302e562010-02-03 11:26:59 +000057 \
58 V(HandleApiCall, NEEDS_CALLED_FUNCTION) \
59 V(HandleApiCallConstruct, NEEDS_CALLED_FUNCTION) \
60 V(HandleApiCallAsFunction, NO_EXTRA_ARGUMENTS) \
sgjesse@chromium.orgea88ce92011-03-23 11:19:56 +000061 V(HandleApiCallAsConstructor, NO_EXTRA_ARGUMENTS) \
62 \
danno@chromium.org40cb8782011-05-25 07:58:50 +000063 V(StrictModePoisonPill, NO_EXTRA_ARGUMENTS)
christian.plesner.hansen43d26ec2008-07-03 15:10:15 +000064
65// Define list of builtins implemented in assembly.
ager@chromium.orgea91cc52011-05-23 06:06:11 +000066#define BUILTIN_LIST_A(V) \
67 V(ArgumentsAdaptorTrampoline, BUILTIN, UNINITIALIZED, \
68 Code::kNoExtraICState) \
ager@chromium.orgea91cc52011-05-23 06:06:11 +000069 V(JSConstructStubCountdown, BUILTIN, UNINITIALIZED, \
70 Code::kNoExtraICState) \
71 V(JSConstructStubGeneric, BUILTIN, UNINITIALIZED, \
72 Code::kNoExtraICState) \
73 V(JSConstructStubApi, BUILTIN, UNINITIALIZED, \
74 Code::kNoExtraICState) \
75 V(JSEntryTrampoline, BUILTIN, UNINITIALIZED, \
76 Code::kNoExtraICState) \
77 V(JSConstructEntryTrampoline, BUILTIN, UNINITIALIZED, \
78 Code::kNoExtraICState) \
79 V(LazyCompile, BUILTIN, UNINITIALIZED, \
80 Code::kNoExtraICState) \
81 V(LazyRecompile, BUILTIN, UNINITIALIZED, \
82 Code::kNoExtraICState) \
83 V(NotifyDeoptimized, BUILTIN, UNINITIALIZED, \
84 Code::kNoExtraICState) \
85 V(NotifyLazyDeoptimized, BUILTIN, UNINITIALIZED, \
86 Code::kNoExtraICState) \
87 V(NotifyOSR, BUILTIN, UNINITIALIZED, \
88 Code::kNoExtraICState) \
89 \
90 V(LoadIC_Miss, BUILTIN, UNINITIALIZED, \
91 Code::kNoExtraICState) \
92 V(KeyedLoadIC_Miss, BUILTIN, UNINITIALIZED, \
93 Code::kNoExtraICState) \
94 V(KeyedLoadIC_MissForceGeneric, BUILTIN, UNINITIALIZED, \
95 Code::kNoExtraICState) \
96 V(KeyedLoadIC_Slow, BUILTIN, UNINITIALIZED, \
97 Code::kNoExtraICState) \
98 V(StoreIC_Miss, BUILTIN, UNINITIALIZED, \
99 Code::kNoExtraICState) \
100 V(KeyedStoreIC_Miss, BUILTIN, UNINITIALIZED, \
101 Code::kNoExtraICState) \
102 V(KeyedStoreIC_MissForceGeneric, BUILTIN, UNINITIALIZED, \
103 Code::kNoExtraICState) \
104 V(KeyedStoreIC_Slow, BUILTIN, UNINITIALIZED, \
105 Code::kNoExtraICState) \
106 V(LoadIC_Initialize, LOAD_IC, UNINITIALIZED, \
107 Code::kNoExtraICState) \
108 V(LoadIC_PreMonomorphic, LOAD_IC, PREMONOMORPHIC, \
109 Code::kNoExtraICState) \
110 V(LoadIC_Normal, LOAD_IC, MONOMORPHIC, \
111 Code::kNoExtraICState) \
112 V(LoadIC_ArrayLength, LOAD_IC, MONOMORPHIC, \
113 Code::kNoExtraICState) \
114 V(LoadIC_StringLength, LOAD_IC, MONOMORPHIC, \
115 Code::kNoExtraICState) \
116 V(LoadIC_StringWrapperLength, LOAD_IC, MONOMORPHIC, \
117 Code::kNoExtraICState) \
118 V(LoadIC_FunctionPrototype, LOAD_IC, MONOMORPHIC, \
119 Code::kNoExtraICState) \
120 V(LoadIC_Megamorphic, LOAD_IC, MEGAMORPHIC, \
121 Code::kNoExtraICState) \
122 \
123 V(KeyedLoadIC_Initialize, KEYED_LOAD_IC, UNINITIALIZED, \
124 Code::kNoExtraICState) \
125 V(KeyedLoadIC_PreMonomorphic, KEYED_LOAD_IC, PREMONOMORPHIC, \
126 Code::kNoExtraICState) \
127 V(KeyedLoadIC_Generic, KEYED_LOAD_IC, MEGAMORPHIC, \
128 Code::kNoExtraICState) \
129 V(KeyedLoadIC_String, KEYED_LOAD_IC, MEGAMORPHIC, \
130 Code::kNoExtraICState) \
131 V(KeyedLoadIC_IndexedInterceptor, KEYED_LOAD_IC, MEGAMORPHIC, \
132 Code::kNoExtraICState) \
whesse@chromium.org7b260152011-06-20 15:33:18 +0000133 V(KeyedLoadIC_NonStrictArguments, KEYED_LOAD_IC, MEGAMORPHIC, \
134 Code::kNoExtraICState) \
ager@chromium.orgea91cc52011-05-23 06:06:11 +0000135 \
136 V(StoreIC_Initialize, STORE_IC, UNINITIALIZED, \
137 Code::kNoExtraICState) \
138 V(StoreIC_ArrayLength, STORE_IC, MONOMORPHIC, \
139 Code::kNoExtraICState) \
140 V(StoreIC_Normal, STORE_IC, MONOMORPHIC, \
141 Code::kNoExtraICState) \
142 V(StoreIC_Megamorphic, STORE_IC, MEGAMORPHIC, \
143 Code::kNoExtraICState) \
144 V(StoreIC_GlobalProxy, STORE_IC, MEGAMORPHIC, \
145 Code::kNoExtraICState) \
146 V(StoreIC_Initialize_Strict, STORE_IC, UNINITIALIZED, \
147 kStrictMode) \
148 V(StoreIC_ArrayLength_Strict, STORE_IC, MONOMORPHIC, \
149 kStrictMode) \
150 V(StoreIC_Normal_Strict, STORE_IC, MONOMORPHIC, \
151 kStrictMode) \
152 V(StoreIC_Megamorphic_Strict, STORE_IC, MEGAMORPHIC, \
153 kStrictMode) \
154 V(StoreIC_GlobalProxy_Strict, STORE_IC, MEGAMORPHIC, \
155 kStrictMode) \
156 \
157 V(KeyedStoreIC_Initialize, KEYED_STORE_IC, UNINITIALIZED, \
158 Code::kNoExtraICState) \
159 V(KeyedStoreIC_Generic, KEYED_STORE_IC, MEGAMORPHIC, \
160 Code::kNoExtraICState) \
161 \
162 V(KeyedStoreIC_Initialize_Strict, KEYED_STORE_IC, UNINITIALIZED, \
163 kStrictMode) \
164 V(KeyedStoreIC_Generic_Strict, KEYED_STORE_IC, MEGAMORPHIC, \
165 kStrictMode) \
whesse@chromium.org7b260152011-06-20 15:33:18 +0000166 V(KeyedStoreIC_NonStrictArguments, KEYED_STORE_IC, MEGAMORPHIC, \
167 Code::kNoExtraICState) \
erik.corry@gmail.com394dbcf2011-10-27 07:38:48 +0000168 V(TransitionElementsSmiToDouble, BUILTIN, UNINITIALIZED, \
169 Code::kNoExtraICState) \
170 V(TransitionElementsDoubleToObject, BUILTIN, UNINITIALIZED, \
171 Code::kNoExtraICState) \
ager@chromium.orgea91cc52011-05-23 06:06:11 +0000172 \
173 /* Uses KeyedLoadIC_Initialize; must be after in list. */ \
174 V(FunctionCall, BUILTIN, UNINITIALIZED, \
175 Code::kNoExtraICState) \
176 V(FunctionApply, BUILTIN, UNINITIALIZED, \
177 Code::kNoExtraICState) \
178 \
svenpanne@chromium.org3c93e772012-01-02 09:26:59 +0000179 V(InternalArrayCode, BUILTIN, UNINITIALIZED, \
180 Code::kNoExtraICState) \
ager@chromium.orgea91cc52011-05-23 06:06:11 +0000181 V(ArrayCode, BUILTIN, UNINITIALIZED, \
182 Code::kNoExtraICState) \
183 V(ArrayConstructCode, BUILTIN, UNINITIALIZED, \
184 Code::kNoExtraICState) \
185 \
186 V(StringConstructCode, BUILTIN, UNINITIALIZED, \
187 Code::kNoExtraICState) \
188 \
189 V(OnStackReplacement, BUILTIN, UNINITIALIZED, \
ager@chromium.org9ee27ae2011-03-02 13:43:26 +0000190 Code::kNoExtraICState)
ricow@chromium.orgd236f4d2010-09-01 06:52:08 +0000191
christian.plesner.hansen43d26ec2008-07-03 15:10:15 +0000192
ager@chromium.org65dad4b2009-04-23 08:48:43 +0000193#ifdef ENABLE_DEBUGGER_SUPPORT
ager@chromium.org8bb60582008-12-11 12:02:20 +0000194// Define list of builtins used by the debugger implemented in assembly.
danno@chromium.orgc612e022011-11-10 11:38:15 +0000195#define BUILTIN_LIST_DEBUG_A(V) \
danno@chromium.orgfa458e42012-02-01 10:48:36 +0000196 V(Return_DebugBreak, BUILTIN, DEBUG_BREAK, \
197 Code::kNoExtraICState) \
198 V(CallFunctionStub_DebugBreak, BUILTIN, DEBUG_BREAK, \
199 Code::kNoExtraICState) \
200 V(CallFunctionStub_Recording_DebugBreak, BUILTIN, DEBUG_BREAK, \
201 Code::kNoExtraICState) \
202 V(CallConstructStub_DebugBreak, BUILTIN, DEBUG_BREAK, \
203 Code::kNoExtraICState) \
204 V(CallConstructStub_Recording_DebugBreak, BUILTIN, DEBUG_BREAK, \
205 Code::kNoExtraICState) \
206 V(LoadIC_DebugBreak, LOAD_IC, DEBUG_BREAK, \
207 Code::kNoExtraICState) \
208 V(KeyedLoadIC_DebugBreak, KEYED_LOAD_IC, DEBUG_BREAK, \
209 Code::kNoExtraICState) \
210 V(StoreIC_DebugBreak, STORE_IC, DEBUG_BREAK, \
211 Code::kNoExtraICState) \
212 V(KeyedStoreIC_DebugBreak, KEYED_STORE_IC, DEBUG_BREAK, \
213 Code::kNoExtraICState) \
214 V(Slot_DebugBreak, BUILTIN, DEBUG_BREAK, \
215 Code::kNoExtraICState) \
216 V(PlainReturn_LiveEdit, BUILTIN, DEBUG_BREAK, \
217 Code::kNoExtraICState) \
218 V(FrameDropper_LiveEdit, BUILTIN, DEBUG_BREAK, \
219 Code::kNoExtraICState)
ager@chromium.org65dad4b2009-04-23 08:48:43 +0000220#else
221#define BUILTIN_LIST_DEBUG_A(V)
222#endif
ager@chromium.org8bb60582008-12-11 12:02:20 +0000223
christian.plesner.hansen43d26ec2008-07-03 15:10:15 +0000224// Define list of builtins implemented in JavaScript.
sgjesse@chromium.org05521fc2009-05-21 07:37:44 +0000225#define BUILTINS_LIST_JS(V) \
226 V(EQUALS, 1) \
227 V(STRICT_EQUALS, 1) \
228 V(COMPARE, 2) \
229 V(ADD, 1) \
230 V(SUB, 1) \
231 V(MUL, 1) \
232 V(DIV, 1) \
233 V(MOD, 1) \
234 V(BIT_OR, 1) \
235 V(BIT_AND, 1) \
236 V(BIT_XOR, 1) \
237 V(UNARY_MINUS, 0) \
238 V(BIT_NOT, 0) \
239 V(SHL, 1) \
240 V(SAR, 1) \
241 V(SHR, 1) \
kmillikin@chromium.org49edbdf2011-02-16 12:32:18 +0000242 V(DELETE, 2) \
sgjesse@chromium.org05521fc2009-05-21 07:37:44 +0000243 V(IN, 1) \
244 V(INSTANCE_OF, 1) \
sgjesse@chromium.org05521fc2009-05-21 07:37:44 +0000245 V(FILTER_KEY, 1) \
246 V(CALL_NON_FUNCTION, 0) \
247 V(CALL_NON_FUNCTION_AS_CONSTRUCTOR, 0) \
lrn@chromium.org34e60782011-09-15 07:25:40 +0000248 V(CALL_FUNCTION_PROXY, 1) \
249 V(CALL_FUNCTION_PROXY_AS_CONSTRUCTOR, 1) \
sgjesse@chromium.org05521fc2009-05-21 07:37:44 +0000250 V(TO_OBJECT, 0) \
251 V(TO_NUMBER, 0) \
252 V(TO_STRING, 0) \
253 V(STRING_ADD_LEFT, 1) \
254 V(STRING_ADD_RIGHT, 1) \
255 V(APPLY_PREPARE, 1) \
ager@chromium.orgea91cc52011-05-23 06:06:11 +0000256 V(APPLY_OVERFLOW, 1)
christian.plesner.hansen43d26ec2008-07-03 15:10:15 +0000257
258
sgjesse@chromium.orgea88ce92011-03-23 11:19:56 +0000259class BuiltinFunctionTable;
christian.plesner.hansen43d26ec2008-07-03 15:10:15 +0000260class ObjectVisitor;
261
262
sgjesse@chromium.orgea88ce92011-03-23 11:19:56 +0000263class Builtins {
christian.plesner.hansen43d26ec2008-07-03 15:10:15 +0000264 public:
sgjesse@chromium.orgea88ce92011-03-23 11:19:56 +0000265 ~Builtins();
266
christian.plesner.hansen43d26ec2008-07-03 15:10:15 +0000267 // Generate all builtin code objects. Should be called once during
sgjesse@chromium.orgea88ce92011-03-23 11:19:56 +0000268 // isolate initialization.
erik.corry@gmail.comf2038fb2012-01-16 11:42:08 +0000269 void SetUp(bool create_heap_objects);
sgjesse@chromium.orgea88ce92011-03-23 11:19:56 +0000270 void TearDown();
christian.plesner.hansen43d26ec2008-07-03 15:10:15 +0000271
272 // Garbage collection support.
sgjesse@chromium.orgea88ce92011-03-23 11:19:56 +0000273 void IterateBuiltins(ObjectVisitor* v);
christian.plesner.hansen43d26ec2008-07-03 15:10:15 +0000274
275 // Disassembler support.
sgjesse@chromium.orgea88ce92011-03-23 11:19:56 +0000276 const char* Lookup(byte* pc);
christian.plesner.hansen43d26ec2008-07-03 15:10:15 +0000277
278 enum Name {
fschneider@chromium.org7979bbb2011-03-28 10:47:03 +0000279#define DEF_ENUM_C(name, ignore) k##name,
280#define DEF_ENUM_A(name, kind, state, extra) k##name,
christian.plesner.hansen43d26ec2008-07-03 15:10:15 +0000281 BUILTIN_LIST_C(DEF_ENUM_C)
282 BUILTIN_LIST_A(DEF_ENUM_A)
ager@chromium.org8bb60582008-12-11 12:02:20 +0000283 BUILTIN_LIST_DEBUG_A(DEF_ENUM_A)
christian.plesner.hansen43d26ec2008-07-03 15:10:15 +0000284#undef DEF_ENUM_C
285#undef DEF_ENUM_A
286 builtin_count
287 };
288
289 enum CFunctionId {
sgjesse@chromium.orgb302e562010-02-03 11:26:59 +0000290#define DEF_ENUM_C(name, ignore) c_##name,
christian.plesner.hansen43d26ec2008-07-03 15:10:15 +0000291 BUILTIN_LIST_C(DEF_ENUM_C)
292#undef DEF_ENUM_C
293 cfunction_count
294 };
295
296 enum JavaScript {
297#define DEF_ENUM(name, ignore) name,
298 BUILTINS_LIST_JS(DEF_ENUM)
299#undef DEF_ENUM
300 id_count
301 };
302
fschneider@chromium.org7979bbb2011-03-28 10:47:03 +0000303#define DECLARE_BUILTIN_ACCESSOR_C(name, ignore) Handle<Code> name();
304#define DECLARE_BUILTIN_ACCESSOR_A(name, kind, state, extra) \
305 Handle<Code> name();
306 BUILTIN_LIST_C(DECLARE_BUILTIN_ACCESSOR_C)
307 BUILTIN_LIST_A(DECLARE_BUILTIN_ACCESSOR_A)
308 BUILTIN_LIST_DEBUG_A(DECLARE_BUILTIN_ACCESSOR_A)
309#undef DECLARE_BUILTIN_ACCESSOR_C
310#undef DECLARE_BUILTIN_ACCESSOR_A
311
sgjesse@chromium.orgea88ce92011-03-23 11:19:56 +0000312 Code* builtin(Name name) {
christian.plesner.hansen43d26ec2008-07-03 15:10:15 +0000313 // Code::cast cannot be used here since we access builtins
314 // during the marking phase of mark sweep. See IC::Clear.
315 return reinterpret_cast<Code*>(builtins_[name]);
316 }
317
sgjesse@chromium.orgea88ce92011-03-23 11:19:56 +0000318 Address builtin_address(Name name) {
christian.plesner.hansen43d26ec2008-07-03 15:10:15 +0000319 return reinterpret_cast<Address>(&builtins_[name]);
320 }
321
322 static Address c_function_address(CFunctionId id) {
323 return c_functions_[id];
324 }
325
326 static const char* GetName(JavaScript id) { return javascript_names_[id]; }
327 static int GetArgumentsCount(JavaScript id) { return javascript_argc_[id]; }
sgjesse@chromium.orgea88ce92011-03-23 11:19:56 +0000328 Handle<Code> GetCode(JavaScript id, bool* resolved);
christian.plesner.hansen43d26ec2008-07-03 15:10:15 +0000329 static int NumberOfJavaScriptBuiltins() { return id_count; }
330
sgjesse@chromium.orgea88ce92011-03-23 11:19:56 +0000331 bool is_initialized() const { return initialized_; }
332
christian.plesner.hansen43d26ec2008-07-03 15:10:15 +0000333 private:
sgjesse@chromium.orgea88ce92011-03-23 11:19:56 +0000334 Builtins();
335
christian.plesner.hansen43d26ec2008-07-03 15:10:15 +0000336 // The external C++ functions called from the code.
sgjesse@chromium.orgea88ce92011-03-23 11:19:56 +0000337 static Address const c_functions_[cfunction_count];
christian.plesner.hansen43d26ec2008-07-03 15:10:15 +0000338
339 // Note: These are always Code objects, but to conform with
340 // IterateBuiltins() above which assumes Object**'s for the callback
341 // function f, we use an Object* array here.
sgjesse@chromium.orgea88ce92011-03-23 11:19:56 +0000342 Object* builtins_[builtin_count];
343 const char* names_[builtin_count];
344 static const char* const javascript_names_[id_count];
345 static int const javascript_argc_[id_count];
christian.plesner.hansen43d26ec2008-07-03 15:10:15 +0000346
sgjesse@chromium.orgb302e562010-02-03 11:26:59 +0000347 static void Generate_Adaptor(MacroAssembler* masm,
348 CFunctionId id,
349 BuiltinExtraArguments extra_args);
whesse@chromium.org4a1fe7d2010-09-27 12:32:04 +0000350 static void Generate_JSConstructStubCountdown(MacroAssembler* masm);
ager@chromium.org5aa501c2009-06-23 07:57:28 +0000351 static void Generate_JSConstructStubGeneric(MacroAssembler* masm);
sgjesse@chromium.orgb302e562010-02-03 11:26:59 +0000352 static void Generate_JSConstructStubApi(MacroAssembler* masm);
christian.plesner.hansen43d26ec2008-07-03 15:10:15 +0000353 static void Generate_JSEntryTrampoline(MacroAssembler* masm);
354 static void Generate_JSConstructEntryTrampoline(MacroAssembler* masm);
ager@chromium.orgea4f62e2010-08-16 16:28:43 +0000355 static void Generate_LazyCompile(MacroAssembler* masm);
kasperl@chromium.orga5551262010-12-07 12:49:48 +0000356 static void Generate_LazyRecompile(MacroAssembler* masm);
357 static void Generate_NotifyDeoptimized(MacroAssembler* masm);
358 static void Generate_NotifyLazyDeoptimized(MacroAssembler* masm);
359 static void Generate_NotifyOSR(MacroAssembler* masm);
christian.plesner.hansen43d26ec2008-07-03 15:10:15 +0000360 static void Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm);
kasperl@chromium.orgb9123622008-09-17 14:05:56 +0000361
362 static void Generate_FunctionCall(MacroAssembler* masm);
christian.plesner.hansen43d26ec2008-07-03 15:10:15 +0000363 static void Generate_FunctionApply(MacroAssembler* masm);
christian.plesner.hansen@gmail.com2bc58ef2009-09-22 10:00:30 +0000364
svenpanne@chromium.org3c93e772012-01-02 09:26:59 +0000365 static void Generate_InternalArrayCode(MacroAssembler* masm);
christian.plesner.hansen@gmail.com2bc58ef2009-09-22 10:00:30 +0000366 static void Generate_ArrayCode(MacroAssembler* masm);
367 static void Generate_ArrayConstructCode(MacroAssembler* masm);
ricow@chromium.orgd236f4d2010-09-01 06:52:08 +0000368
369 static void Generate_StringConstructCode(MacroAssembler* masm);
kasperl@chromium.orga5551262010-12-07 12:49:48 +0000370 static void Generate_OnStackReplacement(MacroAssembler* masm);
sgjesse@chromium.orgea88ce92011-03-23 11:19:56 +0000371
372 static void InitBuiltinFunctionTable();
373
374 bool initialized_;
375
376 friend class BuiltinFunctionTable;
377 friend class Isolate;
378
379 DISALLOW_COPY_AND_ASSIGN(Builtins);
christian.plesner.hansen43d26ec2008-07-03 15:10:15 +0000380};
381
christian.plesner.hansen43d26ec2008-07-03 15:10:15 +0000382} } // namespace v8::internal
383
384#endif // V8_BUILTINS_H_