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

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

Issue 2709533002: Revert of [interpreter] Create custom call opcodes for specific argument counts (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « src/interpreter/bytecodes.h ('k') | src/interpreter/interpreter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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_INTERPRETER_INTERPRETER_H_ 5 #ifndef V8_INTERPRETER_INTERPRETER_H_
6 #define V8_INTERPRETER_INTERPRETER_H_ 6 #define V8_INTERPRETER_INTERPRETER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 // Clients of this interface shouldn't depend on lots of interpreter internals. 10 // Clients of this interface shouldn't depend on lots of interpreter internals.
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 private: 72 private:
73 // Bytecode handler generator functions. 73 // Bytecode handler generator functions.
74 #define DECLARE_BYTECODE_HANDLER_GENERATOR(Name, ...) \ 74 #define DECLARE_BYTECODE_HANDLER_GENERATOR(Name, ...) \
75 void Do##Name(InterpreterAssembler* assembler); 75 void Do##Name(InterpreterAssembler* assembler);
76 BYTECODE_LIST(DECLARE_BYTECODE_HANDLER_GENERATOR) 76 BYTECODE_LIST(DECLARE_BYTECODE_HANDLER_GENERATOR)
77 #undef DECLARE_BYTECODE_HANDLER_GENERATOR 77 #undef DECLARE_BYTECODE_HANDLER_GENERATOR
78 78
79 typedef void (Interpreter::*BytecodeGeneratorFunc)(InterpreterAssembler*); 79 typedef void (Interpreter::*BytecodeGeneratorFunc)(InterpreterAssembler*);
80 80
81 // In the case of bytecodes that share handler implementations, copy the code
82 // into the bytecode's dispatcher table entry and return true.
83 bool ReuseExistingHandler(Bytecode bytecode, OperandScale operand_scale);
84
85 // Generates handler for given |bytecode| and |operand_scale| using 81 // Generates handler for given |bytecode| and |operand_scale| using
86 // |generator| and installs it into the dispatch table. 82 // |generator| and installs it into the dispatch table.
87 void InstallBytecodeHandler(Zone* zone, Bytecode bytecode, 83 void InstallBytecodeHandler(Zone* zone, Bytecode bytecode,
88 OperandScale operand_scale, 84 OperandScale operand_scale,
89 BytecodeGeneratorFunc generator); 85 BytecodeGeneratorFunc generator);
90 86
91 // Generates code to perform the binary operation via |Generator|. 87 // Generates code to perform the binary operation via |Generator|.
92 template <class Generator> 88 template <class Generator>
93 void DoBinaryOpWithFeedback(InterpreterAssembler* assembler); 89 void DoBinaryOpWithFeedback(InterpreterAssembler* assembler);
94 90
(...skipping 26 matching lines...) Expand all
121 117
122 // Generates code to perform a named property store via |ic|. 118 // Generates code to perform a named property store via |ic|.
123 void DoStoreIC(Callable ic, InterpreterAssembler* assembler); 119 void DoStoreIC(Callable ic, InterpreterAssembler* assembler);
124 120
125 // Generates code to perform a keyed property store via |ic|. 121 // Generates code to perform a keyed property store via |ic|.
126 void DoKeyedStoreIC(Callable ic, InterpreterAssembler* assembler); 122 void DoKeyedStoreIC(Callable ic, InterpreterAssembler* assembler);
127 123
128 // Generates code to perform a JS call that collects type feedback. 124 // Generates code to perform a JS call that collects type feedback.
129 void DoJSCall(InterpreterAssembler* assembler, TailCallMode tail_call_mode); 125 void DoJSCall(InterpreterAssembler* assembler, TailCallMode tail_call_mode);
130 126
131 // Generates code to perform a JS call with a known number of arguments that
132 // collects type feedback.
133 void DoJSCallN(InterpreterAssembler* assembler, int n);
134
135 // Generates code to perform delete via function_id. 127 // Generates code to perform delete via function_id.
136 void DoDelete(Runtime::FunctionId function_id, 128 void DoDelete(Runtime::FunctionId function_id,
137 InterpreterAssembler* assembler); 129 InterpreterAssembler* assembler);
138 130
139 // Generates code to perform a lookup slot load via |function_id|. 131 // Generates code to perform a lookup slot load via |function_id|.
140 void DoLdaLookupSlot(Runtime::FunctionId function_id, 132 void DoLdaLookupSlot(Runtime::FunctionId function_id,
141 InterpreterAssembler* assembler); 133 InterpreterAssembler* assembler);
142 134
143 // Generates code to perform a lookup slot load via |function_id| that can 135 // Generates code to perform a lookup slot load via |function_id| that can
144 // fast path to a context slot load. 136 // fast path to a context slot load.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 std::unique_ptr<uintptr_t[]> bytecode_dispatch_counters_table_; 182 std::unique_ptr<uintptr_t[]> bytecode_dispatch_counters_table_;
191 183
192 DISALLOW_COPY_AND_ASSIGN(Interpreter); 184 DISALLOW_COPY_AND_ASSIGN(Interpreter);
193 }; 185 };
194 186
195 } // namespace interpreter 187 } // namespace interpreter
196 } // namespace internal 188 } // namespace internal
197 } // namespace v8 189 } // namespace v8
198 190
199 #endif // V8_INTERPRETER_INTERPRETER_H_ 191 #endif // V8_INTERPRETER_INTERPRETER_H_
OLDNEW
« no previous file with comments | « src/interpreter/bytecodes.h ('k') | src/interpreter/interpreter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698