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

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

Issue 140683011: Improve positions tracking inside the HGraphBuilder. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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-instructions.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 Maybe<HConstant*> res = constant->CopyToTruncatedInt32(graph()->zone()); 54 Maybe<HConstant*> res = constant->CopyToTruncatedInt32(graph()->zone());
55 if (res.has_value) new_value = res.value; 55 if (res.has_value) new_value = res.value;
56 } else { 56 } else {
57 new_value = constant->CopyToRepresentation(to, graph()->zone()); 57 new_value = constant->CopyToRepresentation(to, graph()->zone());
58 } 58 }
59 } 59 }
60 60
61 if (new_value == NULL) { 61 if (new_value == NULL) {
62 new_value = new(graph()->zone()) HChange( 62 new_value = new(graph()->zone()) HChange(
63 value, to, is_truncating_to_smi, is_truncating_to_int); 63 value, to, is_truncating_to_smi, is_truncating_to_int);
64 if (use_value->operand_position(use_index) != RelocInfo::kNoPosition) { 64 if (!use_value->operand_position(use_index).IsUnknown()) {
65 new_value->set_position(use_value->operand_position(use_index)); 65 new_value->set_position(use_value->operand_position(use_index));
66 } else { 66 } else {
67 ASSERT(!FLAG_emit_opt_code_positions || !graph()->info()->IsOptimizing()); 67 ASSERT(!FLAG_hydrogen_track_positions ||
68 !graph()->info()->IsOptimizing());
68 } 69 }
69 } 70 }
70 71
71 new_value->InsertBefore(next); 72 new_value->InsertBefore(next);
72 use_value->SetOperandAt(use_index, new_value); 73 use_value->SetOperandAt(use_index, new_value);
73 } 74 }
74 75
75 76
76 void HRepresentationChangesPhase::InsertRepresentationChangesForValue( 77 void HRepresentationChangesPhase::InsertRepresentationChangesForValue(
77 HValue* value) { 78 HValue* value) {
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 // Process normal instructions. 189 // Process normal instructions.
189 for (HInstruction* current = block->first(); current != NULL; ) { 190 for (HInstruction* current = block->first(); current != NULL; ) {
190 HInstruction* next = current->next(); 191 HInstruction* next = current->next();
191 InsertRepresentationChangesForValue(current); 192 InsertRepresentationChangesForValue(current);
192 current = next; 193 current = next;
193 } 194 }
194 } 195 }
195 } 196 }
196 197
197 } } // namespace v8::internal 198 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698