Index: src/ia32/lithium-ia32.h |
=================================================================== |
--- src/ia32/lithium-ia32.h (revision 8261) |
+++ src/ia32/lithium-ia32.h (working copy) |
@@ -32,6 +32,7 @@ |
#include "lithium-allocator.h" |
#include "lithium.h" |
#include "safepoint-table.h" |
+#include "utils.h" |
namespace v8 { |
namespace internal { |
@@ -280,37 +281,6 @@ |
}; |
-template<typename ElementType, int NumElements> |
-class OperandContainer { |
- public: |
- OperandContainer() { |
- for (int i = 0; i < NumElements; i++) elems_[i] = NULL; |
- } |
- int length() { return NumElements; } |
- ElementType& operator[](int i) { |
- ASSERT(i < length()); |
- return elems_[i]; |
- } |
- void PrintOperandsTo(StringStream* stream); |
- |
- private: |
- ElementType elems_[NumElements]; |
-}; |
- |
- |
-template<typename ElementType> |
-class OperandContainer<ElementType, 0> { |
- public: |
- int length() { return 0; } |
- void PrintOperandsTo(StringStream* stream) { } |
- ElementType& operator[](int i) { |
- UNREACHABLE(); |
- static ElementType t = 0; |
- return t; |
- } |
-}; |
- |
- |
// R = number of result operands (0 or 1). |
// I = number of input operands. |
// T = number of temporary operands. |
@@ -333,9 +303,9 @@ |
virtual void PrintOutputOperandTo(StringStream* stream); |
protected: |
- OperandContainer<LOperand*, R> results_; |
- OperandContainer<LOperand*, I> inputs_; |
- OperandContainer<LOperand*, T> temps_; |
+ EmbeddedContainer<LOperand*, R> results_; |
+ EmbeddedContainer<LOperand*, I> inputs_; |
+ EmbeddedContainer<LOperand*, T> temps_; |
}; |