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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 V(OnStackReplacement, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 300 V(OnStackReplacement, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
301 V(InterruptCheck, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 301 V(InterruptCheck, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
302 V(StackCheck, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 302 V(StackCheck, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
303 \ | 303 \ |
304 V(MarkCodeAsToBeExecutedOnce, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 304 V(MarkCodeAsToBeExecutedOnce, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
305 V(MarkCodeAsExecutedOnce, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 305 V(MarkCodeAsExecutedOnce, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
306 V(MarkCodeAsExecutedTwice, BUILTIN, UNINITIALIZED, kNoExtraICState) \ | 306 V(MarkCodeAsExecutedTwice, BUILTIN, UNINITIALIZED, kNoExtraICState) \ |
307 CODE_AGE_LIST_WITH_ARG(DECLARE_CODE_AGE_BUILTIN, V) | 307 CODE_AGE_LIST_WITH_ARG(DECLARE_CODE_AGE_BUILTIN, V) |
308 | 308 |
309 // Define list of builtins implemented in TurboFan (with JS linkage). | 309 // Define list of builtins implemented in TurboFan (with JS linkage). |
310 #define BUILTIN_LIST_T(V) V(MathSqrt, 2) | 310 #define BUILTIN_LIST_T(V) \ |
| 311 V(MathFloor, 2) \ |
| 312 V(MathSqrt, 2) |
311 | 313 |
312 // Define list of builtin handlers implemented in assembly. | 314 // Define list of builtin handlers implemented in assembly. |
313 #define BUILTIN_LIST_H(V) \ | 315 #define BUILTIN_LIST_H(V) \ |
314 V(LoadIC_Slow, LOAD_IC) \ | 316 V(LoadIC_Slow, LOAD_IC) \ |
315 V(KeyedLoadIC_Slow, KEYED_LOAD_IC) \ | 317 V(KeyedLoadIC_Slow, KEYED_LOAD_IC) \ |
316 V(StoreIC_Slow, STORE_IC) \ | 318 V(StoreIC_Slow, STORE_IC) \ |
317 V(KeyedStoreIC_Slow, KEYED_STORE_IC) \ | 319 V(KeyedStoreIC_Slow, KEYED_STORE_IC) \ |
318 V(LoadIC_Normal, LOAD_IC) \ | 320 V(LoadIC_Normal, LOAD_IC) \ |
319 V(StoreIC_Normal, STORE_IC) | 321 V(StoreIC_Normal, STORE_IC) |
320 | 322 |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
573 static void Generate_FunctionHasInstance(MacroAssembler* masm); | 575 static void Generate_FunctionHasInstance(MacroAssembler* masm); |
574 static void Generate_FunctionPrototypeApply(MacroAssembler* masm); | 576 static void Generate_FunctionPrototypeApply(MacroAssembler* masm); |
575 static void Generate_FunctionPrototypeCall(MacroAssembler* masm); | 577 static void Generate_FunctionPrototypeCall(MacroAssembler* masm); |
576 | 578 |
577 static void Generate_ReflectApply(MacroAssembler* masm); | 579 static void Generate_ReflectApply(MacroAssembler* masm); |
578 static void Generate_ReflectConstruct(MacroAssembler* masm); | 580 static void Generate_ReflectConstruct(MacroAssembler* masm); |
579 | 581 |
580 static void Generate_InternalArrayCode(MacroAssembler* masm); | 582 static void Generate_InternalArrayCode(MacroAssembler* masm); |
581 static void Generate_ArrayCode(MacroAssembler* masm); | 583 static void Generate_ArrayCode(MacroAssembler* masm); |
582 | 584 |
| 585 // ES6 section 20.2.2.16 Math.floor ( x ) |
| 586 static void Generate_MathFloor(compiler::CodeStubAssembler* assembler); |
583 enum class MathMaxMinKind { kMax, kMin }; | 587 enum class MathMaxMinKind { kMax, kMin }; |
584 static void Generate_MathMaxMin(MacroAssembler* masm, MathMaxMinKind kind); | 588 static void Generate_MathMaxMin(MacroAssembler* masm, MathMaxMinKind kind); |
585 // ES6 section 20.2.2.24 Math.max ( value1, value2 , ...values ) | 589 // ES6 section 20.2.2.24 Math.max ( value1, value2 , ...values ) |
586 static void Generate_MathMax(MacroAssembler* masm) { | 590 static void Generate_MathMax(MacroAssembler* masm) { |
587 Generate_MathMaxMin(masm, MathMaxMinKind::kMax); | 591 Generate_MathMaxMin(masm, MathMaxMinKind::kMax); |
588 } | 592 } |
589 // ES6 section 20.2.2.25 Math.min ( value1, value2 , ...values ) | 593 // ES6 section 20.2.2.25 Math.min ( value1, value2 , ...values ) |
590 static void Generate_MathMin(MacroAssembler* masm) { | 594 static void Generate_MathMin(MacroAssembler* masm) { |
591 Generate_MathMaxMin(masm, MathMaxMinKind::kMin); | 595 Generate_MathMaxMin(masm, MathMaxMinKind::kMin); |
592 } | 596 } |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
640 friend class BuiltinFunctionTable; | 644 friend class BuiltinFunctionTable; |
641 friend class Isolate; | 645 friend class Isolate; |
642 | 646 |
643 DISALLOW_COPY_AND_ASSIGN(Builtins); | 647 DISALLOW_COPY_AND_ASSIGN(Builtins); |
644 }; | 648 }; |
645 | 649 |
646 } // namespace internal | 650 } // namespace internal |
647 } // namespace v8 | 651 } // namespace v8 |
648 | 652 |
649 #endif // V8_BUILTINS_H_ | 653 #endif // V8_BUILTINS_H_ |
OLD | NEW |