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

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

Issue 2169813002: [interpreter] Add output register to ToName (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@addregouts
Patch Set: fix unittests 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 | src/interpreter/bytecode-array-builder.h » ('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 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/compiler/bytecode-branch-analysis.h" 7 #include "src/compiler/bytecode-branch-analysis.h"
8 #include "src/compiler/linkage.h" 8 #include "src/compiler/linkage.h"
9 #include "src/compiler/operator-properties.h" 9 #include "src/compiler/operator-properties.h"
10 #include "src/interpreter/bytecodes.h" 10 #include "src/interpreter/bytecodes.h"
(...skipping 1286 matching lines...) Expand 10 before | Expand all | Expand 10 after
1297 } 1297 }
1298 1298
1299 void BytecodeGraphBuilder::VisitTestIn() { 1299 void BytecodeGraphBuilder::VisitTestIn() {
1300 BuildCompareOp(javascript()->HasProperty()); 1300 BuildCompareOp(javascript()->HasProperty());
1301 } 1301 }
1302 1302
1303 void BytecodeGraphBuilder::VisitTestInstanceOf() { 1303 void BytecodeGraphBuilder::VisitTestInstanceOf() {
1304 BuildCompareOp(javascript()->InstanceOf()); 1304 BuildCompareOp(javascript()->InstanceOf());
1305 } 1305 }
1306 1306
1307 void BytecodeGraphBuilder::BuildCastOperator(const Operator* js_op) { 1307 void BytecodeGraphBuilder::BuildCastOperator(const Operator* js_op) {
Michael Starzinger 2016/07/22 10:36:05 nit: By now the "BuildCastOperator" isn't very hel
klaasb 2016/07/22 11:00:49 Sure, done.
1308 FrameStateBeforeAndAfter states(this); 1308 FrameStateBeforeAndAfter states(this);
1309 Node* node = NewNode(js_op, environment()->LookupAccumulator()); 1309 Node* node = NewNode(js_op, environment()->LookupAccumulator());
1310 environment()->BindAccumulator(node, &states); 1310 environment()->BindAccumulator(node, &states);
1311 } 1311 }
1312 1312
1313 void BytecodeGraphBuilder::VisitToName() { 1313 void BytecodeGraphBuilder::VisitToName() {
1314 BuildCastOperator(javascript()->ToName()); 1314 FrameStateBeforeAndAfter states(this);
1315 Node* value =
1316 NewNode(javascript()->ToName(), environment()->LookupAccumulator());
1317 environment()->BindRegister(bytecode_iterator().GetRegisterOperand(0), value,
1318 &states);
1315 } 1319 }
1316 1320
1317 void BytecodeGraphBuilder::VisitToObject() { 1321 void BytecodeGraphBuilder::VisitToObject() {
1318 BuildCastOperator(javascript()->ToObject()); 1322 BuildCastOperator(javascript()->ToObject());
1319 } 1323 }
1320 1324
1321 void BytecodeGraphBuilder::VisitToNumber() { 1325 void BytecodeGraphBuilder::VisitToNumber() {
1322 FrameStateBeforeAndAfter states(this); 1326 FrameStateBeforeAndAfter states(this);
1323 Node* value = 1327 Node* value =
1324 NewNode(javascript()->ToNumber(), environment()->LookupAccumulator()); 1328 NewNode(javascript()->ToNumber(), environment()->LookupAccumulator());
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
1788 // Phi does not exist yet, introduce one. 1792 // Phi does not exist yet, introduce one.
1789 value = NewPhi(inputs, value, control); 1793 value = NewPhi(inputs, value, control);
1790 value->ReplaceInput(inputs - 1, other); 1794 value->ReplaceInput(inputs - 1, other);
1791 } 1795 }
1792 return value; 1796 return value;
1793 } 1797 }
1794 1798
1795 } // namespace compiler 1799 } // namespace compiler
1796 } // namespace internal 1800 } // namespace internal
1797 } // namespace v8 1801 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/interpreter/bytecode-array-builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698