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

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

Issue 1689113004: Reland of [interpreter] Correctly thread through catch prediction. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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/compiler/bytecode-graph-builder.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/bytecodes.h" 10 #include "src/interpreter/bytecodes.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 // register, or just getting the effect. 117 // register, or just getting the effect.
118 void VisitForAccumulatorValue(Expression* expr); 118 void VisitForAccumulatorValue(Expression* expr);
119 void VisitForAccumulatorValueOrTheHole(Expression* expr); 119 void VisitForAccumulatorValueOrTheHole(Expression* expr);
120 MUST_USE_RESULT Register VisitForRegisterValue(Expression* expr); 120 MUST_USE_RESULT Register VisitForRegisterValue(Expression* expr);
121 void VisitForEffect(Expression* expr); 121 void VisitForEffect(Expression* expr);
122 122
123 // Methods for tracking and remapping register. 123 // Methods for tracking and remapping register.
124 void RecordStoreToRegister(Register reg); 124 void RecordStoreToRegister(Register reg);
125 Register LoadFromAliasedRegister(Register reg); 125 Register LoadFromAliasedRegister(Register reg);
126 126
127 // Methods for tracking try-block nesting.
128 bool IsInsideTryCatch() const { return try_catch_nesting_level_ > 0; }
129 bool IsInsideTryFinally() const { return try_finally_nesting_level_ > 0; }
130
127 inline void set_builder(BytecodeArrayBuilder* builder) { builder_ = builder; } 131 inline void set_builder(BytecodeArrayBuilder* builder) { builder_ = builder; }
128 inline BytecodeArrayBuilder* builder() const { return builder_; } 132 inline BytecodeArrayBuilder* builder() const { return builder_; }
129 133
130 inline Isolate* isolate() const { return isolate_; } 134 inline Isolate* isolate() const { return isolate_; }
131 inline Zone* zone() const { return zone_; } 135 inline Zone* zone() const { return zone_; }
132 136
133 inline Scope* scope() const { return scope_; } 137 inline Scope* scope() const { return scope_; }
134 inline void set_scope(Scope* scope) { scope_ = scope; } 138 inline void set_scope(Scope* scope) { scope_ = scope; }
135 inline CompilationInfo* info() const { return info_; } 139 inline CompilationInfo* info() const { return info_; }
136 inline void set_info(CompilationInfo* info) { info_ = info; } 140 inline void set_info(CompilationInfo* info) { info_ = info; }
(...skipping 26 matching lines...) Expand all
163 Isolate* isolate_; 167 Isolate* isolate_;
164 Zone* zone_; 168 Zone* zone_;
165 BytecodeArrayBuilder* builder_; 169 BytecodeArrayBuilder* builder_;
166 CompilationInfo* info_; 170 CompilationInfo* info_;
167 Scope* scope_; 171 Scope* scope_;
168 ZoneVector<Handle<Object>> globals_; 172 ZoneVector<Handle<Object>> globals_;
169 ControlScope* execution_control_; 173 ControlScope* execution_control_;
170 ContextScope* execution_context_; 174 ContextScope* execution_context_;
171 ExpressionResultScope* execution_result_; 175 ExpressionResultScope* execution_result_;
172 RegisterAllocationScope* register_allocator_; 176 RegisterAllocationScope* register_allocator_;
177 int try_catch_nesting_level_;
178 int try_finally_nesting_level_;
173 }; 179 };
174 180
175 } // namespace interpreter 181 } // namespace interpreter
176 } // namespace internal 182 } // namespace internal
177 } // namespace v8 183 } // namespace v8
178 184
179 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ 185 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_
OLDNEW
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698