| 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 case HValue::kEnterInlined: { | 156 case HValue::kEnterInlined: { |
| 157 // Those environment values are live that are live at any return | 157 // Those environment values are live that are live at any return |
| 158 // target block. Here we make use of the fact that the end of an | 158 // target block. Here we make use of the fact that the end of an |
| 159 // inline sequence always looks like this: HLeaveInlined, HSimulate, | 159 // inline sequence always looks like this: HLeaveInlined, HSimulate, |
| 160 // HGoto (to return_target block), with no environment lookups in | 160 // HGoto (to return_target block), with no environment lookups in |
| 161 // between (see ASSERTs above). | 161 // between (see ASSERTs above). |
| 162 HEnterInlined* enter = HEnterInlined::cast(instr); | 162 HEnterInlined* enter = HEnterInlined::cast(instr); |
| 163 live->Clear(); | 163 live->Clear(); |
| 164 for (int i = 0; i < enter->return_targets()->length(); ++i) { | 164 for (int i = 0; i < enter->return_targets()->length(); ++i) { |
| 165 int return_id = enter->return_targets()->at(i)->block_id(); | 165 int return_id = enter->return_targets()->at(i)->block_id(); |
| 166 // When an AbnormalExit is involved, it can happen that the return | 166 live->Union(*live_at_block_start_[return_id]); |
| 167 // target block doesn't actually exist. | |
| 168 if (return_id < live_at_block_start_.length()) { | |
| 169 live->Union(*live_at_block_start_[return_id]); | |
| 170 } | |
| 171 } | 167 } |
| 172 last_simulate_ = NULL; | 168 last_simulate_ = NULL; |
| 173 break; | 169 break; |
| 174 } | 170 } |
| 175 case HValue::kSimulate: | 171 case HValue::kSimulate: |
| 176 last_simulate_ = HSimulate::cast(instr); | 172 last_simulate_ = HSimulate::cast(instr); |
| 177 went_live_since_last_simulate_.Clear(); | 173 went_live_since_last_simulate_.Clear(); |
| 178 break; | 174 break; |
| 179 default: | 175 default: |
| 180 break; | 176 break; |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 ZapEnvironmentSlotsInSuccessors(block, &live); | 235 ZapEnvironmentSlotsInSuccessors(block, &live); |
| 240 } | 236 } |
| 241 | 237 |
| 242 // Finally, remove the HEnvironment{Bind,Lookup} markers. | 238 // Finally, remove the HEnvironment{Bind,Lookup} markers. |
| 243 for (int i = 0; i < markers_.length(); ++i) { | 239 for (int i = 0; i < markers_.length(); ++i) { |
| 244 markers_[i]->DeleteAndReplaceWith(NULL); | 240 markers_[i]->DeleteAndReplaceWith(NULL); |
| 245 } | 241 } |
| 246 } | 242 } |
| 247 | 243 |
| 248 } } // namespace v8::internal | 244 } } // namespace v8::internal |
| OLD | NEW |