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/bytecode-array-builder.h" | 5 #include "src/interpreter/bytecode-array-builder.h" |
6 | 6 |
7 namespace v8 { | 7 namespace v8 { |
8 namespace internal { | 8 namespace internal { |
9 namespace interpreter { | 9 namespace interpreter { |
10 | 10 |
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
566 case Token::Value::ADD: | 566 case Token::Value::ADD: |
567 return Bytecode::kAdd; | 567 return Bytecode::kAdd; |
568 case Token::Value::SUB: | 568 case Token::Value::SUB: |
569 return Bytecode::kSub; | 569 return Bytecode::kSub; |
570 case Token::Value::MUL: | 570 case Token::Value::MUL: |
571 return Bytecode::kMul; | 571 return Bytecode::kMul; |
572 case Token::Value::DIV: | 572 case Token::Value::DIV: |
573 return Bytecode::kDiv; | 573 return Bytecode::kDiv; |
574 case Token::Value::MOD: | 574 case Token::Value::MOD: |
575 return Bytecode::kMod; | 575 return Bytecode::kMod; |
| 576 case Token::Value::SHL: |
| 577 return Bytecode::kShiftLeft; |
| 578 case Token::Value::SAR: |
| 579 return Bytecode::kShiftRight; |
| 580 case Token::Value::SHR: |
| 581 return Bytecode::kShiftRightLogical; |
576 default: | 582 default: |
577 UNREACHABLE(); | 583 UNREACHABLE(); |
578 return static_cast<Bytecode>(-1); | 584 return static_cast<Bytecode>(-1); |
579 } | 585 } |
580 } | 586 } |
581 | 587 |
582 | 588 |
583 // static | 589 // static |
584 Bytecode BytecodeArrayBuilder::BytecodeForCompareOperation(Token::Value op) { | 590 Bytecode BytecodeArrayBuilder::BytecodeForCompareOperation(Token::Value op) { |
585 switch (op) { | 591 switch (op) { |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
713 | 719 |
714 Register TemporaryRegisterScope::NewRegister() { | 720 Register TemporaryRegisterScope::NewRegister() { |
715 count_++; | 721 count_++; |
716 last_register_index_ = builder_->BorrowTemporaryRegister(); | 722 last_register_index_ = builder_->BorrowTemporaryRegister(); |
717 return Register(last_register_index_); | 723 return Register(last_register_index_); |
718 } | 724 } |
719 | 725 |
720 } // namespace interpreter | 726 } // namespace interpreter |
721 } // namespace internal | 727 } // namespace internal |
722 } // namespace v8 | 728 } // namespace v8 |
OLD | NEW |