| OLD | NEW |
| 1 // Copyright 2007-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2007-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 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 void CodeGenerator::GenerateFastCaseSwitchCases( | 421 void CodeGenerator::GenerateFastCaseSwitchCases( |
| 422 SwitchStatement* node, | 422 SwitchStatement* node, |
| 423 Vector<JumpTarget> case_labels, | 423 Vector<JumpTarget> case_labels, |
| 424 JumpTarget* table_start) { | 424 JumpTarget* table_start) { |
| 425 ZoneList<CaseClause*>* cases = node->cases(); | 425 ZoneList<CaseClause*>* cases = node->cases(); |
| 426 int length = cases->length(); | 426 int length = cases->length(); |
| 427 | 427 |
| 428 for (int i = 0; i < length; i++) { | 428 for (int i = 0; i < length; i++) { |
| 429 Comment cmnt(masm(), "[ Case clause"); | 429 Comment cmnt(masm(), "[ Case clause"); |
| 430 case_labels[i].Bind(); | 430 case_labels[i].Bind(); |
| 431 VisitStatementsAndSpill(cases->at(i)->statements()); | 431 VisitStatements(cases->at(i)->statements()); |
| 432 | 432 |
| 433 // All of the labels match the same expected frame as the table start. | 433 // All of the labels match the same expected frame as the table start. |
| 434 // If control flow cannot fall off the end of the case statement, we | 434 // If control flow cannot fall off the end of the case statement, we |
| 435 // pick up the expected frame from the table start. Otherwise we have | 435 // pick up the expected frame from the table start. Otherwise we have |
| 436 // to generate merge code to match the next label. | 436 // to generate merge code to match the next label. |
| 437 if (frame_ == NULL) { | 437 if (frame_ == NULL) { |
| 438 frame_ = new VirtualFrame(table_start->expected_frame()); | 438 frame_ = new VirtualFrame(table_start->expected_frame()); |
| 439 } else { | 439 } else { |
| 440 frame_->MergeTo(table_start->expected_frame()); | 440 frame_->MergeTo(table_start->expected_frame()); |
| 441 } | 441 } |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 void ArgumentsAccessStub::Generate(MacroAssembler* masm) { | 538 void ArgumentsAccessStub::Generate(MacroAssembler* masm) { |
| 539 switch (type_) { | 539 switch (type_) { |
| 540 case READ_LENGTH: GenerateReadLength(masm); break; | 540 case READ_LENGTH: GenerateReadLength(masm); break; |
| 541 case READ_ELEMENT: GenerateReadElement(masm); break; | 541 case READ_ELEMENT: GenerateReadElement(masm); break; |
| 542 case NEW_OBJECT: GenerateNewObject(masm); break; | 542 case NEW_OBJECT: GenerateNewObject(masm); break; |
| 543 } | 543 } |
| 544 } | 544 } |
| 545 | 545 |
| 546 | 546 |
| 547 } } // namespace v8::internal | 547 } } // namespace v8::internal |
| OLD | NEW |