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

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

Issue 352173006: Clean up the global object naming madness. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/ia32/stub-cache-ia32.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/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 !info_->is_native()) { 144 !info_->is_native()) {
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::kGlobalReceiverOffset)); 154 __ mov(ecx, FieldOperand(ecx, GlobalObject::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 3137 matching lines...) Expand 10 before | Expand all | Expand 10 after
3302 __ test(receiver, Immediate(kSmiTagMask)); 3302 __ test(receiver, Immediate(kSmiTagMask));
3303 DeoptimizeIf(equal, instr->environment()); 3303 DeoptimizeIf(equal, instr->environment());
3304 __ CmpObjectType(receiver, FIRST_SPEC_OBJECT_TYPE, scratch); 3304 __ CmpObjectType(receiver, FIRST_SPEC_OBJECT_TYPE, scratch);
3305 DeoptimizeIf(below, instr->environment()); 3305 DeoptimizeIf(below, instr->environment());
3306 3306
3307 __ jmp(&receiver_ok, Label::kNear); 3307 __ jmp(&receiver_ok, Label::kNear);
3308 __ bind(&global_object); 3308 __ bind(&global_object);
3309 __ mov(receiver, FieldOperand(function, JSFunction::kContextOffset)); 3309 __ mov(receiver, FieldOperand(function, JSFunction::kContextOffset));
3310 const int global_offset = Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX); 3310 const int global_offset = Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX);
3311 __ mov(receiver, Operand(receiver, global_offset)); 3311 __ mov(receiver, Operand(receiver, global_offset));
3312 const int receiver_offset = GlobalObject::kGlobalReceiverOffset; 3312 const int proxy_offset = GlobalObject::kGlobalProxyOffset;
3313 __ mov(receiver, FieldOperand(receiver, receiver_offset)); 3313 __ mov(receiver, FieldOperand(receiver, proxy_offset));
3314 __ bind(&receiver_ok); 3314 __ bind(&receiver_ok);
3315 } 3315 }
3316 3316
3317 3317
3318 void LCodeGen::DoApplyArguments(LApplyArguments* instr) { 3318 void LCodeGen::DoApplyArguments(LApplyArguments* instr) {
3319 Register receiver = ToRegister(instr->receiver()); 3319 Register receiver = ToRegister(instr->receiver());
3320 Register function = ToRegister(instr->function()); 3320 Register function = ToRegister(instr->function());
3321 Register length = ToRegister(instr->length()); 3321 Register length = ToRegister(instr->length());
3322 Register elements = ToRegister(instr->elements()); 3322 Register elements = ToRegister(instr->elements());
3323 ASSERT(receiver.is(eax)); // Used for parameter count. 3323 ASSERT(receiver.is(eax)); // Used for parameter count.
(...skipping 2338 matching lines...) Expand 10 before | Expand all | Expand 10 after
5662 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5662 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5663 RecordSafepoint(Safepoint::kNoLazyDeopt); 5663 RecordSafepoint(Safepoint::kNoLazyDeopt);
5664 } 5664 }
5665 5665
5666 5666
5667 #undef __ 5667 #undef __
5668 5668
5669 } } // namespace v8::internal 5669 } } // namespace v8::internal
5670 5670
5671 #endif // V8_TARGET_ARCH_IA32 5671 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698