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

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

Issue 362943002: X87: Clean up the global object naming madness. (Closed) Base URL: https://github.com/v8/v8.git@master
Patch Set: 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
« no previous file with comments | « src/x87/full-codegen-x87.cc ('k') | src/x87/stub-cache-x87.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_X87 7 #if V8_TARGET_ARCH_X87
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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 !info_->is_native()) { 113 !info_->is_native()) {
114 Label ok; 114 Label ok;
115 // +1 for return address. 115 // +1 for return address.
116 int receiver_offset = (scope()->num_parameters() + 1) * kPointerSize; 116 int receiver_offset = (scope()->num_parameters() + 1) * kPointerSize;
117 __ mov(ecx, Operand(esp, receiver_offset)); 117 __ mov(ecx, Operand(esp, receiver_offset));
118 118
119 __ cmp(ecx, isolate()->factory()->undefined_value()); 119 __ cmp(ecx, isolate()->factory()->undefined_value());
120 __ j(not_equal, &ok, Label::kNear); 120 __ j(not_equal, &ok, Label::kNear);
121 121
122 __ mov(ecx, GlobalObjectOperand()); 122 __ mov(ecx, GlobalObjectOperand());
123 __ mov(ecx, FieldOperand(ecx, GlobalObject::kGlobalReceiverOffset)); 123 __ mov(ecx, FieldOperand(ecx, GlobalObject::kGlobalProxyOffset));
124 124
125 __ mov(Operand(esp, receiver_offset), ecx); 125 __ mov(Operand(esp, receiver_offset), ecx);
126 126
127 __ bind(&ok); 127 __ bind(&ok);
128 } 128 }
129 129
130 if (support_aligned_spilled_doubles_ && dynamic_frame_alignment_) { 130 if (support_aligned_spilled_doubles_ && dynamic_frame_alignment_) {
131 // Move state of dynamic frame alignment into edx. 131 // Move state of dynamic frame alignment into edx.
132 __ Move(edx, Immediate(kNoAlignmentPadding)); 132 __ Move(edx, Immediate(kNoAlignmentPadding));
133 133
(...skipping 3298 matching lines...) Expand 10 before | Expand all | Expand 10 after
3432 __ test(receiver, Immediate(kSmiTagMask)); 3432 __ test(receiver, Immediate(kSmiTagMask));
3433 DeoptimizeIf(equal, instr->environment()); 3433 DeoptimizeIf(equal, instr->environment());
3434 __ CmpObjectType(receiver, FIRST_SPEC_OBJECT_TYPE, scratch); 3434 __ CmpObjectType(receiver, FIRST_SPEC_OBJECT_TYPE, scratch);
3435 DeoptimizeIf(below, instr->environment()); 3435 DeoptimizeIf(below, instr->environment());
3436 3436
3437 __ jmp(&receiver_ok, Label::kNear); 3437 __ jmp(&receiver_ok, Label::kNear);
3438 __ bind(&global_object); 3438 __ bind(&global_object);
3439 __ mov(receiver, FieldOperand(function, JSFunction::kContextOffset)); 3439 __ mov(receiver, FieldOperand(function, JSFunction::kContextOffset));
3440 const int global_offset = Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX); 3440 const int global_offset = Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX);
3441 __ mov(receiver, Operand(receiver, global_offset)); 3441 __ mov(receiver, Operand(receiver, global_offset));
3442 const int receiver_offset = GlobalObject::kGlobalReceiverOffset; 3442 const int proxy_offset = GlobalObject::kGlobalProxyOffset;
3443 __ mov(receiver, FieldOperand(receiver, receiver_offset)); 3443 __ mov(receiver, FieldOperand(receiver, proxy_offset));
3444 __ bind(&receiver_ok); 3444 __ bind(&receiver_ok);
3445 } 3445 }
3446 3446
3447 3447
3448 void LCodeGen::DoApplyArguments(LApplyArguments* instr) { 3448 void LCodeGen::DoApplyArguments(LApplyArguments* instr) {
3449 Register receiver = ToRegister(instr->receiver()); 3449 Register receiver = ToRegister(instr->receiver());
3450 Register function = ToRegister(instr->function()); 3450 Register function = ToRegister(instr->function());
3451 Register length = ToRegister(instr->length()); 3451 Register length = ToRegister(instr->length());
3452 Register elements = ToRegister(instr->elements()); 3452 Register elements = ToRegister(instr->elements());
3453 ASSERT(receiver.is(eax)); // Used for parameter count. 3453 ASSERT(receiver.is(eax)); // Used for parameter count.
(...skipping 2244 matching lines...) Expand 10 before | Expand all | Expand 10 after
5698 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5698 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5699 RecordSafepoint(Safepoint::kNoLazyDeopt); 5699 RecordSafepoint(Safepoint::kNoLazyDeopt);
5700 } 5700 }
5701 5701
5702 5702
5703 #undef __ 5703 #undef __
5704 5704
5705 } } // namespace v8::internal 5705 } } // namespace v8::internal
5706 5706
5707 #endif // V8_TARGET_ARCH_X87 5707 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x87/full-codegen-x87.cc ('k') | src/x87/stub-cache-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698