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

Side by Side Diff: src/mips64/lithium-codegen-mips64.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 | « src/mips/lithium-codegen-mips.cc ('k') | src/ppc/lithium-codegen-ppc.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/code-factory.h" 5 #include "src/code-factory.h"
6 #include "src/code-stubs.h" 6 #include "src/code-stubs.h"
7 #include "src/cpu-profiler.h" 7 #include "src/cpu-profiler.h"
8 #include "src/hydrogen-osr.h" 8 #include "src/hydrogen-osr.h"
9 #include "src/ic/ic.h" 9 #include "src/ic/ic.h"
10 #include "src/ic/stub-cache.h" 10 #include "src/ic/stub-cache.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 #endif 109 #endif
110 110
111 // a1: Callee's JS function. 111 // a1: Callee's JS function.
112 // cp: Callee's context. 112 // cp: Callee's context.
113 // fp: Caller's frame pointer. 113 // fp: Caller's frame pointer.
114 // lr: Caller's pc. 114 // lr: Caller's pc.
115 115
116 // Sloppy mode functions and builtins need to replace the receiver with the 116 // Sloppy mode functions and builtins need to replace the receiver with the
117 // global proxy when called as functions (without an explicit receiver 117 // global proxy when called as functions (without an explicit receiver
118 // object). 118 // object).
119 if (is_sloppy(info()->language_mode()) && info()->MayUseThis() && 119 if (info()->MustReplaceUndefinedReceiverWithGlobalProxy()) {
120 !info()->is_native() && info()->scope()->has_this_declaration()) {
121 Label ok; 120 Label ok;
122 int receiver_offset = info_->scope()->num_parameters() * kPointerSize; 121 int receiver_offset = info_->scope()->num_parameters() * kPointerSize;
123 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); 122 __ LoadRoot(at, Heap::kUndefinedValueRootIndex);
124 __ ld(a2, MemOperand(sp, receiver_offset)); 123 __ ld(a2, MemOperand(sp, receiver_offset));
125 __ Branch(&ok, ne, a2, Operand(at)); 124 __ Branch(&ok, ne, a2, Operand(at));
126 125
127 __ ld(a2, GlobalObjectOperand()); 126 __ ld(a2, GlobalObjectOperand());
128 __ ld(a2, FieldMemOperand(a2, GlobalObject::kGlobalProxyOffset)); 127 __ ld(a2, FieldMemOperand(a2, GlobalObject::kGlobalProxyOffset));
129 128
130 __ sd(a2, MemOperand(sp, receiver_offset)); 129 __ sd(a2, MemOperand(sp, receiver_offset));
(...skipping 5983 matching lines...) Expand 10 before | Expand all | Expand 10 after
6114 __ Push(at, ToRegister(instr->function())); 6113 __ Push(at, ToRegister(instr->function()));
6115 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6114 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6116 RecordSafepoint(Safepoint::kNoLazyDeopt); 6115 RecordSafepoint(Safepoint::kNoLazyDeopt);
6117 } 6116 }
6118 6117
6119 6118
6120 #undef __ 6119 #undef __
6121 6120
6122 } // namespace internal 6121 } // namespace internal
6123 } // namespace v8 6122 } // namespace v8
OLDNEW
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | src/ppc/lithium-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698