Bug 1302434 - Baldr: fix unified bustage (r=bbouvier)
authorLuke Wagner <luke@mozilla.com>
Wed, 14 Sep 2016 09:20:15 -0500
changeset 355232 841360219550822db4a8c481f87a2974b446ba84
parent 355231 61fa499a062238ded87c5b0a68da4442b9e67410
child 355233 9b8f24e60b5dcb7932755bb698d151e166d10cf1
push id6570
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:26:13 +0000
treeherdermozilla-beta@f455459b2ae5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbbouvier
bugs1302434
milestone51.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 1302434 - Baldr: fix unified bustage (r=bbouvier) MozReview-Commit-ID: 61nhNdVZcx5
js/src/asmjs/WasmCode.cpp
js/src/vm/ArrayBufferObject-inl.h
js/src/vm/ArrayBufferObject.cpp
--- a/js/src/asmjs/WasmCode.cpp
+++ b/js/src/asmjs/WasmCode.cpp
@@ -31,16 +31,17 @@
 #ifdef JS_ION_PERF
 # include "jit/PerfSpewer.h"
 #endif
 #include "vm/StringBuffer.h"
 #ifdef MOZ_VTUNE
 # include "vtune/VTuneWrapper.h"
 #endif
 
+#include "jit/MacroAssembler-inl.h"
 #include "vm/ArrayBufferObject-inl.h"
 
 using namespace js;
 using namespace js::jit;
 using namespace js::wasm;
 using mozilla::Atomic;
 using mozilla::BinarySearch;
 using mozilla::MakeEnumeratedRange;
--- a/js/src/vm/ArrayBufferObject-inl.h
+++ b/js/src/vm/ArrayBufferObject-inl.h
@@ -38,36 +38,16 @@ ArrayBufferObjectMaybeShared::isDetached
 inline uint32_t
 AnyArrayBufferByteLength(const ArrayBufferObjectMaybeShared* buf)
 {
     if (buf->is<ArrayBufferObject>())
         return buf->as<ArrayBufferObject>().byteLength();
     return buf->as<SharedArrayBufferObject>().byteLength();
 }
 
-inline size_t
-WasmArrayBufferMappedSize(const ArrayBufferObjectMaybeShared* buf)
-{
-    if (buf->is<ArrayBufferObject>())
-        return buf->as<ArrayBufferObject>().wasmMappedSize();
-#ifdef WASM_HUGE_MEMORY
-    return wasm::HugeMappedSize;
-#else
-    return buf->as<SharedArrayBufferObject>().byteLength();
-#endif
-}
-
-inline mozilla::Maybe<uint32_t>
-WasmArrayBufferMaxSize(const ArrayBufferObjectMaybeShared* buf)
-{
-    if (buf->is<ArrayBufferObject>())
-        return buf->as<ArrayBufferObject>().wasmMaxSize();
-    return mozilla::Some(buf->as<SharedArrayBufferObject>().byteLength());
-}
-
 inline bool
 AnyArrayBufferIsPreparedForAsmJS(const ArrayBufferObjectMaybeShared* buf)
 {
     if (buf->is<ArrayBufferObject>())
         return buf->as<ArrayBufferObject>().isPreparedForAsmJS();
     return buf->as<SharedArrayBufferObject>().isPreparedForAsmJS();
 }
 
--- a/js/src/vm/ArrayBufferObject.cpp
+++ b/js/src/vm/ArrayBufferObject.cpp
@@ -838,25 +838,46 @@ ArrayBufferObject::setByteLength(uint32_
 size_t
 ArrayBufferObject::wasmMappedSize() const
 {
     if (isWasm())
         return contents().wasmBuffer()->mappedSize();
     return byteLength();
 }
 
+size_t
+js::WasmArrayBufferMappedSize(const ArrayBufferObjectMaybeShared* buf)
+{
+    if (buf->is<ArrayBufferObject>())
+        return buf->as<ArrayBufferObject>().wasmMappedSize();
+#ifdef WASM_HUGE_MEMORY
+    return wasm::HugeMappedSize;
+#else
+    return buf->as<SharedArrayBufferObject>().byteLength();
+#endif
+}
+
 Maybe<uint32_t>
 ArrayBufferObject::wasmMaxSize() const
 {
     if (isWasm())
         return contents().wasmBuffer()->maxSize();
     else
         return Some<uint32_t>(byteLength());
 }
 
+Maybe<uint32_t>
+js::WasmArrayBufferMaxSize(const ArrayBufferObjectMaybeShared* buf)
+{
+    if (buf->is<ArrayBufferObject>())
+        return buf->as<ArrayBufferObject>().wasmMaxSize();
+
+    return Some(buf->as<SharedArrayBufferObject>().byteLength());
+}
+
 /* static */ bool
 ArrayBufferObject::wasmGrowToSizeInPlace(uint32_t newSize,
                                          HandleArrayBufferObject oldBuf,
                                          MutableHandleArrayBufferObject newBuf,
                                          JSContext* cx)
 {
     // On failure, do not throw and ensure that the original buffer is
     // unmodified and valid. After WasmArrayRawBuffer::growToSizeInPlace(), the