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

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

Issue 1392913002: [Interpreter] Adds shift operators to interpreter (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed a test for shift operators and comments 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 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
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