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

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

Issue 1430483002: [turbofan] Fix OSR-ed callee trigged ty do-expressions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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-546968.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/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/linkage.h" 10 #include "src/compiler/linkage.h"
(...skipping 1639 matching lines...) Expand 10 before | Expand all | Expand 10 after
1650 1650
1651 1651
1652 void AstGraphBuilder::VisitNativeFunctionLiteral(NativeFunctionLiteral* expr) { 1652 void AstGraphBuilder::VisitNativeFunctionLiteral(NativeFunctionLiteral* expr) {
1653 UNREACHABLE(); 1653 UNREACHABLE();
1654 } 1654 }
1655 1655
1656 1656
1657 void AstGraphBuilder::VisitDoExpression(DoExpression* expr) { 1657 void AstGraphBuilder::VisitDoExpression(DoExpression* expr) {
1658 VisitBlock(expr->block()); 1658 VisitBlock(expr->block());
1659 VisitVariableProxy(expr->result()); 1659 VisitVariableProxy(expr->result());
1660 ast_context()->ReplaceValue();
caitp (gmail) 2015/10/27 17:19:05 Question: why does this matter? It looks like it j
1660 } 1661 }
1661 1662
1662 1663
1663 void AstGraphBuilder::VisitConditional(Conditional* expr) { 1664 void AstGraphBuilder::VisitConditional(Conditional* expr) {
1664 IfBuilder compare_if(this); 1665 IfBuilder compare_if(this);
1665 VisitForTest(expr->condition()); 1666 VisitForTest(expr->condition());
1666 Node* condition = environment()->Pop(); 1667 Node* condition = environment()->Pop();
1667 compare_if.If(condition); 1668 compare_if.If(condition);
1668 compare_if.Then(); 1669 compare_if.Then();
1669 Visit(expr->then_expression()); 1670 Visit(expr->then_expression());
(...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after
2452 2453
2453 // Patch callee on the environment. 2454 // Patch callee on the environment.
2454 environment()->Poke(arg_count + 1, new_callee); 2455 environment()->Poke(arg_count + 1, new_callee);
2455 } 2456 }
2456 2457
2457 // Create node to perform the function call. 2458 // Create node to perform the function call.
2458 VectorSlotPair feedback = CreateVectorSlotPair(expr->CallFeedbackICSlot()); 2459 VectorSlotPair feedback = CreateVectorSlotPair(expr->CallFeedbackICSlot());
2459 const Operator* call = javascript()->CallFunction(args->length() + 2, flags, 2460 const Operator* call = javascript()->CallFunction(args->length() + 2, flags,
2460 language_mode(), feedback); 2461 language_mode(), feedback);
2461 Node* value = ProcessArguments(call, args->length() + 2); 2462 Node* value = ProcessArguments(call, args->length() + 2);
2462 environment()->Push(callee_value); 2463 environment()->Push(value->InputAt(0)); // The callee passed to the call.
2463 PrepareFrameState(value, expr->ReturnId(), OutputFrameStateCombine::Push()); 2464 PrepareFrameState(value, expr->ReturnId(), OutputFrameStateCombine::Push());
2464 environment()->Drop(1); 2465 environment()->Drop(1);
2465 ast_context()->ProduceValue(value); 2466 ast_context()->ProduceValue(value);
2466 } 2467 }
2467 2468
2468 2469
2469 void AstGraphBuilder::VisitCallSuper(Call* expr) { 2470 void AstGraphBuilder::VisitCallSuper(Call* expr) {
2470 SuperCallReference* super = expr->expression()->AsSuperCallReference(); 2471 SuperCallReference* super = expr->expression()->AsSuperCallReference();
2471 DCHECK_NOT_NULL(super); 2472 DCHECK_NOT_NULL(super);
2472 2473
(...skipping 1749 matching lines...) Expand 10 before | Expand all | Expand 10 after
4222 // Phi does not exist yet, introduce one. 4223 // Phi does not exist yet, introduce one.
4223 value = NewPhi(inputs, value, control); 4224 value = NewPhi(inputs, value, control);
4224 value->ReplaceInput(inputs - 1, other); 4225 value->ReplaceInput(inputs - 1, other);
4225 } 4226 }
4226 return value; 4227 return value;
4227 } 4228 }
4228 4229
4229 } // namespace compiler 4230 } // namespace compiler
4230 } // namespace internal 4231 } // namespace internal
4231 } // namespace v8 4232 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-546968.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698