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

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

Issue 2262703002: [TurboFan] Ensure value is pushed for StackOverflow in AstVisitor::Visit. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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/ast/ast.h ('k') | no next file » | 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/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/compiler.h" 8 #include "src/compiler.h"
9 #include "src/compiler/ast-loop-assignment-analyzer.h" 9 #include "src/compiler/ast-loop-assignment-analyzer.h"
10 #include "src/compiler/control-builders.h" 10 #include "src/compiler/control-builders.h"
(...skipping 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after
1038 void AstGraphBuilder::VisitForValues(ZoneList<Expression*>* exprs) { 1038 void AstGraphBuilder::VisitForValues(ZoneList<Expression*>* exprs) {
1039 for (int i = 0; i < exprs->length(); ++i) { 1039 for (int i = 0; i < exprs->length(); ++i) {
1040 VisitForValue(exprs->at(i)); 1040 VisitForValue(exprs->at(i));
1041 } 1041 }
1042 } 1042 }
1043 1043
1044 1044
1045 void AstGraphBuilder::VisitForValue(Expression* expr) { 1045 void AstGraphBuilder::VisitForValue(Expression* expr) {
1046 AstValueContext for_value(this); 1046 AstValueContext for_value(this);
1047 if (!CheckStackOverflow()) { 1047 if (!CheckStackOverflow()) {
1048 AstVisitor<AstGraphBuilder>::Visit(expr); 1048 VisitNoStackOverflowCheck(expr);
1049 } else { 1049 } else {
1050 ast_context()->ProduceValue(expr, jsgraph()->UndefinedConstant()); 1050 ast_context()->ProduceValue(expr, jsgraph()->UndefinedConstant());
1051 } 1051 }
1052 } 1052 }
1053 1053
1054 1054
1055 void AstGraphBuilder::VisitForEffect(Expression* expr) { 1055 void AstGraphBuilder::VisitForEffect(Expression* expr) {
1056 AstEffectContext for_effect(this); 1056 AstEffectContext for_effect(this);
1057 if (!CheckStackOverflow()) { 1057 if (!CheckStackOverflow()) {
1058 AstVisitor<AstGraphBuilder>::Visit(expr); 1058 VisitNoStackOverflowCheck(expr);
1059 } else { 1059 } else {
1060 ast_context()->ProduceValue(expr, jsgraph()->UndefinedConstant()); 1060 ast_context()->ProduceValue(expr, jsgraph()->UndefinedConstant());
1061 } 1061 }
1062 } 1062 }
1063 1063
1064 1064
1065 void AstGraphBuilder::VisitForTest(Expression* expr) { 1065 void AstGraphBuilder::VisitForTest(Expression* expr) {
1066 AstTestContext for_condition(this, expr->test_id()); 1066 AstTestContext for_condition(this, expr->test_id());
1067 if (!CheckStackOverflow()) { 1067 if (!CheckStackOverflow()) {
1068 AstVisitor<AstGraphBuilder>::Visit(expr); 1068 VisitNoStackOverflowCheck(expr);
1069 } else { 1069 } else {
1070 ast_context()->ProduceValue(expr, jsgraph()->UndefinedConstant()); 1070 ast_context()->ProduceValue(expr, jsgraph()->UndefinedConstant());
1071 } 1071 }
1072 } 1072 }
1073 1073
1074 1074
1075 void AstGraphBuilder::Visit(Expression* expr) { 1075 void AstGraphBuilder::Visit(Expression* expr) {
1076 // Reuses enclosing AstContext. 1076 // Reuses enclosing AstContext.
1077 if (!CheckStackOverflow()) { 1077 if (!CheckStackOverflow()) {
1078 AstVisitor<AstGraphBuilder>::Visit(expr); 1078 VisitNoStackOverflowCheck(expr);
1079 } else { 1079 } else {
1080 ast_context()->ProduceValue(expr, jsgraph()->UndefinedConstant()); 1080 ast_context()->ProduceValue(expr, jsgraph()->UndefinedConstant());
1081 } 1081 }
1082 } 1082 }
1083 1083
1084 1084
1085 void AstGraphBuilder::VisitVariableDeclaration(VariableDeclaration* decl) { 1085 void AstGraphBuilder::VisitVariableDeclaration(VariableDeclaration* decl) {
1086 Variable* variable = decl->proxy()->var(); 1086 Variable* variable = decl->proxy()->var();
1087 switch (variable->location()) { 1087 switch (variable->location()) {
1088 case VariableLocation::GLOBAL: 1088 case VariableLocation::GLOBAL:
(...skipping 3241 matching lines...) Expand 10 before | Expand all | Expand 10 after
4330 // Phi does not exist yet, introduce one. 4330 // Phi does not exist yet, introduce one.
4331 value = NewPhi(inputs, value, control); 4331 value = NewPhi(inputs, value, control);
4332 value->ReplaceInput(inputs - 1, other); 4332 value->ReplaceInput(inputs - 1, other);
4333 } 4333 }
4334 return value; 4334 return value;
4335 } 4335 }
4336 4336
4337 } // namespace compiler 4337 } // namespace compiler
4338 } // namespace internal 4338 } // namespace internal
4339 } // namespace v8 4339 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/ast.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698