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 995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1006 | 1006 |
1007 | 1007 |
1008 void MacroAssembler::AssertNotSmi(Register object) { | 1008 void MacroAssembler::AssertNotSmi(Register object) { |
1009 if (emit_debug_code()) { | 1009 if (emit_debug_code()) { |
1010 test(object, Immediate(kSmiTagMask)); | 1010 test(object, Immediate(kSmiTagMask)); |
1011 Check(not_equal, kOperandIsASmi); | 1011 Check(not_equal, kOperandIsASmi); |
1012 } | 1012 } |
1013 } | 1013 } |
1014 | 1014 |
1015 | 1015 |
| 1016 void MacroAssembler::Prologue(PrologueFrameMode frame_mode) { |
| 1017 if (frame_mode == BUILD_STUB_FRAME) { |
| 1018 push(ebp); // Caller's frame pointer. |
| 1019 mov(ebp, esp); |
| 1020 push(esi); // Callee's context. |
| 1021 push(Immediate(Smi::FromInt(StackFrame::STUB))); |
| 1022 } else { |
| 1023 PredictableCodeSizeScope predictible_code_size_scope(this, |
| 1024 kNoCodeAgeSequenceLength); |
| 1025 if (FLAG_optimize_for_size && FLAG_age_code) { |
| 1026 // Pre-age the code. |
| 1027 call(isolate()->builtins()->MarkCodeAsExecutedOnce(), |
| 1028 RelocInfo::CODE_AGE_SEQUENCE); |
| 1029 Nop(kNoCodeAgeSequenceLength - Assembler::kCallInstructionLength); |
| 1030 } else { |
| 1031 push(ebp); // Caller's frame pointer. |
| 1032 mov(ebp, esp); |
| 1033 push(esi); // Callee's context. |
| 1034 push(edi); // Callee's JS function. |
| 1035 } |
| 1036 } |
| 1037 } |
| 1038 |
| 1039 |
1016 void MacroAssembler::EnterFrame(StackFrame::Type type) { | 1040 void MacroAssembler::EnterFrame(StackFrame::Type type) { |
1017 push(ebp); | 1041 push(ebp); |
1018 mov(ebp, esp); | 1042 mov(ebp, esp); |
1019 push(esi); | 1043 push(esi); |
1020 push(Immediate(Smi::FromInt(type))); | 1044 push(Immediate(Smi::FromInt(type))); |
1021 push(Immediate(CodeObject())); | 1045 push(Immediate(CodeObject())); |
1022 if (emit_debug_code()) { | 1046 if (emit_debug_code()) { |
1023 cmp(Operand(esp, 0), Immediate(isolate()->factory()->undefined_value())); | 1047 cmp(Operand(esp, 0), Immediate(isolate()->factory()->undefined_value())); |
1024 Check(not_equal, kCodeObjectNotProperlyPatched); | 1048 Check(not_equal, kCodeObjectNotProperlyPatched); |
1025 } | 1049 } |
(...skipping 2496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3522 cmp(scratch_reg, Operand::StaticVariable(new_space_allocation_top)); | 3546 cmp(scratch_reg, Operand::StaticVariable(new_space_allocation_top)); |
3523 j(greater, no_memento_found); | 3547 j(greater, no_memento_found); |
3524 cmp(MemOperand(scratch_reg, -AllocationMemento::kSize), | 3548 cmp(MemOperand(scratch_reg, -AllocationMemento::kSize), |
3525 Immediate(isolate()->factory()->allocation_memento_map())); | 3549 Immediate(isolate()->factory()->allocation_memento_map())); |
3526 } | 3550 } |
3527 | 3551 |
3528 | 3552 |
3529 } } // namespace v8::internal | 3553 } } // namespace v8::internal |
3530 | 3554 |
3531 #endif // V8_TARGET_ARCH_IA32 | 3555 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |