| Index: src/hydrogen-instructions.cc
|
| diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
|
| index fc6c3c599a80b06e004d0ec60aff0212f005d587..9df554c2a1db5630267a960e04a0d4f8b15dfe6e 100644
|
| --- a/src/hydrogen-instructions.cc
|
| +++ b/src/hydrogen-instructions.cc
|
| @@ -1162,6 +1162,26 @@ void HCheckInstanceType::GetCheckMaskAndTag(uint8_t* mask, uint8_t* tag) {
|
| }
|
|
|
|
|
| +void HCheckMaps::SetSideEffectDominator(GVNFlag side_effect,
|
| + HValue* dominator) {
|
| + ASSERT(side_effect == kChangesMaps);
|
| + // TODO(mstarzinger): For now we specialize on HStoreNamedField, but once
|
| + // type information is rich enough we should generalize this to any HType
|
| + // for which the map is known.
|
| + if (dominator->IsStoreNamedField()) {
|
| + HStoreNamedField* store = HStoreNamedField::cast(dominator);
|
| + Handle<Map> map = store->transition();
|
| + if (map.is_null() || store->object() != value()) return;
|
| + for (int i = 0; i < map_set()->length(); i++) {
|
| + if (map.is_identical_to(map_set()->at(i))) {
|
| + DeleteAndReplaceWith(NULL);
|
| + return;
|
| + }
|
| + }
|
| + }
|
| +}
|
| +
|
| +
|
| void HLoadElements::PrintDataTo(StringStream* stream) {
|
| value()->PrintNameTo(stream);
|
| if (HasTypeCheck()) {
|
|
|