OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 2634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2645 | 2645 |
2646 | 2646 |
2647 void HGraphBuilder::VisitWithStatement(WithStatement* stmt) { | 2647 void HGraphBuilder::VisitWithStatement(WithStatement* stmt) { |
2648 ASSERT(!HasStackOverflow()); | 2648 ASSERT(!HasStackOverflow()); |
2649 ASSERT(current_block() != NULL); | 2649 ASSERT(current_block() != NULL); |
2650 ASSERT(current_block()->HasPredecessor()); | 2650 ASSERT(current_block()->HasPredecessor()); |
2651 return Bailout("WithStatement"); | 2651 return Bailout("WithStatement"); |
2652 } | 2652 } |
2653 | 2653 |
2654 | 2654 |
2655 void HGraphBuilder::VisitExitContextStatement(ExitContextStatement* stmt) { | |
2656 ASSERT(!HasStackOverflow()); | |
2657 ASSERT(current_block() != NULL); | |
2658 ASSERT(current_block()->HasPredecessor()); | |
2659 return Bailout("ExitContextStatement"); | |
2660 } | |
2661 | |
2662 | |
2663 void HGraphBuilder::VisitSwitchStatement(SwitchStatement* stmt) { | 2655 void HGraphBuilder::VisitSwitchStatement(SwitchStatement* stmt) { |
2664 ASSERT(!HasStackOverflow()); | 2656 ASSERT(!HasStackOverflow()); |
2665 ASSERT(current_block() != NULL); | 2657 ASSERT(current_block() != NULL); |
2666 ASSERT(current_block()->HasPredecessor()); | 2658 ASSERT(current_block()->HasPredecessor()); |
2667 // We only optimize switch statements with smi-literal smi comparisons, | 2659 // We only optimize switch statements with smi-literal smi comparisons, |
2668 // with a bounded number of clauses. | 2660 // with a bounded number of clauses. |
2669 const int kCaseClauseLimit = 128; | 2661 const int kCaseClauseLimit = 128; |
2670 ZoneList<CaseClause*>* clauses = stmt->cases(); | 2662 ZoneList<CaseClause*>* clauses = stmt->cases(); |
2671 int clause_count = clauses->length(); | 2663 int clause_count = clauses->length(); |
2672 if (clause_count > kCaseClauseLimit) { | 2664 if (clause_count > kCaseClauseLimit) { |
(...skipping 4143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6816 } | 6808 } |
6817 } | 6809 } |
6818 | 6810 |
6819 #ifdef DEBUG | 6811 #ifdef DEBUG |
6820 if (graph_ != NULL) graph_->Verify(); | 6812 if (graph_ != NULL) graph_->Verify(); |
6821 if (allocator_ != NULL) allocator_->Verify(); | 6813 if (allocator_ != NULL) allocator_->Verify(); |
6822 #endif | 6814 #endif |
6823 } | 6815 } |
6824 | 6816 |
6825 } } // namespace v8::internal | 6817 } } // namespace v8::internal |
OLD | NEW |