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

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

Issue 13127: Initial real implementation of simple merge for frames. Does not yet... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: '' Created 12 years 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/register-allocator-ia32.cc ('k') | src/virtual-frame-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 2008 the V8 project authors. All rights reserved. 1 // Copyright 2008 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 // the frame after a runtime call). No code is emitted. 144 // the frame after a runtime call). No code is emitted.
145 void Forget(int count); 145 void Forget(int count);
146 146
147 // Spill all values from the frame to memory. 147 // Spill all values from the frame to memory.
148 void SpillAll(); 148 void SpillAll();
149 149
150 // Spill a register if possible. Return the register spilled or no_reg if 150 // Spill a register if possible. Return the register spilled or no_reg if
151 // it was not possible to spill one. 151 // it was not possible to spill one.
152 Register SpillAnyRegister(); 152 Register SpillAnyRegister();
153 153
154 // True if an arbitrary frame of the same size could be merged to this
155 // one. Requires all values to be in a unique register or memory
156 // location.
157 bool IsMergable();
158
154 // Ensure that this frame is in a state where an arbitrary frame of the 159 // Ensure that this frame is in a state where an arbitrary frame of the
155 // right size could be merged to it. May emit code. 160 // right size could be merged to it. May emit code.
156 void EnsureMergable(); 161 void MakeMergable();
157 162
158 // Make this virtual frame have a state identical to an expected virtual 163 // Make this virtual frame have a state identical to an expected virtual
159 // frame. As a side effect, code may be emitted to make this frame match 164 // frame. As a side effect, code may be emitted to make this frame match
160 // the expected one. 165 // the expected one.
161 void MergeTo(VirtualFrame* expected); 166 void MergeTo(VirtualFrame* expected);
162 167
163 // Emit code for the physical JS entry and exit frame sequences. After 168 // Emit code for the physical JS entry and exit frame sequences. After
164 // calling Enter, the virtual frame is ready for use; and after calling 169 // calling Enter, the virtual frame is ready for use; and after calling
165 // Exit it should not be used. Note that Enter does not allocate space in 170 // Exit it should not be used. Note that Enter does not allocate space in
166 // the physical frame for storing frame-allocated locals. 171 // the physical frame for storing frame-allocated locals.
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 // if constant. Space should have already been allocated in the actual 348 // if constant. Space should have already been allocated in the actual
344 // frame for all the elements below this one (at least). 349 // frame for all the elements below this one (at least).
345 void SyncElementAt(int index); 350 void SyncElementAt(int index);
346 351
347 // Spill the element at a particular index---write it to memory if 352 // Spill the element at a particular index---write it to memory if
348 // necessary, free any associated register, and forget its value if 353 // necessary, free any associated register, and forget its value if
349 // constant. Space should have already been allocated in the actual frame 354 // constant. Space should have already been allocated in the actual frame
350 // for all the elements below this one (at least). 355 // for all the elements below this one (at least).
351 void SpillElementAt(int index); 356 void SpillElementAt(int index);
352 357
353 // Sync all elements in the frame. 358 // Sync the range of elements in [begin, end).
354 void SyncAll(); 359 void SyncRange(int begin, int end);
355 360
356 // Store the value on top of the frame to a frame slot (typically a local 361 // Store the value on top of the frame to a frame slot (typically a local
357 // or parameter). 362 // or parameter).
358 void StoreToFrameSlotAt(int index); 363 void StoreToFrameSlotAt(int index);
359 364
360 // Spill the topmost elements of the frame to memory (eg, they are the 365 // Spill the topmost elements of the frame to memory (eg, they are the
361 // arguments to a call) and all registers. 366 // arguments to a call) and all registers.
362 void PrepareForCall(int count); 367 void PrepareForCall(int count);
363 }; 368 };
364 369
365 370
366 } } // namespace v8::internal 371 } } // namespace v8::internal
367 372
368 #endif // V8_VIRTUAL_FRAME_IA32_H_ 373 #endif // V8_VIRTUAL_FRAME_IA32_H_
OLDNEW
« no previous file with comments | « src/register-allocator-ia32.cc ('k') | src/virtual-frame-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698