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

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

Issue 17412: Experimental: a quick hack to allow different live values to flow down... (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
« no previous file with comments | « src/register-allocator-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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 } 301 }
302 302
303 303
304 void VirtualFrame::MakeMergable() { 304 void VirtualFrame::MakeMergable() {
305 Comment cmnt(masm_, "[ Make frame mergable"); 305 Comment cmnt(masm_, "[ Make frame mergable");
306 // We can call MakeMergable on a frame that is not the code generator's 306 // We can call MakeMergable on a frame that is not the code generator's
307 // current frame, which will leave the global register counts out of sync 307 // current frame, which will leave the global register counts out of sync
308 // with the frame. We simply save the current frame and restore it at the 308 // with the frame. We simply save the current frame and restore it at the
309 // end of this function. We should find a better way to deal with this. 309 // end of this function. We should find a better way to deal with this.
310 VirtualFrame* original_frame = cgen_->frame(); 310 VirtualFrame* original_frame = cgen_->frame();
311 ASSERT(cgen_->HasValidEntryRegisters()); 311 RegisterFile non_frame_registers;
312 cgen_->SetFrame(this); 312 non_frame_registers.Use(esi);
313 non_frame_registers.Use(ebp);
314 non_frame_registers.Use(esp);
315 cgen_->SetFrame(this, &non_frame_registers);
313 ASSERT(cgen_->HasValidEntryRegisters()); 316 ASSERT(cgen_->HasValidEntryRegisters());
314 317
315 // Remove constants from the frame and ensure that no registers are 318 // Remove constants from the frame and ensure that no registers are
316 // multiply referenced within the frame. Allocate elements to their new 319 // multiply referenced within the frame. Allocate elements to their new
317 // locations from the top down so that the topmost elements have a chance 320 // locations from the top down so that the topmost elements have a chance
318 // to be in registers, then fill them into memory from the bottom up. 321 // to be in registers, then fill them into memory from the bottom up.
319 // (NB: Currently when spilling registers that are multiply referenced, it 322 // (NB: Currently when spilling registers that are multiply referenced, it
320 // is the lowermost occurrence that gets to stay in the register.) 323 // is the lowermost occurrence that gets to stay in the register.)
321 324
322 // The elements of new_elements are initially invalid. 325 // The elements of new_elements are initially invalid.
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 // but we have already done that when computing new target elements, 379 // but we have already done that when computing new target elements,
377 // so we use a raw spill. 380 // so we use a raw spill.
378 RawSpillElementAt(i); 381 RawSpillElementAt(i);
379 } 382 }
380 } 383 }
381 // Invalid elements do not need to be moved. 384 // Invalid elements do not need to be moved.
382 } 385 }
383 386
384 delete[] new_elements; 387 delete[] new_elements;
385 ASSERT(cgen_->HasValidEntryRegisters()); 388 ASSERT(cgen_->HasValidEntryRegisters());
386 cgen_->SetFrame(original_frame); 389 cgen_->SetFrame(original_frame, &non_frame_registers);
387 ASSERT(cgen_->HasValidEntryRegisters());
388 } 390 }
389 391
390 392
391 void VirtualFrame::MergeTo(VirtualFrame* expected) { 393 void VirtualFrame::MergeTo(VirtualFrame* expected) {
392 Comment cmnt(masm_, "[ Merge frame"); 394 Comment cmnt(masm_, "[ Merge frame");
393 // We should always be merging the code generator's current frame to an 395 // We should always be merging the code generator's current frame to an
394 // expected frame. 396 // expected frame.
395 ASSERT(cgen_->frame() == this); 397 ASSERT(cgen_->frame() == this);
396 398
397 ASSERT(cgen_ == expected->cgen_); 399 ASSERT(cgen_ == expected->cgen_);
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
1051 return false; 1053 return false;
1052 } 1054 }
1053 } 1055 }
1054 return true; 1056 return true;
1055 } 1057 }
1056 #endif 1058 #endif
1057 1059
1058 #undef __ 1060 #undef __
1059 1061
1060 } } // namespace v8::internal 1062 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/register-allocator-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698