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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(InterpreterPushArgsAndCallFunction) \ | 127 ASM(InterpreterPushArgsAndCallFunction) \ |
128 ASM(InterpreterPushArgsAndTailCallFunction) \ | 128 ASM(InterpreterPushArgsAndTailCallFunction) \ |
129 ASM(InterpreterPushArgsAndCall) \ | 129 ASM(InterpreterPushArgsAndCall) \ |
130 ASM(InterpreterPushArgsAndTailCall) \ | 130 ASM(InterpreterPushArgsAndTailCall) \ |
131 ASM(InterpreterPushArgsAndConstruct) \ | 131 ASM(InterpreterPushArgsAndConstruct) \ |
132 ASM(InterpreterPushArgsAndConstructFunction) \ | |
133 ASM(InterpreterEnterBytecodeDispatch) \ | 132 ASM(InterpreterEnterBytecodeDispatch) \ |
134 \ | 133 \ |
135 /* Code life-cycle */ \ | 134 /* Code life-cycle */ \ |
136 ASM(CompileLazy) \ | 135 ASM(CompileLazy) \ |
137 ASM(CompileBaseline) \ | 136 ASM(CompileBaseline) \ |
138 ASM(CompileOptimized) \ | 137 ASM(CompileOptimized) \ |
139 ASM(CompileOptimizedConcurrent) \ | 138 ASM(CompileOptimizedConcurrent) \ |
140 ASM(InOptimizationQueue) \ | 139 ASM(InOptimizationQueue) \ |
141 ASM(InstantiateAsmJs) \ | 140 ASM(InstantiateAsmJs) \ |
142 ASM(MarkCodeAsToBeExecutedOnce) \ | 141 ASM(MarkCodeAsToBeExecutedOnce) \ |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 TailCallMode tail_call_mode = TailCallMode::kDisallow); | 545 TailCallMode tail_call_mode = TailCallMode::kDisallow); |
547 Handle<Code> Call(ConvertReceiverMode = ConvertReceiverMode::kAny, | 546 Handle<Code> Call(ConvertReceiverMode = ConvertReceiverMode::kAny, |
548 TailCallMode tail_call_mode = TailCallMode::kDisallow); | 547 TailCallMode tail_call_mode = TailCallMode::kDisallow); |
549 Handle<Code> CallBoundFunction(TailCallMode tail_call_mode); | 548 Handle<Code> CallBoundFunction(TailCallMode tail_call_mode); |
550 Handle<Code> NonPrimitiveToPrimitive( | 549 Handle<Code> NonPrimitiveToPrimitive( |
551 ToPrimitiveHint hint = ToPrimitiveHint::kDefault); | 550 ToPrimitiveHint hint = ToPrimitiveHint::kDefault); |
552 Handle<Code> OrdinaryToPrimitive(OrdinaryToPrimitiveHint hint); | 551 Handle<Code> OrdinaryToPrimitive(OrdinaryToPrimitiveHint hint); |
553 Handle<Code> InterpreterPushArgsAndCall( | 552 Handle<Code> InterpreterPushArgsAndCall( |
554 TailCallMode tail_call_mode, | 553 TailCallMode tail_call_mode, |
555 CallableType function_type = CallableType::kAny); | 554 CallableType function_type = CallableType::kAny); |
556 Handle<Code> InterpreterPushArgsAndConstruct(CallableType function_type); | |
557 | 555 |
558 Code* builtin(Name name) { | 556 Code* builtin(Name name) { |
559 // Code::cast cannot be used here since we access builtins | 557 // Code::cast cannot be used here since we access builtins |
560 // during the marking phase of mark sweep. See IC::Clear. | 558 // during the marking phase of mark sweep. See IC::Clear. |
561 return reinterpret_cast<Code*>(builtins_[name]); | 559 return reinterpret_cast<Code*>(builtins_[name]); |
562 } | 560 } |
563 | 561 |
564 Address builtin_address(Name name) { | 562 Address builtin_address(Name name) { |
565 return reinterpret_cast<Address>(&builtins_[name]); | 563 return reinterpret_cast<Address>(&builtins_[name]); |
566 } | 564 } |
(...skipping 21 matching lines...) Expand all Loading... |
588 static void Generate_CallBoundFunctionImpl(MacroAssembler* masm, | 586 static void Generate_CallBoundFunctionImpl(MacroAssembler* masm, |
589 TailCallMode tail_call_mode); | 587 TailCallMode tail_call_mode); |
590 | 588 |
591 static void Generate_Call(MacroAssembler* masm, ConvertReceiverMode mode, | 589 static void Generate_Call(MacroAssembler* masm, ConvertReceiverMode mode, |
592 TailCallMode tail_call_mode); | 590 TailCallMode tail_call_mode); |
593 | 591 |
594 static void Generate_InterpreterPushArgsAndCallImpl( | 592 static void Generate_InterpreterPushArgsAndCallImpl( |
595 MacroAssembler* masm, TailCallMode tail_call_mode, | 593 MacroAssembler* masm, TailCallMode tail_call_mode, |
596 CallableType function_type); | 594 CallableType function_type); |
597 | 595 |
598 static void Generate_InterpreterPushArgsAndConstructImpl( | |
599 MacroAssembler* masm, CallableType function_type); | |
600 | |
601 static void Generate_DatePrototype_GetField(MacroAssembler* masm, | 596 static void Generate_DatePrototype_GetField(MacroAssembler* masm, |
602 int field_index); | 597 int field_index); |
603 | 598 |
604 enum class MathMaxMinKind { kMax, kMin }; | 599 enum class MathMaxMinKind { kMax, kMin }; |
605 static void Generate_MathMaxMin(MacroAssembler* masm, MathMaxMinKind kind); | 600 static void Generate_MathMaxMin(MacroAssembler* masm, MathMaxMinKind kind); |
606 | 601 |
607 #define DECLARE_ASM(Name, ...) \ | 602 #define DECLARE_ASM(Name, ...) \ |
608 static void Generate_##Name(MacroAssembler* masm); | 603 static void Generate_##Name(MacroAssembler* masm); |
609 #define DECLARE_TF(Name, ...) \ | 604 #define DECLARE_TF(Name, ...) \ |
610 static void Generate_##Name(CodeStubAssembler* csasm); | 605 static void Generate_##Name(CodeStubAssembler* csasm); |
(...skipping 12 matching lines...) Expand all Loading... |
623 | 618 |
624 friend class Isolate; | 619 friend class Isolate; |
625 | 620 |
626 DISALLOW_COPY_AND_ASSIGN(Builtins); | 621 DISALLOW_COPY_AND_ASSIGN(Builtins); |
627 }; | 622 }; |
628 | 623 |
629 } // namespace internal | 624 } // namespace internal |
630 } // namespace v8 | 625 } // namespace v8 |
631 | 626 |
632 #endif // V8_BUILTINS_BUILTINS_H_ | 627 #endif // V8_BUILTINS_BUILTINS_H_ |
OLD | NEW |