diff --git a/js/src/jit-test/tests/asm.js/testBasic.js b/js/src/jit-test/tests/asm.js/testBasic.js index 716985703cb..c9847fc61bc 100644 --- a/js/src/jit-test/tests/asm.js/testBasic.js +++ b/js/src/jit-test/tests/asm.js/testBasic.js @@ -107,38 +107,6 @@ assertTypeFailInEval('function f(global, {imports}) { "use asm"; function g() {} assertTypeFailInEval('function f(g = 2) { "use asm"; function g() {} return g }'); assertTypeFailInEval('function *f() { "use asm"; function g() {} return g }'); -function assertLinkFailInEval(str) -{ - if (!isAsmJSCompilationAvailable()) - return; - - var caught = false; - var oldOpts = options("werror"); - assertEq(oldOpts.indexOf("werror"), -1); - try { - eval(str); - } catch (e) { - assertEq((''+e).indexOf(ASM_OK_STRING) == -1, false); - caught = true; - } - assertEq(caught, true); - options("werror"); - - var code = eval(str); - - var caught = false; - var oldOpts = options("werror"); - assertEq(oldOpts.indexOf("werror"), -1); - try { - code.apply(null, Array.slice(arguments, 1)); - } catch (e) { - caught = true; - } - assertEq(caught, true); - options("werror"); -} -assertLinkFailInEval('(function(global) { "use asm"; var im=global.Math.imul; function g() {} return g })'); - assertThrowsInstanceOf(function() { new Function(USE_ASM + 'var)') }, SyntaxError); assertThrowsInstanceOf(function() { new Function(USE_ASM + 'return)') }, SyntaxError); assertThrowsInstanceOf(function() { new Function(USE_ASM + 'var z=-2w') }, SyntaxError); diff --git a/js/src/js.msg b/js/src/js.msg index 75e0dce894c..ba232ffccc9 100644 --- a/js/src/js.msg +++ b/js/src/js.msg @@ -391,7 +391,7 @@ MSG_DEF(JSMSG_DATE_NOT_FINITE, 337, 0, JSEXN_RANGEERR, "date value is not MSG_DEF(JSMSG_USE_ASM_DIRECTIVE_FAIL, 338, 0, JSEXN_SYNTAXERR, "\"use asm\" is only meaningful in the Directive Prologue of a function body") MSG_DEF(JSMSG_USE_ASM_TYPE_FAIL, 339, 1, JSEXN_TYPEERR, "asm.js type error: {0}") MSG_DEF(JSMSG_USE_ASM_LINK_FAIL, 340, 1, JSEXN_TYPEERR, "asm.js link error: {0}") -MSG_DEF(JSMSG_USE_ASM_TYPE_OK, 341, 1, JSEXN_ERR, "successfully compiled asm.js code ({0})") +MSG_DEF(JSMSG_USE_ASM_TYPE_OK, 341, 1, JSEXN_NONE, "Successfully compiled asm.js code ({0})") MSG_DEF(JSMSG_BAD_ARROW_ARGS, 342, 0, JSEXN_SYNTAXERR, "invalid arrow-function arguments (parentheses around the arrow-function may help)") MSG_DEF(JSMSG_YIELD_IN_ARROW, 343, 0, JSEXN_SYNTAXERR, "arrow function may not contain yield") MSG_DEF(JSMSG_WRONG_VALUE, 344, 2, JSEXN_ERR, "expected {0} but found {1}")