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/interpreter.cc

Issue 2520913002: [runtime] Rename {JSGeneratorObject::operand_stack} field. (Closed)
Patch Set: Created 4 years 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/js-typed-lowering.cc ('k') | src/objects.h » ('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 #include "src/interpreter/interpreter.h" 5 #include "src/interpreter/interpreter.h"
6 6
7 #include <fstream> 7 #include <fstream>
8 #include <memory> 8 #include <memory>
9 9
10 #include "src/ast/prettyprinter.h" 10 #include "src/ast/prettyprinter.h"
(...skipping 2708 matching lines...) Expand 10 before | Expand all | Expand 10 after
2719 ExternalReference::debug_last_step_action_address(isolate_)); 2719 ExternalReference::debug_last_step_action_address(isolate_));
2720 Node* step_action = __ Load(MachineType::Int8(), step_action_address); 2720 Node* step_action = __ Load(MachineType::Int8(), step_action_address);
2721 STATIC_ASSERT(StepIn > StepNext); 2721 STATIC_ASSERT(StepIn > StepNext);
2722 STATIC_ASSERT(StepFrame > StepNext); 2722 STATIC_ASSERT(StepFrame > StepNext);
2723 STATIC_ASSERT(LastStepAction == StepFrame); 2723 STATIC_ASSERT(LastStepAction == StepFrame);
2724 Node* step_next = __ Int32Constant(StepNext); 2724 Node* step_next = __ Int32Constant(StepNext);
2725 __ Branch(__ Int32LessThanOrEqual(step_next, step_action), &if_stepping, &ok); 2725 __ Branch(__ Int32LessThanOrEqual(step_next, step_action), &if_stepping, &ok);
2726 __ Bind(&ok); 2726 __ Bind(&ok);
2727 2727
2728 Node* array = 2728 Node* array =
2729 __ LoadObjectField(generator, JSGeneratorObject::kOperandStackOffset); 2729 __ LoadObjectField(generator, JSGeneratorObject::kRegisterFileOffset);
2730 Node* context = __ GetContext(); 2730 Node* context = __ GetContext();
2731 Node* state = __ GetAccumulator(); 2731 Node* state = __ GetAccumulator();
2732 2732
2733 __ ExportRegisterFile(array); 2733 __ ExportRegisterFile(array);
2734 __ StoreObjectField(generator, JSGeneratorObject::kContextOffset, context); 2734 __ StoreObjectField(generator, JSGeneratorObject::kContextOffset, context);
2735 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, state); 2735 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, state);
2736 2736
2737 Node* offset = __ SmiTag(__ BytecodeOffset()); 2737 Node* offset = __ SmiTag(__ BytecodeOffset());
2738 __ StoreObjectField(generator, JSGeneratorObject::kInputOrDebugPosOffset, 2738 __ StoreObjectField(generator, JSGeneratorObject::kInputOrDebugPosOffset,
2739 offset); 2739 offset);
(...skipping 11 matching lines...) Expand all
2751 // ResumeGenerator <generator> 2751 // ResumeGenerator <generator>
2752 // 2752 //
2753 // Imports the register file stored in the generator. Also loads the 2753 // Imports the register file stored in the generator. Also loads the
2754 // generator's state and stores it in the accumulator, before overwriting it 2754 // generator's state and stores it in the accumulator, before overwriting it
2755 // with kGeneratorExecuting. 2755 // with kGeneratorExecuting.
2756 void Interpreter::DoResumeGenerator(InterpreterAssembler* assembler) { 2756 void Interpreter::DoResumeGenerator(InterpreterAssembler* assembler) {
2757 Node* generator_reg = __ BytecodeOperandReg(0); 2757 Node* generator_reg = __ BytecodeOperandReg(0);
2758 Node* generator = __ LoadRegister(generator_reg); 2758 Node* generator = __ LoadRegister(generator_reg);
2759 2759
2760 __ ImportRegisterFile( 2760 __ ImportRegisterFile(
2761 __ LoadObjectField(generator, JSGeneratorObject::kOperandStackOffset)); 2761 __ LoadObjectField(generator, JSGeneratorObject::kRegisterFileOffset));
2762 2762
2763 Node* old_state = 2763 Node* old_state =
2764 __ LoadObjectField(generator, JSGeneratorObject::kContinuationOffset); 2764 __ LoadObjectField(generator, JSGeneratorObject::kContinuationOffset);
2765 Node* new_state = __ Int32Constant(JSGeneratorObject::kGeneratorExecuting); 2765 Node* new_state = __ Int32Constant(JSGeneratorObject::kGeneratorExecuting);
2766 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, 2766 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset,
2767 __ SmiTag(new_state)); 2767 __ SmiTag(new_state));
2768 __ SetAccumulator(old_state); 2768 __ SetAccumulator(old_state);
2769 2769
2770 __ Dispatch(); 2770 __ Dispatch();
2771 } 2771 }
2772 2772
2773 } // namespace interpreter 2773 } // namespace interpreter
2774 } // namespace internal 2774 } // namespace internal
2775 } // namespace v8 2775 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698