Chromium Code Reviews| 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 #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 Loading... | |
| 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): Check constant pool index. |
|
rmcilroy
2016/09/13 12:05:57
These still aren't always constant pool indexes (t
Leszek Swirski
2016/09/13 14:03:23
Done, updated the todo.
| |
| 786 // operand types. One which is a constant pool index that can | |
| 787 // be checked, and the other is an unsigned value. | |
| 788 break; | 786 break; |
| 787 case OperandType::kUImm: | |
| 789 case OperandType::kImm: | 788 case OperandType::kImm: |
| 790 break; | 789 break; |
| 791 case OperandType::kMaybeReg: | 790 case OperandType::kMaybeReg: |
| 792 if (Register::FromOperand(operands[i]) == Register(0)) { | 791 if (Register::FromOperand(operands[i]) == Register(0)) { |
| 793 break; | 792 break; |
| 794 } | 793 } |
| 795 // Fall-through to kReg case. | 794 // Fall-through to kReg case. |
| 796 case OperandType::kReg: | 795 case OperandType::kReg: |
| 797 case OperandType::kRegOut: { | 796 case OperandType::kRegOut: { |
| 798 Register reg = Register::FromOperand(operands[i]); | 797 Register reg = Register::FromOperand(operands[i]); |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 996 return Bytecode::kTailCall; | 995 return Bytecode::kTailCall; |
| 997 default: | 996 default: |
| 998 UNREACHABLE(); | 997 UNREACHABLE(); |
| 999 } | 998 } |
| 1000 return Bytecode::kIllegal; | 999 return Bytecode::kIllegal; |
| 1001 } | 1000 } |
| 1002 | 1001 |
| 1003 } // namespace interpreter | 1002 } // namespace interpreter |
| 1004 } // namespace internal | 1003 } // namespace internal |
| 1005 } // namespace v8 | 1004 } // namespace v8 |
| OLD | NEW |