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 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1043 current_block()->Goto(continuation); | 1043 current_block()->Goto(continuation); |
1044 } | 1044 } |
1045 } | 1045 } |
1046 | 1046 |
1047 | 1047 |
1048 void HGraphBuilder::PadEnvironmentForContinuation( | 1048 void HGraphBuilder::PadEnvironmentForContinuation( |
1049 HBasicBlock* from, | 1049 HBasicBlock* from, |
1050 HBasicBlock* continuation) { | 1050 HBasicBlock* continuation) { |
1051 if (continuation->last_environment() != NULL) { | 1051 if (continuation->last_environment() != NULL) { |
1052 // When merging from a deopt block to a continuation, resolve differences in | 1052 // When merging from a deopt block to a continuation, resolve differences in |
1053 // environment by pushing undefined and popping extra values so that the | 1053 // environment by pushing constant 0 and popping extra values so that the |
1054 // environments match during the join. | 1054 // environments match during the join. Push 0 since it has the most specific |
| 1055 // representation, and will not influence representation inference of the |
| 1056 // phi. |
1055 int continuation_env_length = continuation->last_environment()->length(); | 1057 int continuation_env_length = continuation->last_environment()->length(); |
1056 while (continuation_env_length != from->last_environment()->length()) { | 1058 while (continuation_env_length != from->last_environment()->length()) { |
1057 if (continuation_env_length > from->last_environment()->length()) { | 1059 if (continuation_env_length > from->last_environment()->length()) { |
1058 from->last_environment()->Push(graph()->GetConstantUndefined()); | 1060 from->last_environment()->Push(graph()->GetConstant0()); |
1059 } else { | 1061 } else { |
1060 from->last_environment()->Pop(); | 1062 from->last_environment()->Pop(); |
1061 } | 1063 } |
1062 } | 1064 } |
1063 } else { | 1065 } else { |
1064 ASSERT(continuation->predecessors()->length() == 0); | 1066 ASSERT(continuation->predecessors()->length() == 0); |
1065 } | 1067 } |
1066 } | 1068 } |
1067 | 1069 |
1068 | 1070 |
(...skipping 8658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9727 if (ShouldProduceTraceOutput()) { | 9729 if (ShouldProduceTraceOutput()) { |
9728 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 9730 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
9729 } | 9731 } |
9730 | 9732 |
9731 #ifdef DEBUG | 9733 #ifdef DEBUG |
9732 graph_->Verify(false); // No full verify. | 9734 graph_->Verify(false); // No full verify. |
9733 #endif | 9735 #endif |
9734 } | 9736 } |
9735 | 9737 |
9736 } } // namespace v8::internal | 9738 } } // namespace v8::internal |
OLD | NEW |