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

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

Issue 11361182: Disable code aging due to bugs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove unneeded change Created 8 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 | Annotate | Revision Log
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/x64/full-codegen-x64.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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 Label begin; 143 Label begin;
144 __ bind(&begin); 144 __ bind(&begin);
145 Label ok; 145 Label ok;
146 __ test(ecx, Operand(ecx)); 146 __ test(ecx, Operand(ecx));
147 __ j(zero, &ok, Label::kNear); 147 __ j(zero, &ok, Label::kNear);
148 // +1 for return address. 148 // +1 for return address.
149 int receiver_offset = (scope()->num_parameters() + 1) * kPointerSize; 149 int receiver_offset = (scope()->num_parameters() + 1) * kPointerSize;
150 __ mov(Operand(esp, receiver_offset), 150 __ mov(Operand(esp, receiver_offset),
151 Immediate(isolate()->factory()->undefined_value())); 151 Immediate(isolate()->factory()->undefined_value()));
152 __ bind(&ok); 152 __ bind(&ok);
153 ASSERT_EQ(kSizeOfOptimizedStrictModePrologue, ok.pos() - begin.pos()); 153 ASSERT(!FLAG_age_code ||
154 (kSizeOfOptimizedStrictModePrologue == ok.pos() - begin.pos()));
154 } 155 }
155 156
156 157
157 if (dynamic_frame_alignment_) { 158 if (dynamic_frame_alignment_) {
158 Label begin; 159 Label begin;
159 __ bind(&begin); 160 __ bind(&begin);
160 // Move state of dynamic frame alignment into edx. 161 // Move state of dynamic frame alignment into edx.
161 __ mov(edx, Immediate(kNoAlignmentPadding)); 162 __ mov(edx, Immediate(kNoAlignmentPadding));
162 163
163 Label do_not_pad, align_loop; 164 Label do_not_pad, align_loop;
164 STATIC_ASSERT(kDoubleSize == 2 * kPointerSize); 165 STATIC_ASSERT(kDoubleSize == 2 * kPointerSize);
165 // Align esp + 4 to a multiple of 2 * kPointerSize. 166 // Align esp + 4 to a multiple of 2 * kPointerSize.
166 __ test(esp, Immediate(kPointerSize)); 167 __ test(esp, Immediate(kPointerSize));
167 __ j(not_zero, &do_not_pad, Label::kNear); 168 __ j(not_zero, &do_not_pad, Label::kNear);
168 __ push(Immediate(0)); 169 __ push(Immediate(0));
169 __ mov(ebx, esp); 170 __ mov(ebx, esp);
170 __ mov(edx, Immediate(kAlignmentPaddingPushed)); 171 __ mov(edx, Immediate(kAlignmentPaddingPushed));
171 // Copy arguments, receiver, and return address. 172 // Copy arguments, receiver, and return address.
172 __ mov(ecx, Immediate(scope()->num_parameters() + 2)); 173 __ mov(ecx, Immediate(scope()->num_parameters() + 2));
173 174
174 __ bind(&align_loop); 175 __ bind(&align_loop);
175 __ mov(eax, Operand(ebx, 1 * kPointerSize)); 176 __ mov(eax, Operand(ebx, 1 * kPointerSize));
176 __ mov(Operand(ebx, 0), eax); 177 __ mov(Operand(ebx, 0), eax);
177 __ add(Operand(ebx), Immediate(kPointerSize)); 178 __ add(Operand(ebx), Immediate(kPointerSize));
178 __ dec(ecx); 179 __ dec(ecx);
179 __ j(not_zero, &align_loop, Label::kNear); 180 __ j(not_zero, &align_loop, Label::kNear);
180 __ mov(Operand(ebx, 0), Immediate(kAlignmentZapValue)); 181 __ mov(Operand(ebx, 0), Immediate(kAlignmentZapValue));
181 __ bind(&do_not_pad); 182 __ bind(&do_not_pad);
182 ASSERT_EQ(kSizeOfOptimizedAlignStackPrologue, 183 ASSERT(!FLAG_age_code ||
183 do_not_pad.pos() - begin.pos()); 184 (kSizeOfOptimizedAlignStackPrologue ==
185 do_not_pad.pos() - begin.pos()));
184 } 186 }
185 187
186 __ push(ebp); // Caller's frame pointer. 188 __ push(ebp); // Caller's frame pointer.
187 __ mov(ebp, esp); 189 __ mov(ebp, esp);
188 __ push(esi); // Callee's context. 190 __ push(esi); // Callee's context.
189 __ push(edi); // Callee's JS function. 191 __ push(edi); // Callee's JS function.
190 192
191 if (dynamic_frame_alignment_ && FLAG_debug_code) { 193 if (dynamic_frame_alignment_ && FLAG_debug_code) {
192 __ test(esp, Immediate(kPointerSize)); 194 __ test(esp, Immediate(kPointerSize));
193 __ Assert(zero, "frame is expected to be aligned"); 195 __ Assert(zero, "frame is expected to be aligned");
(...skipping 5379 matching lines...) Expand 10 before | Expand all | Expand 10 after
5573 FixedArray::kHeaderSize - kPointerSize)); 5575 FixedArray::kHeaderSize - kPointerSize));
5574 __ bind(&done); 5576 __ bind(&done);
5575 } 5577 }
5576 5578
5577 5579
5578 #undef __ 5580 #undef __
5579 5581
5580 } } // namespace v8::internal 5582 } } // namespace v8::internal
5581 5583
5582 #endif // V8_TARGET_ARCH_IA32 5584 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698