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

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

Issue 1179543002: [turbofan] Make IfException projections consume effects. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | src/compiler/common-operator.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 3827 matching lines...) Expand 10 before | Expand all | Expand 10 after
3838 } 3838 }
3839 // Add implicit exception continuation for throwing nodes. 3839 // Add implicit exception continuation for throwing nodes.
3840 if (!result->op()->HasProperty(Operator::kNoThrow) && inside_try_scope) { 3840 if (!result->op()->HasProperty(Operator::kNoThrow) && inside_try_scope) {
3841 // Conservative prediction whether caught locally. 3841 // Conservative prediction whether caught locally.
3842 IfExceptionHint hint = try_catch_nesting_level_ > 0 3842 IfExceptionHint hint = try_catch_nesting_level_ > 0
3843 ? IfExceptionHint::kLocallyCaught 3843 ? IfExceptionHint::kLocallyCaught
3844 : IfExceptionHint::kLocallyUncaught; 3844 : IfExceptionHint::kLocallyUncaught;
3845 // Copy the environment for the success continuation. 3845 // Copy the environment for the success continuation.
3846 Environment* success_env = environment()->CopyForConditional(); 3846 Environment* success_env = environment()->CopyForConditional();
3847 const Operator* op = common()->IfException(hint); 3847 const Operator* op = common()->IfException(hint);
3848 Node* on_exception = graph()->NewNode(op, result); 3848 Node* effect = environment()->GetEffectDependency();
3849 Node* on_exception = graph()->NewNode(op, effect, result);
3849 environment_->UpdateControlDependency(on_exception); 3850 environment_->UpdateControlDependency(on_exception);
3851 environment_->UpdateEffectDependency(on_exception);
3850 execution_control()->ThrowValue(on_exception); 3852 execution_control()->ThrowValue(on_exception);
3851 set_environment(success_env); 3853 set_environment(success_env);
3852 } 3854 }
3853 // Add implicit success continuation for throwing nodes. 3855 // Add implicit success continuation for throwing nodes.
3854 if (!result->op()->HasProperty(Operator::kNoThrow)) { 3856 if (!result->op()->HasProperty(Operator::kNoThrow)) {
3855 const Operator* op = common()->IfSuccess(); 3857 const Operator* op = common()->IfSuccess();
3856 Node* on_success = graph()->NewNode(op, result); 3858 Node* on_success = graph()->NewNode(op, result);
3857 environment_->UpdateControlDependency(on_success); 3859 environment_->UpdateControlDependency(on_success);
3858 } 3860 }
3859 } 3861 }
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
4076 // Phi does not exist yet, introduce one. 4078 // Phi does not exist yet, introduce one.
4077 value = NewPhi(inputs, value, control); 4079 value = NewPhi(inputs, value, control);
4078 value->ReplaceInput(inputs - 1, other); 4080 value->ReplaceInput(inputs - 1, other);
4079 } 4081 }
4080 return value; 4082 return value;
4081 } 4083 }
4082 4084
4083 } // namespace compiler 4085 } // namespace compiler
4084 } // namespace internal 4086 } // namespace internal
4085 } // namespace v8 4087 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/common-operator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698