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

Side by Side Diff: src/x64/virtual-frame-x64.h

Issue 515012: Use a loop in generated code to allocate stack slots for function with many l... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 12 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/virtual-frame-ia32.cc ('k') | src/x64/virtual-frame-x64.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 // Exit it should not be used. Note that Enter does not allocate space in 193 // Exit it should not be used. Note that Enter does not allocate space in
194 // the physical frame for storing frame-allocated locals. 194 // the physical frame for storing frame-allocated locals.
195 void Enter(); 195 void Enter();
196 void Exit(); 196 void Exit();
197 197
198 // Prepare for returning from the frame by spilling locals. This 198 // Prepare for returning from the frame by spilling locals. This
199 // avoids generating unnecessary merge code when jumping to the 199 // avoids generating unnecessary merge code when jumping to the
200 // shared return site. Emits code for spills. 200 // shared return site. Emits code for spills.
201 void PrepareForReturn(); 201 void PrepareForReturn();
202 202
203 // Number of local variables after when we use a loop for allocating.
204 static const int kLocalVarBound = 7;
205
203 // Allocate and initialize the frame-allocated locals. 206 // Allocate and initialize the frame-allocated locals.
204 void AllocateStackSlots(); 207 void AllocateStackSlots();
205 208
206 // An element of the expression stack as an assembly operand. 209 // An element of the expression stack as an assembly operand.
207 Operand ElementAt(int index) const { 210 Operand ElementAt(int index) const {
208 return Operand(rsp, index * kPointerSize); 211 return Operand(rsp, index * kPointerSize);
209 } 212 }
210 213
211 // Random-access store to a frame-top relative frame element. The result 214 // Random-access store to a frame-top relative frame element. The result
212 // becomes owned by the frame and is invalidated. 215 // becomes owned by the frame and is invalidated.
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 551
549 // Classes that need raw access to the elements_ array. 552 // Classes that need raw access to the elements_ array.
550 friend class DeferredCode; 553 friend class DeferredCode;
551 friend class JumpTarget; 554 friend class JumpTarget;
552 }; 555 };
553 556
554 557
555 } } // namespace v8::internal 558 } } // namespace v8::internal
556 559
557 #endif // V8_X64_VIRTUAL_FRAME_X64_H_ 560 #endif // V8_X64_VIRTUAL_FRAME_X64_H_
OLDNEW
« no previous file with comments | « src/ia32/virtual-frame-ia32.cc ('k') | src/x64/virtual-frame-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698