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

Side by Side Diff: src/crankshaft/x87/lithium-codegen-x87.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/x64/lithium-codegen-x64.cc ('k') | src/debug/debug.h » ('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_X87 5 #if V8_TARGET_ARCH_X87
6 6
7 #include "src/crankshaft/x87/lithium-codegen-x87.h" 7 #include "src/crankshaft/x87/lithium-codegen-x87.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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 if (info()->MustReplaceUndefinedReceiverWithGlobalProxy()) { 113 if (info()->MustReplaceUndefinedReceiverWithGlobalProxy()) {
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::kGlobalProxyOffset)); 123 __ mov(ecx, FieldOperand(ecx, JSGlobalObject::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 3340 matching lines...) Expand 10 before | Expand all | Expand 10 after
3474 __ test(receiver, Immediate(kSmiTagMask)); 3474 __ test(receiver, Immediate(kSmiTagMask));
3475 DeoptimizeIf(equal, instr, Deoptimizer::kSmi); 3475 DeoptimizeIf(equal, instr, Deoptimizer::kSmi);
3476 __ CmpObjectType(receiver, FIRST_SPEC_OBJECT_TYPE, scratch); 3476 __ CmpObjectType(receiver, FIRST_SPEC_OBJECT_TYPE, scratch);
3477 DeoptimizeIf(below, instr, Deoptimizer::kNotAJavaScriptObject); 3477 DeoptimizeIf(below, instr, Deoptimizer::kNotAJavaScriptObject);
3478 3478
3479 __ jmp(&receiver_ok, Label::kNear); 3479 __ jmp(&receiver_ok, Label::kNear);
3480 __ bind(&global_object); 3480 __ bind(&global_object);
3481 __ mov(receiver, FieldOperand(function, JSFunction::kContextOffset)); 3481 __ mov(receiver, FieldOperand(function, JSFunction::kContextOffset));
3482 const int global_offset = Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX); 3482 const int global_offset = Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX);
3483 __ mov(receiver, Operand(receiver, global_offset)); 3483 __ mov(receiver, Operand(receiver, global_offset));
3484 const int proxy_offset = GlobalObject::kGlobalProxyOffset; 3484 const int proxy_offset = JSGlobalObject::kGlobalProxyOffset;
3485 __ mov(receiver, FieldOperand(receiver, proxy_offset)); 3485 __ mov(receiver, FieldOperand(receiver, proxy_offset));
3486 __ bind(&receiver_ok); 3486 __ bind(&receiver_ok);
3487 } 3487 }
3488 3488
3489 3489
3490 void LCodeGen::DoApplyArguments(LApplyArguments* instr) { 3490 void LCodeGen::DoApplyArguments(LApplyArguments* instr) {
3491 Register receiver = ToRegister(instr->receiver()); 3491 Register receiver = ToRegister(instr->receiver());
3492 Register function = ToRegister(instr->function()); 3492 Register function = ToRegister(instr->function());
3493 Register length = ToRegister(instr->length()); 3493 Register length = ToRegister(instr->length());
3494 Register elements = ToRegister(instr->elements()); 3494 Register elements = ToRegister(instr->elements());
(...skipping 2793 matching lines...) Expand 10 before | Expand all | Expand 10 after
6288 RecordSafepoint(Safepoint::kNoLazyDeopt); 6288 RecordSafepoint(Safepoint::kNoLazyDeopt);
6289 } 6289 }
6290 6290
6291 6291
6292 #undef __ 6292 #undef __
6293 6293
6294 } // namespace internal 6294 } // namespace internal
6295 } // namespace v8 6295 } // namespace v8
6296 6296
6297 #endif // V8_TARGET_ARCH_X87 6297 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/crankshaft/x64/lithium-codegen-x64.cc ('k') | src/debug/debug.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698