Index: src/hydrogen-instructions.cc |
=================================================================== |
--- src/hydrogen-instructions.cc (revision 9531) |
+++ src/hydrogen-instructions.cc (working copy) |
@@ -707,6 +707,14 @@ |
} |
+void HIsNilAndBranch::PrintDataTo(StringStream* stream) { |
+ value()->PrintNameTo(stream); |
+ stream->Add(kind() == kStrictEquality ? " === " : " == "); |
+ stream->Add(nil() == kNullValue ? "null" : "undefined"); |
+ HControlInstruction::PrintDataTo(stream); |
+} |
+ |
+ |
void HReturn::PrintDataTo(StringStream* stream) { |
value()->PrintNameTo(stream); |
} |
@@ -777,15 +785,22 @@ |
value()->PrintNameTo(stream); |
stream->Add(" == "); |
stream->Add(type_literal_->GetFlatContent().ToAsciiVector()); |
+ HControlInstruction::PrintDataTo(stream); |
} |
+void HTypeof::PrintDataTo(StringStream* stream) { |
+ value()->PrintNameTo(stream); |
+} |
+ |
+ |
void HChange::PrintDataTo(StringStream* stream) { |
HUnaryOperation::PrintDataTo(stream); |
- stream->Add(" %s to %s", from_.Mnemonic(), to().Mnemonic()); |
+ stream->Add(" %s to %s", from().Mnemonic(), to().Mnemonic()); |
if (CanTruncateToInt32()) stream->Add(" truncating-int32"); |
if (CheckFlag(kBailoutOnMinusZero)) stream->Add(" -0?"); |
+ if (CheckFlag(kDeoptimizeOnUndefined)) stream->Add(" deopt-on-undefined"); |
} |
@@ -857,6 +872,23 @@ |
} |
+const char* HCheckInstanceType::GetCheckName() { |
+ switch (check_) { |
+ case IS_SPEC_OBJECT: return "object"; |
+ case IS_JS_ARRAY: return "array"; |
+ case IS_STRING: return "string"; |
+ case IS_SYMBOL: return "symbol"; |
+ } |
+ UNREACHABLE(); |
+ return ""; |
+} |
+ |
+void HCheckInstanceType::PrintDataTo(StringStream* stream) { |
+ stream->Add("%s ", GetCheckName()); |
+ HUnaryOperation::PrintDataTo(stream); |
+} |
+ |
+ |
void HCallStub::PrintDataTo(StringStream* stream) { |
stream->Add("%s ", |
CodeStub::MajorName(major_key_, false)); |
@@ -1311,6 +1343,14 @@ |
} |
+void HCompareObjectEqAndBranch::PrintDataTo(StringStream* stream) { |
+ left()->PrintNameTo(stream); |
+ stream->Add(" "); |
+ right()->PrintNameTo(stream); |
+ HControlInstruction::PrintDataTo(stream); |
+} |
+ |
+ |
void HGoto::PrintDataTo(StringStream* stream) { |
stream->Add("B%d", SuccessorAt(0)->block_id()); |
} |
@@ -1425,7 +1465,7 @@ |
} |
-bool HLoadKeyedFastElement::RequiresHoleCheck() const { |
+bool HLoadKeyedFastElement::RequiresHoleCheck() { |
for (HUseIterator it(uses()); !it.Done(); it.Advance()) { |
HValue* use = it.value(); |
if (!use->IsChange()) return true; |
@@ -1442,11 +1482,6 @@ |
} |
-bool HLoadKeyedFastDoubleElement::RequiresHoleCheck() const { |
- return true; |
-} |
- |
- |
void HLoadKeyedGeneric::PrintDataTo(StringStream* stream) { |
object()->PrintNameTo(stream); |
stream->Add("["); |
@@ -1488,6 +1523,7 @@ |
stream->Add("pixel"); |
break; |
case FAST_ELEMENTS: |
+ case FAST_SMI_ONLY_ELEMENTS: |
case FAST_DOUBLE_ELEMENTS: |
case DICTIONARY_ELEMENTS: |
case NON_STRICT_ARGUMENTS_ELEMENTS: |
@@ -1582,6 +1618,7 @@ |
case EXTERNAL_PIXEL_ELEMENTS: |
stream->Add("pixel"); |
break; |
+ case FAST_SMI_ONLY_ELEMENTS: |
case FAST_ELEMENTS: |
case FAST_DOUBLE_ELEMENTS: |
case DICTIONARY_ELEMENTS: |
@@ -1598,10 +1635,21 @@ |
void HLoadGlobalCell::PrintDataTo(StringStream* stream) { |
stream->Add("[%p]", *cell()); |
- if (check_hole_value()) stream->Add(" (deleteable/read-only)"); |
+ if (!details_.IsDontDelete()) stream->Add(" (deleteable)"); |
+ if (details_.IsReadOnly()) stream->Add(" (read-only)"); |
} |
+bool HLoadGlobalCell::RequiresHoleCheck() { |
+ if (details_.IsDontDelete() && !details_.IsReadOnly()) return false; |
+ for (HUseIterator it(uses()); !it.Done(); it.Advance()) { |
+ HValue* use = it.value(); |
+ if (!use->IsChange()) return true; |
+ } |
+ return false; |
+} |
+ |
+ |
void HLoadGlobalGeneric::PrintDataTo(StringStream* stream) { |
stream->Add("%o ", *name()); |
} |
@@ -1610,6 +1658,8 @@ |
void HStoreGlobalCell::PrintDataTo(StringStream* stream) { |
stream->Add("[%p] = ", *cell()); |
value()->PrintNameTo(stream); |
+ if (!details_.IsDontDelete()) stream->Add(" (deleteable)"); |
+ if (details_.IsReadOnly()) stream->Add(" (read-only)"); |
} |