Bug 1516697 - Make wasm/AsmJS.h minimally include only what it needs. r=arai
authorJeff Walden <jwalden@mit.edu>
Wed, 26 Dec 2018 20:59:49 -0600
changeset 509701 0e39815d1bcee5861969f7b6db68b6db33b98423
parent 509700 9d85a82d43054cf502c91705800180a21651d999
child 509702 e58454c68f0f9906c62a86a797fd4695977bf506
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersarai
bugs1516697
milestone66.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 1516697 - Make wasm/AsmJS.h minimally include only what it needs. r=arai
js/src/wasm/AsmJS.h
--- a/js/src/wasm/AsmJS.h
+++ b/js/src/wasm/AsmJS.h
@@ -11,20 +11,36 @@
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
 
-#ifndef asmjs_asmjs_h
-#define asmjs_asmjs_h
+#ifndef wasm_AsmJS_h
+#define wasm_AsmJS_h
+
+#include "mozilla/Attributes.h"  // MOZ_MUST_USE
+
+#include <stdint.h>  // uint32_t
+
+#include "js/CallArgs.h"  // JSNative
 
-#include "NamespaceImports.h"
+struct JSContext;
+class JSFunction;
+
+namespace JS {
+
+union Value;
+
+template <typename T>
+class Handle;
+
+}  // namespace JS
 
 namespace js {
 
 namespace frontend {
 
 class ParseContext;
 class ParseNode;
 
@@ -62,26 +78,27 @@ extern bool InstantiateAsmJS(JSContext* 
 // asm.js testing natives:
 
 extern bool IsAsmJSCompilationAvailable(JSContext* cx, unsigned argc,
                                         JS::Value* vp);
 
 extern bool IsAsmJSModule(JSContext* cx, unsigned argc, JS::Value* vp);
 
 extern bool IsAsmJSModuleLoadedFromCache(JSContext* cx, unsigned argc,
-                                         Value* vp);
+                                         JS::Value* vp);
 
 extern bool IsAsmJSFunction(JSContext* cx, unsigned argc, JS::Value* vp);
 
 // asm.js toString/toSource support:
 
-extern JSString* AsmJSFunctionToString(JSContext* cx, HandleFunction fun);
+extern JSString* AsmJSFunctionToString(JSContext* cx,
+                                       JS::Handle<JSFunction*> fun);
 
-extern JSString* AsmJSModuleToString(JSContext* cx, HandleFunction fun,
+extern JSString* AsmJSModuleToString(JSContext* cx, JS::Handle<JSFunction*> fun,
                                      bool isToSource);
 
 // asm.js heap:
 
 extern bool IsValidAsmJSHeapLength(uint32_t length);
 
 }  // namespace js
 
-#endif  // asmjs_asmjs_h
+#endif  // wasm_AsmJS_h