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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
205 HCheckHeapObject* check = HCheckHeapObject::cast(instr); | 205 HCheckHeapObject* check = HCheckHeapObject::cast(instr); |
206 if (check->value() != allocate) continue; | 206 if (check->value() != allocate) continue; |
207 check->DeleteAndReplaceWith(NULL); | 207 check->DeleteAndReplaceWith(NULL); |
208 break; | 208 break; |
209 } | 209 } |
210 case HValue::kCheckMaps: { | 210 case HValue::kCheckMaps: { |
211 HCheckMaps* mapcheck = HCheckMaps::cast(instr); | 211 HCheckMaps* mapcheck = HCheckMaps::cast(instr); |
212 if (mapcheck->value() != allocate) continue; | 212 if (mapcheck->value() != allocate) continue; |
213 // TODO(mstarzinger): This approach breaks if the tracked map value | 213 // TODO(mstarzinger): This approach breaks if the tracked map value |
214 // is not a HConstant. Find a repro test case and fix this. | 214 // is not a HConstant. Find a repro test case and fix this. |
215 for (HUseIterator it(mapcheck->uses()); !it.Done(); it.Advance()) { | 215 ASSERT(mapcheck->ActualValue() == allocate); |
Jakob Kummerow
2013/08/23 15:41:03
Looking at the line before (212), I don't think we
| |
216 if (!it.value()->IsLoadNamedField()) continue; | 216 mapcheck->DeleteAndReplaceWith(mapcheck->ActualValue()); |
217 HLoadNamedField* load = HLoadNamedField::cast(it.value()); | |
218 load->ClearTypeCheck(); | |
219 } | |
220 ASSERT(mapcheck->HasNoUses()); | |
221 | |
222 mapcheck->DeleteAndReplaceWith(NULL); | |
223 break; | 217 break; |
224 } | 218 } |
225 default: | 219 default: |
226 // Nothing to see here, move along ... | 220 // Nothing to see here, move along ... |
227 break; | 221 break; |
228 } | 222 } |
229 } | 223 } |
230 | 224 |
231 // Propagate the block state forward to all successor blocks. | 225 // Propagate the block state forward to all successor blocks. |
232 for (int i = 0; i < block->end()->SuccessorCount(); i++) { | 226 for (int i = 0; i < block->end()->SuccessorCount(); i++) { |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
286 AnalyzeDataFlow(allocate); | 280 AnalyzeDataFlow(allocate); |
287 | 281 |
288 cumulative_values_ += number_of_values_; | 282 cumulative_values_ += number_of_values_; |
289 ASSERT(allocate->HasNoUses()); | 283 ASSERT(allocate->HasNoUses()); |
290 ASSERT(!allocate->IsLinked()); | 284 ASSERT(!allocate->IsLinked()); |
291 } | 285 } |
292 } | 286 } |
293 | 287 |
294 | 288 |
295 } } // namespace v8::internal | 289 } } // namespace v8::internal |
OLD | NEW |