| 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 "src/code-factory.h" | 7 #include "src/code-factory.h" |
| 8 #include "src/compiler.h" | 8 #include "src/compiler.h" |
| 9 #include "src/compiler/interpreter-assembler.h" | 9 #include "src/compiler/interpreter-assembler.h" |
| 10 #include "src/factory.h" | 10 #include "src/factory.h" |
| (...skipping 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1067 | 1067 |
| 1068 // TestInstanceOf <src> | 1068 // TestInstanceOf <src> |
| 1069 // | 1069 // |
| 1070 // Test if the object referenced by the <src> register is an an instance of type | 1070 // Test if the object referenced by the <src> register is an an instance of type |
| 1071 // referenced by the accumulator. | 1071 // referenced by the accumulator. |
| 1072 void Interpreter::DoTestInstanceOf(compiler::InterpreterAssembler* assembler) { | 1072 void Interpreter::DoTestInstanceOf(compiler::InterpreterAssembler* assembler) { |
| 1073 DoBinaryOp(Runtime::kInstanceOf, assembler); | 1073 DoBinaryOp(Runtime::kInstanceOf, assembler); |
| 1074 } | 1074 } |
| 1075 | 1075 |
| 1076 | 1076 |
| 1077 // ToBoolean | |
| 1078 // | |
| 1079 // Cast the object referenced by the accumulator to a boolean. | |
| 1080 void Interpreter::DoToBoolean(compiler::InterpreterAssembler* assembler) { | |
| 1081 Node* accumulator = __ GetAccumulator(); | |
| 1082 Node* result = __ CallRuntime(Runtime::kInterpreterToBoolean, accumulator); | |
| 1083 __ SetAccumulator(result); | |
| 1084 __ Dispatch(); | |
| 1085 } | |
| 1086 | |
| 1087 | |
| 1088 // ToName | 1077 // ToName |
| 1089 // | 1078 // |
| 1090 // Cast the object referenced by the accumulator to a name. | 1079 // Cast the object referenced by the accumulator to a name. |
| 1091 void Interpreter::DoToName(compiler::InterpreterAssembler* assembler) { | 1080 void Interpreter::DoToName(compiler::InterpreterAssembler* assembler) { |
| 1092 Node* accumulator = __ GetAccumulator(); | 1081 Node* accumulator = __ GetAccumulator(); |
| 1093 Node* result = __ CallRuntime(Runtime::kToName, accumulator); | 1082 Node* result = __ CallRuntime(Runtime::kToName, accumulator); |
| 1094 __ SetAccumulator(result); | 1083 __ SetAccumulator(result); |
| 1095 __ Dispatch(); | 1084 __ Dispatch(); |
| 1096 } | 1085 } |
| 1097 | 1086 |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1477 Node* cache_length = __ LoadFixedArrayElement(for_in_state, 3); | 1466 Node* cache_length = __ LoadFixedArrayElement(for_in_state, 3); |
| 1478 Node* result = __ CallRuntime(Runtime::kForInDone, index, cache_length); | 1467 Node* result = __ CallRuntime(Runtime::kForInDone, index, cache_length); |
| 1479 __ SetAccumulator(result); | 1468 __ SetAccumulator(result); |
| 1480 __ Dispatch(); | 1469 __ Dispatch(); |
| 1481 } | 1470 } |
| 1482 | 1471 |
| 1483 | 1472 |
| 1484 } // namespace interpreter | 1473 } // namespace interpreter |
| 1485 } // namespace internal | 1474 } // namespace internal |
| 1486 } // namespace v8 | 1475 } // namespace v8 |
| OLD | NEW |