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

Side by Side Diff: src/codegen.cc

Issue 113837: Change the register allocator so that it no longer tracks references... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 7 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
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 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 int length = cases->length(); 508 int length = cases->length();
509 509
510 for (int i = 0; i < length; i++) { 510 for (int i = 0; i < length; i++) {
511 Comment cmnt(masm(), "[ Case clause"); 511 Comment cmnt(masm(), "[ Case clause");
512 512
513 // We may not have a virtual frame if control flow did not fall 513 // We may not have a virtual frame if control flow did not fall
514 // off the end of the previous case. In that case, use the start 514 // off the end of the previous case. In that case, use the start
515 // frame. Otherwise, we have to merge the existing one to the 515 // frame. Otherwise, we have to merge the existing one to the
516 // start frame as part of the previous case. 516 // start frame as part of the previous case.
517 if (!has_valid_frame()) { 517 if (!has_valid_frame()) {
518 RegisterFile non_frame_registers = RegisterAllocator::Reserved(); 518 RegisterFile empty;
519 SetFrame(new VirtualFrame(start_frame), &non_frame_registers); 519 SetFrame(new VirtualFrame(start_frame), &empty);
520 } else { 520 } else {
521 frame_->MergeTo(start_frame); 521 frame_->MergeTo(start_frame);
522 } 522 }
523 masm()->bind(&case_labels[i]); 523 masm()->bind(&case_labels[i]);
524 VisitStatements(cases->at(i)->statements()); 524 VisitStatements(cases->at(i)->statements());
525 } 525 }
526 } 526 }
527 527
528 528
529 bool CodeGenerator::TryGenerateFastCaseSwitchStatement(SwitchStatement* node) { 529 bool CodeGenerator::TryGenerateFastCaseSwitchStatement(SwitchStatement* node) {
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 void ArgumentsAccessStub::Generate(MacroAssembler* masm) { 635 void ArgumentsAccessStub::Generate(MacroAssembler* masm) {
636 switch (type_) { 636 switch (type_) {
637 case READ_LENGTH: GenerateReadLength(masm); break; 637 case READ_LENGTH: GenerateReadLength(masm); break;
638 case READ_ELEMENT: GenerateReadElement(masm); break; 638 case READ_ELEMENT: GenerateReadElement(masm); break;
639 case NEW_OBJECT: GenerateNewObject(masm); break; 639 case NEW_OBJECT: GenerateNewObject(masm); break;
640 } 640 }
641 } 641 }
642 642
643 643
644 } } // namespace v8::internal 644 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698