Index: src/hydrogen-instructions.h |
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h |
index d7c0eb059ed249831f4ec7462fca1348e21b6097..d5d427c0b6914047792259c773f4e870fae6227b 100644 |
--- a/src/hydrogen-instructions.h |
+++ b/src/hydrogen-instructions.h |
@@ -4202,7 +4202,7 @@ class HMaterializedLiteral: public HTemplateInstruction<V> { |
class HArrayLiteral: public HMaterializedLiteral<1> { |
public: |
HArrayLiteral(HValue* context, |
- Handle<JSObject> boilerplate_object, |
+ Handle<HeapObject> boilerplate_object, |
int length, |
int literal_index, |
int depth) |
@@ -4214,9 +4214,12 @@ class HArrayLiteral: public HMaterializedLiteral<1> { |
HValue* context() { return OperandAt(0); } |
ElementsKind boilerplate_elements_kind() const { |
- return boilerplate_object_->GetElementsKind(); |
+ if (!boilerplate_object_->IsJSObject()) { |
+ return FAST_ELEMENTS; |
+ } |
+ return Handle<JSObject>::cast(boilerplate_object_)->GetElementsKind(); |
} |
- Handle<JSObject> boilerplate_object() const { return boilerplate_object_; } |
+ Handle<HeapObject> boilerplate_object() const { return boilerplate_object_; } |
int length() const { return length_; } |
bool IsCopyOnWrite() const; |
@@ -4230,7 +4233,7 @@ class HArrayLiteral: public HMaterializedLiteral<1> { |
private: |
int length_; |
- Handle<JSObject> boilerplate_object_; |
+ Handle<HeapObject> boilerplate_object_; |
}; |