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

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

Issue 23554003: Fix lost store side effects with escape analysis. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Ben Titzer. Created 7 years, 3 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 | « no previous file | 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 PrintF("Replacing load #%d with #%d (%s)\n", instr->id(), 165 PrintF("Replacing load #%d with #%d (%s)\n", instr->id(),
166 replacement->id(), replacement->Mnemonic()); 166 replacement->id(), replacement->Mnemonic());
167 } 167 }
168 break; 168 break;
169 } 169 }
170 case HValue::kStoreNamedField: { 170 case HValue::kStoreNamedField: {
171 HStoreNamedField* store = HStoreNamedField::cast(instr); 171 HStoreNamedField* store = HStoreNamedField::cast(instr);
172 int index = store->access().offset() / kPointerSize; 172 int index = store->access().offset() / kPointerSize;
173 if (store->object() != allocate) continue; 173 if (store->object() != allocate) continue;
174 ASSERT(store->access().IsInobject()); 174 ASSERT(store->access().IsInobject());
175 state = NewStateCopy(store, state); 175 state = NewStateCopy(store->previous(), state);
176 state->SetOperandAt(index, store->value()); 176 state->SetOperandAt(index, store->value());
177 if (store->has_transition()) { 177 if (store->has_transition()) {
178 state->SetOperandAt(0, store->transition()); 178 state->SetOperandAt(0, store->transition());
179 } 179 }
180 if (store->HasObservableSideEffects()) {
181 state->ReuseSideEffectsFromStore(store);
182 }
180 store->DeleteAndReplaceWith(NULL); 183 store->DeleteAndReplaceWith(NULL);
181 if (FLAG_trace_escape_analysis) { 184 if (FLAG_trace_escape_analysis) {
182 PrintF("Replacing store #%d%s\n", instr->id(), 185 PrintF("Replacing store #%d%s\n", instr->id(),
183 store->has_transition() ? " (with transition)" : ""); 186 store->has_transition() ? " (with transition)" : "");
184 } 187 }
185 break; 188 break;
186 } 189 }
187 case HValue::kArgumentsObject: 190 case HValue::kArgumentsObject:
188 case HValue::kCapturedObject: 191 case HValue::kCapturedObject:
189 case HValue::kSimulate: { 192 case HValue::kSimulate: {
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 AnalyzeDataFlow(allocate); 276 AnalyzeDataFlow(allocate);
274 277
275 cumulative_values_ += number_of_values_; 278 cumulative_values_ += number_of_values_;
276 ASSERT(allocate->HasNoUses()); 279 ASSERT(allocate->HasNoUses());
277 ASSERT(!allocate->IsLinked()); 280 ASSERT(!allocate->IsLinked());
278 } 281 }
279 } 282 }
280 283
281 284
282 } } // namespace v8::internal 285 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698