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

Unified Diff: src/hydrogen.cc

Issue 23241027: Avoid setting / depending on flags when transitioning, and when fields are known to be constant. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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') | src/hydrogen-instructions.h » ('J')
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 fd4cc351af8b07d7fad9c547bfce99f04586b708..46e9b54ee08a9b2168ccf3ed3ae26c9ae581cba8 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -4483,8 +4483,8 @@ HInstruction* HOptimizedGraphBuilder::BuildStoreNamedField(
HStoreNamedField *instr;
if (FLAG_track_double_fields && field_access.representation().IsDouble()) {
- HObjectAccess heap_number_access =
- field_access.WithRepresentation(Representation::Tagged());
+ HObjectAccess heap_number_access = field_access.WithRepresentation(
+ Representation::Tagged(), HObjectAccess::CONSTANT);
if (transition_to_field) {
// The store requires a mutable HeapNumber to be allocated.
NoObservableSideEffectsScope no_side_effects(this);
@@ -5388,7 +5388,8 @@ HLoadNamedField* HGraphBuilder::BuildLoadNamedField(HValue* object,
if (FLAG_track_double_fields && access.representation().IsDouble()) {
// load the heap number
HLoadNamedField* heap_number = Add<HLoadNamedField>(
- object, access.WithRepresentation(Representation::Tagged()));
+ object, access.WithRepresentation(
+ Representation::Tagged(), HObjectAccess::CONSTANT));
heap_number->set_type(HType::HeapNumber());
// load the double value from it
return New<HLoadNamedField>(
« no previous file with comments | « no previous file | src/hydrogen-instructions.h » ('j') | src/hydrogen-instructions.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698