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

Side by Side Diff: src/compiler/ast-graph-builder.cc

Issue 1106613003: [turbofan] Unify frame state inputs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comment. Created 5 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 unified diff | Download patch
« no previous file with comments | « src/compiler.cc ('k') | src/compiler/change-lowering.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/compiler/ast-graph-builder.h" 5 #include "src/compiler/ast-graph-builder.h"
6 6
7 #include "src/compiler.h" 7 #include "src/compiler.h"
8 #include "src/compiler/ast-loop-assignment-analyzer.h" 8 #include "src/compiler/ast-loop-assignment-analyzer.h"
9 #include "src/compiler/control-builders.h" 9 #include "src/compiler/control-builders.h"
10 #include "src/compiler/js-type-feedback.h" 10 #include "src/compiler/js-type-feedback.h"
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 void AstGraphBuilder::Environment::UpdateStateValuesWithCache( 731 void AstGraphBuilder::Environment::UpdateStateValuesWithCache(
732 Node** state_values, int offset, int count) { 732 Node** state_values, int offset, int count) {
733 Node** env_values = (count == 0) ? nullptr : &values()->at(offset); 733 Node** env_values = (count == 0) ? nullptr : &values()->at(offset);
734 *state_values = builder_->state_values_cache_.GetNodeForValues( 734 *state_values = builder_->state_values_cache_.GetNodeForValues(
735 env_values, static_cast<size_t>(count)); 735 env_values, static_cast<size_t>(count));
736 } 736 }
737 737
738 738
739 Node* AstGraphBuilder::Environment::Checkpoint( 739 Node* AstGraphBuilder::Environment::Checkpoint(
740 BailoutId ast_id, OutputFrameStateCombine combine) { 740 BailoutId ast_id, OutputFrameStateCombine combine) {
741 if (!FLAG_turbo_deoptimization) return nullptr; 741 if (!builder()->info()->is_deoptimization_enabled()) {
742 return builder()->jsgraph()->EmptyFrameState();
743 }
742 744
743 UpdateStateValues(&parameters_node_, 0, parameters_count()); 745 UpdateStateValues(&parameters_node_, 0, parameters_count());
744 UpdateStateValuesWithCache(&locals_node_, parameters_count(), locals_count()); 746 UpdateStateValuesWithCache(&locals_node_, parameters_count(), locals_count());
745 UpdateStateValues(&stack_node_, parameters_count() + locals_count(), 747 UpdateStateValues(&stack_node_, parameters_count() + locals_count(),
746 stack_height()); 748 stack_height());
747 749
748 const Operator* op = common()->FrameState(JS_FRAME, ast_id, combine); 750 const Operator* op = common()->FrameState(JS_FRAME, ast_id, combine);
749 751
750 Node* result = graph()->NewNode(op, parameters_node_, locals_node_, 752 Node* result = graph()->NewNode(op, parameters_node_, locals_node_,
751 stack_node_, builder()->current_context(), 753 stack_node_, builder()->current_context(),
(...skipping 2825 matching lines...) Expand 10 before | Expand all | Expand 10 after
3577 // Phi does not exist yet, introduce one. 3579 // Phi does not exist yet, introduce one.
3578 value = NewPhi(inputs, value, control); 3580 value = NewPhi(inputs, value, control);
3579 value->ReplaceInput(inputs - 1, other); 3581 value->ReplaceInput(inputs - 1, other);
3580 } 3582 }
3581 return value; 3583 return value;
3582 } 3584 }
3583 3585
3584 } // namespace compiler 3586 } // namespace compiler
3585 } // namespace internal 3587 } // namespace internal
3586 } // namespace v8 3588 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/compiler/change-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698