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

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

Issue 2446543002: [turbofan] Support variable size argument popping in TF-generated functions (Closed)
Patch Set: Fix bugs Created 4 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
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/bytecode-graph-builder.h" 5 #include "src/compiler/bytecode-graph-builder.h"
6 6
7 #include "src/ast/ast.h" 7 #include "src/ast/ast.h"
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/compilation-info.h" 9 #include "src/compilation-info.h"
10 #include "src/compiler/bytecode-branch-analysis.h" 10 #include "src/compiler/bytecode-branch-analysis.h"
(...skipping 1709 matching lines...) Expand 10 before | Expand all | Expand 10 after
1720 void BytecodeGraphBuilder::VisitJumpLoop() { BuildJump(); } 1720 void BytecodeGraphBuilder::VisitJumpLoop() { BuildJump(); }
1721 1721
1722 void BytecodeGraphBuilder::VisitStackCheck() { 1722 void BytecodeGraphBuilder::VisitStackCheck() {
1723 PrepareEagerCheckpoint(); 1723 PrepareEagerCheckpoint();
1724 Node* node = NewNode(javascript()->StackCheck()); 1724 Node* node = NewNode(javascript()->StackCheck());
1725 environment()->RecordAfterState(node, Environment::kAttachFrameState); 1725 environment()->RecordAfterState(node, Environment::kAttachFrameState);
1726 } 1726 }
1727 1727
1728 void BytecodeGraphBuilder::VisitReturn() { 1728 void BytecodeGraphBuilder::VisitReturn() {
1729 BuildLoopExitsForFunctionExit(); 1729 BuildLoopExitsForFunctionExit();
1730 Node* pop_node = graph()->NewNode(common()->Int32Constant(0));
Michael Starzinger 2016/10/28 14:12:14 nit: Likewise, please use jsgraph()->Int32Constant
danno 2016/10/31 10:06:39 Done.
1730 Node* control = 1731 Node* control =
1731 NewNode(common()->Return(), environment()->LookupAccumulator()); 1732 NewNode(common()->Return(), pop_node, environment()->LookupAccumulator());
1732 MergeControlToLeaveFunction(control); 1733 MergeControlToLeaveFunction(control);
1733 } 1734 }
1734 1735
1735 void BytecodeGraphBuilder::VisitDebugger() { 1736 void BytecodeGraphBuilder::VisitDebugger() {
1736 PrepareEagerCheckpoint(); 1737 PrepareEagerCheckpoint();
1737 Node* call = 1738 Node* call =
1738 NewNode(javascript()->CallRuntime(Runtime::kHandleDebuggerStatement)); 1739 NewNode(javascript()->CallRuntime(Runtime::kHandleDebuggerStatement));
1739 environment()->BindAccumulator(call, Environment::kAttachFrameState); 1740 environment()->BindAccumulator(call, Environment::kAttachFrameState);
1740 environment()->MarkAllRegistersLive(); 1741 environment()->MarkAllRegistersLive();
1741 } 1742 }
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
2198 source_positions_->set_current_position(it->source_position()); 2199 source_positions_->set_current_position(it->source_position());
2199 it->Advance(); 2200 it->Advance();
2200 } else { 2201 } else {
2201 DCHECK_GT(it->code_offset(), offset); 2202 DCHECK_GT(it->code_offset(), offset);
2202 } 2203 }
2203 } 2204 }
2204 2205
2205 } // namespace compiler 2206 } // namespace compiler
2206 } // namespace internal 2207 } // namespace internal
2207 } // namespace v8 2208 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698