| 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 3538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3549 | 3549 |
| 3550 | 3550 |
| 3551 void HGraphBuilder::VisitThrow(Throw* expr) { | 3551 void HGraphBuilder::VisitThrow(Throw* expr) { |
| 3552 // We don't optimize functions with invalid left-hand sides in | 3552 // We don't optimize functions with invalid left-hand sides in |
| 3553 // assignments, count operations, or for-in. Consequently throw can | 3553 // assignments, count operations, or for-in. Consequently throw can |
| 3554 // currently only occur in an effect context. | 3554 // currently only occur in an effect context. |
| 3555 ASSERT(ast_context()->IsEffect()); | 3555 ASSERT(ast_context()->IsEffect()); |
| 3556 VISIT_FOR_VALUE(expr->exception()); | 3556 VISIT_FOR_VALUE(expr->exception()); |
| 3557 | 3557 |
| 3558 HValue* value = environment()->Pop(); | 3558 HValue* value = environment()->Pop(); |
| 3559 HControlInstruction* instr = new HThrow(value); | 3559 HThrow* instr = new HThrow(value); |
| 3560 instr->set_position(expr->position()); | 3560 instr->set_position(expr->position()); |
| 3561 current_subgraph_->FinishExit(instr); | 3561 AddInstruction(instr); |
| 3562 AddSimulate(expr->id()); |
| 3563 current_subgraph_->FinishExit(new HAbnormalExit); |
| 3562 } | 3564 } |
| 3563 | 3565 |
| 3564 | 3566 |
| 3565 void HGraphBuilder::HandlePolymorphicLoadNamedField(Property* expr, | 3567 void HGraphBuilder::HandlePolymorphicLoadNamedField(Property* expr, |
| 3566 HValue* object, | 3568 HValue* object, |
| 3567 ZoneMapList* types, | 3569 ZoneMapList* types, |
| 3568 Handle<String> name) { | 3570 Handle<String> name) { |
| 3569 int number_of_types = Min(types->length(), kMaxLoadPolymorphism); | 3571 int number_of_types = Min(types->length(), kMaxLoadPolymorphism); |
| 3570 ZoneMapList maps(number_of_types); | 3572 ZoneMapList maps(number_of_types); |
| 3571 ZoneList<HSubgraph*> subgraphs(number_of_types + 1); | 3573 ZoneList<HSubgraph*> subgraphs(number_of_types + 1); |
| (...skipping 2322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5894 } | 5896 } |
| 5895 } | 5897 } |
| 5896 | 5898 |
| 5897 #ifdef DEBUG | 5899 #ifdef DEBUG |
| 5898 if (graph_ != NULL) graph_->Verify(); | 5900 if (graph_ != NULL) graph_->Verify(); |
| 5899 if (allocator_ != NULL) allocator_->Verify(); | 5901 if (allocator_ != NULL) allocator_->Verify(); |
| 5900 #endif | 5902 #endif |
| 5901 } | 5903 } |
| 5902 | 5904 |
| 5903 } } // namespace v8::internal | 5905 } } // namespace v8::internal |
| OLD | NEW |