| 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 __ j(not_zero, &align_loop, Label::kNear); | 181 __ j(not_zero, &align_loop, Label::kNear); |
| 182 __ mov(Operand(ebx, 0), Immediate(kAlignmentZapValue)); | 182 __ mov(Operand(ebx, 0), Immediate(kAlignmentZapValue)); |
| 183 __ bind(&do_not_pad); | 183 __ bind(&do_not_pad); |
| 184 } | 184 } |
| 185 } | 185 } |
| 186 | 186 |
| 187 info()->set_prologue_offset(masm_->pc_offset()); | 187 info()->set_prologue_offset(masm_->pc_offset()); |
| 188 if (NeedsEagerFrame()) { | 188 if (NeedsEagerFrame()) { |
| 189 ASSERT(!frame_is_built_); | 189 ASSERT(!frame_is_built_); |
| 190 frame_is_built_ = true; | 190 frame_is_built_ = true; |
| 191 __ push(ebp); // Caller's frame pointer. | 191 if (FLAG_optimize_for_size && FLAG_age_code && !info()->IsStub()) { |
| 192 __ mov(ebp, esp); | 192 // Pre-age the code. |
| 193 info()->AddNoFrameRange(0, masm_->pc_offset()); | 193 __ call(isolate()->builtins()->MarkCodeAsExecutedOnce(), |
| 194 __ push(esi); // Callee's context. | 194 RelocInfo::CODE_AGE_SEQUENCE); |
| 195 if (info()->IsStub()) { | 195 __ Nop(kNoCodeAgeSequenceLength - Assembler::kCallInstructionLength); |
| 196 __ push(Immediate(Smi::FromInt(StackFrame::STUB))); | |
| 197 } else { | 196 } else { |
| 198 __ push(edi); // Callee's JS function. | 197 __ push(ebp); // Caller's frame pointer. |
| 198 __ mov(ebp, esp); |
| 199 info()->AddNoFrameRange(0, masm_->pc_offset()); |
| 200 __ push(esi); // Callee's context. |
| 201 if (info()->IsStub()) { |
| 202 __ push(Immediate(Smi::FromInt(StackFrame::STUB))); |
| 203 } else { |
| 204 __ push(edi); // Callee's JS function. |
| 205 } |
| 199 } | 206 } |
| 200 } | 207 } |
| 201 | 208 |
| 202 if (info()->IsOptimizing() && | 209 if (info()->IsOptimizing() && |
| 203 dynamic_frame_alignment_ && | 210 dynamic_frame_alignment_ && |
| 204 FLAG_debug_code) { | 211 FLAG_debug_code) { |
| 205 __ test(esp, Immediate(kPointerSize)); | 212 __ test(esp, Immediate(kPointerSize)); |
| 206 __ Assert(zero, kFrameIsExpectedToBeAligned); | 213 __ Assert(zero, kFrameIsExpectedToBeAligned); |
| 207 } | 214 } |
| 208 | 215 |
| (...skipping 6185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6394 FixedArray::kHeaderSize - kPointerSize)); | 6401 FixedArray::kHeaderSize - kPointerSize)); |
| 6395 __ bind(&done); | 6402 __ bind(&done); |
| 6396 } | 6403 } |
| 6397 | 6404 |
| 6398 | 6405 |
| 6399 #undef __ | 6406 #undef __ |
| 6400 | 6407 |
| 6401 } } // namespace v8::internal | 6408 } } // namespace v8::internal |
| 6402 | 6409 |
| 6403 #endif // V8_TARGET_ARCH_IA32 | 6410 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |