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

Side by Side Diff: src/ia32/full-codegen-ia32.cc

Issue 23480031: Enable preaging of code objects when --optimize-for-size. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Limit to pre-age patch. Created 7 years, 3 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/ia32/codegen-ia32.cc ('k') | src/ia32/lithium-codegen-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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 } 153 }
154 154
155 // Open a frame scope to indicate that there is a frame on the stack. The 155 // Open a frame scope to indicate that there is a frame on the stack. The
156 // MANUAL indicates that the scope shouldn't actually generate code to set up 156 // MANUAL indicates that the scope shouldn't actually generate code to set up
157 // the frame (that is done below). 157 // the frame (that is done below).
158 FrameScope frame_scope(masm_, StackFrame::MANUAL); 158 FrameScope frame_scope(masm_, StackFrame::MANUAL);
159 159
160 info->set_prologue_offset(masm_->pc_offset()); 160 info->set_prologue_offset(masm_->pc_offset());
161 __ push(ebp); // Caller's frame pointer. 161 __ push(ebp); // Caller's frame pointer.
162 __ mov(ebp, esp); 162 __ mov(ebp, esp);
163 __ push(esi); // Callee's context. 163 if (isolate()->is_memory_constrained()) {
164 // This sequence marks pre-aged code.
165 __ push(esi); // Callee's context.
166 __ nop();
Michael Starzinger 2013/09/17 22:56:44 IIUC this is a glorified way to store exactly one
167 } else {
168 // This sequence marks non-aged code.
169 __ nop();
170 __ push(esi); // Callee's context
171 }
164 __ push(edi); // Callee's JS Function. 172 __ push(edi); // Callee's JS Function.
165 info->AddNoFrameRange(0, masm_->pc_offset()); 173 info->AddNoFrameRange(0, masm_->pc_offset());
166 174
167 { Comment cmnt(masm_, "[ Allocate locals"); 175 { Comment cmnt(masm_, "[ Allocate locals");
168 int locals_count = info->scope()->num_stack_slots(); 176 int locals_count = info->scope()->num_stack_slots();
169 // Generators allocate locals, if any, in context slots. 177 // Generators allocate locals, if any, in context slots.
170 ASSERT(!info->function()->is_generator() || locals_count == 0); 178 ASSERT(!info->function()->is_generator() || locals_count == 0);
171 if (locals_count == 1) { 179 if (locals_count == 1) {
172 __ push(Immediate(isolate()->factory()->undefined_value())); 180 __ push(Immediate(isolate()->factory()->undefined_value()));
173 } else if (locals_count > 1) { 181 } else if (locals_count > 1) {
(...skipping 4719 matching lines...) Expand 10 before | Expand all | Expand 10 after
4893 *stack_depth = 0; 4901 *stack_depth = 0;
4894 *context_length = 0; 4902 *context_length = 0;
4895 return previous_; 4903 return previous_;
4896 } 4904 }
4897 4905
4898 #undef __ 4906 #undef __
4899 4907
4900 } } // namespace v8::internal 4908 } } // namespace v8::internal
4901 4909
4902 #endif // V8_TARGET_ARCH_IA32 4910 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698