Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(486)

Side by Side Diff: src/hydrogen-escape-analysis.cc

Issue 22831003: Pass checked values to HLoadNamedField, removing the need for extra type-check field. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/hydrogen.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 for (HUseIterator it(mapcheck->uses()); !it.Done(); it.Advance()) {
216 if (!it.value()->IsLoadNamedField()) continue; 216 if (!it.value()->IsLoadNamedField()) continue;
217 HLoadNamedField* load = HLoadNamedField::cast(it.value()); 217 HLoadNamedField* load = HLoadNamedField::cast(it.value());
218 ASSERT(load->typecheck() == mapcheck);
219 load->ClearTypeCheck(); 218 load->ClearTypeCheck();
220 } 219 }
221 ASSERT(mapcheck->HasNoUses()); 220 ASSERT(mapcheck->HasNoUses());
222 221
223 mapcheck->DeleteAndReplaceWith(NULL); 222 mapcheck->DeleteAndReplaceWith(NULL);
224 break; 223 break;
225 } 224 }
226 default: 225 default:
227 // Nothing to see here, move along ... 226 // Nothing to see here, move along ...
228 break; 227 break;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 AnalyzeDataFlow(allocate); 286 AnalyzeDataFlow(allocate);
288 287
289 cumulative_values_ += number_of_values_; 288 cumulative_values_ += number_of_values_;
290 ASSERT(allocate->HasNoUses()); 289 ASSERT(allocate->HasNoUses());
291 ASSERT(!allocate->IsLinked()); 290 ASSERT(!allocate->IsLinked());
292 } 291 }
293 } 292 }
294 293
295 294
296 } } // namespace v8::internal 295 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698