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

Side by Side Diff: src/arm/lithium-codegen-arm.cc

Issue 1312713004: Remove CompilationInfo::MayUseThis() and replace it with what we really want to know: MustReplaceUn… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/arm64/lithium-codegen-arm64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/arm/lithium-codegen-arm.h" 5 #include "src/arm/lithium-codegen-arm.h"
6 #include "src/arm/lithium-gap-resolver-arm.h" 6 #include "src/arm/lithium-gap-resolver-arm.h"
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/cpu-profiler.h" 10 #include "src/cpu-profiler.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 111
112 // r1: Callee's JS function. 112 // r1: Callee's JS function.
113 // cp: Callee's context. 113 // cp: Callee's context.
114 // pp: Callee's constant pool pointer (if enabled) 114 // pp: Callee's constant pool pointer (if enabled)
115 // fp: Caller's frame pointer. 115 // fp: Caller's frame pointer.
116 // lr: Caller's pc. 116 // lr: Caller's pc.
117 117
118 // Sloppy mode functions and builtins need to replace the receiver with the 118 // Sloppy mode functions and builtins need to replace the receiver with the
119 // global proxy when called as functions (without an explicit receiver 119 // global proxy when called as functions (without an explicit receiver
120 // object). 120 // object).
121 if (is_sloppy(info_->language_mode()) && info()->MayUseThis() && 121 if (info()->MustReplaceUndefinedReceiverWithGlobalProxy()) {
122 !info_->is_native() && info_->scope()->has_this_declaration()) {
123 Label ok; 122 Label ok;
124 int receiver_offset = info_->scope()->num_parameters() * kPointerSize; 123 int receiver_offset = info_->scope()->num_parameters() * kPointerSize;
125 __ ldr(r2, MemOperand(sp, receiver_offset)); 124 __ ldr(r2, MemOperand(sp, receiver_offset));
126 __ CompareRoot(r2, Heap::kUndefinedValueRootIndex); 125 __ CompareRoot(r2, Heap::kUndefinedValueRootIndex);
127 __ b(ne, &ok); 126 __ b(ne, &ok);
128 127
129 __ ldr(r2, GlobalObjectOperand()); 128 __ ldr(r2, GlobalObjectOperand());
130 __ ldr(r2, FieldMemOperand(r2, GlobalObject::kGlobalProxyOffset)); 129 __ ldr(r2, FieldMemOperand(r2, GlobalObject::kGlobalProxyOffset));
131 130
132 __ str(r2, MemOperand(sp, receiver_offset)); 131 __ str(r2, MemOperand(sp, receiver_offset));
(...skipping 5740 matching lines...) Expand 10 before | Expand all | Expand 10 after
5873 __ push(ToRegister(instr->function())); 5872 __ push(ToRegister(instr->function()));
5874 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5873 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5875 RecordSafepoint(Safepoint::kNoLazyDeopt); 5874 RecordSafepoint(Safepoint::kNoLazyDeopt);
5876 } 5875 }
5877 5876
5878 5877
5879 #undef __ 5878 #undef __
5880 5879
5881 } // namespace internal 5880 } // namespace internal
5882 } // namespace v8 5881 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/arm64/lithium-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698