OLD | NEW |
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 188 matching lines...) Loading... |
199 __ j(not_zero, &align_loop, Label::kNear); | 199 __ j(not_zero, &align_loop, Label::kNear); |
200 __ mov(Operand(ebx, 0), Immediate(kAlignmentZapValue)); | 200 __ mov(Operand(ebx, 0), Immediate(kAlignmentZapValue)); |
201 __ bind(&do_not_pad); | 201 __ bind(&do_not_pad); |
202 } | 202 } |
203 } | 203 } |
204 | 204 |
205 info()->set_prologue_offset(masm_->pc_offset()); | 205 info()->set_prologue_offset(masm_->pc_offset()); |
206 if (NeedsEagerFrame()) { | 206 if (NeedsEagerFrame()) { |
207 ASSERT(!frame_is_built_); | 207 ASSERT(!frame_is_built_); |
208 frame_is_built_ = true; | 208 frame_is_built_ = true; |
209 __ push(ebp); // Caller's frame pointer. | 209 if (FLAG_optimize_for_size && FLAG_age_code && !info()->IsStub()) { |
210 __ mov(ebp, esp); | 210 // Pre-age the code. |
211 info()->AddNoFrameRange(0, masm_->pc_offset()); | 211 __ call(isolate()->builtins()->MarkCodeAsExecutedOnce(), |
212 __ push(esi); // Callee's context. | 212 RelocInfo::CODE_AGE_SEQUENCE); |
213 if (info()->IsStub()) { | 213 for (int i = Assembler::kCallInstructionLength; |
214 __ push(Immediate(Smi::FromInt(StackFrame::STUB))); | 214 i < kNoCodeAgeSequenceLength; |
| 215 i++) { |
| 216 __ nop(); |
| 217 } |
215 } else { | 218 } else { |
216 __ push(edi); // Callee's JS function. | 219 __ push(ebp); // Caller's frame pointer. |
| 220 __ mov(ebp, esp); |
| 221 info()->AddNoFrameRange(0, masm_->pc_offset()); |
| 222 __ push(esi); // Callee's context. |
| 223 if (info()->IsStub()) { |
| 224 __ push(Immediate(Smi::FromInt(StackFrame::STUB))); |
| 225 } else { |
| 226 __ push(edi); // Callee's JS function. |
| 227 } |
217 } | 228 } |
218 } | 229 } |
219 | 230 |
220 if (info()->IsOptimizing() && | 231 if (info()->IsOptimizing() && |
221 dynamic_frame_alignment_ && | 232 dynamic_frame_alignment_ && |
222 FLAG_debug_code) { | 233 FLAG_debug_code) { |
223 __ test(esp, Immediate(kPointerSize)); | 234 __ test(esp, Immediate(kPointerSize)); |
224 __ Assert(zero, kFrameIsExpectedToBeAligned); | 235 __ Assert(zero, kFrameIsExpectedToBeAligned); |
225 } | 236 } |
226 | 237 |
(...skipping 6176 matching lines...) Loading... |
6403 FixedArray::kHeaderSize - kPointerSize)); | 6414 FixedArray::kHeaderSize - kPointerSize)); |
6404 __ bind(&done); | 6415 __ bind(&done); |
6405 } | 6416 } |
6406 | 6417 |
6407 | 6418 |
6408 #undef __ | 6419 #undef __ |
6409 | 6420 |
6410 } } // namespace v8::internal | 6421 } } // namespace v8::internal |
6411 | 6422 |
6412 #endif // V8_TARGET_ARCH_IA32 | 6423 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |