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_BUILTINS_H_ | 5 #ifndef V8_BUILTINS_BUILTINS_H_ |
6 #define V8_BUILTINS_BUILTINS_H_ | 6 #define V8_BUILTINS_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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 \ | 119 \ |
120 /* Stack and interrupt check */ \ | 120 /* Stack and interrupt check */ \ |
121 ASM(InterruptCheck) \ | 121 ASM(InterruptCheck) \ |
122 ASM(StackCheck) \ | 122 ASM(StackCheck) \ |
123 \ | 123 \ |
124 /* Interpreter */ \ | 124 /* Interpreter */ \ |
125 ASM(InterpreterEntryTrampoline) \ | 125 ASM(InterpreterEntryTrampoline) \ |
126 ASM(InterpreterMarkBaselineOnReturn) \ | 126 ASM(InterpreterMarkBaselineOnReturn) \ |
127 ASM(InterpreterPushArgsAndCall) \ | 127 ASM(InterpreterPushArgsAndCall) \ |
128 ASM(InterpreterPushArgsAndCallFunction) \ | 128 ASM(InterpreterPushArgsAndCallFunction) \ |
129 ASM(InterpreterPushArgsAndConstruct) \ | |
130 ASM(InterpreterPushArgsAndTailCall) \ | 129 ASM(InterpreterPushArgsAndTailCall) \ |
131 ASM(InterpreterPushArgsAndTailCallFunction) \ | 130 ASM(InterpreterPushArgsAndTailCallFunction) \ |
| 131 ASM(InterpreterPushArgsAndConstruct) \ |
| 132 ASM(InterpreterPushArgsAndConstructFunction) \ |
132 ASM(InterpreterEnterBytecodeDispatch) \ | 133 ASM(InterpreterEnterBytecodeDispatch) \ |
133 ASM(InterpreterOnStackReplacement) \ | 134 ASM(InterpreterOnStackReplacement) \ |
134 \ | 135 \ |
135 /* Code life-cycle */ \ | 136 /* Code life-cycle */ \ |
136 ASM(CompileLazy) \ | 137 ASM(CompileLazy) \ |
137 ASM(CompileBaseline) \ | 138 ASM(CompileBaseline) \ |
138 ASM(CompileOptimized) \ | 139 ASM(CompileOptimized) \ |
139 ASM(CompileOptimizedConcurrent) \ | 140 ASM(CompileOptimizedConcurrent) \ |
140 ASM(InOptimizationQueue) \ | 141 ASM(InOptimizationQueue) \ |
141 ASM(InstantiateAsmJs) \ | 142 ASM(InstantiateAsmJs) \ |
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 TailCallMode tail_call_mode = TailCallMode::kDisallow); | 575 TailCallMode tail_call_mode = TailCallMode::kDisallow); |
575 Handle<Code> Call(ConvertReceiverMode = ConvertReceiverMode::kAny, | 576 Handle<Code> Call(ConvertReceiverMode = ConvertReceiverMode::kAny, |
576 TailCallMode tail_call_mode = TailCallMode::kDisallow); | 577 TailCallMode tail_call_mode = TailCallMode::kDisallow); |
577 Handle<Code> CallBoundFunction(TailCallMode tail_call_mode); | 578 Handle<Code> CallBoundFunction(TailCallMode tail_call_mode); |
578 Handle<Code> NonPrimitiveToPrimitive( | 579 Handle<Code> NonPrimitiveToPrimitive( |
579 ToPrimitiveHint hint = ToPrimitiveHint::kDefault); | 580 ToPrimitiveHint hint = ToPrimitiveHint::kDefault); |
580 Handle<Code> OrdinaryToPrimitive(OrdinaryToPrimitiveHint hint); | 581 Handle<Code> OrdinaryToPrimitive(OrdinaryToPrimitiveHint hint); |
581 Handle<Code> InterpreterPushArgsAndCall( | 582 Handle<Code> InterpreterPushArgsAndCall( |
582 TailCallMode tail_call_mode, | 583 TailCallMode tail_call_mode, |
583 CallableType function_type = CallableType::kAny); | 584 CallableType function_type = CallableType::kAny); |
| 585 Handle<Code> InterpreterPushArgsAndConstruct(CallableType function_type); |
584 | 586 |
585 Code* builtin(Name name) { | 587 Code* builtin(Name name) { |
586 // Code::cast cannot be used here since we access builtins | 588 // Code::cast cannot be used here since we access builtins |
587 // during the marking phase of mark sweep. See IC::Clear. | 589 // during the marking phase of mark sweep. See IC::Clear. |
588 return reinterpret_cast<Code*>(builtins_[name]); | 590 return reinterpret_cast<Code*>(builtins_[name]); |
589 } | 591 } |
590 | 592 |
591 Address builtin_address(Name name) { | 593 Address builtin_address(Name name) { |
592 return reinterpret_cast<Address>(&builtins_[name]); | 594 return reinterpret_cast<Address>(&builtins_[name]); |
593 } | 595 } |
(...skipping 24 matching lines...) Expand all Loading... |
618 static void Generate_CallBoundFunctionImpl(MacroAssembler* masm, | 620 static void Generate_CallBoundFunctionImpl(MacroAssembler* masm, |
619 TailCallMode tail_call_mode); | 621 TailCallMode tail_call_mode); |
620 | 622 |
621 static void Generate_Call(MacroAssembler* masm, ConvertReceiverMode mode, | 623 static void Generate_Call(MacroAssembler* masm, ConvertReceiverMode mode, |
622 TailCallMode tail_call_mode); | 624 TailCallMode tail_call_mode); |
623 | 625 |
624 static void Generate_InterpreterPushArgsAndCallImpl( | 626 static void Generate_InterpreterPushArgsAndCallImpl( |
625 MacroAssembler* masm, TailCallMode tail_call_mode, | 627 MacroAssembler* masm, TailCallMode tail_call_mode, |
626 CallableType function_type); | 628 CallableType function_type); |
627 | 629 |
| 630 static void Generate_InterpreterPushArgsAndConstructImpl( |
| 631 MacroAssembler* masm, CallableType function_type); |
| 632 |
628 static void Generate_DatePrototype_GetField(MacroAssembler* masm, | 633 static void Generate_DatePrototype_GetField(MacroAssembler* masm, |
629 int field_index); | 634 int field_index); |
630 | 635 |
631 enum class MathMaxMinKind { kMax, kMin }; | 636 enum class MathMaxMinKind { kMax, kMin }; |
632 static void Generate_MathMaxMin(MacroAssembler* masm, MathMaxMinKind kind); | 637 static void Generate_MathMaxMin(MacroAssembler* masm, MathMaxMinKind kind); |
633 | 638 |
634 #define DECLARE_ASM(Name, ...) \ | 639 #define DECLARE_ASM(Name, ...) \ |
635 static void Generate_##Name(MacroAssembler* masm); | 640 static void Generate_##Name(MacroAssembler* masm); |
636 #define DECLARE_TF(Name, ...) \ | 641 #define DECLARE_TF(Name, ...) \ |
637 static void Generate_##Name(CodeStubAssembler* csasm); | 642 static void Generate_##Name(CodeStubAssembler* csasm); |
(...skipping 12 matching lines...) Expand all Loading... |
650 | 655 |
651 friend class Isolate; | 656 friend class Isolate; |
652 | 657 |
653 DISALLOW_COPY_AND_ASSIGN(Builtins); | 658 DISALLOW_COPY_AND_ASSIGN(Builtins); |
654 }; | 659 }; |
655 | 660 |
656 } // namespace internal | 661 } // namespace internal |
657 } // namespace v8 | 662 } // namespace v8 |
658 | 663 |
659 #endif // V8_BUILTINS_BUILTINS_H_ | 664 #endif // V8_BUILTINS_BUILTINS_H_ |
OLD | NEW |