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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
194 // | 194 // |
195 // Store accumulator to register <dst>. | 195 // Store accumulator to register <dst>. |
196 void Interpreter::DoStar(compiler::InterpreterAssembler* assembler) { | 196 void Interpreter::DoStar(compiler::InterpreterAssembler* assembler) { |
197 Node* reg_index = __ BytecodeOperandReg(0); | 197 Node* reg_index = __ BytecodeOperandReg(0); |
198 Node* accumulator = __ GetAccumulator(); | 198 Node* accumulator = __ GetAccumulator(); |
199 __ StoreRegister(accumulator, reg_index); | 199 __ StoreRegister(accumulator, reg_index); |
200 __ Dispatch(); | 200 __ Dispatch(); |
201 } | 201 } |
202 | 202 |
203 | 203 |
204 // Exchange <reg8> <reg16> | |
205 // | |
206 // Exchange two registers. | |
207 void Interpreter::DoExchange(compiler::InterpreterAssembler* assembler) { | |
208 Node* r0 = __ BytecodeOperandReg(0); | |
209 Node* r1 = __ BytecodeOperandReg(1); | |
210 Node* v0 = __ LoadRegister(r0); | |
211 Node* v1 = __ LoadRegister(r1); | |
rmcilroy
2016/01/04 11:54:54
nit - non-single character variable names.
oth
2016/01/04 14:01:42
Done.
| |
212 __ StoreRegister(v1, r0); | |
213 __ StoreRegister(v0, r1); | |
214 __ Dispatch(); | |
215 } | |
216 | |
217 | |
218 // ExchangeWide <reg16> <reg16> | |
219 // | |
220 // Exchange two registers. | |
221 void Interpreter::DoExchangeWide(compiler::InterpreterAssembler* assembler) { | |
222 return DoExchange(assembler); | |
223 } | |
224 | |
225 | |
204 // Mov <src> <dst> | 226 // Mov <src> <dst> |
205 // | 227 // |
206 // Stores the value of register <src> to register <dst>. | 228 // Stores the value of register <src> to register <dst>. |
207 void Interpreter::DoMov(compiler::InterpreterAssembler* assembler) { | 229 void Interpreter::DoMov(compiler::InterpreterAssembler* assembler) { |
208 Node* src_index = __ BytecodeOperandReg(0); | 230 Node* src_index = __ BytecodeOperandReg(0); |
209 Node* src_value = __ LoadRegister(src_index); | 231 Node* src_value = __ LoadRegister(src_index); |
210 Node* dst_index = __ BytecodeOperandReg(1); | 232 Node* dst_index = __ BytecodeOperandReg(1); |
211 __ StoreRegister(src_value, dst_index); | 233 __ StoreRegister(src_value, dst_index); |
212 __ Dispatch(); | 234 __ Dispatch(); |
213 } | 235 } |
(...skipping 1378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1592 Node* index_reg = __ BytecodeOperandReg(0); | 1614 Node* index_reg = __ BytecodeOperandReg(0); |
1593 Node* index = __ LoadRegister(index_reg); | 1615 Node* index = __ LoadRegister(index_reg); |
1594 Node* result = __ CallRuntime(Runtime::kForInStep, index); | 1616 Node* result = __ CallRuntime(Runtime::kForInStep, index); |
1595 __ SetAccumulator(result); | 1617 __ SetAccumulator(result); |
1596 __ Dispatch(); | 1618 __ Dispatch(); |
1597 } | 1619 } |
1598 | 1620 |
1599 } // namespace interpreter | 1621 } // namespace interpreter |
1600 } // namespace internal | 1622 } // namespace internal |
1601 } // namespace v8 | 1623 } // namespace v8 |
OLD | NEW |