зеркало из https://github.com/mozilla/gecko-dev.git
Bug 992461 - Turn off the shell's asm.js cache by default (r=bbouvier)
--HG-- extra : rebase_source : 12b23393ae2ebda0b40526d94bbf97005d490874
This commit is contained in:
Родитель
e02baa8508
Коммит
60282b3ca5
|
@ -34,7 +34,7 @@ function asmCompileCached()
|
|||
var quotedArgs = [];
|
||||
for (var i = 0; i < arguments.length; i++)
|
||||
quotedArgs.push("'" + arguments[i] + "'");
|
||||
var code = "var f = new Function(" + quotedArgs.join(',') + ");assertEq(isAsmJSModule(f), true);";
|
||||
var code = "setCachingEnabled(true); var f = new Function(" + quotedArgs.join(',') + ");assertEq(isAsmJSModule(f), true);";
|
||||
nestedShell("--js-cache", "--no-js-cache-per-process", "--execute=" + code);
|
||||
|
||||
var f = Function.apply(null, arguments);
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
// separate process and then load it again in this process, which should be a
|
||||
// cache hit.
|
||||
|
||||
setCachingEnabled(true);
|
||||
if (!isAsmJSCompilationAvailable())
|
||||
quit();
|
||||
|
||||
|
@ -9,7 +10,7 @@ if (!isAsmJSCompilationAvailable())
|
|||
// bullet.js and not the nestedShell() call, so try first commenting out
|
||||
// nestedShell() (and the loadedFromCache assertion) to see if the error
|
||||
// reproduces.
|
||||
var code = "setIonCheckGraphCoherency(false); load('" + libdir + "bullet.js'); runBullet()";
|
||||
var code = "setIonCheckGraphCoherency(false); setCachingEnabled(true); load('" + libdir + "bullet.js'); runBullet()";
|
||||
nestedShell("--js-cache", "--no-js-cache-per-process", "--execute=" + code);
|
||||
setIonCheckGraphCoherency(false);
|
||||
load(libdir + 'bullet.js');
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
load(libdir + "asm.js");
|
||||
|
||||
setCachingEnabled(true);
|
||||
if (!isAsmJSCompilationAvailable() || !isCachingEnabled())
|
||||
quit();
|
||||
|
||||
|
|
|
@ -15,6 +15,8 @@ var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i
|
|||
var f = asmLink(code, this, null, new ArrayBuffer(4096));
|
||||
assertEq(f(0), 0);
|
||||
|
||||
setCachingEnabled(true);
|
||||
|
||||
var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i32[0] = i; return i8[0]|0}; return f');
|
||||
var f = asmLink(code, this, null, new ArrayBuffer(4096));
|
||||
assertEq(f(0),0);
|
||||
|
@ -49,6 +51,8 @@ assertEq(f(0x100),0);
|
|||
assertEq(signalHandlersBefore, signalHandlersAfter);
|
||||
})();
|
||||
|
||||
setCachingEnabled(false);
|
||||
|
||||
var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i32[0] = i; return u8[0]|0}; return f');
|
||||
var f = asmLink(code, this, null, new ArrayBuffer(4096));
|
||||
assertEq(f(0),0);
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
setCachingEnabled(true);
|
||||
|
||||
(function() {
|
||||
/*
|
||||
* NO ARGUMENT
|
||||
|
|
|
@ -20,6 +20,7 @@ function dumpStack()
|
|||
setJitCompilerOption("ion.usecount.trigger", 10);
|
||||
setJitCompilerOption("baseline.usecount.trigger", 0);
|
||||
setJitCompilerOption("offthread-compilation.enable", 0);
|
||||
setCachingEnabled(true);
|
||||
|
||||
var callFFI = asmCompile('global', 'ffis', USE_ASM + "var ffi=ffis.ffi; function f() { return ffi()|0 } return f");
|
||||
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
load(libdir + "asm.js");
|
||||
|
||||
setCachingEnabled(true);
|
||||
|
||||
var jco = getJitCompilerOptions();
|
||||
if (jco["signals.enable"] === 0 || !isCachingEnabled() || !isAsmJSCompilationAvailable())
|
||||
quit(6);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
load(libdir + "asm.js");
|
||||
|
||||
setCachingEnabled(true);
|
||||
if (!isAsmJSCompilationAvailable() || !isCachingEnabled())
|
||||
quit();
|
||||
|
||||
|
|
|
@ -130,7 +130,7 @@ static bool enableDisassemblyDumps = false;
|
|||
static bool printTiming = false;
|
||||
static const char *jsCacheDir = nullptr;
|
||||
static const char *jsCacheAsmJSPath = nullptr;
|
||||
static bool jsCachingEnabled = true;
|
||||
static bool jsCachingEnabled = false;
|
||||
mozilla::Atomic<bool> jsCacheOpened(false);
|
||||
|
||||
static bool
|
||||
|
|
Загрузка…
Ссылка в новой задаче