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

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

Issue 2113893004: [turbofan] Fix eager bailout point after comma expression. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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 | test/mjsunit/regress/regress-crbug-624919.js » ('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/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 3034 matching lines...) Expand 10 before | Expand all | Expand 10 after
3045 // sync with full codegen which doesn't prepare the proper bailout point (see 3045 // sync with full codegen which doesn't prepare the proper bailout point (see
3046 // the implementation of FullCodeGenerator::VisitForControl). 3046 // the implementation of FullCodeGenerator::VisitForControl).
3047 if (ast_context()->IsTest()) return environment()->Push(value); 3047 if (ast_context()->IsTest()) return environment()->Push(value);
3048 ast_context()->ProduceValue(expr, value); 3048 ast_context()->ProduceValue(expr, value);
3049 } 3049 }
3050 3050
3051 3051
3052 void AstGraphBuilder::VisitComma(BinaryOperation* expr) { 3052 void AstGraphBuilder::VisitComma(BinaryOperation* expr) {
3053 VisitForEffect(expr->left()); 3053 VisitForEffect(expr->left());
3054 Visit(expr->right()); 3054 Visit(expr->right());
3055 // Skip plugging AST evaluation contexts of the test kind. This is to stay in
3056 // sync with full codegen which doesn't prepare the proper bailout point (see
3057 // the implementation of FullCodeGenerator::VisitForControl).
3058 if (ast_context()->IsTest()) return;
3055 ast_context()->ReplaceValue(expr); 3059 ast_context()->ReplaceValue(expr);
3056 } 3060 }
3057 3061
3058 3062
3059 void AstGraphBuilder::VisitLogicalExpression(BinaryOperation* expr) { 3063 void AstGraphBuilder::VisitLogicalExpression(BinaryOperation* expr) {
3060 bool is_logical_and = expr->op() == Token::AND; 3064 bool is_logical_and = expr->op() == Token::AND;
3061 IfBuilder compare_if(this); 3065 IfBuilder compare_if(this);
3062 // Only use an AST evaluation context of the value kind when this expression 3066 // Only use an AST evaluation context of the value kind when this expression
3063 // is evaluated as value as well. Otherwise stick to a test context which is 3067 // is evaluated as value as well. Otherwise stick to a test context which is
3064 // in sync with full codegen (see FullCodeGenerator::VisitLogicalExpression). 3068 // in sync with full codegen (see FullCodeGenerator::VisitLogicalExpression).
(...skipping 1302 matching lines...) Expand 10 before | Expand all | Expand 10 after
4367 // Phi does not exist yet, introduce one. 4371 // Phi does not exist yet, introduce one.
4368 value = NewPhi(inputs, value, control); 4372 value = NewPhi(inputs, value, control);
4369 value->ReplaceInput(inputs - 1, other); 4373 value->ReplaceInput(inputs - 1, other);
4370 } 4374 }
4371 return value; 4375 return value;
4372 } 4376 }
4373 4377
4374 } // namespace compiler 4378 } // namespace compiler
4375 } // namespace internal 4379 } // namespace internal
4376 } // namespace v8 4380 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-624919.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698