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/bytecode-generator.h

Issue 2894293003: Save/restore only live registers in the generator suspend/resume. (Closed)
Patch Set: Tweak Created 3 years, 6 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-decoder.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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 void BuildIndexedJump(Register value, size_t start_index, size_t size, 129 void BuildIndexedJump(Register value, size_t start_index, size_t size,
130 ZoneVector<BytecodeLabel>& targets); 130 ZoneVector<BytecodeLabel>& targets);
131 131
132 void BuildNewLocalActivationContext(); 132 void BuildNewLocalActivationContext();
133 void BuildLocalActivationContextInitialization(); 133 void BuildLocalActivationContextInitialization();
134 void BuildNewLocalBlockContext(Scope* scope); 134 void BuildNewLocalBlockContext(Scope* scope);
135 void BuildNewLocalCatchContext(Scope* scope); 135 void BuildNewLocalCatchContext(Scope* scope);
136 void BuildNewLocalWithContext(Scope* scope); 136 void BuildNewLocalWithContext(Scope* scope);
137 137
138 void BuildGeneratorPrologue(); 138 void BuildGeneratorPrologue();
139 void BuildGeneratorSuspend(Suspend* expr, Register generator); 139 void BuildGeneratorSuspend(Suspend* expr, Register generator,
140 void BuildGeneratorResume(Suspend* expr, Register generator); 140 RegisterList registers_to_save);
141 void BuildGeneratorResume(Suspend* expr, Register generator,
142 RegisterList registers_to_restore);
141 143
142 void VisitArgumentsObject(Variable* variable); 144 void VisitArgumentsObject(Variable* variable);
143 void VisitRestArgumentsArray(Variable* rest); 145 void VisitRestArgumentsArray(Variable* rest);
144 void VisitCallSuper(Call* call); 146 void VisitCallSuper(Call* call);
145 void VisitClassLiteralProperties(ClassLiteral* expr, Register constructor, 147 void VisitClassLiteralProperties(ClassLiteral* expr, Register constructor,
146 Register prototype); 148 Register prototype);
147 void BuildClassLiteralNameProperty(ClassLiteral* expr, Register constructor); 149 void BuildClassLiteralNameProperty(ClassLiteral* expr, Register constructor);
148 void BuildClassLiteral(ClassLiteral* expr); 150 void BuildClassLiteral(ClassLiteral* expr);
149 void VisitThisFunctionVariable(Variable* variable); 151 void VisitThisFunctionVariable(Variable* variable);
150 void VisitNewTargetVariable(Variable* variable); 152 void VisitNewTargetVariable(Variable* variable);
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 ZoneVector<std::pair<NativeFunctionLiteral*, size_t>> 251 ZoneVector<std::pair<NativeFunctionLiteral*, size_t>>
250 native_function_literals_; 252 native_function_literals_;
251 ZoneVector<std::pair<ObjectLiteral*, size_t>> object_literals_; 253 ZoneVector<std::pair<ObjectLiteral*, size_t>> object_literals_;
252 ZoneVector<std::pair<ArrayLiteral*, size_t>> array_literals_; 254 ZoneVector<std::pair<ArrayLiteral*, size_t>> array_literals_;
253 255
254 ControlScope* execution_control_; 256 ControlScope* execution_control_;
255 ContextScope* execution_context_; 257 ContextScope* execution_context_;
256 ExpressionResultScope* execution_result_; 258 ExpressionResultScope* execution_result_;
257 259
258 BytecodeJumpTable* generator_jump_table_; 260 BytecodeJumpTable* generator_jump_table_;
261 Register generator_object_;
259 Register generator_state_; 262 Register generator_state_;
260 int loop_depth_; 263 int loop_depth_;
261 }; 264 };
262 265
263 } // namespace interpreter 266 } // namespace interpreter
264 } // namespace internal 267 } // namespace internal
265 } // namespace v8 268 } // namespace v8
266 269
267 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ 270 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-decoder.cc ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698