Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: src/interpreter/interpreter.cc

Issue 1825793002: [stubs] Introduce code stubs for bitwise binary operations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« src/code-stubs.cc ('K') | « src/compiler/js-generic-lowering.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 // Modulo register <src> by accumulator. 683 // Modulo register <src> by accumulator.
684 void Interpreter::DoMod(InterpreterAssembler* assembler) { 684 void Interpreter::DoMod(InterpreterAssembler* assembler) {
685 DoBinaryOp(Runtime::kModulus, assembler); 685 DoBinaryOp(Runtime::kModulus, assembler);
686 } 686 }
687 687
688 688
689 // BitwiseOr <src> 689 // BitwiseOr <src>
690 // 690 //
691 // BitwiseOr register <src> to accumulator. 691 // BitwiseOr register <src> to accumulator.
692 void Interpreter::DoBitwiseOr(InterpreterAssembler* assembler) { 692 void Interpreter::DoBitwiseOr(InterpreterAssembler* assembler) {
693 DoBinaryOp(Runtime::kBitwiseOr, assembler); 693 DoBinaryOp(CodeFactory::BitwiseOr(isolate_), assembler);
694 } 694 }
695 695
696 696
697 // BitwiseXor <src> 697 // BitwiseXor <src>
698 // 698 //
699 // BitwiseXor register <src> to accumulator. 699 // BitwiseXor register <src> to accumulator.
700 void Interpreter::DoBitwiseXor(InterpreterAssembler* assembler) { 700 void Interpreter::DoBitwiseXor(InterpreterAssembler* assembler) {
701 DoBinaryOp(Runtime::kBitwiseXor, assembler); 701 DoBinaryOp(CodeFactory::BitwiseXor(isolate_), assembler);
702 } 702 }
703 703
704 704
705 // BitwiseAnd <src> 705 // BitwiseAnd <src>
706 // 706 //
707 // BitwiseAnd register <src> to accumulator. 707 // BitwiseAnd register <src> to accumulator.
708 void Interpreter::DoBitwiseAnd(InterpreterAssembler* assembler) { 708 void Interpreter::DoBitwiseAnd(InterpreterAssembler* assembler) {
709 DoBinaryOp(Runtime::kBitwiseAnd, assembler); 709 DoBinaryOp(CodeFactory::BitwiseAnd(isolate_), assembler);
710 } 710 }
711 711
712 712
713 // ShiftLeft <src> 713 // ShiftLeft <src>
714 // 714 //
715 // Left shifts register <src> by the count specified in the accumulator. 715 // Left shifts register <src> by the count specified in the accumulator.
716 // Register <src> is converted to an int32 and the accumulator to uint32 716 // Register <src> is converted to an int32 and the accumulator to uint32
717 // before the operation. 5 lsb bits from the accumulator are used as count 717 // before the operation. 5 lsb bits from the accumulator are used as count
718 // i.e. <src> << (accumulator & 0x1F). 718 // i.e. <src> << (accumulator & 0x1F).
719 void Interpreter::DoShiftLeft(InterpreterAssembler* assembler) { 719 void Interpreter::DoShiftLeft(InterpreterAssembler* assembler) {
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after
1617 // Illegal 1617 // Illegal
1618 // 1618 //
1619 // An invalid bytecode aborting execution if dispatched. 1619 // An invalid bytecode aborting execution if dispatched.
1620 void Interpreter::DoIllegal(InterpreterAssembler* assembler) { 1620 void Interpreter::DoIllegal(InterpreterAssembler* assembler) {
1621 __ Abort(kInvalidBytecode); 1621 __ Abort(kInvalidBytecode);
1622 } 1622 }
1623 1623
1624 } // namespace interpreter 1624 } // namespace interpreter
1625 } // namespace internal 1625 } // namespace internal
1626 } // namespace v8 1626 } // namespace v8
OLDNEW
« src/code-stubs.cc ('K') | « src/compiler/js-generic-lowering.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698