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

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

Issue 295743002: Refactor transitioning stores. (Closed) Base URL: git@github.com:v8/v8.git@master
Patch Set: Created 6 years, 7 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
« no previous file with comments | « src/hydrogen-check-elimination.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "hydrogen-escape-analysis.h" 5 #include "hydrogen-escape-analysis.h"
6 6
7 namespace v8 { 7 namespace v8 {
8 namespace internal { 8 namespace internal {
9 9
10 10
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 } 199 }
200 break; 200 break;
201 } 201 }
202 case HValue::kStoreNamedField: { 202 case HValue::kStoreNamedField: {
203 HStoreNamedField* store = HStoreNamedField::cast(instr); 203 HStoreNamedField* store = HStoreNamedField::cast(instr);
204 int index = store->access().offset() / kPointerSize; 204 int index = store->access().offset() / kPointerSize;
205 if (store->object() != allocate) continue; 205 if (store->object() != allocate) continue;
206 ASSERT(store->access().IsInobject()); 206 ASSERT(store->access().IsInobject());
207 state = NewStateCopy(store->previous(), state); 207 state = NewStateCopy(store->previous(), state);
208 state->SetOperandAt(index, store->value()); 208 state->SetOperandAt(index, store->value());
209 if (store->has_transition()) {
210 state->SetOperandAt(0, store->transition());
211 }
212 if (store->HasObservableSideEffects()) { 209 if (store->HasObservableSideEffects()) {
213 state->ReuseSideEffectsFromStore(store); 210 state->ReuseSideEffectsFromStore(store);
214 } 211 }
215 store->DeleteAndReplaceWith(store->ActualValue()); 212 store->DeleteAndReplaceWith(store->ActualValue());
216 if (FLAG_trace_escape_analysis) { 213 if (FLAG_trace_escape_analysis) {
217 PrintF("Replacing store #%d%s\n", instr->id(), 214 PrintF("Replacing store #%d\n", instr->id());
218 store->has_transition() ? " (with transition)" : "");
219 } 215 }
220 break; 216 break;
221 } 217 }
222 case HValue::kArgumentsObject: 218 case HValue::kArgumentsObject:
223 case HValue::kCapturedObject: 219 case HValue::kCapturedObject:
224 case HValue::kSimulate: { 220 case HValue::kSimulate: {
225 for (int i = 0; i < instr->OperandCount(); i++) { 221 for (int i = 0; i < instr->OperandCount(); i++) {
226 if (instr->OperandAt(i) != allocate) continue; 222 if (instr->OperandAt(i) != allocate) continue;
227 instr->SetOperandAt(i, state); 223 instr->SetOperandAt(i, state);
228 } 224 }
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 for (int i = 0; i < max_fixpoint_iteration_count; i++) { 315 for (int i = 0; i < max_fixpoint_iteration_count; i++) {
320 CollectCapturedValues(); 316 CollectCapturedValues();
321 if (captured_.is_empty()) break; 317 if (captured_.is_empty()) break;
322 PerformScalarReplacement(); 318 PerformScalarReplacement();
323 captured_.Clear(); 319 captured_.Clear();
324 } 320 }
325 } 321 }
326 322
327 323
328 } } // namespace v8::internal 324 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen-check-elimination.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698