Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index 9ca78ccc84454c2f20140f22614b5951b79911e9..346b445dadc33ef0eeda9cd15617769629fdd1fd 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -8718,6 +8718,18 @@ bool HOptimizedGraphBuilder::TryInlineBuiltinFunctionCall(Call* expr, |
return true; |
} |
break; |
+ case kMathImul: |
+ if (expr->arguments()->length() == 2) { |
+ HValue* right = Pop(); |
+ HValue* left = Pop(); |
+ Drop(1); // Receiver. |
+ HValue* context = environment()->LookupContext(); |
+ HInstruction* op = HMul::NewImul(zone(), context, left, right); |
+ if (drop_extra) Drop(1); // Optionally drop the function. |
+ ast_context()->ReturnInstruction(op, expr->id()); |
+ return true; |
+ } |
+ break; |
default: |
// Not supported for inlining yet. |
break; |
@@ -8865,6 +8877,18 @@ bool HOptimizedGraphBuilder::TryInlineBuiltinMethodCall( |
return true; |
} |
break; |
+ case kMathImul: |
+ if (argument_count == 3 && check_type == RECEIVER_MAP_CHECK) { |
+ AddCheckConstantFunction(expr->holder(), receiver, receiver_map); |
+ HValue* right = Pop(); |
+ HValue* left = Pop(); |
+ Drop(1); // Receiver. |
+ HValue* context = environment()->LookupContext(); |
+ HInstruction* result = HMul::NewImul(zone(), context, left, right); |
+ ast_context()->ReturnInstruction(result, expr->id()); |
+ return true; |
+ } |
+ break; |
default: |
// Not yet supported for inlining. |
break; |