| 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/base/flags.h" | 8 #include "src/base/flags.h" |
| 9 #include "src/handles.h" | 9 #include "src/handles.h" |
| 10 | 10 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 V(ArrayPop, kNone) \ | 61 V(ArrayPop, kNone) \ |
| 62 V(ArrayPush, kNone) \ | 62 V(ArrayPush, kNone) \ |
| 63 V(ArrayShift, kNone) \ | 63 V(ArrayShift, kNone) \ |
| 64 V(ArraySlice, kNone) \ | 64 V(ArraySlice, kNone) \ |
| 65 V(ArraySplice, kNone) \ | 65 V(ArraySplice, kNone) \ |
| 66 V(ArrayUnshift, kNone) \ | 66 V(ArrayUnshift, kNone) \ |
| 67 \ | 67 \ |
| 68 V(DateToPrimitive, kNone) \ | 68 V(DateToPrimitive, kNone) \ |
| 69 \ | 69 \ |
| 70 V(FunctionConstructor, kTargetAndNewTarget) \ | 70 V(FunctionConstructor, kTargetAndNewTarget) \ |
| 71 V(FunctionPrototypeBind, kNone) \ |
| 71 V(FunctionPrototypeToString, kNone) \ | 72 V(FunctionPrototypeToString, kNone) \ |
| 72 \ | 73 \ |
| 73 V(GeneratorFunctionConstructor, kTargetAndNewTarget) \ | 74 V(GeneratorFunctionConstructor, kTargetAndNewTarget) \ |
| 74 \ | 75 \ |
| 75 V(GlobalEval, kTarget) \ | 76 V(GlobalEval, kTarget) \ |
| 76 \ | 77 \ |
| 77 V(ObjectAssign, kNone) \ | 78 V(ObjectAssign, kNone) \ |
| 78 V(ObjectProtoToString, kNone) \ | 79 V(ObjectProtoToString, kNone) \ |
| 79 \ | 80 \ |
| 80 V(ProxyConstructor, kNone) \ | 81 V(ProxyConstructor, kNone) \ |
| (...skipping 26 matching lines...) Expand all Loading... |
| 107 #define BUILTIN_LIST_A(V) \ | 108 #define BUILTIN_LIST_A(V) \ |
| 108 V(ArgumentsAdaptorTrampoline, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 109 V(ArgumentsAdaptorTrampoline, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 109 \ | 110 \ |
| 110 V(ConstructedNonConstructable, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 111 V(ConstructedNonConstructable, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 111 \ | 112 \ |
| 112 V(CallFunction_ReceiverIsNullOrUndefined, BUILTIN, UNINITIALIZED, \ | 113 V(CallFunction_ReceiverIsNullOrUndefined, BUILTIN, UNINITIALIZED, \ |
| 113 kNoExtraICState) \ | 114 kNoExtraICState) \ |
| 114 V(CallFunction_ReceiverIsNotNullOrUndefined, BUILTIN, UNINITIALIZED, \ | 115 V(CallFunction_ReceiverIsNotNullOrUndefined, BUILTIN, UNINITIALIZED, \ |
| 115 kNoExtraICState) \ | 116 kNoExtraICState) \ |
| 116 V(CallFunction_ReceiverIsAny, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 117 V(CallFunction_ReceiverIsAny, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 118 V(CallBoundFunction, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 117 V(Call_ReceiverIsNullOrUndefined, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 119 V(Call_ReceiverIsNullOrUndefined, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 118 V(Call_ReceiverIsNotNullOrUndefined, BUILTIN, UNINITIALIZED, \ | 120 V(Call_ReceiverIsNotNullOrUndefined, BUILTIN, UNINITIALIZED, \ |
| 119 kNoExtraICState) \ | 121 kNoExtraICState) \ |
| 120 V(Call_ReceiverIsAny, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 122 V(Call_ReceiverIsAny, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 121 \ | 123 \ |
| 122 V(ConstructFunction, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 124 V(ConstructFunction, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 125 V(ConstructBoundFunction, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 123 V(ConstructProxy, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 126 V(ConstructProxy, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 124 V(Construct, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 127 V(Construct, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 125 \ | 128 \ |
| 126 V(Apply, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 129 V(Apply, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 127 \ | 130 \ |
| 128 V(HandleFastApiCall, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 131 V(HandleFastApiCall, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 129 \ | 132 \ |
| 130 V(InOptimizationQueue, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 133 V(InOptimizationQueue, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 131 V(JSConstructStubGeneric, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 134 V(JSConstructStubGeneric, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 132 V(JSBuiltinsConstructStub, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 135 V(JSBuiltinsConstructStub, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 MacroAssembler* masm) { | 339 MacroAssembler* masm) { |
| 337 Generate_CallFunction(masm, ConvertReceiverMode::kNullOrUndefined); | 340 Generate_CallFunction(masm, ConvertReceiverMode::kNullOrUndefined); |
| 338 } | 341 } |
| 339 static void Generate_CallFunction_ReceiverIsNotNullOrUndefined( | 342 static void Generate_CallFunction_ReceiverIsNotNullOrUndefined( |
| 340 MacroAssembler* masm) { | 343 MacroAssembler* masm) { |
| 341 Generate_CallFunction(masm, ConvertReceiverMode::kNotNullOrUndefined); | 344 Generate_CallFunction(masm, ConvertReceiverMode::kNotNullOrUndefined); |
| 342 } | 345 } |
| 343 static void Generate_CallFunction_ReceiverIsAny(MacroAssembler* masm) { | 346 static void Generate_CallFunction_ReceiverIsAny(MacroAssembler* masm) { |
| 344 Generate_CallFunction(masm, ConvertReceiverMode::kAny); | 347 Generate_CallFunction(masm, ConvertReceiverMode::kAny); |
| 345 } | 348 } |
| 349 // ES6 section 9.4.1.1 [[Call]] ( thisArgument, argumentsList) |
| 350 static void Generate_CallBoundFunction(MacroAssembler* masm); |
| 346 // ES6 section 7.3.12 Call(F, V, [argumentsList]) | 351 // ES6 section 7.3.12 Call(F, V, [argumentsList]) |
| 347 static void Generate_Call(MacroAssembler* masm, ConvertReceiverMode mode); | 352 static void Generate_Call(MacroAssembler* masm, ConvertReceiverMode mode); |
| 348 static void Generate_Call_ReceiverIsNullOrUndefined(MacroAssembler* masm) { | 353 static void Generate_Call_ReceiverIsNullOrUndefined(MacroAssembler* masm) { |
| 349 Generate_Call(masm, ConvertReceiverMode::kNullOrUndefined); | 354 Generate_Call(masm, ConvertReceiverMode::kNullOrUndefined); |
| 350 } | 355 } |
| 351 static void Generate_Call_ReceiverIsNotNullOrUndefined(MacroAssembler* masm) { | 356 static void Generate_Call_ReceiverIsNotNullOrUndefined(MacroAssembler* masm) { |
| 352 Generate_Call(masm, ConvertReceiverMode::kNotNullOrUndefined); | 357 Generate_Call(masm, ConvertReceiverMode::kNotNullOrUndefined); |
| 353 } | 358 } |
| 354 static void Generate_Call_ReceiverIsAny(MacroAssembler* masm) { | 359 static void Generate_Call_ReceiverIsAny(MacroAssembler* masm) { |
| 355 Generate_Call(masm, ConvertReceiverMode::kAny); | 360 Generate_Call(masm, ConvertReceiverMode::kAny); |
| 356 } | 361 } |
| 357 | 362 |
| 358 // ES6 section 9.2.2 [[Construct]] ( argumentsList, newTarget) | 363 // ES6 section 9.2.2 [[Construct]] ( argumentsList, newTarget) |
| 359 static void Generate_ConstructFunction(MacroAssembler* masm); | 364 static void Generate_ConstructFunction(MacroAssembler* masm); |
| 365 // ES6 section 9.4.1.2 [[Construct]] (argumentsList, newTarget) |
| 366 static void Generate_ConstructBoundFunction(MacroAssembler* masm); |
| 360 // ES6 section 9.5.14 [[Construct]] ( argumentsList, newTarget) | 367 // ES6 section 9.5.14 [[Construct]] ( argumentsList, newTarget) |
| 361 static void Generate_ConstructProxy(MacroAssembler* masm); | 368 static void Generate_ConstructProxy(MacroAssembler* masm); |
| 362 // ES6 section 7.3.13 Construct (F, [argumentsList], [newTarget]) | 369 // ES6 section 7.3.13 Construct (F, [argumentsList], [newTarget]) |
| 363 static void Generate_Construct(MacroAssembler* masm); | 370 static void Generate_Construct(MacroAssembler* masm); |
| 364 | 371 |
| 365 static void Generate_HandleFastApiCall(MacroAssembler* masm); | 372 static void Generate_HandleFastApiCall(MacroAssembler* masm); |
| 366 | 373 |
| 367 static void Generate_FunctionPrototypeApply(MacroAssembler* masm); | 374 static void Generate_FunctionPrototypeApply(MacroAssembler* masm); |
| 368 static void Generate_FunctionPrototypeCall(MacroAssembler* masm); | 375 static void Generate_FunctionPrototypeCall(MacroAssembler* masm); |
| 369 static void Generate_ReflectApply(MacroAssembler* masm); | 376 static void Generate_ReflectApply(MacroAssembler* masm); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 friend class BuiltinFunctionTable; | 413 friend class BuiltinFunctionTable; |
| 407 friend class Isolate; | 414 friend class Isolate; |
| 408 | 415 |
| 409 DISALLOW_COPY_AND_ASSIGN(Builtins); | 416 DISALLOW_COPY_AND_ASSIGN(Builtins); |
| 410 }; | 417 }; |
| 411 | 418 |
| 412 } // namespace internal | 419 } // namespace internal |
| 413 } // namespace v8 | 420 } // namespace v8 |
| 414 | 421 |
| 415 #endif // V8_BUILTINS_H_ | 422 #endif // V8_BUILTINS_H_ |
| OLD | NEW |