Index: src/register-allocator.cc |
=================================================================== |
--- src/register-allocator.cc (revision 4025) |
+++ src/register-allocator.cc (working copy) |
@@ -38,11 +38,11 @@ |
// Result implementation. |
-Result::Result(Register reg, NumberInfo::Type info) { |
+Result::Result(Register reg, NumberInfo info) { |
ASSERT(reg.is_valid() && !RegisterAllocator::IsReserved(reg)); |
CodeGeneratorScope::Current()->allocator()->Use(reg); |
value_ = TypeField::encode(REGISTER) |
- | NumberInfoField::encode(info) |
+ | NumberInfoField::encode(info.ToInt()) |
| DataField::encode(reg.code_); |
} |
@@ -53,20 +53,20 @@ |
} |
-NumberInfo::Type Result::number_info() { |
+NumberInfo Result::number_info() const { |
fschneider
2010/03/05 15:01:07
Move this to register-allocator-inl.h.
|
ASSERT(is_valid()); |
- if (!is_constant()) return NumberInfoField::decode(value_); |
+ if (!is_constant()) return NumberInfo::FromInt(NumberInfoField::decode(value_)); |
fschneider
2010/03/05 15:01:07
Long line.
|
Handle<Object> value = handle(); |
- if (value->IsSmi()) return NumberInfo::kSmi; |
- if (value->IsHeapNumber()) return NumberInfo::kHeapNumber; |
- return NumberInfo::kUnknown; |
+ if (value->IsSmi()) return NumberInfo::Smi(); |
+ if (value->IsHeapNumber()) return NumberInfo::HeapNumber(); |
+ return NumberInfo::Unknown(); |
} |
-void Result::set_number_info(NumberInfo::Type info) { |
+void Result::set_number_info(NumberInfo info) { |
fschneider
2010/03/05 15:01:07
Move this to register-allocator-inl.h.
|
ASSERT(is_valid()); |
- value_ = value_ & ~NumberInfoField::mask(); |
- value_ = value_ | NumberInfoField::encode(info); |
+ value_ &= ~NumberInfoField::mask(); |
+ value_ |= NumberInfoField::encode(info.ToInt()); |
} |