| 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 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1137 // | 1137 // |
| 1138 void Interpreter::DoNewWide(InterpreterAssembler* assembler) { | 1138 void Interpreter::DoNewWide(InterpreterAssembler* assembler) { |
| 1139 DoCallConstruct(assembler); | 1139 DoCallConstruct(assembler); |
| 1140 } | 1140 } |
| 1141 | 1141 |
| 1142 | 1142 |
| 1143 // TestEqual <src> | 1143 // TestEqual <src> |
| 1144 // | 1144 // |
| 1145 // Test if the value in the <src> register equals the accumulator. | 1145 // Test if the value in the <src> register equals the accumulator. |
| 1146 void Interpreter::DoTestEqual(InterpreterAssembler* assembler) { | 1146 void Interpreter::DoTestEqual(InterpreterAssembler* assembler) { |
| 1147 DoBinaryOp(Runtime::kEquals, assembler); | 1147 DoBinaryOp(Runtime::kEqual, assembler); |
| 1148 } | 1148 } |
| 1149 | 1149 |
| 1150 | 1150 |
| 1151 // TestNotEqual <src> | 1151 // TestNotEqual <src> |
| 1152 // | 1152 // |
| 1153 // Test if the value in the <src> register is not equal to the accumulator. | 1153 // Test if the value in the <src> register is not equal to the accumulator. |
| 1154 void Interpreter::DoTestNotEqual(InterpreterAssembler* assembler) { | 1154 void Interpreter::DoTestNotEqual(InterpreterAssembler* assembler) { |
| 1155 DoBinaryOp(Runtime::kNotEquals, assembler); | 1155 DoBinaryOp(Runtime::kNotEqual, assembler); |
| 1156 } | 1156 } |
| 1157 | 1157 |
| 1158 | 1158 |
| 1159 // TestEqualStrict <src> | 1159 // TestEqualStrict <src> |
| 1160 // | 1160 // |
| 1161 // Test if the value in the <src> register is strictly equal to the accumulator. | 1161 // Test if the value in the <src> register is strictly equal to the accumulator. |
| 1162 void Interpreter::DoTestEqualStrict(InterpreterAssembler* assembler) { | 1162 void Interpreter::DoTestEqualStrict(InterpreterAssembler* assembler) { |
| 1163 DoBinaryOp(Runtime::kStrictEquals, assembler); | 1163 DoBinaryOp(Runtime::kStrictEqual, assembler); |
| 1164 } | 1164 } |
| 1165 | 1165 |
| 1166 | 1166 |
| 1167 // TestNotEqualStrict <src> | 1167 // TestNotEqualStrict <src> |
| 1168 // | 1168 // |
| 1169 // Test if the value in the <src> register is not strictly equal to the | 1169 // Test if the value in the <src> register is not strictly equal to the |
| 1170 // accumulator. | 1170 // accumulator. |
| 1171 void Interpreter::DoTestNotEqualStrict(InterpreterAssembler* assembler) { | 1171 void Interpreter::DoTestNotEqualStrict(InterpreterAssembler* assembler) { |
| 1172 DoBinaryOp(Runtime::kStrictNotEquals, assembler); | 1172 DoBinaryOp(Runtime::kStrictNotEqual, assembler); |
| 1173 } | 1173 } |
| 1174 | 1174 |
| 1175 | 1175 |
| 1176 // TestLessThan <src> | 1176 // TestLessThan <src> |
| 1177 // | 1177 // |
| 1178 // Test if the value in the <src> register is less than the accumulator. | 1178 // Test if the value in the <src> register is less than the accumulator. |
| 1179 void Interpreter::DoTestLessThan(InterpreterAssembler* assembler) { | 1179 void Interpreter::DoTestLessThan(InterpreterAssembler* assembler) { |
| 1180 DoBinaryOp(Runtime::kInterpreterLessThan, assembler); | 1180 DoBinaryOp(Runtime::kLessThan, assembler); |
| 1181 } | 1181 } |
| 1182 | 1182 |
| 1183 | 1183 |
| 1184 // TestGreaterThan <src> | 1184 // TestGreaterThan <src> |
| 1185 // | 1185 // |
| 1186 // Test if the value in the <src> register is greater than the accumulator. | 1186 // Test if the value in the <src> register is greater than the accumulator. |
| 1187 void Interpreter::DoTestGreaterThan(InterpreterAssembler* assembler) { | 1187 void Interpreter::DoTestGreaterThan(InterpreterAssembler* assembler) { |
| 1188 DoBinaryOp(Runtime::kInterpreterGreaterThan, assembler); | 1188 DoBinaryOp(Runtime::kGreaterThan, assembler); |
| 1189 } | 1189 } |
| 1190 | 1190 |
| 1191 | 1191 |
| 1192 // TestLessThanOrEqual <src> | 1192 // TestLessThanOrEqual <src> |
| 1193 // | 1193 // |
| 1194 // Test if the value in the <src> register is less than or equal to the | 1194 // Test if the value in the <src> register is less than or equal to the |
| 1195 // accumulator. | 1195 // accumulator. |
| 1196 void Interpreter::DoTestLessThanOrEqual(InterpreterAssembler* assembler) { | 1196 void Interpreter::DoTestLessThanOrEqual(InterpreterAssembler* assembler) { |
| 1197 DoBinaryOp(Runtime::kInterpreterLessThanOrEqual, assembler); | 1197 DoBinaryOp(Runtime::kLessThanOrEqual, assembler); |
| 1198 } | 1198 } |
| 1199 | 1199 |
| 1200 | 1200 |
| 1201 // TestGreaterThanOrEqual <src> | 1201 // TestGreaterThanOrEqual <src> |
| 1202 // | 1202 // |
| 1203 // Test if the value in the <src> register is greater than or equal to the | 1203 // Test if the value in the <src> register is greater than or equal to the |
| 1204 // accumulator. | 1204 // accumulator. |
| 1205 void Interpreter::DoTestGreaterThanOrEqual(InterpreterAssembler* assembler) { | 1205 void Interpreter::DoTestGreaterThanOrEqual(InterpreterAssembler* assembler) { |
| 1206 DoBinaryOp(Runtime::kInterpreterGreaterThanOrEqual, assembler); | 1206 DoBinaryOp(Runtime::kGreaterThanOrEqual, assembler); |
| 1207 } | 1207 } |
| 1208 | 1208 |
| 1209 | 1209 |
| 1210 // TestIn <src> | 1210 // TestIn <src> |
| 1211 // | 1211 // |
| 1212 // Test if the object referenced by the register operand is a property of the | 1212 // Test if the object referenced by the register operand is a property of the |
| 1213 // object referenced by the accumulator. | 1213 // object referenced by the accumulator. |
| 1214 void Interpreter::DoTestIn(InterpreterAssembler* assembler) { | 1214 void Interpreter::DoTestIn(InterpreterAssembler* assembler) { |
| 1215 DoBinaryOp(Runtime::kHasProperty, assembler); | 1215 DoBinaryOp(Runtime::kHasProperty, assembler); |
| 1216 } | 1216 } |
| (...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1850 Node* index = __ LoadRegister(index_reg); | 1850 Node* index = __ LoadRegister(index_reg); |
| 1851 Node* one = __ SmiConstant(Smi::FromInt(1)); | 1851 Node* one = __ SmiConstant(Smi::FromInt(1)); |
| 1852 Node* result = __ SmiAdd(index, one); | 1852 Node* result = __ SmiAdd(index, one); |
| 1853 __ SetAccumulator(result); | 1853 __ SetAccumulator(result); |
| 1854 __ Dispatch(); | 1854 __ Dispatch(); |
| 1855 } | 1855 } |
| 1856 | 1856 |
| 1857 } // namespace interpreter | 1857 } // namespace interpreter |
| 1858 } // namespace internal | 1858 } // namespace internal |
| 1859 } // namespace v8 | 1859 } // namespace v8 |
| OLD | NEW |