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/ast/prettyprinter.h" | 7 #include "src/ast/prettyprinter.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/compiler.h" | 9 #include "src/compiler.h" |
10 #include "src/factory.h" | 10 #include "src/factory.h" |
(...skipping 1187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1198 // accumulator. | 1198 // accumulator. |
1199 void Interpreter::DoTestNotEqualStrict(InterpreterAssembler* assembler) { | 1199 void Interpreter::DoTestNotEqualStrict(InterpreterAssembler* assembler) { |
1200 DoBinaryOp(CodeFactory::StrictNotEqual(isolate_), assembler); | 1200 DoBinaryOp(CodeFactory::StrictNotEqual(isolate_), assembler); |
1201 } | 1201 } |
1202 | 1202 |
1203 | 1203 |
1204 // TestLessThan <src> | 1204 // TestLessThan <src> |
1205 // | 1205 // |
1206 // Test if the value in the <src> register is less than the accumulator. | 1206 // Test if the value in the <src> register is less than the accumulator. |
1207 void Interpreter::DoTestLessThan(InterpreterAssembler* assembler) { | 1207 void Interpreter::DoTestLessThan(InterpreterAssembler* assembler) { |
1208 DoBinaryOp(Runtime::kLessThan, assembler); | 1208 DoBinaryOp(CodeFactory::LessThan(isolate_), assembler); |
1209 } | 1209 } |
1210 | 1210 |
1211 | 1211 |
1212 // TestGreaterThan <src> | 1212 // TestGreaterThan <src> |
1213 // | 1213 // |
1214 // Test if the value in the <src> register is greater than the accumulator. | 1214 // Test if the value in the <src> register is greater than the accumulator. |
1215 void Interpreter::DoTestGreaterThan(InterpreterAssembler* assembler) { | 1215 void Interpreter::DoTestGreaterThan(InterpreterAssembler* assembler) { |
1216 DoBinaryOp(Runtime::kGreaterThan, assembler); | 1216 DoBinaryOp(CodeFactory::GreaterThan(isolate_), assembler); |
1217 } | 1217 } |
1218 | 1218 |
1219 | 1219 |
1220 // TestLessThanOrEqual <src> | 1220 // TestLessThanOrEqual <src> |
1221 // | 1221 // |
1222 // Test if the value in the <src> register is less than or equal to the | 1222 // Test if the value in the <src> register is less than or equal to the |
1223 // accumulator. | 1223 // accumulator. |
1224 void Interpreter::DoTestLessThanOrEqual(InterpreterAssembler* assembler) { | 1224 void Interpreter::DoTestLessThanOrEqual(InterpreterAssembler* assembler) { |
1225 DoBinaryOp(Runtime::kLessThanOrEqual, assembler); | 1225 DoBinaryOp(CodeFactory::LessThanOrEqual(isolate_), assembler); |
1226 } | 1226 } |
1227 | 1227 |
1228 | 1228 |
1229 // TestGreaterThanOrEqual <src> | 1229 // TestGreaterThanOrEqual <src> |
1230 // | 1230 // |
1231 // Test if the value in the <src> register is greater than or equal to the | 1231 // Test if the value in the <src> register is greater than or equal to the |
1232 // accumulator. | 1232 // accumulator. |
1233 void Interpreter::DoTestGreaterThanOrEqual(InterpreterAssembler* assembler) { | 1233 void Interpreter::DoTestGreaterThanOrEqual(InterpreterAssembler* assembler) { |
1234 DoBinaryOp(Runtime::kGreaterThanOrEqual, assembler); | 1234 DoBinaryOp(CodeFactory::GreaterThanOrEqual(isolate_), assembler); |
1235 } | 1235 } |
1236 | 1236 |
1237 | 1237 |
1238 // TestIn <src> | 1238 // TestIn <src> |
1239 // | 1239 // |
1240 // Test if the object referenced by the register operand is a property of the | 1240 // Test if the object referenced by the register operand is a property of the |
1241 // object referenced by the accumulator. | 1241 // object referenced by the accumulator. |
1242 void Interpreter::DoTestIn(InterpreterAssembler* assembler) { | 1242 void Interpreter::DoTestIn(InterpreterAssembler* assembler) { |
1243 DoBinaryOp(Runtime::kHasProperty, assembler); | 1243 DoBinaryOp(Runtime::kHasProperty, assembler); |
1244 } | 1244 } |
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1913 Node* index = __ LoadRegister(index_reg); | 1913 Node* index = __ LoadRegister(index_reg); |
1914 Node* one = __ SmiConstant(Smi::FromInt(1)); | 1914 Node* one = __ SmiConstant(Smi::FromInt(1)); |
1915 Node* result = __ SmiAdd(index, one); | 1915 Node* result = __ SmiAdd(index, one); |
1916 __ SetAccumulator(result); | 1916 __ SetAccumulator(result); |
1917 __ Dispatch(); | 1917 __ Dispatch(); |
1918 } | 1918 } |
1919 | 1919 |
1920 } // namespace interpreter | 1920 } // namespace interpreter |
1921 } // namespace internal | 1921 } // namespace internal |
1922 } // namespace v8 | 1922 } // namespace v8 |
OLD | NEW |