| Index: src/hydrogen.cc
|
| diff --git a/src/hydrogen.cc b/src/hydrogen.cc
|
| index 6bf082d86c9da8dc0a924ebf4270f63fc5725c32..eb5fdf72f2341c89ca3cb51699717ada520fe1f0 100644
|
| --- a/src/hydrogen.cc
|
| +++ b/src/hydrogen.cc
|
| @@ -5888,7 +5888,8 @@ void HGraphBuilder::VisitCallNew(CallNew* expr) {
|
| HValue* function = Top();
|
| CHECK_ALIVE(VisitExpressions(expr->arguments()));
|
| Handle<JSFunction> constructor = expr->target();
|
| - AddInstruction(new(zone()) HCheckFunction(function, constructor));
|
| + HValue* check = AddInstruction(
|
| + new(zone()) HCheckFunction(function, constructor));
|
|
|
| // Replace the constructor function with a newly allocated receiver.
|
| HInstruction* receiver = new(zone()) HAllocateObject(context, constructor);
|
| @@ -5905,6 +5906,7 @@ void HGraphBuilder::VisitCallNew(CallNew* expr) {
|
| // actually should do is emit HInvokeFunction on the constructor instead
|
| // of using HCallNew as a fallback.
|
| receiver->DeleteAndReplaceWith(NULL);
|
| + check->DeleteAndReplaceWith(NULL);
|
| environment()->SetExpressionStackAt(receiver_index, function);
|
| HInstruction* call = PreProcessCall(
|
| new(zone()) HCallNew(context, function, argument_count));
|
|
|