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

Side by Side Diff: src/interpreter/interpreter.cc

Issue 2327703003: [builtins] Migrate ToNumber to TurboFan. (Closed)
Patch Set: Created 4 years, 3 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
« src/code-stub-assembler.cc ('K') | « src/compiler/code-assembler.h ('k') | no next file » | 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/interpreter/interpreter.h" 5 #include "src/interpreter/interpreter.h"
6 6
7 #include <fstream> 7 #include <fstream>
8 #include <memory> 8 #include <memory>
9 9
10 #include "src/ast/prettyprinter.h" 10 #include "src/ast/prettyprinter.h"
(...skipping 1294 matching lines...) Expand 10 before | Expand all | Expand 10 after
1305 void Interpreter::DoToName(InterpreterAssembler* assembler) { 1305 void Interpreter::DoToName(InterpreterAssembler* assembler) {
1306 Node* result = BuildUnaryOp(CodeFactory::ToName(isolate_), assembler); 1306 Node* result = BuildUnaryOp(CodeFactory::ToName(isolate_), assembler);
1307 __ StoreRegister(result, __ BytecodeOperandReg(0)); 1307 __ StoreRegister(result, __ BytecodeOperandReg(0));
1308 __ Dispatch(); 1308 __ Dispatch();
1309 } 1309 }
1310 1310
1311 // ToNumber 1311 // ToNumber
1312 // 1312 //
1313 // Convert the object referenced by the accumulator to a number. 1313 // Convert the object referenced by the accumulator to a number.
1314 void Interpreter::DoToNumber(InterpreterAssembler* assembler) { 1314 void Interpreter::DoToNumber(InterpreterAssembler* assembler) {
1315 Node* result = BuildUnaryOp(CodeFactory::ToNumber(isolate_), assembler); 1315 Node* accumulator = __ GetAccumulator();
rmcilroy 2016/09/09 11:03:17 /s/accumulator/object
1316 Node* context = __ GetContext();
1317 Node* result = assembler->ToNumber(context, accumulator);
rmcilroy 2016/09/09 11:03:17 /s/assembler->/__
1316 __ StoreRegister(result, __ BytecodeOperandReg(0)); 1318 __ StoreRegister(result, __ BytecodeOperandReg(0));
1317 __ Dispatch(); 1319 __ Dispatch();
1318 } 1320 }
1319 1321
1320 // ToObject 1322 // ToObject
1321 // 1323 //
1322 // Convert the object referenced by the accumulator to a JSReceiver. 1324 // Convert the object referenced by the accumulator to a JSReceiver.
1323 void Interpreter::DoToObject(InterpreterAssembler* assembler) { 1325 void Interpreter::DoToObject(InterpreterAssembler* assembler) {
1324 Node* result = BuildUnaryOp(CodeFactory::ToObject(isolate_), assembler); 1326 Node* result = BuildUnaryOp(CodeFactory::ToObject(isolate_), assembler);
1325 __ StoreRegister(result, __ BytecodeOperandReg(0)); 1327 __ StoreRegister(result, __ BytecodeOperandReg(0));
(...skipping 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after
2452 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, 2454 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset,
2453 __ SmiTag(new_state)); 2455 __ SmiTag(new_state));
2454 __ SetAccumulator(old_state); 2456 __ SetAccumulator(old_state);
2455 2457
2456 __ Dispatch(); 2458 __ Dispatch();
2457 } 2459 }
2458 2460
2459 } // namespace interpreter 2461 } // namespace interpreter
2460 } // namespace internal 2462 } // namespace internal
2461 } // namespace v8 2463 } // namespace v8
OLDNEW
« src/code-stub-assembler.cc ('K') | « src/compiler/code-assembler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698