| Index: src/hydrogen-instructions.cc
|
| diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
|
| index 3ab2cb21bdcfd5d25c35c359aac3d24f79b5ee64..537e88e72fc104faaa54b9207cb0ee7332240b58 100644
|
| --- a/src/hydrogen-instructions.cc
|
| +++ b/src/hydrogen-instructions.cc
|
| @@ -1054,7 +1054,7 @@ Representation HBranch::observed_input_representation(int index) {
|
|
|
| void HCompareMap::PrintDataTo(StringStream* stream) {
|
| value()->PrintNameTo(stream);
|
| - stream->Add(" (%p)", *map());
|
| + stream->Add(" (%p)", *map().handle());
|
| HControlInstruction::PrintDataTo(stream);
|
| }
|
|
|
| @@ -1433,11 +1433,9 @@ void HCheckMaps::HandleSideEffectDominator(GVNFlag side_effect,
|
| HStoreNamedField* store = HStoreNamedField::cast(dominator);
|
| if (!store->has_transition() || store->object() != value()) return;
|
| HConstant* transition = HConstant::cast(store->transition());
|
| - for (int i = 0; i < map_set()->length(); i++) {
|
| - if (transition->UniqueValueIdsMatch(map_unique_ids_.at(i))) {
|
| - DeleteAndReplaceWith(NULL);
|
| - return;
|
| - }
|
| + if (map_set_.Contains(transition->GetUnique())) {
|
| + DeleteAndReplaceWith(NULL);
|
| + return;
|
| }
|
| }
|
| }
|
| @@ -1445,9 +1443,9 @@ void HCheckMaps::HandleSideEffectDominator(GVNFlag side_effect,
|
|
|
| void HCheckMaps::PrintDataTo(StringStream* stream) {
|
| value()->PrintNameTo(stream);
|
| - stream->Add(" [%p", *map_set()->first());
|
| - for (int i = 1; i < map_set()->length(); ++i) {
|
| - stream->Add(",%p", *map_set()->at(i));
|
| + stream->Add(" [%p", *map_set_.at(0).handle());
|
| + for (int i = 1; i < map_set_.size(); ++i) {
|
| + stream->Add(",%p", *map_set_.at(i).handle());
|
| }
|
| stream->Add("]%s", CanOmitMapChecks() ? "(omitted)" : "");
|
| }
|
| @@ -1456,13 +1454,13 @@ void HCheckMaps::PrintDataTo(StringStream* stream) {
|
| void HCheckValue::PrintDataTo(StringStream* stream) {
|
| value()->PrintNameTo(stream);
|
| stream->Add(" ");
|
| - object()->ShortPrint(stream);
|
| + object().handle()->ShortPrint(stream);
|
| }
|
|
|
|
|
| HValue* HCheckValue::Canonicalize() {
|
| return (value()->IsConstant() &&
|
| - HConstant::cast(value())->UniqueValueIdsMatch(object_unique_id_))
|
| + HConstant::cast(value())->GetUnique() == object_)
|
| ? NULL
|
| : this;
|
| }
|
| @@ -2577,10 +2575,6 @@ Maybe<HConstant*> HConstant::CopyToTruncatedInt32(Zone* zone) {
|
| Representation::Integer32(),
|
| is_not_in_new_space_,
|
| handle_);
|
| - } else {
|
| - ASSERT(!HasNumberValue());
|
| - Maybe<HConstant*> number = CopyToTruncatedNumber(zone);
|
| - if (number.has_value) return number.value->CopyToTruncatedInt32(zone);
|
| }
|
| return Maybe<HConstant*>(res != NULL, res);
|
| }
|
| @@ -2863,15 +2857,9 @@ void HCompareObjectEqAndBranch::PrintDataTo(StringStream* stream) {
|
| }
|
|
|
|
|
| -void HCompareHoleAndBranch::PrintDataTo(StringStream* stream) {
|
| - object()->PrintNameTo(stream);
|
| - HControlInstruction::PrintDataTo(stream);
|
| -}
|
| -
|
| -
|
| void HCompareHoleAndBranch::InferRepresentation(
|
| HInferRepresentationPhase* h_infer) {
|
| - ChangeRepresentation(object()->representation());
|
| + ChangeRepresentation(value()->representation());
|
| }
|
|
|
|
|
| @@ -2941,22 +2929,17 @@ HCheckMaps* HCheckMaps::New(Zone* zone,
|
| if (map->CanOmitMapChecks() &&
|
| value->IsConstant() &&
|
| HConstant::cast(value)->HasMap(map)) {
|
| - check_map->omit(info);
|
| + // TODO(titzer): collect dependent map checks into a list.
|
| + check_map->omit_ = true;
|
| + if (map->CanTransition()) {
|
| + map->AddDependentCompilationInfo(
|
| + DependentCode::kPrototypeCheckGroup, info);
|
| + }
|
| }
|
| return check_map;
|
| }
|
|
|
|
|
| -void HCheckMaps::FinalizeUniqueValueId() {
|
| - if (!map_unique_ids_.is_empty()) return;
|
| - Zone* zone = block()->zone();
|
| - map_unique_ids_.Initialize(map_set_.length(), zone);
|
| - for (int i = 0; i < map_set_.length(); i++) {
|
| - map_unique_ids_.Add(UniqueValueId(map_set_.at(i)), zone);
|
| - }
|
| -}
|
| -
|
| -
|
| void HLoadNamedGeneric::PrintDataTo(StringStream* stream) {
|
| object()->PrintNameTo(stream);
|
| stream->Add(".");
|
|
|