| Index: src/hydrogen-instructions.cc
|
| diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
|
| index 997b7c2fda9b29455d03faac59c5a49a60d18d5c..b09d9c67c2ac12e83e0db81cf3fc8634da4dbae7 100644
|
| --- a/src/hydrogen-instructions.cc
|
| +++ b/src/hydrogen-instructions.cc
|
| @@ -388,7 +388,7 @@ HUseListNode* HUseListNode::tail() {
|
| }
|
|
|
|
|
| -bool HValue::CheckUsesForFlag(Flag f) {
|
| +bool HValue::CheckUsesForFlag(Flag f) const {
|
| for (HUseIterator it(uses()); !it.Done(); it.Advance()) {
|
| if (it.value()->IsSimulate()) continue;
|
| if (!it.value()->CheckFlag(f)) return false;
|
| @@ -397,7 +397,7 @@ bool HValue::CheckUsesForFlag(Flag f) {
|
| }
|
|
|
|
|
| -bool HValue::HasAtLeastOneUseWithFlagAndNoneWithout(Flag f) {
|
| +bool HValue::HasAtLeastOneUseWithFlagAndNoneWithout(Flag f) const {
|
| bool return_value = false;
|
| for (HUseIterator it(uses()); !it.Done(); it.Advance()) {
|
| if (it.value()->IsSimulate()) continue;
|
| @@ -1302,7 +1302,7 @@ HValue* HUnaryMathOperation::Canonicalize() {
|
| if (new_left == NULL &&
|
| hdiv->observed_input_representation(1).IsSmiOrInteger32()) {
|
| new_left = new(block()->zone()) HChange(
|
| - left, Representation::Integer32(), false, false, false);
|
| + left, Representation::Integer32(), false, false);
|
| HChange::cast(new_left)->InsertBefore(this);
|
| }
|
| HValue* new_right =
|
| @@ -1313,7 +1313,7 @@ HValue* HUnaryMathOperation::Canonicalize() {
|
| #endif
|
| hdiv->observed_input_representation(2).IsSmiOrInteger32()) {
|
| new_right = new(block()->zone()) HChange(
|
| - right, Representation::Integer32(), false, false, false);
|
| + right, Representation::Integer32(), false, false);
|
| HChange::cast(new_right)->InsertBefore(this);
|
| }
|
|
|
| @@ -2773,6 +2773,18 @@ 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());
|
| +}
|
| +
|
| +
|
| void HGoto::PrintDataTo(StringStream* stream) {
|
| stream->Add("B%d", SuccessorAt(0)->block_id());
|
| }
|
| @@ -3085,18 +3097,8 @@ bool HLoadKeyed::UsesMustHandleHole() const {
|
|
|
|
|
| bool HLoadKeyed::AllUsesCanTreatHoleAsNaN() const {
|
| - if (!IsFastDoubleElementsKind(elements_kind())) {
|
| - return false;
|
| - }
|
| -
|
| - for (HUseIterator it(uses()); !it.Done(); it.Advance()) {
|
| - HValue* use = it.value();
|
| - if (!use->CheckFlag(HValue::kAllowUndefinedAsNaN)) {
|
| - return false;
|
| - }
|
| - }
|
| -
|
| - return true;
|
| + return IsFastDoubleElementsKind(elements_kind()) &&
|
| + CheckUsesForFlag(HValue::kAllowUndefinedAsNaN);
|
| }
|
|
|
|
|
|
|