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

Side by Side Diff: src/arm/macro-assembler-arm.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 | « no previous file | src/ia32/macro-assembler-ia32.cc » ('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 17 matching lines...) Expand all
28 #include <limits.h> // For LONG_MIN, LONG_MAX. 28 #include <limits.h> // For LONG_MIN, LONG_MAX.
29 29
30 #include "v8.h" 30 #include "v8.h"
31 31
32 #if V8_TARGET_ARCH_ARM 32 #if V8_TARGET_ARCH_ARM
33 33
34 #include "bootstrapper.h" 34 #include "bootstrapper.h"
35 #include "codegen.h" 35 #include "codegen.h"
36 #include "cpu-profiler.h" 36 #include "cpu-profiler.h"
37 #include "debug.h" 37 #include "debug.h"
38 #include "isolate-inl.h"
38 #include "runtime.h" 39 #include "runtime.h"
39 40
40 namespace v8 { 41 namespace v8 {
41 namespace internal { 42 namespace internal {
42 43
43 MacroAssembler::MacroAssembler(Isolate* arg_isolate, void* buffer, int size) 44 MacroAssembler::MacroAssembler(Isolate* arg_isolate, void* buffer, int size)
44 : Assembler(arg_isolate, buffer, size), 45 : Assembler(arg_isolate, buffer, size),
45 generating_stub_(false), 46 generating_stub_(false),
46 allow_stub_calls_(true), 47 allow_stub_calls_(true),
47 has_frame_(false) { 48 has_frame_(false) {
(...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after
919 if (frame_mode == BUILD_STUB_FRAME) { 920 if (frame_mode == BUILD_STUB_FRAME) {
920 stm(db_w, sp, cp.bit() | fp.bit() | lr.bit()); 921 stm(db_w, sp, cp.bit() | fp.bit() | lr.bit());
921 Push(Smi::FromInt(StackFrame::STUB)); 922 Push(Smi::FromInt(StackFrame::STUB));
922 // Adjust FP to point to saved FP. 923 // Adjust FP to point to saved FP.
923 add(fp, sp, Operand(2 * kPointerSize)); 924 add(fp, sp, Operand(2 * kPointerSize));
924 } else { 925 } else {
925 PredictableCodeSizeScope predictible_code_size_scope( 926 PredictableCodeSizeScope predictible_code_size_scope(
926 this, kNoCodeAgeSequenceLength * Assembler::kInstrSize); 927 this, kNoCodeAgeSequenceLength * Assembler::kInstrSize);
927 // The following three instructions must remain together and unmodified 928 // The following three instructions must remain together and unmodified
928 // for code aging to work properly. 929 // for code aging to work properly.
929 if (FLAG_optimize_for_size && FLAG_age_code) { 930 if (isolate()->IsCodePreAgingActive()) {
930 // Pre-age the code. 931 // Pre-age the code.
931 Code* stub = Code::GetPreAgedCodeAgeStub(isolate()); 932 Code* stub = Code::GetPreAgedCodeAgeStub(isolate());
932 add(r0, pc, Operand(-8)); 933 add(r0, pc, Operand(-8));
933 ldr(pc, MemOperand(pc, -4)); 934 ldr(pc, MemOperand(pc, -4));
934 dd(reinterpret_cast<uint32_t>(stub->instruction_start())); 935 dd(reinterpret_cast<uint32_t>(stub->instruction_start()));
935 } else { 936 } else {
936 stm(db_w, sp, r1.bit() | cp.bit() | fp.bit() | lr.bit()); 937 stm(db_w, sp, r1.bit() | cp.bit() | fp.bit() | lr.bit());
937 nop(ip.code()); 938 nop(ip.code());
938 // Adjust FP to point to saved FP. 939 // Adjust FP to point to saved FP.
939 add(fp, sp, Operand(2 * kPointerSize)); 940 add(fp, sp, Operand(2 * kPointerSize));
(...skipping 3051 matching lines...) Expand 10 before | Expand all | Expand 10 after
3991 void CodePatcher::EmitCondition(Condition cond) { 3992 void CodePatcher::EmitCondition(Condition cond) {
3992 Instr instr = Assembler::instr_at(masm_.pc_); 3993 Instr instr = Assembler::instr_at(masm_.pc_);
3993 instr = (instr & ~kCondMask) | cond; 3994 instr = (instr & ~kCondMask) | cond;
3994 masm_.emit(instr); 3995 masm_.emit(instr);
3995 } 3996 }
3996 3997
3997 3998
3998 } } // namespace v8::internal 3999 } } // namespace v8::internal
3999 4000
4000 #endif // V8_TARGET_ARCH_ARM 4001 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698