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

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

Issue 264693011: Various cleanups in check elimination. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
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 | 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 // 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 125
126 126
127 // Insert a newly created value check as a replacement for map checks. 127 // Insert a newly created value check as a replacement for map checks.
128 HValue* HEscapeAnalysisPhase::NewMapCheckAndInsert(HCapturedObject* state, 128 HValue* HEscapeAnalysisPhase::NewMapCheckAndInsert(HCapturedObject* state,
129 HCheckMaps* mapcheck) { 129 HCheckMaps* mapcheck) {
130 Zone* zone = graph()->zone(); 130 Zone* zone = graph()->zone();
131 HValue* value = state->map_value(); 131 HValue* value = state->map_value();
132 // TODO(mstarzinger): This will narrow a map check against a set of maps 132 // TODO(mstarzinger): This will narrow a map check against a set of maps
133 // down to the first element in the set. Revisit and fix this. 133 // down to the first element in the set. Revisit and fix this.
134 HCheckValue* check = HCheckValue::New( 134 HCheckValue* check = HCheckValue::New(
135 zone, NULL, value, mapcheck->first_map(), false); 135 zone, NULL, value, mapcheck->maps()->at(0), false);
136 check->InsertBefore(mapcheck); 136 check->InsertBefore(mapcheck);
137 return check; 137 return check;
138 } 138 }
139 139
140 140
141 // Replace a field load with a given value, forcing Smi representation if 141 // Replace a field load with a given value, forcing Smi representation if
142 // necessary. 142 // necessary.
143 HValue* HEscapeAnalysisPhase::NewLoadReplacement( 143 HValue* HEscapeAnalysisPhase::NewLoadReplacement(
144 HLoadNamedField* load, HValue* load_value) { 144 HLoadNamedField* load, HValue* load_value) {
145 HValue* replacement = load_value; 145 HValue* replacement = load_value;
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 for (int i = 0; i < max_fixpoint_iteration_count; i++) { 319 for (int i = 0; i < max_fixpoint_iteration_count; i++) {
320 CollectCapturedValues(); 320 CollectCapturedValues();
321 if (captured_.is_empty()) break; 321 if (captured_.is_empty()) break;
322 PerformScalarReplacement(); 322 PerformScalarReplacement();
323 captured_.Clear(); 323 captured_.Clear();
324 } 324 }
325 } 325 }
326 326
327 327
328 } } // namespace v8::internal 328 } } // 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