| OLD | NEW |
| 1 | 1 |
| 2 // Copyright 2011 the V8 project authors. All rights reserved. | 2 // Copyright 2011 the V8 project authors. All rights reserved. |
| 3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
| 4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
| 5 | 5 |
| 6 #ifndef V8_BUILTINS_H_ | 6 #ifndef V8_BUILTINS_H_ |
| 7 #define V8_BUILTINS_H_ | 7 #define V8_BUILTINS_H_ |
| 8 | 8 |
| 9 #include "src/base/flags.h" | 9 #include "src/base/flags.h" |
| 10 #include "src/handles.h" | 10 #include "src/handles.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 V(NotExecuted) \ | 32 V(NotExecuted) \ |
| 33 V(ExecutedOnce) \ | 33 V(ExecutedOnce) \ |
| 34 V(NoAge) \ | 34 V(NoAge) \ |
| 35 CODE_AGE_LIST_WITH_ARG(CODE_AGE_LIST_IGNORE_ARG, V) | 35 CODE_AGE_LIST_WITH_ARG(CODE_AGE_LIST_IGNORE_ARG, V) |
| 36 | 36 |
| 37 #define DECLARE_CODE_AGE_BUILTIN(C, V) \ | 37 #define DECLARE_CODE_AGE_BUILTIN(C, V) \ |
| 38 V(Make##C##CodeYoungAgainOddMarking, BUILTIN, kNoExtraICState) \ | 38 V(Make##C##CodeYoungAgainOddMarking, BUILTIN, kNoExtraICState) \ |
| 39 V(Make##C##CodeYoungAgainEvenMarking, BUILTIN, kNoExtraICState) | 39 V(Make##C##CodeYoungAgainEvenMarking, BUILTIN, kNoExtraICState) |
| 40 | 40 |
| 41 // Define list of builtins implemented in C++. | 41 // Define list of builtins implemented in C++. |
| 42 #define BUILTIN_LIST_C(V) \ | 42 #define BUILTIN_LIST_C(V) \ |
| 43 V(Illegal, BUILTIN_EXIT) \ | 43 V(Illegal) \ |
| 44 \ | 44 \ |
| 45 V(EmptyFunction, BUILTIN_EXIT) \ | 45 V(EmptyFunction) \ |
| 46 \ | 46 \ |
| 47 V(ArrayConcat, BUILTIN_EXIT) \ | 47 V(ArrayConcat) \ |
| 48 V(ArrayPop, BUILTIN_EXIT) \ | 48 V(ArrayPop) \ |
| 49 V(ArrayPush, BUILTIN_EXIT) \ | 49 V(ArrayPush) \ |
| 50 V(ArrayShift, BUILTIN_EXIT) \ | 50 V(ArrayShift) \ |
| 51 V(ArraySlice, BUILTIN_EXIT) \ | 51 V(ArraySlice) \ |
| 52 V(ArraySplice, BUILTIN_EXIT) \ | 52 V(ArraySplice) \ |
| 53 V(ArrayUnshift, BUILTIN_EXIT) \ | 53 V(ArrayUnshift) \ |
| 54 \ | 54 \ |
| 55 V(ArrayBufferConstructor, BUILTIN_EXIT) \ | 55 V(ArrayBufferConstructor) \ |
| 56 V(ArrayBufferConstructor_ConstructStub, BUILTIN_EXIT) \ | 56 V(ArrayBufferConstructor_ConstructStub) \ |
| 57 V(ArrayBufferIsView, BUILTIN_EXIT) \ | 57 V(ArrayBufferIsView) \ |
| 58 \ | 58 \ |
| 59 V(BooleanConstructor, BUILTIN_EXIT) \ | 59 V(BooleanConstructor) \ |
| 60 V(BooleanConstructor_ConstructStub, BUILTIN_EXIT) \ | 60 V(BooleanConstructor_ConstructStub) \ |
| 61 V(BooleanPrototypeToString, BUILTIN_EXIT) \ | 61 V(BooleanPrototypeToString) \ |
| 62 V(BooleanPrototypeValueOf, BUILTIN_EXIT) \ | 62 V(BooleanPrototypeValueOf) \ |
| 63 \ | 63 \ |
| 64 V(DataViewConstructor, BUILTIN_EXIT) \ | 64 V(DataViewConstructor) \ |
| 65 V(DataViewConstructor_ConstructStub, BUILTIN_EXIT) \ | 65 V(DataViewConstructor_ConstructStub) \ |
| 66 V(DataViewPrototypeGetBuffer, BUILTIN_EXIT) \ | 66 V(DataViewPrototypeGetBuffer) \ |
| 67 V(DataViewPrototypeGetByteLength, BUILTIN_EXIT) \ | 67 V(DataViewPrototypeGetByteLength) \ |
| 68 V(DataViewPrototypeGetByteOffset, BUILTIN_EXIT) \ | 68 V(DataViewPrototypeGetByteOffset) \ |
| 69 \ | 69 \ |
| 70 V(DateConstructor, BUILTIN_EXIT) \ | 70 V(DateConstructor) \ |
| 71 V(DateConstructor_ConstructStub, BUILTIN_EXIT) \ | 71 V(DateConstructor_ConstructStub) \ |
| 72 V(DateNow, BUILTIN_EXIT) \ | 72 V(DateNow) \ |
| 73 V(DateParse, BUILTIN_EXIT) \ | 73 V(DateParse) \ |
| 74 V(DateUTC, BUILTIN_EXIT) \ | 74 V(DateUTC) \ |
| 75 V(DatePrototypeSetDate, BUILTIN_EXIT) \ | 75 V(DatePrototypeSetDate) \ |
| 76 V(DatePrototypeSetFullYear, BUILTIN_EXIT) \ | 76 V(DatePrototypeSetFullYear) \ |
| 77 V(DatePrototypeSetHours, BUILTIN_EXIT) \ | 77 V(DatePrototypeSetHours) \ |
| 78 V(DatePrototypeSetMilliseconds, BUILTIN_EXIT) \ | 78 V(DatePrototypeSetMilliseconds) \ |
| 79 V(DatePrototypeSetMinutes, BUILTIN_EXIT) \ | 79 V(DatePrototypeSetMinutes) \ |
| 80 V(DatePrototypeSetMonth, BUILTIN_EXIT) \ | 80 V(DatePrototypeSetMonth) \ |
| 81 V(DatePrototypeSetSeconds, BUILTIN_EXIT) \ | 81 V(DatePrototypeSetSeconds) \ |
| 82 V(DatePrototypeSetTime, BUILTIN_EXIT) \ | 82 V(DatePrototypeSetTime) \ |
| 83 V(DatePrototypeSetUTCDate, BUILTIN_EXIT) \ | 83 V(DatePrototypeSetUTCDate) \ |
| 84 V(DatePrototypeSetUTCFullYear, BUILTIN_EXIT) \ | 84 V(DatePrototypeSetUTCFullYear) \ |
| 85 V(DatePrototypeSetUTCHours, BUILTIN_EXIT) \ | 85 V(DatePrototypeSetUTCHours) \ |
| 86 V(DatePrototypeSetUTCMilliseconds, BUILTIN_EXIT) \ | 86 V(DatePrototypeSetUTCMilliseconds) \ |
| 87 V(DatePrototypeSetUTCMinutes, BUILTIN_EXIT) \ | 87 V(DatePrototypeSetUTCMinutes) \ |
| 88 V(DatePrototypeSetUTCMonth, BUILTIN_EXIT) \ | 88 V(DatePrototypeSetUTCMonth) \ |
| 89 V(DatePrototypeSetUTCSeconds, BUILTIN_EXIT) \ | 89 V(DatePrototypeSetUTCSeconds) \ |
| 90 V(DatePrototypeToDateString, BUILTIN_EXIT) \ | 90 V(DatePrototypeToDateString) \ |
| 91 V(DatePrototypeToISOString, BUILTIN_EXIT) \ | 91 V(DatePrototypeToISOString) \ |
| 92 V(DatePrototypeToPrimitive, BUILTIN_EXIT) \ | 92 V(DatePrototypeToPrimitive) \ |
| 93 V(DatePrototypeToUTCString, BUILTIN_EXIT) \ | 93 V(DatePrototypeToUTCString) \ |
| 94 V(DatePrototypeToString, BUILTIN_EXIT) \ | 94 V(DatePrototypeToString) \ |
| 95 V(DatePrototypeToTimeString, BUILTIN_EXIT) \ | 95 V(DatePrototypeToTimeString) \ |
| 96 V(DatePrototypeValueOf, BUILTIN_EXIT) \ | 96 V(DatePrototypeValueOf) \ |
| 97 V(DatePrototypeGetYear, BUILTIN_EXIT) \ | 97 V(DatePrototypeGetYear) \ |
| 98 V(DatePrototypeSetYear, BUILTIN_EXIT) \ | 98 V(DatePrototypeSetYear) \ |
| 99 V(DatePrototypeToJson, BUILTIN_EXIT) \ | 99 V(DatePrototypeToJson) \ |
| 100 \ | 100 \ |
| 101 V(FunctionConstructor, BUILTIN_EXIT) \ | 101 V(FunctionConstructor) \ |
| 102 V(FunctionPrototypeBind, BUILTIN_EXIT) \ | 102 V(FunctionPrototypeBind) \ |
| 103 V(FunctionPrototypeToString, BUILTIN_EXIT) \ | 103 V(FunctionPrototypeToString) \ |
| 104 \ | 104 \ |
| 105 V(GeneratorFunctionConstructor, BUILTIN_EXIT) \ | 105 V(GeneratorFunctionConstructor) \ |
| 106 V(AsyncFunctionConstructor, BUILTIN_EXIT) \ | 106 V(AsyncFunctionConstructor) \ |
| 107 \ | 107 \ |
| 108 V(GlobalDecodeURI, BUILTIN_EXIT) \ | 108 V(GlobalDecodeURI) \ |
| 109 V(GlobalDecodeURIComponent, BUILTIN_EXIT) \ | 109 V(GlobalDecodeURIComponent) \ |
| 110 V(GlobalEncodeURI, BUILTIN_EXIT) \ | 110 V(GlobalEncodeURI) \ |
| 111 V(GlobalEncodeURIComponent, BUILTIN_EXIT) \ | 111 V(GlobalEncodeURIComponent) \ |
| 112 V(GlobalEscape, BUILTIN_EXIT) \ | 112 V(GlobalEscape) \ |
| 113 V(GlobalUnescape, BUILTIN_EXIT) \ | 113 V(GlobalUnescape) \ |
| 114 \ | 114 \ |
| 115 V(GlobalEval, BUILTIN_EXIT) \ | 115 V(GlobalEval) \ |
| 116 \ | 116 \ |
| 117 V(JsonParse, BUILTIN_EXIT) \ | 117 V(JsonParse) \ |
| 118 V(JsonStringify, BUILTIN_EXIT) \ | 118 V(JsonStringify) \ |
| 119 \ | 119 \ |
| 120 V(MathAcos, BUILTIN_EXIT) \ | 120 V(MathAcos) \ |
| 121 V(MathAsin, BUILTIN_EXIT) \ | 121 V(MathAsin) \ |
| 122 V(MathFround, BUILTIN_EXIT) \ | 122 V(MathFround) \ |
| 123 V(MathImul, BUILTIN_EXIT) \ | 123 V(MathImul) \ |
| 124 \ | 124 \ |
| 125 V(ObjectAssign, BUILTIN_EXIT) \ | 125 V(ObjectAssign) \ |
| 126 V(ObjectCreate, BUILTIN_EXIT) \ | 126 V(ObjectCreate) \ |
| 127 V(ObjectDefineGetter, BUILTIN_EXIT) \ | 127 V(ObjectDefineGetter) \ |
| 128 V(ObjectDefineProperties, BUILTIN_EXIT) \ | 128 V(ObjectDefineProperties) \ |
| 129 V(ObjectDefineProperty, BUILTIN_EXIT) \ | 129 V(ObjectDefineProperty) \ |
| 130 V(ObjectDefineSetter, BUILTIN_EXIT) \ | 130 V(ObjectDefineSetter) \ |
| 131 V(ObjectEntries, BUILTIN_EXIT) \ | 131 V(ObjectEntries) \ |
| 132 V(ObjectFreeze, BUILTIN_EXIT) \ | 132 V(ObjectFreeze) \ |
| 133 V(ObjectGetOwnPropertyDescriptor, BUILTIN_EXIT) \ | 133 V(ObjectGetOwnPropertyDescriptor) \ |
| 134 V(ObjectGetOwnPropertyDescriptors, BUILTIN_EXIT) \ | 134 V(ObjectGetOwnPropertyDescriptors) \ |
| 135 V(ObjectGetOwnPropertyNames, BUILTIN_EXIT) \ | 135 V(ObjectGetOwnPropertyNames) \ |
| 136 V(ObjectGetOwnPropertySymbols, BUILTIN_EXIT) \ | 136 V(ObjectGetOwnPropertySymbols) \ |
| 137 V(ObjectGetPrototypeOf, BUILTIN_EXIT) \ | 137 V(ObjectGetPrototypeOf) \ |
| 138 V(ObjectIs, BUILTIN_EXIT) \ | 138 V(ObjectIs) \ |
| 139 V(ObjectIsExtensible, BUILTIN_EXIT) \ | 139 V(ObjectIsExtensible) \ |
| 140 V(ObjectIsFrozen, BUILTIN_EXIT) \ | 140 V(ObjectIsFrozen) \ |
| 141 V(ObjectIsSealed, BUILTIN_EXIT) \ | 141 V(ObjectIsSealed) \ |
| 142 V(ObjectKeys, BUILTIN_EXIT) \ | 142 V(ObjectKeys) \ |
| 143 V(ObjectLookupGetter, BUILTIN_EXIT) \ | 143 V(ObjectLookupGetter) \ |
| 144 V(ObjectLookupSetter, BUILTIN_EXIT) \ | 144 V(ObjectLookupSetter) \ |
| 145 V(ObjectPreventExtensions, BUILTIN_EXIT) \ | 145 V(ObjectPreventExtensions) \ |
| 146 V(ObjectProtoToString, BUILTIN_EXIT) \ | 146 V(ObjectProtoToString) \ |
| 147 V(ObjectSeal, BUILTIN_EXIT) \ | 147 V(ObjectSeal) \ |
| 148 V(ObjectValues, BUILTIN_EXIT) \ | 148 V(ObjectValues) \ |
| 149 \ | 149 \ |
| 150 V(ProxyConstructor, BUILTIN_EXIT) \ | 150 V(ProxyConstructor) \ |
| 151 V(ProxyConstructor_ConstructStub, BUILTIN_EXIT) \ | 151 V(ProxyConstructor_ConstructStub) \ |
| 152 \ | 152 \ |
| 153 V(ReflectDefineProperty, BUILTIN_EXIT) \ | 153 V(ReflectDefineProperty) \ |
| 154 V(ReflectDeleteProperty, BUILTIN_EXIT) \ | 154 V(ReflectDeleteProperty) \ |
| 155 V(ReflectGet, BUILTIN_EXIT) \ | 155 V(ReflectGet) \ |
| 156 V(ReflectGetOwnPropertyDescriptor, BUILTIN_EXIT) \ | 156 V(ReflectGetOwnPropertyDescriptor) \ |
| 157 V(ReflectGetPrototypeOf, BUILTIN_EXIT) \ | 157 V(ReflectGetPrototypeOf) \ |
| 158 V(ReflectHas, BUILTIN_EXIT) \ | 158 V(ReflectHas) \ |
| 159 V(ReflectIsExtensible, BUILTIN_EXIT) \ | 159 V(ReflectIsExtensible) \ |
| 160 V(ReflectOwnKeys, BUILTIN_EXIT) \ | 160 V(ReflectOwnKeys) \ |
| 161 V(ReflectPreventExtensions, BUILTIN_EXIT) \ | 161 V(ReflectPreventExtensions) \ |
| 162 V(ReflectSet, BUILTIN_EXIT) \ | 162 V(ReflectSet) \ |
| 163 V(ReflectSetPrototypeOf, BUILTIN_EXIT) \ | 163 V(ReflectSetPrototypeOf) \ |
| 164 \ | 164 \ |
| 165 V(StringFromCodePoint, BUILTIN_EXIT) \ | 165 V(StringFromCodePoint) \ |
| 166 \ | 166 \ |
| 167 V(StringPrototypeTrim, BUILTIN_EXIT) \ | 167 V(StringPrototypeTrim) \ |
| 168 V(StringPrototypeTrimLeft, BUILTIN_EXIT) \ | 168 V(StringPrototypeTrimLeft) \ |
| 169 V(StringPrototypeTrimRight, BUILTIN_EXIT) \ | 169 V(StringPrototypeTrimRight) \ |
| 170 \ | 170 \ |
| 171 V(SymbolConstructor, BUILTIN_EXIT) \ | 171 V(SymbolConstructor) \ |
| 172 V(SymbolConstructor_ConstructStub, BUILTIN_EXIT) \ | 172 V(SymbolConstructor_ConstructStub) \ |
| 173 \ | 173 \ |
| 174 V(TypedArrayPrototypeBuffer, BUILTIN_EXIT) \ | 174 V(TypedArrayPrototypeBuffer) \ |
| 175 \ | 175 \ |
| 176 V(HandleApiCall, EXIT) \ | 176 V(HandleApiCall) \ |
| 177 V(HandleApiCallAsFunction, EXIT) \ | 177 V(HandleApiCallAsFunction) \ |
| 178 V(HandleApiCallAsConstructor, EXIT) \ | 178 V(HandleApiCallAsConstructor) \ |
| 179 \ | 179 \ |
| 180 V(RestrictedFunctionPropertiesThrower, BUILTIN_EXIT) \ | 180 V(RestrictedFunctionPropertiesThrower) \ |
| 181 V(RestrictedStrictArgumentsPropertiesThrower, BUILTIN_EXIT) | 181 V(RestrictedStrictArgumentsPropertiesThrower) |
| 182 | 182 |
| 183 // Define list of builtins implemented in assembly. | 183 // Define list of builtins implemented in assembly. |
| 184 #define BUILTIN_LIST_A(V) \ | 184 #define BUILTIN_LIST_A(V) \ |
| 185 V(AllocateInNewSpace, BUILTIN, kNoExtraICState) \ | 185 V(AllocateInNewSpace, BUILTIN, kNoExtraICState) \ |
| 186 V(AllocateInOldSpace, BUILTIN, kNoExtraICState) \ | 186 V(AllocateInOldSpace, BUILTIN, kNoExtraICState) \ |
| 187 \ | 187 \ |
| 188 V(ArgumentsAdaptorTrampoline, BUILTIN, kNoExtraICState) \ | 188 V(ArgumentsAdaptorTrampoline, BUILTIN, kNoExtraICState) \ |
| 189 \ | 189 \ |
| 190 V(ConstructedNonConstructable, BUILTIN, kNoExtraICState) \ | 190 V(ConstructedNonConstructable, BUILTIN, kNoExtraICState) \ |
| 191 \ | 191 \ |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 void SetUp(Isolate* isolate, bool create_heap_objects); | 374 void SetUp(Isolate* isolate, bool create_heap_objects); |
| 375 void TearDown(); | 375 void TearDown(); |
| 376 | 376 |
| 377 // Garbage collection support. | 377 // Garbage collection support. |
| 378 void IterateBuiltins(ObjectVisitor* v); | 378 void IterateBuiltins(ObjectVisitor* v); |
| 379 | 379 |
| 380 // Disassembler support. | 380 // Disassembler support. |
| 381 const char* Lookup(byte* pc); | 381 const char* Lookup(byte* pc); |
| 382 | 382 |
| 383 enum Name { | 383 enum Name { |
| 384 #define DEF_ENUM_C(name, ignore) k##name, | 384 #define DEF_ENUM_C(name) k##name, |
| 385 #define DEF_ENUM_A(name, kind, extra) k##name, | 385 #define DEF_ENUM_A(name, kind, extra) k##name, |
| 386 #define DEF_ENUM_T(name, argc) k##name, | 386 #define DEF_ENUM_T(name, argc) k##name, |
| 387 #define DEF_ENUM_S(name, kind, extra, interface_descriptor) k##name, | 387 #define DEF_ENUM_S(name, kind, extra, interface_descriptor) k##name, |
| 388 #define DEF_ENUM_H(name, kind) k##name, | 388 #define DEF_ENUM_H(name, kind) k##name, |
| 389 BUILTIN_LIST_C(DEF_ENUM_C) BUILTIN_LIST_A(DEF_ENUM_A) | 389 BUILTIN_LIST_C(DEF_ENUM_C) BUILTIN_LIST_A(DEF_ENUM_A) |
| 390 BUILTIN_LIST_T(DEF_ENUM_T) BUILTIN_LIST_S(DEF_ENUM_S) | 390 BUILTIN_LIST_T(DEF_ENUM_T) BUILTIN_LIST_S(DEF_ENUM_S) |
| 391 BUILTIN_LIST_H(DEF_ENUM_H) BUILTIN_LIST_DEBUG_A(DEF_ENUM_A) | 391 BUILTIN_LIST_H(DEF_ENUM_H) BUILTIN_LIST_DEBUG_A(DEF_ENUM_A) |
| 392 #undef DEF_ENUM_C | 392 #undef DEF_ENUM_C |
| 393 #undef DEF_ENUM_A | 393 #undef DEF_ENUM_A |
| 394 #undef DEF_ENUM_T | 394 #undef DEF_ENUM_T |
| 395 #undef DEF_ENUM_S | 395 #undef DEF_ENUM_S |
| 396 #undef DEF_ENUM_H | 396 #undef DEF_ENUM_H |
| 397 builtin_count | 397 builtin_count |
| 398 }; | 398 }; |
| 399 | 399 |
| 400 enum CFunctionId { | 400 enum CFunctionId { |
| 401 #define DEF_ENUM_C(name, ignore) c_##name, | 401 #define DEF_ENUM_C(name) c_##name, |
| 402 BUILTIN_LIST_C(DEF_ENUM_C) | 402 BUILTIN_LIST_C(DEF_ENUM_C) |
| 403 #undef DEF_ENUM_C | 403 #undef DEF_ENUM_C |
| 404 cfunction_count | 404 cfunction_count |
| 405 }; | 405 }; |
| 406 | 406 |
| 407 #define DECLARE_BUILTIN_ACCESSOR_C(name, ignore) Handle<Code> name(); | 407 #define DECLARE_BUILTIN_ACCESSOR_C(name) Handle<Code> name(); |
| 408 #define DECLARE_BUILTIN_ACCESSOR_A(name, kind, extra) Handle<Code> name(); | 408 #define DECLARE_BUILTIN_ACCESSOR_A(name, kind, extra) Handle<Code> name(); |
| 409 #define DECLARE_BUILTIN_ACCESSOR_T(name, argc) Handle<Code> name(); | 409 #define DECLARE_BUILTIN_ACCESSOR_T(name, argc) Handle<Code> name(); |
| 410 #define DECLARE_BUILTIN_ACCESSOR_S(name, kind, extra, interface_descriptor) \ | 410 #define DECLARE_BUILTIN_ACCESSOR_S(name, kind, extra, interface_descriptor) \ |
| 411 Handle<Code> name(); | 411 Handle<Code> name(); |
| 412 #define DECLARE_BUILTIN_ACCESSOR_H(name, kind) Handle<Code> name(); | 412 #define DECLARE_BUILTIN_ACCESSOR_H(name, kind) Handle<Code> name(); |
| 413 BUILTIN_LIST_C(DECLARE_BUILTIN_ACCESSOR_C) | 413 BUILTIN_LIST_C(DECLARE_BUILTIN_ACCESSOR_C) |
| 414 BUILTIN_LIST_A(DECLARE_BUILTIN_ACCESSOR_A) | 414 BUILTIN_LIST_A(DECLARE_BUILTIN_ACCESSOR_A) |
| 415 BUILTIN_LIST_T(DECLARE_BUILTIN_ACCESSOR_T) | 415 BUILTIN_LIST_T(DECLARE_BUILTIN_ACCESSOR_T) |
| 416 BUILTIN_LIST_S(DECLARE_BUILTIN_ACCESSOR_S) | 416 BUILTIN_LIST_S(DECLARE_BUILTIN_ACCESSOR_S) |
| 417 BUILTIN_LIST_H(DECLARE_BUILTIN_ACCESSOR_H) | 417 BUILTIN_LIST_H(DECLARE_BUILTIN_ACCESSOR_H) |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 DCHECK(index < builtin_count); | 450 DCHECK(index < builtin_count); |
| 451 return names_[index]; | 451 return names_[index]; |
| 452 } | 452 } |
| 453 | 453 |
| 454 bool is_initialized() const { return initialized_; } | 454 bool is_initialized() const { return initialized_; } |
| 455 | 455 |
| 456 MUST_USE_RESULT static MaybeHandle<Object> InvokeApiFunction( | 456 MUST_USE_RESULT static MaybeHandle<Object> InvokeApiFunction( |
| 457 Isolate* isolate, Handle<HeapObject> function, Handle<Object> receiver, | 457 Isolate* isolate, Handle<HeapObject> function, Handle<Object> receiver, |
| 458 int argc, Handle<Object> args[]); | 458 int argc, Handle<Object> args[]); |
| 459 | 459 |
| 460 enum ExitFrameType { EXIT, BUILTIN_EXIT }; | |
| 461 | |
| 462 private: | 460 private: |
| 463 Builtins(); | 461 Builtins(); |
| 464 | 462 |
| 465 // The external C++ functions called from the code. | 463 // The external C++ functions called from the code. |
| 466 static Address const c_functions_[cfunction_count]; | 464 static Address const c_functions_[cfunction_count]; |
| 467 | 465 |
| 468 // Note: These are always Code objects, but to conform with | 466 // Note: These are always Code objects, but to conform with |
| 469 // IterateBuiltins() above which assumes Object**'s for the callback | 467 // IterateBuiltins() above which assumes Object**'s for the callback |
| 470 // function f, we use an Object* array here. | 468 // function f, we use an Object* array here. |
| 471 Object* builtins_[builtin_count]; | 469 Object* builtins_[builtin_count]; |
| 472 const char* names_[builtin_count]; | 470 const char* names_[builtin_count]; |
| 473 | 471 |
| 474 static void Generate_Adaptor(MacroAssembler* masm, CFunctionId id, | 472 static void Generate_Adaptor(MacroAssembler* masm, CFunctionId id); |
| 475 ExitFrameType exit_frame_type); | |
| 476 static void Generate_AllocateInNewSpace(MacroAssembler* masm); | 473 static void Generate_AllocateInNewSpace(MacroAssembler* masm); |
| 477 static void Generate_AllocateInOldSpace(MacroAssembler* masm); | 474 static void Generate_AllocateInOldSpace(MacroAssembler* masm); |
| 478 static void Generate_ConstructedNonConstructable(MacroAssembler* masm); | 475 static void Generate_ConstructedNonConstructable(MacroAssembler* masm); |
| 479 static void Generate_CompileLazy(MacroAssembler* masm); | 476 static void Generate_CompileLazy(MacroAssembler* masm); |
| 480 static void Generate_CompileBaseline(MacroAssembler* masm); | 477 static void Generate_CompileBaseline(MacroAssembler* masm); |
| 481 static void Generate_InOptimizationQueue(MacroAssembler* masm); | 478 static void Generate_InOptimizationQueue(MacroAssembler* masm); |
| 482 static void Generate_CompileOptimized(MacroAssembler* masm); | 479 static void Generate_CompileOptimized(MacroAssembler* masm); |
| 483 static void Generate_CompileOptimizedConcurrent(MacroAssembler* masm); | 480 static void Generate_CompileOptimizedConcurrent(MacroAssembler* masm); |
| 484 static void Generate_JSConstructStubGeneric(MacroAssembler* masm); | 481 static void Generate_JSConstructStubGeneric(MacroAssembler* masm); |
| 485 static void Generate_JSBuiltinsConstructStub(MacroAssembler* masm); | 482 static void Generate_JSBuiltinsConstructStub(MacroAssembler* masm); |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 760 friend class BuiltinFunctionTable; | 757 friend class BuiltinFunctionTable; |
| 761 friend class Isolate; | 758 friend class Isolate; |
| 762 | 759 |
| 763 DISALLOW_COPY_AND_ASSIGN(Builtins); | 760 DISALLOW_COPY_AND_ASSIGN(Builtins); |
| 764 }; | 761 }; |
| 765 | 762 |
| 766 } // namespace internal | 763 } // namespace internal |
| 767 } // namespace v8 | 764 } // namespace v8 |
| 768 | 765 |
| 769 #endif // V8_BUILTINS_H_ | 766 #endif // V8_BUILTINS_H_ |
| OLD | NEW |