OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |