| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/compiler/instruction.h" | 5 #include "src/compiler/instruction.h" |
| 6 | 6 |
| 7 #include "src/compiler/common-operator.h" | 7 #include "src/compiler/common-operator.h" |
| 8 | 8 |
| 9 namespace v8 { | 9 namespace v8 { |
| 10 namespace internal { | 10 namespace internal { |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 cache = new SubKindOperand[kNumCachedOperands]; | 68 cache = new SubKindOperand[kNumCachedOperands]; |
| 69 for (int i = 0; i < kNumCachedOperands; i++) { | 69 for (int i = 0; i < kNumCachedOperands; i++) { |
| 70 cache[i].ConvertTo(kOperandKind, i); | 70 cache[i].ConvertTo(kOperandKind, i); |
| 71 } | 71 } |
| 72 } | 72 } |
| 73 | 73 |
| 74 | 74 |
| 75 template <InstructionOperand::Kind kOperandKind, int kNumCachedOperands> | 75 template <InstructionOperand::Kind kOperandKind, int kNumCachedOperands> |
| 76 void SubKindOperand<kOperandKind, kNumCachedOperands>::TearDownCache() { | 76 void SubKindOperand<kOperandKind, kNumCachedOperands>::TearDownCache() { |
| 77 delete[] cache; | 77 delete[] cache; |
| 78 cache = NULL; |
| 78 } | 79 } |
| 79 | 80 |
| 80 | 81 |
| 81 void InstructionOperand::SetUpCaches() { | 82 void InstructionOperand::SetUpCaches() { |
| 82 #define INSTRUCTION_OPERAND_SETUP(name, type, number) \ | 83 #define INSTRUCTION_OPERAND_SETUP(name, type, number) \ |
| 83 name##Operand::SetUpCache(); | 84 name##Operand::SetUpCache(); |
| 84 INSTRUCTION_OPERAND_LIST(INSTRUCTION_OPERAND_SETUP) | 85 INSTRUCTION_OPERAND_LIST(INSTRUCTION_OPERAND_SETUP) |
| 85 #undef INSTRUCTION_OPERAND_SETUP | 86 #undef INSTRUCTION_OPERAND_SETUP |
| 86 } | 87 } |
| 87 | 88 |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 os << " B" << (*iter)->id(); | 475 os << " B" << (*iter)->id(); |
| 475 } | 476 } |
| 476 os << "\n"; | 477 os << "\n"; |
| 477 } | 478 } |
| 478 return os; | 479 return os; |
| 479 } | 480 } |
| 480 | 481 |
| 481 } // namespace compiler | 482 } // namespace compiler |
| 482 } // namespace internal | 483 } // namespace internal |
| 483 } // namespace v8 | 484 } // namespace v8 |
| OLD | NEW |