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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 V(OnStackReplacement, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 296 V(OnStackReplacement, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
297 V(InterruptCheck, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 297 V(InterruptCheck, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
298 V(StackCheck, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 298 V(StackCheck, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
299 \ | 299 \ |
300 V(MarkCodeAsToBeExecutedOnce, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 300 V(MarkCodeAsToBeExecutedOnce, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
301 V(MarkCodeAsExecutedOnce, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 301 V(MarkCodeAsExecutedOnce, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
302 V(MarkCodeAsExecutedTwice, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 302 V(MarkCodeAsExecutedTwice, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
303 CODE_AGE_LIST_WITH_ARG(DECLARE_CODE_AGE_BUILTIN, V) | 303 CODE_AGE_LIST_WITH_ARG(DECLARE_CODE_AGE_BUILTIN, V) |
304 | 304 |
305 // Define list of builtins implemented in TurboFan (with JS linkage). | 305 // Define list of builtins implemented in TurboFan (with JS linkage). |
306 #define BUILTIN_LIST_T(V) \ | 306 #define BUILTIN_LIST_T(V) \ |
307 V(GeneratorPrototypeNext, 2) \ | 307 V(GeneratorPrototypeNext, 2) \ |
308 V(GeneratorPrototypeReturn, 2) \ | 308 V(GeneratorPrototypeReturn, 2) \ |
309 V(GeneratorPrototypeThrow, 2) \ | 309 V(GeneratorPrototypeThrow, 2) \ |
310 V(MathCeil, 2) \ | 310 V(MathCeil, 2) \ |
311 V(MathClz32, 2) \ | 311 V(MathClz32, 2) \ |
312 V(MathFloor, 2) \ | 312 V(MathFloor, 2) \ |
313 V(MathRound, 2) \ | 313 V(MathRound, 2) \ |
314 V(MathSqrt, 2) \ | 314 V(MathSqrt, 2) \ |
315 V(MathTrunc, 2) \ | 315 V(MathTrunc, 2) \ |
316 V(ObjectHasOwnProperty, 2) \ | 316 V(ObjectHasOwnProperty, 2) \ |
317 V(StringPrototypeCharAt, 2) \ | 317 V(StringPrototypeCharAt, 2) \ |
318 V(StringPrototypeCharCodeAt, 2) \ | 318 V(StringPrototypeCharCodeAt, 2) |
319 V(AtomicsLoadCheck, 3) | |
320 | 319 |
321 // Define list of builtin handlers implemented in assembly. | 320 // Define list of builtin handlers implemented in assembly. |
322 #define BUILTIN_LIST_H(V) \ | 321 #define BUILTIN_LIST_H(V) \ |
323 V(LoadIC_Slow, LOAD_IC) \ | 322 V(LoadIC_Slow, LOAD_IC) \ |
324 V(KeyedLoadIC_Slow, KEYED_LOAD_IC) \ | 323 V(KeyedLoadIC_Slow, KEYED_LOAD_IC) \ |
325 V(StoreIC_Slow, STORE_IC) \ | 324 V(StoreIC_Slow, STORE_IC) \ |
326 V(KeyedStoreIC_Slow, KEYED_STORE_IC) \ | 325 V(KeyedStoreIC_Slow, KEYED_STORE_IC) \ |
327 V(LoadIC_Normal, LOAD_IC) \ | 326 V(LoadIC_Normal, LOAD_IC) \ |
328 V(StoreIC_Normal, STORE_IC) | 327 V(StoreIC_Normal, STORE_IC) |
329 | 328 |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
667 MacroAssembler* masm); \ | 666 MacroAssembler* masm); \ |
668 static void Generate_Make##C##CodeYoungAgainOddMarking( \ | 667 static void Generate_Make##C##CodeYoungAgainOddMarking( \ |
669 MacroAssembler* masm); | 668 MacroAssembler* masm); |
670 CODE_AGE_LIST(DECLARE_CODE_AGE_BUILTIN_GENERATOR) | 669 CODE_AGE_LIST(DECLARE_CODE_AGE_BUILTIN_GENERATOR) |
671 #undef DECLARE_CODE_AGE_BUILTIN_GENERATOR | 670 #undef DECLARE_CODE_AGE_BUILTIN_GENERATOR |
672 | 671 |
673 static void Generate_MarkCodeAsToBeExecutedOnce(MacroAssembler* masm); | 672 static void Generate_MarkCodeAsToBeExecutedOnce(MacroAssembler* masm); |
674 static void Generate_MarkCodeAsExecutedOnce(MacroAssembler* masm); | 673 static void Generate_MarkCodeAsExecutedOnce(MacroAssembler* masm); |
675 static void Generate_MarkCodeAsExecutedTwice(MacroAssembler* masm); | 674 static void Generate_MarkCodeAsExecutedTwice(MacroAssembler* masm); |
676 | 675 |
677 static void Generate_AtomicsLoadCheck(compiler::CodeStubAssembler* assembler); | |
678 | |
679 static void InitBuiltinFunctionTable(); | 676 static void InitBuiltinFunctionTable(); |
680 | 677 |
681 bool initialized_; | 678 bool initialized_; |
682 | 679 |
683 friend class BuiltinFunctionTable; | 680 friend class BuiltinFunctionTable; |
684 friend class Isolate; | 681 friend class Isolate; |
685 | 682 |
686 DISALLOW_COPY_AND_ASSIGN(Builtins); | 683 DISALLOW_COPY_AND_ASSIGN(Builtins); |
687 }; | 684 }; |
688 | 685 |
689 } // namespace internal | 686 } // namespace internal |
690 } // namespace v8 | 687 } // namespace v8 |
691 | 688 |
692 #endif // V8_BUILTINS_H_ | 689 #endif // V8_BUILTINS_H_ |
OLD | NEW |