Index: src/frame-element.cc |
=================================================================== |
--- src/frame-element.cc (revision 3859) |
+++ src/frame-element.cc (working copy) |
@@ -35,7 +35,18 @@ |
// ------------------------------------------------------------------------- |
// FrameElement implementation. |
+NumberInfo::Type FrameElement::number_info() { |
+ // Copied elements do not have number info. Instead |
+ // we have to inspect their backing element in the frame. |
+ ASSERT(!is_copy()); |
+ if (!is_constant()) return NumberInfoField::decode(value_); |
+ Handle<Object> value = handle(); |
+ if (value->IsSmi()) return NumberInfo::kSmi; |
+ if (value->IsHeapNumber()) return NumberInfo::kHeapNumber; |
+ return NumberInfo::kUnknown; |
+} |
+ |
FrameElement::ZoneObjectList* FrameElement::ConstantList() { |
static ZoneObjectList list(10); |
return &list; |