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 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1309 __ HeapConstant(isolate_->factory()->undefined_value()); | 1309 __ HeapConstant(isolate_->factory()->undefined_value()); |
1310 Node* index = __ BytecodeOperandIdx(0); | 1310 Node* index = __ BytecodeOperandIdx(0); |
1311 Node* constant = __ LoadConstantPoolEntry(index); | 1311 Node* constant = __ LoadConstantPoolEntry(index); |
1312 Node* relative_jump = __ SmiUntag(constant); | 1312 Node* relative_jump = __ SmiUntag(constant); |
1313 __ JumpIfWordEqual(accumulator, undefined_value, relative_jump); | 1313 __ JumpIfWordEqual(accumulator, undefined_value, relative_jump); |
1314 } | 1314 } |
1315 | 1315 |
1316 | 1316 |
1317 void Interpreter::DoCreateLiteral(Runtime::FunctionId function_id, | 1317 void Interpreter::DoCreateLiteral(Runtime::FunctionId function_id, |
1318 compiler::InterpreterAssembler* assembler) { | 1318 compiler::InterpreterAssembler* assembler) { |
1319 Node* constant_elements = __ GetAccumulator(); | 1319 Node* index = __ BytecodeOperandIdx(0); |
1320 Node* literal_index_raw = __ BytecodeOperandIdx(0); | 1320 Node* constant_elements = __ LoadConstantPoolEntry(index); |
| 1321 Node* literal_index_raw = __ BytecodeOperandIdx(1); |
1321 Node* literal_index = __ SmiTag(literal_index_raw); | 1322 Node* literal_index = __ SmiTag(literal_index_raw); |
1322 Node* flags_raw = __ BytecodeOperandImm(1); | 1323 Node* flags_raw = __ BytecodeOperandImm(2); |
1323 Node* flags = __ SmiTag(flags_raw); | 1324 Node* flags = __ SmiTag(flags_raw); |
1324 Node* closure = __ LoadRegister(Register::function_closure()); | 1325 Node* closure = __ LoadRegister(Register::function_closure()); |
1325 Node* result = __ CallRuntime(function_id, closure, literal_index, | 1326 Node* result = __ CallRuntime(function_id, closure, literal_index, |
1326 constant_elements, flags); | 1327 constant_elements, flags); |
1327 __ SetAccumulator(result); | 1328 __ SetAccumulator(result); |
1328 __ Dispatch(); | 1329 __ Dispatch(); |
1329 } | 1330 } |
1330 | 1331 |
1331 | 1332 |
1332 // CreateRegExpLiteral <idx> <flags> | 1333 // CreateRegExpLiteral <idx> <flags> |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1477 Node* cache_length = __ LoadFixedArrayElement(for_in_state, 3); | 1478 Node* cache_length = __ LoadFixedArrayElement(for_in_state, 3); |
1478 Node* result = __ CallRuntime(Runtime::kForInDone, index, cache_length); | 1479 Node* result = __ CallRuntime(Runtime::kForInDone, index, cache_length); |
1479 __ SetAccumulator(result); | 1480 __ SetAccumulator(result); |
1480 __ Dispatch(); | 1481 __ Dispatch(); |
1481 } | 1482 } |
1482 | 1483 |
1483 | 1484 |
1484 } // namespace interpreter | 1485 } // namespace interpreter |
1485 } // namespace internal | 1486 } // namespace internal |
1486 } // namespace v8 | 1487 } // namespace v8 |
OLD | NEW |