| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 V(ArrayBufferConstructor_ConstructStub, kTargetAndNewTarget) \ | 71 V(ArrayBufferConstructor_ConstructStub, kTargetAndNewTarget) \ |
| 72 V(ArrayBufferIsView, kNone) \ | 72 V(ArrayBufferIsView, kNone) \ |
| 73 \ | 73 \ |
| 74 V(BooleanConstructor, kNone) \ | 74 V(BooleanConstructor, kNone) \ |
| 75 V(BooleanConstructor_ConstructStub, kTargetAndNewTarget) \ | 75 V(BooleanConstructor_ConstructStub, kTargetAndNewTarget) \ |
| 76 V(BooleanPrototypeToString, kNone) \ | 76 V(BooleanPrototypeToString, kNone) \ |
| 77 V(BooleanPrototypeValueOf, kNone) \ | 77 V(BooleanPrototypeValueOf, kNone) \ |
| 78 \ | 78 \ |
| 79 V(DataViewConstructor, kNone) \ | 79 V(DataViewConstructor, kNone) \ |
| 80 V(DataViewConstructor_ConstructStub, kTargetAndNewTarget) \ | 80 V(DataViewConstructor_ConstructStub, kTargetAndNewTarget) \ |
| 81 V(DataViewPrototypeGetBuffer, kNone) \ | |
| 82 V(DataViewPrototypeGetByteLength, kNone) \ | |
| 83 V(DataViewPrototypeGetByteOffset, kNone) \ | |
| 84 \ | 81 \ |
| 85 V(DateConstructor, kNone) \ | 82 V(DateConstructor, kNone) \ |
| 86 V(DateConstructor_ConstructStub, kTargetAndNewTarget) \ | 83 V(DateConstructor_ConstructStub, kTargetAndNewTarget) \ |
| 87 V(DateNow, kNone) \ | 84 V(DateNow, kNone) \ |
| 88 V(DateParse, kNone) \ | 85 V(DateParse, kNone) \ |
| 89 V(DateUTC, kNone) \ | 86 V(DateUTC, kNone) \ |
| 90 V(DatePrototypeSetDate, kNone) \ | 87 V(DatePrototypeSetDate, kNone) \ |
| 91 V(DatePrototypeSetFullYear, kNone) \ | 88 V(DatePrototypeSetFullYear, kNone) \ |
| 92 V(DatePrototypeSetHours, kNone) \ | 89 V(DatePrototypeSetHours, kNone) \ |
| 93 V(DatePrototypeSetMilliseconds, kNone) \ | 90 V(DatePrototypeSetMilliseconds, kNone) \ |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 V(ReflectSet, kNone) \ | 175 V(ReflectSet, kNone) \ |
| 179 V(ReflectSetPrototypeOf, kNone) \ | 176 V(ReflectSetPrototypeOf, kNone) \ |
| 180 \ | 177 \ |
| 181 V(StringPrototypeTrim, kNone) \ | 178 V(StringPrototypeTrim, kNone) \ |
| 182 V(StringPrototypeTrimLeft, kNone) \ | 179 V(StringPrototypeTrimLeft, kNone) \ |
| 183 V(StringPrototypeTrimRight, kNone) \ | 180 V(StringPrototypeTrimRight, kNone) \ |
| 184 \ | 181 \ |
| 185 V(SymbolConstructor, kNone) \ | 182 V(SymbolConstructor, kNone) \ |
| 186 V(SymbolConstructor_ConstructStub, kTarget) \ | 183 V(SymbolConstructor_ConstructStub, kTarget) \ |
| 187 \ | 184 \ |
| 188 V(TypedArrayPrototypeBuffer, kNone) \ | |
| 189 \ | |
| 190 V(HandleApiCall, kTargetAndNewTarget) \ | 185 V(HandleApiCall, kTargetAndNewTarget) \ |
| 191 V(HandleApiCallAsFunction, kNone) \ | 186 V(HandleApiCallAsFunction, kNone) \ |
| 192 V(HandleApiCallAsConstructor, kNone) \ | 187 V(HandleApiCallAsConstructor, kNone) \ |
| 193 \ | 188 \ |
| 194 V(RestrictedFunctionPropertiesThrower, kNone) \ | 189 V(RestrictedFunctionPropertiesThrower, kNone) \ |
| 195 V(RestrictedStrictArgumentsPropertiesThrower, kNone) | 190 V(RestrictedStrictArgumentsPropertiesThrower, kNone) |
| 196 | 191 |
| 197 // Define list of builtins implemented in assembly. | 192 // Define list of builtins implemented in assembly. |
| 198 #define BUILTIN_LIST_A(V) \ | 193 #define BUILTIN_LIST_A(V) \ |
| 199 V(AllocateInNewSpace, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 194 V(AllocateInNewSpace, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 V(OnStackReplacement, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 313 V(OnStackReplacement, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 319 V(InterruptCheck, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 314 V(InterruptCheck, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 320 V(StackCheck, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 315 V(StackCheck, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 321 \ | 316 \ |
| 322 V(MarkCodeAsToBeExecutedOnce, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 317 V(MarkCodeAsToBeExecutedOnce, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 323 V(MarkCodeAsExecutedOnce, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 318 V(MarkCodeAsExecutedOnce, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 324 V(MarkCodeAsExecutedTwice, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 319 V(MarkCodeAsExecutedTwice, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
| 325 CODE_AGE_LIST_WITH_ARG(DECLARE_CODE_AGE_BUILTIN, V) | 320 CODE_AGE_LIST_WITH_ARG(DECLARE_CODE_AGE_BUILTIN, V) |
| 326 | 321 |
| 327 // Define list of builtins implemented in TurboFan (with JS linkage). | 322 // Define list of builtins implemented in TurboFan (with JS linkage). |
| 328 #define BUILTIN_LIST_T(V) \ | 323 #define BUILTIN_LIST_T(V) \ |
| 329 V(FunctionPrototypeHasInstance, 2) \ | 324 V(FunctionPrototypeHasInstance, 2) \ |
| 330 V(GeneratorPrototypeNext, 2) \ | 325 V(GeneratorPrototypeNext, 2) \ |
| 331 V(GeneratorPrototypeReturn, 2) \ | 326 V(GeneratorPrototypeReturn, 2) \ |
| 332 V(GeneratorPrototypeThrow, 2) \ | 327 V(GeneratorPrototypeThrow, 2) \ |
| 333 V(MathCeil, 2) \ | 328 V(MathCeil, 2) \ |
| 334 V(MathClz32, 2) \ | 329 V(MathClz32, 2) \ |
| 335 V(MathFloor, 2) \ | 330 V(MathFloor, 2) \ |
| 336 V(MathLog, 2) \ | 331 V(MathLog, 2) \ |
| 337 V(MathRound, 2) \ | 332 V(MathRound, 2) \ |
| 338 V(MathSqrt, 2) \ | 333 V(MathSqrt, 2) \ |
| 339 V(MathTrunc, 2) \ | 334 V(MathTrunc, 2) \ |
| 340 V(ObjectHasOwnProperty, 2) \ | 335 V(ObjectHasOwnProperty, 2) \ |
| 341 V(ArrayIsArray, 2) \ | 336 V(ArrayIsArray, 2) \ |
| 342 V(StringFromCharCode, 2) \ | 337 V(StringFromCharCode, 2) \ |
| 343 V(StringPrototypeCharAt, 2) \ | 338 V(StringPrototypeCharAt, 2) \ |
| 344 V(StringPrototypeCharCodeAt, 2) \ | 339 V(StringPrototypeCharCodeAt, 2) \ |
| 345 V(TypedArrayPrototypeByteLength, 1) \ | 340 V(AtomicsLoad, 3) \ |
| 346 V(TypedArrayPrototypeByteOffset, 1) \ | |
| 347 V(TypedArrayPrototypeLength, 1) \ | |
| 348 V(AtomicsLoad, 3) \ | |
| 349 V(AtomicsStore, 4) | 341 V(AtomicsStore, 4) |
| 350 | 342 |
| 351 // Define list of builtin handlers implemented in assembly. | 343 // Define list of builtin handlers implemented in assembly. |
| 352 #define BUILTIN_LIST_H(V) \ | 344 #define BUILTIN_LIST_H(V) \ |
| 353 V(LoadIC_Slow, LOAD_IC) \ | 345 V(LoadIC_Slow, LOAD_IC) \ |
| 354 V(KeyedLoadIC_Slow, KEYED_LOAD_IC) \ | 346 V(KeyedLoadIC_Slow, KEYED_LOAD_IC) \ |
| 355 V(StoreIC_Slow, STORE_IC) \ | 347 V(StoreIC_Slow, STORE_IC) \ |
| 356 V(KeyedStoreIC_Slow, KEYED_STORE_IC) \ | 348 V(KeyedStoreIC_Slow, KEYED_STORE_IC) \ |
| 357 V(LoadIC_Normal, LOAD_IC) \ | 349 V(LoadIC_Normal, LOAD_IC) \ |
| 358 V(StoreIC_Normal, STORE_IC) | 350 V(StoreIC_Normal, STORE_IC) |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 | 663 |
| 672 // ES6 section 21.1.2.1 String.fromCharCode ( ...codeUnits ) | 664 // ES6 section 21.1.2.1 String.fromCharCode ( ...codeUnits ) |
| 673 static void Generate_StringFromCharCode(CodeStubAssembler* assembler); | 665 static void Generate_StringFromCharCode(CodeStubAssembler* assembler); |
| 674 // ES6 section 21.1.3.1 String.prototype.charAt ( pos ) | 666 // ES6 section 21.1.3.1 String.prototype.charAt ( pos ) |
| 675 static void Generate_StringPrototypeCharAt(CodeStubAssembler* assembler); | 667 static void Generate_StringPrototypeCharAt(CodeStubAssembler* assembler); |
| 676 // ES6 section 21.1.3.2 String.prototype.charCodeAt ( pos ) | 668 // ES6 section 21.1.3.2 String.prototype.charCodeAt ( pos ) |
| 677 static void Generate_StringPrototypeCharCodeAt(CodeStubAssembler* assembler); | 669 static void Generate_StringPrototypeCharCodeAt(CodeStubAssembler* assembler); |
| 678 | 670 |
| 679 static void Generate_StringConstructor(MacroAssembler* masm); | 671 static void Generate_StringConstructor(MacroAssembler* masm); |
| 680 static void Generate_StringConstructor_ConstructStub(MacroAssembler* masm); | 672 static void Generate_StringConstructor_ConstructStub(MacroAssembler* masm); |
| 681 | |
| 682 // ES6 section 22.2.3.2 get %TypedArray%.prototype.byteLength | |
| 683 static void Generate_TypedArrayPrototypeByteLength( | |
| 684 CodeStubAssembler* assembler); | |
| 685 // ES6 section 22.2.3.3 get %TypedArray%.prototype.byteOffset | |
| 686 static void Generate_TypedArrayPrototypeByteOffset( | |
| 687 CodeStubAssembler* assembler); | |
| 688 // ES6 section 22.2.3.18 get %TypedArray%.prototype.length | |
| 689 static void Generate_TypedArrayPrototypeLength(CodeStubAssembler* assembler); | |
| 690 | |
| 691 static void Generate_OnStackReplacement(MacroAssembler* masm); | 673 static void Generate_OnStackReplacement(MacroAssembler* masm); |
| 692 static void Generate_InterruptCheck(MacroAssembler* masm); | 674 static void Generate_InterruptCheck(MacroAssembler* masm); |
| 693 static void Generate_StackCheck(MacroAssembler* masm); | 675 static void Generate_StackCheck(MacroAssembler* masm); |
| 694 | 676 |
| 695 static void Generate_InterpreterEntryTrampoline(MacroAssembler* masm); | 677 static void Generate_InterpreterEntryTrampoline(MacroAssembler* masm); |
| 696 static void Generate_InterpreterEnterBytecodeDispatch(MacroAssembler* masm); | 678 static void Generate_InterpreterEnterBytecodeDispatch(MacroAssembler* masm); |
| 697 static void Generate_InterpreterMarkBaselineOnReturn(MacroAssembler* masm); | 679 static void Generate_InterpreterMarkBaselineOnReturn(MacroAssembler* masm); |
| 698 static void Generate_InterpreterPushArgsAndCall(MacroAssembler* masm) { | 680 static void Generate_InterpreterPushArgsAndCall(MacroAssembler* masm) { |
| 699 return Generate_InterpreterPushArgsAndCallImpl(masm, | 681 return Generate_InterpreterPushArgsAndCallImpl(masm, |
| 700 TailCallMode::kDisallow); | 682 TailCallMode::kDisallow); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 728 friend class BuiltinFunctionTable; | 710 friend class BuiltinFunctionTable; |
| 729 friend class Isolate; | 711 friend class Isolate; |
| 730 | 712 |
| 731 DISALLOW_COPY_AND_ASSIGN(Builtins); | 713 DISALLOW_COPY_AND_ASSIGN(Builtins); |
| 732 }; | 714 }; |
| 733 | 715 |
| 734 } // namespace internal | 716 } // namespace internal |
| 735 } // namespace v8 | 717 } // namespace v8 |
| 736 | 718 |
| 737 #endif // V8_BUILTINS_H_ | 719 #endif // V8_BUILTINS_H_ |
| OLD | NEW |