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

Side by Side Diff: src/arm/lithium-codegen-arm.cc

Issue 23480031: Enable preaging of code objects when --optimize-for-size. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: bool -> enum 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/full-codegen-arm.cc ('k') | src/arm/macro-assembler-arm.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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 __ b(eq, &ok); 126 __ b(eq, &ok);
127 int receiver_offset = scope()->num_parameters() * kPointerSize; 127 int receiver_offset = scope()->num_parameters() * kPointerSize;
128 __ LoadRoot(r2, Heap::kUndefinedValueRootIndex); 128 __ LoadRoot(r2, Heap::kUndefinedValueRootIndex);
129 __ str(r2, MemOperand(sp, receiver_offset)); 129 __ str(r2, MemOperand(sp, receiver_offset));
130 __ bind(&ok); 130 __ bind(&ok);
131 } 131 }
132 } 132 }
133 133
134 info()->set_prologue_offset(masm_->pc_offset()); 134 info()->set_prologue_offset(masm_->pc_offset());
135 if (NeedsEagerFrame()) { 135 if (NeedsEagerFrame()) {
136 if (info()->IsStub()) { 136 __ Prologue(info()->IsStub() ? BUILD_STUB_FRAME : BUILD_FUNCTION_FRAME);
137 __ stm(db_w, sp, cp.bit() | fp.bit() | lr.bit());
138 __ Push(Smi::FromInt(StackFrame::STUB));
139 // Adjust FP to point to saved FP.
140 __ add(fp, sp, Operand(2 * kPointerSize));
141 } else {
142 PredictableCodeSizeScope predictible_code_size_scope(
143 masm_, kNoCodeAgeSequenceLength * Assembler::kInstrSize);
144 // The following three instructions must remain together and unmodified
145 // for code aging to work properly.
146 __ stm(db_w, sp, r1.bit() | cp.bit() | fp.bit() | lr.bit());
147 __ nop(ip.code());
148 // Adjust FP to point to saved FP.
149 __ add(fp, sp, Operand(2 * kPointerSize));
150 }
151 frame_is_built_ = true; 137 frame_is_built_ = true;
152 info_->AddNoFrameRange(0, masm_->pc_offset()); 138 info_->AddNoFrameRange(0, masm_->pc_offset());
153 } 139 }
154 140
155 // Reserve space for the stack slots needed by the code. 141 // Reserve space for the stack slots needed by the code.
156 int slots = GetStackSlotCount(); 142 int slots = GetStackSlotCount();
157 if (slots > 0) { 143 if (slots > 0) {
158 if (FLAG_debug_code) { 144 if (FLAG_debug_code) {
159 __ sub(sp, sp, Operand(slots * kPointerSize)); 145 __ sub(sp, sp, Operand(slots * kPointerSize));
160 __ push(r0); 146 __ push(r0);
(...skipping 5672 matching lines...) Expand 10 before | Expand all | Expand 10 after
5833 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); 5819 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index));
5834 __ ldr(result, FieldMemOperand(scratch, 5820 __ ldr(result, FieldMemOperand(scratch,
5835 FixedArray::kHeaderSize - kPointerSize)); 5821 FixedArray::kHeaderSize - kPointerSize));
5836 __ bind(&done); 5822 __ bind(&done);
5837 } 5823 }
5838 5824
5839 5825
5840 #undef __ 5826 #undef __
5841 5827
5842 } } // namespace v8::internal 5828 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/arm/macro-assembler-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698