Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Side by Side Diff: src/builtins/builtins.h

Issue 2153433002: [Interpreter] Collect type feedback for 'new' in the bytecode handler (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 ASM(InterruptCheck) \ 108 ASM(InterruptCheck) \
109 ASM(StackCheck) \ 109 ASM(StackCheck) \
110 /* Interpreter */ \ 110 /* Interpreter */ \
111 ASM(InterpreterEntryTrampoline) \ 111 ASM(InterpreterEntryTrampoline) \
112 ASM(InterpreterMarkBaselineOnReturn) \ 112 ASM(InterpreterMarkBaselineOnReturn) \
113 ASM(InterpreterPushArgsAndCallFunction) \ 113 ASM(InterpreterPushArgsAndCallFunction) \
114 ASM(InterpreterPushArgsAndTailCallFunction) \ 114 ASM(InterpreterPushArgsAndTailCallFunction) \
115 ASM(InterpreterPushArgsAndCall) \ 115 ASM(InterpreterPushArgsAndCall) \
116 ASM(InterpreterPushArgsAndTailCall) \ 116 ASM(InterpreterPushArgsAndTailCall) \
117 ASM(InterpreterPushArgsAndConstruct) \ 117 ASM(InterpreterPushArgsAndConstruct) \
118 ASM(InterpreterPushArgsAndConstructFunction) \
118 ASM(InterpreterEnterBytecodeDispatch) \ 119 ASM(InterpreterEnterBytecodeDispatch) \
119 /* Code life-cycle */ \ 120 /* Code life-cycle */ \
120 ASM(CompileLazy) \ 121 ASM(CompileLazy) \
121 ASM(CompileBaseline) \ 122 ASM(CompileBaseline) \
122 ASM(CompileOptimized) \ 123 ASM(CompileOptimized) \
123 ASM(CompileOptimizedConcurrent) \ 124 ASM(CompileOptimizedConcurrent) \
124 ASM(InOptimizationQueue) \ 125 ASM(InOptimizationQueue) \
125 ASM(InstantiateAsmJs) \ 126 ASM(InstantiateAsmJs) \
126 ASM(MarkCodeAsToBeExecutedOnce) \ 127 ASM(MarkCodeAsToBeExecutedOnce) \
127 ASM(MarkCodeAsExecutedOnce) \ 128 ASM(MarkCodeAsExecutedOnce) \
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 TailCallMode tail_call_mode = TailCallMode::kDisallow); 445 TailCallMode tail_call_mode = TailCallMode::kDisallow);
445 Handle<Code> Call(ConvertReceiverMode = ConvertReceiverMode::kAny, 446 Handle<Code> Call(ConvertReceiverMode = ConvertReceiverMode::kAny,
446 TailCallMode tail_call_mode = TailCallMode::kDisallow); 447 TailCallMode tail_call_mode = TailCallMode::kDisallow);
447 Handle<Code> CallBoundFunction(TailCallMode tail_call_mode); 448 Handle<Code> CallBoundFunction(TailCallMode tail_call_mode);
448 Handle<Code> NonPrimitiveToPrimitive( 449 Handle<Code> NonPrimitiveToPrimitive(
449 ToPrimitiveHint hint = ToPrimitiveHint::kDefault); 450 ToPrimitiveHint hint = ToPrimitiveHint::kDefault);
450 Handle<Code> OrdinaryToPrimitive(OrdinaryToPrimitiveHint hint); 451 Handle<Code> OrdinaryToPrimitive(OrdinaryToPrimitiveHint hint);
451 Handle<Code> InterpreterPushArgsAndCall( 452 Handle<Code> InterpreterPushArgsAndCall(
452 TailCallMode tail_call_mode, 453 TailCallMode tail_call_mode,
453 CallableType function_type = CallableType::kAny); 454 CallableType function_type = CallableType::kAny);
455 Handle<Code> InterpreterPushArgsAndConstruct(CallableType function_type);
454 456
455 Code* builtin(Name name) { 457 Code* builtin(Name name) {
456 // Code::cast cannot be used here since we access builtins 458 // Code::cast cannot be used here since we access builtins
457 // during the marking phase of mark sweep. See IC::Clear. 459 // during the marking phase of mark sweep. See IC::Clear.
458 return reinterpret_cast<Code*>(builtins_[name]); 460 return reinterpret_cast<Code*>(builtins_[name]);
459 } 461 }
460 462
461 Address builtin_address(Name name) { 463 Address builtin_address(Name name) {
462 return reinterpret_cast<Address>(&builtins_[name]); 464 return reinterpret_cast<Address>(&builtins_[name]);
463 } 465 }
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 masm, TailCallMode::kDisallow, CallableType::kJSFunction); 803 masm, TailCallMode::kDisallow, CallableType::kJSFunction);
802 } 804 }
803 static void Generate_InterpreterPushArgsAndTailCallFunction( 805 static void Generate_InterpreterPushArgsAndTailCallFunction(
804 MacroAssembler* masm) { 806 MacroAssembler* masm) {
805 return Generate_InterpreterPushArgsAndCallImpl(masm, TailCallMode::kAllow, 807 return Generate_InterpreterPushArgsAndCallImpl(masm, TailCallMode::kAllow,
806 CallableType::kJSFunction); 808 CallableType::kJSFunction);
807 } 809 }
808 static void Generate_InterpreterPushArgsAndCallImpl( 810 static void Generate_InterpreterPushArgsAndCallImpl(
809 MacroAssembler* masm, TailCallMode tail_call_mode, 811 MacroAssembler* masm, TailCallMode tail_call_mode,
810 CallableType function_type); 812 CallableType function_type);
811 static void Generate_InterpreterPushArgsAndConstruct(MacroAssembler* masm); 813
814 static void Generate_InterpreterPushArgsAndConstruct(MacroAssembler* masm) {
815 return Generate_InterpreterPushArgsAndConstructImpl(masm,
816 CallableType::kAny);
817 }
818 static void Generate_InterpreterPushArgsAndConstructFunction(
819 MacroAssembler* masm) {
820 return Generate_InterpreterPushArgsAndConstructImpl(
821 masm, CallableType::kJSFunction);
822 }
823 static void Generate_InterpreterPushArgsAndConstructImpl(
824 MacroAssembler* masm, CallableType function_type);
812 825
813 #define DECLARE_CODE_AGE_BUILTIN_GENERATOR(C) \ 826 #define DECLARE_CODE_AGE_BUILTIN_GENERATOR(C) \
814 static void Generate_Make##C##CodeYoungAgainEvenMarking( \ 827 static void Generate_Make##C##CodeYoungAgainEvenMarking( \
815 MacroAssembler* masm); \ 828 MacroAssembler* masm); \
816 static void Generate_Make##C##CodeYoungAgainOddMarking(MacroAssembler* masm); 829 static void Generate_Make##C##CodeYoungAgainOddMarking(MacroAssembler* masm);
817 CODE_AGE_LIST(DECLARE_CODE_AGE_BUILTIN_GENERATOR) 830 CODE_AGE_LIST(DECLARE_CODE_AGE_BUILTIN_GENERATOR)
818 #undef DECLARE_CODE_AGE_BUILTIN_GENERATOR 831 #undef DECLARE_CODE_AGE_BUILTIN_GENERATOR
819 832
820 static void Generate_MarkCodeAsToBeExecutedOnce(MacroAssembler* masm); 833 static void Generate_MarkCodeAsToBeExecutedOnce(MacroAssembler* masm);
821 static void Generate_MarkCodeAsExecutedOnce(MacroAssembler* masm); 834 static void Generate_MarkCodeAsExecutedOnce(MacroAssembler* masm);
822 static void Generate_MarkCodeAsExecutedTwice(MacroAssembler* masm); 835 static void Generate_MarkCodeAsExecutedTwice(MacroAssembler* masm);
823 836
824 static void Generate_AtomicsLoad(CodeStubAssembler* assembler); 837 static void Generate_AtomicsLoad(CodeStubAssembler* assembler);
825 static void Generate_AtomicsStore(CodeStubAssembler* assembler); 838 static void Generate_AtomicsStore(CodeStubAssembler* assembler);
826 839
827 static void InitBuiltinFunctionTable(); 840 static void InitBuiltinFunctionTable();
828 841
829 bool initialized_; 842 bool initialized_;
830 843
831 friend class BuiltinFunctionTable; 844 friend class BuiltinFunctionTable;
832 friend class Isolate; 845 friend class Isolate;
833 846
834 DISALLOW_COPY_AND_ASSIGN(Builtins); 847 DISALLOW_COPY_AND_ASSIGN(Builtins);
835 }; 848 };
836 849
837 } // namespace internal 850 } // namespace internal
838 } // namespace v8 851 } // namespace v8
839 852
840 #endif // V8_BUILTINS_BUILTINS_H_ 853 #endif // V8_BUILTINS_BUILTINS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698