Index: src/v8globals.h |
diff --git a/src/v8globals.h b/src/v8globals.h |
index 2a01dfd1b6f7a3df93d3221ffed4ac2b8b5e103d..dc4bac5170d86f27d8cbacb95e3341e0d1c2dde0 100644 |
--- a/src/v8globals.h |
+++ b/src/v8globals.h |
@@ -1,4 +1,4 @@ |
-// Copyright 2010 the V8 project authors. All rights reserved. |
+// Copyright 2011 the V8 project authors. All rights reserved. |
// Redistribution and use in source and binary forms, with or without |
// modification, are permitted provided that the following conditions are |
// met: |
@@ -28,6 +28,7 @@ |
#ifndef V8_V8GLOBALS_H_ |
#define V8_V8GLOBALS_H_ |
+#include <string.h> |
#include "globals.h" |
namespace v8 { |
@@ -345,10 +346,9 @@ enum TransitionFlag { |
// Union used for fast testing of specific double values. |
-union DoubleRepresentation { |
- double value; |
+struct DoubleRepresentation { |
+ explicit DoubleRepresentation(double x) { memcpy(&bits, &x, sizeof(bits)); } |
William Hesse
2011/04/08 09:27:58
Leave as is, or use BitCast - we don't want yet a
Lasse Reichstein
2011/04/08 11:18:10
agree. Removed.
|
int64_t bits; |
- DoubleRepresentation(double x) { value = x; } |
}; |