Index: src/x64/full-codegen-x64.cc |
diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc |
index f06eaa9384e0215b94118436004bbab583774304..ed29faf4ed424d5fa0898ae2a8f48fdc47b3a5a7 100644 |
--- a/src/x64/full-codegen-x64.cc |
+++ b/src/x64/full-codegen-x64.cc |
@@ -3004,11 +3004,6 @@ void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) { |
// Push the enclosing function. |
__ Push(Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); |
- // Push the receiver of the enclosing function and do runtime call. |
- Variable* this_var = scope()->LookupThis(); |
- DCHECK_NOT_NULL(this_var); |
- __ Push(VarOperand(this_var, rcx)); |
- |
// Push the language mode. |
__ Push(Smi::FromInt(language_mode())); |
@@ -3016,7 +3011,7 @@ void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) { |
__ Push(Smi::FromInt(scope()->start_position())); |
// Do the runtime call. |
- __ CallRuntime(Runtime::kResolvePossiblyDirectEval, 6); |
+ __ CallRuntime(Runtime::kResolvePossiblyDirectEval, 5); |
} |
@@ -3048,8 +3043,8 @@ void FullCodeGenerator::VisitCall(Call* expr) { |
if (call_type == Call::POSSIBLY_EVAL_CALL) { |
// In a call to eval, we first call RuntimeHidden_ResolvePossiblyDirectEval |
- // to resolve the function we need to call and the receiver of the call. |
- // Then we call the resolved function using the given arguments. |
+ // to resolve the function we need to call. Then we call the resolved |
+ // function using the given arguments. |
ZoneList<Expression*>* args = expr->arguments(); |
int arg_count = args->length(); |
{ PreservePositionScope pos_scope(masm()->positions_recorder()); |
@@ -3066,9 +3061,7 @@ void FullCodeGenerator::VisitCall(Call* expr) { |
__ Push(Operand(rsp, (arg_count + 1) * kPointerSize)); |
EmitResolvePossiblyDirectEval(arg_count); |
- // The runtime call returns a pair of values in rax (function) and |
- // rdx (receiver). Touch up the stack with the right values. |
- __ movp(Operand(rsp, (arg_count + 0) * kPointerSize), rdx); |
+ // Touch up the callee. |
__ movp(Operand(rsp, (arg_count + 1) * kPointerSize), rax); |
PrepareForBailoutForId(expr->EvalOrLookupId(), NO_REGISTERS); |
@@ -4728,9 +4721,10 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) { |
context()->Plug(rax); |
} else if (proxy != NULL) { |
Variable* var = proxy->var(); |
- // Delete of an unqualified identifier is disallowed in strict mode |
- // but "delete this" is allowed. |
- DCHECK(is_sloppy(language_mode()) || var->is_this()); |
+ // Delete of an unqualified identifier is disallowed in strict mode but |
+ // "delete this" is allowed. |
+ bool is_this = var->HasThisName(isolate()); |
+ DCHECK(is_sloppy(language_mode()) || is_this); |
if (var->IsUnallocated()) { |
__ Push(GlobalObjectOperand()); |
__ Push(var->name()); |
@@ -4741,7 +4735,7 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) { |
// Result of deleting non-global variables is false. 'this' is |
// not really a variable, though we implement it as one. The |
// subexpression does not have side effects. |
- context()->Plug(var->is_this()); |
+ context()->Plug(is_this); |
} else { |
// Non-global variable. Call the runtime to try to delete from the |
// context where the variable was introduced. |