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

Side by Side Diff: src/crankshaft/hydrogen-representation-changes.cc

Issue 2451853002: Uniform and precise source positions for inlining (Closed)
Patch Set: fixed gcmole issue Created 4 years, 1 month 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
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 "src/crankshaft/hydrogen-representation-changes.h" 5 #include "src/crankshaft/hydrogen-representation-changes.h"
6 6
7 namespace v8 { 7 namespace v8 {
8 namespace internal { 8 namespace internal {
9 9
10 void HRepresentationChangesPhase::InsertRepresentationChangeForUse( 10 void HRepresentationChangesPhase::InsertRepresentationChangeForUse(
(...skipping 23 matching lines...) Expand all
34 if (res.IsJust()) new_value = res.FromJust(); 34 if (res.IsJust()) new_value = res.FromJust();
35 } else { 35 } else {
36 new_value = constant->CopyToRepresentation(to, graph()->zone()); 36 new_value = constant->CopyToRepresentation(to, graph()->zone());
37 } 37 }
38 } 38 }
39 39
40 if (new_value == NULL) { 40 if (new_value == NULL) {
41 new_value = new (graph()->zone()) 41 new_value = new (graph()->zone())
42 HChange(value, to, is_truncating_to_smi, is_truncating_to_int, 42 HChange(value, to, is_truncating_to_smi, is_truncating_to_int,
43 is_truncating_to_number); 43 is_truncating_to_number);
44 if (!use_value->operand_position(use_index).IsUnknown()) {
45 new_value->set_position(use_value->operand_position(use_index));
46 } else {
47 DCHECK(!FLAG_hydrogen_track_positions ||
48 !graph()->info()->IsOptimizing());
49 }
50 } 44 }
51 45
52 new_value->InsertBefore(next); 46 new_value->InsertBefore(next);
53 use_value->SetOperandAt(use_index, new_value); 47 use_value->SetOperandAt(use_index, new_value);
54 } 48 }
55 49
56 50
57 static bool IsNonDeoptingIntToSmiChange(HChange* change) { 51 static bool IsNonDeoptingIntToSmiChange(HChange* change) {
58 Representation from_rep = change->from(); 52 Representation from_rep = change->from();
59 Representation to_rep = change->to(); 53 Representation to_rep = change->to();
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 for (HInstruction* current = block->first(); current != NULL; ) { 235 for (HInstruction* current = block->first(); current != NULL; ) {
242 HInstruction* next = current->next(); 236 HInstruction* next = current->next();
243 InsertRepresentationChangesForValue(current); 237 InsertRepresentationChangesForValue(current);
244 current = next; 238 current = next;
245 } 239 }
246 } 240 }
247 } 241 }
248 242
249 } // namespace internal 243 } // namespace internal
250 } // namespace v8 244 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698