OLD | NEW |
---|---|
1 // Copyright 2017 the V8 project authors. All rights reserved. | 1 // Copyright 2017 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_BUILTINS_DEFINITIONS_H_ | 5 #ifndef V8_BUILTINS_BUILTINS_DEFINITIONS_H_ |
6 #define V8_BUILTINS_BUILTINS_DEFINITIONS_H_ | 6 #define V8_BUILTINS_BUILTINS_DEFINITIONS_H_ |
7 | 7 |
8 namespace v8 { | 8 namespace v8 { |
9 namespace internal { | 9 namespace internal { |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... | |
28 | 28 |
29 #define DECLARE_CODE_AGE_BUILTIN(C, V) V(Make##C##CodeYoungAgain) | 29 #define DECLARE_CODE_AGE_BUILTIN(C, V) V(Make##C##CodeYoungAgain) |
30 | 30 |
31 // CPP: Builtin in C++. Entered via BUILTIN_EXIT frame. | 31 // CPP: Builtin in C++. Entered via BUILTIN_EXIT frame. |
32 // Args: name | 32 // Args: name |
33 // API: Builtin in C++ for API callbacks. Entered via EXIT frame. | 33 // API: Builtin in C++ for API callbacks. Entered via EXIT frame. |
34 // Args: name | 34 // Args: name |
35 // TFJ: Builtin in Turbofan, with JS linkage (callable as Javascript function). | 35 // TFJ: Builtin in Turbofan, with JS linkage (callable as Javascript function). |
36 // Args: name, arguments count, explicit argument names... | 36 // Args: name, arguments count, explicit argument names... |
37 // TFS: Builtin in Turbofan, with CodeStub linkage. | 37 // TFS: Builtin in Turbofan, with CodeStub linkage. |
38 // Args: name, explicit argument names... | |
39 // TFC: Builtin in Turbofan, with CodeStub linkage and custom descriptor. | |
38 // Args: name, interface descriptor, return_size | 40 // Args: name, interface descriptor, return_size |
Igor Sheludko
2017/04/04 09:05:43
It looks like the result size should be a part of
jgruber
2017/04/07 08:41:11
Acknowledged. Let's take that on in a separate CL.
| |
39 // TFH: Handlers in Turbofan, with CodeStub linkage. | 41 // TFH: Handlers in Turbofan, with CodeStub linkage. |
40 // Args: name, code kind, extra IC state, interface descriptor | 42 // Args: name, code kind, extra IC state, interface descriptor |
41 // ASM: Builtin in platform-dependent assembly. | 43 // ASM: Builtin in platform-dependent assembly. |
42 // Args: name | 44 // Args: name |
43 // DBG: Builtin in platform-dependent assembly, used by the debugger. | 45 // DBG: Builtin in platform-dependent assembly, used by the debugger. |
44 // Args: name | 46 // Args: name |
45 | 47 |
46 #define BUILTIN_LIST_BASE(CPP, API, TFJ, TFS, TFH, ASM, DBG) \ | 48 #define BUILTIN_LIST_BASE(CPP, API, TFJ, TFC, TFS, TFH, ASM, DBG) \ |
47 ASM(Abort) \ | 49 ASM(Abort) \ |
48 /* Code aging */ \ | 50 /* Code aging */ \ |
49 CODE_AGE_LIST_WITH_ARG(DECLARE_CODE_AGE_BUILTIN, ASM) \ | 51 CODE_AGE_LIST_WITH_ARG(DECLARE_CODE_AGE_BUILTIN, ASM) \ |
50 \ | 52 \ |
51 /* Declared first for dependency reasons */ \ | 53 /* Declared first for dependency reasons */ \ |
52 ASM(CompileLazy) \ | 54 ASM(CompileLazy) \ |
53 TFS(ToObject, TypeConversion, 1) \ | 55 TFC(ToObject, TypeConversion, 1) \ |
54 TFS(FastNewObject, FastNewObject, 1) \ | 56 TFC(FastNewObject, FastNewObject, 1) \ |
55 TFS(HasProperty, HasProperty, 1) \ | 57 TFS(HasProperty, kKey, kObject) \ |
56 \ | 58 \ |
57 /* Calls */ \ | 59 /* Calls */ \ |
58 ASM(ArgumentsAdaptorTrampoline) \ | 60 ASM(ArgumentsAdaptorTrampoline) \ |
59 /* ES6 section 9.2.1 [[Call]] ( thisArgument, argumentsList) */ \ | 61 /* ES6 section 9.2.1 [[Call]] ( thisArgument, argumentsList) */ \ |
60 ASM(CallFunction_ReceiverIsNullOrUndefined) \ | 62 ASM(CallFunction_ReceiverIsNullOrUndefined) \ |
61 ASM(CallFunction_ReceiverIsNotNullOrUndefined) \ | 63 ASM(CallFunction_ReceiverIsNotNullOrUndefined) \ |
62 ASM(CallFunction_ReceiverIsAny) \ | 64 ASM(CallFunction_ReceiverIsAny) \ |
63 ASM(TailCallFunction_ReceiverIsNullOrUndefined) \ | 65 ASM(TailCallFunction_ReceiverIsNullOrUndefined) \ |
64 ASM(TailCallFunction_ReceiverIsNotNullOrUndefined) \ | 66 ASM(TailCallFunction_ReceiverIsNotNullOrUndefined) \ |
65 ASM(TailCallFunction_ReceiverIsAny) \ | 67 ASM(TailCallFunction_ReceiverIsAny) \ |
(...skipping 19 matching lines...) Expand all Loading... | |
85 ASM(ConstructedNonConstructable) \ | 87 ASM(ConstructedNonConstructable) \ |
86 /* ES6 section 9.5.14 [[Construct]] ( argumentsList, newTarget) */ \ | 88 /* ES6 section 9.5.14 [[Construct]] ( argumentsList, newTarget) */ \ |
87 ASM(ConstructProxy) \ | 89 ASM(ConstructProxy) \ |
88 /* ES6 section 7.3.13 Construct (F, [argumentsList], [newTarget]) */ \ | 90 /* ES6 section 7.3.13 Construct (F, [argumentsList], [newTarget]) */ \ |
89 ASM(Construct) \ | 91 ASM(Construct) \ |
90 ASM(ConstructWithSpread) \ | 92 ASM(ConstructWithSpread) \ |
91 ASM(JSConstructStubApi) \ | 93 ASM(JSConstructStubApi) \ |
92 ASM(JSConstructStubGeneric) \ | 94 ASM(JSConstructStubGeneric) \ |
93 ASM(JSBuiltinsConstructStub) \ | 95 ASM(JSBuiltinsConstructStub) \ |
94 ASM(JSBuiltinsConstructStubForDerived) \ | 96 ASM(JSBuiltinsConstructStubForDerived) \ |
95 TFS(FastNewClosure, FastNewClosure, 1) \ | 97 TFC(FastNewClosure, FastNewClosure, 1) \ |
96 TFS(FastNewFunctionContextEval, FastNewFunctionContext, 1) \ | 98 TFC(FastNewFunctionContextEval, FastNewFunctionContext, 1) \ |
97 TFS(FastNewFunctionContextFunction, FastNewFunctionContext, 1) \ | 99 TFC(FastNewFunctionContextFunction, FastNewFunctionContext, 1) \ |
98 TFS(FastNewStrictArguments, FastNewArguments, 1) \ | 100 TFC(FastNewStrictArguments, FastNewArguments, 1) \ |
99 TFS(FastNewSloppyArguments, FastNewArguments, 1) \ | 101 TFC(FastNewSloppyArguments, FastNewArguments, 1) \ |
100 TFS(FastNewRestParameter, FastNewArguments, 1) \ | 102 TFC(FastNewRestParameter, FastNewArguments, 1) \ |
101 TFS(FastCloneRegExp, FastCloneRegExp, 1) \ | 103 TFC(FastCloneRegExp, FastCloneRegExp, 1) \ |
102 TFS(FastCloneShallowArrayTrack, FastCloneShallowArray, 1) \ | 104 TFC(FastCloneShallowArrayTrack, FastCloneShallowArray, 1) \ |
103 TFS(FastCloneShallowArrayDontTrack, FastCloneShallowArray, 1) \ | 105 TFC(FastCloneShallowArrayDontTrack, FastCloneShallowArray, 1) \ |
104 TFS(FastCloneShallowObject0, FastCloneShallowObject, 1) \ | 106 TFC(FastCloneShallowObject0, FastCloneShallowObject, 1) \ |
105 TFS(FastCloneShallowObject1, FastCloneShallowObject, 1) \ | 107 TFC(FastCloneShallowObject1, FastCloneShallowObject, 1) \ |
106 TFS(FastCloneShallowObject2, FastCloneShallowObject, 1) \ | 108 TFC(FastCloneShallowObject2, FastCloneShallowObject, 1) \ |
107 TFS(FastCloneShallowObject3, FastCloneShallowObject, 1) \ | 109 TFC(FastCloneShallowObject3, FastCloneShallowObject, 1) \ |
108 TFS(FastCloneShallowObject4, FastCloneShallowObject, 1) \ | 110 TFC(FastCloneShallowObject4, FastCloneShallowObject, 1) \ |
109 TFS(FastCloneShallowObject5, FastCloneShallowObject, 1) \ | 111 TFC(FastCloneShallowObject5, FastCloneShallowObject, 1) \ |
110 TFS(FastCloneShallowObject6, FastCloneShallowObject, 1) \ | 112 TFC(FastCloneShallowObject6, FastCloneShallowObject, 1) \ |
111 \ | 113 \ |
112 /* Apply and entries */ \ | 114 /* Apply and entries */ \ |
113 ASM(Apply) \ | 115 ASM(Apply) \ |
114 ASM(JSEntryTrampoline) \ | 116 ASM(JSEntryTrampoline) \ |
115 ASM(JSConstructEntryTrampoline) \ | 117 ASM(JSConstructEntryTrampoline) \ |
116 ASM(ResumeGeneratorTrampoline) \ | 118 ASM(ResumeGeneratorTrampoline) \ |
117 \ | 119 \ |
118 /* Stack and interrupt check */ \ | 120 /* Stack and interrupt check */ \ |
119 ASM(InterruptCheck) \ | 121 ASM(InterruptCheck) \ |
120 ASM(StackCheck) \ | 122 ASM(StackCheck) \ |
121 \ | 123 \ |
122 /* String helpers */ \ | 124 /* String helpers */ \ |
123 TFS(StringCharAt, StringCharAt, 1) \ | 125 TFC(StringCharAt, StringCharAt, 1) \ |
124 TFS(StringCharCodeAt, StringCharCodeAt, 1) \ | 126 TFC(StringCharCodeAt, StringCharCodeAt, 1) \ |
125 TFS(StringEqual, Compare, 1) \ | 127 TFC(StringEqual, Compare, 1) \ |
126 TFS(StringGreaterThan, Compare, 1) \ | 128 TFC(StringGreaterThan, Compare, 1) \ |
127 TFS(StringGreaterThanOrEqual, Compare, 1) \ | 129 TFC(StringGreaterThanOrEqual, Compare, 1) \ |
128 TFS(StringIndexOf, StringIndexOf, 1) \ | 130 TFS(StringIndexOf, kReceiver, kSearchString, kPosition) \ |
129 TFS(StringLessThan, Compare, 1) \ | 131 TFC(StringLessThan, Compare, 1) \ |
130 TFS(StringLessThanOrEqual, Compare, 1) \ | 132 TFC(StringLessThanOrEqual, Compare, 1) \ |
131 \ | 133 \ |
132 /* Interpreter */ \ | 134 /* Interpreter */ \ |
133 ASM(InterpreterEntryTrampoline) \ | 135 ASM(InterpreterEntryTrampoline) \ |
134 ASM(InterpreterPushArgsAndCall) \ | 136 ASM(InterpreterPushArgsAndCall) \ |
135 ASM(InterpreterPushArgsAndCallFunction) \ | 137 ASM(InterpreterPushArgsAndCallFunction) \ |
136 ASM(InterpreterPushArgsAndCallWithFinalSpread) \ | 138 ASM(InterpreterPushArgsAndCallWithFinalSpread) \ |
137 ASM(InterpreterPushArgsAndTailCall) \ | 139 ASM(InterpreterPushArgsAndTailCall) \ |
138 ASM(InterpreterPushArgsAndTailCallFunction) \ | 140 ASM(InterpreterPushArgsAndTailCallFunction) \ |
139 ASM(InterpreterPushArgsAndConstruct) \ | 141 ASM(InterpreterPushArgsAndConstruct) \ |
140 ASM(InterpreterPushArgsAndConstructFunction) \ | 142 ASM(InterpreterPushArgsAndConstructFunction) \ |
(...skipping 21 matching lines...) Expand all Loading... | |
162 /* API callback handling */ \ | 164 /* API callback handling */ \ |
163 API(HandleApiCall) \ | 165 API(HandleApiCall) \ |
164 API(HandleApiCallAsFunction) \ | 166 API(HandleApiCallAsFunction) \ |
165 API(HandleApiCallAsConstructor) \ | 167 API(HandleApiCallAsConstructor) \ |
166 \ | 168 \ |
167 /* Adapters for Turbofan into runtime */ \ | 169 /* Adapters for Turbofan into runtime */ \ |
168 ASM(AllocateInNewSpace) \ | 170 ASM(AllocateInNewSpace) \ |
169 ASM(AllocateInOldSpace) \ | 171 ASM(AllocateInOldSpace) \ |
170 \ | 172 \ |
171 /* TurboFan support builtins */ \ | 173 /* TurboFan support builtins */ \ |
172 TFS(CopyFastSmiOrObjectElements, CopyFastSmiOrObjectElements, 1) \ | 174 TFS(CopyFastSmiOrObjectElements, kObject) \ |
173 TFS(GrowFastDoubleElements, GrowArrayElements, 1) \ | 175 TFC(GrowFastDoubleElements, GrowArrayElements, 1) \ |
174 TFS(GrowFastSmiOrObjectElements, GrowArrayElements, 1) \ | 176 TFC(GrowFastSmiOrObjectElements, GrowArrayElements, 1) \ |
175 TFS(NewUnmappedArgumentsElements, NewArgumentsElements, 1) \ | 177 TFC(NewUnmappedArgumentsElements, NewArgumentsElements, 1) \ |
176 \ | 178 \ |
177 /* Debugger */ \ | 179 /* Debugger */ \ |
178 DBG(FrameDropperTrampoline) \ | 180 DBG(FrameDropperTrampoline) \ |
179 DBG(HandleDebuggerStatement) \ | 181 DBG(HandleDebuggerStatement) \ |
180 DBG(Return_DebugBreak) \ | 182 DBG(Return_DebugBreak) \ |
181 DBG(Slot_DebugBreak) \ | 183 DBG(Slot_DebugBreak) \ |
182 \ | 184 \ |
183 /* Type conversions */ \ | 185 /* Type conversions */ \ |
184 TFS(ToBoolean, TypeConversion, 1) \ | 186 TFC(ToBoolean, TypeConversion, 1) \ |
185 TFS(OrdinaryToPrimitive_Number, TypeConversion, 1) \ | 187 TFC(OrdinaryToPrimitive_Number, TypeConversion, 1) \ |
186 TFS(OrdinaryToPrimitive_String, TypeConversion, 1) \ | 188 TFC(OrdinaryToPrimitive_String, TypeConversion, 1) \ |
187 TFS(NonPrimitiveToPrimitive_Default, TypeConversion, 1) \ | 189 TFC(NonPrimitiveToPrimitive_Default, TypeConversion, 1) \ |
188 TFS(NonPrimitiveToPrimitive_Number, TypeConversion, 1) \ | 190 TFC(NonPrimitiveToPrimitive_Number, TypeConversion, 1) \ |
189 TFS(NonPrimitiveToPrimitive_String, TypeConversion, 1) \ | 191 TFC(NonPrimitiveToPrimitive_String, TypeConversion, 1) \ |
190 TFS(StringToNumber, TypeConversion, 1) \ | 192 TFC(StringToNumber, TypeConversion, 1) \ |
191 TFS(ToName, TypeConversion, 1) \ | 193 TFC(ToName, TypeConversion, 1) \ |
192 TFS(NonNumberToNumber, TypeConversion, 1) \ | 194 TFC(NonNumberToNumber, TypeConversion, 1) \ |
193 TFS(ToNumber, TypeConversion, 1) \ | 195 TFC(ToNumber, TypeConversion, 1) \ |
194 TFS(ToString, TypeConversion, 1) \ | 196 TFC(ToString, TypeConversion, 1) \ |
195 TFS(ToInteger, TypeConversion, 1) \ | 197 TFC(ToInteger, TypeConversion, 1) \ |
196 TFS(ToLength, TypeConversion, 1) \ | 198 TFC(ToLength, TypeConversion, 1) \ |
197 TFS(ClassOf, Typeof, 1) \ | 199 TFC(ClassOf, Typeof, 1) \ |
198 TFS(Typeof, Typeof, 1) \ | 200 TFC(Typeof, Typeof, 1) \ |
199 TFS(GetSuperConstructor, Typeof, 1) \ | 201 TFC(GetSuperConstructor, Typeof, 1) \ |
200 \ | 202 \ |
201 /* Handlers */ \ | 203 /* Handlers */ \ |
202 TFH(LoadICProtoArray, BUILTIN, kNoExtraICState, LoadICProtoArray) \ | 204 TFH(LoadICProtoArray, BUILTIN, kNoExtraICState, LoadICProtoArray) \ |
203 TFH(LoadICProtoArrayThrowIfNonexistent, BUILTIN, kNoExtraICState, \ | 205 TFH(LoadICProtoArrayThrowIfNonexistent, BUILTIN, kNoExtraICState, \ |
204 LoadICProtoArray) \ | 206 LoadICProtoArray) \ |
205 TFH(KeyedLoadIC_Megamorphic, BUILTIN, kNoExtraICState, LoadWithVector) \ | 207 TFH(KeyedLoadIC_Megamorphic, BUILTIN, kNoExtraICState, LoadWithVector) \ |
206 TFH(KeyedLoadIC_Miss, BUILTIN, kNoExtraICState, LoadWithVector) \ | 208 TFH(KeyedLoadIC_Miss, BUILTIN, kNoExtraICState, LoadWithVector) \ |
207 TFH(KeyedLoadIC_Slow, HANDLER, Code::LOAD_IC, LoadWithVector) \ | 209 TFH(KeyedLoadIC_Slow, HANDLER, Code::LOAD_IC, LoadWithVector) \ |
208 TFH(KeyedLoadIC_IndexedString, HANDLER, Code::LOAD_IC, LoadWithVector) \ | 210 TFH(KeyedLoadIC_IndexedString, HANDLER, Code::LOAD_IC, LoadWithVector) \ |
209 TFH(KeyedStoreIC_Megamorphic, BUILTIN, kNoExtraICState, StoreWithVector) \ | 211 TFH(KeyedStoreIC_Megamorphic, BUILTIN, kNoExtraICState, StoreWithVector) \ |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
444 /* ES6 #sec-function.prototype.bind */ \ | 446 /* ES6 #sec-function.prototype.bind */ \ |
445 TFJ(FastFunctionPrototypeBind, \ | 447 TFJ(FastFunctionPrototypeBind, \ |
446 SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ | 448 SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ |
447 ASM(FunctionPrototypeCall) \ | 449 ASM(FunctionPrototypeCall) \ |
448 /* ES6 #sec-function.prototype-@@hasinstance */ \ | 450 /* ES6 #sec-function.prototype-@@hasinstance */ \ |
449 TFJ(FunctionPrototypeHasInstance, 1, kV) \ | 451 TFJ(FunctionPrototypeHasInstance, 1, kV) \ |
450 /* ES6 #sec-function.prototype.tostring */ \ | 452 /* ES6 #sec-function.prototype.tostring */ \ |
451 CPP(FunctionPrototypeToString) \ | 453 CPP(FunctionPrototypeToString) \ |
452 \ | 454 \ |
453 /* Belongs to Objects but is a dependency of GeneratorPrototypeResume */ \ | 455 /* Belongs to Objects but is a dependency of GeneratorPrototypeResume */ \ |
454 TFS(CreateIterResultObject, CreateIterResultObject, 1) \ | 456 TFS(CreateIterResultObject, kValue, kDone) \ |
455 \ | 457 \ |
456 /* Generator and Async */ \ | 458 /* Generator and Async */ \ |
457 CPP(GeneratorFunctionConstructor) \ | 459 CPP(GeneratorFunctionConstructor) \ |
458 /* ES6 #sec-generator.prototype.next */ \ | 460 /* ES6 #sec-generator.prototype.next */ \ |
459 TFJ(GeneratorPrototypeNext, 1, kValue) \ | 461 TFJ(GeneratorPrototypeNext, 1, kValue) \ |
460 /* ES6 #sec-generator.prototype.return */ \ | 462 /* ES6 #sec-generator.prototype.return */ \ |
461 TFJ(GeneratorPrototypeReturn, 1, kValue) \ | 463 TFJ(GeneratorPrototypeReturn, 1, kValue) \ |
462 /* ES6 #sec-generator.prototype.throw */ \ | 464 /* ES6 #sec-generator.prototype.throw */ \ |
463 TFJ(GeneratorPrototypeThrow, 1, kException) \ | 465 TFJ(GeneratorPrototypeThrow, 1, kException) \ |
464 CPP(AsyncFunctionConstructor) \ | 466 CPP(AsyncFunctionConstructor) \ |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
590 TFJ(NumberParseFloat, 1, kString) \ | 592 TFJ(NumberParseFloat, 1, kString) \ |
591 /* ES6 #sec-number.parseint */ \ | 593 /* ES6 #sec-number.parseint */ \ |
592 TFJ(NumberParseInt, 2, kString, kRadix) \ | 594 TFJ(NumberParseInt, 2, kString, kRadix) \ |
593 CPP(NumberPrototypeToExponential) \ | 595 CPP(NumberPrototypeToExponential) \ |
594 CPP(NumberPrototypeToFixed) \ | 596 CPP(NumberPrototypeToFixed) \ |
595 CPP(NumberPrototypeToLocaleString) \ | 597 CPP(NumberPrototypeToLocaleString) \ |
596 CPP(NumberPrototypeToPrecision) \ | 598 CPP(NumberPrototypeToPrecision) \ |
597 CPP(NumberPrototypeToString) \ | 599 CPP(NumberPrototypeToString) \ |
598 /* ES6 #sec-number.prototype.valueof */ \ | 600 /* ES6 #sec-number.prototype.valueof */ \ |
599 TFJ(NumberPrototypeValueOf, 0) \ | 601 TFJ(NumberPrototypeValueOf, 0) \ |
600 TFS(Add, BinaryOp, 1) \ | 602 TFC(Add, BinaryOp, 1) \ |
601 TFS(Subtract, BinaryOp, 1) \ | 603 TFC(Subtract, BinaryOp, 1) \ |
602 TFS(Multiply, BinaryOp, 1) \ | 604 TFC(Multiply, BinaryOp, 1) \ |
603 TFS(Divide, BinaryOp, 1) \ | 605 TFC(Divide, BinaryOp, 1) \ |
604 TFS(Modulus, BinaryOp, 1) \ | 606 TFC(Modulus, BinaryOp, 1) \ |
605 TFS(BitwiseAnd, BinaryOp, 1) \ | 607 TFC(BitwiseAnd, BinaryOp, 1) \ |
606 TFS(BitwiseOr, BinaryOp, 1) \ | 608 TFC(BitwiseOr, BinaryOp, 1) \ |
607 TFS(BitwiseXor, BinaryOp, 1) \ | 609 TFC(BitwiseXor, BinaryOp, 1) \ |
608 TFS(ShiftLeft, BinaryOp, 1) \ | 610 TFC(ShiftLeft, BinaryOp, 1) \ |
609 TFS(ShiftRight, BinaryOp, 1) \ | 611 TFC(ShiftRight, BinaryOp, 1) \ |
610 TFS(ShiftRightLogical, BinaryOp, 1) \ | 612 TFC(ShiftRightLogical, BinaryOp, 1) \ |
611 TFS(LessThan, Compare, 1) \ | 613 TFC(LessThan, Compare, 1) \ |
612 TFS(LessThanOrEqual, Compare, 1) \ | 614 TFC(LessThanOrEqual, Compare, 1) \ |
613 TFS(GreaterThan, Compare, 1) \ | 615 TFC(GreaterThan, Compare, 1) \ |
614 TFS(GreaterThanOrEqual, Compare, 1) \ | 616 TFC(GreaterThanOrEqual, Compare, 1) \ |
615 TFS(Equal, Compare, 1) \ | 617 TFC(Equal, Compare, 1) \ |
616 TFS(StrictEqual, Compare, 1) \ | 618 TFC(StrictEqual, Compare, 1) \ |
617 TFS(AddWithFeedback, BinaryOpWithVector, 1) \ | 619 TFC(AddWithFeedback, BinaryOpWithVector, 1) \ |
618 TFS(SubtractWithFeedback, BinaryOpWithVector, 1) \ | 620 TFC(SubtractWithFeedback, BinaryOpWithVector, 1) \ |
619 \ | 621 \ |
620 /* Object */ \ | 622 /* Object */ \ |
621 CPP(ObjectAssign) \ | 623 CPP(ObjectAssign) \ |
622 /* ES #sec-object.create */ \ | 624 /* ES #sec-object.create */ \ |
623 TFJ(ObjectCreate, 2, kPrototype, kProperties) \ | 625 TFJ(ObjectCreate, 2, kPrototype, kProperties) \ |
624 CPP(ObjectDefineGetter) \ | 626 CPP(ObjectDefineGetter) \ |
625 CPP(ObjectDefineProperties) \ | 627 CPP(ObjectDefineProperties) \ |
626 CPP(ObjectDefineProperty) \ | 628 CPP(ObjectDefineProperty) \ |
627 CPP(ObjectDefineSetter) \ | 629 CPP(ObjectDefineSetter) \ |
628 CPP(ObjectEntries) \ | 630 CPP(ObjectEntries) \ |
(...skipping 18 matching lines...) Expand all Loading... | |
647 TFJ(ObjectProtoToString, 0) \ | 649 TFJ(ObjectProtoToString, 0) \ |
648 /* ES6 #sec-object.prototype.valueof */ \ | 650 /* ES6 #sec-object.prototype.valueof */ \ |
649 TFJ(ObjectPrototypeValueOf, 0) \ | 651 TFJ(ObjectPrototypeValueOf, 0) \ |
650 CPP(ObjectPrototypePropertyIsEnumerable) \ | 652 CPP(ObjectPrototypePropertyIsEnumerable) \ |
651 CPP(ObjectPrototypeGetProto) \ | 653 CPP(ObjectPrototypeGetProto) \ |
652 CPP(ObjectPrototypeSetProto) \ | 654 CPP(ObjectPrototypeSetProto) \ |
653 CPP(ObjectSeal) \ | 655 CPP(ObjectSeal) \ |
654 CPP(ObjectValues) \ | 656 CPP(ObjectValues) \ |
655 \ | 657 \ |
656 /* instanceof */ \ | 658 /* instanceof */ \ |
657 TFS(OrdinaryHasInstance, Compare, 1) \ | 659 TFC(OrdinaryHasInstance, Compare, 1) \ |
658 TFS(InstanceOf, Compare, 1) \ | 660 TFC(InstanceOf, Compare, 1) \ |
659 \ | 661 \ |
660 /* for-in */ \ | 662 /* for-in */ \ |
661 TFS(ForInFilter, ForInFilter, 1) \ | 663 TFS(ForInFilter, kKey, kObject) \ |
662 TFS(ForInNext, ForInNext, 1) \ | 664 TFS(ForInNext, kObject, kCacheArray, kCacheType, kIndex) \ |
663 TFS(ForInPrepare, ForInPrepare, 3) \ | 665 TFC(ForInPrepare, ForInPrepare, 3) \ |
664 \ | 666 \ |
665 /* Promise */ \ | 667 /* Promise */ \ |
666 /* ES6 #sec-getcapabilitiesexecutor-functions */ \ | 668 /* ES6 #sec-getcapabilitiesexecutor-functions */ \ |
667 TFJ(PromiseGetCapabilitiesExecutor, 2, kResolve, kReject) \ | 669 TFJ(PromiseGetCapabilitiesExecutor, 2, kResolve, kReject) \ |
668 /* ES6 #sec-newpromisecapability */ \ | 670 /* ES6 #sec-newpromisecapability */ \ |
669 TFJ(NewPromiseCapability, 2, kConstructor, kDebugEvent) \ | 671 TFJ(NewPromiseCapability, 2, kConstructor, kDebugEvent) \ |
670 /* ES6 #sec-promise-executor */ \ | 672 /* ES6 #sec-promise-executor */ \ |
671 TFJ(PromiseConstructor, 1, kExecutor) \ | 673 TFJ(PromiseConstructor, 1, kExecutor) \ |
672 TFJ(PromiseInternalConstructor, 1, kParent) \ | 674 TFJ(PromiseInternalConstructor, 1, kParent) \ |
673 TFJ(IsPromise, 1, kObject) \ | 675 TFJ(IsPromise, 1, kObject) \ |
674 /* ES #sec-promise-resolve-functions */ \ | 676 /* ES #sec-promise-resolve-functions */ \ |
675 TFJ(PromiseResolveClosure, 1, kValue) \ | 677 TFJ(PromiseResolveClosure, 1, kValue) \ |
676 /* ES #sec-promise-reject-functions */ \ | 678 /* ES #sec-promise-reject-functions */ \ |
677 TFJ(PromiseRejectClosure, 1, kValue) \ | 679 TFJ(PromiseRejectClosure, 1, kValue) \ |
678 /* ES #sec-promise.prototype.then */ \ | 680 /* ES #sec-promise.prototype.then */ \ |
679 TFJ(PromiseThen, 2, kOnFullfilled, kOnRejected) \ | 681 TFJ(PromiseThen, 2, kOnFullfilled, kOnRejected) \ |
680 /* ES #sec-promise.prototype.catch */ \ | 682 /* ES #sec-promise.prototype.catch */ \ |
681 TFJ(PromiseCatch, 1, kOnRejected) \ | 683 TFJ(PromiseCatch, 1, kOnRejected) \ |
682 /* ES #sec-fulfillpromise */ \ | 684 /* ES #sec-fulfillpromise */ \ |
683 TFJ(ResolvePromise, 2, kPromise, kValue) \ | 685 TFJ(ResolvePromise, 2, kPromise, kValue) \ |
684 TFS(PromiseHandleReject, PromiseHandleReject, 1) \ | 686 TFS(PromiseHandleReject, kPromise, kOnReject, kException) \ |
685 TFJ(PromiseHandle, 5, kValue, kHandler, kDeferredPromise, \ | 687 TFJ(PromiseHandle, 5, kValue, kHandler, kDeferredPromise, \ |
686 kDeferredOnResolve, kDeferredOnReject) \ | 688 kDeferredOnResolve, kDeferredOnReject) \ |
687 /* ES #sec-promise.resolve */ \ | 689 /* ES #sec-promise.resolve */ \ |
688 TFJ(PromiseResolve, 1, kValue) \ | 690 TFJ(PromiseResolve, 1, kValue) \ |
689 /* ES #sec-promise.reject */ \ | 691 /* ES #sec-promise.reject */ \ |
690 TFJ(PromiseReject, 1, kReason) \ | 692 TFJ(PromiseReject, 1, kReason) \ |
691 TFJ(InternalPromiseReject, 3, kPromise, kReason, kDebugEvent) \ | 693 TFJ(InternalPromiseReject, 3, kPromise, kReason, kDebugEvent) \ |
692 TFJ(PromiseFinally, 1, kOnFinally) \ | 694 TFJ(PromiseFinally, 1, kOnFinally) \ |
693 TFJ(PromiseThenFinally, 1, kValue) \ | 695 TFJ(PromiseThenFinally, 1, kValue) \ |
694 TFJ(PromiseCatchFinally, 1, kReason) \ | 696 TFJ(PromiseCatchFinally, 1, kReason) \ |
(...skipping 13 matching lines...) Expand all Loading... | |
708 CPP(ReflectGetOwnPropertyDescriptor) \ | 710 CPP(ReflectGetOwnPropertyDescriptor) \ |
709 CPP(ReflectGetPrototypeOf) \ | 711 CPP(ReflectGetPrototypeOf) \ |
710 CPP(ReflectHas) \ | 712 CPP(ReflectHas) \ |
711 CPP(ReflectIsExtensible) \ | 713 CPP(ReflectIsExtensible) \ |
712 CPP(ReflectOwnKeys) \ | 714 CPP(ReflectOwnKeys) \ |
713 CPP(ReflectPreventExtensions) \ | 715 CPP(ReflectPreventExtensions) \ |
714 CPP(ReflectSet) \ | 716 CPP(ReflectSet) \ |
715 CPP(ReflectSetPrototypeOf) \ | 717 CPP(ReflectSetPrototypeOf) \ |
716 \ | 718 \ |
717 /* RegExp */ \ | 719 /* RegExp */ \ |
718 TFS(RegExpPrototypeExecSlow, RegExpPrototypeExecSlow, 1) \ | 720 TFS(RegExpPrototypeExecSlow, kReceiver, kString) \ |
719 CPP(RegExpCapture1Getter) \ | 721 CPP(RegExpCapture1Getter) \ |
720 CPP(RegExpCapture2Getter) \ | 722 CPP(RegExpCapture2Getter) \ |
721 CPP(RegExpCapture3Getter) \ | 723 CPP(RegExpCapture3Getter) \ |
722 CPP(RegExpCapture4Getter) \ | 724 CPP(RegExpCapture4Getter) \ |
723 CPP(RegExpCapture5Getter) \ | 725 CPP(RegExpCapture5Getter) \ |
724 CPP(RegExpCapture6Getter) \ | 726 CPP(RegExpCapture6Getter) \ |
725 CPP(RegExpCapture7Getter) \ | 727 CPP(RegExpCapture7Getter) \ |
726 CPP(RegExpCapture8Getter) \ | 728 CPP(RegExpCapture8Getter) \ |
727 CPP(RegExpCapture9Getter) \ | 729 CPP(RegExpCapture9Getter) \ |
728 /* ES #sec-regexp-pattern-flags */ \ | 730 /* ES #sec-regexp-pattern-flags */ \ |
(...skipping 24 matching lines...) Expand all Loading... | |
753 TFJ(RegExpPrototypeSourceGetter, 0) \ | 755 TFJ(RegExpPrototypeSourceGetter, 0) \ |
754 /* ES #sec-get-regexp.prototype.sticky */ \ | 756 /* ES #sec-get-regexp.prototype.sticky */ \ |
755 TFJ(RegExpPrototypeStickyGetter, 0) \ | 757 TFJ(RegExpPrototypeStickyGetter, 0) \ |
756 /* ES #sec-regexp.prototype.test */ \ | 758 /* ES #sec-regexp.prototype.test */ \ |
757 TFJ(RegExpPrototypeTest, 1, kString) \ | 759 TFJ(RegExpPrototypeTest, 1, kString) \ |
758 CPP(RegExpPrototypeToString) \ | 760 CPP(RegExpPrototypeToString) \ |
759 /* ES #sec-get-regexp.prototype.unicode */ \ | 761 /* ES #sec-get-regexp.prototype.unicode */ \ |
760 TFJ(RegExpPrototypeUnicodeGetter, 0) \ | 762 TFJ(RegExpPrototypeUnicodeGetter, 0) \ |
761 CPP(RegExpRightContextGetter) \ | 763 CPP(RegExpRightContextGetter) \ |
762 \ | 764 \ |
763 TFS(RegExpReplace, RegExpReplace, 1) \ | 765 TFS(RegExpReplace, kRegExp, kString, kReplaceValue) \ |
764 /* ES #sec-regexp.prototype-@@replace */ \ | 766 /* ES #sec-regexp.prototype-@@replace */ \ |
765 TFJ(RegExpPrototypeReplace, 2, kString, kReplaceValue) \ | 767 TFJ(RegExpPrototypeReplace, 2, kString, kReplaceValue) \ |
766 \ | 768 \ |
767 TFS(RegExpSplit, RegExpSplit, 1) \ | 769 TFS(RegExpSplit, kRegExp, kString, kLimit) \ |
768 /* ES #sec-regexp.prototype-@@split */ \ | 770 /* ES #sec-regexp.prototype-@@split */ \ |
769 TFJ(RegExpPrototypeSplit, 2, kString, kLimit) \ | 771 TFJ(RegExpPrototypeSplit, 2, kString, kLimit) \ |
770 \ | 772 \ |
771 /* SharedArrayBuffer */ \ | 773 /* SharedArrayBuffer */ \ |
772 CPP(SharedArrayBufferPrototypeGetByteLength) \ | 774 CPP(SharedArrayBufferPrototypeGetByteLength) \ |
773 CPP(SharedArrayBufferPrototypeSlice) \ | 775 CPP(SharedArrayBufferPrototypeSlice) \ |
774 TFJ(AtomicsLoad, 2, kArray, kIndex) \ | 776 TFJ(AtomicsLoad, 2, kArray, kIndex) \ |
775 TFJ(AtomicsStore, 3, kArray, kIndex, kValue) \ | 777 TFJ(AtomicsStore, 3, kArray, kIndex, kValue) \ |
776 TFJ(AtomicsExchange, 3, kArray, kIndex, kValue) \ | 778 TFJ(AtomicsExchange, 3, kArray, kIndex, kValue) \ |
777 TFJ(AtomicsCompareExchange, 4, kArray, kIndex, kOldValue, kNewValue) \ | 779 TFJ(AtomicsCompareExchange, 4, kArray, kIndex, kOldValue, kNewValue) \ |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
885 CPP(TypedArrayPrototypeIncludes) \ | 887 CPP(TypedArrayPrototypeIncludes) \ |
886 /* ES6 #sec-%typedarray%.prototype.indexof */ \ | 888 /* ES6 #sec-%typedarray%.prototype.indexof */ \ |
887 CPP(TypedArrayPrototypeIndexOf) \ | 889 CPP(TypedArrayPrototypeIndexOf) \ |
888 /* ES6 #sec-%typedarray%.prototype.lastindexof */ \ | 890 /* ES6 #sec-%typedarray%.prototype.lastindexof */ \ |
889 CPP(TypedArrayPrototypeLastIndexOf) \ | 891 CPP(TypedArrayPrototypeLastIndexOf) \ |
890 /* ES6 #sec-%typedarray%.prototype.reverse */ \ | 892 /* ES6 #sec-%typedarray%.prototype.reverse */ \ |
891 CPP(TypedArrayPrototypeReverse) \ | 893 CPP(TypedArrayPrototypeReverse) \ |
892 \ | 894 \ |
893 /* Wasm */ \ | 895 /* Wasm */ \ |
894 ASM(WasmCompileLazy) \ | 896 ASM(WasmCompileLazy) \ |
895 TFS(WasmStackGuard, WasmRuntimeCall, 1) \ | 897 TFC(WasmStackGuard, WasmRuntimeCall, 1) \ |
896 TFS(ThrowWasmTrapUnreachable, WasmRuntimeCall, 1) \ | 898 TFC(ThrowWasmTrapUnreachable, WasmRuntimeCall, 1) \ |
897 TFS(ThrowWasmTrapMemOutOfBounds, WasmRuntimeCall, 1) \ | 899 TFC(ThrowWasmTrapMemOutOfBounds, WasmRuntimeCall, 1) \ |
898 TFS(ThrowWasmTrapDivByZero, WasmRuntimeCall, 1) \ | 900 TFC(ThrowWasmTrapDivByZero, WasmRuntimeCall, 1) \ |
899 TFS(ThrowWasmTrapDivUnrepresentable, WasmRuntimeCall, 1) \ | 901 TFC(ThrowWasmTrapDivUnrepresentable, WasmRuntimeCall, 1) \ |
900 TFS(ThrowWasmTrapRemByZero, WasmRuntimeCall, 1) \ | 902 TFC(ThrowWasmTrapRemByZero, WasmRuntimeCall, 1) \ |
901 TFS(ThrowWasmTrapFloatUnrepresentable, WasmRuntimeCall, 1) \ | 903 TFC(ThrowWasmTrapFloatUnrepresentable, WasmRuntimeCall, 1) \ |
902 TFS(ThrowWasmTrapFuncInvalid, WasmRuntimeCall, 1) \ | 904 TFC(ThrowWasmTrapFuncInvalid, WasmRuntimeCall, 1) \ |
903 TFS(ThrowWasmTrapFuncSigMismatch, WasmRuntimeCall, 1) \ | 905 TFC(ThrowWasmTrapFuncSigMismatch, WasmRuntimeCall, 1) \ |
904 \ | 906 \ |
905 /* Async-from-Sync Iterator */ \ | 907 /* Async-from-Sync Iterator */ \ |
906 \ | 908 \ |
907 /* %AsyncFromSyncIteratorPrototype% */ \ | 909 /* %AsyncFromSyncIteratorPrototype% */ \ |
908 /* See tc39.github.io/proposal-async-iteration/ */ \ | 910 /* See tc39.github.io/proposal-async-iteration/ */ \ |
909 /* #sec-%asyncfromsynciteratorprototype%-object) */ \ | 911 /* #sec-%asyncfromsynciteratorprototype%-object) */ \ |
910 TFJ(AsyncFromSyncIteratorPrototypeNext, 1, kValue) \ | 912 TFJ(AsyncFromSyncIteratorPrototypeNext, 1, kValue) \ |
911 /* #sec-%asyncfromsynciteratorprototype%.throw */ \ | 913 /* #sec-%asyncfromsynciteratorprototype%.throw */ \ |
912 TFJ(AsyncFromSyncIteratorPrototypeThrow, 1, kReason) \ | 914 TFJ(AsyncFromSyncIteratorPrototypeThrow, 1, kReason) \ |
913 /* #sec-%asyncfromsynciteratorprototype%.return */ \ | 915 /* #sec-%asyncfromsynciteratorprototype%.return */ \ |
914 TFJ(AsyncFromSyncIteratorPrototypeReturn, 1, kValue) \ | 916 TFJ(AsyncFromSyncIteratorPrototypeReturn, 1, kValue) \ |
915 /* #sec-async-iterator-value-unwrap-functions */ \ | 917 /* #sec-async-iterator-value-unwrap-functions */ \ |
916 TFJ(AsyncIteratorValueUnwrap, 1, kValue) | 918 TFJ(AsyncIteratorValueUnwrap, 1, kValue) |
917 | 919 |
918 #ifdef V8_I18N_SUPPORT | 920 #ifdef V8_I18N_SUPPORT |
919 #define BUILTIN_LIST(CPP, API, TFJ, TFS, TFH, ASM, DBG) \ | 921 #define BUILTIN_LIST(CPP, API, TFJ, TFC, TFS, TFH, ASM, DBG) \ |
920 BUILTIN_LIST_BASE(CPP, API, TFJ, TFS, TFH, ASM, DBG) \ | 922 BUILTIN_LIST_BASE(CPP, API, TFJ, TFC, TFS, TFH, ASM, DBG) \ |
921 \ | 923 \ |
922 /* ES #sec-string.prototype.tolowercase */ \ | 924 /* ES #sec-string.prototype.tolowercase */ \ |
923 CPP(StringPrototypeToLowerCaseI18N) \ | 925 CPP(StringPrototypeToLowerCaseI18N) \ |
924 /* ES #sec-string.prototype.touppercase */ \ | 926 /* ES #sec-string.prototype.touppercase */ \ |
925 CPP(StringPrototypeToUpperCaseI18N) | 927 CPP(StringPrototypeToUpperCaseI18N) |
926 #else | 928 #else |
927 #define BUILTIN_LIST(CPP, API, TFJ, TFS, TFH, ASM, DBG) \ | 929 #define BUILTIN_LIST(CPP, API, TFJ, TFC, TFS, TFH, ASM, DBG) \ |
928 BUILTIN_LIST_BASE(CPP, API, TFJ, TFS, TFH, ASM, DBG) | 930 BUILTIN_LIST_BASE(CPP, API, TFJ, TFC, TFS, TFH, ASM, DBG) |
929 #endif // V8_I18N_SUPPORT | 931 #endif // V8_I18N_SUPPORT |
930 | 932 |
931 #define BUILTIN_PROMISE_REJECTION_PREDICTION_LIST(V) \ | 933 #define BUILTIN_PROMISE_REJECTION_PREDICTION_LIST(V) \ |
932 V(AsyncFromSyncIteratorPrototypeNext) \ | 934 V(AsyncFromSyncIteratorPrototypeNext) \ |
933 V(AsyncFromSyncIteratorPrototypeReturn) \ | 935 V(AsyncFromSyncIteratorPrototypeReturn) \ |
934 V(AsyncFromSyncIteratorPrototypeThrow) \ | 936 V(AsyncFromSyncIteratorPrototypeThrow) \ |
935 V(AsyncFunctionAwaitCaught) \ | 937 V(AsyncFunctionAwaitCaught) \ |
936 V(AsyncFunctionAwaitUncaught) \ | 938 V(AsyncFunctionAwaitUncaught) \ |
937 V(PromiseConstructor) \ | 939 V(PromiseConstructor) \ |
938 V(PromiseHandle) \ | 940 V(PromiseHandle) \ |
939 V(PromiseResolve) \ | 941 V(PromiseResolve) \ |
940 V(PromiseResolveClosure) \ | 942 V(PromiseResolveClosure) \ |
941 V(ResolvePromise) | 943 V(ResolvePromise) |
942 | 944 |
943 #define BUILTIN_EXCEPTION_CAUGHT_PREDICTION_LIST(V) V(PromiseHandleReject) | 945 #define BUILTIN_EXCEPTION_CAUGHT_PREDICTION_LIST(V) V(PromiseHandleReject) |
944 | 946 |
945 #define IGNORE_BUILTIN(...) | 947 #define IGNORE_BUILTIN(...) |
946 | 948 |
947 #define BUILTIN_LIST_ALL(V) BUILTIN_LIST(V, V, V, V, V, V, V) | 949 #define BUILTIN_LIST_ALL(V) BUILTIN_LIST(V, V, V, V, V, V, V, V) |
948 | 950 |
949 #define BUILTIN_LIST_C(V) \ | 951 #define BUILTIN_LIST_C(V) \ |
950 BUILTIN_LIST(V, V, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \ | 952 BUILTIN_LIST(V, V, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \ |
951 IGNORE_BUILTIN, IGNORE_BUILTIN) | 953 IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN) |
952 | 954 |
953 #define BUILTIN_LIST_A(V) \ | 955 #define BUILTIN_LIST_A(V) \ |
954 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \ | 956 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \ |
955 IGNORE_BUILTIN, V, V) | 957 IGNORE_BUILTIN, IGNORE_BUILTIN, V, V) |
956 | 958 |
957 #define BUILTIN_LIST_DBG(V) \ | 959 #define BUILTIN_LIST_DBG(V) \ |
958 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \ | 960 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \ |
959 IGNORE_BUILTIN, IGNORE_BUILTIN, V) | 961 IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, V) |
962 | |
963 #define BUILTIN_LIST_TFS(V) \ | |
964 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \ | |
965 V, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN) | |
960 | 966 |
961 #define BUILTINS_WITH_UNTAGGED_PARAMS(V) V(WasmCompileLazy) | 967 #define BUILTINS_WITH_UNTAGGED_PARAMS(V) V(WasmCompileLazy) |
962 | 968 |
963 } // namespace internal | 969 } // namespace internal |
964 } // namespace v8 | 970 } // namespace v8 |
965 | 971 |
966 #endif // V8_BUILTINS_BUILTINS_DEFINITIONS_H_ | 972 #endif // V8_BUILTINS_BUILTINS_DEFINITIONS_H_ |
OLD | NEW |