Remove HType::HeapNumber from mutable heap numbers.

BUG=
R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/293353004

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21516 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
verwaest@chromium.org 2014-05-27 09:40:04 +00:00
parent 621c7eb673
commit b60054df88
2 changed files with 1 additions and 8 deletions

View File

@ -714,7 +714,6 @@ class HValue : public ZoneObject {
if (r.IsTagged()) {
HType t = type();
if (t.IsSmi()) return Representation::Smi();
// TODO(mstarzinger): This is not correct for mutable HeapNumbers.
if (t.IsHeapNumber()) return Representation::Double();
if (t.IsHeapObject()) return r;
return Representation::None();
@ -5547,10 +5546,6 @@ class HAllocate V8_FINAL : public HTemplateInstruction<2> {
return Representation::Integer32();
}
}
// TODO(mstarzinger): Workaround until we track mutable HeapNumber types.
virtual Representation KnownOptimalRepresentation() V8_OVERRIDE {
return representation();
}
virtual Handle<Map> GetMonomorphicJSObjectMap() {
return known_initial_map_;

View File

@ -5443,7 +5443,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();
}
@ -5481,7 +5480,7 @@ HInstruction* HOptimizedGraphBuilder::BuildStoreNamedField(
// TODO(hpayer): Allocation site pretenuring support.
HInstruction* heap_number = Add<HAllocate>(heap_number_size,
HType::HeapNumber(),
HType::Tagged(),
NOT_TENURED,
HEAP_NUMBER_TYPE);
AddStoreMapConstant(heap_number, isolate()->factory()->heap_number_map());
@ -5494,7 +5493,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);