Index: src/hydrogen-instructions.h |
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h |
index 075fb1bb93e4b66b6f2228e284b675389e961923..7094cab29ea5acd180025e2b4148d524a9ba8c9c 100644 |
--- a/src/hydrogen-instructions.h |
+++ b/src/hydrogen-instructions.h |
@@ -6144,8 +6144,22 @@ class HLoadNamedField V8_FINAL : public HTemplateInstruction<2> { |
public: |
DECLARE_INSTRUCTION_FACTORY_P3(HLoadNamedField, HValue*, HValue*, |
HObjectAccess); |
- DECLARE_INSTRUCTION_FACTORY_P4(HLoadNamedField, HValue*, HValue*, |
- HObjectAccess, Handle<Map>); |
+ static HLoadNamedField* New(Zone* zone, HValue* context, |
+ HValue* object, HValue* dependency, |
+ HObjectAccess access, SmallMapList* maps, |
+ CompilationInfo* info) { |
+ HLoadNamedField* load_named_field = HLoadNamedField::New( |
+ zone, context, object, dependency, access); |
+ for (int i = 0; i < maps->length(); ++i) { |
+ Handle<Map> map(maps->at(i)); |
+ load_named_field->map_set_.Add(Unique<Map>(map), zone); |
+ if (map->CanTransition()) { |
+ Map::AddDependentCompilationInfo( |
+ map, DependentCode::kPrototypeCheckGroup, info); |
+ } |
+ } |
+ return load_named_field; |
+ } |
HValue* object() { return OperandAt(0); } |
HValue* dependency() { |
@@ -6158,7 +6172,7 @@ class HLoadNamedField V8_FINAL : public HTemplateInstruction<2> { |
return access_.representation(); |
} |
- Unique<Map> map() const { return map_; } |
+ UniqueSet<Map> map_set() const { return map_set_; } |
virtual bool HasEscapingOperandAt(int index) V8_OVERRIDE { return false; } |
virtual bool HasOutOfBoundsAccess(int size) V8_OVERRIDE { |
@@ -6179,7 +6193,7 @@ class HLoadNamedField V8_FINAL : public HTemplateInstruction<2> { |
protected: |
virtual bool DataEquals(HValue* other) V8_OVERRIDE { |
HLoadNamedField* b = HLoadNamedField::cast(other); |
- return access_.Equals(b->access_) && map_ == b->map_; |
+ return access_.Equals(b->access_) && this->map_set_.Equals(&b->map_set_); |
} |
private: |
@@ -6187,7 +6201,7 @@ class HLoadNamedField V8_FINAL : public HTemplateInstruction<2> { |
HValue* dependency, |
HObjectAccess access, |
Handle<Map> map = Handle<Map>::null()) |
- : access_(access), map_(map) { |
+ : access_(access) { |
ASSERT(object != NULL); |
SetOperandAt(0, object); |
SetOperandAt(1, dependency != NULL ? dependency : object); |
@@ -6221,7 +6235,7 @@ class HLoadNamedField V8_FINAL : public HTemplateInstruction<2> { |
virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
HObjectAccess access_; |
- Unique<Map> map_; |
+ UniqueSet<Map> map_set_; |
}; |