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

Side by Side Diff: src/crankshaft/ia32/lithium-codegen-ia32.cc

Issue 1406113007: Merge GlobalObject with JSGlobalObject. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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/crankshaft/hydrogen-instructions.h ('k') | src/crankshaft/mips/lithium-codegen-mips.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 #if V8_TARGET_ARCH_IA32 5 #if V8_TARGET_ARCH_IA32
6 6
7 #include "src/crankshaft/ia32/lithium-codegen-ia32.h" 7 #include "src/crankshaft/ia32/lithium-codegen-ia32.h"
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 if (info()->MustReplaceUndefinedReceiverWithGlobalProxy()) { 144 if (info()->MustReplaceUndefinedReceiverWithGlobalProxy()) {
145 Label ok; 145 Label ok;
146 // +1 for return address. 146 // +1 for return address.
147 int receiver_offset = (scope()->num_parameters() + 1) * kPointerSize; 147 int receiver_offset = (scope()->num_parameters() + 1) * kPointerSize;
148 __ mov(ecx, Operand(esp, receiver_offset)); 148 __ mov(ecx, Operand(esp, receiver_offset));
149 149
150 __ cmp(ecx, isolate()->factory()->undefined_value()); 150 __ cmp(ecx, isolate()->factory()->undefined_value());
151 __ j(not_equal, &ok, Label::kNear); 151 __ j(not_equal, &ok, Label::kNear);
152 152
153 __ mov(ecx, GlobalObjectOperand()); 153 __ mov(ecx, GlobalObjectOperand());
154 __ mov(ecx, FieldOperand(ecx, GlobalObject::kGlobalProxyOffset)); 154 __ mov(ecx, FieldOperand(ecx, JSGlobalObject::kGlobalProxyOffset));
155 155
156 __ mov(Operand(esp, receiver_offset), ecx); 156 __ mov(Operand(esp, receiver_offset), ecx);
157 157
158 __ bind(&ok); 158 __ bind(&ok);
159 } 159 }
160 160
161 if (support_aligned_spilled_doubles_ && dynamic_frame_alignment_) { 161 if (support_aligned_spilled_doubles_ && dynamic_frame_alignment_) {
162 // Move state of dynamic frame alignment into edx. 162 // Move state of dynamic frame alignment into edx.
163 __ Move(edx, Immediate(kNoAlignmentPadding)); 163 __ Move(edx, Immediate(kNoAlignmentPadding));
164 164
(...skipping 3038 matching lines...) Expand 10 before | Expand all | Expand 10 after
3203 __ test(receiver, Immediate(kSmiTagMask)); 3203 __ test(receiver, Immediate(kSmiTagMask));
3204 DeoptimizeIf(equal, instr, Deoptimizer::kSmi); 3204 DeoptimizeIf(equal, instr, Deoptimizer::kSmi);
3205 __ CmpObjectType(receiver, FIRST_SPEC_OBJECT_TYPE, scratch); 3205 __ CmpObjectType(receiver, FIRST_SPEC_OBJECT_TYPE, scratch);
3206 DeoptimizeIf(below, instr, Deoptimizer::kNotAJavaScriptObject); 3206 DeoptimizeIf(below, instr, Deoptimizer::kNotAJavaScriptObject);
3207 3207
3208 __ jmp(&receiver_ok, Label::kNear); 3208 __ jmp(&receiver_ok, Label::kNear);
3209 __ bind(&global_object); 3209 __ bind(&global_object);
3210 __ mov(receiver, FieldOperand(function, JSFunction::kContextOffset)); 3210 __ mov(receiver, FieldOperand(function, JSFunction::kContextOffset));
3211 const int global_offset = Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX); 3211 const int global_offset = Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX);
3212 __ mov(receiver, Operand(receiver, global_offset)); 3212 __ mov(receiver, Operand(receiver, global_offset));
3213 const int proxy_offset = GlobalObject::kGlobalProxyOffset; 3213 const int proxy_offset = JSGlobalObject::kGlobalProxyOffset;
3214 __ mov(receiver, FieldOperand(receiver, proxy_offset)); 3214 __ mov(receiver, FieldOperand(receiver, proxy_offset));
3215 __ bind(&receiver_ok); 3215 __ bind(&receiver_ok);
3216 } 3216 }
3217 3217
3218 3218
3219 void LCodeGen::DoApplyArguments(LApplyArguments* instr) { 3219 void LCodeGen::DoApplyArguments(LApplyArguments* instr) {
3220 Register receiver = ToRegister(instr->receiver()); 3220 Register receiver = ToRegister(instr->receiver());
3221 Register function = ToRegister(instr->function()); 3221 Register function = ToRegister(instr->function());
3222 Register length = ToRegister(instr->length()); 3222 Register length = ToRegister(instr->length());
3223 Register elements = ToRegister(instr->elements()); 3223 Register elements = ToRegister(instr->elements());
(...skipping 2449 matching lines...) Expand 10 before | Expand all | Expand 10 after
5673 RecordSafepoint(Safepoint::kNoLazyDeopt); 5673 RecordSafepoint(Safepoint::kNoLazyDeopt);
5674 } 5674 }
5675 5675
5676 5676
5677 #undef __ 5677 #undef __
5678 5678
5679 } // namespace internal 5679 } // namespace internal
5680 } // namespace v8 5680 } // namespace v8
5681 5681
5682 #endif // V8_TARGET_ARCH_IA32 5682 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen-instructions.h ('k') | src/crankshaft/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698