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

Side by Side Diff: src/interpreter/bytecode-array-builder.cc

Issue 1386133002: [Interpreter] Add bitwise operators (Or, Xor, And) to interpreter (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebased the patch Created 5 years, 2 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
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | src/interpreter/bytecodes.h » ('j') | 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/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 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 case Token::Value::ADD: 597 case Token::Value::ADD:
598 return Bytecode::kAdd; 598 return Bytecode::kAdd;
599 case Token::Value::SUB: 599 case Token::Value::SUB:
600 return Bytecode::kSub; 600 return Bytecode::kSub;
601 case Token::Value::MUL: 601 case Token::Value::MUL:
602 return Bytecode::kMul; 602 return Bytecode::kMul;
603 case Token::Value::DIV: 603 case Token::Value::DIV:
604 return Bytecode::kDiv; 604 return Bytecode::kDiv;
605 case Token::Value::MOD: 605 case Token::Value::MOD:
606 return Bytecode::kMod; 606 return Bytecode::kMod;
607 case Token::Value::BIT_OR:
608 return Bytecode::kBitwiseOr;
609 case Token::Value::BIT_XOR:
610 return Bytecode::kBitwiseXor;
611 case Token::Value::BIT_AND:
612 return Bytecode::kBitwiseAnd;
607 case Token::Value::SHL: 613 case Token::Value::SHL:
608 return Bytecode::kShiftLeft; 614 return Bytecode::kShiftLeft;
609 case Token::Value::SAR: 615 case Token::Value::SAR:
610 return Bytecode::kShiftRight; 616 return Bytecode::kShiftRight;
611 case Token::Value::SHR: 617 case Token::Value::SHR:
612 return Bytecode::kShiftRightLogical; 618 return Bytecode::kShiftRightLogical;
613 default: 619 default:
614 UNREACHABLE(); 620 UNREACHABLE();
615 return static_cast<Bytecode>(-1); 621 return static_cast<Bytecode>(-1);
616 } 622 }
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 756
751 Register TemporaryRegisterScope::NewRegister() { 757 Register TemporaryRegisterScope::NewRegister() {
752 count_++; 758 count_++;
753 last_register_index_ = builder_->BorrowTemporaryRegister(); 759 last_register_index_ = builder_->BorrowTemporaryRegister();
754 return Register(last_register_index_); 760 return Register(last_register_index_);
755 } 761 }
756 762
757 } // namespace interpreter 763 } // namespace interpreter
758 } // namespace internal 764 } // namespace internal
759 } // namespace v8 765 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | src/interpreter/bytecodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698