Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 |
| OLD | NEW |