OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 5459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5470 // We don't optimize functions with invalid left-hand sides in | 5470 // We don't optimize functions with invalid left-hand sides in |
5471 // assignments, count operations, or for-in. Consequently throw can | 5471 // assignments, count operations, or for-in. Consequently throw can |
5472 // currently only occur in an effect context. | 5472 // currently only occur in an effect context. |
5473 ASSERT(ast_context()->IsEffect()); | 5473 ASSERT(ast_context()->IsEffect()); |
5474 CHECK_ALIVE(VisitForValue(expr->exception())); | 5474 CHECK_ALIVE(VisitForValue(expr->exception())); |
5475 | 5475 |
5476 HValue* value = environment()->Pop(); | 5476 HValue* value = environment()->Pop(); |
5477 HThrow* instr = Add<HThrow>(value); | 5477 HThrow* instr = Add<HThrow>(value); |
5478 instr->set_position(expr->position()); | 5478 instr->set_position(expr->position()); |
5479 Add<HSimulate>(expr->id()); | 5479 Add<HSimulate>(expr->id()); |
| 5480 |
| 5481 // If the throw definitely exits the function, we can finish with a dummy |
| 5482 // control flow at this point. This is not the case if the throw is inside |
| 5483 // an inlined function which may be replaced. |
| 5484 if (call_context() == NULL) { |
| 5485 current_block()->FinishExit(new(zone()) HAbnormalExit); |
| 5486 set_current_block(NULL); |
| 5487 } |
5480 } | 5488 } |
5481 | 5489 |
5482 | 5490 |
5483 HLoadNamedField* HGraphBuilder::BuildLoadNamedField(HValue* object, | 5491 HLoadNamedField* HGraphBuilder::BuildLoadNamedField(HValue* object, |
5484 HObjectAccess access) { | 5492 HObjectAccess access) { |
5485 if (FLAG_track_double_fields && access.representation().IsDouble()) { | 5493 if (FLAG_track_double_fields && access.representation().IsDouble()) { |
5486 // load the heap number | 5494 // load the heap number |
5487 HLoadNamedField* heap_number = Add<HLoadNamedField>( | 5495 HLoadNamedField* heap_number = Add<HLoadNamedField>( |
5488 object, access.WithRepresentation(Representation::Tagged())); | 5496 object, access.WithRepresentation(Representation::Tagged())); |
5489 heap_number->set_type(HType::HeapNumber()); | 5497 heap_number->set_type(HType::HeapNumber()); |
(...skipping 4361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9851 if (ShouldProduceTraceOutput()) { | 9859 if (ShouldProduceTraceOutput()) { |
9852 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 9860 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
9853 } | 9861 } |
9854 | 9862 |
9855 #ifdef DEBUG | 9863 #ifdef DEBUG |
9856 graph_->Verify(false); // No full verify. | 9864 graph_->Verify(false); // No full verify. |
9857 #endif | 9865 #endif |
9858 } | 9866 } |
9859 | 9867 |
9860 } } // namespace v8::internal | 9868 } } // namespace v8::internal |
OLD | NEW |