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

Unified Diff: src/v8.cc

Issue 65143007: Removed dead function V8::FillHeapNumberWithRandom. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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 | « src/v8.h ('k') | test/cctest/test-random.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/v8.cc
diff --git a/src/v8.cc b/src/v8.cc
index fc6c56d496ee9da08ca68df10ab68b37a0489862..c35230d053b4866bffc16797ae650a68ea5b6110 100644
--- a/src/v8.cc
+++ b/src/v8.cc
@@ -171,30 +171,6 @@ void V8::FireCallCompletedCallback(Isolate* isolate) {
}
-// Use a union type to avoid type-aliasing optimizations in GCC.
-typedef union {
- double double_value;
- uint64_t uint64_t_value;
-} double_int_union;
-
-
-Object* V8::FillHeapNumberWithRandom(Object* heap_number,
- Context* context) {
- double_int_union r;
- uint64_t random_bits = Random(context);
- // Convert 32 random bits to 0.(32 random bits) in a double
- // by computing:
- // ( 1.(20 0s)(32 random bits) x 2^20 ) - (1.0 x 2^20)).
- static const double binary_million = 1048576.0;
- r.double_value = binary_million;
- r.uint64_t_value |= random_bits;
- r.double_value -= binary_million;
-
- HeapNumber::cast(heap_number)->set_value(r.double_value);
- return heap_number;
-}
-
-
void V8::InitializeOncePerProcessImpl() {
FlagList::EnforceFlagImplications();
if (FLAG_stress_compaction) {
« no previous file with comments | « src/v8.h ('k') | test/cctest/test-random.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698