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

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: comments 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/compiler/bytecode-graph-builder.h ('k') | 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::VisitToName() {
1308 FrameStateBeforeAndAfter states(this); 1308 FrameStateBeforeAndAfter states(this);
1309 Node* node = NewNode(js_op, environment()->LookupAccumulator()); 1309 Node* value =
1310 NewNode(javascript()->ToName(), environment()->LookupAccumulator());
1311 environment()->BindRegister(bytecode_iterator().GetRegisterOperand(0), value,
1312 &states);
1313 }
1314
1315 void BytecodeGraphBuilder::VisitToObject() {
1316 FrameStateBeforeAndAfter states(this);
1317 Node* node =
1318 NewNode(javascript()->ToObject(), environment()->LookupAccumulator());
1310 environment()->BindAccumulator(node, &states); 1319 environment()->BindAccumulator(node, &states);
1311 } 1320 }
1312 1321
1313 void BytecodeGraphBuilder::VisitToName() {
1314 BuildCastOperator(javascript()->ToName());
1315 }
1316
1317 void BytecodeGraphBuilder::VisitToObject() {
1318 BuildCastOperator(javascript()->ToObject());
1319 }
1320
1321 void BytecodeGraphBuilder::VisitToNumber() { 1322 void BytecodeGraphBuilder::VisitToNumber() {
1322 FrameStateBeforeAndAfter states(this); 1323 FrameStateBeforeAndAfter states(this);
1323 Node* value = 1324 Node* value =
1324 NewNode(javascript()->ToNumber(), environment()->LookupAccumulator()); 1325 NewNode(javascript()->ToNumber(), environment()->LookupAccumulator());
1325 environment()->BindRegister(bytecode_iterator().GetRegisterOperand(0), value, 1326 environment()->BindRegister(bytecode_iterator().GetRegisterOperand(0), value,
1326 &states); 1327 &states);
1327 } 1328 }
1328 1329
1329 void BytecodeGraphBuilder::VisitJump() { BuildJump(); } 1330 void BytecodeGraphBuilder::VisitJump() { BuildJump(); }
1330 1331
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
1786 // Phi does not exist yet, introduce one. 1787 // Phi does not exist yet, introduce one.
1787 value = NewPhi(inputs, value, control); 1788 value = NewPhi(inputs, value, control);
1788 value->ReplaceInput(inputs - 1, other); 1789 value->ReplaceInput(inputs - 1, other);
1789 } 1790 }
1790 return value; 1791 return value;
1791 } 1792 }
1792 1793
1793 } // namespace compiler 1794 } // namespace compiler
1794 } // namespace internal 1795 } // namespace internal
1795 } // namespace v8 1796 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/bytecode-graph-builder.h ('k') | src/interpreter/bytecode-array-builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698