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

Unified Diff: src/interpreter/interpreter.cc

Issue 1923253002: [generators] Create the fixed array holding the registers only once. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: src/interpreter/interpreter.cc
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc
index 835f80a1b78ab697f011a104dc8f9c715d84d133..61428ad7119d161c345315b11d231c5627f5f704 100644
--- a/src/interpreter/interpreter.cc
+++ b/src/interpreter/interpreter.cc
@@ -1736,11 +1736,12 @@ void Interpreter::DoSuspendGenerator(InterpreterAssembler* assembler) {
Node* generator_reg = __ BytecodeOperandReg(0);
Node* generator = __ LoadRegister(generator_reg);
- Node* array = __ ExportRegisterFile();
+ Node* array =
+ __ LoadObjectField(generator, JSGeneratorObject::kOperandStackOffset);
Node* context = __ GetContext();
Node* state = __ GetAccumulator();
- __ StoreObjectField(generator, JSGeneratorObject::kOperandStackOffset, array);
+ __ ExportRegisterFile(array);
__ StoreObjectField(generator, JSGeneratorObject::kContextOffset, context);
__ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, state);
@@ -1758,8 +1759,6 @@ void Interpreter::DoResumeGenerator(InterpreterAssembler* assembler) {
__ ImportRegisterFile(
__ LoadObjectField(generator, JSGeneratorObject::kOperandStackOffset));
- __ StoreObjectField(generator, JSGeneratorObject::kOperandStackOffset,
- __ HeapConstant(isolate_->factory()->empty_fixed_array()));
Node* old_state =
__ LoadObjectField(generator, JSGeneratorObject::kContinuationOffset);

Powered by Google App Engine
This is Rietveld 408576698