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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
287 // operations, instead of calling builtins directly. | 287 // operations, instead of calling builtins directly. |
288 Node* reg_index = __ BytecodeOperandReg8(0); | 288 Node* reg_index = __ BytecodeOperandReg8(0); |
289 Node* lhs = __ LoadRegister(reg_index); | 289 Node* lhs = __ LoadRegister(reg_index); |
290 Node* rhs = __ GetAccumulator(); | 290 Node* rhs = __ GetAccumulator(); |
291 Node* result = __ CallRuntime(function_id, lhs, rhs); | 291 Node* result = __ CallRuntime(function_id, lhs, rhs); |
292 __ SetAccumulator(result); | 292 __ SetAccumulator(result); |
293 __ Dispatch(); | 293 __ Dispatch(); |
294 } | 294 } |
295 | 295 |
296 | 296 |
297 // BitwiseOr <src> | |
rmcilroy
2015/10/06 11:09:28
ditto - move these down so they are in the same or
mythria
2015/10/06 13:47:40
Done.
| |
298 // | |
299 // BitwiseOr register <src> to accumulator. | |
300 void Interpreter::DoBitwiseOr(compiler::InterpreterAssembler* assembler) { | |
301 DoBinaryOp(Runtime::kBitwiseOr, assembler); | |
302 } | |
303 | |
304 | |
305 // BitwiseXor <src> | |
306 // | |
307 // BitwiseXor register <src> to accumulator. | |
308 void Interpreter::DoBitwiseXor(compiler::InterpreterAssembler* assembler) { | |
309 DoBinaryOp(Runtime::kBitwiseXor, assembler); | |
310 } | |
311 | |
312 | |
313 // BitwiseAnd <src> | |
314 // | |
315 // BitwiseAnd register <src> to accumulator. | |
316 void Interpreter::DoBitwiseAnd(compiler::InterpreterAssembler* assembler) { | |
317 DoBinaryOp(Runtime::kBitwiseAnd, assembler); | |
318 } | |
319 | |
320 | |
297 // Add <src> | 321 // Add <src> |
298 // | 322 // |
299 // Add register <src> to accumulator. | 323 // Add register <src> to accumulator. |
300 void Interpreter::DoAdd(compiler::InterpreterAssembler* assembler) { | 324 void Interpreter::DoAdd(compiler::InterpreterAssembler* assembler) { |
301 DoBinaryOp(Runtime::kAdd, assembler); | 325 DoBinaryOp(Runtime::kAdd, assembler); |
302 } | 326 } |
303 | 327 |
304 | 328 |
305 // Sub <src> | 329 // Sub <src> |
306 // | 330 // |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
541 // | 565 // |
542 // Return the value in register 0. | 566 // Return the value in register 0. |
543 void Interpreter::DoReturn(compiler::InterpreterAssembler* assembler) { | 567 void Interpreter::DoReturn(compiler::InterpreterAssembler* assembler) { |
544 __ Return(); | 568 __ Return(); |
545 } | 569 } |
546 | 570 |
547 | 571 |
548 } // namespace interpreter | 572 } // namespace interpreter |
549 } // namespace internal | 573 } // namespace internal |
550 } // namespace v8 | 574 } // namespace v8 |
OLD | NEW |