| 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 2615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2626 | 2626 |
| 2627 | 2627 |
| 2628 void HGraphBuilder::VisitExitContextStatement(ExitContextStatement* stmt) { | 2628 void HGraphBuilder::VisitExitContextStatement(ExitContextStatement* stmt) { |
| 2629 ASSERT(!HasStackOverflow()); | 2629 ASSERT(!HasStackOverflow()); |
| 2630 ASSERT(current_block() != NULL); | 2630 ASSERT(current_block() != NULL); |
| 2631 ASSERT(current_block()->HasPredecessor()); | 2631 ASSERT(current_block()->HasPredecessor()); |
| 2632 return Bailout("ExitContextStatement"); | 2632 return Bailout("ExitContextStatement"); |
| 2633 } | 2633 } |
| 2634 | 2634 |
| 2635 | 2635 |
| 2636 void HGraphBuilder::VisitExitScopedBlockStatement( |
| 2637 ExitScopedBlockStatement* stmt) { |
| 2638 ASSERT(!HasStackOverflow()); |
| 2639 ASSERT(current_block() != NULL); |
| 2640 ASSERT(current_block()->HasPredecessor()); |
| 2641 return Bailout("ExitScopedBlockStatement"); |
| 2642 } |
| 2643 |
| 2644 |
| 2636 void HGraphBuilder::VisitSwitchStatement(SwitchStatement* stmt) { | 2645 void HGraphBuilder::VisitSwitchStatement(SwitchStatement* stmt) { |
| 2637 ASSERT(!HasStackOverflow()); | 2646 ASSERT(!HasStackOverflow()); |
| 2638 ASSERT(current_block() != NULL); | 2647 ASSERT(current_block() != NULL); |
| 2639 ASSERT(current_block()->HasPredecessor()); | 2648 ASSERT(current_block()->HasPredecessor()); |
| 2640 // We only optimize switch statements with smi-literal smi comparisons, | 2649 // We only optimize switch statements with smi-literal smi comparisons, |
| 2641 // with a bounded number of clauses. | 2650 // with a bounded number of clauses. |
| 2642 const int kCaseClauseLimit = 128; | 2651 const int kCaseClauseLimit = 128; |
| 2643 ZoneList<CaseClause*>* clauses = stmt->cases(); | 2652 ZoneList<CaseClause*>* clauses = stmt->cases(); |
| 2644 int clause_count = clauses->length(); | 2653 int clause_count = clauses->length(); |
| 2645 if (clause_count > kCaseClauseLimit) { | 2654 if (clause_count > kCaseClauseLimit) { |
| (...skipping 3571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6217 : closure_(closure), | 6226 : closure_(closure), |
| 6218 values_(0), | 6227 values_(0), |
| 6219 assigned_variables_(4), | 6228 assigned_variables_(4), |
| 6220 parameter_count_(0), | 6229 parameter_count_(0), |
| 6221 specials_count_(1), | 6230 specials_count_(1), |
| 6222 local_count_(0), | 6231 local_count_(0), |
| 6223 outer_(outer), | 6232 outer_(outer), |
| 6224 pop_count_(0), | 6233 pop_count_(0), |
| 6225 push_count_(0), | 6234 push_count_(0), |
| 6226 ast_id_(AstNode::kNoNumber) { | 6235 ast_id_(AstNode::kNoNumber) { |
| 6227 Initialize(scope->num_parameters() + 1, scope->num_stack_slots(), 0); | 6236 Initialize(scope->num_parameters() + 1, scope->num_stack_allocs(), 0); |
| 6228 } | 6237 } |
| 6229 | 6238 |
| 6230 | 6239 |
| 6231 HEnvironment::HEnvironment(const HEnvironment* other) | 6240 HEnvironment::HEnvironment(const HEnvironment* other) |
| 6232 : values_(0), | 6241 : values_(0), |
| 6233 assigned_variables_(0), | 6242 assigned_variables_(0), |
| 6234 parameter_count_(0), | 6243 parameter_count_(0), |
| 6235 specials_count_(1), | 6244 specials_count_(1), |
| 6236 local_count_(0), | 6245 local_count_(0), |
| 6237 outer_(NULL), | 6246 outer_(NULL), |
| (...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6731 } | 6740 } |
| 6732 } | 6741 } |
| 6733 | 6742 |
| 6734 #ifdef DEBUG | 6743 #ifdef DEBUG |
| 6735 if (graph_ != NULL) graph_->Verify(); | 6744 if (graph_ != NULL) graph_->Verify(); |
| 6736 if (allocator_ != NULL) allocator_->Verify(); | 6745 if (allocator_ != NULL) allocator_->Verify(); |
| 6737 #endif | 6746 #endif |
| 6738 } | 6747 } |
| 6739 | 6748 |
| 6740 } } // namespace v8::internal | 6749 } } // namespace v8::internal |
| OLD | NEW |