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

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

Issue 2165953002: [interpreter] Add a register operand to ToNumber (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: comments 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 1301 matching lines...) Expand 10 before | Expand all | Expand 10 after
1312 1312
1313 void BytecodeGraphBuilder::VisitToName() { 1313 void BytecodeGraphBuilder::VisitToName() {
1314 BuildCastOperator(javascript()->ToName()); 1314 BuildCastOperator(javascript()->ToName());
1315 } 1315 }
1316 1316
1317 void BytecodeGraphBuilder::VisitToObject() { 1317 void BytecodeGraphBuilder::VisitToObject() {
1318 BuildCastOperator(javascript()->ToObject()); 1318 BuildCastOperator(javascript()->ToObject());
1319 } 1319 }
1320 1320
1321 void BytecodeGraphBuilder::VisitToNumber() { 1321 void BytecodeGraphBuilder::VisitToNumber() {
1322 BuildCastOperator(javascript()->ToNumber()); 1322 FrameStateBeforeAndAfter states(this);
1323 Node* value =
1324 NewNode(javascript()->ToNumber(), environment()->LookupAccumulator());
1325 environment()->BindRegister(bytecode_iterator().GetRegisterOperand(0), value,
1326 &states);
1323 } 1327 }
1324 1328
1325 void BytecodeGraphBuilder::VisitJump() { BuildJump(); } 1329 void BytecodeGraphBuilder::VisitJump() { BuildJump(); }
1326 1330
1327 void BytecodeGraphBuilder::VisitJumpConstant() { BuildJump(); } 1331 void BytecodeGraphBuilder::VisitJumpConstant() { BuildJump(); }
1328 1332
1329 1333
1330 void BytecodeGraphBuilder::VisitJumpIfTrue() { 1334 void BytecodeGraphBuilder::VisitJumpIfTrue() {
1331 BuildJumpIfEqual(jsgraph()->TrueConstant()); 1335 BuildJumpIfEqual(jsgraph()->TrueConstant());
1332 } 1336 }
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
1784 // Phi does not exist yet, introduce one. 1788 // Phi does not exist yet, introduce one.
1785 value = NewPhi(inputs, value, control); 1789 value = NewPhi(inputs, value, control);
1786 value->ReplaceInput(inputs - 1, other); 1790 value->ReplaceInput(inputs - 1, other);
1787 } 1791 }
1788 return value; 1792 return value;
1789 } 1793 }
1790 1794
1791 } // namespace compiler 1795 } // namespace compiler
1792 } // namespace internal 1796 } // namespace internal
1793 } // namespace v8 1797 } // 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