| Index: src/hydrogen-instructions.cc
|
| diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
|
| index 39d59582beec3d1ba57cad734dc5713e5bdda976..e816471ce604561601f90dfd08f41e25ed3d7495 100644
|
| --- a/src/hydrogen-instructions.cc
|
| +++ b/src/hydrogen-instructions.cc
|
| @@ -1177,6 +1177,20 @@ void HTypeofIsAndBranch::PrintDataTo(StringStream* stream) {
|
| }
|
|
|
|
|
| +bool HTypeofIsAndBranch::KnownSuccessorBlock(HBasicBlock** block) {
|
| + if (value()->representation().IsSpecialization()) {
|
| + if (compares_number_type()) {
|
| + *block = FirstSuccessor();
|
| + } else {
|
| + *block = SecondSuccessor();
|
| + }
|
| + return true;
|
| + }
|
| + *block = NULL;
|
| + return false;
|
| +}
|
| +
|
| +
|
| void HCheckMapValue::PrintDataTo(StringStream* stream) {
|
| value()->PrintNameTo(stream);
|
| stream->Add(" ");
|
| @@ -1321,6 +1335,23 @@ void HTypeof::PrintDataTo(StringStream* stream) {
|
| }
|
|
|
|
|
| +HInstruction* HForceRepresentation::New(Zone* zone, HValue* context,
|
| + HValue* value, Representation required_representation) {
|
| + if (FLAG_fold_constants && value->IsConstant()) {
|
| + HConstant* c = HConstant::cast(value);
|
| + if (c->HasNumberValue()) {
|
| + double double_res = c->DoubleValue();
|
| + if (TypeInfo::IsInt32Double(double_res)) {
|
| + return HConstant::New(zone, context,
|
| + static_cast<int32_t>(double_res),
|
| + required_representation);
|
| + }
|
| + }
|
| + }
|
| + return new(zone) HForceRepresentation(value, required_representation);
|
| +}
|
| +
|
| +
|
| void HForceRepresentation::PrintDataTo(StringStream* stream) {
|
| stream->Add("%s ", representation().Mnemonic());
|
| value()->PrintNameTo(stream);
|
| @@ -3397,7 +3428,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(),
|
| @@ -3899,8 +3930,7 @@ HInstruction* HMathMinMax::New(
|
| HInstruction* HMod::New(Zone* zone,
|
| HValue* context,
|
| HValue* left,
|
| - HValue* right,
|
| - Maybe<int> fixed_right_arg) {
|
| + HValue* right) {
|
| if (FLAG_fold_constants && left->IsConstant() && right->IsConstant()) {
|
| HConstant* c_left = HConstant::cast(left);
|
| HConstant* c_right = HConstant::cast(right);
|
| @@ -3919,7 +3949,7 @@ HInstruction* HMod::New(Zone* zone,
|
| }
|
| }
|
| }
|
| - return new(zone) HMod(context, left, right, fixed_right_arg);
|
| + return new(zone) HMod(context, left, right);
|
| }
|
|
|
|
|
|
|