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

Unified Diff: src/hydrogen.cc

Issue 10782010: Make it clear that HInstruction's position is a write-once variable. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/hydrogen-instructions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 0897aad305be9f08bb1771b3612dfc94388c1c3b..683e805566c024a07585fad5c21fd5778c3b52e5 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -5940,7 +5940,9 @@ HValue* HGraphBuilder::HandlePolymorphicElementAccess(HValue* object,
if (consolidated_load != NULL) {
AddInstruction(consolidated_load);
*has_side_effects |= consolidated_load->HasObservableSideEffects();
- consolidated_load->set_position(position);
+ if (position != RelocInfo::kNoPosition) {
+ consolidated_load->set_position(position);
+ }
return consolidated_load;
}
}
@@ -6006,7 +6008,7 @@ HValue* HGraphBuilder::HandlePolymorphicElementAccess(HValue* object,
object, key, val, transition, untransitionable_map, is_store));
}
*has_side_effects |= instr->HasObservableSideEffects();
- instr->set_position(position);
+ if (position != RelocInfo::kNoPosition) instr->set_position(position);
return is_store ? NULL : instr;
}
@@ -6108,7 +6110,7 @@ HValue* HGraphBuilder::HandlePolymorphicElementAccess(HValue* object,
external_elements, checked_key, val, elements_kind, is_store));
}
*has_side_effects |= access->HasObservableSideEffects();
- access->set_position(position);
+ if (position != RelocInfo::kNoPosition) access->set_position(position);
if (!is_store) {
Push(access);
}
@@ -6155,7 +6157,7 @@ HValue* HGraphBuilder::HandleKeyedElementAccess(HValue* obj,
instr = BuildLoadKeyedGeneric(obj, key);
}
}
- instr->set_position(position);
+ if (position != RelocInfo::kNoPosition) instr->set_position(position);
AddInstruction(instr);
*has_side_effects = instr->HasObservableSideEffects();
return instr;
@@ -7507,7 +7509,6 @@ void HGraphBuilder::VisitCallRuntime(CallRuntime* expr) {
int argument_count = expr->arguments()->length();
HCallRuntime* call =
new(zone()) HCallRuntime(context, name, function, argument_count);
- call->set_position(RelocInfo::kNoPosition);
Drop(argument_count);
return ast_context()->ReturnInstruction(call, expr->id());
}
« no previous file with comments | « no previous file | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698