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

Side by Side Diff: src/interpreter/bytecode-generator.h

Issue 2146493002: Move catch prediction into frontend. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Disable test on Turbofan 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
« no previous file with comments | « src/full-codegen/full-codegen.cc ('k') | src/interpreter/bytecode-generator.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_BYTECODE_GENERATOR_H_ 5 #ifndef V8_INTERPRETER_BYTECODE_GENERATOR_H_
6 #define V8_INTERPRETER_BYTECODE_GENERATOR_H_ 6 #define V8_INTERPRETER_BYTECODE_GENERATOR_H_
7 7
8 #include "src/ast/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/interpreter/bytecode-array-builder.h" 9 #include "src/interpreter/bytecode-array-builder.h"
10 #include "src/interpreter/bytecode-label.h" 10 #include "src/interpreter/bytecode-label.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 void VisitForAccumulatorValue(Expression* expr); 158 void VisitForAccumulatorValue(Expression* expr);
159 void VisitForAccumulatorValueOrTheHole(Expression* expr); 159 void VisitForAccumulatorValueOrTheHole(Expression* expr);
160 MUST_USE_RESULT Register VisitForRegisterValue(Expression* expr); 160 MUST_USE_RESULT Register VisitForRegisterValue(Expression* expr);
161 void VisitForRegisterValue(Expression* expr, Register destination); 161 void VisitForRegisterValue(Expression* expr, Register destination);
162 void VisitForEffect(Expression* expr); 162 void VisitForEffect(Expression* expr);
163 163
164 // Methods for tracking and remapping register. 164 // Methods for tracking and remapping register.
165 void RecordStoreToRegister(Register reg); 165 void RecordStoreToRegister(Register reg);
166 Register LoadFromAliasedRegister(Register reg); 166 Register LoadFromAliasedRegister(Register reg);
167 167
168 // Methods for tracking try-block nesting.
169 bool IsInsideTryCatch() const { return try_catch_nesting_level_ > 0; }
170 bool IsInsideTryFinally() const { return try_finally_nesting_level_ > 0; }
171
172 // Initialize an array of temporary registers with consecutive registers. 168 // Initialize an array of temporary registers with consecutive registers.
173 template <size_t N> 169 template <size_t N>
174 void InitializeWithConsecutiveRegisters(Register (&registers)[N]); 170 void InitializeWithConsecutiveRegisters(Register (&registers)[N]);
175 171
176 inline BytecodeArrayBuilder* builder() const { return builder_; } 172 inline BytecodeArrayBuilder* builder() const { return builder_; }
177 inline Isolate* isolate() const { return isolate_; } 173 inline Isolate* isolate() const { return isolate_; }
178 inline Zone* zone() const { return zone_; } 174 inline Zone* zone() const { return zone_; }
179 inline Scope* scope() const { return scope_; } 175 inline Scope* scope() const { return scope_; }
180 inline CompilationInfo* info() const { return info_; } 176 inline CompilationInfo* info() const { return info_; }
181 177
(...skipping 26 matching lines...) Expand all
208 BytecodeArrayBuilder* builder_; 204 BytecodeArrayBuilder* builder_;
209 CompilationInfo* info_; 205 CompilationInfo* info_;
210 Scope* scope_; 206 Scope* scope_;
211 ZoneVector<Handle<Object>> globals_; 207 ZoneVector<Handle<Object>> globals_;
212 ControlScope* execution_control_; 208 ControlScope* execution_control_;
213 ContextScope* execution_context_; 209 ContextScope* execution_context_;
214 ExpressionResultScope* execution_result_; 210 ExpressionResultScope* execution_result_;
215 RegisterAllocationScope* register_allocator_; 211 RegisterAllocationScope* register_allocator_;
216 ZoneVector<BytecodeLabel> generator_resume_points_; 212 ZoneVector<BytecodeLabel> generator_resume_points_;
217 Register generator_state_; 213 Register generator_state_;
218 int try_catch_nesting_level_;
219 int try_finally_nesting_level_;
220 }; 214 };
221 215
222 } // namespace interpreter 216 } // namespace interpreter
223 } // namespace internal 217 } // namespace internal
224 } // namespace v8 218 } // namespace v8
225 219
226 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ 220 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_
OLDNEW
« no previous file with comments | « src/full-codegen/full-codegen.cc ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698