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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 V(StackCheck, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 301 V(StackCheck, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
302 \ | 302 \ |
303 V(MarkCodeAsToBeExecutedOnce, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 303 V(MarkCodeAsToBeExecutedOnce, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
304 V(MarkCodeAsExecutedOnce, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 304 V(MarkCodeAsExecutedOnce, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
305 V(MarkCodeAsExecutedTwice, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 305 V(MarkCodeAsExecutedTwice, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
306 CODE_AGE_LIST_WITH_ARG(DECLARE_CODE_AGE_BUILTIN, V) | 306 CODE_AGE_LIST_WITH_ARG(DECLARE_CODE_AGE_BUILTIN, V) |
307 | 307 |
308 // Define list of builtins implemented in TurboFan (with JS linkage). | 308 // Define list of builtins implemented in TurboFan (with JS linkage). |
309 #define BUILTIN_LIST_T(V) \ | 309 #define BUILTIN_LIST_T(V) \ |
310 V(MathCeil, 2) \ | 310 V(MathCeil, 2) \ |
| 311 V(MathClz32, 2) \ |
311 V(MathFloor, 2) \ | 312 V(MathFloor, 2) \ |
312 V(MathRound, 2) \ | 313 V(MathRound, 2) \ |
313 V(MathSqrt, 2) \ | 314 V(MathSqrt, 2) \ |
314 V(MathTrunc, 2) \ | 315 V(MathTrunc, 2) \ |
315 V(ObjectHasOwnProperty, 2) | 316 V(ObjectHasOwnProperty, 2) |
316 | 317 |
317 // Define list of builtin handlers implemented in assembly. | 318 // Define list of builtin handlers implemented in assembly. |
318 #define BUILTIN_LIST_H(V) \ | 319 #define BUILTIN_LIST_H(V) \ |
319 V(LoadIC_Slow, LOAD_IC) \ | 320 V(LoadIC_Slow, LOAD_IC) \ |
320 V(KeyedLoadIC_Slow, KEYED_LOAD_IC) \ | 321 V(KeyedLoadIC_Slow, KEYED_LOAD_IC) \ |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
578 static void Generate_FunctionHasInstance(MacroAssembler* masm); | 579 static void Generate_FunctionHasInstance(MacroAssembler* masm); |
579 static void Generate_FunctionPrototypeApply(MacroAssembler* masm); | 580 static void Generate_FunctionPrototypeApply(MacroAssembler* masm); |
580 static void Generate_FunctionPrototypeCall(MacroAssembler* masm); | 581 static void Generate_FunctionPrototypeCall(MacroAssembler* masm); |
581 | 582 |
582 static void Generate_ReflectApply(MacroAssembler* masm); | 583 static void Generate_ReflectApply(MacroAssembler* masm); |
583 static void Generate_ReflectConstruct(MacroAssembler* masm); | 584 static void Generate_ReflectConstruct(MacroAssembler* masm); |
584 | 585 |
585 static void Generate_InternalArrayCode(MacroAssembler* masm); | 586 static void Generate_InternalArrayCode(MacroAssembler* masm); |
586 static void Generate_ArrayCode(MacroAssembler* masm); | 587 static void Generate_ArrayCode(MacroAssembler* masm); |
587 | 588 |
588 // ES6 section 20.2.2.10 Math.floor ( x ) | 589 // ES6 section 20.2.2.10 Math.ceil ( x ) |
589 static void Generate_MathCeil(compiler::CodeStubAssembler* assembler); | 590 static void Generate_MathCeil(compiler::CodeStubAssembler* assembler); |
| 591 // ES6 section 20.2.2.11 Math.clz32 ( x ) |
| 592 static void Generate_MathClz32(compiler::CodeStubAssembler* assembler); |
590 // ES6 section 20.2.2.16 Math.floor ( x ) | 593 // ES6 section 20.2.2.16 Math.floor ( x ) |
591 static void Generate_MathFloor(compiler::CodeStubAssembler* assembler); | 594 static void Generate_MathFloor(compiler::CodeStubAssembler* assembler); |
592 enum class MathMaxMinKind { kMax, kMin }; | 595 enum class MathMaxMinKind { kMax, kMin }; |
593 static void Generate_MathMaxMin(MacroAssembler* masm, MathMaxMinKind kind); | 596 static void Generate_MathMaxMin(MacroAssembler* masm, MathMaxMinKind kind); |
594 // ES6 section 20.2.2.24 Math.max ( value1, value2 , ...values ) | 597 // ES6 section 20.2.2.24 Math.max ( value1, value2 , ...values ) |
595 static void Generate_MathMax(MacroAssembler* masm) { | 598 static void Generate_MathMax(MacroAssembler* masm) { |
596 Generate_MathMaxMin(masm, MathMaxMinKind::kMax); | 599 Generate_MathMaxMin(masm, MathMaxMinKind::kMax); |
597 } | 600 } |
598 // ES6 section 20.2.2.25 Math.min ( value1, value2 , ...values ) | 601 // ES6 section 20.2.2.25 Math.min ( value1, value2 , ...values ) |
599 static void Generate_MathMin(MacroAssembler* masm) { | 602 static void Generate_MathMin(MacroAssembler* masm) { |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
657 friend class BuiltinFunctionTable; | 660 friend class BuiltinFunctionTable; |
658 friend class Isolate; | 661 friend class Isolate; |
659 | 662 |
660 DISALLOW_COPY_AND_ASSIGN(Builtins); | 663 DISALLOW_COPY_AND_ASSIGN(Builtins); |
661 }; | 664 }; |
662 | 665 |
663 } // namespace internal | 666 } // namespace internal |
664 } // namespace v8 | 667 } // namespace v8 |
665 | 668 |
666 #endif // V8_BUILTINS_H_ | 669 #endif // V8_BUILTINS_H_ |
OLD | NEW |