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

Side by Side Diff: src/ia32/macro-assembler-ia32.cc

Issue 47023003: Avoid pre-aging when debugger is active (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Introduce IsCodePreAgingAcitve Created 7 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/arm/macro-assembler-arm.cc ('k') | src/isolate.h » ('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 15 matching lines...) Expand all
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
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
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
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698