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

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: Rebase onto 3c1dc424d3f2f651ad 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 // Get dispatch table index of bytecode.
132 size_t GetDispatchTableIndex(Bytecode bytecode, uint32_t operand_size_log2);
133
131 bool IsDispatchTableInitialized(); 134 bool IsDispatchTableInitialized();
132 135
133 static const int kDispatchTableSize = static_cast<int>(Bytecode::kLast) + 1; 136 static const int kNumberOfWideVariants = 3;
137 static const int kDispatchTableSize = kNumberOfWideVariants * (kMaxUInt8 + 1);
134 138
135 Isolate* isolate_; 139 Isolate* isolate_;
136 Code* dispatch_table_[kDispatchTableSize]; 140 Code* dispatch_table_[kDispatchTableSize];
137 141
138 DISALLOW_COPY_AND_ASSIGN(Interpreter); 142 DISALLOW_COPY_AND_ASSIGN(Interpreter);
139 }; 143 };
140 144
141 } // namespace interpreter 145 } // namespace interpreter
142 } // namespace internal 146 } // namespace internal
143 } // namespace v8 147 } // namespace v8
144 148
145 #endif // V8_INTERPRETER_INTERPRETER_H_ 149 #endif // V8_INTERPRETER_INTERPRETER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698