Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Unified Diff: src/arm/full-codegen-arm.cc

Issue 1146733002: Revert of Reapply "Resolve references to "this" the same way as normal variables"" (Closed) Base URL: https://chromium.googlesource.com/v8/v8@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/full-codegen-arm.cc
diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc
index 70a76e1e0918fb17bc1f17616983738177e22d67..dbf81516987e933e0ffcf7c4f8d61610807aaaf9 100644
--- a/src/arm/full-codegen-arm.cc
+++ b/src/arm/full-codegen-arm.cc
@@ -127,7 +127,7 @@
// global proxy when called as functions (without an explicit receiver
// object).
if (is_sloppy(info->language_mode()) && !info->is_native() &&
- info->MayUseThis() && info->scope()->has_this_declaration()) {
+ info->MayUseThis()) {
Label ok;
int receiver_offset = info->scope()->num_parameters() * kPointerSize;
__ ldr(r2, MemOperand(sp, receiver_offset));
@@ -216,9 +216,8 @@
__ str(r0, MemOperand(fp, StandardFrameConstants::kContextOffset));
// Copy any necessary parameters into the context.
int num_parameters = info->scope()->num_parameters();
- int first_parameter = info->scope()->has_this_declaration() ? -1 : 0;
- for (int i = first_parameter; i < num_parameters; i++) {
- Variable* var = (i == -1) ? scope()->receiver() : scope()->parameter(i);
+ for (int i = 0; i < num_parameters; i++) {
+ Variable* var = scope()->parameter(i);
if (var->IsContextSlot()) {
int parameter_offset = StandardFrameConstants::kCallerSPOffset +
(num_parameters - 1 - i) * kPointerSize;
@@ -3046,9 +3045,8 @@
__ ldr(r4, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
// r3: the receiver of the enclosing function.
- Variable* this_var = scope()->LookupThis();
- DCHECK_NOT_NULL(this_var);
- __ ldr(r3, VarOperand(this_var, r3));
+ int receiver_offset = 2 + info_->scope()->num_parameters();
+ __ ldr(r3, MemOperand(fp, receiver_offset * kPointerSize));
// r2: language mode.
__ mov(r2, Operand(Smi::FromInt(language_mode())));
« no previous file with comments | « no previous file | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698