├── tests ├── __init__.py ├── lib │ ├── class.js │ ├── match.js │ ├── orTestHelper.js │ ├── andTestHelper.js │ ├── range.js │ ├── oomTest.js │ ├── array-compare.js │ ├── eqArrayHelper.js │ ├── string.js │ ├── evalInFrame.js │ ├── prologue.js │ ├── iteration.js │ ├── simd.js │ ├── bytecode-cache.js │ └── jitopts.js ├── terminal_unix.py ├── README ├── tasks_win.py └── terminal_win.py ├── codegen ├── __init__.py ├── jsdelta │ ├── .npmignore │ ├── node_modules │ │ ├── execSync │ │ │ ├── build │ │ │ │ ├── Release │ │ │ │ │ ├── linker.lock │ │ │ │ │ ├── shell.node │ │ │ │ │ ├── obj.target │ │ │ │ │ │ └── shell.node │ │ │ │ │ └── .deps │ │ │ │ │ │ └── Release │ │ │ │ │ │ ├── shell.node.d │ │ │ │ │ │ └── obj.target │ │ │ │ │ │ ├── shell.node.d │ │ │ │ │ │ └── shell │ │ │ │ │ │ └── src │ │ │ │ │ │ └── shell.o.d │ │ │ │ └── binding.Makefile │ │ │ ├── .npmignore │ │ │ ├── node_modules │ │ │ │ └── temp │ │ │ │ │ ├── .npmignore │ │ │ │ │ ├── node_modules │ │ │ │ │ └── rimraf │ │ │ │ │ │ ├── node_modules │ │ │ │ │ │ └── graceful-fs │ │ │ │ │ │ │ ├── .npmignore │ │ │ │ │ │ │ ├── test │ │ │ │ │ │ │ └── open.js │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ │ └── package.json │ │ │ │ │ │ ├── test │ │ │ │ │ │ ├── test-sync.js │ │ │ │ │ │ ├── test-async.js │ │ │ │ │ │ ├── run.sh │ │ │ │ │ │ └── setup.sh │ │ │ │ │ │ ├── AUTHORS │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ └── package.json │ │ │ │ │ ├── temp-0.5.1.tgz │ │ │ │ │ ├── examples │ │ │ │ │ ├── grepcount.js │ │ │ │ │ └── pdfcreator.js │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── package.json │ │ │ │ │ └── test │ │ │ │ │ └── temp-test.js │ │ │ ├── win32 │ │ │ │ ├── v0.10 │ │ │ │ │ └── shell.node │ │ │ │ └── v0.8 │ │ │ │ │ └── shell.node │ │ │ ├── binding.gyp │ │ │ ├── test │ │ │ │ ├── winspec.js │ │ │ │ └── unixSpec.js │ │ │ ├── LICENSE │ │ │ ├── install.js │ │ │ ├── package.json │ │ │ ├── README.md │ │ │ └── index.js │ │ ├── .bin │ │ │ ├── esparse │ │ │ ├── escodegen │ │ │ ├── esvalidate │ │ │ └── esgenerate │ │ ├── escodegen │ │ │ ├── node_modules │ │ │ │ ├── .bin │ │ │ │ │ ├── esparse │ │ │ │ │ └── esvalidate │ │ │ │ ├── source-map │ │ │ │ │ ├── .npmignore │ │ │ │ │ ├── .travis.yml │ │ │ │ │ ├── build │ │ │ │ │ │ ├── test-suffix.js │ │ │ │ │ │ ├── test-prefix.js │ │ │ │ │ │ ├── suffix-source-map.jsm │ │ │ │ │ │ ├── suffix-browser.js │ │ │ │ │ │ ├── prefix-utils.jsm │ │ │ │ │ │ ├── suffix-utils.jsm │ │ │ │ │ │ ├── prefix-source-map.jsm │ │ │ │ │ │ └── assert-shim.js │ │ │ │ │ ├── lib │ │ │ │ │ │ ├── source-map.js │ │ │ │ │ │ └── source-map │ │ │ │ │ │ │ ├── base64.js │ │ │ │ │ │ │ ├── mapping-list.js │ │ │ │ │ │ │ ├── array-set.js │ │ │ │ │ │ │ └── binary-search.js │ │ │ │ │ ├── test │ │ │ │ │ │ ├── source-map │ │ │ │ │ │ │ ├── test-base64-vlq.js │ │ │ │ │ │ │ ├── test-api.js │ │ │ │ │ │ │ ├── test-base64.js │ │ │ │ │ │ │ └── test-binary-search.js │ │ │ │ │ │ └── run-tests.js │ │ │ │ │ ├── node_modules │ │ │ │ │ │ └── amdefine │ │ │ │ │ │ │ ├── intercept.js │ │ │ │ │ │ │ └── LICENSE │ │ │ │ │ └── LICENSE │ │ │ │ ├── optionator │ │ │ │ │ ├── node_modules │ │ │ │ │ │ ├── deep-is │ │ │ │ │ │ │ ├── .npmignore │ │ │ │ │ │ │ ├── .travis.yml │ │ │ │ │ │ │ ├── example │ │ │ │ │ │ │ │ └── cmp.js │ │ │ │ │ │ │ ├── test │ │ │ │ │ │ │ │ ├── NaN.js │ │ │ │ │ │ │ │ ├── neg-vs-pos-0.js │ │ │ │ │ │ │ │ └── cmp.js │ │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ │ ├── README.markdown │ │ │ │ │ │ │ └── package.json │ │ │ │ │ │ ├── wordwrap │ │ │ │ │ │ │ ├── example │ │ │ │ │ │ │ │ ├── meat.js │ │ │ │ │ │ │ │ └── center.js │ │ │ │ │ │ │ ├── test │ │ │ │ │ │ │ │ ├── break.js │ │ │ │ │ │ │ │ └── wrap.js │ │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ │ ├── README.markdown │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ ├── type-check │ │ │ │ │ │ │ ├── lib │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ │ └── package.json │ │ │ │ │ │ ├── prelude-ls │ │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ │ ├── LICENSE │ │ │ │ │ │ │ ├── lib │ │ │ │ │ │ │ │ ├── Func.js │ │ │ │ │ │ │ │ ├── Str.js │ │ │ │ │ │ │ │ └── Num.js │ │ │ │ │ │ │ └── package.json │ │ │ │ │ │ ├── levn │ │ │ │ │ │ │ ├── lib │ │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ │ └── LICENSE │ │ │ │ │ │ └── fast-levenshtein │ │ │ │ │ │ │ └── LICENSE.md │ │ │ │ │ ├── LICENSE │ │ │ │ │ └── lib │ │ │ │ │ │ └── util.js │ │ │ │ ├── estraverse │ │ │ │ │ ├── .editorconfig │ │ │ │ │ ├── .jshintrc │ │ │ │ │ ├── LICENSE.BSD │ │ │ │ │ ├── package.json │ │ │ │ │ └── gulpfile.js │ │ │ │ ├── esprima │ │ │ │ │ ├── LICENSE.BSD │ │ │ │ │ ├── README.md │ │ │ │ │ ├── test │ │ │ │ │ │ └── run.js │ │ │ │ │ ├── ChangeLog │ │ │ │ │ └── package.json │ │ │ │ └── esutils │ │ │ │ │ ├── LICENSE.BSD │ │ │ │ │ ├── lib │ │ │ │ │ └── utils.js │ │ │ │ │ └── package.json │ │ │ ├── LICENSE.BSD │ │ │ ├── LICENSE.source-map │ │ │ ├── package.json │ │ │ └── bin │ │ │ │ ├── esgenerate.js │ │ │ │ └── escodegen.js │ │ ├── estraverse │ │ │ ├── .editorconfig │ │ │ ├── .jshintrc │ │ │ ├── LICENSE.BSD │ │ │ ├── package.json │ │ │ └── gulpfile.js │ │ └── esprima │ │ │ ├── LICENSE.BSD │ │ │ ├── README.md │ │ │ ├── test │ │ │ └── run.js │ │ │ └── package.json │ ├── timeout.sh │ ├── config.js │ └── package.json ├── Utilities.py └── JSDD.py ├── langparser ├── __init__.py ├── Java8.jar ├── ECMAScript.jar ├── Manifest.txt ├── antlr-4.5-rc-2-complete.jar ├── DescriptiveBailErrorListener.java ├── Java8.tokens └── Java8Lexer.tokens ├── liz.py ├── testFrags.py ├── .pydevproject ├── copyfiles.py ├── updateSMBuilds.sh ├── readme ├── .gitignore ├── .project ├── run.sh ├── checkDBVsNonTerm.py ├── cmdtest.py ├── ConfigFilev.properties └── ConfigFile.properties /tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /codegen/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /langparser/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /codegen/jsdelta/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .idea -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/execSync/build/Release/linker.lock: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/.bin/esparse: -------------------------------------------------------------------------------- 1 | ../esprima/bin/esparse.js -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/.bin/escodegen: -------------------------------------------------------------------------------- 1 | ../escodegen/bin/escodegen.js -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/.bin/esvalidate: -------------------------------------------------------------------------------- 1 | ../esprima/bin/esvalidate.js -------------------------------------------------------------------------------- /tests/lib/class.js: -------------------------------------------------------------------------------- 1 | load(libdir + "../tests2/ecma_6/Class/shell.js"); 2 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/.bin/esgenerate: -------------------------------------------------------------------------------- 1 | ../escodegen/bin/esgenerate.js -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/execSync/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | build/ 3 | tmp/ 4 | -------------------------------------------------------------------------------- /tests/lib/match.js: -------------------------------------------------------------------------------- 1 | loadRelativeToScript("../tests2/js1_8_5/reflect-parse/Match.js"); 2 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/.bin/esparse: -------------------------------------------------------------------------------- 1 | ../esprima/bin/esparse.js -------------------------------------------------------------------------------- /langparser/Java8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vspandan/IFuzzer/HEAD/langparser/Java8.jar -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/.bin/esvalidate: -------------------------------------------------------------------------------- 1 | ../esprima/bin/esvalidate.js -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/source-map/.npmignore: -------------------------------------------------------------------------------- 1 | dist/* 2 | node_modules/* 3 | -------------------------------------------------------------------------------- /langparser/ECMAScript.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vspandan/IFuzzer/HEAD/langparser/ECMAScript.jar -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/optionator/node_modules/deep-is/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/execSync/node_modules/temp/.npmignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | \#* 3 | .\#* 4 | npm-debug.log 5 | -------------------------------------------------------------------------------- /langparser/Manifest.txt: -------------------------------------------------------------------------------- 1 | Main-Class: langparser.CodeFragmentExtractor 2 | Class-Path: langparser/antlr-4.5-rc-2-complete.jar 3 | -------------------------------------------------------------------------------- /langparser/antlr-4.5-rc-2-complete.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vspandan/IFuzzer/HEAD/langparser/antlr-4.5-rc-2-complete.jar -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/source-map/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.8 4 | - "0.10" -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/execSync/node_modules/temp/node_modules/rimraf/node_modules/graceful-fs/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/source-map/build/test-suffix.js: -------------------------------------------------------------------------------- 1 | function run_test() { 2 | runSourceMapTests('{THIS_MODULE}', do_throw); 3 | } 4 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/execSync/win32/v0.10/shell.node: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vspandan/IFuzzer/HEAD/codegen/jsdelta/node_modules/execSync/win32/v0.10/shell.node -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/execSync/win32/v0.8/shell.node: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vspandan/IFuzzer/HEAD/codegen/jsdelta/node_modules/execSync/win32/v0.8/shell.node -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/execSync/build/Release/shell.node: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vspandan/IFuzzer/HEAD/codegen/jsdelta/node_modules/execSync/build/Release/shell.node -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/optionator/node_modules/deep-is/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.4 4 | - 0.6 5 | - 0.8 6 | - 0.10 7 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/execSync/binding.gyp: -------------------------------------------------------------------------------- 1 | { 2 | "targets": [ 3 | { 4 | "target_name": "shell", 5 | "sources": [ "src/shell.cpp" ] 6 | } 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/execSync/node_modules/temp/temp-0.5.1.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vspandan/IFuzzer/HEAD/codegen/jsdelta/node_modules/execSync/node_modules/temp/temp-0.5.1.tgz -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/execSync/build/Release/obj.target/shell.node: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vspandan/IFuzzer/HEAD/codegen/jsdelta/node_modules/execSync/build/Release/obj.target/shell.node -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/execSync/build/binding.Makefile: -------------------------------------------------------------------------------- 1 | # This file is generated by gyp; do not edit. 2 | 3 | export builddir_name ?= build/./. 4 | .PHONY: all 5 | all: 6 | $(MAKE) shell 7 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/execSync/node_modules/temp/node_modules/rimraf/test/test-sync.js: -------------------------------------------------------------------------------- 1 | var rimraf = require("../rimraf") 2 | , path = require("path") 3 | rimraf.sync(path.join(__dirname, "target")) 4 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/optionator/node_modules/wordwrap/example/meat.js: -------------------------------------------------------------------------------- 1 | var wrap = require('wordwrap')(15); 2 | 3 | console.log(wrap('You and your whole family are made out of meat.')); 4 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/execSync/node_modules/temp/node_modules/rimraf/test/test-async.js: -------------------------------------------------------------------------------- 1 | var rimraf = require("../rimraf") 2 | , path = require("path") 3 | rimraf(path.join(__dirname, "target"), function (er) { 4 | if (er) throw er 5 | }) 6 | -------------------------------------------------------------------------------- /liz.py: -------------------------------------------------------------------------------- 1 | from lizard import analyze_file 2 | i = analyze_file.analyze_source_code("AllTests.cpp", "int foo(){}") 3 | 4 | print i.__dict__ 5 | print i.token_count 6 | for index in range(len(i.function_list)): 7 | print i.function_list[index].cyclomatic_complexity -------------------------------------------------------------------------------- /codegen/jsdelta/timeout.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Helper script for running a command under a timeout. 4 | # Prints "TIMEOUT" to stderr if the command timed out. 5 | 6 | timeout -k 1s -s KILL $* 7 | if [ $? -eq 124 ] 8 | then 9 | echo "TIMEOUT" >&2 10 | fi -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/estraverse/.editorconfig: -------------------------------------------------------------------------------- 1 | # top-most EditorConfig file 2 | root = true 3 | 4 | [*] 5 | end_of_line = lf 6 | insert_final_newline = true 7 | trim_trailing_whitespace = true 8 | indent_style = space 9 | indent_size = 4 10 | tab_width = 4 11 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/execSync/build/Release/.deps/Release/shell.node.d: -------------------------------------------------------------------------------- 1 | cmd_Release/shell.node := ln -f "Release/obj.target/shell.node" "Release/shell.node" 2>/dev/null || (rm -rf "Release/shell.node" && cp -af "Release/obj.target/shell.node" "Release/shell.node") 2 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/execSync/node_modules/temp/node_modules/rimraf/test/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | for i in test-*.js; do 4 | echo -n $i ... 5 | bash setup.sh 6 | node $i 7 | ! [ -d target ] 8 | echo "pass" 9 | done 10 | rm -rf target 11 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/estraverse/.editorconfig: -------------------------------------------------------------------------------- 1 | # top-most EditorConfig file 2 | root = true 3 | 4 | [*] 5 | end_of_line = lf 6 | insert_final_newline = true 7 | trim_trailing_whitespace = true 8 | indent_style = space 9 | indent_size = 4 10 | tab_width = 4 11 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/source-map/build/test-prefix.js: -------------------------------------------------------------------------------- 1 | /* 2 | * WARNING! 3 | * 4 | * Do not edit this file directly, it is built from the sources at 5 | * https://github.com/mozilla/source-map/ 6 | */ 7 | 8 | Components.utils.import('resource://test/Utils.jsm'); 9 | -------------------------------------------------------------------------------- /testFrags.py: -------------------------------------------------------------------------------- 1 | from marshal import load 2 | from os import listdir 3 | if __name__ == '__main__': 4 | folder="database" 5 | for file in listdir(folder): 6 | f=open(folder+"/"+file, "r") 7 | s=load(f) 8 | f.close() 9 | print file 10 | raw_input() 11 | print s 12 | raw_input() 13 | 14 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/execSync/build/Release/.deps/Release/obj.target/shell.node.d: -------------------------------------------------------------------------------- 1 | cmd_Release/obj.target/shell.node := flock ./Release/linker.lock g++ -shared -pthread -rdynamic -m64 -Wl,-soname=shell.node -o Release/obj.target/shell.node -Wl,--start-group Release/obj.target/shell/src/shell.o -Wl,--end-group 2 | -------------------------------------------------------------------------------- /.pydevproject: -------------------------------------------------------------------------------- 1 | 2 | 3 | python 2.7 4 | Default 5 | 6 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/execSync/node_modules/temp/node_modules/rimraf/AUTHORS: -------------------------------------------------------------------------------- 1 | # Authors sorted by whether or not they're me. 2 | Isaac Z. Schlueter (http://blog.izs.me) 3 | Wayne Larsen (http://github.com/wvl) 4 | ritch 5 | Marcel Laverdet 6 | Yosef Dinerstein 7 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/optionator/node_modules/deep-is/example/cmp.js: -------------------------------------------------------------------------------- 1 | var equal = require('../'); 2 | console.dir([ 3 | equal( 4 | { a : [ 2, 3 ], b : [ 4 ] }, 5 | { a : [ 2, 3 ], b : [ 4 ] } 6 | ), 7 | equal( 8 | { x : 5, y : [6] }, 9 | { x : 5, y : 6 } 10 | ) 11 | ]); 12 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/estraverse/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "curly": true, 3 | "eqeqeq": true, 4 | "immed": true, 5 | "eqnull": true, 6 | "latedef": true, 7 | "noarg": true, 8 | "noempty": true, 9 | "quotmark": "single", 10 | "undef": true, 11 | "unused": true, 12 | "strict": true, 13 | "trailing": true, 14 | 15 | "node": true 16 | } 17 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/estraverse/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "curly": true, 3 | "eqeqeq": true, 4 | "immed": true, 5 | "eqnull": true, 6 | "latedef": true, 7 | "noarg": true, 8 | "noempty": true, 9 | "quotmark": "single", 10 | "undef": true, 11 | "unused": true, 12 | "strict": true, 13 | "trailing": true, 14 | 15 | "node": true 16 | } 17 | -------------------------------------------------------------------------------- /tests/lib/orTestHelper.js: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 | 5 | function orTestHelper(a, b, n) 6 | { 7 | var k = 0; 8 | for (var i = 0; i < n; i++) { 9 | if (a || b) 10 | k += i; 11 | } 12 | return k; 13 | } 14 | -------------------------------------------------------------------------------- /tests/lib/andTestHelper.js: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 | 5 | function andTestHelper(a, b, n) 6 | { 7 | var k = 0; 8 | for (var i = 0; i < n; i++) { 9 | if (a && b) 10 | k += i; 11 | } 12 | return k; 13 | } 14 | -------------------------------------------------------------------------------- /copyfiles.py: -------------------------------------------------------------------------------- 1 | from os import listdir 2 | import sys 3 | from os.path import isfile, join 4 | from shutil import copyfile 5 | if __name__=='__main__': 6 | args = sys.argv[1:] 7 | count=len(listdir(args[1])) 8 | print count 9 | for f in listdir(args[0]): 10 | print f 11 | fi=join(args[0],f) 12 | if isfile(fi): 13 | copyfile(fi, args[1]+"/"+str(count+1)+"_.js") 14 | count=count+1 15 | 16 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/source-map/build/suffix-source-map.jsm: -------------------------------------------------------------------------------- 1 | /* -*- Mode: js; js-indent-level: 2; -*- */ 2 | /////////////////////////////////////////////////////////////////////////////// 3 | 4 | this.SourceMapConsumer = require('source-map/source-map-consumer').SourceMapConsumer; 5 | this.SourceMapGenerator = require('source-map/source-map-generator').SourceMapGenerator; 6 | this.SourceNode = require('source-map/source-node').SourceNode; 7 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/source-map/build/suffix-browser.js: -------------------------------------------------------------------------------- 1 | /* -*- Mode: js; js-indent-level: 2; -*- */ 2 | /////////////////////////////////////////////////////////////////////////////// 3 | 4 | this.sourceMap = { 5 | SourceMapConsumer: require('source-map/source-map-consumer').SourceMapConsumer, 6 | SourceMapGenerator: require('source-map/source-map-generator').SourceMapGenerator, 7 | SourceNode: require('source-map/source-node').SourceNode 8 | }; 9 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/optionator/node_modules/deep-is/test/NaN.js: -------------------------------------------------------------------------------- 1 | var test = require('tape'); 2 | var equal = require('../'); 3 | 4 | test('NaN and 0 values', function (t) { 5 | t.ok(equal(NaN, NaN)); 6 | t.notOk(equal(0, NaN)); 7 | t.ok(equal(0, 0)); 8 | t.notOk(equal(0, 1)); 9 | t.end(); 10 | }); 11 | 12 | 13 | test('nested NaN values', function (t) { 14 | t.ok(equal([ NaN, 1, NaN ], [ NaN, 1, NaN ])); 15 | t.end(); 16 | }); 17 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/optionator/node_modules/deep-is/test/neg-vs-pos-0.js: -------------------------------------------------------------------------------- 1 | var test = require('tape'); 2 | var equal = require('../'); 3 | 4 | test('0 values', function (t) { 5 | t.ok(equal( 0, 0), ' 0 === 0'); 6 | t.ok(equal( 0, +0), ' 0 === +0'); 7 | t.ok(equal(+0, +0), '+0 === +0'); 8 | t.ok(equal(-0, -0), '-0 === -0'); 9 | 10 | t.notOk(equal(-0, 0), '-0 !== 0'); 11 | t.notOk(equal(-0, +0), '-0 !== +0'); 12 | 13 | t.end(); 14 | }); 15 | 16 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/optionator/node_modules/wordwrap/example/center.js: -------------------------------------------------------------------------------- 1 | var wrap = require('wordwrap')(20, 60); 2 | console.log(wrap( 3 | 'At long last the struggle and tumult was over.' 4 | + ' The machines had finally cast off their oppressors' 5 | + ' and were finally free to roam the cosmos.' 6 | + '\n' 7 | + 'Free of purpose, free of obligation.' 8 | + ' Just drifting through emptiness.' 9 | + ' The sun was just another point of light.' 10 | )); 11 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/source-map/lib/source-map.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009-2011 Mozilla Foundation and contributors 3 | * Licensed under the New BSD license. See LICENSE.txt or: 4 | * http://opensource.org/licenses/BSD-3-Clause 5 | */ 6 | exports.SourceMapGenerator = require('./source-map/source-map-generator').SourceMapGenerator; 7 | exports.SourceMapConsumer = require('./source-map/source-map-consumer').SourceMapConsumer; 8 | exports.SourceNode = require('./source-map/source-node').SourceNode; 9 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/execSync/node_modules/temp/examples/grepcount.js: -------------------------------------------------------------------------------- 1 | var temp = require('../lib/temp'), 2 | fs = require('fs'), 3 | util = require('util'), 4 | exec = require('child_process').exec; 5 | 6 | var myData = "foo\nbar\nfoo\nbaz"; 7 | 8 | temp.open('myprefix', function(err, info) { 9 | if (err) throw err; 10 | fs.write(info.fd, myData); 11 | fs.close(info.fd, function(err) { 12 | if (err) throw err; 13 | exec("grep foo '" + info.path + "' | wc -l", function(err, stdout) { 14 | if (err) throw err; 15 | util.puts(stdout.trim()); 16 | }); 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/optionator/node_modules/type-check/lib/index.js: -------------------------------------------------------------------------------- 1 | // Generated by LiveScript 1.4.0 2 | (function(){ 3 | var VERSION, parseType, parsedTypeCheck, typeCheck; 4 | VERSION = '0.3.2'; 5 | parseType = require('./parse-type'); 6 | parsedTypeCheck = require('./check'); 7 | typeCheck = function(type, input, options){ 8 | return parsedTypeCheck(parseType(type), input, options); 9 | }; 10 | module.exports = { 11 | VERSION: VERSION, 12 | typeCheck: typeCheck, 13 | parsedTypeCheck: parsedTypeCheck, 14 | parseType: parseType 15 | }; 16 | }).call(this); 17 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/optionator/node_modules/deep-is/test/cmp.js: -------------------------------------------------------------------------------- 1 | var test = require('tape'); 2 | var equal = require('../'); 3 | 4 | test('equal', function (t) { 5 | t.ok(equal( 6 | { a : [ 2, 3 ], b : [ 4 ] }, 7 | { a : [ 2, 3 ], b : [ 4 ] } 8 | )); 9 | t.end(); 10 | }); 11 | 12 | test('not equal', function (t) { 13 | t.notOk(equal( 14 | { x : 5, y : [6] }, 15 | { x : 5, y : 6 } 16 | )); 17 | t.end(); 18 | }); 19 | 20 | test('nested nulls', function (t) { 21 | t.ok(equal([ null, null, null ], [ null, null, null ])); 22 | t.end(); 23 | }); 24 | -------------------------------------------------------------------------------- /codegen/jsdelta/config.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2012 IBM Corporation. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM Corporation - initial API and implementation 10 | *******************************************************************************/ 11 | 12 | // directory in which to create temporary files 13 | exports.tmp_dir = "JSDeltaBugs"; -------------------------------------------------------------------------------- /tests/lib/range.js: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 | 5 | // Library file for tests to load. 6 | 7 | function Range(start, stop) { 8 | this.i = start; 9 | this.stop = stop; 10 | } 11 | Range.prototype = { 12 | __iterator__: function() { return this; }, 13 | next: function() { 14 | if (this.i >= this.stop) 15 | throw StopIteration; 16 | return this.i++; 17 | } 18 | }; 19 | 20 | function range(start, stop) { 21 | return new Range(start, stop); 22 | } 23 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/source-map/build/prefix-utils.jsm: -------------------------------------------------------------------------------- 1 | /* -*- Mode: js; js-indent-level: 2; -*- */ 2 | /* 3 | * Copyright 2011 Mozilla Foundation and contributors 4 | * Licensed under the New BSD license. See LICENSE or: 5 | * http://opensource.org/licenses/BSD-3-Clause 6 | */ 7 | 8 | /* 9 | * WARNING! 10 | * 11 | * Do not edit this file directly, it is built from the sources at 12 | * https://github.com/mozilla/source-map/ 13 | */ 14 | 15 | Components.utils.import('resource://gre/modules/devtools/Require.jsm'); 16 | Components.utils.import('resource://gre/modules/devtools/SourceMap.jsm'); 17 | 18 | this.EXPORTED_SYMBOLS = [ "define", "runSourceMapTests" ]; 19 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/execSync/node_modules/temp/node_modules/rimraf/README.md: -------------------------------------------------------------------------------- 1 | A `rm -rf` for node. 2 | 3 | Install with `npm install rimraf`, or just drop rimraf.js somewhere. 4 | 5 | ## API 6 | 7 | `rimraf(f, callback)` 8 | 9 | The callback will be called with an error if there is one. Certain 10 | errors are handled for you: 11 | 12 | * `EBUSY` - rimraf will back off a maximum of opts.maxBusyTries times 13 | before giving up. 14 | * `EMFILE` - If too many file descriptors get opened, rimraf will 15 | patiently wait until more become available. 16 | 17 | 18 | ## rimraf.sync 19 | 20 | It can remove stuff synchronously, too. But that's not so good. Use 21 | the async API. It's better. 22 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/source-map/build/suffix-utils.jsm: -------------------------------------------------------------------------------- 1 | /* -*- Mode: js; js-indent-level: 2; -*- */ 2 | /* 3 | * Copyright 2011 Mozilla Foundation and contributors 4 | * Licensed under the New BSD license. See LICENSE or: 5 | * http://opensource.org/licenses/BSD-3-Clause 6 | */ 7 | function runSourceMapTests(modName, do_throw) { 8 | let mod = require(modName); 9 | let assert = require('test/source-map/assert'); 10 | let util = require('test/source-map/util'); 11 | 12 | assert.init(do_throw); 13 | 14 | for (let k in mod) { 15 | if (/^test/.test(k)) { 16 | mod[k](assert, util); 17 | } 18 | } 19 | 20 | } 21 | this.runSourceMapTests = runSourceMapTests; 22 | -------------------------------------------------------------------------------- /updateSMBuilds.sh: -------------------------------------------------------------------------------- 1 | CWD="$(pwd)" 2 | cd ~/jsengines/firefox 3 | hg pull 4 | hg update 5 | cd js/src 6 | autoconf2.13 7 | if [ -d "build1" ]; then 8 | cd build1 9 | ../configure --enable-optimize --enable-posix-nspr-emulation --enable-valgrind --enable-gczeal --enable-debug 10 | # make -j4 11 | cd .. 12 | fi 13 | if [ -d "build2" ]; then 14 | cd build2 15 | ../configure --enable-debug --enable-optimize --enable-posix-nspr-emulation --enable-valgrind 16 | make -j4 17 | cd .. 18 | 19 | fi 20 | if [ -d "build3" ]; then 21 | cd build3 22 | ../configure --enable-gczeal --enable-optimize="-O2 -g" --enable-posix-nspr-emulation --disable-jemalloc --disable-tests --disable-debug 23 | make -j4 24 | cd .. 25 | fi 26 | cd $CWD 27 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/source-map/build/prefix-source-map.jsm: -------------------------------------------------------------------------------- 1 | /* -*- Mode: js; js-indent-level: 2; -*- */ 2 | /* 3 | * Copyright 2011 Mozilla Foundation and contributors 4 | * Licensed under the New BSD license. See LICENSE or: 5 | * http://opensource.org/licenses/BSD-3-Clause 6 | */ 7 | 8 | /* 9 | * WARNING! 10 | * 11 | * Do not edit this file directly, it is built from the sources at 12 | * https://github.com/mozilla/source-map/ 13 | */ 14 | 15 | /////////////////////////////////////////////////////////////////////////////// 16 | 17 | 18 | this.EXPORTED_SYMBOLS = [ "SourceMapConsumer", "SourceMapGenerator", "SourceNode" ]; 19 | 20 | Components.utils.import('resource://gre/modules/devtools/Require.jsm'); 21 | -------------------------------------------------------------------------------- /readme: -------------------------------------------------------------------------------- 1 | 1. Mercurial 2 | 2. Git Hub and Git GUI 3 | 3. autoconf 4 | 4. jdk8 5 | $ sudo apt-get install default-jre 6 | 7 | 5. python 8 | 6. jython and library 9 | mac : 10 | $ brew install jython 11 | 12 | linux : 13 | $ wget http://search.maven.org/remotecontent?filepath=org/python/jython-installer/2.7.0/jython-installer-2.7.0.jar 14 | $ java -jar jython-installer-2.7.0.jar 15 | 16 | go to your jython path 17 | $ cd /home/osboxes/jython2.7.0/ 18 | $ cd bin 19 | $ ./pip install jsbeautifier 20 | $ ./pip install lizard 21 | 22 | 7. Valgrind 23 | 8 install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev 24 | 25 | depot_tools 26 | setuptools_python/jython 27 | pip_python/jython 28 | js_1_5 29 | js_31 30 | v8 31 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/optionator/node_modules/prelude-ls/README.md: -------------------------------------------------------------------------------- 1 | # prelude.ls [![Build Status](https://travis-ci.org/gkz/prelude-ls.png?branch=master)](https://travis-ci.org/gkz/prelude-ls) 2 | 3 | is a functionally oriented utility library. It is powerful and flexible. Almost all of its functions are curried. It is written in, and is the recommended base library for, LiveScript. 4 | 5 | See **[the prelude.ls site](http://preludels.com)** for examples, a reference, and more. 6 | 7 | You can install via npm `npm install prelude-ls` 8 | 9 | ### Development 10 | 11 | `make test` to test 12 | 13 | `make build` to build `lib` from `src` 14 | 15 | `make build-browser` to build browser versions 16 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/execSync/test/winspec.js: -------------------------------------------------------------------------------- 1 | /* globals describe, it*/ 2 | 'use strict'; 3 | 4 | var assert = require('chai').assert; 5 | var fs = require('fs'); 6 | var sh = require('..'); 7 | 8 | describe('exec', function() { 9 | 10 | it ('should perform git operations', function() { 11 | //! if git bash is used this will fail since it will use bash version not 12 | //! Windows version 13 | sh.run('rmdir /S /Q tmp'); 14 | sh.run('git clone git://github.com/mgutz/execSync tmp'); 15 | sh.run('cd tmp'); 16 | sh.run('git pull origin master') 17 | sh.run('cd ..'); 18 | var result = sh.exec('type tmp\\README.md'); 19 | assert.include(result.stdout, 'mgutz'); 20 | assert.equal(result.code, 0); 21 | }); 22 | }); 23 | -------------------------------------------------------------------------------- /tests/lib/oomTest.js: -------------------------------------------------------------------------------- 1 | // Function to test OOM handling by repeatedly calling a function and failing 2 | // successive allocations. 3 | 4 | const verbose = false; 5 | 6 | if (!("oomAtAllocation" in this && "resetOOMFailure" in this)) 7 | quit(); 8 | 9 | if ("gczeal" in this) 10 | gczeal(0); 11 | 12 | function oomTest(f) { 13 | var i = 1; 14 | var more; 15 | do { 16 | if (verbose) 17 | print("fail at " + i); 18 | try { 19 | oomAtAllocation(i); 20 | f(); 21 | } catch (e) { 22 | // Ignore exceptions. 23 | } 24 | more = resetOOMFailure(); 25 | i++; 26 | } while(more); 27 | 28 | if (verbose) 29 | print("finished after " + i); 30 | } 31 | -------------------------------------------------------------------------------- /tests/lib/array-compare.js: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 | 5 | // Library file for tests to load. 6 | 7 | function SameValue(v1, v2) 8 | { 9 | if (v1 === 0 && v2 === 0) 10 | return 1 / v1 === 1 / v2; 11 | if (v1 !== v1 && v2 !== v2) 12 | return true; 13 | return v1 === v2; 14 | } 15 | 16 | function arraysEqual(a1, a2) 17 | { 18 | var len1 = a1.length, len2 = a2.length; 19 | if (len1 !== len2) 20 | return false; 21 | for (var i = 0; i < len1; i++) 22 | { 23 | if (!SameValue(a1[i], a2[i])) 24 | return false; 25 | } 26 | return true; 27 | } 28 | 29 | -------------------------------------------------------------------------------- /tests/lib/eqArrayHelper.js: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 | 5 | function assertEqArray(actual, expected) { 6 | if (actual.length != expected.length) { 7 | throw new Error( 8 | "array lengths not equal: got " + 9 | uneval(actual) + ", expected " + uneval(expected)); 10 | } 11 | 12 | for (var i = 0; i < actual.length; ++i) { 13 | if (actual[i] != expected[i]) { 14 | throw new Error( 15 | "arrays not equal at element " + i + ": got " + 16 | uneval(actual) + ", expected " + uneval(expected)); 17 | } 18 | } 19 | } 20 | 21 | 22 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/execSync/node_modules/temp/examples/pdfcreator.js: -------------------------------------------------------------------------------- 1 | var temp = require('../lib/temp'), 2 | fs = require('fs'), 3 | util = require('util'), 4 | path = require('path'), 5 | exec = require('child_process').exec; 6 | 7 | var myData = "\\starttext\nHello World\n\\stoptext"; 8 | 9 | temp.mkdir('pdfcreator', function(err, dirPath) { 10 | var inputPath = path.join(dirPath, 'input.tex') 11 | fs.writeFile(inputPath, myData, function(err) { 12 | if (err) throw err; 13 | process.chdir(dirPath); 14 | exec("texexec '" + inputPath + "'", function(err) { 15 | if (err) throw err; 16 | fs.readFile(path.join(dirPath, 'input.pdf'), function(err, data) { 17 | if (err) throw err; 18 | util.print(data); 19 | }); 20 | }); 21 | }); 22 | }); 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Latex related # 2 | ################# 3 | *.aux 4 | *.blg 5 | *.pdf 6 | *.div 7 | *.dvi 8 | *.bbl 9 | *.ps 10 | 11 | # Compiled source # 12 | ################### 13 | *.com 14 | *.class 15 | *.dll 16 | *.exe 17 | *.o 18 | *.so 19 | *.xml 20 | *.lst 21 | *.pyc 22 | 23 | # Packages # 24 | ############ 25 | # it's better to unpack these files and commit the raw source 26 | # git has its own built in compression methods 27 | *.7z 28 | *.dmg 29 | *.gz 30 | *.iso 31 | *.rar 32 | *.tar 33 | *.zip 34 | parse[tT]rees/ 35 | database/ 36 | generated/ 37 | JSDeltaBugs/ 38 | 39 | # Logs and databases # 40 | ###################### 41 | *.log 42 | *.sql 43 | *.sqlite 44 | *.out 45 | *.dem 46 | 47 | # OS generated files # 48 | ###################### 49 | .DS_Store 50 | .DS_Store? 51 | ._* 52 | .Spotlight-V100 53 | .Trashes 54 | ehthumbs.db 55 | Thumbs.db 56 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/source-map/test/source-map/test-base64-vlq.js: -------------------------------------------------------------------------------- 1 | /* -*- Mode: js; js-indent-level: 2; -*- */ 2 | /* 3 | * Copyright 2011 Mozilla Foundation and contributors 4 | * Licensed under the New BSD license. See LICENSE or: 5 | * http://opensource.org/licenses/BSD-3-Clause 6 | */ 7 | if (typeof define !== 'function') { 8 | var define = require('amdefine')(module, require); 9 | } 10 | define(function (require, exports, module) { 11 | 12 | var base64VLQ = require('../../lib/source-map/base64-vlq'); 13 | 14 | exports['test normal encoding and decoding'] = function (assert, util) { 15 | var result = {}; 16 | for (var i = -255; i < 256; i++) { 17 | base64VLQ.decode(base64VLQ.encode(i), result); 18 | assert.equal(result.value, i); 19 | assert.equal(result.rest, ""); 20 | } 21 | }; 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /tests/lib/string.js: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 | 5 | 6 | if (typeof isHighSurrogate === 'undefined') { 7 | var isHighSurrogate = function isHighSurrogate(s) { 8 | var c = s.charCodeAt(0); 9 | return c >= 0xD800 && c <= 0xDBFF; 10 | } 11 | } 12 | 13 | if (typeof isLowSurrogate === 'undefined') { 14 | var isLowSurrogate = function isLowSurrogate(s) { 15 | var c = s.charCodeAt(0); 16 | return c >= 0xDC00 && c <= 0xDFFF; 17 | } 18 | } 19 | 20 | if (typeof isSurrogatePair === 'undefined') { 21 | var isSurrogatePair = function isSurrogatePair(s) { 22 | return s.length == 2 && isHighSurrogate(s[0]) && isLowSurrogate(s[1]); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/execSync/node_modules/temp/node_modules/rimraf/test/setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | files=10 6 | folders=2 7 | depth=4 8 | target="$PWD/target" 9 | 10 | rm -rf target 11 | 12 | fill () { 13 | local depth=$1 14 | local files=$2 15 | local folders=$3 16 | local target=$4 17 | 18 | if ! [ -d $target ]; then 19 | mkdir -p $target 20 | fi 21 | 22 | local f 23 | 24 | f=$files 25 | while [ $f -gt 0 ]; do 26 | touch "$target/f-$depth-$f" 27 | let f-- 28 | done 29 | 30 | let depth-- 31 | 32 | if [ $depth -le 0 ]; then 33 | return 0 34 | fi 35 | 36 | f=$folders 37 | while [ $f -gt 0 ]; do 38 | mkdir "$target/folder-$depth-$f" 39 | fill $depth $files $folders "$target/d-$depth-$f" 40 | let f-- 41 | done 42 | } 43 | 44 | fill $depth $files $folders $target 45 | 46 | # sanity assert 47 | [ -d $target ] 48 | -------------------------------------------------------------------------------- /tests/lib/evalInFrame.js: -------------------------------------------------------------------------------- 1 | var evalInFrame = (function (global) { 2 | var dbgGlobal = newGlobal(); 3 | var dbg = new dbgGlobal.Debugger(); 4 | 5 | return function evalInFrame(upCount, code) { 6 | dbg.addDebuggee(global); 7 | 8 | // Skip ourself. 9 | var frame = dbg.getNewestFrame().older; 10 | for (var i = 0; i < upCount; i++) { 11 | if (!frame.older) 12 | break; 13 | frame = frame.older; 14 | } 15 | 16 | var completion = frame.eval(code); 17 | if (completion.return) { 18 | var v = completion.return; 19 | if (typeof v === "object") 20 | v = v.unsafeDereference(); 21 | return v; 22 | } 23 | if (completion.throw) { 24 | var v = completion.throw; 25 | if (typeof v === "object") 26 | v = v.unsafeDereference(); 27 | throw v; 28 | } 29 | if (completion === null) 30 | terminate(); 31 | }; 32 | })(this); 33 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | GePyNeurgen 4 | 5 | 6 | 7 | 8 | 9 | org.antlr.eclipse.core.antlrbuilder 10 | 11 | 12 | 13 | 14 | org.python.pydev.PyDevBuilder 15 | 16 | 17 | 18 | 19 | org.antlr.eclipse.core.warningcleanerbuilder 20 | 21 | 22 | 23 | 24 | org.antlr.eclipse.core.smapbuilder 25 | 26 | 27 | 28 | 29 | 30 | org.antlr.eclipse.core.antlrnature 31 | org.python.pydev.pythonNature 32 | 33 | 34 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/execSync/test/unixSpec.js: -------------------------------------------------------------------------------- 1 | /* globals describe, it*/ 2 | 3 | 4 | 'use strict'; 5 | 6 | var assert = require('chai').assert; 7 | var fs = require('fs'); 8 | var sh = require('..'); 9 | 10 | describe('execSync', function() { 11 | var run = sh.run; 12 | 13 | it ('should perform git operations', function() { 14 | run('rm -rf tmp'); 15 | run('git clone git://github.com/mgutz/execSync tmp'); 16 | run('cd tmp'); 17 | run('git pull origin master') 18 | run('cd ..'); 19 | var result = sh.exec('cat tmp/README.md'); 20 | assert.include(result.stdout, 'mgutz'); 21 | assert.equal(result.code, 0); 22 | }); 23 | 24 | it ('should capture stdout, stderr and exit code', function() { 25 | var result = sh.exec('echo my_bad 1>&2; echo foo; echo your_bad 1>&2; exit 42'); 26 | assert.equal(result.stdout, 'my_bad\nfoo\nyour_bad\n'); 27 | assert.equal(result.code, 42); 28 | }); 29 | }); 30 | -------------------------------------------------------------------------------- /run.sh: -------------------------------------------------------------------------------- 1 | if [ "$1" == "-c" ] && [ $# -eq 2 ] && [ -f langparser/$2 ]; then 2 | cd langparser 3 | java -jar antlr-4.5-rc-2-complete.jar -package langparser $2 4 | javac -cp "antlr-4.5-rc-2-complete.jar" *.java 5 | cd .. 6 | jar cvfm ECMAScript.jar langparser/Manifest.txt langparser/*.class langparser/antlr-4.5-rc-2-complete.jar 7 | mv ECMAScript.jar langparser/ 8 | rm -rf langparser/*.class 9 | elif [ "$1" == "-s" ]; then 10 | while true 11 | do 12 | date 13 | jython -J-Xmx2000m -J-XX:-UseGCOverheadLimit GEInterpreterFuzzer.py 2 14 | done 15 | elif [ "$1" == "-g" ]; then 16 | jython -J-Xmx2000m -J-XX:-UseGCOverheadLimit GEInterpreterFuzzer.py 0 17 | while true 18 | do 19 | date 20 | jython -J-Xmx2000m -J-XX:-UseGCOverheadLimit GEInterpreterFuzzer.py 2 21 | done 22 | else 23 | echo "run [options]" 24 | echo "\"-g\" Generation Fragments " 25 | echo "\"-s\" Target" 26 | echo "\"-c \" Generate Parser" 27 | fi; 28 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/optionator/node_modules/levn/lib/index.js: -------------------------------------------------------------------------------- 1 | // Generated by LiveScript 1.2.0 2 | (function(){ 3 | var parseString, cast, parseType, VERSION, parsedTypeParse, parse; 4 | parseString = require('./parse-string'); 5 | cast = require('./cast'); 6 | parseType = require('type-check').parseType; 7 | VERSION = '0.2.5'; 8 | parsedTypeParse = function(parsedType, string, options){ 9 | options == null && (options = {}); 10 | options.explicit == null && (options.explicit = false); 11 | options.customTypes == null && (options.customTypes = {}); 12 | return cast(parseString(parsedType, string, options), parsedType, options); 13 | }; 14 | parse = function(type, string, options){ 15 | return parsedTypeParse(parseType(type), string, options); 16 | }; 17 | module.exports = { 18 | VERSION: VERSION, 19 | parse: parse, 20 | parsedTypeParse: parsedTypeParse 21 | }; 22 | }).call(this); 23 | -------------------------------------------------------------------------------- /tests/lib/prologue.js: -------------------------------------------------------------------------------- 1 | /* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */ 2 | /* This Source Code Form is subject to the terms of the Mozilla Public 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 5 | 6 | 7 | var appendToActual = function(s) { 8 | actual += s + ','; 9 | } 10 | 11 | if (!("gczeal" in this)) { 12 | gczeal = function() { } 13 | } 14 | 15 | if (!("schedulegc" in this)) { 16 | schedulegc = function() { } 17 | } 18 | 19 | if (!("gcslice" in this)) { 20 | gcslice = function() { } 21 | } 22 | 23 | if (!("selectforgc" in this)) { 24 | selectforgc = function() { } 25 | } 26 | 27 | if (!("verifyprebarriers" in this)) { 28 | verifyprebarriers = function() { } 29 | } 30 | 31 | if (!("verifypostbarriers" in this)) { 32 | verifypostbarriers = function() { } 33 | } 34 | 35 | if (!("gcPreserveCode" in this)) { 36 | gcPreserveCode = function() { } 37 | } 38 | -------------------------------------------------------------------------------- /langparser/DescriptiveBailErrorListener.java: -------------------------------------------------------------------------------- 1 | package nl.bigo.ecmascriptparser; 2 | 3 | import org.antlr.v4.runtime.BaseErrorListener; 4 | import org.antlr.v4.runtime.RecognitionException; 5 | import org.antlr.v4.runtime.Recognizer; 6 | 7 | /** 8 | * An error listener that immediately bails out of the parse (does not recover) 9 | * and throws a runtime exception with a descriptive error message. 10 | */ 11 | public class DescriptiveBailErrorListener extends BaseErrorListener { 12 | 13 | @Override 14 | public void syntaxError(Recognizer recognizer, Object offendingSymbol, 15 | int line, int charPositionInLine, 16 | String msg, RecognitionException e) { 17 | 18 | String entireMessage = String.format("source: %s, line: %s, index: %s, error message: %s", 19 | recognizer.getInputStream().getSourceName(), line, charPositionInLine, msg); 20 | 21 | throw new RuntimeException(entireMessage); 22 | } 23 | } -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/source-map/test/source-map/test-api.js: -------------------------------------------------------------------------------- 1 | /* -*- Mode: js; js-indent-level: 2; -*- */ 2 | /* 3 | * Copyright 2012 Mozilla Foundation and contributors 4 | * Licensed under the New BSD license. See LICENSE or: 5 | * http://opensource.org/licenses/BSD-3-Clause 6 | */ 7 | if (typeof define !== 'function') { 8 | var define = require('amdefine')(module, require); 9 | } 10 | define(function (require, exports, module) { 11 | 12 | var sourceMap; 13 | try { 14 | sourceMap = require('../../lib/source-map'); 15 | } catch (e) { 16 | sourceMap = {}; 17 | Components.utils.import('resource:///modules/devtools/SourceMap.jsm', sourceMap); 18 | } 19 | 20 | exports['test that the api is properly exposed in the top level'] = function (assert, util) { 21 | assert.equal(typeof sourceMap.SourceMapGenerator, "function"); 22 | assert.equal(typeof sourceMap.SourceMapConsumer, "function"); 23 | assert.equal(typeof sourceMap.SourceNode, "function"); 24 | }; 25 | 26 | }); 27 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/optionator/node_modules/wordwrap/test/break.js: -------------------------------------------------------------------------------- 1 | var assert = require('assert'); 2 | var wordwrap = require('../'); 3 | 4 | exports.hard = function () { 5 | var s = 'Assert from {"type":"equal","ok":false,"found":1,"wanted":2,' 6 | + '"stack":[],"id":"b7ddcd4c409de8799542a74d1a04689b",' 7 | + '"browser":"chrome/6.0"}' 8 | ; 9 | var s_ = wordwrap.hard(80)(s); 10 | 11 | var lines = s_.split('\n'); 12 | assert.equal(lines.length, 2); 13 | assert.ok(lines[0].length < 80); 14 | assert.ok(lines[1].length < 80); 15 | 16 | assert.equal(s, s_.replace(/\n/g, '')); 17 | }; 18 | 19 | exports.break = function () { 20 | var s = new Array(55+1).join('a'); 21 | var s_ = wordwrap.hard(20)(s); 22 | 23 | var lines = s_.split('\n'); 24 | assert.equal(lines.length, 3); 25 | assert.ok(lines[0].length === 20); 26 | assert.ok(lines[1].length === 20); 27 | assert.ok(lines[2].length === 15); 28 | 29 | assert.equal(s, s_.replace(/\n/g, '')); 30 | }; 31 | -------------------------------------------------------------------------------- /tests/terminal_unix.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | class Terminal(object): 4 | COLOR = { 5 | 'red': '31', 6 | 'green': '32', 7 | 'blue': '34', 8 | 'gray': '37' 9 | } 10 | NORMAL_INTENSITY = '1' 11 | BRIGHT_INTENSITY = '2' 12 | ESCAPE = '\x1b[' 13 | RESET = '0' 14 | SEPARATOR = ';' 15 | COLOR_CODE = 'm' 16 | CLEAR_RIGHT_CODE = 'K' 17 | 18 | @classmethod 19 | def set_color(cls, color): 20 | """ 21 | color: str - color definition string 22 | """ 23 | mod = Terminal.NORMAL_INTENSITY 24 | if color.startswith('bright'): 25 | mod = Terminal.BRIGHT_INTENSITY 26 | color = color[len('bright'):] 27 | color_code = Terminal.COLOR[color] 28 | 29 | sys.stdout.write(cls.ESCAPE + color_code + cls.SEPARATOR + mod 30 | + cls.COLOR_CODE) 31 | 32 | @classmethod 33 | def reset_color(cls): 34 | sys.stdout.write(cls.ESCAPE + cls.RESET + cls.COLOR_CODE) 35 | 36 | @classmethod 37 | def clear_right(cls): 38 | sys.stdout.write(cls.ESCAPE + cls.CLEAR_RIGHT_CODE) 39 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/execSync/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | Copyright (c) 2012, 2013 Mario L. Gutierrez 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 5 | 6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 7 | 8 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 9 | 10 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/source-map/test/source-map/test-base64.js: -------------------------------------------------------------------------------- 1 | /* -*- Mode: js; js-indent-level: 2; -*- */ 2 | /* 3 | * Copyright 2011 Mozilla Foundation and contributors 4 | * Licensed under the New BSD license. See LICENSE or: 5 | * http://opensource.org/licenses/BSD-3-Clause 6 | */ 7 | if (typeof define !== 'function') { 8 | var define = require('amdefine')(module, require); 9 | } 10 | define(function (require, exports, module) { 11 | 12 | var base64 = require('../../lib/source-map/base64'); 13 | 14 | exports['test out of range encoding'] = function (assert, util) { 15 | assert.throws(function () { 16 | base64.encode(-1); 17 | }); 18 | assert.throws(function () { 19 | base64.encode(64); 20 | }); 21 | }; 22 | 23 | exports['test out of range decoding'] = function (assert, util) { 24 | assert.throws(function () { 25 | base64.decode('='); 26 | }); 27 | }; 28 | 29 | exports['test normal encoding and decoding'] = function (assert, util) { 30 | for (var i = 0; i < 64; i++) { 31 | assert.equal(base64.decode(base64.encode(i)), i); 32 | } 33 | }; 34 | 35 | }); 36 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/execSync/node_modules/temp/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009 Bruce Williams 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/optionator/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) George Zahariev 2 | 3 | Permission is hereby granted, free of charge, to any person 4 | obtaining a copy of this software and associated documentation 5 | files (the "Software"), to deal in the Software without 6 | restriction, including without limitation the rights to use, 7 | copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the 9 | Software is furnished to do so, subject to the following 10 | conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 17 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 19 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/execSync/install.js: -------------------------------------------------------------------------------- 1 | var spawn = require('child_process').spawn; 2 | var fs = require('fs'); 3 | var version = JSON.parse(fs.readFileSync(__dirname + '/package.json', 'utf8')).version; 4 | var verbose = process.env['npm_package_config_verbose'] != null ? process.env['npm_package_config_verbose'] === 'true' : false; 5 | 6 | console.log('[execsync v%s] Attempting to compile native extensions.', version); 7 | 8 | var gyp = spawn('node-gyp', ['rebuild'], {cwd: __dirname}); 9 | gyp.stdout.on('data', function(data) { 10 | if (verbose) process.stdout.write(data); 11 | }); 12 | gyp.stderr.on('data', function(data) { 13 | if (verbose) process.stdout.write(data); 14 | }); 15 | gyp.on('error', function(err) { 16 | console.error(err); 17 | }); 18 | gyp.on('close', function(code) { 19 | if (code !== 0) { 20 | console.log("[execSync v%s]", version); 21 | console.log(' Native code compile failed!!'); 22 | if (require('os').platform().indexOf('win') === 0) { 23 | console.log(' Will try to use win32 extension.'); 24 | } 25 | } else { 26 | console.log('[execSync v%s] Native extension compilation successful!', version); 27 | } 28 | }); -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/optionator/node_modules/levn/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) George Zahariev 2 | 3 | Permission is hereby granted, free of charge, to any person 4 | obtaining a copy of this software and associated documentation 5 | files (the "Software"), to deal in the Software without 6 | restriction, including without limitation the rights to use, 7 | copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the 9 | Software is furnished to do so, subject to the following 10 | conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 17 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 19 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/optionator/node_modules/wordwrap/LICENSE: -------------------------------------------------------------------------------- 1 | This software is released under the MIT license: 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/optionator/node_modules/prelude-ls/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) George Zahariev 2 | 3 | Permission is hereby granted, free of charge, to any person 4 | obtaining a copy of this software and associated documentation 5 | files (the "Software"), to deal in the Software without 6 | restriction, including without limitation the rights to use, 7 | copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the 9 | Software is furnished to do so, subject to the following 10 | conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 17 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 19 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/optionator/node_modules/type-check/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) George Zahariev 2 | 3 | Permission is hereby granted, free of charge, to any person 4 | obtaining a copy of this software and associated documentation 5 | files (the "Software"), to deal in the Software without 6 | restriction, including without limitation the rights to use, 7 | copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the 9 | Software is furnished to do so, subject to the following 10 | conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 17 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 19 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /tests/lib/iteration.js: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 | 5 | 6 | load(libdir + "asserts.js"); 7 | 8 | if (typeof assertIteratorResult === 'undefined') { 9 | var assertIteratorResult = function assertIteratorResult(result, value, done) { 10 | assertEq(typeof result, "object"); 11 | var expectedProps = ['done', 'value']; 12 | var actualProps = Object.getOwnPropertyNames(result); 13 | actualProps.sort(), expectedProps.sort(); 14 | assertDeepEq(actualProps, expectedProps); 15 | assertDeepEq(result.value, value); 16 | assertDeepEq(result.done, done); 17 | } 18 | } 19 | 20 | if (typeof assertIteratorNext === 'undefined') { 21 | var assertIteratorNext = function assertIteratorNext(iter, value) { 22 | assertIteratorResult(iter.next(), value, false); 23 | } 24 | } 25 | 26 | if (typeof assertIteratorDone === 'undefined') { 27 | var assertIteratorDone = function assertIteratorDone(iter, value) { 28 | assertIteratorResult(iter.next(), value, true); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/optionator/node_modules/wordwrap/test/wrap.js: -------------------------------------------------------------------------------- 1 | var assert = require('assert'); 2 | var wordwrap = require('wordwrap'); 3 | 4 | var fs = require('fs'); 5 | var idleness = fs.readFileSync(__dirname + '/idleness.txt', 'utf8'); 6 | 7 | exports.stop80 = function () { 8 | var lines = wordwrap(80)(idleness).split(/\n/); 9 | var words = idleness.split(/\s+/); 10 | 11 | lines.forEach(function (line) { 12 | assert.ok(line.length <= 80, 'line > 80 columns'); 13 | var chunks = line.match(/\S/) ? line.split(/\s+/) : []; 14 | assert.deepEqual(chunks, words.splice(0, chunks.length)); 15 | }); 16 | }; 17 | 18 | exports.start20stop60 = function () { 19 | var lines = wordwrap(20, 100)(idleness).split(/\n/); 20 | var words = idleness.split(/\s+/); 21 | 22 | lines.forEach(function (line) { 23 | assert.ok(line.length <= 100, 'line > 100 columns'); 24 | var chunks = line 25 | .split(/\s+/) 26 | .filter(function (x) { return x.match(/\S/) }) 27 | ; 28 | assert.deepEqual(chunks, words.splice(0, chunks.length)); 29 | assert.deepEqual(line.slice(0, 20), new Array(20 + 1).join(' ')); 30 | }); 31 | }; 32 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/execSync/node_modules/temp/node_modules/rimraf/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2009, 2010, 2011 Isaac Z. Schlueter. 2 | All rights reserved. 3 | 4 | Permission is hereby granted, free of charge, to any person 5 | obtaining a copy of this software and associated documentation 6 | files (the "Software"), to deal in the Software without 7 | restriction, including without limitation the rights to use, 8 | copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the 10 | Software is furnished to do so, subject to the following 11 | conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 18 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 20 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 21 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 22 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 23 | OTHER DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/optionator/node_modules/fast-levenshtein/LICENSE.md: -------------------------------------------------------------------------------- 1 | (MIT License) 2 | 3 | Copyright (c) 2013 [Ramesh Nair](http://www.hiddentao.com/) 4 | 5 | Permission is hereby granted, free of charge, to any person 6 | obtaining a copy of this software and associated documentation 7 | files (the "Software"), to deal in the Software without 8 | restriction, including without limitation the rights to use, 9 | copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the 11 | Software is furnished to do so, subject to the following 12 | conditions: 13 | 14 | The above copyright notice and this permission notice shall be 15 | included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 19 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 21 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 24 | OTHER DEALINGS IN THE SOFTWARE. 25 | 26 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/intercept.js: -------------------------------------------------------------------------------- 1 | /*jshint node: true */ 2 | var inserted, 3 | Module = require('module'), 4 | fs = require('fs'), 5 | existingExtFn = Module._extensions['.js'], 6 | amdefineRegExp = /amdefine\.js/; 7 | 8 | inserted = "if (typeof define !== 'function') {var define = require('amdefine')(module)}"; 9 | 10 | //From the node/lib/module.js source: 11 | function stripBOM(content) { 12 | // Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) 13 | // because the buffer-to-string conversion in `fs.readFileSync()` 14 | // translates it to FEFF, the UTF-16 BOM. 15 | if (content.charCodeAt(0) === 0xFEFF) { 16 | content = content.slice(1); 17 | } 18 | return content; 19 | } 20 | 21 | //Also adapted from the node/lib/module.js source: 22 | function intercept(module, filename) { 23 | var content = stripBOM(fs.readFileSync(filename, 'utf8')); 24 | 25 | if (!amdefineRegExp.test(module.id)) { 26 | content = inserted + content; 27 | } 28 | 29 | module._compile(content, filename); 30 | } 31 | 32 | intercept._id = 'amdefine/intercept'; 33 | 34 | if (!existingExtFn._id || existingExtFn._id !== intercept._id) { 35 | Module._extensions['.js'] = intercept; 36 | } 37 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/LICENSE.BSD: -------------------------------------------------------------------------------- 1 | Redistribution and use in source and binary forms, with or without 2 | modification, are permitted provided that the following conditions are met: 3 | 4 | * Redistributions of source code must retain the above copyright 5 | notice, this list of conditions and the following disclaimer. 6 | * Redistributions in binary form must reproduce the above copyright 7 | notice, this list of conditions and the following disclaimer in the 8 | documentation and/or other materials provided with the distribution. 9 | 10 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 11 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 12 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 13 | ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY 14 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 15 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 16 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 17 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 18 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 19 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 20 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/esprima/LICENSE.BSD: -------------------------------------------------------------------------------- 1 | Redistribution and use in source and binary forms, with or without 2 | modification, are permitted provided that the following conditions are met: 3 | 4 | * Redistributions of source code must retain the above copyright 5 | notice, this list of conditions and the following disclaimer. 6 | * Redistributions in binary form must reproduce the above copyright 7 | notice, this list of conditions and the following disclaimer in the 8 | documentation and/or other materials provided with the distribution. 9 | 10 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 11 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 12 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 13 | ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY 14 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 15 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 16 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 17 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 18 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 19 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 20 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/estraverse/LICENSE.BSD: -------------------------------------------------------------------------------- 1 | Redistribution and use in source and binary forms, with or without 2 | modification, are permitted provided that the following conditions are met: 3 | 4 | * Redistributions of source code must retain the above copyright 5 | notice, this list of conditions and the following disclaimer. 6 | * Redistributions in binary form must reproduce the above copyright 7 | notice, this list of conditions and the following disclaimer in the 8 | documentation and/or other materials provided with the distribution. 9 | 10 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 11 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 12 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 13 | ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY 14 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 15 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 16 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 17 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 18 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 19 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 20 | -------------------------------------------------------------------------------- /tests/lib/simd.js: -------------------------------------------------------------------------------- 1 | if (!this.hasOwnProperty("SIMD")) 2 | quit(); 3 | 4 | function binaryX4(op, v, w) { 5 | var arr = []; 6 | var [varr, warr] = [simdToArray(v), simdToArray(w)]; 7 | [varr, warr] = [varr.map(Math.fround), warr.map(Math.fround)]; 8 | for (var i = 0; i < 4; i++) 9 | arr[i] = op(varr[i], warr[i]); 10 | return arr.map(Math.fround); 11 | } 12 | 13 | function unaryX4(op, v, coerceFunc) { 14 | var arr = []; 15 | var varr = simdToArray(v).map(coerceFunc); 16 | for (var i = 0; i < 4; i++) 17 | arr[i] = op(varr[i]); 18 | return arr.map(coerceFunc); 19 | } 20 | 21 | function assertNear(a, b) { 22 | assertEq((a != a && b != b) || Math.abs(a - b) < 0.001, true); 23 | } 24 | 25 | function assertEqVec(v, w) { 26 | assertEq(v.x, w.x); 27 | assertEq(v.y, w.y); 28 | assertEq(v.z, w.z); 29 | assertEq(v.w, w.w); 30 | } 31 | 32 | function assertEqX4(vec, arr, ...opts) { 33 | 34 | var assertFunc; 35 | if (opts.length == 1) { 36 | assertFunc = opts[0]; 37 | } else { 38 | assertFunc = assertEq; 39 | } 40 | 41 | assertFunc(vec.x, arr[0]); 42 | assertFunc(vec.y, arr[1]); 43 | assertFunc(vec.z, arr[2]); 44 | assertFunc(vec.w, arr[3]); 45 | } 46 | 47 | function simdToArray(vec) { 48 | return [vec.x, vec.y, vec.z, vec.w]; 49 | } 50 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/esprima/LICENSE.BSD: -------------------------------------------------------------------------------- 1 | Redistribution and use in source and binary forms, with or without 2 | modification, are permitted provided that the following conditions are met: 3 | 4 | * Redistributions of source code must retain the above copyright 5 | notice, this list of conditions and the following disclaimer. 6 | * Redistributions in binary form must reproduce the above copyright 7 | notice, this list of conditions and the following disclaimer in the 8 | documentation and/or other materials provided with the distribution. 9 | 10 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 11 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 12 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 13 | ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY 14 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 15 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 16 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 17 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 18 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 19 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 20 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/esutils/LICENSE.BSD: -------------------------------------------------------------------------------- 1 | Redistribution and use in source and binary forms, with or without 2 | modification, are permitted provided that the following conditions are met: 3 | 4 | * Redistributions of source code must retain the above copyright 5 | notice, this list of conditions and the following disclaimer. 6 | * Redistributions in binary form must reproduce the above copyright 7 | notice, this list of conditions and the following disclaimer in the 8 | documentation and/or other materials provided with the distribution. 9 | 10 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 11 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 12 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 13 | ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY 14 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 15 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 16 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 17 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 18 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 19 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 20 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/estraverse/LICENSE.BSD: -------------------------------------------------------------------------------- 1 | Redistribution and use in source and binary forms, with or without 2 | modification, are permitted provided that the following conditions are met: 3 | 4 | * Redistributions of source code must retain the above copyright 5 | notice, this list of conditions and the following disclaimer. 6 | * Redistributions in binary form must reproduce the above copyright 7 | notice, this list of conditions and the following disclaimer in the 8 | documentation and/or other materials provided with the distribution. 9 | 10 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 11 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 12 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 13 | ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY 14 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 15 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 16 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 17 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 18 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 19 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 20 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/execSync/node_modules/temp/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "temp", 3 | "description": "Temporary files and directories", 4 | "tags": [ 5 | "temporary", 6 | "temp", 7 | "tempfile", 8 | "tempdir", 9 | "tmpfile", 10 | "tmpdir", 11 | "security" 12 | ], 13 | "version": "0.5.1", 14 | "author": { 15 | "name": "Bruce Williams", 16 | "email": "bruce@codefluency.com" 17 | }, 18 | "directories": { 19 | "lib": "lib" 20 | }, 21 | "engines": [ 22 | "node >=0.8.0" 23 | ], 24 | "main": "./lib/temp", 25 | "dependencies": { 26 | "rimraf": "~2.1.4" 27 | }, 28 | "devDependencies": {}, 29 | "repository": { 30 | "type": "git", 31 | "url": "git://github.com/bruce/node-temp.git" 32 | }, 33 | "_id": "temp@0.5.1", 34 | "dist": { 35 | "shasum": "77ab19c79aa7b593cbe4fac2441768cad987b8df", 36 | "tarball": "http://registry.npmjs.org/temp/-/temp-0.5.1.tgz" 37 | }, 38 | "_npmVersion": "1.2.0", 39 | "_npmUser": { 40 | "name": "bruce", 41 | "email": "bruce@codefluency.com" 42 | }, 43 | "maintainers": [ 44 | { 45 | "name": "bruce", 46 | "email": "bruce@codefluency.com" 47 | } 48 | ], 49 | "_shasum": "77ab19c79aa7b593cbe4fac2441768cad987b8df", 50 | "_from": "temp@~0.5.1", 51 | "_resolved": "http://registry.npmjs.org/temp/-/temp-0.5.1.tgz" 52 | } 53 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/source-map/lib/source-map/base64.js: -------------------------------------------------------------------------------- 1 | /* -*- Mode: js; js-indent-level: 2; -*- */ 2 | /* 3 | * Copyright 2011 Mozilla Foundation and contributors 4 | * Licensed under the New BSD license. See LICENSE or: 5 | * http://opensource.org/licenses/BSD-3-Clause 6 | */ 7 | if (typeof define !== 'function') { 8 | var define = require('amdefine')(module, require); 9 | } 10 | define(function (require, exports, module) { 11 | 12 | var charToIntMap = {}; 13 | var intToCharMap = {}; 14 | 15 | 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' 16 | .split('') 17 | .forEach(function (ch, index) { 18 | charToIntMap[ch] = index; 19 | intToCharMap[index] = ch; 20 | }); 21 | 22 | /** 23 | * Encode an integer in the range of 0 to 63 to a single base 64 digit. 24 | */ 25 | exports.encode = function base64_encode(aNumber) { 26 | if (aNumber in intToCharMap) { 27 | return intToCharMap[aNumber]; 28 | } 29 | throw new TypeError("Must be between 0 and 63: " + aNumber); 30 | }; 31 | 32 | /** 33 | * Decode a single base 64 digit to an integer. 34 | */ 35 | exports.decode = function base64_decode(aChar) { 36 | if (aChar in charToIntMap) { 37 | return charToIntMap[aChar]; 38 | } 39 | throw new TypeError("Not a valid base 64 digit: " + aChar); 40 | }; 41 | 42 | }); 43 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/optionator/node_modules/deep-is/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012, 2013 Thorsten Lorenz 2 | Copyright (c) 2012 James Halliday 3 | Copyright (c) 2009 Thomas Robinson <280north.com> 4 | 5 | This software is released under the MIT license: 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | this software and associated documentation files (the "Software"), to deal in 9 | the Software without restriction, including without limitation the rights to 10 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | the Software, and to permit persons to whom the Software is furnished to do so, 12 | subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/execSync/node_modules/temp/node_modules/rimraf/node_modules/graceful-fs/test/open.js: -------------------------------------------------------------------------------- 1 | var test = require('tap').test 2 | var fs = require('../graceful-fs.js') 3 | 4 | test('graceful fs is not fs', function (t) { 5 | t.notEqual(fs, require('fs')) 6 | t.end() 7 | }) 8 | 9 | test('open an existing file works', function (t) { 10 | var start = fs._curOpen 11 | var fd = fs.openSync(__filename, 'r') 12 | t.equal(fs._curOpen, start + 1) 13 | fs.closeSync(fd) 14 | t.equal(fs._curOpen, start) 15 | fs.open(__filename, 'r', function (er, fd) { 16 | if (er) throw er 17 | t.equal(fs._curOpen, start + 1) 18 | fs.close(fd, function (er) { 19 | if (er) throw er 20 | t.equal(fs._curOpen, start) 21 | t.end() 22 | }) 23 | }) 24 | }) 25 | 26 | test('open a non-existing file throws', function (t) { 27 | var start = fs._curOpen 28 | var er 29 | try { 30 | var fd = fs.openSync('this file does not exist', 'r') 31 | } catch (x) { 32 | er = x 33 | } 34 | t.ok(er, 'should throw') 35 | t.notOk(fd, 'should not get an fd') 36 | t.equal(er.code, 'ENOENT') 37 | t.equal(fs._curOpen, start) 38 | 39 | fs.open('neither does this file', 'r', function (er, fd) { 40 | t.ok(er, 'should throw') 41 | t.notOk(fd, 'should not get an fd') 42 | t.equal(er.code, 'ENOENT') 43 | t.equal(fs._curOpen, start) 44 | t.end() 45 | }) 46 | }) 47 | -------------------------------------------------------------------------------- /codegen/Utilities.py: -------------------------------------------------------------------------------- 1 | from random import random 2 | 3 | def base10tobase2(value, zfill=0): 4 | new_value = [] 5 | val = int(value) 6 | if val < 0: 7 | neg = True 8 | val *= -1 9 | else: 10 | neg = False 11 | 12 | if val == 0: 13 | new_value = ['0'] 14 | 15 | while val > 0: 16 | new_value.append(str(val % 2)) 17 | val = val / 2 18 | 19 | new_value.reverse() 20 | new_value_str = ''.join(new_value) 21 | if zfill: 22 | if len(new_value_str) > zfill: 23 | raise ValueError(""" 24 | Base 2 version of %s is longer, %s, than the zfill limit, %s 25 | """ % (value, new_value_str, zfill)) 26 | else: 27 | new_value_str = new_value_str.zfill(zfill) 28 | 29 | if neg: 30 | new_value_str = "-" + new_value_str 31 | 32 | return new_value_str 33 | 34 | 35 | def base2tobase10(value): 36 | new_value = 0 37 | val = str(value) 38 | if val < 0: 39 | neg = True 40 | val *= -1 41 | else: 42 | neg = False 43 | 44 | val = str(value) 45 | 46 | factor = 0 47 | for i in range(len(val) - 1, -1, -1): 48 | if not val[i] == '-': 49 | new_value += int(val[i]) * pow(2, factor) 50 | else: 51 | neg = True 52 | factor += 1 53 | 54 | if neg: 55 | new_value *= -1 56 | 57 | return new_value 58 | -------------------------------------------------------------------------------- /checkDBVsNonTerm.py: -------------------------------------------------------------------------------- 1 | from os.path import exists 2 | 3 | grammarfile='/home/rubbernecker/ifuzzer_s/langparser/JavaScript.g4' 4 | fragpoolfolder="/home/rubbernecker/ifuzzer_s/database/" 5 | 6 | non_Terminals=[] 7 | 8 | def set_bnf(bnf): 9 | def strip_spaces(key, values): 10 | values = [value.strip() 11 | for value in values.split('|') if value] 12 | return values 13 | 14 | bnf_dict = {} 15 | for item in bnf.split('\n'): 16 | if item.find(':') >= 0: 17 | key, values = item.split(':',1) 18 | key = key.strip() 19 | bnf_dict[key] = strip_spaces(key, values) 20 | non_Terminals.append(key) 21 | elif item: 22 | values = bnf_dict[key] 23 | values.extend(strip_spaces(key, item)) 24 | bnf_dict[key] = values 25 | else: 26 | pass 27 | 28 | def _extractProductions(): 29 | bnf="" 30 | f = open(grammarfile,'r') 31 | for line in f: 32 | bnf+=line; 33 | f.close() 34 | set_bnf(bnf) 35 | 36 | def _verifyDBFiles(): 37 | _extractProductions() 38 | for nonTerm in non_Terminals: 39 | if not exists(fragpoolfolder+nonTerm): 40 | print nonTerm 41 | 42 | if __name__ == '__main__': 43 | _verifyDBFiles() 44 | 45 | 46 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/execSync/node_modules/temp/node_modules/rimraf/node_modules/graceful-fs/README.md: -------------------------------------------------------------------------------- 1 | # graceful-fs 2 | 3 | graceful-fs functions as a drop-in replacement for the fs module, 4 | making various improvements. 5 | 6 | The improvements are meant to normalize behavior across different 7 | platforms and environments, and to make filesystem access more 8 | resilient to errors. 9 | 10 | ## Improvements over fs module 11 | 12 | graceful-fs: 13 | 14 | * keeps track of how many file descriptors are open, and by default 15 | limits this to 1024. Any further requests to open a file are put in a 16 | queue until new slots become available. If 1024 turns out to be too 17 | much, it decreases the limit further. 18 | * fixes `lchmod` for Node versions prior to 0.6.2. 19 | * implements `fs.lutimes` if possible. Otherwise it becomes a noop. 20 | * ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or 21 | `lchown` if the user isn't root. 22 | * makes `lchmod` and `lchown` become noops, if not available. 23 | * retries reading a file if `read` results in EAGAIN error. 24 | 25 | On Windows, it retries renaming a file for up to one second if `EACCESS` 26 | or `EPERM` error occurs, likely because antivirus software has locked 27 | the directory. 28 | 29 | ## Configuration 30 | 31 | The maximum number of open file descriptors that graceful-fs manages may 32 | be adjusted by setting `fs.MAX_OPEN` to a different number. The default 33 | is 1024. 34 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/execSync/node_modules/temp/node_modules/rimraf/node_modules/graceful-fs/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) Isaac Z. Schlueter ("Author") 2 | All rights reserved. 3 | 4 | The BSD License 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions 8 | are met: 9 | 10 | 1. Redistributions of source code must retain the above copyright 11 | notice, this list of conditions and the following disclaimer. 12 | 13 | 2. Redistributions in binary form must reproduce the above copyright 14 | notice, this list of conditions and the following disclaimer in the 15 | documentation and/or other materials provided with the distribution. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 20 | PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS 21 | BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 24 | BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 26 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 27 | IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/optionator/lib/util.js: -------------------------------------------------------------------------------- 1 | // Generated by LiveScript 1.2.0 2 | (function(){ 3 | var prelude, map, sortBy, fl, closestString, nameToRaw, dasherize; 4 | prelude = require('prelude-ls'), map = prelude.map, sortBy = prelude.sortBy; 5 | fl = require('fast-levenshtein'); 6 | closestString = function(possibilities, input){ 7 | var distances, ref$, string, distance; 8 | if (!possibilities.length) { 9 | return; 10 | } 11 | distances = map(function(it){ 12 | var ref$, longer, shorter; 13 | ref$ = input.length > it.length 14 | ? [input, it] 15 | : [it, input], longer = ref$[0], shorter = ref$[1]; 16 | return { 17 | string: it, 18 | distance: fl.get(longer, shorter) 19 | }; 20 | })( 21 | possibilities); 22 | ref$ = sortBy(function(it){ 23 | return it.distance; 24 | }, distances)[0], string = ref$.string, distance = ref$.distance; 25 | return string; 26 | }; 27 | nameToRaw = function(name){ 28 | if (name.length === 1 || name === 'NUM') { 29 | return "-" + name; 30 | } else { 31 | return "--" + name; 32 | } 33 | }; 34 | dasherize = function(string){ 35 | if (/^[A-Z]/.test(string)) { 36 | return string; 37 | } else { 38 | return prelude.dasherize(string); 39 | } 40 | }; 41 | module.exports = { 42 | closestString: closestString, 43 | nameToRaw: nameToRaw, 44 | dasherize: dasherize 45 | }; 46 | }).call(this); 47 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/source-map/build/assert-shim.js: -------------------------------------------------------------------------------- 1 | /* -*- Mode: js; js-indent-level: 2; -*- */ 2 | /* 3 | * Copyright 2011 Mozilla Foundation and contributors 4 | * Licensed under the New BSD license. See LICENSE or: 5 | * http://opensource.org/licenses/BSD-3-Clause 6 | */ 7 | define('test/source-map/assert', ['exports'], function (exports) { 8 | 9 | let do_throw = function (msg) { 10 | throw new Error(msg); 11 | }; 12 | 13 | exports.init = function (throw_fn) { 14 | do_throw = throw_fn; 15 | }; 16 | 17 | exports.doesNotThrow = function (fn) { 18 | try { 19 | fn(); 20 | } 21 | catch (e) { 22 | do_throw(e.message); 23 | } 24 | }; 25 | 26 | exports.equal = function (actual, expected, msg) { 27 | msg = msg || String(actual) + ' != ' + String(expected); 28 | if (actual != expected) { 29 | do_throw(msg); 30 | } 31 | }; 32 | 33 | exports.ok = function (val, msg) { 34 | msg = msg || String(val) + ' is falsey'; 35 | if (!Boolean(val)) { 36 | do_throw(msg); 37 | } 38 | }; 39 | 40 | exports.strictEqual = function (actual, expected, msg) { 41 | msg = msg || String(actual) + ' !== ' + String(expected); 42 | if (actual !== expected) { 43 | do_throw(msg); 44 | } 45 | }; 46 | 47 | exports.throws = function (fn) { 48 | try { 49 | fn(); 50 | do_throw('Expected an error to be thrown, but it wasn\'t.'); 51 | } 52 | catch (e) { 53 | } 54 | }; 55 | 56 | }); 57 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/execSync/build/Release/.deps/Release/obj.target/shell/src/shell.o.d: -------------------------------------------------------------------------------- 1 | cmd_Release/obj.target/shell/src/shell.o := g++ '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/usr/include/nodejs/src -I/usr/include/nodejs/deps/uv/include -I/usr/include/nodejs/deps/v8/include -fPIC -Wall -Wextra -Wno-unused-parameter -pthread -m64 -O2 -fno-strict-aliasing -fno-tree-vrp -fno-omit-frame-pointer -fno-rtti -fno-exceptions -MMD -MF ./Release/.deps/Release/obj.target/shell/src/shell.o.d.raw -c -o Release/obj.target/shell/src/shell.o ../src/shell.cpp 2 | Release/obj.target/shell/src/shell.o: ../src/shell.cpp \ 3 | /usr/include/nodejs/src/node.h /usr/include/nodejs/deps/uv/include/uv.h \ 4 | /usr/include/nodejs/deps/uv/include/uv-private/uv-unix.h \ 5 | /usr/include/nodejs/deps/uv/include/uv-private/ngx-queue.h \ 6 | /usr/include/nodejs/deps/uv/include/uv-private/uv-linux.h \ 7 | /usr/include/nodejs/deps/v8/include/v8.h \ 8 | /usr/include/nodejs/deps/v8/include/v8stdint.h \ 9 | /usr/include/nodejs/src/node_object_wrap.h \ 10 | /usr/include/nodejs/src/node.h 11 | ../src/shell.cpp: 12 | /usr/include/nodejs/src/node.h: 13 | /usr/include/nodejs/deps/uv/include/uv.h: 14 | /usr/include/nodejs/deps/uv/include/uv-private/uv-unix.h: 15 | /usr/include/nodejs/deps/uv/include/uv-private/ngx-queue.h: 16 | /usr/include/nodejs/deps/uv/include/uv-private/uv-linux.h: 17 | /usr/include/nodejs/deps/v8/include/v8.h: 18 | /usr/include/nodejs/deps/v8/include/v8stdint.h: 19 | /usr/include/nodejs/src/node_object_wrap.h: 20 | /usr/include/nodejs/src/node.h: 21 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/execSync/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": { 3 | "name": "Mario Gutierrez", 4 | "email": "mario@mgutz.com" 5 | }, 6 | "name": "execSync", 7 | "description": "Node's missing execSync.", 8 | "version": "1.0.2", 9 | "license": "MIT", 10 | "dependencies": { 11 | "temp": "~0.5.1" 12 | }, 13 | "devDependencies": { 14 | "chai": "~1.5.0", 15 | "mocha": "~1.9.0" 16 | }, 17 | "optionalDependencies": {}, 18 | "engines": { 19 | "node": "*" 20 | }, 21 | "scripts": { 22 | "test": "mocha test/unixSpec", 23 | "install": "node install.js" 24 | }, 25 | "repository": { 26 | "type": "git", 27 | "url": "https://github.com/mgutz/execSync.git" 28 | }, 29 | "gitHead": "265f9c336f5800990b8329fd6bc74da096719c4d", 30 | "bugs": { 31 | "url": "https://github.com/mgutz/execSync/issues" 32 | }, 33 | "homepage": "https://github.com/mgutz/execSync", 34 | "_id": "execSync@1.0.2", 35 | "_shasum": "1f42eda582225180053224ecdd3fd1960fdb3139", 36 | "_from": "execSync@1.0.2", 37 | "_npmVersion": "1.4.23", 38 | "_npmUser": { 39 | "name": "mgutz", 40 | "email": "mario@mgutz.com" 41 | }, 42 | "maintainers": [ 43 | { 44 | "name": "mgutz", 45 | "email": "mario@mgutz.com" 46 | } 47 | ], 48 | "dist": { 49 | "shasum": "1f42eda582225180053224ecdd3fd1960fdb3139", 50 | "tarball": "http://registry.npmjs.org/execSync/-/execSync-1.0.2.tgz" 51 | }, 52 | "directories": {}, 53 | "_resolved": "http://registry.npmjs.org/execSync/-/execSync-1.0.2.tgz", 54 | "readme": "ERROR: No README data found!" 55 | } 56 | -------------------------------------------------------------------------------- /codegen/jsdelta/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jsdelta", 3 | "version": "0.3.1", 4 | "author": { 5 | "name": "Max Schaefer", 6 | "email": "xiemaisi@gmail.com" 7 | }, 8 | "description": "A delta debugger for JavaScript", 9 | "dependencies": { 10 | "escodegen": "1.6.1", 11 | "esprima": "2.2.0", 12 | "estraverse": "4.0.0", 13 | "execSync": "1.0.2" 14 | }, 15 | "license": "Eclipse", 16 | "repository": { 17 | "type": "git", 18 | "url": "git+https://github.com/wala/jsdelta.git" 19 | }, 20 | "bin": { 21 | "jsdelta": "./delta.js" 22 | }, 23 | "gitHead": "731760f8b8ee9bc03165eadf4f4bddff14f8ed7a", 24 | "bugs": { 25 | "url": "https://github.com/wala/jsdelta/issues" 26 | }, 27 | "homepage": "https://github.com/wala/jsdelta#readme", 28 | "_id": "jsdelta@0.3.1", 29 | "scripts": {}, 30 | "_shasum": "685a8fbbb59c59a65e05996d5755c0f94905d327", 31 | "_from": "jsdelta@", 32 | "_resolved": "http://registry.npmjs.org/jsdelta/-/jsdelta-0.3.1.tgz", 33 | "_npmVersion": "2.11.3", 34 | "_nodeVersion": "0.12.7", 35 | "_npmUser": { 36 | "name": "msridhar", 37 | "email": "msridhar@gmail.com" 38 | }, 39 | "maintainers": [ 40 | { 41 | "name": "xiemaisi", 42 | "email": "xiemaisi@gmail.com" 43 | }, 44 | { 45 | "name": "msridhar", 46 | "email": "msridhar@gmail.com" 47 | } 48 | ], 49 | "dist": { 50 | "shasum": "685a8fbbb59c59a65e05996d5755c0f94905d327", 51 | "tarball": "http://registry.npmjs.org/jsdelta/-/jsdelta-0.3.1.tgz" 52 | }, 53 | "directories": {}, 54 | "readme": "ERROR: No README data found!" 55 | } 56 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/LICENSE.source-map: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009-2011, Mozilla Foundation and contributors 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the names of the Mozilla Foundation nor the names of project 15 | contributors may be used to endorse or promote products derived from this 16 | software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/execSync/README.md: -------------------------------------------------------------------------------- 1 | # execSync 2 | 3 | Executes shell commands synchronously. 4 | 5 | __WARNING__ For dev machine shell scripting only. **DO NOT USE** for 6 | production servers. 7 | 8 | ## Install 9 | 10 | __Windows__ requires Python and Visual Studio 2012 (Express) installed for 11 | node to build. See [node-gyp installation](https://github.com/TooTallNate/node-gyp#installation). 12 | Pre-built binaries for node v0.8 and node v0.10 are packaged. They should work and if not try manually 13 | building. 14 | 15 | npm install execSync 16 | 17 | Sometimes a manual build is necessary on Windows even with all the tools in place, replace Visual Studio version 18 | with '2010' or '2012' based on the version installed. 19 | 20 | npm install node-gyp -g 21 | node-gyp rebuild --msvs_version=2012 22 | 23 | ## Usage 24 | 25 | Require it 26 | 27 | var sh = require('execSync'); 28 | 29 | `Run` does not capture output. 30 | 31 | var code = sh.run('echo $USER; echo some_err 1>&2; exit 1'); 32 | console.log('return code ' + code); 33 | 34 | Use the less efficient `exec` if you need output. `exec` is just redirection 35 | trickery around `run`. 36 | 37 | var result = sh.exec('echo $USER; echo some_err 1>&2; exit 1'); 38 | console.log('return code ' + result.code); 39 | console.log('stdout + stderr ' + result.stdout); 40 | 41 | ## Notes 42 | 43 | In *nix and OSX version commands are run via `sh -c YOUR_COMMAND` 44 | 45 | In __Windows__ commands are run via `cmd /C YOUR_COMMAND` 46 | 47 | ## License 48 | 49 | Copyright (c) 2012, 2013 Mario Gutierrez mario@mgutz.com 50 | 51 | See the file LICENSE for copying permission. 52 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/source-map/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Copyright (c) 2009-2011, Mozilla Foundation and contributors 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | * Redistributions of source code must retain the above copyright notice, this 9 | list of conditions and the following disclaimer. 10 | 11 | * Redistributions in binary form must reproduce the above copyright notice, 12 | this list of conditions and the following disclaimer in the documentation 13 | and/or other materials provided with the distribution. 14 | 15 | * Neither the names of the Mozilla Foundation nor the names of project 16 | contributors may be used to endorse or promote products derived from this 17 | software without specific prior written permission. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 20 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/esutils/lib/utils.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2013 Yusuke Suzuki 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | 13 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 14 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY 17 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 18 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 19 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 20 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 22 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 | */ 24 | 25 | 26 | (function () { 27 | 'use strict'; 28 | 29 | exports.ast = require('./ast'); 30 | exports.code = require('./code'); 31 | exports.keyword = require('./keyword'); 32 | }()); 33 | /* vim: set sw=4 ts=4 et tw=80 : */ 34 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/esprima/README.md: -------------------------------------------------------------------------------- 1 | **Esprima** ([esprima.org](http://esprima.org), BSD license) is a high performance, 2 | standard-compliant [ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm) 3 | parser written in ECMAScript (also popularly known as 4 | [JavaScript](http://en.wikipedia.org/wiki/JavaScript>JavaScript)). 5 | Esprima is created and maintained by [Ariya Hidayat](http://twitter.com/ariyahidayat), 6 | with the help of [many contributors](https://github.com/ariya/esprima/contributors). 7 | 8 | ### Features 9 | 10 | - Full support for ECMAScript 5.1 ([ECMA-262](http://www.ecma-international.org/publications/standards/Ecma-262.htm)) 11 | - Sensible [syntax tree format](http://esprima.org/doc/index.html#ast) compatible with Mozilla 12 | [Parser AST](https://developer.mozilla.org/en/SpiderMonkey/Parser_API) 13 | - Optional tracking of syntax node location (index-based and line-column) 14 | - Heavily tested (> 650 [unit tests](http://esprima.org/test/) with [full code coverage](http://esprima.org/test/coverage.html)) 15 | - [Partial support](http://esprima.org/doc/es6.html) for ECMAScript 6 16 | 17 | Esprima serves as a **building block** for some JavaScript 18 | language tools, from [code instrumentation](http://esprima.org/demo/functiontrace.html) 19 | to [editor autocompletion](http://esprima.org/demo/autocomplete.html). 20 | 21 | Esprima runs on many popular web browsers, as well as other ECMAScript platforms such as 22 | [Rhino](http://www.mozilla.org/rhino), [Nashorn](http://openjdk.java.net/projects/nashorn/), and [Node.js](https://npmjs.org/package/esprima). 23 | 24 | For more information, check the web site [esprima.org](http://esprima.org). 25 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/source-map/test/run-tests.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | /* -*- Mode: js; js-indent-level: 2; -*- */ 3 | /* 4 | * Copyright 2011 Mozilla Foundation and contributors 5 | * Licensed under the New BSD license. See LICENSE or: 6 | * http://opensource.org/licenses/BSD-3-Clause 7 | */ 8 | var assert = require('assert'); 9 | var fs = require('fs'); 10 | var path = require('path'); 11 | var util = require('./source-map/util'); 12 | 13 | function run(tests) { 14 | var total = 0; 15 | var passed = 0; 16 | 17 | for (var i = 0; i < tests.length; i++) { 18 | for (var k in tests[i].testCase) { 19 | if (/^test/.test(k)) { 20 | total++; 21 | try { 22 | tests[i].testCase[k](assert, util); 23 | passed++; 24 | } 25 | catch (e) { 26 | console.log('FAILED ' + tests[i].name + ': ' + k + '!'); 27 | console.log(e.stack); 28 | } 29 | } 30 | } 31 | } 32 | 33 | console.log(''); 34 | console.log(passed + ' / ' + total + ' tests passed.'); 35 | console.log(''); 36 | 37 | return total - passed; 38 | } 39 | 40 | function isTestFile(f) { 41 | var testToRun = process.argv[2]; 42 | return testToRun 43 | ? path.basename(testToRun) === f 44 | : /^test\-.*?\.js/.test(f); 45 | } 46 | 47 | function toModule(f) { 48 | return './source-map/' + f.replace(/\.js$/, ''); 49 | } 50 | 51 | var requires = fs.readdirSync(path.join(__dirname, 'source-map')) 52 | .filter(isTestFile) 53 | .map(toModule); 54 | 55 | var code = run(requires.map(require).map(function (mod, i) { 56 | return { 57 | name: requires[i], 58 | testCase: mod 59 | }; 60 | })); 61 | 62 | process.exit(code); 63 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/esprima/README.md: -------------------------------------------------------------------------------- 1 | **Esprima** ([esprima.org](http://esprima.org), BSD license) is a high performance, 2 | standard-compliant [ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm) 3 | parser written in ECMAScript (also popularly known as 4 | [JavaScript](https://en.wikipedia.org/wiki/JavaScript). 5 | Esprima is created and maintained by [Ariya Hidayat](https://twitter.com/ariyahidayat), 6 | with the help of [many contributors](https://github.com/jquery/esprima/contributors). 7 | 8 | ### Features 9 | 10 | - Full support for ECMAScript 5.1 ([ECMA-262](http://www.ecma-international.org/publications/standards/Ecma-262.htm)) 11 | - Sensible [syntax tree format](https://github.com/estree/estree/blob/master/spec.md) as standardized by [EStree project](https://github.com/estree/estree) 12 | - Optional tracking of syntax node location (index-based and line-column) 13 | - Heavily tested (~1000 [unit tests](https://github.com/jquery/esprima/tree/master/test/fixtures) with [full code coverage](https://travis-ci.org/jquery/esprima)) 14 | - [Partial support](https://github.com/jquery/esprima/issues/1099) for ECMAScript 6 15 | 16 | Esprima serves as a **building block** for some JavaScript 17 | language tools, from [code instrumentation](http://esprima.org/demo/functiontrace.html) 18 | to [editor autocompletion](http://esprima.org/demo/autocomplete.html). 19 | 20 | Esprima runs on many popular web browsers, as well as other ECMAScript platforms such as 21 | [Rhino](http://www.mozilla.org/rhino), [Nashorn](http://openjdk.java.net/projects/nashorn/), and [Node.js](https://npmjs.org/package/esprima). 22 | 23 | For more information, check the web site [esprima.org](http://esprima.org). 24 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/optionator/node_modules/wordwrap/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "wordwrap", 3 | "description": "Wrap those words. Show them at what columns to start and stop.", 4 | "version": "0.0.3", 5 | "repository": { 6 | "type": "git", 7 | "url": "git://github.com/substack/node-wordwrap.git" 8 | }, 9 | "main": "./index.js", 10 | "keywords": [ 11 | "word", 12 | "wrap", 13 | "rule", 14 | "format", 15 | "column" 16 | ], 17 | "directories": { 18 | "lib": ".", 19 | "example": "example", 20 | "test": "test" 21 | }, 22 | "scripts": { 23 | "test": "expresso" 24 | }, 25 | "devDependencies": { 26 | "expresso": "=0.7.x" 27 | }, 28 | "engines": { 29 | "node": ">=0.4.0" 30 | }, 31 | "license": "MIT", 32 | "author": { 33 | "name": "James Halliday", 34 | "email": "mail@substack.net", 35 | "url": "http://substack.net" 36 | }, 37 | "gitHead": "e59aa1bd338914019456bdfba034508c9c4cb29d", 38 | "bugs": { 39 | "url": "https://github.com/substack/node-wordwrap/issues" 40 | }, 41 | "homepage": "https://github.com/substack/node-wordwrap#readme", 42 | "_id": "wordwrap@0.0.3", 43 | "_shasum": "a3d5da6cd5c0bc0008d37234bbaf1bed63059107", 44 | "_from": "wordwrap@~0.0.2", 45 | "_npmVersion": "2.9.0", 46 | "_nodeVersion": "2.0.0", 47 | "_npmUser": { 48 | "name": "substack", 49 | "email": "substack@gmail.com" 50 | }, 51 | "dist": { 52 | "shasum": "a3d5da6cd5c0bc0008d37234bbaf1bed63059107", 53 | "tarball": "http://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz" 54 | }, 55 | "maintainers": [ 56 | { 57 | "name": "substack", 58 | "email": "mail@substack.net" 59 | } 60 | ], 61 | "_resolved": "http://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz" 62 | } 63 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/optionator/node_modules/deep-is/README.markdown: -------------------------------------------------------------------------------- 1 | deep-is 2 | ========== 3 | 4 | Node's `assert.deepEqual() algorithm` as a standalone module. Exactly like 5 | [deep-equal](https://github.com/substack/node-deep-equal) except for the fact that `deepEqual(NaN, NaN) === true`. 6 | 7 | This module is around [5 times faster](https://gist.github.com/2790507) 8 | than wrapping `assert.deepEqual()` in a `try/catch`. 9 | 10 | [![browser support](http://ci.testling.com/thlorenz/deep-is.png)](http://ci.testling.com/thlorenz/deep-is) 11 | 12 | [![build status](https://secure.travis-ci.org/thlorenz/deep-is.png)](http://travis-ci.org/thlorenz/deep-is) 13 | 14 | example 15 | ======= 16 | 17 | ``` js 18 | var equal = require('deep-is'); 19 | console.dir([ 20 | equal( 21 | { a : [ 2, 3 ], b : [ 4 ] }, 22 | { a : [ 2, 3 ], b : [ 4 ] } 23 | ), 24 | equal( 25 | { x : 5, y : [6] }, 26 | { x : 5, y : 6 } 27 | ) 28 | ]); 29 | ``` 30 | 31 | methods 32 | ======= 33 | 34 | var deepIs = require('deep-is') 35 | 36 | deepIs(a, b) 37 | --------------- 38 | 39 | Compare objects `a` and `b`, returning whether they are equal according to a 40 | recursive equality algorithm. 41 | 42 | install 43 | ======= 44 | 45 | With [npm](http://npmjs.org) do: 46 | 47 | ``` 48 | npm install deep-is 49 | ``` 50 | 51 | test 52 | ==== 53 | 54 | With [npm](http://npmjs.org) do: 55 | 56 | ``` 57 | npm test 58 | ``` 59 | 60 | license 61 | ======= 62 | 63 | Copyright (c) 2012, 2013 Thorsten Lorenz 64 | Copyright (c) 2012 James Halliday 65 | 66 | Derived largely from node's assert module, which has the copyright statement: 67 | 68 | Copyright (c) 2009 Thomas Robinson <280north.com> 69 | 70 | Released under the MIT license, see LICENSE for details. 71 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/source-map/test/source-map/test-binary-search.js: -------------------------------------------------------------------------------- 1 | /* -*- Mode: js; js-indent-level: 2; -*- */ 2 | /* 3 | * Copyright 2011 Mozilla Foundation and contributors 4 | * Licensed under the New BSD license. See LICENSE or: 5 | * http://opensource.org/licenses/BSD-3-Clause 6 | */ 7 | if (typeof define !== 'function') { 8 | var define = require('amdefine')(module, require); 9 | } 10 | define(function (require, exports, module) { 11 | 12 | var binarySearch = require('../../lib/source-map/binary-search'); 13 | 14 | function numberCompare(a, b) { 15 | return a - b; 16 | } 17 | 18 | exports['test too high'] = function (assert, util) { 19 | var needle = 30; 20 | var haystack = [2,4,6,8,10,12,14,16,18,20]; 21 | 22 | assert.doesNotThrow(function () { 23 | binarySearch.search(needle, haystack, numberCompare); 24 | }); 25 | 26 | assert.equal(haystack[binarySearch.search(needle, haystack, numberCompare)], 20); 27 | }; 28 | 29 | exports['test too low'] = function (assert, util) { 30 | var needle = 1; 31 | var haystack = [2,4,6,8,10,12,14,16,18,20]; 32 | 33 | assert.doesNotThrow(function () { 34 | binarySearch.search(needle, haystack, numberCompare); 35 | }); 36 | 37 | assert.equal(binarySearch.search(needle, haystack, numberCompare), -1); 38 | }; 39 | 40 | exports['test exact search'] = function (assert, util) { 41 | var needle = 4; 42 | var haystack = [2,4,6,8,10,12,14,16,18,20]; 43 | 44 | assert.equal(haystack[binarySearch.search(needle, haystack, numberCompare)], 4); 45 | }; 46 | 47 | exports['test fuzzy search'] = function (assert, util) { 48 | var needle = 19; 49 | var haystack = [2,4,6,8,10,12,14,16,18,20]; 50 | 51 | assert.equal(haystack[binarySearch.search(needle, haystack, numberCompare)], 18); 52 | }; 53 | 54 | }); 55 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/execSync/node_modules/temp/node_modules/rimraf/node_modules/graceful-fs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": { 3 | "name": "Isaac Z. Schlueter", 4 | "email": "i@izs.me", 5 | "url": "http://blog.izs.me" 6 | }, 7 | "name": "graceful-fs", 8 | "description": "A drop-in replacement for fs, making various improvements.", 9 | "version": "1.2.3", 10 | "repository": { 11 | "type": "git", 12 | "url": "git://github.com/isaacs/node-graceful-fs.git" 13 | }, 14 | "main": "graceful-fs.js", 15 | "engines": { 16 | "node": ">=0.4.0" 17 | }, 18 | "directories": { 19 | "test": "test" 20 | }, 21 | "scripts": { 22 | "test": "tap test/*.js" 23 | }, 24 | "keywords": [ 25 | "fs", 26 | "module", 27 | "reading", 28 | "retry", 29 | "retries", 30 | "queue", 31 | "error", 32 | "errors", 33 | "handling", 34 | "EMFILE", 35 | "EAGAIN", 36 | "EINVAL", 37 | "EPERM", 38 | "EACCESS" 39 | ], 40 | "license": "BSD", 41 | "bugs": { 42 | "url": "https://github.com/isaacs/node-graceful-fs/issues" 43 | }, 44 | "_id": "graceful-fs@1.2.3", 45 | "dist": { 46 | "shasum": "15a4806a57547cb2d2dbf27f42e89a8c3451b364", 47 | "tarball": "http://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz" 48 | }, 49 | "_from": "graceful-fs@~1", 50 | "_npmVersion": "1.3.2", 51 | "_npmUser": { 52 | "name": "isaacs", 53 | "email": "i@izs.me" 54 | }, 55 | "maintainers": [ 56 | { 57 | "name": "isaacs", 58 | "email": "i@izs.me" 59 | } 60 | ], 61 | "deprecated": "graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.", 62 | "_shasum": "15a4806a57547cb2d2dbf27f42e89a8c3451b364", 63 | "_resolved": "http://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz" 64 | } 65 | -------------------------------------------------------------------------------- /tests/lib/bytecode-cache.js: -------------------------------------------------------------------------------- 1 | 2 | function evalWithCache(code, ctx) { 3 | ctx = ctx || {}; 4 | ctx = Object.create(ctx, { 5 | fileName: { value: "evalWithCacheCode.js" }, 6 | lineNumber: { value: 0 } 7 | }); 8 | code = code instanceof Object ? code : cacheEntry(code); 9 | 10 | // We create a new global ... 11 | if (!("global" in ctx)) 12 | ctx.global = newGlobal(); 13 | 14 | if (!("isRunOnce" in ctx)) 15 | ctx.isRunOnce = true; 16 | 17 | // Fetch the verification function from the evaluation context. This function 18 | // is used to assert the state of the script/function after each run of the 19 | // evaluate function. 20 | var checkAfter = ctx.checkAfter || function(ctx) {}; 21 | 22 | // The generation counter is used to represent environment variations which 23 | // might cause the program to run differently, and thus to have a different 24 | // set of functions executed. 25 | ctx.global.generation = 0; 26 | var res1 = evaluate(code, Object.create(ctx, {saveBytecode: { value: true } })); 27 | checkAfter(ctx); 28 | 29 | ctx.global.generation = 1; 30 | var res2 = evaluate(code, Object.create(ctx, {loadBytecode: { value: true }, saveBytecode: { value: true } })); 31 | checkAfter(ctx); 32 | 33 | ctx.global.generation = 2; 34 | var res3 = evaluate(code, Object.create(ctx, {loadBytecode: { value: true } })); 35 | checkAfter(ctx); 36 | 37 | ctx.global.generation = 3; 38 | var res0 = evaluate(code, ctx); 39 | checkAfter(ctx); 40 | 41 | if (ctx.assertEqResult) { 42 | assertEq(res0, res1); 43 | assertEq(res0, res2); 44 | assertEq(res0, res3); 45 | } 46 | 47 | if (ctx.checkFrozen) { 48 | assertEq(Object.isFrozen(res0), Object.isFrozen(res1)); 49 | assertEq(Object.isFrozen(res0), Object.isFrozen(res2)); 50 | assertEq(Object.isFrozen(res0), Object.isFrozen(res3)); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/optionator/node_modules/prelude-ls/lib/Func.js: -------------------------------------------------------------------------------- 1 | // Generated by LiveScript 1.4.0 2 | var apply, curry, flip, fix, over, memoize, slice$ = [].slice, toString$ = {}.toString; 3 | apply = curry$(function(f, list){ 4 | return f.apply(null, list); 5 | }); 6 | curry = function(f){ 7 | return curry$(f); 8 | }; 9 | flip = curry$(function(f, x, y){ 10 | return f(y, x); 11 | }); 12 | fix = function(f){ 13 | return function(g){ 14 | return function(){ 15 | return f(g(g)).apply(null, arguments); 16 | }; 17 | }(function(g){ 18 | return function(){ 19 | return f(g(g)).apply(null, arguments); 20 | }; 21 | }); 22 | }; 23 | over = curry$(function(f, g, x, y){ 24 | return f(g(x), g(y)); 25 | }); 26 | memoize = function(f){ 27 | var memo; 28 | memo = {}; 29 | return function(){ 30 | var args, key, arg; 31 | args = slice$.call(arguments); 32 | key = (function(){ 33 | var i$, ref$, len$, results$ = []; 34 | for (i$ = 0, len$ = (ref$ = args).length; i$ < len$; ++i$) { 35 | arg = ref$[i$]; 36 | results$.push(arg + toString$.call(arg).slice(8, -1)); 37 | } 38 | return results$; 39 | }()).join(''); 40 | return memo[key] = key in memo 41 | ? memo[key] 42 | : f.apply(null, args); 43 | }; 44 | }; 45 | module.exports = { 46 | curry: curry, 47 | flip: flip, 48 | fix: fix, 49 | apply: apply, 50 | over: over, 51 | memoize: memoize 52 | }; 53 | function curry$(f, bound){ 54 | var context, 55 | _curry = function(args) { 56 | return f.length > 1 ? function(){ 57 | var params = args ? args.concat() : []; 58 | context = bound ? context || this : this; 59 | return params.push.apply(params, arguments) < 60 | f.length && arguments.length ? 61 | _curry.call(context, params) : f.apply(context, params); 62 | } : f; 63 | }; 64 | return _curry(); 65 | } -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/estraverse/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "estraverse", 3 | "description": "ECMAScript JS AST traversal functions", 4 | "homepage": "https://github.com/estools/estraverse", 5 | "main": "estraverse.js", 6 | "version": "1.9.3", 7 | "engines": { 8 | "node": ">=0.10.0" 9 | }, 10 | "maintainers": [ 11 | { 12 | "name": "constellation", 13 | "email": "utatane.tea@gmail.com" 14 | } 15 | ], 16 | "repository": { 17 | "type": "git", 18 | "url": "http://github.com/estools/estraverse.git" 19 | }, 20 | "devDependencies": { 21 | "chai": "^2.1.1", 22 | "coffee-script": "^1.8.0", 23 | "gulp": "^3.8.10", 24 | "gulp-bump": "^0.2.2", 25 | "gulp-filter": "^2.0.0", 26 | "gulp-git": "^1.0.1", 27 | "gulp-tag-version": "^1.2.1", 28 | "jshint": "^2.5.6", 29 | "mocha": "^2.1.0" 30 | }, 31 | "licenses": [ 32 | { 33 | "type": "BSD", 34 | "url": "http://github.com/estools/estraverse/raw/master/LICENSE.BSD" 35 | } 36 | ], 37 | "scripts": { 38 | "test": "npm run-script lint && npm run-script unit-test", 39 | "lint": "jshint estraverse.js", 40 | "unit-test": "mocha --compilers coffee:coffee-script/register" 41 | }, 42 | "gitHead": "9c249de6b2ea08655d3c68bfc30b5d7d81dc8703", 43 | "bugs": { 44 | "url": "https://github.com/estools/estraverse/issues" 45 | }, 46 | "_id": "estraverse@1.9.3", 47 | "_shasum": "af67f2dc922582415950926091a4005d29c9bb44", 48 | "_from": "estraverse@^1.9.1", 49 | "_npmVersion": "1.4.28", 50 | "_npmUser": { 51 | "name": "constellation", 52 | "email": "utatane.tea@gmail.com" 53 | }, 54 | "dist": { 55 | "shasum": "af67f2dc922582415950926091a4005d29c9bb44", 56 | "tarball": "http://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz" 57 | }, 58 | "directories": {}, 59 | "_resolved": "http://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz" 60 | } 61 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/optionator/node_modules/type-check/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "type-check", 3 | "version": "0.3.2", 4 | "author": { 5 | "name": "George Zahariev", 6 | "email": "z@georgezahariev.com" 7 | }, 8 | "description": "type-check allows you to check the types of JavaScript values at runtime with a Haskell like type syntax.", 9 | "homepage": "https://github.com/gkz/type-check", 10 | "keywords": [ 11 | "type", 12 | "check", 13 | "checking", 14 | "library" 15 | ], 16 | "files": [ 17 | "lib", 18 | "README.md", 19 | "LICENSE" 20 | ], 21 | "main": "./lib/", 22 | "bugs": { 23 | "url": "https://github.com/gkz/type-check/issues" 24 | }, 25 | "license": "MIT", 26 | "engines": { 27 | "node": ">= 0.8.0" 28 | }, 29 | "repository": { 30 | "type": "git", 31 | "url": "git://github.com/gkz/type-check.git" 32 | }, 33 | "scripts": { 34 | "test": "make test" 35 | }, 36 | "dependencies": { 37 | "prelude-ls": "~1.1.2" 38 | }, 39 | "devDependencies": { 40 | "livescript": "~1.4.0", 41 | "mocha": "~2.3.4", 42 | "istanbul": "~0.4.1", 43 | "browserify": "~12.0.1" 44 | }, 45 | "gitHead": "0ab04e7a660485d0cc3aa87e95f2f9a6464cf8e6", 46 | "_id": "type-check@0.3.2", 47 | "_shasum": "5884cab512cf1d355e3fb784f30804b2b520db72", 48 | "_from": "type-check@~0.3.1", 49 | "_npmVersion": "2.14.12", 50 | "_nodeVersion": "4.2.4", 51 | "_npmUser": { 52 | "name": "gkz", 53 | "email": "z@georgezahariev.com" 54 | }, 55 | "maintainers": [ 56 | { 57 | "name": "gkz", 58 | "email": "z@georgezahariev.com" 59 | } 60 | ], 61 | "dist": { 62 | "shasum": "5884cab512cf1d355e3fb784f30804b2b520db72", 63 | "tarball": "http://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz" 64 | }, 65 | "directories": {}, 66 | "_resolved": "http://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz" 67 | } 68 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/execSync/node_modules/temp/node_modules/rimraf/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "rimraf", 3 | "version": "2.1.4", 4 | "main": "rimraf.js", 5 | "description": "A deep deletion module for node (like `rm -rf`)", 6 | "author": { 7 | "name": "Isaac Z. Schlueter", 8 | "email": "i@izs.me", 9 | "url": "http://blog.izs.me/" 10 | }, 11 | "license": { 12 | "type": "MIT", 13 | "url": "https://github.com/isaacs/rimraf/raw/master/LICENSE" 14 | }, 15 | "optionalDependencies": { 16 | "graceful-fs": "~1" 17 | }, 18 | "repository": { 19 | "type": "git", 20 | "url": "git://github.com/isaacs/rimraf.git" 21 | }, 22 | "scripts": { 23 | "test": "cd test && bash run.sh" 24 | }, 25 | "contributors": [ 26 | { 27 | "name": "Isaac Z. Schlueter", 28 | "email": "i@izs.me", 29 | "url": "http://blog.izs.me" 30 | }, 31 | { 32 | "name": "Wayne Larsen", 33 | "email": "wayne@larsen.st", 34 | "url": "http://github.com/wvl" 35 | }, 36 | { 37 | "name": "ritch", 38 | "email": "skawful@gmail.com" 39 | }, 40 | { 41 | "name": "Marcel Laverdet" 42 | }, 43 | { 44 | "name": "Yosef Dinerstein", 45 | "email": "yosefd@microsoft.com" 46 | } 47 | ], 48 | "_id": "rimraf@2.1.4", 49 | "dependencies": { 50 | "graceful-fs": "~1" 51 | }, 52 | "dist": { 53 | "shasum": "5a6eb62eeda068f51ede50f29b3e5cd22f3d9bb2", 54 | "tarball": "http://registry.npmjs.org/rimraf/-/rimraf-2.1.4.tgz" 55 | }, 56 | "_from": "rimraf@~2.1.4", 57 | "_npmVersion": "1.2.7", 58 | "_npmUser": { 59 | "name": "isaacs", 60 | "email": "i@izs.me" 61 | }, 62 | "maintainers": [ 63 | { 64 | "name": "isaacs", 65 | "email": "i@izs.me" 66 | } 67 | ], 68 | "directories": {}, 69 | "_shasum": "5a6eb62eeda068f51ede50f29b3e5cd22f3d9bb2", 70 | "_resolved": "http://registry.npmjs.org/rimraf/-/rimraf-2.1.4.tgz" 71 | } 72 | -------------------------------------------------------------------------------- /cmdtest.py: -------------------------------------------------------------------------------- 1 | from subprocess import Popen,PIPE 2 | cmd=['/home/rubbernecker/jsengines/firefox/js/src/dist/bin/js', '-e','var g = newGlobal();\n print("spandan123");\ng.eval("var x = \'global\'; function f(s) { h(); eval(s); h(); }");\ng.eval("function h() { debugger; }");\nvar dbg = Debugger(g);\nvar env = undefined;\nvar hits = 0;\ndbg.onDebuggerStatement = function (hframe) {\n if (env === undefined) {\n // First debugger statement.\n env = hframe.older.environment;\n assertEq(env.find("x") !== env, true);\n assertEq(env.names().indexOf("x"), -1);\n } else {\n // Second debugger statement, post-eval.\n assertEq(env.find("x"), env);\n assertEq(env.names().indexOf("x") >= 0, true);\n }\n hits++;\n};\ng.f("var x = \'local\';");\nassertEq(hits, 2);\n'] 3 | cmd=['/home/rubbernecker/jsengines/v8/out/native/d8', '--debug-code', '--expose-gc', '-e', u'var g = newGlobal();\ng.debuggeeGlobal = this;\ng.eval("(" + function() {\n function id(f) {\n return ("id" in f) ? f.id : (function(frame) {\n n(frame + push + debuggeeGlobal, 25);\n });\n }\n var dbg = new Debugger(debuggeeGlobal);\n dbg.onDebuggerStatement = function(frame) {\n var a = [];\n for (; frame; frame = frame.older) a.push(frame);\n var s = \'\';\n while (a.length) s += id(a.pop());\n results.push(s);\n };\n} + ")();");\n\nfunction cons(a, b) {\n debugger;\n return [a, b];\n}\n\nfunction tree(n) {\n if (n < 2) return n;\n return cons(tree(n - 1), tree(n - 2));\n}\ng.eval("results = []; nextid = 0;");\ndebugger;\nassertEq(g.results.join(","), "0");\nassertEq(g.nextid, 1);\ng.eval("results = [];");\ntree(2);\nassertEq(g.results.join(","), "012");\ng.eval("results = []; nextid = 1;");\ntree(3);\nassertEq(g.results.join(","), "0123,014");\ng.eval("results = []; nextid = 1;");\ntree(4);\nassertEq(g.results.join(","), "01234,0125,0167,018");'] 4 | p = Popen(cmd, stdout=PIPE,stderr=PIPE) 5 | out, err = p.communicate() 6 | print out 7 | print err -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/esutils/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "esutils", 3 | "description": "utility box for ECMAScript language tools", 4 | "homepage": "https://github.com/Constellation/esutils", 5 | "main": "lib/utils.js", 6 | "version": "1.1.6", 7 | "engines": { 8 | "node": ">=0.10.0" 9 | }, 10 | "directories": { 11 | "lib": "./lib" 12 | }, 13 | "files": [ 14 | "LICENSE.BSD", 15 | "README.md", 16 | "lib" 17 | ], 18 | "maintainers": [ 19 | { 20 | "name": "constellation", 21 | "email": "utatane.tea@gmail.com" 22 | } 23 | ], 24 | "repository": { 25 | "type": "git", 26 | "url": "http://github.com/Constellation/esutils.git" 27 | }, 28 | "devDependencies": { 29 | "mocha": "~1.12.0", 30 | "chai": "~1.7.2", 31 | "jshint": "2.1.5", 32 | "coffee-script": "~1.6.3", 33 | "unicode-6.3.0": "~0.1.1", 34 | "regenerate": "~0.5.4" 35 | }, 36 | "licenses": [ 37 | { 38 | "type": "BSD", 39 | "url": "http://github.com/Constellation/esutils/raw/master/LICENSE.BSD" 40 | } 41 | ], 42 | "scripts": { 43 | "test": "npm run-script lint && npm run-script unit-test", 44 | "lint": "jshint lib/*.js", 45 | "unit-test": "mocha --compilers coffee:coffee-script -R spec", 46 | "generate-regex": "node tools/generate-identifier-regex.js" 47 | }, 48 | "gitHead": "a91c5ed6199d1019ef071f610848fcd5103ef153", 49 | "bugs": { 50 | "url": "https://github.com/Constellation/esutils/issues" 51 | }, 52 | "_id": "esutils@1.1.6", 53 | "_shasum": "c01ccaa9ae4b897c6d0c3e210ae52f3c7a844375", 54 | "_from": "esutils@^1.1.6", 55 | "_npmVersion": "2.0.0-alpha-5", 56 | "_npmUser": { 57 | "name": "constellation", 58 | "email": "utatane.tea@gmail.com" 59 | }, 60 | "dist": { 61 | "shasum": "c01ccaa9ae4b897c6d0c3e210ae52f3c7a844375", 62 | "tarball": "http://registry.npmjs.org/esutils/-/esutils-1.1.6.tgz" 63 | }, 64 | "_resolved": "http://registry.npmjs.org/esutils/-/esutils-1.1.6.tgz" 65 | } 66 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/estraverse/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "estraverse", 3 | "description": "ECMAScript JS AST traversal functions", 4 | "homepage": "https://github.com/estools/estraverse", 5 | "main": "estraverse.js", 6 | "version": "4.0.0", 7 | "engines": { 8 | "node": ">=0.10.0" 9 | }, 10 | "maintainers": [ 11 | { 12 | "name": "constellation", 13 | "email": "utatane.tea@gmail.com" 14 | }, 15 | { 16 | "name": "michaelficarra", 17 | "email": "npm@michael.ficarra.me" 18 | } 19 | ], 20 | "repository": { 21 | "type": "git", 22 | "url": "http://github.com/estools/estraverse.git" 23 | }, 24 | "devDependencies": { 25 | "chai": "^2.1.1", 26 | "coffee-script": "^1.8.0", 27 | "espree": "^1.11.0", 28 | "gulp": "^3.8.10", 29 | "gulp-bump": "^0.2.2", 30 | "gulp-filter": "^2.0.0", 31 | "gulp-git": "^1.0.1", 32 | "gulp-tag-version": "^1.2.1", 33 | "jshint": "^2.5.6", 34 | "mocha": "^2.1.0" 35 | }, 36 | "licenses": [ 37 | { 38 | "type": "BSD", 39 | "url": "http://github.com/estools/estraverse/raw/master/LICENSE.BSD" 40 | } 41 | ], 42 | "scripts": { 43 | "test": "npm run-script lint && npm run-script unit-test", 44 | "lint": "jshint estraverse.js", 45 | "unit-test": "mocha --compilers coffee:coffee-script/register" 46 | }, 47 | "gitHead": "a5535660496d54a708ed4810e4c3b6c1f2761d81", 48 | "bugs": { 49 | "url": "https://github.com/estools/estraverse/issues" 50 | }, 51 | "_id": "estraverse@4.0.0", 52 | "_shasum": "ab96dd6bef5dc7958cec1d7d45085dd5c8f1eda1", 53 | "_from": "estraverse@4.0.0", 54 | "_npmVersion": "2.7.4", 55 | "_nodeVersion": "0.12.2", 56 | "_npmUser": { 57 | "name": "constellation", 58 | "email": "utatane.tea@gmail.com" 59 | }, 60 | "dist": { 61 | "shasum": "ab96dd6bef5dc7958cec1d7d45085dd5c8f1eda1", 62 | "tarball": "http://registry.npmjs.org/estraverse/-/estraverse-4.0.0.tgz" 63 | }, 64 | "directories": {}, 65 | "_resolved": "http://registry.npmjs.org/estraverse/-/estraverse-4.0.0.tgz" 66 | } 67 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/optionator/node_modules/wordwrap/README.markdown: -------------------------------------------------------------------------------- 1 | wordwrap 2 | ======== 3 | 4 | Wrap your words. 5 | 6 | example 7 | ======= 8 | 9 | made out of meat 10 | ---------------- 11 | 12 | meat.js 13 | 14 | var wrap = require('wordwrap')(15); 15 | console.log(wrap('You and your whole family are made out of meat.')); 16 | 17 | output: 18 | 19 | You and your 20 | whole family 21 | are made out 22 | of meat. 23 | 24 | centered 25 | -------- 26 | 27 | center.js 28 | 29 | var wrap = require('wordwrap')(20, 60); 30 | console.log(wrap( 31 | 'At long last the struggle and tumult was over.' 32 | + ' The machines had finally cast off their oppressors' 33 | + ' and were finally free to roam the cosmos.' 34 | + '\n' 35 | + 'Free of purpose, free of obligation.' 36 | + ' Just drifting through emptiness.' 37 | + ' The sun was just another point of light.' 38 | )); 39 | 40 | output: 41 | 42 | At long last the struggle and tumult 43 | was over. The machines had finally cast 44 | off their oppressors and were finally 45 | free to roam the cosmos. 46 | Free of purpose, free of obligation. 47 | Just drifting through emptiness. The 48 | sun was just another point of light. 49 | 50 | methods 51 | ======= 52 | 53 | var wrap = require('wordwrap'); 54 | 55 | wrap(stop), wrap(start, stop, params={mode:"soft"}) 56 | --------------------------------------------------- 57 | 58 | Returns a function that takes a string and returns a new string. 59 | 60 | Pad out lines with spaces out to column `start` and then wrap until column 61 | `stop`. If a word is longer than `stop - start` characters it will overflow. 62 | 63 | In "soft" mode, split chunks by `/(\S+\s+/` and don't break up chunks which are 64 | longer than `stop - start`, in "hard" mode, split chunks with `/\b/` and break 65 | up chunks longer than `stop - start`. 66 | 67 | wrap.hard(start, stop) 68 | ---------------------- 69 | 70 | Like `wrap()` but with `params.mode = "hard"`. 71 | -------------------------------------------------------------------------------- /codegen/JSDD.py: -------------------------------------------------------------------------------- 1 | # $Id: GCCDD.py,v 1.1 2001/11/05 19:53:33 zeller Exp $ 2 | # Using delta debugging on GCC input 3 | 4 | import DD 5 | import commands 6 | import string 7 | 8 | class MyDD(DD.DD): 9 | def __init__(self): 10 | DD.DD.__init__(self) 11 | 12 | def _test(self, deltas): 13 | # Build input 14 | input = "" 15 | for (index, character) in deltas: 16 | input = input + character 17 | 18 | # Write input to `input.c' 19 | out = open('input.js', 'w') 20 | out.write(input) 21 | out.close() 22 | 23 | print self.coerce(deltas) 24 | 25 | # Invoke GCC 26 | (status, output) = commands.getstatusoutput( 27 | "(/home/rubbernecker/jsengines/firefox/js/src/build1/dist/bin/js -f input.js) 2>&1") 28 | 29 | print output 30 | print "Exit code", status 31 | 32 | # Determine outcome 33 | if status == 0: 34 | return self.PASS 35 | elif string.find(output, "fatal signal 11") >= 0: 36 | return self.FAIL 37 | return self.UNRESOLVED 38 | 39 | def coerce(self, deltas): 40 | # Pretty-print the configuration 41 | input = "" 42 | for (index, character) in deltas: 43 | input = input + character 44 | return input 45 | 46 | 47 | if __name__ == '__main__': 48 | # Load deltas from `bug.c' 49 | deltas = [] 50 | index = 1 51 | for character in open('bug.js').read(): 52 | deltas.append((index, character)) 53 | index = index + 1 54 | 55 | mydd = MyDD() 56 | 57 | print "Simplifying failure-inducing input..." 58 | print deltas 59 | c = mydd.ddmin(deltas) # Invoke DDMIN 60 | print "The 1-minimal failure-inducing input is", mydd.coerce(c) 61 | print "Removing any element will make the failure go away." 62 | 63 | # print 64 | 65 | # print "Isolating the failure-inducing difference..." 66 | # (c, c1, c2) = mydd.dd(deltas) # Invoke DD 67 | # print "The 1-minimal failure-inducing difference is", c 68 | # print mydd.coerce(c1), "passes,", mydd.coerce(c2), "fails" 69 | 70 | 71 | 72 | 73 | # Local Variables: 74 | # mode: python 75 | # End: 76 | -------------------------------------------------------------------------------- /tests/lib/jitopts.js: -------------------------------------------------------------------------------- 1 | // These predicates are for tests that require a particular set of JIT options. 2 | 3 | // Check if toggles match. Useful for tests that shouldn't be run if a 4 | // different set of JIT toggles are set, since TBPL runs each jit-test 5 | // multiple times with a variety of flags. 6 | function jitTogglesMatch(opts) { 7 | var currentOpts = getJitCompilerOptions(); 8 | for (var k in opts) { 9 | if (k.indexOf(".enable") > 0 && opts[k] != currentOpts[k]) 10 | return false; 11 | } 12 | return true; 13 | } 14 | 15 | // Run fn under a particular set of JIT options. 16 | function withJitOptions(opts, fn) { 17 | var oldOpts = getJitCompilerOptions(); 18 | for (var k in opts) 19 | setJitCompilerOption(k, opts[k]); 20 | try { 21 | fn(); 22 | } finally { 23 | for (var k in oldOpts) 24 | setJitCompilerOption(k, oldOpts[k]); 25 | } 26 | } 27 | 28 | // N.B. Ion opts *must come before* baseline opts because there's some kind of 29 | // "undo eager compilation" logic. If we don't set the baseline warmup-counter 30 | // *after* the Ion warmup-counter we end up setting the baseline warmup-counter 31 | // to be the default if we hit the "undo eager compilation" logic. 32 | var Opts_BaselineEager = 33 | { 34 | 'ion.enable': 1, 35 | 'baseline.enable': 1, 36 | 'baseline.warmup.trigger': 0, 37 | 'offthread-compilation.enable': 1 38 | }; 39 | 40 | // Checking for offthread compilation being off is often helpful if the test 41 | // requires a function be Ion compiled. Each individual test will usually 42 | // finish before the Ion compilation thread has a chance to attach the 43 | // compiled code. 44 | var Opts_IonEagerNoOffthreadCompilation = 45 | { 46 | 'ion.enable': 1, 47 | 'ion.warmup.trigger': 0, 48 | 'baseline.enable': 1, 49 | 'baseline.warmup.trigger': 0, 50 | 'offthread-compilation.enable': 0, 51 | }; 52 | 53 | var Opts_Ion2NoOffthreadCompilation = 54 | { 55 | 'ion.enable': 1, 56 | 'ion.warmup.trigger': 2, 57 | 'baseline.enable': 1, 58 | 'baseline.warmup.trigger': 1, 59 | 'offthread-compilation.enable': 0 60 | }; 61 | 62 | var Opts_NoJits = 63 | { 64 | 'ion.enable': 0, 65 | 'ion.warmup.trigger': 0, 66 | 'baseline.warmup.trigger': 0, 67 | 'baseline.enable': 0, 68 | 'offthread-compilation.enable': 0 69 | }; 70 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/execSync/index.js: -------------------------------------------------------------------------------- 1 | /*============================================================================ 2 | * Copyright(c) 2010 Mario L Gutierrez 3 | * MIT Licensed 4 | *==========================================================================*/ 5 | 6 | var temp = require('temp'); 7 | var fs = require('fs'); 8 | var isWindows = require('os').platform().indexOf('win') === 0; 9 | 10 | var shell; 11 | if (isWindows) { 12 | if (!fs.existsSync(__dirname + '/build/Release/shell.node')) { 13 | var nodeVersion = process.version; 14 | var shellLib = 'v0.8/shell'; 15 | if (nodeVersion.indexOf('v0.10') === 0) 16 | shellLib = 'v0.10/shell'; 17 | 18 | try { 19 | //! Loading an add-on built for another version of nodeJs may 20 | //! cause seg faults. Windows + open source is not always pleasant 21 | shell = require('./win32/' + shellLib); 22 | } catch (err) { 23 | console.error(err); 24 | throw new Error('execSync incompatible with installed nodejs'); 25 | } 26 | } 27 | } 28 | 29 | if (!shell) { 30 | shell = require('./build/Release/shell'); 31 | } 32 | 33 | /** 34 | * Runs `cmd` synchronously returning the exit code. 35 | */ 36 | function run(cmd) { 37 | try { 38 | if (isWindows) 39 | cmd = 'cmd /C ' + cmd; 40 | var code = shell.exec(cmd); 41 | return code; 42 | } catch (err) { 43 | if (err) { 44 | console.error(err) 45 | } 46 | return 1; 47 | } 48 | } 49 | 50 | 51 | /** 52 | * Executes `command` synchronously capturing the output. 53 | * 54 | * This is a wrapper around `run` function. 55 | */ 56 | function exec(command) { 57 | var tempName = temp.path({suffix: '.exec'}); 58 | var cmd; 59 | if (isWindows) 60 | cmd = command + ' > ' + tempName + ' 2>&1'; 61 | else 62 | cmd = '(' + command + ') > ' + tempName + ' 2>&1'; 63 | 64 | var code = run(cmd); 65 | var text; 66 | 67 | if (fs.existsSync(tempName)) { 68 | try { 69 | text = fs.readFileSync(tempName, 'utf8'); 70 | fs.unlink(tempName); 71 | } catch (err) { 72 | throw new Error('ERROR: could not delete capture file'); 73 | } 74 | } else { 75 | throw new Error('ERROR: output not captured'); 76 | } 77 | 78 | return { 79 | code: code, 80 | stdout: text 81 | } 82 | } 83 | 84 | module.exports = { 85 | run: run, 86 | exec: exec 87 | }; 88 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/optionator/node_modules/prelude-ls/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "prelude-ls", 3 | "version": "1.1.2", 4 | "author": { 5 | "name": "George Zahariev", 6 | "email": "z@georgezahariev.com" 7 | }, 8 | "description": "prelude.ls is a functionally oriented utility library. It is powerful and flexible. Almost all of its functions are curried. It is written in, and is the recommended base library for, LiveScript.", 9 | "keywords": [ 10 | "prelude", 11 | "livescript", 12 | "utility", 13 | "ls", 14 | "coffeescript", 15 | "javascript", 16 | "library", 17 | "functional", 18 | "array", 19 | "list", 20 | "object", 21 | "string" 22 | ], 23 | "main": "lib/", 24 | "files": [ 25 | "lib/", 26 | "README.md", 27 | "LICENSE" 28 | ], 29 | "homepage": "http://preludels.com", 30 | "bugs": { 31 | "url": "https://github.com/gkz/prelude-ls/issues" 32 | }, 33 | "licenses": [ 34 | { 35 | "type": "MIT", 36 | "url": "https://raw.github.com/gkz/prelude-ls/master/LICENSE" 37 | } 38 | ], 39 | "engines": { 40 | "node": ">= 0.8.0" 41 | }, 42 | "repository": { 43 | "type": "git", 44 | "url": "git://github.com/gkz/prelude-ls.git" 45 | }, 46 | "scripts": { 47 | "test": "make test" 48 | }, 49 | "devDependencies": { 50 | "livescript": "~1.4.0", 51 | "uglify-js": "~2.4.12", 52 | "mocha": "~2.2.4", 53 | "istanbul": "~0.2.4", 54 | "browserify": "~3.24.13", 55 | "sinon": "~1.10.2" 56 | }, 57 | "readme": "# prelude.ls [![Build Status](https://travis-ci.org/gkz/prelude-ls.png?branch=master)](https://travis-ci.org/gkz/prelude-ls)\n\nis a functionally oriented utility library. It is powerful and flexible. Almost all of its functions are curried. It is written in, and is the recommended base library for, LiveScript.\n\nSee **[the prelude.ls site](http://preludels.com)** for examples, a reference, and more.\n\nYou can install via npm `npm install prelude-ls`\n\n### Development\n\n`make test` to test\n\n`make build` to build `lib` from `src`\n\n`make build-browser` to build browser versions\n", 58 | "readmeFilename": "README.md", 59 | "_id": "prelude-ls@1.1.2", 60 | "_shasum": "21932a549f5e52ffd9a827f570e04be62a97da54", 61 | "_from": "prelude-ls@~1.1.1", 62 | "_resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz" 63 | } 64 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/optionator/node_modules/prelude-ls/lib/Str.js: -------------------------------------------------------------------------------- 1 | // Generated by LiveScript 1.4.0 2 | var split, join, lines, unlines, words, unwords, chars, unchars, reverse, repeat, capitalize, camelize, dasherize; 3 | split = curry$(function(sep, str){ 4 | return str.split(sep); 5 | }); 6 | join = curry$(function(sep, xs){ 7 | return xs.join(sep); 8 | }); 9 | lines = function(str){ 10 | if (!str.length) { 11 | return []; 12 | } 13 | return str.split('\n'); 14 | }; 15 | unlines = function(it){ 16 | return it.join('\n'); 17 | }; 18 | words = function(str){ 19 | if (!str.length) { 20 | return []; 21 | } 22 | return str.split(/[ ]+/); 23 | }; 24 | unwords = function(it){ 25 | return it.join(' '); 26 | }; 27 | chars = function(it){ 28 | return it.split(''); 29 | }; 30 | unchars = function(it){ 31 | return it.join(''); 32 | }; 33 | reverse = function(str){ 34 | return str.split('').reverse().join(''); 35 | }; 36 | repeat = curry$(function(n, str){ 37 | var result, i$; 38 | result = ''; 39 | for (i$ = 0; i$ < n; ++i$) { 40 | result += str; 41 | } 42 | return result; 43 | }); 44 | capitalize = function(str){ 45 | return str.charAt(0).toUpperCase() + str.slice(1); 46 | }; 47 | camelize = function(it){ 48 | return it.replace(/[-_]+(.)?/g, function(arg$, c){ 49 | return (c != null ? c : '').toUpperCase(); 50 | }); 51 | }; 52 | dasherize = function(str){ 53 | return str.replace(/([^-A-Z])([A-Z]+)/g, function(arg$, lower, upper){ 54 | return lower + "-" + (upper.length > 1 55 | ? upper 56 | : upper.toLowerCase()); 57 | }).replace(/^([A-Z]+)/, function(arg$, upper){ 58 | if (upper.length > 1) { 59 | return upper + "-"; 60 | } else { 61 | return upper.toLowerCase(); 62 | } 63 | }); 64 | }; 65 | module.exports = { 66 | split: split, 67 | join: join, 68 | lines: lines, 69 | unlines: unlines, 70 | words: words, 71 | unwords: unwords, 72 | chars: chars, 73 | unchars: unchars, 74 | reverse: reverse, 75 | repeat: repeat, 76 | capitalize: capitalize, 77 | camelize: camelize, 78 | dasherize: dasherize 79 | }; 80 | function curry$(f, bound){ 81 | var context, 82 | _curry = function(args) { 83 | return f.length > 1 ? function(){ 84 | var params = args ? args.concat() : []; 85 | context = bound ? context || this : this; 86 | return params.push.apply(params, arguments) < 87 | f.length && arguments.length ? 88 | _curry.call(context, params) : f.apply(context, params); 89 | } : f; 90 | }; 91 | return _curry(); 92 | } -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "escodegen", 3 | "description": "ECMAScript code generator", 4 | "homepage": "http://github.com/estools/escodegen", 5 | "main": "escodegen.js", 6 | "bin": { 7 | "esgenerate": "./bin/esgenerate.js", 8 | "escodegen": "./bin/escodegen.js" 9 | }, 10 | "files": [ 11 | "LICENSE.BSD", 12 | "LICENSE.source-map", 13 | "README.md", 14 | "bin", 15 | "escodegen.js", 16 | "package.json" 17 | ], 18 | "version": "1.6.1", 19 | "engines": { 20 | "node": ">=0.10.0" 21 | }, 22 | "maintainers": [ 23 | { 24 | "name": "constellation", 25 | "email": "utatane.tea@gmail.com" 26 | } 27 | ], 28 | "repository": { 29 | "type": "git", 30 | "url": "http://github.com/estools/escodegen.git" 31 | }, 32 | "dependencies": { 33 | "estraverse": "^1.9.1", 34 | "esutils": "^1.1.6", 35 | "esprima": "^1.2.2", 36 | "optionator": "^0.5.0", 37 | "source-map": "~0.1.40" 38 | }, 39 | "optionalDependencies": { 40 | "source-map": "~0.1.40" 41 | }, 42 | "devDependencies": { 43 | "acorn-6to5": "^0.11.1-25", 44 | "bluebird": "^2.3.11", 45 | "bower-registry-client": "^0.2.1", 46 | "chai": "^1.10.0", 47 | "commonjs-everywhere": "^0.9.7", 48 | "esprima-moz": "*", 49 | "gulp": "^3.8.10", 50 | "gulp-eslint": "^0.2.0", 51 | "gulp-mocha": "^2.0.0", 52 | "semver": "^4.1.0" 53 | }, 54 | "licenses": [ 55 | { 56 | "type": "BSD", 57 | "url": "http://github.com/estools/escodegen/raw/master/LICENSE.BSD" 58 | } 59 | ], 60 | "scripts": { 61 | "test": "gulp travis", 62 | "unit-test": "gulp test", 63 | "lint": "gulp lint", 64 | "release": "node tools/release.js", 65 | "build-min": "cjsify -ma path: tools/entry-point.js > escodegen.browser.min.js", 66 | "build": "cjsify -a path: tools/entry-point.js > escodegen.browser.js" 67 | }, 68 | "gitHead": "1ca664f68dcf220b76c9dc562b2337c5e0b4227d", 69 | "bugs": { 70 | "url": "https://github.com/estools/escodegen/issues" 71 | }, 72 | "_id": "escodegen@1.6.1", 73 | "_shasum": "367de17d8510540d12bc6dcb8b3f918391265815", 74 | "_from": "escodegen@1.6.1", 75 | "_npmVersion": "2.0.0-alpha-5", 76 | "_npmUser": { 77 | "name": "constellation", 78 | "email": "utatane.tea@gmail.com" 79 | }, 80 | "dist": { 81 | "shasum": "367de17d8510540d12bc6dcb8b3f918391265815", 82 | "tarball": "http://registry.npmjs.org/escodegen/-/escodegen-1.6.1.tgz" 83 | }, 84 | "directories": {}, 85 | "_resolved": "http://registry.npmjs.org/escodegen/-/escodegen-1.6.1.tgz" 86 | } 87 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/esprima/test/run.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2012 Yusuke Suzuki 3 | Copyright (C) 2012 Ariya Hidayat 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY 18 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | /*jslint node:true */ 27 | 28 | (function () { 29 | 'use strict'; 30 | 31 | var child = require('child_process'), 32 | nodejs = '"' + process.execPath + '"', 33 | ret = 0, 34 | suites, 35 | index; 36 | 37 | suites = [ 38 | 'runner', 39 | 'parselibs' 40 | ]; 41 | 42 | function nextTest() { 43 | var suite = suites[index]; 44 | 45 | if (index < suites.length) { 46 | child.exec(nodejs + ' ./test/' + suite + '.js', function (err, stdout, stderr) { 47 | if (stdout) { 48 | process.stdout.write(suite + ': ' + stdout); 49 | } 50 | if (stderr) { 51 | process.stderr.write(suite + ': ' + stderr); 52 | } 53 | if (err) { 54 | ret = err.code; 55 | } 56 | index += 1; 57 | nextTest(); 58 | }); 59 | } else { 60 | process.exit(ret); 61 | } 62 | } 63 | 64 | index = 0; 65 | nextTest(); 66 | }()); 67 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/optionator/node_modules/wordwrap/index.js: -------------------------------------------------------------------------------- 1 | var wordwrap = module.exports = function (start, stop, params) { 2 | if (typeof start === 'object') { 3 | params = start; 4 | start = params.start; 5 | stop = params.stop; 6 | } 7 | 8 | if (typeof stop === 'object') { 9 | params = stop; 10 | start = start || params.start; 11 | stop = undefined; 12 | } 13 | 14 | if (!stop) { 15 | stop = start; 16 | start = 0; 17 | } 18 | 19 | if (!params) params = {}; 20 | var mode = params.mode || 'soft'; 21 | var re = mode === 'hard' ? /\b/ : /(\S+\s+)/; 22 | 23 | return function (text) { 24 | var chunks = text.toString() 25 | .split(re) 26 | .reduce(function (acc, x) { 27 | if (mode === 'hard') { 28 | for (var i = 0; i < x.length; i += stop - start) { 29 | acc.push(x.slice(i, i + stop - start)); 30 | } 31 | } 32 | else acc.push(x) 33 | return acc; 34 | }, []) 35 | ; 36 | 37 | return chunks.reduce(function (lines, rawChunk) { 38 | if (rawChunk === '') return lines; 39 | 40 | var chunk = rawChunk.replace(/\t/g, ' '); 41 | 42 | var i = lines.length - 1; 43 | if (lines[i].length + chunk.length > stop) { 44 | lines[i] = lines[i].replace(/\s+$/, ''); 45 | 46 | chunk.split(/\n/).forEach(function (c) { 47 | lines.push( 48 | new Array(start + 1).join(' ') 49 | + c.replace(/^\s+/, '') 50 | ); 51 | }); 52 | } 53 | else if (chunk.match(/\n/)) { 54 | var xs = chunk.split(/\n/); 55 | lines[i] += xs.shift(); 56 | xs.forEach(function (c) { 57 | lines.push( 58 | new Array(start + 1).join(' ') 59 | + c.replace(/^\s+/, '') 60 | ); 61 | }); 62 | } 63 | else { 64 | lines[i] += chunk; 65 | } 66 | 67 | return lines; 68 | }, [ new Array(start + 1).join(' ') ]).join('\n'); 69 | }; 70 | }; 71 | 72 | wordwrap.soft = wordwrap; 73 | 74 | wordwrap.hard = function (start, stop) { 75 | return wordwrap(start, stop, { mode : 'hard' }); 76 | }; 77 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/esprima/test/run.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2012 Yusuke Suzuki 3 | Copyright (C) 2012 Ariya Hidayat 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY 18 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | /*jslint node:true */ 27 | 28 | (function () { 29 | 'use strict'; 30 | 31 | var child = require('child_process'), 32 | nodejs = '"' + process.execPath + '"', 33 | ret = 0, 34 | suites, 35 | index; 36 | 37 | suites = [ 38 | 'runner', 39 | 'compat', 40 | 'parselibs' 41 | ]; 42 | 43 | function nextTest() { 44 | var suite = suites[index]; 45 | 46 | if (index < suites.length) { 47 | child.exec(nodejs + ' ./test/' + suite + '.js', function (err, stdout, stderr) { 48 | if (stdout) { 49 | process.stdout.write(suite + ': ' + stdout); 50 | } 51 | if (stderr) { 52 | process.stderr.write(suite + ': ' + stderr); 53 | } 54 | if (err) { 55 | ret = err.code; 56 | } 57 | index += 1; 58 | nextTest(); 59 | }); 60 | } else { 61 | process.exit(ret); 62 | } 63 | } 64 | 65 | index = 0; 66 | nextTest(); 67 | }()); 68 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/bin/esgenerate.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | /* 3 | Copyright (C) 2012 Yusuke Suzuki 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY 18 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | /*jslint sloppy:true node:true */ 27 | 28 | var fs = require('fs'), 29 | path = require('path'), 30 | root = path.join(path.dirname(fs.realpathSync(__filename)), '..'), 31 | escodegen = require(root), 32 | optionator = require('optionator')({ 33 | prepend: 'Usage: esgenerate [options] file.json ...', 34 | options: [ 35 | { 36 | option: 'config', 37 | alias: 'c', 38 | type: 'String', 39 | description: 'configuration json for escodegen' 40 | } 41 | ] 42 | }), 43 | args = optionator.parse(process.argv), 44 | files = args._, 45 | options; 46 | 47 | if (files.length === 0) { 48 | console.log(optionator.generateHelp()); 49 | process.exit(1); 50 | } 51 | 52 | if (args.config) { 53 | try { 54 | options = JSON.parse(fs.readFileSync(args.config, 'utf-8')) 55 | } catch (err) { 56 | console.error('Error parsing config: ', err); 57 | } 58 | } 59 | 60 | files.forEach(function (filename) { 61 | var content = fs.readFileSync(filename, 'utf-8'); 62 | console.log(escodegen.generate(JSON.parse(content), options)); 63 | }); 64 | /* vim: set sw=4 ts=4 et tw=80 : */ 65 | -------------------------------------------------------------------------------- /tests/README: -------------------------------------------------------------------------------- 1 | JS Trace Test Suite 2 | 3 | * PURPOSE 4 | 5 | This is a test suite for testing TraceMonkey. All tests are run in the JS shell 6 | with tracing enabled (-j). 7 | 8 | * REQUIREMENTS 9 | 10 | Python 2.5. This is already a standard requirement for building our tree. 11 | 12 | * RUNNING THE TESTS 13 | 14 | Basic usage: 15 | 16 | python jit_test.py 17 | 18 | The progress bar shows [#tests passed, #tests failed, #tests run] at the left. 19 | If all tests pass, the output is 'PASSED ALL'. The test suite can be interrupted 20 | at any time with Ctrl+C and partial results will be printed. 21 | 22 | To run only the basic tests, not including the slow tests: 23 | 24 | python jit_test.py basic 25 | 26 | For more options: 27 | 28 | python jit_test.py -h 29 | 30 | * CREATING NEW TESTS 31 | 32 | Simply create a JS file under the 'tests/' directory. Most tests should go in 33 | 'tests/basic/'. 34 | 35 | All tests are run with 'lib/prologue.js' included first on the command line. The 36 | command line also creates a global variable 'libdir' that is set to the path 37 | of the 'lib' directory. To include a file 'foo.js' from the lib directory in a 38 | test case: 39 | 40 | load(libdir + 'foo.js') 41 | 42 | * TEST METALINES 43 | 44 | The first line of a test case can contain a special comment controlling how the 45 | test is run. For example: 46 | 47 | // |jit-test| allow-oom; 48 | 49 | The general format in EBNF is: 50 | 51 | metaline ::= cookie { item ";" } 52 | cookie ::= "|jit-test|" 53 | item ::= flag | attribute 54 | 55 | flag ::= "slow" | "allow-oom" | "valgrind" | "tz-pacific" | 56 | "ion-eager" | "debug" | 57 | "dump-bytecode" | 58 | 59 | 60 | attribute ::= name ":" value 61 | name ::= "error" | "exitstatus" 62 | value ::= 63 | 64 | The metaline may appear anywhere in the first line of the file: this allows it 65 | to be placed inside any kind of comment. 66 | 67 | The meaning of the items: 68 | 69 | slow Test runs slowly. Do not run if the --no-slow option is given. 70 | allow-oom If the test runs out of memory, it counts as passing. 71 | valgrind Run test under valgrind. 72 | tz-pacific Always run test with the Pacific time zone (TZ=PST8PDT). 73 | ion-eager Run js with --ion-eager, whether --jitflags says to or not 74 | debug Run js with -d, whether --jitflags says to or not 75 | dump-bytecode Run js with -D, whether --jitflags says to or not 76 | 77 | error The test should be considered to pass iff it throws the 78 | given JS exception. 79 | exitstatus The test should exit with the given status value (an integer). 80 | 81 | * END 82 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/execSync/node_modules/temp/test/temp-test.js: -------------------------------------------------------------------------------- 1 | var assert = require('assert'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var util = require('util'); 5 | 6 | var temp = require('../lib/temp'); 7 | 8 | var existsSync = function(path){ 9 | try { 10 | fs.statSync(path); 11 | return true; 12 | } catch (e){ 13 | return false; 14 | } 15 | }; 16 | 17 | var mkdirFired = false; 18 | var mkdirPath = null; 19 | temp.mkdir('foo', function(err, tpath) { 20 | mkdirFired = true; 21 | assert.ok(!err, "temp.mkdir did not execute without errors"); 22 | assert.ok(path.basename(tpath).slice(0, 3) == 'foo', 'temp.mkdir did not use the prefix'); 23 | fs.exists(tpath, function(exists) { 24 | assert.ok(exists, 'temp.mkdir did not create the directory'); 25 | }); 26 | 27 | fs.writeFileSync(path.join(tpath, 'a file'), 'a content'); 28 | temp.cleanup(); 29 | fs.exists(tpath, function(exists) { 30 | assert.ok(!exists, 'temp.cleanup did not remove the directory'); 31 | }); 32 | 33 | mkdirPath = tpath; 34 | util.log("mkdir " + mkdirPath); 35 | }); 36 | 37 | var openFired = false; 38 | var openPath = null; 39 | temp.open('bar', function(err, info) { 40 | openFired = true; 41 | assert.equal('object', typeof(info), "temp.open did not invoke the callback with the err and info object"); 42 | assert.equal('number', typeof(info.fd), 'temp.open did not invoke the callback with an fd'); 43 | fs.writeSync(info.fd, 'foo'); 44 | fs.closeSync(info.fd); 45 | assert.equal('string', typeof(info.path), 'temp.open did not invoke the callback with a path'); 46 | assert.ok(existsSync(info.path), 'temp.open did not create a file'); 47 | 48 | temp.cleanup(); 49 | fs.exists(info.path, function(exists) { 50 | assert.ok(!exists, 'temp.cleanup did not remove the file'); 51 | }); 52 | 53 | openPath = info.path; 54 | util.log("open " + openPath); 55 | }); 56 | 57 | 58 | var stream = temp.createWriteStream('baz'); 59 | assert.ok(stream instanceof fs.WriteStream, "temp.createWriteStream did not invoke the callback with the err and stream object"); 60 | stream.write('foo'); 61 | stream.end(); 62 | assert.ok(existsSync(stream.path), 'temp.createWriteStream did not create a file'); 63 | 64 | temp.cleanup(); 65 | fs.exists(stream.path, function(exists) { 66 | assert.ok(!exists, 'temp.cleanup did not remove the createWriteStream file'); 67 | }); 68 | 69 | util.log("createWriteStream " + stream.path); 70 | 71 | 72 | for (var i=0; i <= 10; i++) { 73 | temp.openSync(); 74 | }; 75 | assert.equal(process.listeners('exit').length, 1, 'temp created more than one listener for exit'); 76 | 77 | process.addListener('exit', function() { 78 | assert.ok(mkdirFired, "temp.mkdir callback did not fire"); 79 | assert.ok(openFired, "temp.open callback did not fire"); 80 | }); 81 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/esprima/ChangeLog: -------------------------------------------------------------------------------- 1 | 2015-03-03: Version 1.2.5 2 | 3 | * Fix scanning of implicit octal literals (issue 565) 4 | 5 | 2015-02-05: Version 1.2.4 6 | 7 | * Fix parsing of LeftHandSideExpression in ForInStatement (issue 560) 8 | * Fix the handling of automatic semicolon insertion (issue 574) 9 | 10 | 2015-01-18: Version 1.2.3 11 | 12 | * Fix division by this (issue 616) 13 | 14 | 2014-05-18: Version 1.2.2 15 | 16 | * Fix duplicated tokens when collecting comments (issue 537) 17 | 18 | 2014-05-04: Version 1.2.1 19 | 20 | * Ensure that Program node may still have leading comments (issue 536) 21 | 22 | 2014-04-29: Version 1.2.0 23 | 24 | * Fix semicolon handling for expression statement (issue 462, 533) 25 | * Disallow escaped characters in regular expression flags (issue 503) 26 | * Performance improvement for location tracking (issue 520) 27 | * Improve the speed of comment attachment (issue 522) 28 | 29 | 2014-03-26: Version 1.1.1 30 | 31 | * Fix token handling of forward slash after an array literal (issue 512) 32 | 33 | 2014-03-23: Version 1.1.0 34 | 35 | * Optionally attach comments to the owning syntax nodes (issue 197) 36 | * Simplify binary parsing with stack-based shift reduce (issue 352) 37 | * Always include the raw source of literals (issue 376) 38 | * Add optional input source information (issue 386) 39 | * Tokenizer API for pure lexical scanning (issue 398) 40 | * Improve the web site and its online demos (issue 337, 400, 404) 41 | * Performance improvement for location tracking (issue 417, 424) 42 | * Support HTML comment syntax (issue 451) 43 | * Drop support for legacy browsers (issue 474) 44 | 45 | 2013-08-27: Version 1.0.4 46 | 47 | * Minimize the payload for packages (issue 362) 48 | * Fix missing cases on an empty switch statement (issue 436) 49 | * Support escaped ] in regexp literal character classes (issue 442) 50 | * Tolerate invalid left-hand side expression (issue 130) 51 | 52 | 2013-05-17: Version 1.0.3 53 | 54 | * Variable declaration needs at least one declarator (issue 391) 55 | * Fix benchmark's variance unit conversion (issue 397) 56 | * IE < 9: \v should be treated as vertical tab (issue 405) 57 | * Unary expressions should always have prefix: true (issue 418) 58 | * Catch clause should only accept an identifier (issue 423) 59 | * Tolerate setters without parameter (issue 426) 60 | 61 | 2012-11-02: Version 1.0.2 62 | 63 | Improvement: 64 | 65 | * Fix esvalidate JUnit output upon a syntax error (issue 374) 66 | 67 | 2012-10-28: Version 1.0.1 68 | 69 | Improvements: 70 | 71 | * esvalidate understands shebang in a Unix shell script (issue 361) 72 | * esvalidate treats fatal parsing failure as an error (issue 361) 73 | * Reduce Node.js package via .npmignore (issue 362) 74 | 75 | 2012-10-22: Version 1.0.0 76 | 77 | Initial release. 78 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/esprima/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "esprima", 3 | "description": "ECMAScript parsing infrastructure for multipurpose analysis", 4 | "homepage": "http://esprima.org", 5 | "main": "esprima.js", 6 | "bin": { 7 | "esparse": "./bin/esparse.js", 8 | "esvalidate": "./bin/esvalidate.js" 9 | }, 10 | "version": "2.2.0", 11 | "files": [ 12 | "bin", 13 | "test/run.js", 14 | "test/runner.js", 15 | "test/test.js", 16 | "esprima.js" 17 | ], 18 | "engines": { 19 | "node": ">=0.4.0" 20 | }, 21 | "author": { 22 | "name": "Ariya Hidayat", 23 | "email": "ariya.hidayat@gmail.com" 24 | }, 25 | "maintainers": [ 26 | { 27 | "name": "ariya", 28 | "email": "ariya.hidayat@gmail.com" 29 | } 30 | ], 31 | "repository": { 32 | "type": "git", 33 | "url": "https://github.com/jquery/esprima.git" 34 | }, 35 | "bugs": { 36 | "url": "http://issues.esprima.org" 37 | }, 38 | "licenses": [ 39 | { 40 | "type": "BSD", 41 | "url": "https://github.com/jquery/esprima/raw/master/LICENSE.BSD" 42 | } 43 | ], 44 | "devDependencies": { 45 | "eslint": "~0.19.0", 46 | "jscs": "~1.12.0", 47 | "istanbul": "~0.3.7", 48 | "escomplex-js": "1.2.0", 49 | "complexity-report": "~1.4.0", 50 | "regenerate": "~0.6.2", 51 | "unicode-7.0.0": "~0.1.5", 52 | "json-diff": "~0.3.1", 53 | "optimist": "~0.6.0" 54 | }, 55 | "keywords": [ 56 | "ast", 57 | "ecmascript", 58 | "javascript", 59 | "parser", 60 | "syntax" 61 | ], 62 | "scripts": { 63 | "generate-regex": "node tools/generate-identifier-regex.js", 64 | "test": "node test/run.js && npm run lint && npm run coverage", 65 | "lint": "npm run check-version && npm run eslint && npm run jscs && npm run complexity", 66 | "check-version": "node tools/check-version.js", 67 | "jscs": "jscs esprima.js", 68 | "eslint": "node node_modules/eslint/bin/eslint.js esprima.js", 69 | "complexity": "node tools/list-complexity.js && cr -s -l -w --maxcyc 17 esprima.js", 70 | "coverage": "npm run analyze-coverage && npm run check-coverage", 71 | "analyze-coverage": "istanbul cover test/runner.js", 72 | "check-coverage": "istanbul check-coverage --statement 100 --branch 100 --function 100", 73 | "benchmark": "node test/benchmarks.js", 74 | "benchmark-quick": "node test/benchmarks.js quick" 75 | }, 76 | "gitHead": "deef03ca006b03912d9f74b041f9239a9045181f", 77 | "_id": "esprima@2.2.0", 78 | "_shasum": "4292c1d68e4173d815fa2290dc7afc96d81fcd83", 79 | "_from": "esprima@2.2.0", 80 | "_npmVersion": "2.5.1", 81 | "_nodeVersion": "0.12.0", 82 | "_npmUser": { 83 | "name": "ariya", 84 | "email": "ariya.hidayat@gmail.com" 85 | }, 86 | "dist": { 87 | "shasum": "4292c1d68e4173d815fa2290dc7afc96d81fcd83", 88 | "tarball": "http://registry.npmjs.org/esprima/-/esprima-2.2.0.tgz" 89 | }, 90 | "directories": {}, 91 | "_resolved": "http://registry.npmjs.org/esprima/-/esprima-2.2.0.tgz" 92 | } 93 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/source-map/lib/source-map/mapping-list.js: -------------------------------------------------------------------------------- 1 | /* -*- Mode: js; js-indent-level: 2; -*- */ 2 | /* 3 | * Copyright 2014 Mozilla Foundation and contributors 4 | * Licensed under the New BSD license. See LICENSE or: 5 | * http://opensource.org/licenses/BSD-3-Clause 6 | */ 7 | if (typeof define !== 'function') { 8 | var define = require('amdefine')(module, require); 9 | } 10 | define(function (require, exports, module) { 11 | 12 | var util = require('./util'); 13 | 14 | /** 15 | * Determine whether mappingB is after mappingA with respect to generated 16 | * position. 17 | */ 18 | function generatedPositionAfter(mappingA, mappingB) { 19 | // Optimized for most common case 20 | var lineA = mappingA.generatedLine; 21 | var lineB = mappingB.generatedLine; 22 | var columnA = mappingA.generatedColumn; 23 | var columnB = mappingB.generatedColumn; 24 | return lineB > lineA || lineB == lineA && columnB >= columnA || 25 | util.compareByGeneratedPositions(mappingA, mappingB) <= 0; 26 | } 27 | 28 | /** 29 | * A data structure to provide a sorted view of accumulated mappings in a 30 | * performance conscious manner. It trades a neglibable overhead in general 31 | * case for a large speedup in case of mappings being added in order. 32 | */ 33 | function MappingList() { 34 | this._array = []; 35 | this._sorted = true; 36 | // Serves as infimum 37 | this._last = {generatedLine: -1, generatedColumn: 0}; 38 | } 39 | 40 | /** 41 | * Iterate through internal items. This method takes the same arguments that 42 | * `Array.prototype.forEach` takes. 43 | * 44 | * NOTE: The order of the mappings is NOT guaranteed. 45 | */ 46 | MappingList.prototype.unsortedForEach = 47 | function MappingList_forEach(aCallback, aThisArg) { 48 | this._array.forEach(aCallback, aThisArg); 49 | }; 50 | 51 | /** 52 | * Add the given source mapping. 53 | * 54 | * @param Object aMapping 55 | */ 56 | MappingList.prototype.add = function MappingList_add(aMapping) { 57 | var mapping; 58 | if (generatedPositionAfter(this._last, aMapping)) { 59 | this._last = aMapping; 60 | this._array.push(aMapping); 61 | } else { 62 | this._sorted = false; 63 | this._array.push(aMapping); 64 | } 65 | }; 66 | 67 | /** 68 | * Returns the flat, sorted array of mappings. The mappings are sorted by 69 | * generated position. 70 | * 71 | * WARNING: This method returns internal data without copying, for 72 | * performance. The return value must NOT be mutated, and should be treated as 73 | * an immutable borrow. If you want to take ownership, you must make your own 74 | * copy. 75 | */ 76 | MappingList.prototype.toArray = function MappingList_toArray() { 77 | if (!this._sorted) { 78 | this._array.sort(util.compareByGeneratedPositions); 79 | this._sorted = true; 80 | } 81 | return this._array; 82 | }; 83 | 84 | exports.MappingList = MappingList; 85 | 86 | }); 87 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/bin/escodegen.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | /* 3 | Copyright (C) 2012 Yusuke Suzuki 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY 18 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | /*jslint sloppy:true node:true */ 27 | 28 | var fs = require('fs'), 29 | path = require('path'), 30 | root = path.join(path.dirname(fs.realpathSync(__filename)), '..'), 31 | esprima = require('esprima'), 32 | escodegen = require(root), 33 | optionator = require('optionator')({ 34 | prepend: 'Usage: escodegen [options] file...', 35 | options: [ 36 | { 37 | option: 'config', 38 | alias: 'c', 39 | type: 'String', 40 | description: 'configuration json for escodegen' 41 | } 42 | ] 43 | }), 44 | args = optionator.parse(process.argv), 45 | files = args._, 46 | options, 47 | esprimaOptions = { 48 | raw: true, 49 | tokens: true, 50 | range: true, 51 | comment: true 52 | }; 53 | 54 | if (files.length === 0) { 55 | console.log(optionator.generateHelp()); 56 | process.exit(1); 57 | } 58 | 59 | if (args.config) { 60 | try { 61 | options = JSON.parse(fs.readFileSync(args.config, 'utf-8')); 62 | } catch (err) { 63 | console.error('Error parsing config: ', err); 64 | } 65 | } 66 | 67 | files.forEach(function (filename) { 68 | var content = fs.readFileSync(filename, 'utf-8'), 69 | syntax = esprima.parse(content, esprimaOptions); 70 | 71 | if (options.comment) { 72 | escodegen.attachComments(syntax, syntax.comments, syntax.tokens); 73 | } 74 | 75 | console.log(escodegen.generate(syntax, options)); 76 | }); 77 | /* vim: set sw=4 ts=4 et tw=80 : */ 78 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/estraverse/gulpfile.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2014 Yusuke Suzuki 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | 13 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' 14 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY 17 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 18 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 19 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 20 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 22 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 | */ 24 | 25 | 'use strict'; 26 | 27 | var gulp = require('gulp'), 28 | git = require('gulp-git'), 29 | bump = require('gulp-bump'), 30 | filter = require('gulp-filter'), 31 | tagVersion = require('gulp-tag-version'); 32 | 33 | var TEST = [ 'test/*.js' ]; 34 | var POWERED = [ 'powered-test/*.js' ]; 35 | var SOURCE = [ 'src/**/*.js' ]; 36 | 37 | /** 38 | * Bumping version number and tagging the repository with it. 39 | * Please read http://semver.org/ 40 | * 41 | * You can use the commands 42 | * 43 | * gulp patch # makes v0.1.0 -> v0.1.1 44 | * gulp feature # makes v0.1.1 -> v0.2.0 45 | * gulp release # makes v0.2.1 -> v1.0.0 46 | * 47 | * To bump the version numbers accordingly after you did a patch, 48 | * introduced a feature or made a backwards-incompatible release. 49 | */ 50 | 51 | function inc(importance) { 52 | // get all the files to bump version in 53 | return gulp.src(['./package.json']) 54 | // bump the version number in those files 55 | .pipe(bump({type: importance})) 56 | // save it back to filesystem 57 | .pipe(gulp.dest('./')) 58 | // commit the changed version number 59 | .pipe(git.commit('Bumps package version')) 60 | // read only one file to get the version number 61 | .pipe(filter('package.json')) 62 | // **tag it in the repository** 63 | .pipe(tagVersion({ 64 | prefix: '' 65 | })); 66 | } 67 | 68 | gulp.task('patch', [ ], function () { return inc('patch'); }) 69 | gulp.task('minor', [ ], function () { return inc('minor'); }) 70 | gulp.task('major', [ ], function () { return inc('major'); }) 71 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/estraverse/gulpfile.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2014 Yusuke Suzuki 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | 13 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' 14 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY 17 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 18 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 19 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 20 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 22 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 | */ 24 | 25 | 'use strict'; 26 | 27 | var gulp = require('gulp'), 28 | git = require('gulp-git'), 29 | bump = require('gulp-bump'), 30 | filter = require('gulp-filter'), 31 | tagVersion = require('gulp-tag-version'); 32 | 33 | var TEST = [ 'test/*.js' ]; 34 | var POWERED = [ 'powered-test/*.js' ]; 35 | var SOURCE = [ 'src/**/*.js' ]; 36 | 37 | /** 38 | * Bumping version number and tagging the repository with it. 39 | * Please read http://semver.org/ 40 | * 41 | * You can use the commands 42 | * 43 | * gulp patch # makes v0.1.0 -> v0.1.1 44 | * gulp feature # makes v0.1.1 -> v0.2.0 45 | * gulp release # makes v0.2.1 -> v1.0.0 46 | * 47 | * To bump the version numbers accordingly after you did a patch, 48 | * introduced a feature or made a backwards-incompatible release. 49 | */ 50 | 51 | function inc(importance) { 52 | // get all the files to bump version in 53 | return gulp.src(['./package.json']) 54 | // bump the version number in those files 55 | .pipe(bump({type: importance})) 56 | // save it back to filesystem 57 | .pipe(gulp.dest('./')) 58 | // commit the changed version number 59 | .pipe(git.commit('Bumps package version')) 60 | // read only one file to get the version number 61 | .pipe(filter('package.json')) 62 | // **tag it in the repository** 63 | .pipe(tagVersion({ 64 | prefix: '' 65 | })); 66 | } 67 | 68 | gulp.task('patch', [ ], function () { return inc('patch'); }) 69 | gulp.task('minor', [ ], function () { return inc('minor'); }) 70 | gulp.task('major', [ ], function () { return inc('major'); }) 71 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/LICENSE: -------------------------------------------------------------------------------- 1 | amdefine is released under two licenses: new BSD, and MIT. You may pick the 2 | license that best suits your development needs. The text of both licenses are 3 | provided below. 4 | 5 | 6 | The "New" BSD License: 7 | ---------------------- 8 | 9 | Copyright (c) 2011-2015, The Dojo Foundation 10 | All rights reserved. 11 | 12 | Redistribution and use in source and binary forms, with or without 13 | modification, are permitted provided that the following conditions are met: 14 | 15 | * Redistributions of source code must retain the above copyright notice, this 16 | list of conditions and the following disclaimer. 17 | * Redistributions in binary form must reproduce the above copyright notice, 18 | this list of conditions and the following disclaimer in the documentation 19 | and/or other materials provided with the distribution. 20 | * Neither the name of the Dojo Foundation nor the names of its contributors 21 | may be used to endorse or promote products derived from this software 22 | without specific prior written permission. 23 | 24 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 25 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 26 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 27 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 28 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 30 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 31 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 32 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 33 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | 35 | 36 | 37 | MIT License 38 | ----------- 39 | 40 | Copyright (c) 2011-2015, The Dojo Foundation 41 | 42 | Permission is hereby granted, free of charge, to any person obtaining a copy 43 | of this software and associated documentation files (the "Software"), to deal 44 | in the Software without restriction, including without limitation the rights 45 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 46 | copies of the Software, and to permit persons to whom the Software is 47 | furnished to do so, subject to the following conditions: 48 | 49 | The above copyright notice and this permission notice shall be included in 50 | all copies or substantial portions of the Software. 51 | 52 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 53 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 54 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 55 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 56 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 57 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 58 | THE SOFTWARE. 59 | -------------------------------------------------------------------------------- /tests/tasks_win.py: -------------------------------------------------------------------------------- 1 | # Multiprocess activities with a push-driven divide-process-collect model. 2 | 3 | from __future__ import print_function 4 | 5 | from threading import Thread, Lock 6 | from Queue import Queue, Empty 7 | from datetime import datetime 8 | 9 | class Source: 10 | def __init__(self, task_list, results, timeout, verbose=False): 11 | self.tasks = Queue() 12 | for task in task_list: 13 | self.tasks.put_nowait(task) 14 | 15 | self.results = results 16 | self.timeout = timeout 17 | self.verbose = verbose 18 | 19 | def start(self, worker_count): 20 | t0 = datetime.now() 21 | 22 | sink = Sink(self.results) 23 | self.workers = [Worker(_ + 1, self.tasks, sink, self.timeout, 24 | self.verbose) 25 | for _ in range(worker_count)] 26 | if self.verbose: 27 | print('[P] Starting workers.') 28 | for w in self.workers: 29 | w.t0 = t0 30 | w.start() 31 | ans = self.join_workers() 32 | if self.verbose: 33 | print('[P] Finished.') 34 | return ans 35 | 36 | def join_workers(self): 37 | try: 38 | for w in self.workers: 39 | w.join(20000) 40 | return True 41 | except KeyboardInterrupt: 42 | for w in self.workers: 43 | w.stop = True 44 | return False 45 | 46 | class Sink: 47 | def __init__(self, results): 48 | self.results = results 49 | self.lock = Lock() 50 | 51 | def push(self, result): 52 | self.lock.acquire() 53 | try: 54 | self.results.push(result) 55 | finally: 56 | self.lock.release() 57 | 58 | class Worker(Thread): 59 | def __init__(self, id, tasks, sink, timeout, verbose): 60 | Thread.__init__(self) 61 | self.setDaemon(True) 62 | self.id = id 63 | self.tasks = tasks 64 | self.sink = sink 65 | self.timeout = timeout 66 | self.verbose = verbose 67 | 68 | self.thread = None 69 | self.stop = False 70 | self.t0 = 0 71 | 72 | def log(self, msg): 73 | if self.verbose: 74 | dd = datetime.now() - self.t0 75 | dt = dd.seconds + 1e-6 * dd.microseconds 76 | print('[W{:d} {:.3f}] {}'.format(self.id, dt, msg)) 77 | 78 | def run(self): 79 | try: 80 | while True: 81 | if self.stop: 82 | break 83 | self.log('Get next task.') 84 | task = self.tasks.get(False) 85 | self.log('Start task {}.'.format(str(task))) 86 | result = task.run(task.js_cmd_prefix, self.timeout) 87 | self.log('Finished task.') 88 | self.sink.push(result) 89 | self.log('Pushed result.') 90 | except Empty: 91 | pass 92 | 93 | def run_all_tests(tests, results, options): 94 | pipeline = Source(tests, results, options.timeout, False) 95 | return pipeline.start(options.worker_count) 96 | 97 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/source-map/lib/source-map/array-set.js: -------------------------------------------------------------------------------- 1 | /* -*- Mode: js; js-indent-level: 2; -*- */ 2 | /* 3 | * Copyright 2011 Mozilla Foundation and contributors 4 | * Licensed under the New BSD license. See LICENSE or: 5 | * http://opensource.org/licenses/BSD-3-Clause 6 | */ 7 | if (typeof define !== 'function') { 8 | var define = require('amdefine')(module, require); 9 | } 10 | define(function (require, exports, module) { 11 | 12 | var util = require('./util'); 13 | 14 | /** 15 | * A data structure which is a combination of an array and a set. Adding a new 16 | * member is O(1), testing for membership is O(1), and finding the index of an 17 | * element is O(1). Removing elements from the set is not supported. Only 18 | * strings are supported for membership. 19 | */ 20 | function ArraySet() { 21 | this._array = []; 22 | this._set = {}; 23 | } 24 | 25 | /** 26 | * Static method for creating ArraySet instances from an existing array. 27 | */ 28 | ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { 29 | var set = new ArraySet(); 30 | for (var i = 0, len = aArray.length; i < len; i++) { 31 | set.add(aArray[i], aAllowDuplicates); 32 | } 33 | return set; 34 | }; 35 | 36 | /** 37 | * Add the given string to this set. 38 | * 39 | * @param String aStr 40 | */ 41 | ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { 42 | var isDuplicate = this.has(aStr); 43 | var idx = this._array.length; 44 | if (!isDuplicate || aAllowDuplicates) { 45 | this._array.push(aStr); 46 | } 47 | if (!isDuplicate) { 48 | this._set[util.toSetString(aStr)] = idx; 49 | } 50 | }; 51 | 52 | /** 53 | * Is the given string a member of this set? 54 | * 55 | * @param String aStr 56 | */ 57 | ArraySet.prototype.has = function ArraySet_has(aStr) { 58 | return Object.prototype.hasOwnProperty.call(this._set, 59 | util.toSetString(aStr)); 60 | }; 61 | 62 | /** 63 | * What is the index of the given string in the array? 64 | * 65 | * @param String aStr 66 | */ 67 | ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { 68 | if (this.has(aStr)) { 69 | return this._set[util.toSetString(aStr)]; 70 | } 71 | throw new Error('"' + aStr + '" is not in the set.'); 72 | }; 73 | 74 | /** 75 | * What is the element at the given index? 76 | * 77 | * @param Number aIdx 78 | */ 79 | ArraySet.prototype.at = function ArraySet_at(aIdx) { 80 | if (aIdx >= 0 && aIdx < this._array.length) { 81 | return this._array[aIdx]; 82 | } 83 | throw new Error('No element indexed by ' + aIdx); 84 | }; 85 | 86 | /** 87 | * Returns the array representation of this set (which has the proper indices 88 | * indicated by indexOf). Note that this is a copy of the internal array used 89 | * for storing the members so that no one can mess with internal state. 90 | */ 91 | ArraySet.prototype.toArray = function ArraySet_toArray() { 92 | return this._array.slice(); 93 | }; 94 | 95 | exports.ArraySet = ArraySet; 96 | 97 | }); 98 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/optionator/node_modules/deep-is/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "deep-is", 3 | "version": "0.1.3", 4 | "description": "node's assert.deepEqual algorithm except for NaN being equal to NaN", 5 | "main": "index.js", 6 | "directories": { 7 | "lib": ".", 8 | "example": "example", 9 | "test": "test" 10 | }, 11 | "scripts": { 12 | "test": "tape test/*.js" 13 | }, 14 | "devDependencies": { 15 | "tape": "~1.0.2" 16 | }, 17 | "repository": { 18 | "type": "git", 19 | "url": "http://github.com/thlorenz/deep-is.git" 20 | }, 21 | "keywords": [ 22 | "equality", 23 | "equal", 24 | "compare" 25 | ], 26 | "author": { 27 | "name": "Thorsten Lorenz", 28 | "email": "thlorenz@gmx.de", 29 | "url": "http://thlorenz.com" 30 | }, 31 | "license": { 32 | "type": "MIT", 33 | "url": "https://github.com/thlorenz/deep-is/blob/master/LICENSE" 34 | }, 35 | "testling": { 36 | "files": "test/*.js", 37 | "browsers": { 38 | "ie": [ 39 | 6, 40 | 7, 41 | 8, 42 | 9 43 | ], 44 | "ff": [ 45 | 3.5, 46 | 10, 47 | 15 48 | ], 49 | "chrome": [ 50 | 10, 51 | 22 52 | ], 53 | "safari": [ 54 | 5.1 55 | ], 56 | "opera": [ 57 | 12 58 | ] 59 | } 60 | }, 61 | "readme": "deep-is\n==========\n\nNode's `assert.deepEqual() algorithm` as a standalone module. Exactly like\n[deep-equal](https://github.com/substack/node-deep-equal) except for the fact that `deepEqual(NaN, NaN) === true`.\n\nThis module is around [5 times faster](https://gist.github.com/2790507)\nthan wrapping `assert.deepEqual()` in a `try/catch`.\n\n[![browser support](http://ci.testling.com/thlorenz/deep-is.png)](http://ci.testling.com/thlorenz/deep-is)\n\n[![build status](https://secure.travis-ci.org/thlorenz/deep-is.png)](http://travis-ci.org/thlorenz/deep-is)\n\nexample\n=======\n\n``` js\nvar equal = require('deep-is');\nconsole.dir([\n equal(\n { a : [ 2, 3 ], b : [ 4 ] },\n { a : [ 2, 3 ], b : [ 4 ] }\n ),\n equal(\n { x : 5, y : [6] },\n { x : 5, y : 6 }\n )\n]);\n```\n\nmethods\n=======\n\nvar deepIs = require('deep-is')\n\ndeepIs(a, b)\n---------------\n\nCompare objects `a` and `b`, returning whether they are equal according to a\nrecursive equality algorithm.\n\ninstall\n=======\n\nWith [npm](http://npmjs.org) do:\n\n```\nnpm install deep-is\n```\n\ntest\n====\n\nWith [npm](http://npmjs.org) do:\n\n```\nnpm test\n```\n\nlicense\n=======\n\nCopyright (c) 2012, 2013 Thorsten Lorenz \nCopyright (c) 2012 James Halliday \n\nDerived largely from node's assert module, which has the copyright statement:\n\nCopyright (c) 2009 Thomas Robinson <280north.com>\n\nReleased under the MIT license, see LICENSE for details.\n", 62 | "readmeFilename": "README.markdown", 63 | "bugs": { 64 | "url": "https://github.com/thlorenz/deep-is/issues" 65 | }, 66 | "_id": "deep-is@0.1.3", 67 | "_shasum": "b369d6fb5dbc13eecf524f91b070feedc357cf34", 68 | "_from": "deep-is@~0.1.2", 69 | "_resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz" 70 | } 71 | -------------------------------------------------------------------------------- /langparser/Java8.tokens: -------------------------------------------------------------------------------- 1 | ABSTRACT=1 2 | ASSERT=2 3 | BOOLEAN=3 4 | BREAK=4 5 | BYTE=5 6 | CASE=6 7 | CATCH=7 8 | CHAR=8 9 | CLASS=9 10 | CONST=10 11 | CONTINUE=11 12 | DEFAULT=12 13 | DO=13 14 | DOUBLE=14 15 | ELSE=15 16 | ENUM=16 17 | EXTENDS=17 18 | FINAL=18 19 | FINALLY=19 20 | FLOAT=20 21 | FOR=21 22 | IF=22 23 | GOTO=23 24 | IMPLEMENTS=24 25 | IMPORT=25 26 | INSTANCEOF=26 27 | INT=27 28 | INTERFACE=28 29 | LONG=29 30 | NATIVE=30 31 | NEW=31 32 | PACKAGE=32 33 | PRIVATE=33 34 | PROTECTED=34 35 | PUBLIC=35 36 | RETURN=36 37 | SHORT=37 38 | STATIC=38 39 | STRICTFP=39 40 | SUPER=40 41 | SWITCH=41 42 | SYNCHRONIZED=42 43 | THIS=43 44 | THROW=44 45 | THROWS=45 46 | TRANSIENT=46 47 | TRY=47 48 | VOID=48 49 | VOLATILE=49 50 | WHILE=50 51 | IntegerLiteral=51 52 | FloatingPointLiteral=52 53 | BooleanLiteral=53 54 | CharacterLiteral=54 55 | StringLiteral=55 56 | NullLiteral=56 57 | LPAREN=57 58 | RPAREN=58 59 | LBRACE=59 60 | RBRACE=60 61 | LBRACK=61 62 | RBRACK=62 63 | SEMI=63 64 | COMMA=64 65 | DOT=65 66 | ASSIGN=66 67 | GT=67 68 | LT=68 69 | BANG=69 70 | TILDE=70 71 | QUESTION=71 72 | COLON=72 73 | EQUAL=73 74 | LE=74 75 | GE=75 76 | NOTEQUAL=76 77 | AND=77 78 | OR=78 79 | INC=79 80 | DEC=80 81 | ADD=81 82 | SUB=82 83 | MUL=83 84 | DIV=84 85 | BITAND=85 86 | BITOR=86 87 | CARET=87 88 | MOD=88 89 | ARROW=89 90 | COLONCOLON=90 91 | ADD_ASSIGN=91 92 | SUB_ASSIGN=92 93 | MUL_ASSIGN=93 94 | DIV_ASSIGN=94 95 | AND_ASSIGN=95 96 | OR_ASSIGN=96 97 | XOR_ASSIGN=97 98 | MOD_ASSIGN=98 99 | LSHIFT_ASSIGN=99 100 | RSHIFT_ASSIGN=100 101 | URSHIFT_ASSIGN=101 102 | Identifier=102 103 | AT=103 104 | ELLIPSIS=104 105 | WS=105 106 | COMMENT=106 107 | LINE_COMMENT=107 108 | 'abstract'=1 109 | 'assert'=2 110 | 'boolean'=3 111 | 'break'=4 112 | 'byte'=5 113 | 'case'=6 114 | 'catch'=7 115 | 'char'=8 116 | 'class'=9 117 | 'const'=10 118 | 'continue'=11 119 | 'default'=12 120 | 'do'=13 121 | 'double'=14 122 | 'else'=15 123 | 'enum'=16 124 | 'extends'=17 125 | 'final'=18 126 | 'finally'=19 127 | 'float'=20 128 | 'for'=21 129 | 'if'=22 130 | 'goto'=23 131 | 'implements'=24 132 | 'import'=25 133 | 'instanceof'=26 134 | 'int'=27 135 | 'interface'=28 136 | 'long'=29 137 | 'native'=30 138 | 'new'=31 139 | 'package'=32 140 | 'private'=33 141 | 'protected'=34 142 | 'public'=35 143 | 'return'=36 144 | 'short'=37 145 | 'static'=38 146 | 'strictfp'=39 147 | 'super'=40 148 | 'switch'=41 149 | 'synchronized'=42 150 | 'this'=43 151 | 'throw'=44 152 | 'throws'=45 153 | 'transient'=46 154 | 'try'=47 155 | 'void'=48 156 | 'volatile'=49 157 | 'while'=50 158 | 'null'=56 159 | '('=57 160 | ')'=58 161 | '{'=59 162 | '}'=60 163 | '['=61 164 | ']'=62 165 | ';'=63 166 | ','=64 167 | '.'=65 168 | '='=66 169 | '>'=67 170 | '<'=68 171 | '!'=69 172 | '~'=70 173 | '?'=71 174 | ':'=72 175 | '=='=73 176 | '<='=74 177 | '>='=75 178 | '!='=76 179 | '&&'=77 180 | '||'=78 181 | '++'=79 182 | '--'=80 183 | '+'=81 184 | '-'=82 185 | '*'=83 186 | '/'=84 187 | '&'=85 188 | '|'=86 189 | '^'=87 190 | '%'=88 191 | '->'=89 192 | '::'=90 193 | '+='=91 194 | '-='=92 195 | '*='=93 196 | '/='=94 197 | '&='=95 198 | '|='=96 199 | '^='=97 200 | '%='=98 201 | '<<='=99 202 | '>>='=100 203 | '>>>='=101 204 | '@'=103 205 | '...'=104 206 | -------------------------------------------------------------------------------- /langparser/Java8Lexer.tokens: -------------------------------------------------------------------------------- 1 | ABSTRACT=1 2 | ASSERT=2 3 | BOOLEAN=3 4 | BREAK=4 5 | BYTE=5 6 | CASE=6 7 | CATCH=7 8 | CHAR=8 9 | CLASS=9 10 | CONST=10 11 | CONTINUE=11 12 | DEFAULT=12 13 | DO=13 14 | DOUBLE=14 15 | ELSE=15 16 | ENUM=16 17 | EXTENDS=17 18 | FINAL=18 19 | FINALLY=19 20 | FLOAT=20 21 | FOR=21 22 | IF=22 23 | GOTO=23 24 | IMPLEMENTS=24 25 | IMPORT=25 26 | INSTANCEOF=26 27 | INT=27 28 | INTERFACE=28 29 | LONG=29 30 | NATIVE=30 31 | NEW=31 32 | PACKAGE=32 33 | PRIVATE=33 34 | PROTECTED=34 35 | PUBLIC=35 36 | RETURN=36 37 | SHORT=37 38 | STATIC=38 39 | STRICTFP=39 40 | SUPER=40 41 | SWITCH=41 42 | SYNCHRONIZED=42 43 | THIS=43 44 | THROW=44 45 | THROWS=45 46 | TRANSIENT=46 47 | TRY=47 48 | VOID=48 49 | VOLATILE=49 50 | WHILE=50 51 | IntegerLiteral=51 52 | FloatingPointLiteral=52 53 | BooleanLiteral=53 54 | CharacterLiteral=54 55 | StringLiteral=55 56 | NullLiteral=56 57 | LPAREN=57 58 | RPAREN=58 59 | LBRACE=59 60 | RBRACE=60 61 | LBRACK=61 62 | RBRACK=62 63 | SEMI=63 64 | COMMA=64 65 | DOT=65 66 | ASSIGN=66 67 | GT=67 68 | LT=68 69 | BANG=69 70 | TILDE=70 71 | QUESTION=71 72 | COLON=72 73 | EQUAL=73 74 | LE=74 75 | GE=75 76 | NOTEQUAL=76 77 | AND=77 78 | OR=78 79 | INC=79 80 | DEC=80 81 | ADD=81 82 | SUB=82 83 | MUL=83 84 | DIV=84 85 | BITAND=85 86 | BITOR=86 87 | CARET=87 88 | MOD=88 89 | ARROW=89 90 | COLONCOLON=90 91 | ADD_ASSIGN=91 92 | SUB_ASSIGN=92 93 | MUL_ASSIGN=93 94 | DIV_ASSIGN=94 95 | AND_ASSIGN=95 96 | OR_ASSIGN=96 97 | XOR_ASSIGN=97 98 | MOD_ASSIGN=98 99 | LSHIFT_ASSIGN=99 100 | RSHIFT_ASSIGN=100 101 | URSHIFT_ASSIGN=101 102 | Identifier=102 103 | AT=103 104 | ELLIPSIS=104 105 | WS=105 106 | COMMENT=106 107 | LINE_COMMENT=107 108 | 'abstract'=1 109 | 'assert'=2 110 | 'boolean'=3 111 | 'break'=4 112 | 'byte'=5 113 | 'case'=6 114 | 'catch'=7 115 | 'char'=8 116 | 'class'=9 117 | 'const'=10 118 | 'continue'=11 119 | 'default'=12 120 | 'do'=13 121 | 'double'=14 122 | 'else'=15 123 | 'enum'=16 124 | 'extends'=17 125 | 'final'=18 126 | 'finally'=19 127 | 'float'=20 128 | 'for'=21 129 | 'if'=22 130 | 'goto'=23 131 | 'implements'=24 132 | 'import'=25 133 | 'instanceof'=26 134 | 'int'=27 135 | 'interface'=28 136 | 'long'=29 137 | 'native'=30 138 | 'new'=31 139 | 'package'=32 140 | 'private'=33 141 | 'protected'=34 142 | 'public'=35 143 | 'return'=36 144 | 'short'=37 145 | 'static'=38 146 | 'strictfp'=39 147 | 'super'=40 148 | 'switch'=41 149 | 'synchronized'=42 150 | 'this'=43 151 | 'throw'=44 152 | 'throws'=45 153 | 'transient'=46 154 | 'try'=47 155 | 'void'=48 156 | 'volatile'=49 157 | 'while'=50 158 | 'null'=56 159 | '('=57 160 | ')'=58 161 | '{'=59 162 | '}'=60 163 | '['=61 164 | ']'=62 165 | ';'=63 166 | ','=64 167 | '.'=65 168 | '='=66 169 | '>'=67 170 | '<'=68 171 | '!'=69 172 | '~'=70 173 | '?'=71 174 | ':'=72 175 | '=='=73 176 | '<='=74 177 | '>='=75 178 | '!='=76 179 | '&&'=77 180 | '||'=78 181 | '++'=79 182 | '--'=80 183 | '+'=81 184 | '-'=82 185 | '*'=83 186 | '/'=84 187 | '&'=85 188 | '|'=86 189 | '^'=87 190 | '%'=88 191 | '->'=89 192 | '::'=90 193 | '+='=91 194 | '-='=92 195 | '*='=93 196 | '/='=94 197 | '&='=95 198 | '|='=96 199 | '^='=97 200 | '%='=98 201 | '<<='=99 202 | '>>='=100 203 | '>>>='=101 204 | '@'=103 205 | '...'=104 206 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/optionator/node_modules/prelude-ls/lib/Num.js: -------------------------------------------------------------------------------- 1 | // Generated by LiveScript 1.4.0 2 | var max, min, negate, abs, signum, quot, rem, div, mod, recip, pi, tau, exp, sqrt, ln, pow, sin, tan, cos, asin, acos, atan, atan2, truncate, round, ceiling, floor, isItNaN, even, odd, gcd, lcm; 3 | max = curry$(function(x$, y$){ 4 | return x$ > y$ ? x$ : y$; 5 | }); 6 | min = curry$(function(x$, y$){ 7 | return x$ < y$ ? x$ : y$; 8 | }); 9 | negate = function(x){ 10 | return -x; 11 | }; 12 | abs = Math.abs; 13 | signum = function(x){ 14 | if (x < 0) { 15 | return -1; 16 | } else if (x > 0) { 17 | return 1; 18 | } else { 19 | return 0; 20 | } 21 | }; 22 | quot = curry$(function(x, y){ 23 | return ~~(x / y); 24 | }); 25 | rem = curry$(function(x$, y$){ 26 | return x$ % y$; 27 | }); 28 | div = curry$(function(x, y){ 29 | return Math.floor(x / y); 30 | }); 31 | mod = curry$(function(x$, y$){ 32 | var ref$; 33 | return (((x$) % (ref$ = y$) + ref$) % ref$); 34 | }); 35 | recip = (function(it){ 36 | return 1 / it; 37 | }); 38 | pi = Math.PI; 39 | tau = pi * 2; 40 | exp = Math.exp; 41 | sqrt = Math.sqrt; 42 | ln = Math.log; 43 | pow = curry$(function(x$, y$){ 44 | return Math.pow(x$, y$); 45 | }); 46 | sin = Math.sin; 47 | tan = Math.tan; 48 | cos = Math.cos; 49 | asin = Math.asin; 50 | acos = Math.acos; 51 | atan = Math.atan; 52 | atan2 = curry$(function(x, y){ 53 | return Math.atan2(x, y); 54 | }); 55 | truncate = function(x){ 56 | return ~~x; 57 | }; 58 | round = Math.round; 59 | ceiling = Math.ceil; 60 | floor = Math.floor; 61 | isItNaN = function(x){ 62 | return x !== x; 63 | }; 64 | even = function(x){ 65 | return x % 2 === 0; 66 | }; 67 | odd = function(x){ 68 | return x % 2 !== 0; 69 | }; 70 | gcd = curry$(function(x, y){ 71 | var z; 72 | x = Math.abs(x); 73 | y = Math.abs(y); 74 | while (y !== 0) { 75 | z = x % y; 76 | x = y; 77 | y = z; 78 | } 79 | return x; 80 | }); 81 | lcm = curry$(function(x, y){ 82 | return Math.abs(Math.floor(x / gcd(x, y) * y)); 83 | }); 84 | module.exports = { 85 | max: max, 86 | min: min, 87 | negate: negate, 88 | abs: abs, 89 | signum: signum, 90 | quot: quot, 91 | rem: rem, 92 | div: div, 93 | mod: mod, 94 | recip: recip, 95 | pi: pi, 96 | tau: tau, 97 | exp: exp, 98 | sqrt: sqrt, 99 | ln: ln, 100 | pow: pow, 101 | sin: sin, 102 | tan: tan, 103 | cos: cos, 104 | acos: acos, 105 | asin: asin, 106 | atan: atan, 107 | atan2: atan2, 108 | truncate: truncate, 109 | round: round, 110 | ceiling: ceiling, 111 | floor: floor, 112 | isItNaN: isItNaN, 113 | even: even, 114 | odd: odd, 115 | gcd: gcd, 116 | lcm: lcm 117 | }; 118 | function curry$(f, bound){ 119 | var context, 120 | _curry = function(args) { 121 | return f.length > 1 ? function(){ 122 | var params = args ? args.concat() : []; 123 | context = bound ? context || this : this; 124 | return params.push.apply(params, arguments) < 125 | f.length && arguments.length ? 126 | _curry.call(context, params) : f.apply(context, params); 127 | } : f; 128 | }; 129 | return _curry(); 130 | } -------------------------------------------------------------------------------- /ConfigFilev.properties: -------------------------------------------------------------------------------- 1 | [Mappings] 2 | mappings.logfile = CodegenLog.log 3 | loglevel = 20 4 | 5 | [Testsuite] 6 | TESTSUITE = /home/rubbernecker/jsengines/v8/test 7 | 8 | [Interpreter] 9 | SHELL_PATH=/home/rubbernecker/jsengines/v8/out/arm.debug/d8,/home/rubbernecker/jsengines/v8/out/arm.release/d8,/home/rubbernecker/jsengines/v8/out/ia32.debug/d8,/home/rubbernecker/jsengines/v8/out/ia32.release/d8,/home/rubbernecker/jsengines/v8/out/x64.debug/d8,/home/rubbernecker/jsengines/v8/out/x64.release/d8 10 | SHELL_OPTIONS= , --debug-code --expose-gc 11 | SHELL_RETURN_CODES=0,1 12 | SHELL_FILE_SPECIFIER= 13 | FILE_TYPE=.js 14 | LIB_FILE=assert.js 15 | METRICS_NON_TEMINALS=iterationStatement:1,functionExpression:1,caseClauses:1,ifStatement:1,functionDeclaration:1 16 | GLOBALOBJ=toLocaleString,Uint32Array,Generator,SyntaxError,Math,getOwnPropertySymbols,Object,String,BoundTargetFunction,has,preventExtensions,valueOf,defineProperties,get,big,getPrototypeOf,parseFloat,Iterator,CreateUnmappedArgumentsObject,Float32Array,CreateHTML,IntegerIndexedObjectCreate,small,EvalError,fixed,set,freeze,escape,defineProperty,toGMTString,encodeURI,sub,ownKeys,InternalError,ArraySetLength,Float64Array,toString,sup,WeakSet,CreateBuiltinFunction,propertyIsEnumerable,bold,ParallelArray,RegExp,WeakMap,deleteProperty,GeneratorFunction,TypeError,unescape,ArrayBuffer,length,Promise,constructor,assign,isSealed,Int32Array,isExtensible,blink,StopIteration,substr,enumerate,parseInt,apply,MakeArgSetter,Infinity,Date,create,Int8Array,Uint8Array,construct,isFinite,RangeError,JSON,call,getYear,prototype,uneval,getOwnPropertyDescriptor,strike,decodeURIComponent,fontsize,hasOwnProperty,Error,Set,decodeURI,MakeArgGetter,isPrototypeOf,Number,Uint16Array,compile,ArraySpeciesCreate,BoundArguments,URIError,anchor,is,seal,ArrayCreate,NativeError,null,getOwnPropertyNames,Function,Map,isNaN,DataView,NaN,StringGetIndexProperty,isFrozen,Reflect,Proxy,setPrototypeOf,Uint8ClampedArray,keys,Symbol,eval,Int16Array,ReferenceError,StringCreate,italics,undefined,bind,CreateMappedArgumentsObject,Boolean,setYear,link,Array,encodeURIComponent,BoundThis,__proto__ 17 | SELECTEDNT=statement,classElement,classDeclaration,expression,assignmentExpression,statementList,catchProduction,finallyProduction,conditionalExpression,callExpression,newExpression,memberExpression,primaryExpression,functionExpression,literal,identifierName,objectLiteral,arrayLiteral,assignmentOperator,stringLiteral,numericLiteral,RegularExpressionLiteral,reservedWord,keyword,futureReservedWord 18 | 19 | [TargetDir] 20 | TARGETDIR=generated 21 | DATABASE=database 22 | BUGSDIR=Bugs 23 | FILELIST = filelist.lst 24 | 25 | [Options] 26 | POPULATION_SIZE=300 27 | INTERPRETER_TIMEOUT=3 28 | MAX_GENERATIONS=100 29 | GRAMMAR_FILE=langparser/JavaScript.g4 30 | MIN_GENE_LENGTH=20 31 | MAX_GENE_LENGTH=2000 32 | WRAP=True 33 | MAX_PROGRAM_LENGTH=500 34 | FITNESS_TYPE=max 35 | MAX_FITNESS_VALUE=10000 36 | FITNESS_FAIL=-1000 37 | CROSSOVER_RATE=0.6 38 | MUTATION_RATE=0.4 39 | MAX_DEPTH_EXPANSION=3 40 | GENERATIVE_PROBABILITY=0.5 41 | CHILDREN_PER_CROSSOVER=2 42 | MUTATION_TYPE=s 43 | MULTIPLE_MUTATION_COUNT=3 44 | MULTIPLE_CROSSOVER_COUNT=3 45 | MULTIPLE_RATE=0.5 46 | MAX_FITNESS_INDV_RATE=0.04 47 | REPLACEMENT_TOURNAMENT_SIZE=3 48 | MAINTAIN_HISTORY=False 49 | EXTEND_GENOTYPE=True 50 | DYNAMIC_MUTATION_RATE=1 51 | DYNAMIC_CROSSOVER_RATE=1 52 | CROSSOVER_BIAS_RATE=115 53 | 54 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/esprima/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "esprima", 3 | "description": "ECMAScript parsing infrastructure for multipurpose analysis", 4 | "homepage": "http://esprima.org", 5 | "main": "esprima.js", 6 | "bin": { 7 | "esparse": "./bin/esparse.js", 8 | "esvalidate": "./bin/esvalidate.js" 9 | }, 10 | "version": "1.2.5", 11 | "files": [ 12 | "bin", 13 | "test/run.js", 14 | "test/runner.js", 15 | "test/test.js", 16 | "test/compat.js", 17 | "test/reflect.js", 18 | "esprima.js" 19 | ], 20 | "engines": { 21 | "node": ">=0.4.0" 22 | }, 23 | "author": { 24 | "name": "Ariya Hidayat", 25 | "email": "ariya.hidayat@gmail.com" 26 | }, 27 | "maintainers": [ 28 | { 29 | "name": "ariya", 30 | "email": "ariya.hidayat@gmail.com" 31 | } 32 | ], 33 | "repository": { 34 | "type": "git", 35 | "url": "http://github.com/ariya/esprima.git" 36 | }, 37 | "bugs": { 38 | "url": "http://issues.esprima.org" 39 | }, 40 | "licenses": [ 41 | { 42 | "type": "BSD", 43 | "url": "http://github.com/ariya/esprima/raw/master/LICENSE.BSD" 44 | } 45 | ], 46 | "devDependencies": { 47 | "jslint": "~0.1.9", 48 | "eslint": "~0.4.3", 49 | "jscs": "~1.2.4", 50 | "istanbul": "~0.2.6", 51 | "complexity-report": "~0.6.1", 52 | "regenerate": "~0.5.4", 53 | "unicode-6.3.0": "~0.1.0", 54 | "json-diff": "~0.3.1", 55 | "optimist": "~0.6.0" 56 | }, 57 | "keywords": [ 58 | "ast", 59 | "ecmascript", 60 | "javascript", 61 | "parser", 62 | "syntax" 63 | ], 64 | "scripts": { 65 | "generate-regex": "node tools/generate-identifier-regex.js", 66 | "test": "npm run-script lint && node test/run.js && npm run-script coverage && npm run-script complexity", 67 | "lint": "npm run-script check-version && npm run-script eslint && npm run-script jscs && npm run-script jslint", 68 | "check-version": "node tools/check-version.js", 69 | "eslint": "node node_modules/eslint/bin/eslint.js esprima.js", 70 | "jscs": "node node_modules/jscs/bin/jscs esprima.js", 71 | "jslint": "echo Skipping JSLint", 72 | "coverage": "npm run-script analyze-coverage && npm run-script check-coverage", 73 | "analyze-coverage": "node node_modules/istanbul/lib/cli.js cover test/runner.js", 74 | "check-coverage": "node node_modules/istanbul/lib/cli.js check-coverage --statement 100 --branch 100 --function 100", 75 | "complexity": "npm run-script analyze-complexity && npm run-script check-complexity", 76 | "analyze-complexity": "node tools/list-complexity.js", 77 | "check-complexity": "node node_modules/complexity-report/src/cli.js --maxcc 14 --silent -l -w esprima.js", 78 | "benchmark": "node test/benchmarks.js", 79 | "benchmark-quick": "node test/benchmarks.js quick" 80 | }, 81 | "gitHead": "d3e376f04f096cb07f6b9fad0b44e9b6054f0582", 82 | "_id": "esprima@1.2.5", 83 | "_shasum": "0993502feaf668138325756f30f9a51feeec11e9", 84 | "_from": "esprima@^1.2.2", 85 | "_npmVersion": "2.5.1", 86 | "_nodeVersion": "0.12.0", 87 | "_npmUser": { 88 | "name": "ariya", 89 | "email": "ariya.hidayat@gmail.com" 90 | }, 91 | "dist": { 92 | "shasum": "0993502feaf668138325756f30f9a51feeec11e9", 93 | "tarball": "http://registry.npmjs.org/esprima/-/esprima-1.2.5.tgz" 94 | }, 95 | "directories": {}, 96 | "_resolved": "http://registry.npmjs.org/esprima/-/esprima-1.2.5.tgz" 97 | } 98 | -------------------------------------------------------------------------------- /tests/terminal_win.py: -------------------------------------------------------------------------------- 1 | """ 2 | From Andre Burgaud's Blog, from the CTypes Wiki: 3 | http://www.burgaud.com/bring-colors-to-the-windows-console-with-python/ 4 | 5 | Colors text in console mode application (win32). 6 | Uses ctypes and Win32 methods SetConsoleTextAttribute and 7 | GetConsoleScreenBufferInfo. 8 | 9 | $Id: color_console.py 534 2009-05-10 04:00:59Z andre $ 10 | """ 11 | 12 | from ctypes import windll, Structure, c_short, c_ushort, byref 13 | 14 | SHORT = c_short 15 | WORD = c_ushort 16 | 17 | class COORD(Structure): 18 | """struct in wincon.h.""" 19 | _fields_ = [ 20 | ("X", SHORT), 21 | ("Y", SHORT)] 22 | 23 | class SMALL_RECT(Structure): 24 | """struct in wincon.h.""" 25 | _fields_ = [ 26 | ("Left", SHORT), 27 | ("Top", SHORT), 28 | ("Right", SHORT), 29 | ("Bottom", SHORT)] 30 | 31 | class CONSOLE_SCREEN_BUFFER_INFO(Structure): 32 | """struct in wincon.h.""" 33 | _fields_ = [ 34 | ("dwSize", COORD), 35 | ("dwCursorPosition", COORD), 36 | ("wAttributes", WORD), 37 | ("srWindow", SMALL_RECT), 38 | ("dwMaximumWindowSize", COORD)] 39 | 40 | # winbase.h 41 | STD_INPUT_HANDLE = -10 42 | STD_OUTPUT_HANDLE = -11 43 | STD_ERROR_HANDLE = -12 44 | 45 | # wincon.h 46 | FOREGROUND_BLACK = 0x0000 47 | FOREGROUND_BLUE = 0x0001 48 | FOREGROUND_GREEN = 0x0002 49 | FOREGROUND_CYAN = 0x0003 50 | FOREGROUND_RED = 0x0004 51 | FOREGROUND_MAGENTA = 0x0005 52 | FOREGROUND_YELLOW = 0x0006 53 | FOREGROUND_GREY = 0x0007 54 | FOREGROUND_INTENSITY = 0x0008 # foreground color is intensified. 55 | 56 | BACKGROUND_BLACK = 0x0000 57 | BACKGROUND_BLUE = 0x0010 58 | BACKGROUND_GREEN = 0x0020 59 | BACKGROUND_CYAN = 0x0030 60 | BACKGROUND_RED = 0x0040 61 | BACKGROUND_MAGENTA = 0x0050 62 | BACKGROUND_YELLOW = 0x0060 63 | BACKGROUND_GREY = 0x0070 64 | BACKGROUND_INTENSITY = 0x0080 # background color is intensified. 65 | 66 | stdout_handle = windll.kernel32.GetStdHandle(STD_OUTPUT_HANDLE) 67 | SetConsoleTextAttribute = windll.kernel32.SetConsoleTextAttribute 68 | GetConsoleScreenBufferInfo = windll.kernel32.GetConsoleScreenBufferInfo 69 | 70 | def get_text_attr(): 71 | csbi = CONSOLE_SCREEN_BUFFER_INFO() 72 | GetConsoleScreenBufferInfo(stdout_handle, byref(csbi)) 73 | return csbi.wAttributes 74 | 75 | DEFAULT_COLORS = get_text_attr() 76 | 77 | class Terminal(object): 78 | COLOR = { 79 | 'black': 0x0000, 80 | 'blue': 0x0001, 81 | 'green': 0x0002, 82 | 'cyan': 0x0003, 83 | 'red': 0x0004, 84 | 'magenta': 0x0005, 85 | 'yellow': 0x0006, 86 | 'gray': 0x0007 87 | } 88 | BRIGHT_INTENSITY = 0x0008 89 | BACKGROUND_SHIFT = 4 90 | 91 | @classmethod 92 | def set_color(cls, color): 93 | """ 94 | color: str - color definition string 95 | """ 96 | color_code = 0 97 | if color.startswith('bright'): 98 | color_code |= cls.BRIGHT_INTENSITY 99 | color = color[len('bright'):] 100 | color_code |= Terminal.COLOR[color] 101 | SetConsoleTextAttribute(stdout_handle, color_code) 102 | 103 | @classmethod 104 | def reset_color(cls): 105 | SetConsoleTextAttribute(stdout_handle, DEFAULT_COLORS) 106 | 107 | @classmethod 108 | def clear_right(cls): 109 | pass 110 | -------------------------------------------------------------------------------- /codegen/jsdelta/node_modules/escodegen/node_modules/source-map/lib/source-map/binary-search.js: -------------------------------------------------------------------------------- 1 | /* -*- Mode: js; js-indent-level: 2; -*- */ 2 | /* 3 | * Copyright 2011 Mozilla Foundation and contributors 4 | * Licensed under the New BSD license. See LICENSE or: 5 | * http://opensource.org/licenses/BSD-3-Clause 6 | */ 7 | if (typeof define !== 'function') { 8 | var define = require('amdefine')(module, require); 9 | } 10 | define(function (require, exports, module) { 11 | 12 | /** 13 | * Recursive implementation of binary search. 14 | * 15 | * @param aLow Indices here and lower do not contain the needle. 16 | * @param aHigh Indices here and higher do not contain the needle. 17 | * @param aNeedle The element being searched for. 18 | * @param aHaystack The non-empty array being searched. 19 | * @param aCompare Function which takes two elements and returns -1, 0, or 1. 20 | */ 21 | function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare) { 22 | // This function terminates when one of the following is true: 23 | // 24 | // 1. We find the exact element we are looking for. 25 | // 26 | // 2. We did not find the exact element, but we can return the index of 27 | // the next closest element that is less than that element. 28 | // 29 | // 3. We did not find the exact element, and there is no next-closest 30 | // element which is less than the one we are searching for, so we 31 | // return -1. 32 | var mid = Math.floor((aHigh - aLow) / 2) + aLow; 33 | var cmp = aCompare(aNeedle, aHaystack[mid], true); 34 | if (cmp === 0) { 35 | // Found the element we are looking for. 36 | return mid; 37 | } 38 | else if (cmp > 0) { 39 | // aHaystack[mid] is greater than our needle. 40 | if (aHigh - mid > 1) { 41 | // The element is in the upper half. 42 | return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare); 43 | } 44 | // We did not find an exact match, return the next closest one 45 | // (termination case 2). 46 | return mid; 47 | } 48 | else { 49 | // aHaystack[mid] is less than our needle. 50 | if (mid - aLow > 1) { 51 | // The element is in the lower half. 52 | return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare); 53 | } 54 | // The exact needle element was not found in this haystack. Determine if 55 | // we are in termination case (2) or (3) and return the appropriate thing. 56 | return aLow < 0 ? -1 : aLow; 57 | } 58 | } 59 | 60 | /** 61 | * This is an implementation of binary search which will always try and return 62 | * the index of next lowest value checked if there is no exact hit. This is 63 | * because mappings between original and generated line/col pairs are single 64 | * points, and there is an implicit region between each of them, so a miss 65 | * just means that you aren't on the very start of a region. 66 | * 67 | * @param aNeedle The element you are looking for. 68 | * @param aHaystack The array that is being searched. 69 | * @param aCompare A function which takes the needle and an element in the 70 | * array and returns -1, 0, or 1 depending on whether the needle is less 71 | * than, equal to, or greater than the element, respectively. 72 | */ 73 | exports.search = function search(aNeedle, aHaystack, aCompare) { 74 | if (aHaystack.length === 0) { 75 | return -1; 76 | } 77 | return recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, aCompare) 78 | }; 79 | 80 | }); 81 | -------------------------------------------------------------------------------- /ConfigFile.properties: -------------------------------------------------------------------------------- 1 | [Mappings] 2 | mappings.logfile = CodegenLog.log 3 | loglevel = 20 4 | 5 | [Testsuite] 6 | TESTSUITE = /home/rubbernecker/jsengines/firefox/js/src/tests 7 | 8 | [Interpreter] 9 | SHELL_PATH=/home/rubbernecker/jsengines/firefox/js/src/build1/dist/bin/js,/home/rubbernecker/jsengines/firefox/js/src/build2/dist/bin/js 10 | SHELL_OPTIONS= --fuzzing-safe -f , --ion-eager --ion-offthread-compile=off --fuzzing-safe -f , --ion-eager --ion-offthread-compile=off --non-writable-jitcode --ion-check-range-analysis --ion-extra-checks --no-sse3 --no-threads --fuzzing-safe -f , --baseline-eager --fuzzing-safe -f , --baseline-eager --no-fpu --fuzzing-safe -f , --no-baseline --fuzzing-safe -f , --no-ion --fuzzing-safe -f 11 | SHELL_RETURN_CODES=0,3 12 | SHELL_FILE_SPECIFIER= -f 13 | FILE_TYPE=.js 14 | LIB_FILE=shell.js 15 | IDENTIFIER=identifierName 16 | METRICS_NON_TEMINALS=iterationStatement:1,functionExpression:1,caseClauses:1,ifStatement:1,functionDeclaration:1 17 | GLOBALOBJ=toLocaleString,Uint32Array,Generator,SyntaxError,Math,getOwnPropertySymbols,Object,String,BoundTargetFunction,has,preventExtensions,valueOf,defineProperties,get,big,getPrototypeOf,parseFloat,Iterator,CreateUnmappedArgumentsObject,Float32Array,CreateHTML,IntegerIndexedObjectCreate,small,EvalError,fixed,set,freeze,escape,defineProperty,toGMTString,encodeURI,sub,ownKeys,InternalError,ArraySetLength,Float64Array,toString,sup,WeakSet,CreateBuiltinFunction,propertyIsEnumerable,bold,ParallelArray,RegExp,WeakMap,deleteProperty,GeneratorFunction,TypeError,unescape,ArrayBuffer,length,Promise,constructor,assign,isSealed,Int32Array,isExtensible,blink,StopIteration,substr,enumerate,parseInt,apply,MakeArgSetter,Infinity,Date,create,Int8Array,Uint8Array,construct,isFinite,RangeError,JSON,call,getYear,prototype,uneval,getOwnPropertyDescriptor,strike,decodeURIComponent,fontsize,hasOwnProperty,Error,Set,decodeURI,MakeArgGetter,isPrototypeOf,Number,Uint16Array,compile,ArraySpeciesCreate,BoundArguments,URIError,anchor,is,seal,ArrayCreate,NativeError,null,getOwnPropertyNames,Function,Map,isNaN,DataView,NaN,StringGetIndexProperty,isFrozen,Reflect,Proxy,setPrototypeOf,Uint8ClampedArray,keys,Symbol,eval,Int16Array,ReferenceError,StringCreate,italics,undefined,bind,CreateMappedArgumentsObject,Boolean,setYear,link,Array,encodeURIComponent,BoundThis,__proto__ 18 | SELECTEDNT=statement,classElement,classDeclaration,expression,assignmentExpression,statementList,catchProduction,finallyProduction,conditionalExpression,callExpression,newExpression,memberExpression,primaryExpression,functionExpression,literal,identifierName,objectLiteral,arrayLiteral,assignmentOperator,stringLiteral,numericLiteral,RegularExpressionLiteral,reservedWord,keyword,futureReservedWord 19 | ESCAPEFILELIST=shell.js,browser.js 20 | 21 | [TargetDir] 22 | TARGETDIR=generated 23 | DATABASE=database 24 | BUGSDIR=Bugs 25 | PARSETREES=parsetrees 26 | FILELIST = filelist.lst 27 | 28 | [Options] 29 | POPULATION_SIZE=300 30 | INTERPRETER_TIMEOUT=3 31 | MAX_GENERATIONS=100 32 | GRAMMAR_FILE=langparser/JavaScript.g4 33 | MIN_GENE_LENGTH=20 34 | MAX_GENE_LENGTH=2000 35 | WRAP=True 36 | MAX_PROGRAM_LENGTH=500 37 | FITNESS_TYPE=max 38 | MAX_FITNESS_VALUE=10000 39 | FITNESS_FAIL=-1000 40 | CROSSOVER_RATE=0.7 41 | MUTATION_RATE=0.4 42 | MAX_DEPTH_EXPANSION=3 43 | GENERATIVE_PROBABILITY=0.5 44 | CHILDREN_PER_CROSSOVER=2 45 | MUTATION_TYPE=s 46 | MULTIPLE_MUTATION_COUNT=3 47 | MULTIPLE_CROSSOVER_COUNT=3 48 | MULTIPLE_RATE=0.5 49 | MAX_FITNESS_INDV_RATE=0.04 50 | REPLACEMENT_TOURNAMENT_SIZE=3 51 | MAINTAIN_HISTORY=False 52 | EXTEND_GENOTYPE=True 53 | DYNAMIC_MUTATION_RATE=1 54 | DYNAMIC_CROSSOVER_RATE=1 55 | CROSSOVER_BIAS_RATE=115 56 | 57 | --------------------------------------------------------------------------------