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

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

Issue 1651133002: [interpreter] Move temporary register allocator into own file. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Incorporate review comments from rmcilroy. 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/interpreter/bytecode-array-iterator.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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 // Visitors for obtaining expression result in the accumulator, in a 98 // Visitors for obtaining expression result in the accumulator, in a
99 // register, or just getting the effect. 99 // register, or just getting the effect.
100 void VisitForAccumulatorValue(Expression* expression); 100 void VisitForAccumulatorValue(Expression* expression);
101 MUST_USE_RESULT Register VisitForRegisterValue(Expression* expression); 101 MUST_USE_RESULT Register VisitForRegisterValue(Expression* expression);
102 void VisitForEffect(Expression* node); 102 void VisitForEffect(Expression* node);
103 103
104 // Methods for tracking and remapping register. 104 // Methods for tracking and remapping register.
105 void RecordStoreToRegister(Register reg); 105 void RecordStoreToRegister(Register reg);
106 Register LoadFromAliasedRegister(Register reg); 106 Register LoadFromAliasedRegister(Register reg);
107 107
108 inline BytecodeArrayBuilder* builder() { return &builder_; } 108 inline void set_builder(BytecodeArrayBuilder* builder) { builder_ = builder; }
109 inline BytecodeArrayBuilder* builder() const { return builder_; }
109 110
110 inline Isolate* isolate() const { return isolate_; } 111 inline Isolate* isolate() const { return isolate_; }
111 inline Zone* zone() const { return zone_; } 112 inline Zone* zone() const { return zone_; }
112 113
113 inline Scope* scope() const { return scope_; } 114 inline Scope* scope() const { return scope_; }
114 inline void set_scope(Scope* scope) { scope_ = scope; } 115 inline void set_scope(Scope* scope) { scope_ = scope; }
115 inline CompilationInfo* info() const { return info_; } 116 inline CompilationInfo* info() const { return info_; }
116 inline void set_info(CompilationInfo* info) { info_ = info; } 117 inline void set_info(CompilationInfo* info) { info_ = info; }
117 118
118 inline ControlScope* execution_control() const { return execution_control_; } 119 inline ControlScope* execution_control() const { return execution_control_; }
(...skipping 16 matching lines...) Expand all
135 return register_allocator_; 136 return register_allocator_;
136 } 137 }
137 138
138 ZoneVector<Handle<Object>>* globals() { return &globals_; } 139 ZoneVector<Handle<Object>>* globals() { return &globals_; }
139 inline LanguageMode language_mode() const; 140 inline LanguageMode language_mode() const;
140 Strength language_mode_strength() const; 141 Strength language_mode_strength() const;
141 int feedback_index(FeedbackVectorSlot slot) const; 142 int feedback_index(FeedbackVectorSlot slot) const;
142 143
143 Isolate* isolate_; 144 Isolate* isolate_;
144 Zone* zone_; 145 Zone* zone_;
145 BytecodeArrayBuilder builder_; 146 BytecodeArrayBuilder* builder_;
146 CompilationInfo* info_; 147 CompilationInfo* info_;
147 Scope* scope_; 148 Scope* scope_;
148 ZoneVector<Handle<Object>> globals_; 149 ZoneVector<Handle<Object>> globals_;
149 ControlScope* execution_control_; 150 ControlScope* execution_control_;
150 ContextScope* execution_context_; 151 ContextScope* execution_context_;
151 ExpressionResultScope* execution_result_; 152 ExpressionResultScope* execution_result_;
152 RegisterAllocationScope* register_allocator_; 153 RegisterAllocationScope* register_allocator_;
153 }; 154 };
154 155
155 } // namespace interpreter 156 } // namespace interpreter
156 } // namespace internal 157 } // namespace internal
157 } // namespace v8 158 } // namespace v8
158 159
159 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ 160 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-array-iterator.cc ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698