Index: src/hydrogen-instructions.cc |
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc |
index 16476a9c5a95c2b9a1bcca90e388255d7d25438b..908aa5be64d7a16fcd77f80e03cd6306a5b787b5 100644 |
--- a/src/hydrogen-instructions.cc |
+++ b/src/hydrogen-instructions.cc |
@@ -1680,7 +1680,7 @@ void HCheckMaps::PrintDataTo(StringStream* stream) { |
for (int i = 1; i < map_set()->length(); ++i) { |
stream->Add(",%p", *map_set()->at(i)); |
} |
- stream->Add("]"); |
+ stream->Add("]%s", CanOmitMapChecks() ? "(omitted)" : ""); |
} |
@@ -2757,6 +2757,22 @@ HLoadNamedFieldPolymorphic::HLoadNamedFieldPolymorphic(HValue* context, |
} |
+HCheckMaps* HCheckMaps::New(HValue* value, |
+ Handle<Map> map, |
+ Zone* zone, |
+ CompilationInfo* info, |
+ HValue* typecheck) { |
+ HCheckMaps* check_map = new(zone) HCheckMaps(value, zone, typecheck); |
+ check_map->map_set_.Add(map, zone); |
+ if (map->CanOmitMapChecks() && |
+ value->IsConstant() && |
+ HConstant::cast(value)->InstanceOf(map)) { |
+ check_map->omit(info); |
+ } |
+ return check_map; |
+} |
+ |
+ |
void HCheckMaps::FinalizeUniqueValueId() { |
if (!map_unique_ids_.is_empty()) return; |
Zone* zone = block()->zone(); |