| 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 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 464 } else { | 464 } else { |
| 465 frame_->MergeTo(start_frame); | 465 frame_->MergeTo(start_frame); |
| 466 } | 466 } |
| 467 masm()->bind(&case_labels[i]); | 467 masm()->bind(&case_labels[i]); |
| 468 VisitStatements(cases->at(i)->statements()); | 468 VisitStatements(cases->at(i)->statements()); |
| 469 } | 469 } |
| 470 } | 470 } |
| 471 | 471 |
| 472 | 472 |
| 473 bool CodeGenerator::TryGenerateFastCaseSwitchStatement(SwitchStatement* node) { | 473 bool CodeGenerator::TryGenerateFastCaseSwitchStatement(SwitchStatement* node) { |
| 474 // TODO(238): Due to issue 238, fast case switches can crash on ARM |
| 475 // and possibly IA32. They are disabled for now. |
| 476 // See http://code.google.com/p/v8/issues/detail?id=238 |
| 477 return false; |
| 478 |
| 474 ZoneList<CaseClause*>* cases = node->cases(); | 479 ZoneList<CaseClause*>* cases = node->cases(); |
| 475 int length = cases->length(); | 480 int length = cases->length(); |
| 476 | 481 |
| 477 if (length < FastCaseSwitchMinCaseCount()) { | 482 if (length < FastCaseSwitchMinCaseCount()) { |
| 478 return false; | 483 return false; |
| 479 } | 484 } |
| 480 | 485 |
| 481 // Test whether fast-case should be used. | 486 // Test whether fast-case should be used. |
| 482 int default_index = -1; | 487 int default_index = -1; |
| 483 int min_index = Smi::kMaxValue; | 488 int min_index = Smi::kMaxValue; |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 563 void ArgumentsAccessStub::Generate(MacroAssembler* masm) { | 568 void ArgumentsAccessStub::Generate(MacroAssembler* masm) { |
| 564 switch (type_) { | 569 switch (type_) { |
| 565 case READ_LENGTH: GenerateReadLength(masm); break; | 570 case READ_LENGTH: GenerateReadLength(masm); break; |
| 566 case READ_ELEMENT: GenerateReadElement(masm); break; | 571 case READ_ELEMENT: GenerateReadElement(masm); break; |
| 567 case NEW_OBJECT: GenerateNewObject(masm); break; | 572 case NEW_OBJECT: GenerateNewObject(masm); break; |
| 568 } | 573 } |
| 569 } | 574 } |
| 570 | 575 |
| 571 | 576 |
| 572 } } // namespace v8::internal | 577 } } // namespace v8::internal |
| OLD | NEW |