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

Side by Side Diff: src/mips/lithium-codegen-mips.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, 2 months 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/mips/full-codegen-mips.cc ('k') | src/mips/macro-assembler-mips.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 126
127 int receiver_offset = scope()->num_parameters() * kPointerSize; 127 int receiver_offset = scope()->num_parameters() * kPointerSize;
128 __ LoadRoot(a2, Heap::kUndefinedValueRootIndex); 128 __ LoadRoot(a2, Heap::kUndefinedValueRootIndex);
129 __ sw(a2, MemOperand(sp, receiver_offset)); 129 __ sw(a2, 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 __ Push(ra, fp, cp);
138 __ Push(Smi::FromInt(StackFrame::STUB));
139 // Adjust FP to point to saved FP.
140 __ Addu(fp, sp, Operand(2 * kPointerSize));
141 } else {
142 // The following three instructions must remain together and unmodified
143 // for code aging to work properly.
144 __ Push(ra, fp, cp, a1);
145 // Add unused nop to ensure prologue sequence is identical for
146 // full-codegen and lithium-codegen.
147 __ nop(Assembler::CODE_AGE_SEQUENCE_NOP);
148 // Adj. FP to point to saved FP.
149 __ Addu(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 __ Subu(sp, sp, Operand(slots * kPointerSize)); 145 __ Subu(sp, sp, Operand(slots * kPointerSize));
160 __ push(a0); 146 __ push(a0);
(...skipping 5655 matching lines...) Expand 10 before | Expand all | Expand 10 after
5816 __ Subu(scratch, result, scratch); 5802 __ Subu(scratch, result, scratch);
5817 __ lw(result, FieldMemOperand(scratch, 5803 __ lw(result, FieldMemOperand(scratch,
5818 FixedArray::kHeaderSize - kPointerSize)); 5804 FixedArray::kHeaderSize - kPointerSize));
5819 __ bind(&done); 5805 __ bind(&done);
5820 } 5806 }
5821 5807
5822 5808
5823 #undef __ 5809 #undef __
5824 5810
5825 } } // namespace v8::internal 5811 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/full-codegen-mips.cc ('k') | src/mips/macro-assembler-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698