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

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: Address comments 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
« no previous file with comments | « src/heap/heap.cc ('k') | src/interpreter/interpreter-assembler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/interpreter.cc
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc
index b515c7bb974ebac7be204a3c7a0d39fab603cdd9..0b2aa77a050a4de5c3d9f4b1d28e7d5a53184717 100644
--- a/src/interpreter/interpreter.cc
+++ b/src/interpreter/interpreter.cc
@@ -1746,11 +1746,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);
@@ -1768,8 +1769,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);
« no previous file with comments | « src/heap/heap.cc ('k') | src/interpreter/interpreter-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698