| Index: src/full-codegen/x64/full-codegen-x64.cc
|
| diff --git a/src/full-codegen/x64/full-codegen-x64.cc b/src/full-codegen/x64/full-codegen-x64.cc
|
| index 560239eda9bfb88a4c02b77d8624a452b9149412..b7e7cdd2ef8b3ab9a5144af08f1f081fddd3e4ef 100644
|
| --- a/src/full-codegen/x64/full-codegen-x64.cc
|
| +++ b/src/full-codegen/x64/full-codegen-x64.cc
|
| @@ -2540,8 +2540,8 @@
|
| context()->DropAndPlug(1, rax);
|
| }
|
|
|
| -void FullCodeGenerator::EmitResolvePossiblyDirectEval(Call* expr) {
|
| - int arg_count = expr->arguments()->length();
|
| +
|
| +void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) {
|
| // Push copy of the first argument or undefined if it doesn't exist.
|
| if (arg_count > 0) {
|
| __ Push(Operand(rsp, arg_count * kPointerSize));
|
| @@ -2555,8 +2555,8 @@
|
| // Push the language mode.
|
| __ Push(Smi::FromInt(language_mode()));
|
|
|
| - // Push the source position of the eval call.
|
| - __ Push(Smi::FromInt(expr->position()));
|
| + // Push the start position of the scope the calls resides in.
|
| + __ Push(Smi::FromInt(scope()->start_position()));
|
|
|
| // Do the runtime call.
|
| __ CallRuntime(Runtime::kResolvePossiblyDirectEval);
|
| @@ -2605,7 +2605,7 @@
|
|
|
|
|
| void FullCodeGenerator::EmitPossiblyEvalCall(Call* expr) {
|
| - // In a call to eval, we first call Runtime_ResolvePossiblyDirectEval
|
| + // In a call to eval, we first call RuntimeHidden_ResolvePossiblyDirectEval
|
| // to resolve the function we need to call. Then we call the resolved
|
| // function using the given arguments.
|
| ZoneList<Expression*>* args = expr->arguments();
|
| @@ -2620,7 +2620,7 @@
|
| // Push a copy of the function (found below the arguments) and resolve
|
| // eval.
|
| __ Push(Operand(rsp, (arg_count + 1) * kPointerSize));
|
| - EmitResolvePossiblyDirectEval(expr);
|
| + EmitResolvePossiblyDirectEval(arg_count);
|
|
|
| // Touch up the callee.
|
| __ movp(Operand(rsp, (arg_count + 1) * kPointerSize), rax);
|
|
|