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

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

Issue 112913002: Split up HLoadNamedField and HStoreNamedField. Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years 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-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 // 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 } 204 }
205 break; 205 break;
206 } 206 }
207 case HValue::kStoreNamedField: { 207 case HValue::kStoreNamedField: {
208 HStoreNamedField* store = HStoreNamedField::cast(instr); 208 HStoreNamedField* store = HStoreNamedField::cast(instr);
209 int index = store->access().offset() / kPointerSize; 209 int index = store->access().offset() / kPointerSize;
210 if (store->object() != allocate) continue; 210 if (store->object() != allocate) continue;
211 ASSERT(store->access().IsInobject()); 211 ASSERT(store->access().IsInobject());
212 state = NewStateCopy(store->previous(), state); 212 state = NewStateCopy(store->previous(), state);
213 state->SetOperandAt(index, store->value()); 213 state->SetOperandAt(index, store->value());
214 if (store->has_transition()) {
215 state->SetOperandAt(0, store->transition());
216 }
217 if (store->HasObservableSideEffects()) { 214 if (store->HasObservableSideEffects()) {
218 state->ReuseSideEffectsFromStore(store); 215 state->ReuseSideEffectsFromStore(store);
219 } 216 }
220 store->DeleteAndReplaceWith(store->ActualValue()); 217 store->DeleteAndReplaceWith(store->ActualValue());
221 if (FLAG_trace_escape_analysis) { 218 if (FLAG_trace_escape_analysis) {
222 PrintF("Replacing store #%d%s\n", instr->id(), 219 PrintF("Replacing store #%d\n", instr->id());
223 store->has_transition() ? " (with transition)" : "");
224 } 220 }
225 break; 221 break;
226 } 222 }
227 case HValue::kArgumentsObject: 223 case HValue::kArgumentsObject:
228 case HValue::kCapturedObject: 224 case HValue::kCapturedObject:
229 case HValue::kSimulate: { 225 case HValue::kSimulate: {
230 for (int i = 0; i < instr->OperandCount(); i++) { 226 for (int i = 0; i < instr->OperandCount(); i++) {
231 if (instr->OperandAt(i) != allocate) continue; 227 if (instr->OperandAt(i) != allocate) continue;
232 instr->SetOperandAt(i, state); 228 instr->SetOperandAt(i, state);
233 } 229 }
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 for (int i = 0; i < max_fixpoint_iteration_count; i++) { 320 for (int i = 0; i < max_fixpoint_iteration_count; i++) {
325 CollectCapturedValues(); 321 CollectCapturedValues();
326 if (captured_.is_empty()) break; 322 if (captured_.is_empty()) break;
327 PerformScalarReplacement(); 323 PerformScalarReplacement();
328 captured_.Clear(); 324 captured_.Clear();
329 } 325 }
330 } 326 }
331 327
332 328
333 } } // namespace v8::internal 329 } } // 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