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 15 matching lines...) Expand all Loading... |
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | 27 |
28 #include "v8.h" | 28 #include "v8.h" |
29 | 29 |
30 #if V8_TARGET_ARCH_IA32 | 30 #if V8_TARGET_ARCH_IA32 |
31 | 31 |
32 #include "bootstrapper.h" | 32 #include "bootstrapper.h" |
33 #include "codegen.h" | 33 #include "codegen.h" |
34 #include "cpu-profiler.h" | 34 #include "cpu-profiler.h" |
35 #include "debug.h" | 35 #include "debug.h" |
| 36 #include "isolate-inl.h" |
36 #include "runtime.h" | 37 #include "runtime.h" |
37 #include "serialize.h" | 38 #include "serialize.h" |
38 | 39 |
39 namespace v8 { | 40 namespace v8 { |
40 namespace internal { | 41 namespace internal { |
41 | 42 |
42 // ------------------------------------------------------------------------- | 43 // ------------------------------------------------------------------------- |
43 // MacroAssembler implementation. | 44 // MacroAssembler implementation. |
44 | 45 |
45 MacroAssembler::MacroAssembler(Isolate* arg_isolate, void* buffer, int size) | 46 MacroAssembler::MacroAssembler(Isolate* arg_isolate, void* buffer, int size) |
(...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1015 | 1016 |
1016 void MacroAssembler::Prologue(PrologueFrameMode frame_mode) { | 1017 void MacroAssembler::Prologue(PrologueFrameMode frame_mode) { |
1017 if (frame_mode == BUILD_STUB_FRAME) { | 1018 if (frame_mode == BUILD_STUB_FRAME) { |
1018 push(ebp); // Caller's frame pointer. | 1019 push(ebp); // Caller's frame pointer. |
1019 mov(ebp, esp); | 1020 mov(ebp, esp); |
1020 push(esi); // Callee's context. | 1021 push(esi); // Callee's context. |
1021 push(Immediate(Smi::FromInt(StackFrame::STUB))); | 1022 push(Immediate(Smi::FromInt(StackFrame::STUB))); |
1022 } else { | 1023 } else { |
1023 PredictableCodeSizeScope predictible_code_size_scope(this, | 1024 PredictableCodeSizeScope predictible_code_size_scope(this, |
1024 kNoCodeAgeSequenceLength); | 1025 kNoCodeAgeSequenceLength); |
1025 if (FLAG_optimize_for_size && FLAG_age_code) { | 1026 if (isolate()->IsCodePreAgingActive()) { |
1026 // Pre-age the code. | 1027 // Pre-age the code. |
1027 call(isolate()->builtins()->MarkCodeAsExecutedOnce(), | 1028 call(isolate()->builtins()->MarkCodeAsExecutedOnce(), |
1028 RelocInfo::CODE_AGE_SEQUENCE); | 1029 RelocInfo::CODE_AGE_SEQUENCE); |
1029 Nop(kNoCodeAgeSequenceLength - Assembler::kCallInstructionLength); | 1030 Nop(kNoCodeAgeSequenceLength - Assembler::kCallInstructionLength); |
1030 } else { | 1031 } else { |
1031 push(ebp); // Caller's frame pointer. | 1032 push(ebp); // Caller's frame pointer. |
1032 mov(ebp, esp); | 1033 mov(ebp, esp); |
1033 push(esi); // Callee's context. | 1034 push(esi); // Callee's context. |
1034 push(edi); // Callee's JS function. | 1035 push(edi); // Callee's JS function. |
1035 } | 1036 } |
(...skipping 2510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3546 cmp(scratch_reg, Operand::StaticVariable(new_space_allocation_top)); | 3547 cmp(scratch_reg, Operand::StaticVariable(new_space_allocation_top)); |
3547 j(greater, no_memento_found); | 3548 j(greater, no_memento_found); |
3548 cmp(MemOperand(scratch_reg, -AllocationMemento::kSize), | 3549 cmp(MemOperand(scratch_reg, -AllocationMemento::kSize), |
3549 Immediate(isolate()->factory()->allocation_memento_map())); | 3550 Immediate(isolate()->factory()->allocation_memento_map())); |
3550 } | 3551 } |
3551 | 3552 |
3552 | 3553 |
3553 } } // namespace v8::internal | 3554 } } // namespace v8::internal |
3554 | 3555 |
3555 #endif // V8_TARGET_ARCH_IA32 | 3556 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |