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