| Index: src/hydrogen.cc
|
| diff --git a/src/hydrogen.cc b/src/hydrogen.cc
|
| index 92308704328c7968176fbbe88fd392b58622207d..3c440890d7edd86926b0c3dc1cb22a449287f5e2 100644
|
| --- a/src/hydrogen.cc
|
| +++ b/src/hydrogen.cc
|
| @@ -5124,6 +5124,25 @@ bool HGraphBuilder::TryInlineBuiltinFunction(Call* expr,
|
| return true;
|
| }
|
| break;
|
| + case kMathMax:
|
| + case kMathMin:
|
| + if (argument_count == 3 && check_type == RECEIVER_MAP_CHECK) {
|
| + AddCheckConstantFunction(expr, receiver, receiver_map, true);
|
| + HValue* right = Pop();
|
| + HValue* left = Pop();
|
| + // Do not inline if the result representation is uncertain.
|
| + if (!right->representation().Equals(left->representation())) {
|
| + Push(left);
|
| + Push(right);
|
| + return false;
|
| + }
|
| + Pop(); // Pop receiver.
|
| + HInstruction* result =
|
| + new(zone()) HMathMinMax(left, right, id);
|
| + ast_context()->ReturnInstruction(result, expr->id());
|
| + return true;
|
| + }
|
| + break;
|
| default:
|
| // Not yet supported for inlining.
|
| break;
|
|
|