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

Unified Diff: src/heap-inl.h

Issue 211333002: Replace HeapNumber as doublebox with an explicit MutableHeapNumber. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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
Index: src/heap-inl.h
diff --git a/src/heap-inl.h b/src/heap-inl.h
index 063cf30ff3cd178b4c7efda22fcc2447252e90c8..f6525ae307186f54d43d01bbe0574a3e51da0653 100644
--- a/src/heap-inl.h
+++ b/src/heap-inl.h
@@ -273,7 +273,7 @@ MaybeObject* Heap::NumberFromInt32(
int32_t value, PretenureFlag pretenure) {
if (Smi::IsValid(value)) return Smi::FromInt(value);
// Bypass NumberFromDouble to avoid various redundant checks.
- return AllocateHeapNumber(FastI2D(value), pretenure);
+ return AllocateHeapNumber(FastI2D(value), IMMUTABLE, pretenure);
}
@@ -284,7 +284,7 @@ MaybeObject* Heap::NumberFromUint32(
return Smi::FromInt(static_cast<int32_t>(value));
}
// Bypass NumberFromDouble to avoid various redundant checks.
- return AllocateHeapNumber(FastUI2D(value), pretenure);
+ return AllocateHeapNumber(FastUI2D(value), IMMUTABLE, pretenure);
}
« no previous file with comments | « src/heap.cc ('k') | src/heap-snapshot-generator.cc » ('j') | src/json-parser.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698