Bug 1359810: wasm: in always-baseline mode, consider hardware requirements; r=luke
authorBenjamin Bouvier <benj@benj.me>
Fri, 14 Apr 2017 17:54:49 +0200
changeset 403193 abb6e3b5e032a630b7c995b91a205e16d03f7c58
parent 403192 9323cfe9cd8e11683bc738b8f5ee58ea4d0fe311
child 403194 c8884c38a51d35cc619e235a17ae1296f8119760
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke
bugs1359810
milestone55.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 1359810: wasm: in always-baseline mode, consider hardware requirements; r=luke
js/src/wasm/WasmGenerator.cpp
--- a/js/src/wasm/WasmGenerator.cpp
+++ b/js/src/wasm/WasmGenerator.cpp
@@ -135,18 +135,19 @@ ModuleGenerator::initWasm(const CompileA
     MOZ_ASSERT(!env_->isAsmJS());
 
     metadata_ = js_new<Metadata>();
     if (!metadata_)
         return false;
 
     MOZ_ASSERT(!isAsmJS());
 
-    metadata_->debugEnabled = args.debugEnabled && BaselineCanCompile();
-    compileMode_ = args.alwaysBaseline || metadata_->debugEnabled
+    bool canBaseline = BaselineCanCompile();
+    metadata_->debugEnabled = args.debugEnabled && canBaseline;
+    compileMode_ = ((args.alwaysBaseline || metadata_->debugEnabled) && canBaseline)
                    ? CompileMode::Baseline
                    : CompileMode::Ion;
 
     // For wasm, the Vectors are correctly-sized and already initialized.
 
     numSigs_ = env_->sigs.length();
     numTables_ = env_->tables.length();