OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_BUILTINS_H_ | 5 #ifndef V8_BUILTINS_H_ |
6 #define V8_BUILTINS_H_ | 6 #define V8_BUILTINS_H_ |
7 | 7 |
8 #include "src/handles.h" | 8 #include "src/handles.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 #define BUILTIN_LIST_A(V) \ | 74 #define BUILTIN_LIST_A(V) \ |
75 V(ArgumentsAdaptorTrampoline, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 75 V(ArgumentsAdaptorTrampoline, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
76 \ | 76 \ |
77 V(CallFunction, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 77 V(CallFunction, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
78 V(Call, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 78 V(Call, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
79 \ | 79 \ |
80 V(ConstructFunction, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 80 V(ConstructFunction, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
81 V(ConstructProxy, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 81 V(ConstructProxy, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
82 V(Construct, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 82 V(Construct, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
83 \ | 83 \ |
| 84 V(PushArgsAndCall, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 85 \ |
84 V(InOptimizationQueue, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 86 V(InOptimizationQueue, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
85 V(JSConstructStubGeneric, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 87 V(JSConstructStubGeneric, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
86 V(JSConstructStubForDerived, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 88 V(JSConstructStubForDerived, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
87 V(JSConstructStubApi, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 89 V(JSConstructStubApi, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
88 V(JSEntryTrampoline, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 90 V(JSEntryTrampoline, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
89 V(JSConstructEntryTrampoline, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 91 V(JSConstructEntryTrampoline, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 92 V(InterpreterEntryTrampoline, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 93 V(InterpreterExitTrampoline, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
90 V(CompileLazy, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 94 V(CompileLazy, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
91 V(CompileOptimized, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 95 V(CompileOptimized, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
92 V(CompileOptimizedConcurrent, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 96 V(CompileOptimizedConcurrent, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
93 V(NotifyDeoptimized, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 97 V(NotifyDeoptimized, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
94 V(NotifySoftDeoptimized, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 98 V(NotifySoftDeoptimized, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
95 V(NotifyLazyDeoptimized, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 99 V(NotifyLazyDeoptimized, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
96 V(NotifyStubFailure, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 100 V(NotifyStubFailure, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
97 V(NotifyStubFailureSaveDoubles, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 101 V(NotifyStubFailureSaveDoubles, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
98 \ | 102 \ |
99 V(InterpreterEntryTrampoline, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | |
100 V(InterpreterExitTrampoline, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | |
101 V(InterpreterPushArgsAndCall, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | |
102 \ | |
103 V(LoadIC_Miss, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 103 V(LoadIC_Miss, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
104 V(KeyedLoadIC_Miss, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 104 V(KeyedLoadIC_Miss, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
105 V(StoreIC_Miss, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 105 V(StoreIC_Miss, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
106 V(KeyedStoreIC_Miss, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 106 V(KeyedStoreIC_Miss, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
107 V(LoadIC_Getter_ForDeopt, LOAD_IC, MONOMORPHIC, kNoExtraICState) \ | 107 V(LoadIC_Getter_ForDeopt, LOAD_IC, MONOMORPHIC, kNoExtraICState) \ |
108 V(KeyedLoadIC_Megamorphic, KEYED_LOAD_IC, MEGAMORPHIC, kNoExtraICState) \ | 108 V(KeyedLoadIC_Megamorphic, KEYED_LOAD_IC, MEGAMORPHIC, kNoExtraICState) \ |
109 \ | 109 \ |
110 V(KeyedLoadIC_Megamorphic_Strong, KEYED_LOAD_IC, MEGAMORPHIC, \ | 110 V(KeyedLoadIC_Megamorphic_Strong, KEYED_LOAD_IC, MEGAMORPHIC, \ |
111 LoadICState::kStrongModeState) \ | 111 LoadICState::kStrongModeState) \ |
112 \ | 112 \ |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 BuiltinExtraArguments extra_args); | 259 BuiltinExtraArguments extra_args); |
260 static void Generate_CompileLazy(MacroAssembler* masm); | 260 static void Generate_CompileLazy(MacroAssembler* masm); |
261 static void Generate_InOptimizationQueue(MacroAssembler* masm); | 261 static void Generate_InOptimizationQueue(MacroAssembler* masm); |
262 static void Generate_CompileOptimized(MacroAssembler* masm); | 262 static void Generate_CompileOptimized(MacroAssembler* masm); |
263 static void Generate_CompileOptimizedConcurrent(MacroAssembler* masm); | 263 static void Generate_CompileOptimizedConcurrent(MacroAssembler* masm); |
264 static void Generate_JSConstructStubGeneric(MacroAssembler* masm); | 264 static void Generate_JSConstructStubGeneric(MacroAssembler* masm); |
265 static void Generate_JSConstructStubForDerived(MacroAssembler* masm); | 265 static void Generate_JSConstructStubForDerived(MacroAssembler* masm); |
266 static void Generate_JSConstructStubApi(MacroAssembler* masm); | 266 static void Generate_JSConstructStubApi(MacroAssembler* masm); |
267 static void Generate_JSEntryTrampoline(MacroAssembler* masm); | 267 static void Generate_JSEntryTrampoline(MacroAssembler* masm); |
268 static void Generate_JSConstructEntryTrampoline(MacroAssembler* masm); | 268 static void Generate_JSConstructEntryTrampoline(MacroAssembler* masm); |
| 269 static void Generate_InterpreterEntryTrampoline(MacroAssembler* masm); |
| 270 static void Generate_InterpreterExitTrampoline(MacroAssembler* masm); |
269 static void Generate_NotifyDeoptimized(MacroAssembler* masm); | 271 static void Generate_NotifyDeoptimized(MacroAssembler* masm); |
270 static void Generate_NotifySoftDeoptimized(MacroAssembler* masm); | 272 static void Generate_NotifySoftDeoptimized(MacroAssembler* masm); |
271 static void Generate_NotifyLazyDeoptimized(MacroAssembler* masm); | 273 static void Generate_NotifyLazyDeoptimized(MacroAssembler* masm); |
272 static void Generate_NotifyStubFailure(MacroAssembler* masm); | 274 static void Generate_NotifyStubFailure(MacroAssembler* masm); |
273 static void Generate_NotifyStubFailureSaveDoubles(MacroAssembler* masm); | 275 static void Generate_NotifyStubFailureSaveDoubles(MacroAssembler* masm); |
274 static void Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm); | 276 static void Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm); |
275 | 277 |
276 // ES6 section 9.2.1 [[Call]] ( thisArgument, argumentsList) | 278 // ES6 section 9.2.1 [[Call]] ( thisArgument, argumentsList) |
277 static void Generate_CallFunction(MacroAssembler* masm); | 279 static void Generate_CallFunction(MacroAssembler* masm); |
278 // ES6 section 7.3.12 Call(F, V, [argumentsList]) | 280 // ES6 section 7.3.12 Call(F, V, [argumentsList]) |
279 static void Generate_Call(MacroAssembler* masm); | 281 static void Generate_Call(MacroAssembler* masm); |
280 | 282 |
281 // ES6 section 9.2.2 [[Construct]] ( argumentsList, newTarget) | 283 // ES6 section 9.2.2 [[Construct]] ( argumentsList, newTarget) |
282 static void Generate_ConstructFunction(MacroAssembler* masm); | 284 static void Generate_ConstructFunction(MacroAssembler* masm); |
283 // ES6 section 9.5.14 [[Construct]] ( argumentsList, newTarget) | 285 // ES6 section 9.5.14 [[Construct]] ( argumentsList, newTarget) |
284 static void Generate_ConstructProxy(MacroAssembler* masm); | 286 static void Generate_ConstructProxy(MacroAssembler* masm); |
285 // ES6 section 7.3.13 Construct (F, [argumentsList], [newTarget]) | 287 // ES6 section 7.3.13 Construct (F, [argumentsList], [newTarget]) |
286 static void Generate_Construct(MacroAssembler* masm); | 288 static void Generate_Construct(MacroAssembler* masm); |
287 | 289 |
| 290 static void Generate_PushArgsAndCall(MacroAssembler* masm); |
| 291 |
288 static void Generate_FunctionCall(MacroAssembler* masm); | 292 static void Generate_FunctionCall(MacroAssembler* masm); |
289 static void Generate_FunctionApply(MacroAssembler* masm); | 293 static void Generate_FunctionApply(MacroAssembler* masm); |
290 static void Generate_ReflectApply(MacroAssembler* masm); | 294 static void Generate_ReflectApply(MacroAssembler* masm); |
291 static void Generate_ReflectConstruct(MacroAssembler* masm); | 295 static void Generate_ReflectConstruct(MacroAssembler* masm); |
292 | 296 |
293 static void Generate_InternalArrayCode(MacroAssembler* masm); | 297 static void Generate_InternalArrayCode(MacroAssembler* masm); |
294 static void Generate_ArrayCode(MacroAssembler* masm); | 298 static void Generate_ArrayCode(MacroAssembler* masm); |
295 | 299 |
296 static void Generate_StringConstructor(MacroAssembler* masm); | 300 static void Generate_StringConstructor(MacroAssembler* masm); |
297 static void Generate_StringConstructor_ConstructStub(MacroAssembler* masm); | 301 static void Generate_StringConstructor_ConstructStub(MacroAssembler* masm); |
298 static void Generate_OnStackReplacement(MacroAssembler* masm); | 302 static void Generate_OnStackReplacement(MacroAssembler* masm); |
299 static void Generate_OsrAfterStackCheck(MacroAssembler* masm); | 303 static void Generate_OsrAfterStackCheck(MacroAssembler* masm); |
300 static void Generate_InterruptCheck(MacroAssembler* masm); | 304 static void Generate_InterruptCheck(MacroAssembler* masm); |
301 static void Generate_StackCheck(MacroAssembler* masm); | 305 static void Generate_StackCheck(MacroAssembler* masm); |
302 | 306 |
303 static void Generate_InterpreterEntryTrampoline(MacroAssembler* masm); | |
304 static void Generate_InterpreterExitTrampoline(MacroAssembler* masm); | |
305 static void Generate_InterpreterPushArgsAndCall(MacroAssembler* masm); | |
306 | |
307 #define DECLARE_CODE_AGE_BUILTIN_GENERATOR(C) \ | 307 #define DECLARE_CODE_AGE_BUILTIN_GENERATOR(C) \ |
308 static void Generate_Make##C##CodeYoungAgainEvenMarking( \ | 308 static void Generate_Make##C##CodeYoungAgainEvenMarking( \ |
309 MacroAssembler* masm); \ | 309 MacroAssembler* masm); \ |
310 static void Generate_Make##C##CodeYoungAgainOddMarking( \ | 310 static void Generate_Make##C##CodeYoungAgainOddMarking( \ |
311 MacroAssembler* masm); | 311 MacroAssembler* masm); |
312 CODE_AGE_LIST(DECLARE_CODE_AGE_BUILTIN_GENERATOR) | 312 CODE_AGE_LIST(DECLARE_CODE_AGE_BUILTIN_GENERATOR) |
313 #undef DECLARE_CODE_AGE_BUILTIN_GENERATOR | 313 #undef DECLARE_CODE_AGE_BUILTIN_GENERATOR |
314 | 314 |
315 static void Generate_MarkCodeAsToBeExecutedOnce(MacroAssembler* masm); | 315 static void Generate_MarkCodeAsToBeExecutedOnce(MacroAssembler* masm); |
316 static void Generate_MarkCodeAsExecutedOnce(MacroAssembler* masm); | 316 static void Generate_MarkCodeAsExecutedOnce(MacroAssembler* masm); |
317 static void Generate_MarkCodeAsExecutedTwice(MacroAssembler* masm); | 317 static void Generate_MarkCodeAsExecutedTwice(MacroAssembler* masm); |
318 | 318 |
319 static void InitBuiltinFunctionTable(); | 319 static void InitBuiltinFunctionTable(); |
320 | 320 |
321 bool initialized_; | 321 bool initialized_; |
322 | 322 |
323 friend class BuiltinFunctionTable; | 323 friend class BuiltinFunctionTable; |
324 friend class Isolate; | 324 friend class Isolate; |
325 | 325 |
326 DISALLOW_COPY_AND_ASSIGN(Builtins); | 326 DISALLOW_COPY_AND_ASSIGN(Builtins); |
327 }; | 327 }; |
328 | 328 |
329 } // namespace internal | 329 } // namespace internal |
330 } // namespace v8 | 330 } // namespace v8 |
331 | 331 |
332 #endif // V8_BUILTINS_H_ | 332 #endif // V8_BUILTINS_H_ |
OLD | NEW |