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

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

Issue 2684993002: [interpreter] Create custom call opcodes for specific argument counts (Closed)
Patch Set: Fix golden files again Created 3 years, 9 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
81 // Generates handler for given |bytecode| and |operand_scale| using 85 // Generates handler for given |bytecode| and |operand_scale| using
82 // |generator| and installs it into the dispatch table. 86 // |generator| and installs it into the dispatch table.
83 void InstallBytecodeHandler(Zone* zone, Bytecode bytecode, 87 void InstallBytecodeHandler(Zone* zone, Bytecode bytecode,
84 OperandScale operand_scale, 88 OperandScale operand_scale,
85 BytecodeGeneratorFunc generator); 89 BytecodeGeneratorFunc generator);
86 90
87 // Generates code to perform the binary operation via |Generator|. 91 // Generates code to perform the binary operation via |Generator|.
88 template <class Generator> 92 template <class Generator>
89 void DoBinaryOpWithFeedback(InterpreterAssembler* assembler); 93 void DoBinaryOpWithFeedback(InterpreterAssembler* assembler);
90 94
(...skipping 26 matching lines...) Expand all
117 121
118 // Generates code to perform a named property store via |ic|. 122 // Generates code to perform a named property store via |ic|.
119 void DoStoreIC(Callable ic, InterpreterAssembler* assembler); 123 void DoStoreIC(Callable ic, InterpreterAssembler* assembler);
120 124
121 // Generates code to perform a keyed property store via |ic|. 125 // Generates code to perform a keyed property store via |ic|.
122 void DoKeyedStoreIC(Callable ic, InterpreterAssembler* assembler); 126 void DoKeyedStoreIC(Callable ic, InterpreterAssembler* assembler);
123 127
124 // Generates code to perform a JS call that collects type feedback. 128 // Generates code to perform a JS call that collects type feedback.
125 void DoJSCall(InterpreterAssembler* assembler, TailCallMode tail_call_mode); 129 void DoJSCall(InterpreterAssembler* assembler, TailCallMode tail_call_mode);
126 130
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
127 // Generates code to perform delete via function_id. 135 // Generates code to perform delete via function_id.
128 void DoDelete(Runtime::FunctionId function_id, 136 void DoDelete(Runtime::FunctionId function_id,
129 InterpreterAssembler* assembler); 137 InterpreterAssembler* assembler);
130 138
131 // Generates code to perform a lookup slot load via |function_id|. 139 // Generates code to perform a lookup slot load via |function_id|.
132 void DoLdaLookupSlot(Runtime::FunctionId function_id, 140 void DoLdaLookupSlot(Runtime::FunctionId function_id,
133 InterpreterAssembler* assembler); 141 InterpreterAssembler* assembler);
134 142
135 // Generates code to perform a lookup slot load via |function_id| that can 143 // Generates code to perform a lookup slot load via |function_id| that can
136 // fast path to a context slot load. 144 // fast path to a context slot load.
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 std::unique_ptr<uintptr_t[]> bytecode_dispatch_counters_table_; 195 std::unique_ptr<uintptr_t[]> bytecode_dispatch_counters_table_;
188 196
189 DISALLOW_COPY_AND_ASSIGN(Interpreter); 197 DISALLOW_COPY_AND_ASSIGN(Interpreter);
190 }; 198 };
191 199
192 } // namespace interpreter 200 } // namespace interpreter
193 } // namespace internal 201 } // namespace internal
194 } // namespace v8 202 } // namespace v8
195 203
196 #endif // V8_INTERPRETER_INTERPRETER_H_ 204 #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