Index: src/full-codegen/x87/full-codegen-x87.cc |
diff --git a/src/full-codegen/x87/full-codegen-x87.cc b/src/full-codegen/x87/full-codegen-x87.cc |
index 4452fa1af65dfb510f02ac4c3a1d613ef7c63949..f012c01352d45192ae805453d96c9651ab7b5b73 100644 |
--- a/src/full-codegen/x87/full-codegen-x87.cc |
+++ b/src/full-codegen/x87/full-codegen-x87.cc |
@@ -2542,8 +2542,8 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) { |
context()->DropAndPlug(1, eax); |
} |
- |
-void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) { |
+void FullCodeGenerator::EmitResolvePossiblyDirectEval(Call* expr) { |
+ int arg_count = expr->arguments()->length(); |
// Push copy of the first argument or undefined if it doesn't exist. |
if (arg_count > 0) { |
__ push(Operand(esp, arg_count * kPointerSize)); |
@@ -2558,7 +2558,7 @@ void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) { |
__ push(Immediate(Smi::FromInt(language_mode()))); |
// Push the start position of the scope the calls resides in. |
- __ push(Immediate(Smi::FromInt(scope()->start_position()))); |
+ __ push(Immediate(Smi::FromInt(expr->position()))); |
// Do the runtime call. |
__ CallRuntime(Runtime::kResolvePossiblyDirectEval); |
@@ -2622,7 +2622,7 @@ void FullCodeGenerator::EmitPossiblyEvalCall(Call* expr) { |
// Push a copy of the function (found below the arguments) and |
// resolve eval. |
__ push(Operand(esp, (arg_count + 1) * kPointerSize)); |
- EmitResolvePossiblyDirectEval(arg_count); |
+ EmitResolvePossiblyDirectEval(expr); |
// Touch up the stack with the resolved function. |
__ mov(Operand(esp, (arg_count + 1) * kPointerSize), eax); |