| Index: src/hydrogen-instructions.h
|
| diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
|
| index 1cdca4c46efa14ac1cfb764d52fff9c641790749..2e233fa10625f6b58939592bea41f401af321037 100644
|
| --- a/src/hydrogen-instructions.h
|
| +++ b/src/hydrogen-instructions.h
|
| @@ -1570,6 +1570,7 @@ class HCompareMap V8_FINAL : public HUnaryControlInstruction {
|
| }
|
|
|
| Unique<Map> map() const { return map_; }
|
| + bool map_is_stable() const { return map_is_stable_; }
|
|
|
| virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
|
| return Representation::Tagged();
|
| @@ -1586,12 +1587,14 @@ class HCompareMap V8_FINAL : public HUnaryControlInstruction {
|
| HBasicBlock* true_target = NULL,
|
| HBasicBlock* false_target = NULL)
|
| : HUnaryControlInstruction(value, true_target, false_target),
|
| - known_successor_index_(kNoKnownSuccessorIndex), map_(Unique<Map>(map)) {
|
| - ASSERT(!map.is_null());
|
| + known_successor_index_(kNoKnownSuccessorIndex),
|
| + map_is_stable_(map->is_stable()),
|
| + map_(Unique<Map>::CreateImmovable(map)) {
|
| set_representation(Representation::Tagged());
|
| }
|
|
|
| - int known_successor_index_;
|
| + int known_successor_index_ : 31;
|
| + bool map_is_stable_ : 1;
|
| Unique<Map> map_;
|
| };
|
|
|
| @@ -2764,6 +2767,7 @@ class HCheckMaps V8_FINAL : public HTemplateInstruction<2> {
|
|
|
| bool IsStabilityCheck() const { return is_stability_check_; }
|
| void MarkAsStabilityCheck() {
|
| + maps_are_stable_ = true;
|
| has_migration_target_ = false;
|
| is_stability_check_ = true;
|
| ClearChangesFlag(kNewSpacePromotion);
|
| @@ -2794,16 +2798,16 @@ class HCheckMaps V8_FINAL : public HTemplateInstruction<2> {
|
| Unique<Map> map,
|
| bool map_is_stable,
|
| HInstruction* instr) {
|
| - return CreateAndInsertAfter(zone, value, new(zone) UniqueSet<Map>(
|
| - map, zone), map_is_stable, instr);
|
| + return instr->Append(new(zone) HCheckMaps(
|
| + value, new(zone) UniqueSet<Map>(map, zone), map_is_stable));
|
| }
|
|
|
| - static HCheckMaps* CreateAndInsertAfter(Zone* zone,
|
| - HValue* value,
|
| - const UniqueSet<Map>* maps,
|
| - bool maps_are_stable,
|
| - HInstruction* instr) {
|
| - return instr->Append(new(zone) HCheckMaps(value, maps, maps_are_stable));
|
| + static HCheckMaps* CreateAndInsertBefore(Zone* zone,
|
| + HValue* value,
|
| + const UniqueSet<Map>* maps,
|
| + bool maps_are_stable,
|
| + HInstruction* instr) {
|
| + return instr->Prepend(new(zone) HCheckMaps(value, maps, maps_are_stable));
|
| }
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(CheckMaps)
|
| @@ -3497,20 +3501,21 @@ class HConstant V8_FINAL : public HTemplateInstruction<0> {
|
| }
|
|
|
| static HConstant* CreateAndInsertBefore(Zone* zone,
|
| - Unique<Object> object,
|
| - bool is_not_in_new_space,
|
| + Unique<Map> map,
|
| + bool map_is_stable,
|
| HInstruction* instruction) {
|
| return instruction->Prepend(new(zone) HConstant(
|
| - object, Unique<Map>(Handle<Map>::null()), false,
|
| - Representation::Tagged(), HType::Tagged(), is_not_in_new_space,
|
| - false, false, kUnknownInstanceType));
|
| + map, Unique<Map>(Handle<Map>::null()), map_is_stable,
|
| + Representation::Tagged(), HType::Tagged(), true,
|
| + false, false, MAP_TYPE));
|
| }
|
|
|
| static HConstant* CreateAndInsertAfter(Zone* zone,
|
| Unique<Map> map,
|
| + bool map_is_stable,
|
| HInstruction* instruction) {
|
| return instruction->Append(new(zone) HConstant(
|
| - map, Unique<Map>(Handle<Map>::null()), false,
|
| + map, Unique<Map>(Handle<Map>::null()), map_is_stable,
|
| Representation::Tagged(), HType::Tagged(), true,
|
| false, false, MAP_TYPE));
|
| }
|
|
|