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

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

Issue 1783483002: [interpreter] Add support for scalable operands. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Operand renaming. Created 4 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
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 // Clients of this interface shouldn't depend on lots of interpreter internals. 8 // Clients of this interface shouldn't depend on lots of interpreter internals.
9 // Do not include anything from src/interpreter other than 9 // Do not include anything from src/interpreter other than
10 // src/interpreter/bytecodes.h here! 10 // src/interpreter/bytecodes.h here!
(...skipping 22 matching lines...) Expand all
33 // Initializes the interpreter dispatch table. 33 // Initializes the interpreter dispatch table.
34 void Initialize(); 34 void Initialize();
35 35
36 // Returns the interrupt budget which should be used for the profiler counter. 36 // Returns the interrupt budget which should be used for the profiler counter.
37 static int InterruptBudget(); 37 static int InterruptBudget();
38 38
39 // Generate bytecode for |info|. 39 // Generate bytecode for |info|.
40 static bool MakeBytecode(CompilationInfo* info); 40 static bool MakeBytecode(CompilationInfo* info);
41 41
42 // Return bytecode handler for |bytecode|. 42 // Return bytecode handler for |bytecode|.
43 Code* GetBytecodeHandler(Bytecode bytecode); 43 Code* GetBytecodeHandler(Bytecode bytecode, int operand_scale);
44 44
45 // GC support. 45 // GC support.
46 void IterateDispatchTable(ObjectVisitor* v); 46 void IterateDispatchTable(ObjectVisitor* v);
47 47
48 void TraceCodegen(Handle<Code> code, const char* name); 48 void TraceCodegen(Handle<Code> code, const char* name);
49 49
50 Address dispatch_table_address() { 50 Address dispatch_table_address() {
51 return reinterpret_cast<Address>(&dispatch_table_[0]); 51 return reinterpret_cast<Address>(&dispatch_table_[0]);
52 } 52 }
53 53
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 InterpreterAssembler* assembler); 121 InterpreterAssembler* assembler);
122 122
123 // Generates code to perform a lookup slot load via |function_id|. 123 // Generates code to perform a lookup slot load via |function_id|.
124 void DoLoadLookupSlot(Runtime::FunctionId function_id, 124 void DoLoadLookupSlot(Runtime::FunctionId function_id,
125 InterpreterAssembler* assembler); 125 InterpreterAssembler* assembler);
126 126
127 // Generates code to perform a lookup slot store depending on |language_mode|. 127 // Generates code to perform a lookup slot store depending on |language_mode|.
128 void DoStoreLookupSlot(LanguageMode language_mode, 128 void DoStoreLookupSlot(LanguageMode language_mode,
129 InterpreterAssembler* assembler); 129 InterpreterAssembler* assembler);
130 130
131 // Generates handler for invalid bytecodes.
132 Handle<Code> MakeInvalidBytecodeHandler(Zone* zone);
133
131 bool IsDispatchTableInitialized(); 134 bool IsDispatchTableInitialized();
132 135
133 static const int kDispatchTableSize = static_cast<int>(Bytecode::kLast) + 1; 136 void set_operand_scale(int operand_scale) { operand_scale_ = operand_scale; }
137 int operand_scale() const { return operand_scale_; }
rmcilroy 2016/03/10 16:45:38 I'd rather not have these as object fields since t
oth 2016/03/11 16:26:12 Done.
138
139 static const int kNumberOfWideVariants = 3;
140 static const int kDispatchTableSize = kNumberOfWideVariants * (kMaxUInt8 + 1);
134 141
135 Isolate* isolate_; 142 Isolate* isolate_;
136 Code* dispatch_table_[kDispatchTableSize]; 143 Code* dispatch_table_[kDispatchTableSize];
137 144
145 int operand_scale_;
146
138 DISALLOW_COPY_AND_ASSIGN(Interpreter); 147 DISALLOW_COPY_AND_ASSIGN(Interpreter);
139 }; 148 };
140 149
141 } // namespace interpreter 150 } // namespace interpreter
142 } // namespace internal 151 } // namespace internal
143 } // namespace v8 152 } // namespace v8
144 153
145 #endif // V8_INTERPRETER_INTERPRETER_H_ 154 #endif // V8_INTERPRETER_INTERPRETER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698