| Index: src/hydrogen-instructions.cc
|
| diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
|
| index ec243012943e8d0641971492bb908135eaa22882..0a3fa6b02dd622a5af4b2c65369354e18a6aefed 100644
|
| --- a/src/hydrogen-instructions.cc
|
| +++ b/src/hydrogen-instructions.cc
|
| @@ -523,12 +523,19 @@ bool HValue::CanReplaceWithDummyUses() {
|
|
|
|
|
| bool HValue::IsInteger32Constant() {
|
| - return IsConstant() && HConstant::cast(this)->HasInteger32Value();
|
| + HValue* value_to_check = IsForceRepresentation()
|
| + ? HForceRepresentation::cast(this)->value()
|
| + : this;
|
| + return value_to_check->IsConstant() &&
|
| + HConstant::cast(value_to_check)->HasInteger32Value();
|
| }
|
|
|
|
|
| int32_t HValue::GetInteger32Constant() {
|
| - return HConstant::cast(this)->Integer32Value();
|
| + HValue* constant_value = IsForceRepresentation()
|
| + ? HForceRepresentation::cast(this)->value()
|
| + : this;
|
| + return HConstant::cast(constant_value)->Integer32Value();
|
| }
|
|
|
|
|
| @@ -2946,6 +2953,24 @@ void HCompareHoleAndBranch::InferRepresentation(
|
| }
|
|
|
|
|
| +bool HCompareMinusZeroAndBranch::KnownSuccessorBlock(HBasicBlock** block) {
|
| + if (value()->representation().IsSmiOrInteger32()) {
|
| + // A Smi or Integer32 cannot contain minus zero.
|
| + *block = SecondSuccessor();
|
| + return true;
|
| + }
|
| + *block = NULL;
|
| + return false;
|
| +}
|
| +
|
| +
|
| +void HCompareMinusZeroAndBranch::InferRepresentation(
|
| + HInferRepresentationPhase* h_infer) {
|
| + ChangeRepresentation(value()->representation());
|
| +}
|
| +
|
| +
|
| +
|
| void HGoto::PrintDataTo(StringStream* stream) {
|
| stream->Add("B%d", SuccessorAt(0)->block_id());
|
| }
|
| @@ -3381,7 +3406,7 @@ void HAllocate::HandleSideEffectDominator(GVNFlag side_effect,
|
| }
|
| }
|
|
|
| - if (new_dominator_size > Page::kMaxNonCodeHeapObjectSize) {
|
| + if (new_dominator_size > isolate()->heap()->MaxRegularSpaceAllocationSize()) {
|
| if (FLAG_trace_allocation_folding) {
|
| PrintF("#%d (%s) cannot fold into #%d (%s) due to size: %d\n",
|
| id(), Mnemonic(), dominator_allocate->id(),
|
|
|