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

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

Issue 2336203002: [Interpreter] Add an unsigned immediate operand type (Closed)
Patch Set: Address comments Created 4 years, 3 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/bytecode-array-iterator.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 #include "src/globals.h" 7 #include "src/globals.h"
8 #include "src/interpreter/bytecode-array-writer.h" 8 #include "src/interpreter/bytecode-array-writer.h"
9 #include "src/interpreter/bytecode-dead-code-optimizer.h" 9 #include "src/interpreter/bytecode-dead-code-optimizer.h"
10 #include "src/interpreter/bytecode-label.h" 10 #include "src/interpreter/bytecode-label.h"
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 return false; 775 return false;
776 } 776 }
777 break; 777 break;
778 case OperandType::kRuntimeId: 778 case OperandType::kRuntimeId:
779 if (Bytecodes::SizeForUnsignedOperand(operands[i]) > 779 if (Bytecodes::SizeForUnsignedOperand(operands[i]) >
780 OperandSize::kShort) { 780 OperandSize::kShort) {
781 return false; 781 return false;
782 } 782 }
783 break; 783 break;
784 case OperandType::kIdx: 784 case OperandType::kIdx:
785 // TODO(oth): Consider splitting OperandType::kIdx into two 785 // TODO(leszeks): Possibly split this up into constant pool indices and
786 // operand types. One which is a constant pool index that can 786 // other indices, for checking
787 // be checked, and the other is an unsigned value.
788 break; 787 break;
788 case OperandType::kUImm:
789 case OperandType::kImm: 789 case OperandType::kImm:
790 break; 790 break;
791 case OperandType::kMaybeReg: 791 case OperandType::kMaybeReg:
792 if (Register::FromOperand(operands[i]) == Register(0)) { 792 if (Register::FromOperand(operands[i]) == Register(0)) {
793 break; 793 break;
794 } 794 }
795 // Fall-through to kReg case. 795 // Fall-through to kReg case.
796 case OperandType::kReg: 796 case OperandType::kReg:
797 case OperandType::kRegOut: { 797 case OperandType::kRegOut: {
798 Register reg = Register::FromOperand(operands[i]); 798 Register reg = Register::FromOperand(operands[i]);
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
996 return Bytecode::kTailCall; 996 return Bytecode::kTailCall;
997 default: 997 default:
998 UNREACHABLE(); 998 UNREACHABLE();
999 } 999 }
1000 return Bytecode::kIllegal; 1000 return Bytecode::kIllegal;
1001 } 1001 }
1002 1002
1003 } // namespace interpreter 1003 } // namespace interpreter
1004 } // namespace internal 1004 } // namespace internal
1005 } // namespace v8 1005 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | src/interpreter/bytecode-array-iterator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698