Bug 925807 - define JS_BITS_PER_WORD in terms of JS_64BIT; r=njn
authorNathan Froyd <froydnj@mozilla.com>
Fri, 11 Oct 2013 15:11:48 -0400
changeset 165723 2b6522d861f8e74b454ca4683d1c86b31844a777
parent 165722 612f4837513a6c0279294acc34227a3b6443b4b4
child 165724 54e8cdecbaca676621d7ccb74b051326fd17ad2b
push id428
push userbbajaj@mozilla.com
push dateTue, 28 Jan 2014 00:16:25 +0000
treeherdermozilla-release@cd72a7ff3a75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnjn
bugs925807
milestone27.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 925807 - define JS_BITS_PER_WORD in terms of JS_64BIT; r=njn
js/public/Value.h
js/src/gc/RootMarking.cpp
js/src/jit/IonCode.h
js/src/jit/StupidAllocator.cpp
js/src/jsfun.h
js/src/jsinfer.h
js/src/jsopcode.h
js/src/jsscript.h
js/src/jstypes.h
--- a/js/public/Value.h
+++ b/js/public/Value.h
@@ -10,16 +10,18 @@
 #define js_Value_h
 
 #include "mozilla/Attributes.h"
 #include "mozilla/FloatingPoint.h"
 #include "mozilla/Likely.h"
 
 #include <limits> /* for std::numeric_limits */
 
+#include "jstypes.h"
+
 #include "js/Anchor.h"
 #include "js/RootingAPI.h"
 #include "js/Utility.h"
 
 namespace JS { class Value; }
 
 /* JS::Value can store a full int32_t. */
 #define JSVAL_INT_BITS          32
--- a/js/src/gc/RootMarking.cpp
+++ b/js/src/gc/RootMarking.cpp
@@ -10,16 +10,17 @@
 # include <valgrind/memcheck.h>
 #endif
 
 #include "jsapi.h"
 #include "jscntxt.h"
 #include "jsgc.h"
 #include "jsonparser.h"
 #include "jsprf.h"
+#include "jstypes.h"
 #include "jswatchpoint.h"
 
 #include "builtin/MapObject.h"
 #include "frontend/BytecodeCompiler.h"
 #include "gc/GCInternals.h"
 #include "gc/Marking.h"
 #ifdef JS_ION
 # include "jit/IonMacroAssembler.h"
--- a/js/src/jit/IonCode.h
+++ b/js/src/jit/IonCode.h
@@ -6,16 +6,17 @@
 
 #ifndef jit_IonCode_h
 #define jit_IonCode_h
 
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/PodOperations.h"
 
 #include "jsinfer.h"
+#include "jstypes.h"
 
 #include "gc/Heap.h"
 #include "jit/IonTypes.h"
 
 namespace JSC {
     class ExecutablePool;
 }
 
--- a/js/src/jit/StupidAllocator.cpp
+++ b/js/src/jit/StupidAllocator.cpp
@@ -1,16 +1,18 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  * vim: set ts=8 sts=4 et sw=4 tw=99:
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "jit/StupidAllocator.h"
 
+#include "jstypes.h"
+
 using namespace js;
 using namespace js::jit;
 
 static inline uint32_t
 DefaultStackSlot(uint32_t vreg)
 {
 #if JS_BITS_PER_WORD == 32
     return vreg * 2 + 2;
--- a/js/src/jsfun.h
+++ b/js/src/jsfun.h
@@ -8,16 +8,17 @@
 #define jsfun_h
 
 /*
  * JS function definitions.
  */
 
 #include "jsobj.h"
 #include "jsscript.h"
+#include "jstypes.h"
 
 namespace js {
 class FunctionExtended;
 
 typedef JSNative           Native;
 typedef JSParallelNative   ParallelNative;
 typedef JSThreadSafeNative ThreadSafeNative;
 }
--- a/js/src/jsinfer.h
+++ b/js/src/jsinfer.h
@@ -8,16 +8,17 @@
 
 #ifndef jsinfer_h
 #define jsinfer_h
 
 #include "mozilla/MemoryReporting.h"
 
 #include "jsalloc.h"
 #include "jsfriendapi.h"
+#include "jstypes.h"
 
 #include "ds/IdValuePair.h"
 #include "ds/LifoAlloc.h"
 #include "gc/Barrier.h"
 #include "gc/Marking.h"
 #include "js/Utility.h"
 #include "js/Vector.h"
 
--- a/js/src/jsopcode.h
+++ b/js/src/jsopcode.h
@@ -7,16 +7,17 @@
 #ifndef jsopcode_h
 #define jsopcode_h
 
 /*
  * JS bytecode definitions.
  */
 
 #include "jsbytecode.h"
+#include "jstypes.h"
 #include "NamespaceImports.h"
 
 #include "frontend/SourceNotes.h"
 
 /*
  * JS operation bytecodes.
  */
 typedef enum JSOp {
--- a/js/src/jsscript.h
+++ b/js/src/jsscript.h
@@ -13,16 +13,17 @@
 #include "mozilla/PodOperations.h"
 
 #include "jsatom.h"
 #ifdef JS_THREADSAFE
 #include "jslock.h"
 #endif
 #include "jsobj.h"
 #include "jsopcode.h"
+#include "jstypes.h"
 
 #include "gc/Barrier.h"
 #include "gc/Rooting.h"
 #include "jit/IonCode.h"
 #include "vm/Shape.h"
 
 namespace js {
 
--- a/js/src/jstypes.h
+++ b/js/src/jstypes.h
@@ -233,17 +233,21 @@
 ***********************************************************************/
 
 #define JS_ARRAY_LENGTH(array) (sizeof (array) / sizeof (array)[0])
 #define JS_ARRAY_END(array)    ((array) + JS_ARRAY_LENGTH(array))
 
 #define JS_BITS_PER_BYTE 8
 #define JS_BITS_PER_BYTE_LOG2 3
 
-#define JS_BITS_PER_WORD (JS_BITS_PER_BYTE * JS_BYTES_PER_WORD)
+#if defined(JS_64BIT)
+# define JS_BITS_PER_WORD 64
+#else
+# define JS_BITS_PER_WORD 32
+#endif
 
 /***********************************************************************
 ** MACROS:      JS_FUNC_TO_DATA_PTR
 **              JS_DATA_TO_FUNC_PTR
 ** DESCRIPTION:
 **      Macros to convert between function and data pointers assuming that
 **      they have the same size. Use them like this:
 **