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

Side by Side Diff: src/arm/full-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/builtins-arm.cc ('k') | src/arm/lithium-codegen-arm.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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 __ str(r2, MemOperand(sp, receiver_offset)); 156 __ str(r2, MemOperand(sp, receiver_offset));
157 __ bind(&ok); 157 __ bind(&ok);
158 } 158 }
159 159
160 // Open a frame scope to indicate that there is a frame on the stack. The 160 // Open a frame scope to indicate that there is a frame on the stack. The
161 // MANUAL indicates that the scope shouldn't actually generate code to set up 161 // MANUAL indicates that the scope shouldn't actually generate code to set up
162 // the frame (that is done below). 162 // the frame (that is done below).
163 FrameScope frame_scope(masm_, StackFrame::MANUAL); 163 FrameScope frame_scope(masm_, StackFrame::MANUAL);
164 164
165 info->set_prologue_offset(masm_->pc_offset()); 165 info->set_prologue_offset(masm_->pc_offset());
166 { 166 __ Prologue(BUILD_FUNCTION_FRAME);
167 PredictableCodeSizeScope predictible_code_size_scope(
168 masm_, kNoCodeAgeSequenceLength * Assembler::kInstrSize);
169 // The following three instructions must remain together and unmodified
170 // for code aging to work properly.
171 __ stm(db_w, sp, r1.bit() | cp.bit() | fp.bit() | lr.bit());
172 __ nop(ip.code());
173 // Adjust FP to point to saved FP.
174 __ add(fp, sp, Operand(2 * kPointerSize));
175 }
176 info->AddNoFrameRange(0, masm_->pc_offset()); 167 info->AddNoFrameRange(0, masm_->pc_offset());
177 168
178 { Comment cmnt(masm_, "[ Allocate locals"); 169 { Comment cmnt(masm_, "[ Allocate locals");
179 int locals_count = info->scope()->num_stack_slots(); 170 int locals_count = info->scope()->num_stack_slots();
180 // Generators allocate locals, if any, in context slots. 171 // Generators allocate locals, if any, in context slots.
181 ASSERT(!info->function()->is_generator() || locals_count == 0); 172 ASSERT(!info->function()->is_generator() || locals_count == 0);
182 if (locals_count > 0) { 173 if (locals_count > 0) {
183 __ LoadRoot(ip, Heap::kUndefinedValueRootIndex); 174 __ LoadRoot(ip, Heap::kUndefinedValueRootIndex);
184 for (int i = 0; i < locals_count; i++) { 175 for (int i = 0; i < locals_count; i++) {
185 __ push(ip); 176 __ push(ip);
(...skipping 4785 matching lines...) Expand 10 before | Expand all | Expand 10 after
4971 ASSERT(Memory::uint32_at(interrupt_address_pointer) == 4962 ASSERT(Memory::uint32_at(interrupt_address_pointer) ==
4972 reinterpret_cast<uint32_t>( 4963 reinterpret_cast<uint32_t>(
4973 isolate->builtins()->OsrAfterStackCheck()->entry())); 4964 isolate->builtins()->OsrAfterStackCheck()->entry()));
4974 return OSR_AFTER_STACK_CHECK; 4965 return OSR_AFTER_STACK_CHECK;
4975 } 4966 }
4976 4967
4977 4968
4978 } } // namespace v8::internal 4969 } } // namespace v8::internal
4979 4970
4980 #endif // V8_TARGET_ARCH_ARM 4971 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/builtins-arm.cc ('k') | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698