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

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

Issue 17414: Add register allocation for a lot of calls. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: Created 11 years, 11 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
« src/codegen-ia32.cc ('K') | « src/codegen-ia32.cc ('k') | no next file » | 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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 void VirtualFrame::SpillAll() { 243 void VirtualFrame::SpillAll() {
244 for (int i = 0; i < elements_.length(); i++) { 244 for (int i = 0; i < elements_.length(); i++) {
245 SpillElementAt(i); 245 SpillElementAt(i);
246 } 246 }
247 } 247 }
248 248
249 249
250 void VirtualFrame::PrepareForCall(int frame_arg_count) { 250 void VirtualFrame::PrepareForCall(int frame_arg_count) {
251 ASSERT(height() >= frame_arg_count); 251 ASSERT(height() >= frame_arg_count);
252 252
253 // Below the stack pointer, spill all registers. 253 // Below the stack pointer, spill all registers and make sure that
254 // locals have the right values by sync'ing them. The sync'ing is
255 // necessary to give the debugger a consistent view of the values of
256 // locals in the frame.
254 for (int i = 0; i <= stack_pointer_; i++) { 257 for (int i = 0; i <= stack_pointer_; i++) {
255 if (elements_[i].is_register()) { 258 FrameElement element = elements_[i];
259 if (element.is_register()) {
256 SpillElementAt(i); 260 SpillElementAt(i);
261 } else if (element.is_valid() && i < expression_base_index()) {
262 SyncElementAt(i);
257 } 263 }
258 } 264 }
259 265
260 // Above the stack pointer, spill registers and sync everything else (ie, 266 // Above the stack pointer, spill registers and sync everything else (ie,
261 // constants). 267 // constants).
262 for (int i = stack_pointer_ + 1; i < elements_.length(); i++) { 268 for (int i = stack_pointer_ + 1; i < elements_.length(); i++) {
263 if (elements_[i].is_register()) { 269 if (elements_[i].is_register()) {
264 SpillElementAt(i); 270 SpillElementAt(i);
265 } else { 271 } else {
266 SyncElementAt(i); 272 SyncElementAt(i);
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after
1051 return false; 1057 return false;
1052 } 1058 }
1053 } 1059 }
1054 return true; 1060 return true;
1055 } 1061 }
1056 #endif 1062 #endif
1057 1063
1058 #undef __ 1064 #undef __
1059 1065
1060 } } // namespace v8::internal 1066 } } // namespace v8::internal
OLDNEW
« src/codegen-ia32.cc ('K') | « src/codegen-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698