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