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

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

Issue 1419563006: X87: Remove receiver conversion from function prologue. (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 | « no previous file | src/full-codegen/x87/full-codegen-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 #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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 if (info()->IsOptimizing()) { 100 if (info()->IsOptimizing()) {
101 ProfileEntryHookStub::MaybeCallEntryHook(masm_); 101 ProfileEntryHookStub::MaybeCallEntryHook(masm_);
102 102
103 #ifdef DEBUG 103 #ifdef DEBUG
104 if (strlen(FLAG_stop_at) > 0 && 104 if (strlen(FLAG_stop_at) > 0 &&
105 info_->literal()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) { 105 info_->literal()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) {
106 __ int3(); 106 __ int3();
107 } 107 }
108 #endif 108 #endif
109 109
110 // Sloppy mode functions and builtins need to replace the receiver with the
111 // global proxy when called as functions (without an explicit receiver
112 // object).
113 if (info()->MustReplaceUndefinedReceiverWithGlobalProxy()) {
114 Label ok;
115 // +1 for return address.
116 int receiver_offset = (scope()->num_parameters() + 1) * kPointerSize;
117 __ mov(ecx, Operand(esp, receiver_offset));
118
119 __ cmp(ecx, isolate()->factory()->undefined_value());
120 __ j(not_equal, &ok, Label::kNear);
121
122 __ mov(ecx, GlobalObjectOperand());
123 __ mov(ecx, FieldOperand(ecx, JSGlobalObject::kGlobalProxyOffset));
124
125 __ mov(Operand(esp, receiver_offset), ecx);
126
127 __ bind(&ok);
128 }
129
130 if (support_aligned_spilled_doubles_ && dynamic_frame_alignment_) { 110 if (support_aligned_spilled_doubles_ && dynamic_frame_alignment_) {
131 // Move state of dynamic frame alignment into edx. 111 // Move state of dynamic frame alignment into edx.
132 __ Move(edx, Immediate(kNoAlignmentPadding)); 112 __ Move(edx, Immediate(kNoAlignmentPadding));
133 113
134 Label do_not_pad, align_loop; 114 Label do_not_pad, align_loop;
135 STATIC_ASSERT(kDoubleSize == 2 * kPointerSize); 115 STATIC_ASSERT(kDoubleSize == 2 * kPointerSize);
136 // Align esp + 4 to a multiple of 2 * kPointerSize. 116 // Align esp + 4 to a multiple of 2 * kPointerSize.
137 __ test(esp, Immediate(kPointerSize)); 117 __ test(esp, Immediate(kPointerSize));
138 __ j(not_zero, &do_not_pad, Label::kNear); 118 __ j(not_zero, &do_not_pad, Label::kNear);
139 __ push(Immediate(0)); 119 __ push(Immediate(0));
(...skipping 6148 matching lines...) Expand 10 before | Expand all | Expand 10 after
6288 RecordSafepoint(Safepoint::kNoLazyDeopt); 6268 RecordSafepoint(Safepoint::kNoLazyDeopt);
6289 } 6269 }
6290 6270
6291 6271
6292 #undef __ 6272 #undef __
6293 6273
6294 } // namespace internal 6274 } // namespace internal
6295 } // namespace v8 6275 } // namespace v8
6296 6276
6297 #endif // V8_TARGET_ARCH_X87 6277 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « no previous file | src/full-codegen/x87/full-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698