| Index: src/compiler/bytecode-graph-builder.h
|
| diff --git a/src/compiler/bytecode-graph-builder.h b/src/compiler/bytecode-graph-builder.h
|
| index ce1c5dafb673325b1e7c39bd3c8f05976195210d..5a1ecb13923db8dc6a9431730398068a1eeda36b 100644
|
| --- a/src/compiler/bytecode-graph-builder.h
|
| +++ b/src/compiler/bytecode-graph-builder.h
|
| @@ -27,7 +27,13 @@ class BytecodeGraphBuilder {
|
| Graph* graph() const { return jsgraph_->graph(); }
|
|
|
| private:
|
| + enum class AccumulatorUpdateMode {
|
| + kOutputIgnored,
|
| + kOutputInAccumulator,
|
| + };
|
| +
|
| class Environment;
|
| + class FrameStateBeforeAndAfter;
|
|
|
| void CreateGraphBody(bool stack_check);
|
| void VisitBytecodes();
|
| @@ -57,9 +63,6 @@ class BytecodeGraphBuilder {
|
| // a feedback slot.
|
| VectorSlotPair CreateVectorSlotPair(int slot_id);
|
|
|
| - // Replaces the frame state inputs with empty frame states.
|
| - void AddEmptyFrameStateInputs(Node* node);
|
| -
|
| void set_environment(Environment* env) { environment_ = env; }
|
| const Environment* environment() const { return environment_; }
|
| Environment* environment() { return environment_; }
|
| @@ -107,7 +110,8 @@ class BytecodeGraphBuilder {
|
| interpreter::Register first_arg,
|
| size_t arity);
|
|
|
| - void BuildCreateLiteral(const Operator* op);
|
| + void BuildCreateLiteral(const Operator* op,
|
| + const interpreter::BytecodeArrayIterator& iterator);
|
| void BuildCreateRegExpLiteral(
|
| const interpreter::BytecodeArrayIterator& iterator);
|
| void BuildCreateArrayLiteral(
|
| @@ -144,6 +148,9 @@ class BytecodeGraphBuilder {
|
| const Handle<BytecodeArray>& bytecode_array() const {
|
| return bytecode_array_;
|
| }
|
| + const FrameStateFunctionInfo* frame_state_function_info() const {
|
| + return frame_state_function_info_;
|
| + }
|
|
|
| LanguageMode language_mode() const {
|
| // TODO(mythria): Don't rely on parse information to get language mode.
|
| @@ -159,6 +166,7 @@ class BytecodeGraphBuilder {
|
| CompilationInfo* info_;
|
| JSGraph* jsgraph_;
|
| Handle<BytecodeArray> bytecode_array_;
|
| + const FrameStateFunctionInfo* frame_state_function_info_;
|
| Environment* environment_;
|
|
|
| // Temporary storage for building node input lists.
|
| @@ -203,6 +211,10 @@ class BytecodeGraphBuilder::Environment : public ZoneObject {
|
| effect_dependency_ = dependency;
|
| }
|
|
|
| + // Preserve a checkpoint of the environment for the IR graph. Any
|
| + // further mutation of the environment will not affect checkpoints.
|
| + Node* Checkpoint(BailoutId ast_id, AccumulatorUpdateMode update_mode);
|
| +
|
| // Control dependency tracked by this environment.
|
| Node* GetControlDependency() const { return control_dependency_; }
|
| void UpdateControlDependency(Node* dependency) {
|
| @@ -214,6 +226,7 @@ class BytecodeGraphBuilder::Environment : public ZoneObject {
|
|
|
| private:
|
| int RegisterToValuesIndex(interpreter::Register the_register) const;
|
| + void UpdateStateValues(Node** state_values, int offset, int count);
|
|
|
| Zone* zone() const { return builder_->local_zone(); }
|
| Graph* graph() const { return builder_->graph(); }
|
| @@ -223,6 +236,7 @@ class BytecodeGraphBuilder::Environment : public ZoneObject {
|
| NodeVector* values() { return &values_; }
|
| Node* accumulator() { return accumulator_; }
|
| int register_base() const { return register_base_; }
|
| + int accumulator_base() const { return accumulator_base_; }
|
|
|
| BytecodeGraphBuilder* builder_;
|
| int register_count_;
|
| @@ -233,6 +247,10 @@ class BytecodeGraphBuilder::Environment : public ZoneObject {
|
| Node* effect_dependency_;
|
| NodeVector values_;
|
| int register_base_;
|
| + int accumulator_base_;
|
| + Node* parameters_state_values_;
|
| + Node* registers_state_values_;
|
| + Node* accumulator_state_values_;
|
| };
|
|
|
|
|
|
|