Chromium Code Reviews| 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 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 368 | 368 |
| 369 | 369 |
| 370 // Mod <src> | 370 // Mod <src> |
| 371 // | 371 // |
| 372 // Modulo register <src> by accumulator. | 372 // Modulo register <src> by accumulator. |
| 373 void Interpreter::DoMod(compiler::InterpreterAssembler* assembler) { | 373 void Interpreter::DoMod(compiler::InterpreterAssembler* assembler) { |
| 374 DoBinaryOp(Runtime::kModulus, assembler); | 374 DoBinaryOp(Runtime::kModulus, assembler); |
| 375 } | 375 } |
| 376 | 376 |
| 377 | 377 |
| 378 // ShiftLeft <src> | |
| 379 // | |
| 380 // Left shifts accumulator by the count specified in register <src>. | |
|
oth
2015/10/07 13:53:17
Can the comments here and below mention that the a
mythria
2015/10/08 14:33:44
Done.
| |
| 381 void Interpreter::DoShiftLeft(compiler::InterpreterAssembler* assembler) { | |
| 382 DoBinaryOp(Runtime::kShiftLeft, assembler); | |
| 383 } | |
| 384 | |
| 385 | |
| 386 // ShiftRight <src> | |
| 387 // | |
| 388 // Right shifts accumulator by the count specified in register <src>. | |
| 389 // Result is sign extended. | |
| 390 void Interpreter::DoShiftRight(compiler::InterpreterAssembler* assembler) { | |
| 391 DoBinaryOp(Runtime::kShiftRight, assembler); | |
| 392 } | |
| 393 | |
| 394 | |
| 395 // ShiftRightLogical <src> | |
| 396 // | |
| 397 // Right Shifts accumulator by the count specified in register <src>. | |
| 398 // Result is zero-filled. | |
| 399 void Interpreter::DoShiftRightLogical( | |
| 400 compiler::InterpreterAssembler* assembler) { | |
| 401 DoBinaryOp(Runtime::kShiftRightLogical, assembler); | |
| 402 } | |
| 403 | |
| 404 | |
| 378 // LogicalNot | 405 // LogicalNot |
| 379 // | 406 // |
| 380 // Perform logical-not on the accumulator, first casting the | 407 // Perform logical-not on the accumulator, first casting the |
| 381 // accumulator to a boolean value if required. | 408 // accumulator to a boolean value if required. |
| 382 void Interpreter::DoLogicalNot(compiler::InterpreterAssembler* assembler) { | 409 void Interpreter::DoLogicalNot(compiler::InterpreterAssembler* assembler) { |
| 383 Node* accumulator = __ GetAccumulator(); | 410 Node* accumulator = __ GetAccumulator(); |
| 384 Node* result = __ CallRuntime(Runtime::kInterpreterLogicalNot, accumulator); | 411 Node* result = __ CallRuntime(Runtime::kInterpreterLogicalNot, accumulator); |
| 385 __ SetAccumulator(result); | 412 __ SetAccumulator(result); |
| 386 __ Dispatch(); | 413 __ Dispatch(); |
| 387 } | 414 } |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 608 // | 635 // |
| 609 // Return the value in the accumulator. | 636 // Return the value in the accumulator. |
| 610 void Interpreter::DoReturn(compiler::InterpreterAssembler* assembler) { | 637 void Interpreter::DoReturn(compiler::InterpreterAssembler* assembler) { |
| 611 __ Return(); | 638 __ Return(); |
| 612 } | 639 } |
| 613 | 640 |
| 614 | 641 |
| 615 } // namespace interpreter | 642 } // namespace interpreter |
| 616 } // namespace internal | 643 } // namespace internal |
| 617 } // namespace v8 | 644 } // namespace v8 |
| OLD | NEW |