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