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

Unified Diff: src/hydrogen.cc

Issue 293353004: Remove HType::HeapNumber from mutable heap numbers. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comment 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 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 8e0858dca7ea91be64f320d0f83392c592cbf8d9..41e241050a3e05d551604816fe5c9f0cbb963a45 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -5446,7 +5446,6 @@ HInstruction* HOptimizedGraphBuilder::BuildLoadNamedField(
checked_object = Add<HLoadNamedField>(
checked_object, static_cast<HValue*>(NULL),
access.WithRepresentation(Representation::Tagged()));
- checked_object->set_type(HType::HeapNumber());
// Load the double value from it.
access = HObjectAccess::ForHeapNumberValue();
}
@@ -5485,8 +5484,11 @@ HInstruction* HOptimizedGraphBuilder::BuildStoreNamedField(
PretenureFlag pretenure_flag = !FLAG_allocation_site_pretenuring ?
isolate()->heap()->GetPretenureMode() : NOT_TENURED;
+ // Mark mutable heap numbers as Tagged rather than HeapNumber, since
+ // unlike immutable heap numbers, the identity of mutable heap numbers
+ // matters.
HInstruction* heap_number = Add<HAllocate>(heap_number_size,
- HType::HeapNumber(),
+ HType::Tagged(),
pretenure_flag,
HEAP_NUMBER_TYPE);
AddStoreMapConstant(heap_number, isolate()->factory()->heap_number_map());
@@ -5499,7 +5501,6 @@ HInstruction* HOptimizedGraphBuilder::BuildStoreNamedField(
// Already holds a HeapNumber; load the box and write its value field.
HInstruction* heap_number = Add<HLoadNamedField>(
checked_object, static_cast<HValue*>(NULL), heap_number_access);
- heap_number->set_type(HType::HeapNumber());
instr = New<HStoreNamedField>(heap_number,
HObjectAccess::ForHeapNumberValue(),
value, STORE_TO_INITIALIZED_ENTRY);
« 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