Index: src/interpreter/interpreter.cc |
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc |
index dcd3c44e5473c18fc2343b8d1d6a2994c8bceb27..6a54d186ca1c2215df4066aeb128ba58de7a433b 100644 |
--- a/src/interpreter/interpreter.cc |
+++ b/src/interpreter/interpreter.cc |
@@ -334,6 +334,29 @@ void Interpreter::DoMod(compiler::InterpreterAssembler* assembler) { |
} |
+// LogicalNot |
+// |
+// Perform logical-not on the accumulator, first casting the |
+// accumulator to a boolean value if required. |
+void Interpreter::DoLogicalNot(compiler::InterpreterAssembler* assembler) { |
+ Node* accumulator = __ GetAccumulator(); |
+ Node* result = __ CallRuntime(Runtime::kInterpreterLogicalNot, accumulator); |
+ __ SetAccumulator(result); |
+ __ Dispatch(); |
+} |
+ |
+ |
+// TypeOf |
+// |
+// Load accumulator with string representating type of object in accumulator. |
rmcilroy
2015/10/06 10:39:15
nit - a string representation of the type of the o
oth
2015/10/06 12:35:06
Done, and added the definite and indefinite articl
|
+void Interpreter::DoTypeOf(compiler::InterpreterAssembler* assembler) { |
+ Node* accumulator = __ GetAccumulator(); |
+ Node* result = __ CallRuntime(Runtime::kInterpreterTypeOf, accumulator); |
+ __ SetAccumulator(result); |
+ __ Dispatch(); |
+} |
+ |
+ |
// Call <callable> <receiver> <arg_count> |
// |
// Call a JSfunction or Callable in |callable| with receiver and |arg_count| |
@@ -457,8 +480,9 @@ void Interpreter::DoTestInstanceOf(compiler::InterpreterAssembler* assembler) { |
// |
// Cast the object referenced by the accumulator to a boolean. |
void Interpreter::DoToBoolean(compiler::InterpreterAssembler* assembler) { |
- // TODO(oth): The next CL for test operations has interpreter specific |
- // runtime calls. This looks like another candidate. |
rmcilroy
2015/10/06 10:39:15
Looks like you aren't rebased on master - this cha
oth
2015/10/06 12:35:06
Acknowledged.
|
+ Node* accumulator = __ GetAccumulator(); |
+ Node* result = __ CallRuntime(Runtime::kInterpreterToBoolean, accumulator); |
+ __ SetAccumulator(result); |
__ Dispatch(); |
} |