Uglify checkout e36e07fa77859bcd461234856c06c95cee0cfffe (harmony) Test262 checkout 4980fd264e49aab0fe0193ecd08f41890292a1ae (master)
process.versions:
{ http_parser: '2.6.0',
node: '5.3.0',
v8: '4.6.85.31',
uv: '1.8.0',
Uglify checkout e36e07fa77859bcd461234856c06c95cee0cfffe (harmony) Test262 checkout 4980fd264e49aab0fe0193ecd08f41890292a1ae (master)
process.versions:
{ http_parser: '2.6.0',
node: '5.3.0',
v8: '4.6.85.31',
uv: '1.8.0',
| /* ebnf file for es 6 - MAY CONTAIN ERRORS / DISAMBIGUITY */ | |
| Grammer::= Statement | |
| /* Lexical grammer */ | |
| SourceCharacter ::= #x0000-#x10FFFF | |
| InputElementDiv ::= WhiteSpace | LineTerminator | Comment | CommonToken | DivPunctuator | RightBracePunctuator | |
| InputElementRegExp ::= WhiteSpace | LineTerminator | Comment | CommonToken | RightBracePunctuator | RegularExpressionLiteral | |
| InputElementRegExpOrTemplateTail ::= WhiteSpace | LineTerminator | Comment | CommonToken | RegularExpressionLiteral | TemplateSubstitutionTail | |
| InputElementTemplateTail ::= WhiteSpace | LineTerminator | Comment | CommonToken | DivPunctuator | TemplateSubstitutionTail | |
| WhiteSpace ::= "<TAB>" | "<VT>" | "<FF>" | "<SP>" | "<NBSP>" | "<ZWNBSP>" | "<USP>" |
Uglify checkout: 26641f3fb20bce9394c3989bea0099dcd209be61 Test262 checkout (es5-tests branch): 7da91bceb9ce7613f87db47ddd1292a2dda58b42
process.versions:
{ http_parser: '2.6.0',
node: '5.3.0',
v8: '4.6.85.31',
uv: '1.8.0',
| "use strict"; | |
| module.exports = function(grunt) { | |
| grunt.loadNpmTasks('grunt-contrib-uglify'); | |
| grunt.initConfig({ | |
| uglify: { | |
| options: { | |
| compress: { | |
| global_defs: { |
| var UglifyJS = require("uglify-js"); // Or wherever UglifyJS is | |
| var test = "var strict_mode = false;\nfunction testRun(id, path, description, codeString, result, error) {\n if (result!==\"pass\") {\n throw new Error(\"Test \'\" + path + \"\'failed: \" + error);\n }\n}\n\nfunction testFinished() {\n \/\/no-op\n}\nfunction compareArray(aExpected, aActual) {\n if (aActual.length != aExpected.length) {\n return false;\n }\n\n aExpected.sort();\n aActual.sort();\n\n var s;\n for (var i = 0; i < aExpected.length; i++) {\n if (aActual[i] !== aExpected[i]) {\n return false;\n }\n }\n return true;\n}\n\n\/\/-----------------------------------------------------------------------------\nfunction arrayContains(arr, expected) {\n var found;\n for (var i = 0; i < expected.length; i++) {\n found = false;\n for (var j = 0; j < arr.length; j++) {\n if (expected[i] === arr[j]) {\n found = true;\n break |
| var arguments; | |
| var e = function() {var arguments = 5; return arguments}; | |
| var f = function() {return arguments.length}; | |
| var e = function() {var a = 5; return a}; |
| var UglifyJS = require('uglify-js'); // or require("./tools/node"); | |
| var ast = UglifyJS.parse("var arguments; var f = function() {arguments.length}"); | |
| ast.figure_out_scope(); | |
| if (ast.body[1].definitions[0].value.find_variable("arguments").scope === ast.body[1].definitions[0].value) { | |
| console.log("TEST PASSED"); | |
| } else { | |
| console.log("TEST FAILED"); | |
| }; |
Reports on this wiki are done using:
[path to python2 executable] .\tools\packaging\test262.py --command "node <pathTo>\UglifyJS2\tools\ecmaTester.js"| // Copyright (c) 2012 Ecma International. All rights reserved. | |
| // This code is governed by the BSD license found in the LICENSE file. | |
| /*--- | |
| es5id: 10.6-6-4 | |
| description: > | |
| 'length' property of arguments object for 0 argument function call | |
| is 0 even with formal parameters | |
| flags: [noStrict] | |
| ---*/ |
| // Copyright (c) 2012 Ecma International. All rights reserved. | |
| // This code is governed by the BSD license found in the LICENSE file. | |
| /*--- | |
| es5id: 10.6-6-3 | |
| description: > | |
| 'length' property of arguments object for 0 argument function | |
| exists | |
| flags: [noStrict] | |
| ---*/ |