From 32ba8aea0b8c43b63c820ae36671a6ba20361273 Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Sat, 17 Jun 2017 02:51:23 +0200 Subject: [PATCH 001/157] repl: fix old history error handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backport-PR-URL: https://github.com/nodejs/node/pull/14392 Backport-Reviewed-By: James M Snell PR-URL: https://github.com/nodejs/node/pull/13733 Reviewed-By: Luigi Pinca Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Tobias Nießen --- lib/internal/repl.js | 64 +++++++++++-------- .../old-repl-history-file-faulty.json | 1 + test/fixtures/old-repl-history-file-obj.json | 4 ++ test/parallel/test-repl-persistent-history.js | 27 ++++++-- 4 files changed, 67 insertions(+), 29 deletions(-) create mode 100644 test/fixtures/old-repl-history-file-faulty.json create mode 100644 test/fixtures/old-repl-history-file-obj.json diff --git a/lib/internal/repl.js b/lib/internal/repl.js index 4c27fa2746390f..874bfd6fbbd183 100644 --- a/lib/internal/repl.js +++ b/lib/internal/repl.js @@ -15,6 +15,11 @@ module.exports.createInternalRepl = createRepl; // The debounce is to guard against code pasted into the REPL. const kDebounceHistoryMS = 15; +function _writeToOutput(repl, message) { + repl._writeToOutput(message); + repl._refreshLine(); +} + function createRepl(env, opts, cb) { if (typeof opts === 'function') { cb = opts; @@ -80,9 +85,8 @@ function setupHistory(repl, historyPath, oldHistoryPath, ready) { try { historyPath = path.join(os.homedir(), '.node_repl_history'); } catch (err) { - repl._writeToOutput('\nError: Could not get the home directory.\n' + - 'REPL session history will not be persisted.\n'); - repl._refreshLine(); + _writeToOutput(repl, '\nError: Could not get the home directory.\n' + + 'REPL session history will not be persisted.\n'); debug(err.stack); repl._historyPrev = _replHistoryMessage; @@ -103,9 +107,8 @@ function setupHistory(repl, historyPath, oldHistoryPath, ready) { if (err) { // Cannot open history file. // Don't crash, just don't persist history. - repl._writeToOutput('\nError: Could not open history file.\n' + - 'REPL session history will not be persisted.\n'); - repl._refreshLine(); + _writeToOutput(repl, '\nError: Could not open history file.\n' + + 'REPL session history will not be persisted.\n'); debug(err.stack); repl._historyPrev = _replHistoryMessage; @@ -132,18 +135,13 @@ function setupHistory(repl, historyPath, oldHistoryPath, ready) { } else if (oldHistoryPath === historyPath) { // If pre-v3.0, the user had set NODE_REPL_HISTORY_FILE to // ~/.node_repl_history, warn the user about it and proceed. - repl._writeToOutput( - '\nThe old repl history file has the same name and location as ' + + _writeToOutput( + repl, + '\nThe old repl history file has the same name and location as ' + `the new one i.e., ${historyPath} and is empty.\nUsing it as is.\n`); - repl._refreshLine(); } else if (oldHistoryPath) { - // Grab data from the older pre-v3.0 JSON NODE_REPL_HISTORY_FILE format. - repl._writeToOutput( - '\nConverting old JSON repl history to line-separated history.\n' + - `The new repl history file can be found at ${historyPath}.\n`); - repl._refreshLine(); - + let threw = false; try { // Pre-v3.0, repl history was stored as JSON. // Try and convert it to line separated history. @@ -152,15 +150,31 @@ function setupHistory(repl, historyPath, oldHistoryPath, ready) { // Only attempt to use the history if there was any. if (oldReplJSONHistory) repl.history = JSON.parse(oldReplJSONHistory); - if (!Array.isArray(repl.history)) { - throw new Error('Expected array, got ' + typeof repl.history); + if (Array.isArray(repl.history)) { + repl.history = repl.history.slice(0, repl.historySize); + } else { + threw = true; + _writeToOutput( + repl, + '\nError: The old history file data has to be an Array.\n' + + 'REPL session history will not be persisted.\n'); } - repl.history = repl.history.slice(0, repl.historySize); } catch (err) { - if (err.code !== 'ENOENT') { - return ready( - new Error(`Could not parse history data in ${oldHistoryPath}.`)); - } + // Cannot open or parse history file. + // Don't crash, just don't persist history. + threw = true; + const type = err instanceof SyntaxError ? 'parse' : 'open'; + _writeToOutput(repl, `\nError: Could not ${type} old history file.\n` + + 'REPL session history will not be persisted.\n'); + } + if (!threw) { + // Grab data from the older pre-v3.0 JSON NODE_REPL_HISTORY_FILE format. + _writeToOutput( + repl, + '\nConverted old JSON repl history to line-separated history.\n' + + `The new repl history file can be found at ${historyPath}.\n`); + } else { + repl.history = []; } } @@ -223,12 +237,12 @@ function setupHistory(repl, historyPath, oldHistoryPath, ready) { function _replHistoryMessage() { if (this.history.length === 0) { - this._writeToOutput( - '\nPersistent history support disabled. ' + + _writeToOutput( + this, + '\nPersistent history support disabled. ' + 'Set the NODE_REPL_HISTORY environment\nvariable to ' + 'a valid, user-writable path to enable.\n' ); - this._refreshLine(); } this._historyPrev = Interface.prototype._historyPrev; return this._historyPrev(); diff --git a/test/fixtures/old-repl-history-file-faulty.json b/test/fixtures/old-repl-history-file-faulty.json new file mode 100644 index 00000000000000..417b7b5370df81 --- /dev/null +++ b/test/fixtures/old-repl-history-file-faulty.json @@ -0,0 +1 @@ +undefined diff --git a/test/fixtures/old-repl-history-file-obj.json b/test/fixtures/old-repl-history-file-obj.json new file mode 100644 index 00000000000000..43160121b8f9e1 --- /dev/null +++ b/test/fixtures/old-repl-history-file-obj.json @@ -0,0 +1,4 @@ +{ + "a": "'=^.^='", + "b": "'hello world'" +} diff --git a/test/parallel/test-repl-persistent-history.js b/test/parallel/test-repl-persistent-history.js index fe219d716ebf45..8b47cadf11d196 100644 --- a/test/parallel/test-repl-persistent-history.js +++ b/test/parallel/test-repl-persistent-history.js @@ -56,13 +56,19 @@ const prompt = '> '; const replDisabled = '\nPersistent history support disabled. Set the ' + 'NODE_REPL_HISTORY environment\nvariable to a valid, ' + 'user-writable path to enable.\n'; -const convertMsg = '\nConverting old JSON repl history to line-separated ' + +const convertMsg = '\nConverted old JSON repl history to line-separated ' + 'history.\nThe new repl history file can be found at ' + `${path.join(common.tmpDir, '.node_repl_history')}.\n`; const homedirErr = '\nError: Could not get the home directory.\n' + 'REPL session history will not be persisted.\n'; const replFailedRead = '\nError: Could not open history file.\n' + 'REPL session history will not be persisted.\n'; +const oldHistoryFailedOpen = '\nError: Could not open old history file.\n' + + 'REPL session history will not be persisted.\n'; +const oldHistoryFailedParse = '\nError: Could not parse old history file.\n' + + 'REPL session history will not be persisted.\n'; +const oldHistoryObj = '\nError: The old history file data has to be an Array' + + '.\nREPL session history will not be persisted.\n'; const sameHistoryFilePaths = '\nThe old repl history file has the same name ' + 'and location as the new one i.e., ' + path.join(common.tmpDir, '.node_repl_history') + @@ -72,6 +78,10 @@ const fixtures = common.fixturesDir; const historyFixturePath = path.join(fixtures, '.node_repl_history'); const historyPath = path.join(common.tmpDir, '.fixture_copy_repl_history'); const historyPathFail = path.join(common.tmpDir, '.node_repl\u0000_history'); +const oldHistoryPathObj = path.join(fixtures, + 'old-repl-history-file-obj.json'); +const oldHistoryPathFaulty = path.join(fixtures, + 'old-repl-history-file-faulty.json'); const oldHistoryPath = path.join(fixtures, 'old-repl-history-file.json'); const enoentHistoryPath = path.join(fixtures, 'enoent-repl-history-file.json'); const emptyHistoryPath = path.join(fixtures, '.empty-repl-history-file'); @@ -93,10 +103,19 @@ const tests = [ expected: [prompt, replDisabled, prompt] }, { - env: { NODE_REPL_HISTORY: '', - NODE_REPL_HISTORY_FILE: enoentHistoryPath }, + env: { NODE_REPL_HISTORY_FILE: enoentHistoryPath }, test: [UP], - expected: [prompt, replDisabled, prompt] + expected: [prompt, oldHistoryFailedOpen, prompt] + }, + { + env: { NODE_REPL_HISTORY_FILE: oldHistoryPathObj }, + test: [UP], + expected: [prompt, oldHistoryObj, prompt] + }, + { + env: { NODE_REPL_HISTORY_FILE: oldHistoryPathFaulty }, + test: [UP], + expected: [prompt, oldHistoryFailedParse, prompt] }, { env: { NODE_REPL_HISTORY: '', From b5d0a03a9e7d06002baeebd6a2713887ebb208ad Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 15 Jul 2017 07:22:57 -0700 Subject: [PATCH 002/157] test: fix error handling test-http-full-response The way it is currently written, test-http-full-response will fail if there is a problem with spawning that doesn't include `ab` or `api` in `stderr`, but it will fail with a misleading mismatched-calls `common.mustCall()` error. Alter the error handling so that it rethrows the actual error, providing better information. PR-URL: https://github.com/nodejs/node/pull/14252 Reviewed-By: Yuta Hiroto Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: Gibson Fahnestock Reviewed-By: James M Snell --- test/parallel/test-http-full-response.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/parallel/test-http-full-response.js b/test/parallel/test-http-full-response.js index 42213432090355..2f6fc8fc2a176c 100644 --- a/test/parallel/test-http-full-response.js +++ b/test/parallel/test-http-full-response.js @@ -46,8 +46,7 @@ function runAb(opts, callback) { common.printSkipMessage(`problem spawning \`ab\`.\n${stderr}`); process.reallyExit(0); } - process.exit(); - return; + throw err; } let m = /Document Length:\s*(\d+) bytes/i.exec(stdout); From d2121ab768fe2900b71000040821b584ed1e9cdb Mon Sep 17 00:00:00 2001 From: Lance Ball Date: Tue, 18 Jul 2017 15:02:47 -0400 Subject: [PATCH 003/157] doc: fix minor typo in cluster.md Adds a missing `'` in code example. PR-URL: https://github.com/nodejs/node/pull/14353 Fixes: https://github.com/nodejs/node/issues/14352 Reviewed-By: Colin Ihrig Reviewed-By: Gibson Fahnestock Reviewed-By: Luigi Pinca Reviewed-By: Vse Mozhet Byt --- doc/api/cluster.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/cluster.md b/doc/api/cluster.md index 98545edf8bf6c4..278bd31e6fd8ad 100644 --- a/doc/api/cluster.md +++ b/doc/api/cluster.md @@ -191,7 +191,7 @@ added: v0.7.0 Similar to the `cluster.on('message')` event, but specific to this worker. -Within a worker, `process.on('message)` may also be used. +Within a worker, `process.on('message')` may also be used. See [`process` event: `'message'`][]. From 72febfd3b65acc056bd8bd779c593778b7c8e9cc Mon Sep 17 00:00:00 2001 From: SkyAo Date: Sun, 16 Jul 2017 16:54:05 +0800 Subject: [PATCH 004/157] test: replace concatenation with template literals MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use template literals instead of string concatenation in test/parallel/test-http-extra-response.js PR-URL: https://github.com/nodejs/node/pull/14296 Reviewed-By: Rich Trott Reviewed-By: David Cai Reviewed-By: Gibson Fahnestock Reviewed-By: Colin Ihrig Reviewed-By: Tobias Nießen Reviewed-By: Timothy Gu Reviewed-By: Gireesh Punathil Reviewed-By: James M Snell --- test/parallel/test-http-extra-response.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-http-extra-response.js b/test/parallel/test-http-extra-response.js index e71decb0c39b80..7c9514232c7ba8 100644 --- a/test/parallel/test-http-extra-response.js +++ b/test/parallel/test-http-extra-response.js @@ -32,7 +32,7 @@ const net = require('net'); const body = 'hello world\r\n'; const fullResponse = 'HTTP/1.1 500 Internal Server Error\r\n' + - 'Content-Length: ' + body.length + '\r\n' + + `Content-Length: ${body.length}\r\n` + 'Content-Type: text/plain\r\n' + 'Date: Fri + 18 Feb 2011 06:22:45 GMT\r\n' + 'Host: 10.20.149.2\r\n' + From 53ad91c3b1b258e26224edb4c4ca8c569b8f7864 Mon Sep 17 00:00:00 2001 From: Matteo Collina Date: Mon, 17 Jul 2017 10:02:02 +0200 Subject: [PATCH 005/157] doc,stream: _transform happens one at a time Add a note to the stream docs specifying that at most a single call to _transform can happen, and the provided callback() should be used to process another chunk. Fixes: https://github.com/nodejs/node/issues/3208 PR-URL: https://github.com/nodejs/node/pull/14321 Reviewed-By: James M Snell Reviewed-By: Rich Trott Reviewed-By: Benjamin Gruenbaum Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig --- doc/api/stream.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/api/stream.md b/doc/api/stream.md index 042685fd9933b6..5ffa984244ac67 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -2033,6 +2033,10 @@ The `transform._transform()` method is prefixed with an underscore because it is internal to the class that defines it, and should never be called directly by user programs. +`transform._transform()` is never called in parallel; streams implement a +queue mechanism, and to receive the next chunk, `callback` must be +called, either synchronously or asychronously. + #### Class: stream.PassThrough The `stream.PassThrough` class is a trivial implementation of a [Transform][] From 34821f6400e35478a87bacd78b830cb31e4db07c Mon Sep 17 00:00:00 2001 From: Benjamin Gruenbaum Date: Sun, 16 Jul 2017 18:12:57 +0300 Subject: [PATCH 006/157] repl: don't terminate on null thrown Previous behavior was to assume an error is a proper error in the repl module. A check was added to not terminate the process on thrown repl errors that are `null` or `undefined`. PR-URL: https://github.com/nodejs/node/pull/14306 Fixes: https://github.com/nodejs/node/issues/12373 Reviewed-By: Anna Henningsen Reviewed-By: Timothy Gu Reviewed-By: Jeremiah Senkpiel Reviewed-By: Colin Ihrig pre + (line - 1)); } - top.outputStream.write((e.stack || e) + '\n'); + if (isError && e.stack) { + top.outputStream.write(`${e.stack}\n`); + } else { + top.outputStream.write(`Thrown: ${String(e)}\n`); + } top.bufferedCommand = ''; top.lines.level = []; top.displayPrompt(); diff --git a/test/parallel/test-repl-null-thrown.js b/test/parallel/test-repl-null-thrown.js new file mode 100644 index 00000000000000..1fe5d30396d534 --- /dev/null +++ b/test/parallel/test-repl-null-thrown.js @@ -0,0 +1,24 @@ +'use strict'; +require('../common'); +const repl = require('repl'); +const assert = require('assert'); +const Stream = require('stream'); + +const output = new Stream(); +let text = ''; +output.write = output.pause = output.resume = function(buf) { + text += buf.toString(); +}; + +const replserver = repl.start({ + output: output, + input: process.stdin +}); + +replserver.emit('line', 'process.nextTick(() => { throw null; })'); +replserver.emit('line', '.exit'); + +setTimeout(() => { + console.log(text); + assert(text.includes('Thrown: null')); +}, 0); From dc0a26f25421f64c34c8abff109582058999f8d4 Mon Sep 17 00:00:00 2001 From: Devin Boyer Date: Wed, 19 Jul 2017 13:22:01 -0400 Subject: [PATCH 007/157] doc: replace dead link in v8 module PR-URL: https://github.com/nodejs/node/pull/14372 Reviewed-By: Joyee Cheung Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca --- doc/api/v8.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/v8.md b/doc/api/v8.md index e9ee98a4844cf6..11b3f1e3ae72b7 100644 --- a/doc/api/v8.md +++ b/doc/api/v8.md @@ -407,4 +407,4 @@ A subclass of [`Deserializer`][] corresponding to the format written by [V8]: https://developers.google.com/v8/ [`vm.Script`]: vm.html#vm_new_vm_script_code_options [here]: https://github.com/thlorenz/v8-flags/blob/master/flags-0.11.md -[`GetHeapSpaceStatistics`]: https://v8docs.nodesource.com/node-5.0/d5/dda/classv8_1_1_isolate.html#ac673576f24fdc7a33378f8f57e1d13a4 +[`GetHeapSpaceStatistics`]: https://v8docs.nodesource.com/node-8.0/d5/dda/classv8_1_1_isolate.html#ac673576f24fdc7a33378f8f57e1d13a4 From 3bc7d2a5ea18218f93dc1f0d434f8f0f1437abf0 Mon Sep 17 00:00:00 2001 From: Helianthus21 <740051540@qq.com> Date: Sun, 16 Jul 2017 15:56:25 +0800 Subject: [PATCH 008/157] test: replace string concat in test-fs-watchfile.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/14287 Reviewed-By: Joyee Cheung Reviewed-By: Rich Trott Reviewed-By: Michaël Zasso Reviewed-By: Gibson Fahnestock Reviewed-By: Benjamin Gruenbaum Reviewed-By: Colin Ihrig Reviewed-By: Tobias Nießen Reviewed-By: Gireesh Punathil Reviewed-By: Refael Ackermann Reviewed-By: James M Snell --- test/parallel/test-fs-watchfile.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-fs-watchfile.js b/test/parallel/test-fs-watchfile.js index 778174c64095cc..e7f991767b1d00 100644 --- a/test/parallel/test-fs-watchfile.js +++ b/test/parallel/test-fs-watchfile.js @@ -67,7 +67,7 @@ fs.watchFile(enoentFile, {interval: 0}, common.mustCall(function(curr, prev) { // Watch events should callback with a filename on supported systems. // Omitting AIX. It works but not reliably. if (common.isLinux || common.isOSX || common.isWindows) { - const dir = common.tmpDir + '/watch'; + const dir = path.join(common.tmpDir, 'watch'); fs.mkdir(dir, common.mustCall(function(err) { if (err) assert.fail(err); @@ -79,7 +79,7 @@ if (common.isLinux || common.isOSX || common.isWindows) { })); const interval = setInterval(() => { - fs.writeFile(`${dir}/foo.txt`, 'foo', common.mustCall(function(err) { + fs.writeFile(path.join(dir, 'foo.txt'), 'foo', common.mustCall((err) => { if (err) assert.fail(err); })); }, 1); From f6a03439d8d0facbe19b620ef55f2f15e51e20b9 Mon Sep 17 00:00:00 2001 From: Oleksandr Kushchak Date: Mon, 17 Jul 2017 10:11:09 +0100 Subject: [PATCH 009/157] docs: add note about fs.rmdir() fs.rmdir() on the file (not directory) results in different errors on Windows to everything else Fixes: https://github.com/nodejs/node/issues/8797 PR-URL: https://github.com/nodejs/node/pull/14323 Reviewed-By: Vse Mozhet Byt Reviewed-By: Gireesh Punathil Reviewed-By: Luigi Pinca Reviewed-By: James M Snell Reviewed-By: Jeremiah Senkpiel Reviewed-By: Colin Ihrig Reviewed-By: Gibson Fahnestock --- doc/api/fs.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/api/fs.md b/doc/api/fs.md index 7686563343bae2..e151f0fed89a15 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -2004,6 +2004,9 @@ changes: Asynchronous rmdir(2). No arguments other than a possible exception are given to the completion callback. +*Note*: Using `fs.rmdir()` on a file (not a directory) results in an `ENOENT` +error on Windows and an `ENOTDIR` error on POSIX. + ## fs.rmdirSync(path) @@ -265,25 +265,53 @@ added: v0.1.21 * `expected` {any} * `message` {any} * `operator` {string} (default: '!=') +* `stackStartFunction` {function} (default: `assert.fail`) Throws an `AssertionError`. If `message` is falsy, the error message is set as the values of `actual` and `expected` separated by the provided `operator`. -Otherwise, the error message is the value of `message`. +If just the two `actual` and `expected` arguments are provided, `operator` will +default to `'!='`. If `message` is provided only it will be used as the error +message, the other arguments will be stored as properties on the thrown object. +If `stackStartFunction` is provided, all stack frames above that function will +be removed from stacktrace (see [`Error.captureStackTrace`]). ```js const assert = require('assert'); assert.fail(1, 2, undefined, '>'); -// AssertionError: 1 > 2 +// AssertionError [ERR_ASSERTION]: 1 > 2 + +assert.fail(1, 2, 'fail'); +// AssertionError [ERR_ASSERTION]: fail assert.fail(1, 2, 'whoops', '>'); -// AssertionError: whoops +// AssertionError [ERR_ASSERTION]: whoops +``` + +*Note*: Is the last two cases `actual`, `expected`, and `operator` have no +influence on the error message. + +```js +assert.fail(); +// AssertionError [ERR_ASSERTION]: Failed assert.fail('boom'); -// AssertionError: boom +// AssertionError [ERR_ASSERTION]: boom assert.fail('a', 'b'); -// AssertionError: 'a' != 'b' +// AssertionError [ERR_ASSERTION]: 'a' != 'b' +``` + +Example use of `stackStartFunction` for truncating the exception's stacktrace: +```js +function suppressFrame() { + assert.fail('a', 'b', undefined, '!==', suppressFrame); +} +suppressFrame(); +// AssertionError [ERR_ASSERTION]: 'a' !== 'b' +// at repl:1:1 +// at ContextifyScript.Script.runInThisContext (vm.js:44:33) +// ... ``` ## assert.ifError(value) @@ -590,6 +618,7 @@ For more information, see [MDN's guide on equality comparisons and sameness][mdn-equality-guide]. [`Error`]: errors.html#errors_class_error +[`Error.captureStackTrace`]: errors.html#errors_error_capturestacktrace_targetobject_constructoropt [`Map`]: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Map [`Object.is()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is [`RegExp`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions From 26785a23bb05def0979ad09f3cea4ba400d75ec8 Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Sun, 2 Jul 2017 12:06:36 -0400 Subject: [PATCH 041/157] assert: refactor the code 1. Rename private functions 2. Use destructuring 3. Remove obsolete comments PR-URL: https://github.com/nodejs/node/pull/13862 Reviewed-By: Refael Ackermann Reviewed-By: Joyee Cheung Backport-PR-URL: https://github.com/nodejs/node/pull/14428 Backport-Reviewed-By: Anna Henningsen --- lib/assert.js | 115 +++++++++++++----------------- test/parallel/test-assert-fail.js | 32 +++++++-- 2 files changed, 75 insertions(+), 72 deletions(-) diff --git a/lib/assert.js b/lib/assert.js index bd36c9a16d1b38..a751ab2f2089d9 100644 --- a/lib/assert.js +++ b/lib/assert.js @@ -20,12 +20,11 @@ 'use strict'; -// UTILITY -const compare = process.binding('buffer').compare; +const { compare } = process.binding('buffer'); const util = require('util'); const { isSet, isMap } = process.binding('util'); -const objectToString = require('internal/util').objectToString; -const Buffer = require('buffer').Buffer; +const { objectToString } = require('internal/util'); +const { Buffer } = require('buffer'); var errors; function lazyErrors() { @@ -47,26 +46,28 @@ const assert = module.exports = ok; // All of the following functions must throw an AssertionError // when a corresponding condition is not met, with a message that -// may be undefined if not provided. All assertion methods provide +// may be undefined if not provided. All assertion methods provide // both the actual and expected values to the assertion error for // display purposes. +function innerFail(actual, expected, message, operator, stackStartFunction) { + const errors = lazyErrors(); + throw new errors.AssertionError({ + message, + actual, + expected, + operator, + stackStartFunction + }); +} + function fail(actual, expected, message, operator, stackStartFunction) { if (arguments.length === 1) message = actual; if (arguments.length === 2) operator = '!='; - const errors = lazyErrors(); - throw new errors.AssertionError({ - message: message, - actual: actual, - expected: expected, - operator: operator, - stackStartFunction: stackStartFunction - }); + innerFail(actual, expected, message, operator, stackStartFunction || fail); } - -// EXTENSION! allows for well behaved errors defined elsewhere. assert.fail = fail; // The AssertionError is defined in internal/error. @@ -77,50 +78,39 @@ assert.AssertionError = lazyErrors().AssertionError; // Pure assertion tests whether a value is truthy, as determined -// by !!guard. -// assert.ok(guard, message_opt); -// This statement is equivalent to assert.equal(true, !!guard, -// message_opt);. To test strictly for the value true, use -// assert.strictEqual(true, guard, message_opt);. - +// by !!value. function ok(value, message) { - if (!value) fail(value, true, message, '==', assert.ok); + if (!value) innerFail(value, true, message, '==', ok); } assert.ok = ok; -// The equality assertion tests shallow, coercive equality with -// ==. -// assert.equal(actual, expected, message_opt); +// The equality assertion tests shallow, coercive equality with ==. /* eslint-disable no-restricted-properties */ assert.equal = function equal(actual, expected, message) { // eslint-disable-next-line eqeqeq - if (actual != expected) fail(actual, expected, message, '==', assert.equal); + if (actual != expected) innerFail(actual, expected, message, '==', equal); }; // The non-equality assertion tests for whether two objects are not // equal with !=. -// assert.notEqual(actual, expected, message_opt); - assert.notEqual = function notEqual(actual, expected, message) { // eslint-disable-next-line eqeqeq if (actual == expected) { - fail(actual, expected, message, '!=', assert.notEqual); + innerFail(actual, expected, message, '!=', notEqual); } }; // The equivalence assertion tests a deep equality relation. -// assert.deepEqual(actual, expected, message_opt); - assert.deepEqual = function deepEqual(actual, expected, message) { - if (!_deepEqual(actual, expected, false)) { - fail(actual, expected, message, 'deepEqual', assert.deepEqual); + if (!innerDeepEqual(actual, expected, false)) { + innerFail(actual, expected, message, 'deepEqual', deepEqual); } }; /* eslint-enable */ assert.deepStrictEqual = function deepStrictEqual(actual, expected, message) { - if (!_deepEqual(actual, expected, true)) { - fail(actual, expected, message, 'deepStrictEqual', assert.deepStrictEqual); + if (!innerDeepEqual(actual, expected, true)) { + innerFail(actual, expected, message, 'deepStrictEqual', deepStrictEqual); } }; @@ -149,7 +139,7 @@ function isArguments(tag) { return tag === '[object Arguments]'; } -function _deepEqual(actual, expected, strict, memos) { +function innerDeepEqual(actual, expected, strict, memos) { // All identical values are equivalent, as determined by ===. if (actual === expected) { return true; @@ -302,7 +292,7 @@ function setHasSimilarElement(set, val1, usedEntries, strict, memo) { if (usedEntries && usedEntries.has(val2)) continue; - if (_deepEqual(val1, val2, strict, memo)) { + if (innerDeepEqual(val1, val2, strict, memo)) { if (usedEntries) usedEntries.add(val2); return true; @@ -359,7 +349,7 @@ function mapHasSimilarEntry(map, key1, item1, usedEntries, strict, memo) { // This check is not strictly necessary. The loop performs this check, but // doing it here improves performance of the common case when reference-equal // keys exist (which includes all primitive-valued keys). - if (map.has(key1) && _deepEqual(item1, map.get(key1), strict, memo)) { + if (map.has(key1) && innerDeepEqual(item1, map.get(key1), strict, memo)) { if (usedEntries) usedEntries.add(key1); return true; @@ -376,8 +366,8 @@ function mapHasSimilarEntry(map, key1, item1, usedEntries, strict, memo) { if (usedEntries && usedEntries.has(key2)) continue; - if (_deepEqual(key1, key2, strict, memo) && - _deepEqual(item1, item2, strict, memo)) { + if (innerDeepEqual(key1, key2, strict, memo) && + innerDeepEqual(item1, item2, strict, memo)) { if (usedEntries) usedEntries.add(key2); return true; @@ -454,44 +444,39 @@ function objEquiv(a, b, strict, actualVisitedObjects) { // Possibly expensive deep test: for (i = aKeys.length - 1; i >= 0; i--) { key = aKeys[i]; - if (!_deepEqual(a[key], b[key], strict, actualVisitedObjects)) + if (!innerDeepEqual(a[key], b[key], strict, actualVisitedObjects)) return false; } return true; } // The non-equivalence assertion tests for any deep inequality. -// assert.notDeepEqual(actual, expected, message_opt); - assert.notDeepEqual = function notDeepEqual(actual, expected, message) { - if (_deepEqual(actual, expected, false)) { - fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual); + if (innerDeepEqual(actual, expected, false)) { + innerFail(actual, expected, message, 'notDeepEqual', notDeepEqual); } }; assert.notDeepStrictEqual = notDeepStrictEqual; function notDeepStrictEqual(actual, expected, message) { - if (_deepEqual(actual, expected, true)) { - fail(actual, expected, message, 'notDeepStrictEqual', notDeepStrictEqual); + if (innerDeepEqual(actual, expected, true)) { + innerFail(actual, expected, message, 'notDeepStrictEqual', + notDeepStrictEqual); } } // The strict equality assertion tests strict equality, as determined by ===. -// assert.strictEqual(actual, expected, message_opt); - assert.strictEqual = function strictEqual(actual, expected, message) { if (actual !== expected) { - fail(actual, expected, message, '===', assert.strictEqual); + innerFail(actual, expected, message, '===', strictEqual); } }; // The strict non-equality assertion tests for strict inequality, as // determined by !==. -// assert.notStrictEqual(actual, expected, message_opt); - assert.notStrictEqual = function notStrictEqual(actual, expected, message) { if (actual === expected) { - fail(actual, expected, message, '!==', assert.notStrictEqual); + innerFail(actual, expected, message, '!==', notStrictEqual); } }; @@ -520,7 +505,7 @@ function expectedException(actual, expected) { return expected.call({}, actual) === true; } -function _tryBlock(block) { +function tryBlock(block) { var error; try { block(); @@ -530,7 +515,7 @@ function _tryBlock(block) { return error; } -function _throws(shouldThrow, block, expected, message) { +function innerThrows(shouldThrow, block, expected, message) { var actual; if (typeof block !== 'function') { @@ -544,13 +529,13 @@ function _throws(shouldThrow, block, expected, message) { expected = null; } - actual = _tryBlock(block); + actual = tryBlock(block); message = (expected && expected.name ? ' (' + expected.name + ')' : '') + (message ? ': ' + message : '.'); if (shouldThrow && !actual) { - fail(actual, expected, 'Missing expected exception' + message); + innerFail(actual, expected, 'Missing expected exception' + message, fail); } const userProvidedMessage = typeof message === 'string'; @@ -561,7 +546,7 @@ function _throws(shouldThrow, block, expected, message) { userProvidedMessage && expectedException(actual, expected)) || isUnexpectedException) { - fail(actual, expected, 'Got unwanted exception' + message); + innerFail(actual, expected, 'Got unwanted exception' + message, fail); } if ((shouldThrow && actual && expected && @@ -571,16 +556,12 @@ function _throws(shouldThrow, block, expected, message) { } // Expected to throw an error. -// assert.throws(block, Error_opt, message_opt); - -assert.throws = function throws(block, /*optional*/error, /*optional*/message) { - _throws(true, block, error, message); +assert.throws = function throws(block, error, message) { + innerThrows(true, block, error, message); }; -// EXTENSION! This is annoying to write outside this module. -assert.doesNotThrow = doesNotThrow; -function doesNotThrow(block, /*optional*/error, /*optional*/message) { - _throws(false, block, error, message); -} +assert.doesNotThrow = function doesNotThrow(block, error, message) { + innerThrows(false, block, error, message); +}; assert.ifError = function ifError(err) { if (err) throw err; }; diff --git a/test/parallel/test-assert-fail.js b/test/parallel/test-assert-fail.js index 1f389933bb4a9c..d64947fa1000a6 100644 --- a/test/parallel/test-assert-fail.js +++ b/test/parallel/test-assert-fail.js @@ -1,53 +1,75 @@ 'use strict'; + const common = require('../common'); const assert = require('assert'); -// no args +// No args assert.throws( () => { assert.fail(); }, common.expectsError({ code: 'ERR_ASSERTION', type: assert.AssertionError, + operator: undefined, + actual: undefined, + expected: undefined, message: 'undefined undefined undefined' }) ); -// one arg = message +// One arg = message assert.throws( () => { assert.fail('custom message'); }, common.expectsError({ code: 'ERR_ASSERTION', type: assert.AssertionError, + operator: undefined, + actual: undefined, + expected: undefined, message: 'custom message' }) ); -// two args only, operator defaults to '!=' +// Two args only, operator defaults to '!=' assert.throws( () => { assert.fail('first', 'second'); }, common.expectsError({ code: 'ERR_ASSERTION', type: assert.AssertionError, + operator: '!=', + actual: 'first', + expected: 'second', message: '\'first\' != \'second\'' }) ); -// three args +// Three args assert.throws( () => { assert.fail('ignored', 'ignored', 'another custom message'); }, common.expectsError({ code: 'ERR_ASSERTION', type: assert.AssertionError, + operator: undefined, + actual: 'ignored', + expected: 'ignored', message: 'another custom message' }) ); -// no third arg (but a fourth arg) +// No third arg (but a fourth arg) assert.throws( () => { assert.fail('first', 'second', undefined, 'operator'); }, common.expectsError({ code: 'ERR_ASSERTION', type: assert.AssertionError, + operator: 'operator', + actual: 'first', + expected: 'second', message: '\'first\' operator \'second\'' }) ); + +// The stackFrameFunction should exclude the foo frame +assert.throws( + function foo() { assert.fail('first', 'second', 'message', '!==', foo); }, + (err) => !/foo/m.test(err.stack) +); From d7a16378977b21affcdf6bcf82bbdca6be598cf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AB=A0=E7=A4=BC=E5=B9=B3?= Date: Sun, 16 Jul 2017 15:07:33 +0800 Subject: [PATCH 042/157] test: change isAix to isAIX This makes the naming more consistent with existing properties like isFreeBSD where the capitalization of the property name is consistent with the conventional styling of the operating system. PR-URL: https://github.com/nodejs/node/pull/14263 Reviewed-By: Rich Trott Reviewed-By: Bryan English --- test/common/README.md | 2 +- test/common/index.js | 4 ++-- test/known_issues/test-cwd-enoent-file.js | 2 +- test/parallel/test-cwd-enoent-preload.js | 2 +- test/parallel/test-cwd-enoent-repl.js | 2 +- test/parallel/test-cwd-enoent.js | 2 +- test/parallel/test-fs-readfile-pipe-large.js | 2 +- test/parallel/test-fs-readfile-pipe.js | 2 +- test/parallel/test-fs-readfilesync-pipe-large.js | 2 +- test/parallel/test-fs-realpath-pipe.js | 2 +- test/parallel/test-fs-watch-encoding.js | 2 +- test/parallel/test-fs-watch.js | 2 +- test/parallel/test-os.js | 2 +- test/pseudo-tty/no_dropped_stdio.js | 2 +- test/pseudo-tty/no_interleaved_stdio.js | 2 +- test/pseudo-tty/test-stderr-stdout-handle-sigwinch.js | 2 +- test/sequential/test-fs-watch.js | 4 ++-- test/tick-processor/test-tick-processor-builtin.js | 2 +- test/tick-processor/test-tick-processor-cpp-core.js | 2 +- test/tick-processor/test-tick-processor-unknown.js | 2 +- 20 files changed, 22 insertions(+), 22 deletions(-) diff --git a/test/common/README.md b/test/common/README.md index 07f9bc6583d918..57f607153aa8c1 100644 --- a/test/common/README.md +++ b/test/common/README.md @@ -147,7 +147,7 @@ the number of calls. Checks whether free BSD Jail is true or false. -### isAix +### isAIX * return [<Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) Platform check for Advanced Interactive eXecutive (AIX). diff --git a/test/common/index.js b/test/common/index.js index d74123c525b11e..2b90ed66780f75 100644 --- a/test/common/index.js +++ b/test/common/index.js @@ -44,7 +44,7 @@ exports.PORT = +process.env.NODE_COMMON_PORT || 12346; exports.isWindows = process.platform === 'win32'; exports.isWOW64 = exports.isWindows && (process.env.PROCESSOR_ARCHITEW6432 !== undefined); -exports.isAix = process.platform === 'aix'; +exports.isAIX = process.platform === 'aix'; exports.isLinuxPPCBE = (process.platform === 'linux') && (process.arch === 'ppc64') && (os.endianness() === 'BE'); @@ -333,7 +333,7 @@ exports.platformTimeout = function(ms) { if (global.__coverage__) ms = 4 * ms; - if (exports.isAix) + if (exports.isAIX) return 2 * ms; // default localhost speed is slower on AIX if (process.arch !== 'arm') diff --git a/test/known_issues/test-cwd-enoent-file.js b/test/known_issues/test-cwd-enoent-file.js index b2f59cbca7d48a..01e6e8359fb522 100644 --- a/test/known_issues/test-cwd-enoent-file.js +++ b/test/known_issues/test-cwd-enoent-file.js @@ -5,7 +5,7 @@ const common = require('../common'); const assert = require('assert'); -if (common.isSunOS || common.isWindows || common.isAix) { +if (common.isSunOS || common.isWindows || common.isAIX) { // The current working directory cannot be removed on these platforms. // Change this to common.skip() when this is no longer a known issue test. assert.fail('cannot rmdir current working directory'); diff --git a/test/parallel/test-cwd-enoent-preload.js b/test/parallel/test-cwd-enoent-preload.js index 8979547c0dea94..5f22ee1e90bc9e 100644 --- a/test/parallel/test-cwd-enoent-preload.js +++ b/test/parallel/test-cwd-enoent-preload.js @@ -1,7 +1,7 @@ 'use strict'; const common = require('../common'); // Fails with EINVAL on SmartOS, EBUSY on Windows, EBUSY on AIX. -if (common.isSunOS || common.isWindows || common.isAix) +if (common.isSunOS || common.isWindows || common.isAIX) common.skip('cannot rmdir current working directory'); const assert = require('assert'); diff --git a/test/parallel/test-cwd-enoent-repl.js b/test/parallel/test-cwd-enoent-repl.js index bb41b1fccd8bf6..8f846af9030c08 100644 --- a/test/parallel/test-cwd-enoent-repl.js +++ b/test/parallel/test-cwd-enoent-repl.js @@ -1,7 +1,7 @@ 'use strict'; const common = require('../common'); // Fails with EINVAL on SmartOS, EBUSY on Windows, EBUSY on AIX. -if (common.isSunOS || common.isWindows || common.isAix) +if (common.isSunOS || common.isWindows || common.isAIX) common.skip('cannot rmdir current working directory'); const assert = require('assert'); diff --git a/test/parallel/test-cwd-enoent.js b/test/parallel/test-cwd-enoent.js index 27df46acf89ea4..c1b520aedd321d 100644 --- a/test/parallel/test-cwd-enoent.js +++ b/test/parallel/test-cwd-enoent.js @@ -1,7 +1,7 @@ 'use strict'; const common = require('../common'); // Fails with EINVAL on SmartOS, EBUSY on Windows, EBUSY on AIX. -if (common.isSunOS || common.isWindows || common.isAix) +if (common.isSunOS || common.isWindows || common.isAIX) common.skip('cannot rmdir current working directory'); const assert = require('assert'); diff --git a/test/parallel/test-fs-readfile-pipe-large.js b/test/parallel/test-fs-readfile-pipe-large.js index 46603b14fa0a56..4d278ee0f22093 100644 --- a/test/parallel/test-fs-readfile-pipe-large.js +++ b/test/parallel/test-fs-readfile-pipe-large.js @@ -3,7 +3,7 @@ const common = require('../common'); // simulate `cat readfile.js | node readfile.js` -if (common.isWindows || common.isAix) +if (common.isWindows || common.isAIX) common.skip(`No /dev/stdin on ${process.platform}.`); const assert = require('assert'); diff --git a/test/parallel/test-fs-readfile-pipe.js b/test/parallel/test-fs-readfile-pipe.js index e15c2c10476c66..0c26d7c287e012 100644 --- a/test/parallel/test-fs-readfile-pipe.js +++ b/test/parallel/test-fs-readfile-pipe.js @@ -24,7 +24,7 @@ const common = require('../common'); // simulate `cat readfile.js | node readfile.js` -if (common.isWindows || common.isAix) +if (common.isWindows || common.isAIX) common.skip(`No /dev/stdin on ${process.platform}.`); const assert = require('assert'); diff --git a/test/parallel/test-fs-readfilesync-pipe-large.js b/test/parallel/test-fs-readfilesync-pipe-large.js index daa53bf3de0cc3..f9dea90d104fad 100644 --- a/test/parallel/test-fs-readfilesync-pipe-large.js +++ b/test/parallel/test-fs-readfilesync-pipe-large.js @@ -3,7 +3,7 @@ const common = require('../common'); // simulate `cat readfile.js | node readfile.js` -if (common.isWindows || common.isAix) +if (common.isWindows || common.isAIX) common.skip(`No /dev/stdin on ${process.platform}.`); const assert = require('assert'); diff --git a/test/parallel/test-fs-realpath-pipe.js b/test/parallel/test-fs-realpath-pipe.js index 0f30b07f0a9bf1..55010cf78b4a5a 100644 --- a/test/parallel/test-fs-realpath-pipe.js +++ b/test/parallel/test-fs-realpath-pipe.js @@ -2,7 +2,7 @@ const common = require('../common'); -if (common.isWindows || common.isAix) +if (common.isWindows || common.isAIX) common.skip(`No /dev/stdin on ${process.platform}.`); const assert = require('assert'); diff --git a/test/parallel/test-fs-watch-encoding.js b/test/parallel/test-fs-watch-encoding.js index b9488f7a7f8421..18b6f2ecf6a16b 100644 --- a/test/parallel/test-fs-watch-encoding.js +++ b/test/parallel/test-fs-watch-encoding.js @@ -16,7 +16,7 @@ const common = require('../common'); // The testcase makes use of folder watching, and causes // hang. This behavior is documented. Skip this for AIX. -if (common.isAix) +if (common.isAIX) common.skip('folder watch capability is limited in AIX.'); const fs = require('fs'); diff --git a/test/parallel/test-fs-watch.js b/test/parallel/test-fs-watch.js index 6edb141129975c..bf5fc9a8e1ed75 100644 --- a/test/parallel/test-fs-watch.js +++ b/test/parallel/test-fs-watch.js @@ -21,7 +21,7 @@ class WatchTestCase { const cases = [ // Watch on a directory should callback with a filename on supported systems new WatchTestCase( - common.isLinux || common.isOSX || common.isWindows || common.isAix, + common.isLinux || common.isOSX || common.isWindows || common.isAIX, 'watch1', 'foo', 'filePath' diff --git a/test/parallel/test-os.js b/test/parallel/test-os.js index a62c8b8512dbb9..016ee69a85bdd3 100644 --- a/test/parallel/test-os.js +++ b/test/parallel/test-os.js @@ -93,7 +93,7 @@ const release = os.release(); is.string(release); assert.ok(release.length > 0); //TODO: Check format on more than just AIX -if (common.isAix) +if (common.isAIX) assert.ok(/^\d+\.\d+$/.test(release)); const platform = os.platform(); diff --git a/test/pseudo-tty/no_dropped_stdio.js b/test/pseudo-tty/no_dropped_stdio.js index 6aa721df359831..f140860c0124f7 100644 --- a/test/pseudo-tty/no_dropped_stdio.js +++ b/test/pseudo-tty/no_dropped_stdio.js @@ -16,4 +16,4 @@ out += `${'o'.repeat(24)}O`; setTimeout(function() { process.stdout.write(out); process.exit(0); -}, common.isAix ? 200 : 0); +}, common.isAIX ? 200 : 0); diff --git a/test/pseudo-tty/no_interleaved_stdio.js b/test/pseudo-tty/no_interleaved_stdio.js index 3f1e7b5fb12445..81ba49b9aecb83 100644 --- a/test/pseudo-tty/no_interleaved_stdio.js +++ b/test/pseudo-tty/no_interleaved_stdio.js @@ -18,4 +18,4 @@ const err = '__This is some stderr__'; setTimeout(function() { process.stdout.write(out); process.stderr.write(err); -}, common.isAix ? 200 : 0); +}, common.isAIX ? 200 : 0); diff --git a/test/pseudo-tty/test-stderr-stdout-handle-sigwinch.js b/test/pseudo-tty/test-stderr-stdout-handle-sigwinch.js index 4d87e15d342c36..d5f187d1c3948d 100644 --- a/test/pseudo-tty/test-stderr-stdout-handle-sigwinch.js +++ b/test/pseudo-tty/test-stderr-stdout-handle-sigwinch.js @@ -31,4 +31,4 @@ process.stdout._refreshSize = wrap(originalRefreshSizeStdout, // can setup the readloop. Provide a reasonable delay. setTimeout(function() { process.emit('SIGWINCH'); -}, common.isAix ? 200 : 0); +}, common.isAIX ? 200 : 0); diff --git a/test/sequential/test-fs-watch.js b/test/sequential/test-fs-watch.js index 70c165ea7992be..d7750582b0ef34 100644 --- a/test/sequential/test-fs-watch.js +++ b/test/sequential/test-fs-watch.js @@ -28,7 +28,7 @@ const fs = require('fs'); const expectFilePath = common.isWindows || common.isLinux || common.isOSX || - common.isAix; + common.isAIX; let watchSeenOne = 0; let watchSeenTwo = 0; @@ -102,7 +102,7 @@ const filepathThree = path.join(testsubdir, filenameThree); assert.doesNotThrow( function() { const watcher = fs.watch(testsubdir, function(event, filename) { - const renameEv = common.isSunOS || common.isAix ? 'change' : 'rename'; + const renameEv = common.isSunOS || common.isAIX ? 'change' : 'rename'; assert.strictEqual(event, renameEv); if (expectFilePath) { assert.strictEqual(filename, 'newfile.txt'); diff --git a/test/tick-processor/test-tick-processor-builtin.js b/test/tick-processor/test-tick-processor-builtin.js index 0fb839f8d1321c..f94964813ac76a 100644 --- a/test/tick-processor/test-tick-processor-builtin.js +++ b/test/tick-processor/test-tick-processor-builtin.js @@ -6,7 +6,7 @@ if (!common.enoughTestCpu) if (common.isWindows || common.isSunOS || - common.isAix || + common.isAIX || common.isLinuxPPCBE || common.isFreeBSD) common.skip('C++ symbols are not mapped for this os.'); diff --git a/test/tick-processor/test-tick-processor-cpp-core.js b/test/tick-processor/test-tick-processor-cpp-core.js index dc1aed41a79ea6..496d06b555f3e8 100644 --- a/test/tick-processor/test-tick-processor-cpp-core.js +++ b/test/tick-processor/test-tick-processor-cpp-core.js @@ -6,7 +6,7 @@ if (!common.enoughTestCpu) if (common.isWindows || common.isSunOS || - common.isAix || + common.isAIX || common.isLinuxPPCBE || common.isFreeBSD) common.skip('C++ symbols are not mapped for this os.'); diff --git a/test/tick-processor/test-tick-processor-unknown.js b/test/tick-processor/test-tick-processor-unknown.js index c0f5f332b260fe..182f8c957c820a 100644 --- a/test/tick-processor/test-tick-processor-unknown.js +++ b/test/tick-processor/test-tick-processor-unknown.js @@ -6,7 +6,7 @@ const common = require('../common'); // the full 64 bits and the result is that it does not process the // addresses correctly and runs out of memory // Disabling until we get a fix upstreamed into V8 -if (common.isAix) +if (common.isAIX) common.skip('AIX address range too big for scripts.'); if (!common.enoughTestCpu) From bdcd496c982b02f9dd3f62e585a95d46af72883f Mon Sep 17 00:00:00 2001 From: James M Snell Date: Fri, 28 Apr 2017 07:24:19 -0700 Subject: [PATCH 043/157] doc: update experimental status to reflect use * Update the experimental status to reflect actual common use. * Also make a few formatting fixes. Fixes: https://github.com/nodejs/node/issues/12701 PR-URL: https://github.com/nodejs/node/pull/12723 Fixes: https://github.com/nodejs/node/issues/12701 Reviewed-By: Refael Ackermann Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Michael Dawson Reviewed-By: Myles Borins Reviewed-By: Sakthipriyan Vairamani Reviewed-By: Daijiro Wachi --- doc/api/documentation.md | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/doc/api/documentation.md b/doc/api/documentation.md index d17fe35c2a2ed7..a12f00e1d63bb8 100644 --- a/doc/api/documentation.md +++ b/doc/api/documentation.md @@ -3,7 +3,7 @@ The goal of this documentation is to comprehensively explain the Node.js -API, both from a reference as well as a conceptual point of view. Each +API, both from a reference as well as a conceptual point of view. Each section describes a built-in module or high-level concept. Where appropriate, property types, method arguments, and the arguments @@ -11,12 +11,12 @@ provided to event handlers are detailed in a list underneath the topic heading. Every `.html` document has a corresponding `.json` document presenting -the same information in a structured manner. This feature is +the same information in a structured manner. This feature is experimental, and added for the benefit of IDEs and other utilities that wish to do programmatic things with the documentation. Every `.html` and `.json` file is generated based on the corresponding -`.md` file in the `doc/api/` folder in Node.js's source tree. The +`.md` file in the `doc/api/` folder in Node.js's source tree. The documentation is generated using the `tools/doc/generate.js` program. The HTML template is located at `doc/template.html`. @@ -39,17 +39,29 @@ The stability indices are as follows: ```txt Stability: 0 - Deprecated -This feature is known to be problematic, and changes are -planned. Do not rely on it. Use of the feature may cause warnings. Backwards -compatibility should not be expected. +This feature is known to be problematic, and changes may be planned. Do +not rely on it. Use of the feature may cause warnings to be emitted. +Backwards compatibility across major versions should not be expected. ``` ```txt Stability: 1 - Experimental -This feature is subject to change, and is gated by a command line flag. -It may change or be removed in future versions. +This feature is still under active development and subject to non-backwards +compatible changes, or even removal, in any future version. Use of the feature +is not recommended in production environments. Experimental features are not +subject to the Node.js Semantic Versioning model. ``` +*Note*: Caution must be used when making use of `Experimental` features, +particularly within modules that may be used as dependencies (or dependencies +of dependencies) within a Node.js application. End users may not be aware that +experimental features are being used, and therefore may experience unexpected +failures or behavioral changes when changes occur. To help avoid such surprises, +`Experimental` features may require a command-line flag to explicitly enable +them, or may cause a process warning to be emitted. By default, such warnings +are printed to `stderr` and may be handled by attaching a listener to the +`process.on('warning')` event. + ```txt Stability: 2 - Stable The API has proven satisfactory. Compatibility with the npm ecosystem @@ -63,7 +75,7 @@ is a high priority, and will not be broken unless absolutely necessary. Every HTML file in the markdown has a corresponding JSON file with the same data. -This feature was added in Node.js v0.6.12. It is experimental. +This feature was added in Node.js v0.6.12. It is experimental. ## Syscalls and man pages @@ -72,7 +84,7 @@ and the underlying operating system. Node functions which simply wrap a syscall, like `fs.open()`, will document that. The docs link to the corresponding man pages (short for manual pages) which describe how the syscalls work. -**Caveat:** some syscalls, like lchown(2), are BSD-specific. That means, for +**Note:** some syscalls, like lchown(2), are BSD-specific. That means, for example, that `fs.lchown()` only works on macOS and other BSD-derived systems, and is not available on Linux. From 89586f6684a24cc6e48c3a3e61654341bd9198d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Fri, 30 Jun 2017 21:30:23 +0200 Subject: [PATCH 044/157] assert: fix incorrect use of ERR_INVALID_ARG_TYPE Backport-PR-URL: https://github.com/nodejs/node/pull/14459 Backport-Reviewed-By: Refael Ackermann PR-URL: https://github.com/nodejs/node/pull/14011 Reviewed-By: Refael Ackermann Reviewed-By: James M Snell Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig --- lib/assert.js | 2 +- test/parallel/test-assert.js | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/lib/assert.js b/lib/assert.js index a751ab2f2089d9..855c79c868a5ef 100644 --- a/lib/assert.js +++ b/lib/assert.js @@ -521,7 +521,7 @@ function innerThrows(shouldThrow, block, expected, message) { if (typeof block !== 'function') { const errors = lazyErrors(); throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'block', 'function', - typeof block); + block); } if (typeof expected === 'string') { diff --git a/test/parallel/test-assert.js b/test/parallel/test-assert.js index e24997ec65d18c..382123ef870256 100644 --- a/test/parallel/test-assert.js +++ b/test/parallel/test-assert.js @@ -670,10 +670,9 @@ try { { // Verify that throws() and doesNotThrow() throw on non-function block - const validationFunction = common.expectsError({ - code: 'ERR_INVALID_ARG_TYPE', - type: TypeError - }); + function typeName(value) { + return value === null ? 'null' : typeof value; + } const testBlockTypeError = (method, block) => { let threw = true; @@ -682,7 +681,12 @@ try { method(block); threw = false; } catch (e) { - validationFunction(e); + common.expectsError({ + code: 'ERR_INVALID_ARG_TYPE', + type: TypeError, + message: 'The "block" argument must be of type function. Received ' + + 'type ' + typeName(block) + })(e); } assert.ok(threw); From d89bb1c6f3608f878eec1ea0bd59b715814388bf Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Mon, 24 Jul 2017 22:24:53 +0200 Subject: [PATCH 045/157] test: bump test/common to master ``` git checkout master test/common && \ git commit -m 'test: bump test/common to master' ``` PR-URL: https://github.com/nodejs/node/pull/14459 Reviewed-By: Refael Ackermann --- test/common/README.md | 192 ++++++++++++++++++++++++------------------ test/common/index.js | 80 +++++++++++------- 2 files changed, 162 insertions(+), 110 deletions(-) diff --git a/test/common/README.md b/test/common/README.md index 57f607153aa8c1..32ca6711573daa 100644 --- a/test/common/README.md +++ b/test/common/README.md @@ -13,8 +13,8 @@ The `common` module is used by tests for consistency across repeated tasks. ### allowGlobals(...whitelist) -* `whitelist` [<Array>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) Array of Globals -* return [<Array>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) +* `whitelist` [<Array>] Array of Globals +* return [<Array>] Takes `whitelist` and concats that with predefined `knownGlobals`. @@ -22,7 +22,7 @@ Takes `whitelist` and concats that with predefined `knownGlobals`. A stream to push an array into a REPL ### busyLoop(time) -* `time` [<Number>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) +* `time` [<Number>] Blocks for `time` amount of time. @@ -41,93 +41,113 @@ no unexpected rejections occur, because currently they result in silent failures. ### ddCommand(filename, kilobytes) -* return [<Object>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) +* return [<Object>] Platform normalizes the `dd` command ### enoughTestMem -* return [<Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) +* return [<Boolean>] Check if there is more than 1gb of total memory. -### expectsError(settings) -* `settings` [<Object>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) - with the following optional properties: - * `code` [<String>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) - expected error must have this value for its `code` property - * `type` [<Function>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function) - expected error must be an instance of `type` - * `message` [<String>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) - or [<RegExp>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) +### expectsError([fn, ]settings[, exact]) +* `fn` [<Function>] a function that should throw. +* `settings` [<Object>] + that must contain the `code` property plus any of the other following + properties (some properties only apply for `AssertionError`): + * `code` [<String>] + expected error must have this value for its `code` property. + * `type` [<Function>] + expected error must be an instance of `type` and must be an Error subclass. + * `message` [<String>] or [<RegExp>] if a string is provided for `message`, expected error must have it for its `message` property; if a regular expression is provided for `message`, the - regular expression must match the `message` property of the expected error - -* return function suitable for use as a validation function passed as the second - argument to `assert.throws()` - -The expected error should be [subclassed by the `internal/errors` module](https://github.com/nodejs/node/blob/master/doc/guides/using-internal-errors.md#api). + regular expression must match the `message` property of the expected error. + * `name` [<String>] + expected error must have this value for its `name` property. + * `generatedMessage` [<String>] + (`AssertionError` only) expected error must have this value for its + `generatedMessage` property. + * `actual` <any> + (`AssertionError` only) expected error must have this value for its + `actual` property. + * `expected` <any> + (`AssertionError` only) expected error must have this value for its + `expected` property. + * `operator` <any> + (`AssertionError` only) expected error must have this value for its + `operator` property. +* `exact` [<Number>] default = 1 +* return [<Function>] + + If `fn` is provided, it will be passed to `assert.throws` as first argument + and `undefined` will be returned. + Otherwise a function suitable as callback or for use as a validation function + passed as the second argument to `assert.throws()` will be returned. If the + returned function has not been called exactly `exact` number of times when the + test is complete, then the test will fail. ### expectWarning(name, expected) -* `name` [<String>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) -* `expected` [<String>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) | [<Array>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) +* `name` [<String>] +* `expected` [<String>] | [<Array>] Tests whether `name` and `expected` are part of a raised warning. ### fileExists(pathname) -* pathname [<String>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) -* return [<Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) +* pathname [<String>] +* return [<Boolean>] Checks if `pathname` exists ### fixturesDir -* return [<String>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) +* return [<String>] Path to the 'fixtures' directory. ### getArrayBufferViews(buf) -* `buf` [<Buffer>](https://nodejs.org/api/buffer.html#buffer_class_buffer) -* return [<ArrayBufferView[]>](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) +* `buf` [<Buffer>] +* return [<ArrayBufferView[]>] Returns an instance of all possible `ArrayBufferView`s of the provided Buffer. ### globalCheck -* return [<Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) +* return [<Boolean>] Turn this off if the test should not check for global leaks. ### hasCrypto -* return [<Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) +* return [<Boolean>] Checks for 'openssl'. ### hasFipsCrypto -* return [<Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) +* return [<Boolean>] Checks `hasCrypto` and `crypto` with fips. ### hasIntl -* return [<Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) +* return [<Boolean>] Checks if [internationalization] is supported. ### hasSmallICU -* return [<Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) +* return [<Boolean>] Checks `hasIntl` and `small-icu` is supported. ### hasIPv6 -* return [<Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) +* return [<Boolean>] Checks whether `IPv6` is supported on this platform. ### hasMultiLocalhost -* return [<Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) +* return [<Boolean>] Checks if there are multiple localhosts available. ### hijackStderr(listener) -* `listener` [<Function>][MDN-Function]: a listener with a single parameter called `data`. +* `listener` [<Function>]: a listener with a single parameter + called `data`. Eavesdrop to `process.stderr.write` calls. Once `process.stderr.write` is called, `listener` will also be called and the `data` of `write` function will @@ -135,7 +155,8 @@ be passed to `listener`. What's more, `process.stderr.writeTimes` is a count of the number of calls. ### hijackStdout(listener) -* `listener` [<Function>][MDN-Function]: a listener with a single parameter called `data`. +* `listener` [<Function>]: a listener with a single parameter + called `data`. Eavesdrop to `process.stdout.write` calls. Once `process.stdout.write` is called, `listener` will also be called and the `data` of `write` function will @@ -143,86 +164,86 @@ be passed to `listener`. What's more, `process.stdout.writeTimes` is a count of the number of calls. ### inFreeBSDJail -* return [<Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) +* return [<Boolean>] Checks whether free BSD Jail is true or false. ### isAIX -* return [<Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) +* return [<Boolean>] Platform check for Advanced Interactive eXecutive (AIX). ### isAlive(pid) -* `pid` [<Number>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) -* return [<Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) +* `pid` [<Number>] +* return [<Boolean>] Attempts to 'kill' `pid` ### isFreeBSD -* return [<Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) +* return [<Boolean>] Platform check for Free BSD. ### isLinux -* return [<Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) +* return [<Boolean>] Platform check for Linux. ### isLinuxPPCBE -* return [<Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) +* return [<Boolean>] Platform check for Linux on PowerPC. ### isOSX -* return [<Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) +* return [<Boolean>] Platform check for macOS. ### isSunOS -* return [<Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) +* return [<Boolean>] Platform check for SunOS. ### isWindows -* return [<Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) +* return [<Boolean>] Platform check for Windows. ### isWOW64 -* return [<Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) +* return [<Boolean>] Platform check for Windows 32-bit on Windows 64-bit. ### leakedGlobals -* return [<Array>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) +* return [<Array>] Checks whether any globals are not on the `knownGlobals` list. ### localhostIPv4 -* return [<String>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) +* return [<String>] Gets IP of localhost ### localIPv6Hosts -* return [<Array>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) +* return [<Array>] Array of IPV6 hosts. ### mustCall([fn][, exact]) -* `fn` [<Function>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function) default = () => {} -* `exact` [<Number>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) default = 1 -* return [<Function>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function) +* `fn` [<Function>] default = () => {} +* `exact` [<Number>] default = 1 +* return [<Function>] Returns a function that calls `fn`. If the returned function has not been called -exactly `expected` number of times when the test is complete, then the test will +exactly `exact` number of times when the test is complete, then the test will fail. If `fn` is not provided, an empty function will be used. ### mustCallAtLeast([fn][, minimum]) -* `fn` [<Function>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function) default = () => {} -* `minimum` [<Number>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) default = 1 -* return [<Function>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function) +* `fn` [<Function>] default = () => {} +* `minimum` [<Number>] default = 1 +* return [<Function>] Returns a function that calls `fn`. If the returned function has not been called at least `minimum` number of times when the test is complete, then the test will @@ -231,46 +252,49 @@ fail. If `fn` is not provided, an empty function will be used. ### mustNotCall([msg]) -* `msg` [<String>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) default = 'function should not have been called' -* return [<Function>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function) +* `msg` [<String>] default = 'function should not have been called' +* return [<Function>] -Returns a function that triggers an `AssertionError` if it is invoked. `msg` is used as the error message for the `AssertionError`. +Returns a function that triggers an `AssertionError` if it is invoked. `msg` is +used as the error message for the `AssertionError`. ### nodeProcessAborted(exitCode, signal) -* `exitCode` [<Number>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) -* `signal` [<String>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) -* return [<Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) +* `exitCode` [<Number>] +* `signal` [<String>] +* return [<Boolean>] -Returns `true` if the exit code `exitCode` and/or signal name `signal` represent the exit code and/or signal name of a node process that aborted, `false` otherwise. +Returns `true` if the exit code `exitCode` and/or signal name `signal` represent +the exit code and/or signal name of a node process that aborted, `false` +otherwise. ### opensslCli -* return [<Boolean>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) +* return [<Boolean>] Checks whether 'opensslCli' is supported. ### platformTimeout(ms) -* `ms` [<Number>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) -* return [<Number>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) +* `ms` [<Number>] +* return [<Number>] Platform normalizes timeout. ### PIPE -* return [<String>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) +* return [<String>] Path to the test sock. ### PORT -* return [<Number>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) default = `12346` +* return [<Number>] default = `12346` Port tests are running on. ### printSkipMessage(msg) -* `msg` [<String>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) +* `msg` [<String>] Logs '1..0 # Skipped: ' + `msg` ### refreshTmpDir -* return [<String>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) +* return [<String>] Deletes the 'tmp' dir and recreates it @@ -283,34 +307,34 @@ Restore the original `process.stderr.write`. Restore the original `process.stdout.write`. ### rootDir -* return [<String>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) +* return [<String>] Path to the 'root' directory. either `/` or `c:\\` (windows) ### skip(msg) -* `msg` [<String>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) +* `msg` [<String>] Logs '1..0 # Skipped: ' + `msg` and exits with exit code `0`. ### spawnPwd(options) -* `options` [<Object>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) -* return [<Object>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) +* `options` [<Object>] +* return [<Object>] Platform normalizes the `pwd` command. ### spawnSyncPwd(options) -* `options` [<Object>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) -* return [<Object>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) +* `options` [<Object>] +* return [<Object>] Synchronous version of `spawnPwd`. ### tmpDir -* return [<String>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) +* return [<String>] The realpath of the 'tmp' directory. ### tmpDirName -* return [<String>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) +* return [<String>] Name of the temp directory used by tests. @@ -323,5 +347,13 @@ Node.js implementation with tests from [W3C Web Platform Tests](https://github.com/w3c/web-platform-tests). -[MDN-Function]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Normal_objects_and_functions +[<Array>]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array +[<ArrayBufferView[]>]: https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView +[<Boolean>]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type +[<Buffer>]: https://nodejs.org/api/buffer.html#buffer_class_buffer +[<Function>]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function +[<Number>]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type +[<Object>]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object +[<RegExp>]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp +[<String>]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type [internationalization]: https://github.com/nodejs/node/wiki/Intl diff --git a/test/common/index.js b/test/common/index.js index 2b90ed66780f75..fc14cdacacc587 100644 --- a/test/common/index.js +++ b/test/common/index.js @@ -25,12 +25,10 @@ const path = require('path'); const fs = require('fs'); const assert = require('assert'); const os = require('os'); -const child_process = require('child_process'); +const { exec, execSync, spawn, spawnSync } = require('child_process'); const stream = require('stream'); -const buffer = require('buffer'); const util = require('util'); const Timer = process.binding('timer_wrap').Timer; -const execSync = require('child_process').execSync; const testRoot = process.env.NODE_TEST_DIR ? fs.realpathSync(process.env.NODE_TEST_DIR) : path.resolve(__dirname, '..'); @@ -54,8 +52,6 @@ exports.isLinux = process.platform === 'linux'; exports.isOSX = process.platform === 'darwin'; exports.enoughTestMem = os.totalmem() > 0x40000000; /* 1 Gb */ -exports.bufferMaxSizeMsg = new RegExp( - `^RangeError: "size" argument must not be larger than ${buffer.kMaxLength}$`); const cpus = os.cpus(); exports.enoughTestCpu = Array.isArray(cpus) && (cpus.length > 1 || cpus[0].speed > 999); @@ -189,7 +185,7 @@ Object.defineProperty(exports, 'inFreeBSDJail', { if (inFreeBSDJail !== null) return inFreeBSDJail; if (exports.isFreeBSD && - child_process.execSync('sysctl -n security.jail.jailed').toString() === + execSync('sysctl -n security.jail.jailed').toString() === '1\n') { inFreeBSDJail = true; } else { @@ -223,7 +219,7 @@ Object.defineProperty(exports, 'localhostIPv4', { }); // opensslCli defined lazily to reduce overhead of spawnSync -Object.defineProperty(exports, 'opensslCli', {get: function() { +Object.defineProperty(exports, 'opensslCli', { get: function() { if (opensslCli !== null) return opensslCli; if (process.config.variables.node_shared_openssl) { @@ -236,13 +232,13 @@ Object.defineProperty(exports, 'opensslCli', {get: function() { if (exports.isWindows) opensslCli += '.exe'; - const opensslCmd = child_process.spawnSync(opensslCli, ['version']); + const opensslCmd = spawnSync(opensslCli, ['version']); if (opensslCmd.status !== 0 || opensslCmd.error !== undefined) { // openssl command cannot be executed opensslCli = false; } return opensslCli; -}, enumerable: true}); +}, enumerable: true }); Object.defineProperty(exports, 'hasCrypto', { get: function() { @@ -286,7 +282,7 @@ exports.childShouldThrowAndAbort = function() { } testCmd += `"${process.argv[0]}" --abort-on-uncaught-exception `; testCmd += `"${process.argv[1]}" child`; - const child = child_process.exec(testCmd); + const child = exec(testCmd); child.on('exit', function onExit(exitCode, signal) { const errMsg = 'Test should have aborted ' + `but instead exited with exit code ${exitCode}` + @@ -306,8 +302,6 @@ exports.ddCommand = function(filename, kilobytes) { exports.spawnPwd = function(options) { - const spawn = require('child_process').spawn; - if (exports.isWindows) { return spawn('cmd.exe', ['/d', '/c', 'cd'], options); } else { @@ -317,8 +311,6 @@ exports.spawnPwd = function(options) { exports.spawnSyncPwd = function(options) { - const spawnSync = require('child_process').spawnSync; - if (exports.isWindows) { return spawnSync('cmd.exe', ['/d', '/c', 'cd'], options); } else { @@ -487,7 +479,7 @@ exports.mustCallAtLeast = function(fn, minimum) { return _mustCallInner(fn, minimum, 'minimum'); }; -function _mustCallInner(fn, criteria, field) { +function _mustCallInner(fn, criteria = 1, field) { if (typeof fn === 'number') { criteria = fn; fn = noop; @@ -495,9 +487,7 @@ function _mustCallInner(fn, criteria, field) { fn = noop; } - if (criteria === undefined) - criteria = 1; - else if (typeof criteria !== 'number') + if (typeof criteria !== 'number') throw new TypeError(`Invalid ${field} value: ${criteria}`); const context = { @@ -701,21 +691,51 @@ Object.defineProperty(exports, 'hasSmallICU', { }); // Useful for testing expected internal/error objects -exports.expectsError = function expectsError({code, type, message}) { - return function(error) { - assert.strictEqual(error.code, code); - if (type !== undefined) { +exports.expectsError = function expectsError(fn, settings, exact) { + if (typeof fn !== 'function') { + exact = settings; + settings = fn; + fn = undefined; + } + const innerFn = exports.mustCall(function(error) { + assert.strictEqual(error.code, settings.code); + if ('type' in settings) { + const type = settings.type; + if (type !== Error && !Error.isPrototypeOf(type)) { + throw new TypeError('`settings.type` must inherit from `Error`'); + } assert(error instanceof type, - `${error} is not the expected type ${type}`); + `${error.name} is not instance of ${type.name}`); + } + if ('message' in settings) { + const message = settings.message; + if (typeof message === 'string') { + assert.strictEqual(error.message, message); + } else { + assert(message.test(error.message), + `${error.message} does not match ${message}`); + } + } + if ('name' in settings) { + assert.strictEqual(error.name, settings.name); } - if (message instanceof RegExp) { - assert(message.test(error.message), - `${error.message} does not match ${message}`); - } else if (typeof message === 'string') { - assert.strictEqual(error.message, message); + if (error.constructor.name === 'AssertionError') { + ['generatedMessage', 'actual', 'expected', 'operator'].forEach((key) => { + if (key in settings) { + const actual = error[key]; + const expected = settings[key]; + assert.strictEqual(actual, expected, + `${key}: expected ${expected}, not ${actual}`); + } + }); } return true; - }; + }, exact); + if (fn) { + assert.throws(fn, innerFn); + return; + } + return innerFn; }; exports.skipIfInspectorDisabled = function skipIfInspectorDisabled() { @@ -764,7 +784,7 @@ exports.getTTYfd = function getTTYfd() { else if (!tty.isatty(tty_fd)) tty_fd++; else { try { - tty_fd = require('fs').openSync('/dev/tty'); + tty_fd = fs.openSync('/dev/tty'); } catch (e) { // There aren't any tty fd's available to use. return -1; From 1813467d27d5e83f824e23f0b0bb0e77fc0e128f Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Mon, 24 Jul 2017 22:56:21 +0200 Subject: [PATCH 046/157] =?UTF-8?q?test:=20upgrade=20tests=20to=20work=20w?= =?UTF-8?q?ith=20master=E2=80=99s=20`common`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/14459 Reviewed-By: Refael Ackermann --- test/parallel/test-assert-fail.js | 2 +- test/parallel/test-assert.js | 6 +--- ...ild-process-spawnsync-validation-errors.js | 2 +- .../test-child-process-validate-stdio.js | 4 +-- test/parallel/test-internal-errors.js | 2 +- test/parallel/test-process-emitwarning.js | 2 +- test/parallel/test-url-format-whatwg.js | 32 +++++++++---------- test/parallel/test-whatwg-url-domainto.js | 2 +- test/parallel/test-whatwg-url-parsing.js | 2 +- ...est-whatwg-url-searchparams-constructor.js | 2 +- test/parallel/test-whatwg-url-searchparams.js | 2 +- 11 files changed, 27 insertions(+), 31 deletions(-) diff --git a/test/parallel/test-assert-fail.js b/test/parallel/test-assert-fail.js index d64947fa1000a6..dac8ce49903f5f 100644 --- a/test/parallel/test-assert-fail.js +++ b/test/parallel/test-assert-fail.js @@ -23,7 +23,7 @@ assert.throws( code: 'ERR_ASSERTION', type: assert.AssertionError, operator: undefined, - actual: undefined, + actual: 'custom message', expected: undefined, message: 'custom message' }) diff --git a/test/parallel/test-assert.js b/test/parallel/test-assert.js index 382123ef870256..1033eaf1ac1330 100644 --- a/test/parallel/test-assert.js +++ b/test/parallel/test-assert.js @@ -143,11 +143,7 @@ assert.throws(makeBlock(a.deepEqual, /a/igm, /a/im), { const re1 = /a/g; re1.lastIndex = 3; - assert.doesNotThrow(makeBlock(a.deepEqual, re1, /a/g), - common.expectsError({ - code: 'ERR_ASSERTION', - message: /^\/a\/g deepEqual \/a\/g$/ - })); + assert.doesNotThrow(makeBlock(a.deepEqual, re1, /a/g)); } assert.doesNotThrow(makeBlock(a.deepEqual, 4, '4'), 'deepEqual(4, \'4\')'); diff --git a/test/parallel/test-child-process-spawnsync-validation-errors.js b/test/parallel/test-child-process-spawnsync-validation-errors.js index dab4b1d37d80f9..b966375288e29c 100644 --- a/test/parallel/test-child-process-spawnsync-validation-errors.js +++ b/test/parallel/test-child-process-spawnsync-validation-errors.js @@ -186,7 +186,7 @@ if (!common.isWindows) { // Validate the killSignal option const typeErr = /^TypeError: "killSignal" must be a string or number$/; const unknownSignalErr = - common.expectsError({ code: 'ERR_UNKNOWN_SIGNAL' }); + common.expectsError({ code: 'ERR_UNKNOWN_SIGNAL' }, 17); pass('killSignal', undefined); pass('killSignal', null); diff --git a/test/parallel/test-child-process-validate-stdio.js b/test/parallel/test-child-process-validate-stdio.js index c6a9bd8e19129c..129ca9822afcd5 100644 --- a/test/parallel/test-child-process-validate-stdio.js +++ b/test/parallel/test-child-process-validate-stdio.js @@ -6,7 +6,7 @@ const assert = require('assert'); const _validateStdio = require('internal/child_process')._validateStdio; const expectedError = - common.expectsError({code: 'ERR_INVALID_OPT_VALUE', type: TypeError}); + common.expectsError({ code: 'ERR_INVALID_OPT_VALUE', type: TypeError }, 2); // should throw if string and not ignore, pipe, or inherit assert.throws(() => _validateStdio('foo'), expectedError); @@ -27,7 +27,7 @@ assert.throws(() => _validateStdio(600), expectedError); // should throw if stdio has ipc and sync is true const stdio2 = ['ipc', 'ipc', 'ipc']; assert.throws(() => _validateStdio(stdio2, true), - common.expectsError({code: 'ERR_IPC_SYNC_FORK', type: Error})); + common.expectsError({ code: 'ERR_IPC_SYNC_FORK', type: Error })); { const stdio3 = [process.stdin, process.stdout, process.stderr]; diff --git a/test/parallel/test-internal-errors.js b/test/parallel/test-internal-errors.js index 8e06bab34944a1..b8cdc840938ca1 100644 --- a/test/parallel/test-internal-errors.js +++ b/test/parallel/test-internal-errors.js @@ -166,7 +166,7 @@ assert.throws(() => { }, common.expectsError({ code: 'TEST_ERROR_1', type: RangeError })); }, common.expectsError({ code: 'ERR_ASSERTION', - message: /^.+ is not the expected type \S/ + message: /^.+ is not instance of \S/ })); assert.throws(() => { diff --git a/test/parallel/test-process-emitwarning.js b/test/parallel/test-process-emitwarning.js index d2d090eae339ee..06772c7be6c210 100644 --- a/test/parallel/test-process-emitwarning.js +++ b/test/parallel/test-process-emitwarning.js @@ -58,7 +58,7 @@ warningThrowToString.toString = function() { process.emitWarning(warningThrowToString); const expectedError = - common.expectsError({code: 'ERR_INVALID_ARG_TYPE', type: TypeError}); + common.expectsError({ code: 'ERR_INVALID_ARG_TYPE', type: TypeError }, 11); // TypeError is thrown on invalid input assert.throws(() => process.emitWarning(1), expectedError); diff --git a/test/parallel/test-url-format-whatwg.js b/test/parallel/test-url-format-whatwg.js index d484760c808584..9174c5a2740ec3 100644 --- a/test/parallel/test-url-format-whatwg.js +++ b/test/parallel/test-url-format-whatwg.js @@ -25,7 +25,7 @@ assert.strictEqual( code: 'ERR_INVALID_ARG_TYPE', type: TypeError, message: 'The "options" argument must be of type object' - }); + }, 4); assert.throws(() => url.format(myURL, true), expectedErr); assert.throws(() => url.format(myURL, 1), expectedErr); assert.throws(() => url.format(myURL, 'test'), expectedErr); @@ -36,76 +36,76 @@ assert.strictEqual( // Any truthy value will be treated as true. assert.strictEqual( - url.format(myURL, {fragment: false}), + url.format(myURL, { fragment: false }), 'http://xn--lck1c3crb1723bpq4a.com/a?a=b' ); assert.strictEqual( - url.format(myURL, {fragment: ''}), + url.format(myURL, { fragment: '' }), 'http://xn--lck1c3crb1723bpq4a.com/a?a=b' ); assert.strictEqual( - url.format(myURL, {fragment: 0}), + url.format(myURL, { fragment: 0 }), 'http://xn--lck1c3crb1723bpq4a.com/a?a=b' ); assert.strictEqual( - url.format(myURL, {fragment: 1}), + url.format(myURL, { fragment: 1 }), 'http://xn--lck1c3crb1723bpq4a.com/a?a=b#c' ); assert.strictEqual( - url.format(myURL, {fragment: {}}), + url.format(myURL, { fragment: {} }), 'http://xn--lck1c3crb1723bpq4a.com/a?a=b#c' ); assert.strictEqual( - url.format(myURL, {search: false}), + url.format(myURL, { search: false }), 'http://xn--lck1c3crb1723bpq4a.com/a#c' ); assert.strictEqual( - url.format(myURL, {search: ''}), + url.format(myURL, { search: '' }), 'http://xn--lck1c3crb1723bpq4a.com/a#c' ); assert.strictEqual( - url.format(myURL, {search: 0}), + url.format(myURL, { search: 0 }), 'http://xn--lck1c3crb1723bpq4a.com/a#c' ); assert.strictEqual( - url.format(myURL, {search: 1}), + url.format(myURL, { search: 1 }), 'http://xn--lck1c3crb1723bpq4a.com/a?a=b#c' ); assert.strictEqual( - url.format(myURL, {search: {}}), + url.format(myURL, { search: {} }), 'http://xn--lck1c3crb1723bpq4a.com/a?a=b#c' ); assert.strictEqual( - url.format(myURL, {unicode: true}), + url.format(myURL, { unicode: true }), 'http://理容ナカムラ.com/a?a=b#c' ); assert.strictEqual( - url.format(myURL, {unicode: 1}), + url.format(myURL, { unicode: 1 }), 'http://理容ナカムラ.com/a?a=b#c' ); assert.strictEqual( - url.format(myURL, {unicode: {}}), + url.format(myURL, { unicode: {} }), 'http://理容ナカムラ.com/a?a=b#c' ); assert.strictEqual( - url.format(myURL, {unicode: false}), + url.format(myURL, { unicode: false }), 'http://xn--lck1c3crb1723bpq4a.com/a?a=b#c' ); assert.strictEqual( - url.format(myURL, {unicode: 0}), + url.format(myURL, { unicode: 0 }), 'http://xn--lck1c3crb1723bpq4a.com/a?a=b#c' ); diff --git a/test/parallel/test-whatwg-url-domainto.js b/test/parallel/test-whatwg-url-domainto.js index bfd5e94d2e5dd8..9e22068a9261f8 100644 --- a/test/parallel/test-whatwg-url-domainto.js +++ b/test/parallel/test-whatwg-url-domainto.js @@ -13,7 +13,7 @@ const wptToASCIITests = require('../fixtures/url-toascii.js'); { const expectedError = common.expectsError( - { code: 'ERR_MISSING_ARGS', type: TypeError }); + { code: 'ERR_MISSING_ARGS', type: TypeError }, 2); assert.throws(() => domainToASCII(), expectedError); assert.throws(() => domainToUnicode(), expectedError); assert.strictEqual(domainToASCII(undefined), 'undefined'); diff --git a/test/parallel/test-whatwg-url-parsing.js b/test/parallel/test-whatwg-url-parsing.js index 39756449c08c6a..2c1d15d10ce351 100644 --- a/test/parallel/test-whatwg-url-parsing.js +++ b/test/parallel/test-whatwg-url-parsing.js @@ -26,7 +26,7 @@ const failureTests = tests.filter((test) => test.failure).concat([ ]); const expectedError = common.expectsError( - { code: 'ERR_INVALID_URL', type: TypeError }); + { code: 'ERR_INVALID_URL', type: TypeError }, 102); for (const test of failureTests) { assert.throws( diff --git a/test/parallel/test-whatwg-url-searchparams-constructor.js b/test/parallel/test-whatwg-url-searchparams-constructor.js index 8920a03943bb5d..b6e720cc7fb04c 100644 --- a/test/parallel/test-whatwg-url-searchparams-constructor.js +++ b/test/parallel/test-whatwg-url-searchparams-constructor.js @@ -210,7 +210,7 @@ function makeIterableFunc(array) { code: 'ERR_INVALID_TUPLE', type: TypeError, message: 'Each query pair must be an iterable [name, value] tuple' - }); + }, 6); let params; params = new URLSearchParams(undefined); diff --git a/test/parallel/test-whatwg-url-searchparams.js b/test/parallel/test-whatwg-url-searchparams.js index 5bb9cf407dc1e9..db7f9a491719dc 100644 --- a/test/parallel/test-whatwg-url-searchparams.js +++ b/test/parallel/test-whatwg-url-searchparams.js @@ -76,7 +76,7 @@ sp.forEach(function() { const callbackErr = common.expectsError({ code: 'ERR_INVALID_CALLBACK', type: TypeError - }); + }, 2); assert.throws(() => sp.forEach(), callbackErr); assert.throws(() => sp.forEach(1), callbackErr); } From f2efdc880f8edd2cd0d2e7268a77a6c56591e3cc Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Wed, 28 Jun 2017 21:53:18 -0400 Subject: [PATCH 047/157] n-api: add code parameter to error helpers In support of the effort to add error codes to all errors generated by Node.js, add an optional code parameter to the helper functions used to throw/create errors in N-API. Backport-PR-URL: https://github.com/nodejs/node/pull/14453 Backport-Reviewed-By: James M Snell PR-URL: https://github.com/nodejs/node/pull/13988 Fixes: https://github.com/nodejs/node/issues/13933 Reviewed-By: James M Snell Reviewed-By: Anna Henningsen --- doc/api/n-api.md | 49 ++++++- lib/internal/errors.js | 4 + src/node_api.cc | 120 ++++++++++++++++-- src/node_api.h | 15 ++- test/addons-napi/common.h | 3 +- test/addons-napi/test_async/test_async.cc | 6 +- test/addons-napi/test_error/test.js | 62 +++++++++ test/addons-napi/test_error/test_error.cc | 76 ++++++++++- .../test_typedarray/test_typedarray.c | 2 +- 9 files changed, 305 insertions(+), 32 deletions(-) diff --git a/doc/api/n-api.md b/doc/api/n-api.md index 1a6c9e143ed61c..924e39e9b75f73 100644 --- a/doc/api/n-api.md +++ b/doc/api/n-api.md @@ -323,6 +323,31 @@ code needs to create an Error object: [`napi_create_error`][], where result is the napi_value that refers to the newly created JavaScript Error object. +The Node.js project is adding error codes to all of the errors +generated internally. The goal is for applications to use these +error codes for all error checking. The associated error messages +will remain, but will only be meant to be used for logging and +display with the expectation that the message can change without +SemVer applying. In order to support this model with N-API, both +in internal functionality and for module specific functionality +(as its good practice), the `throw_` and `create_` functions +take an optional code parameter which is the string for the code +to be added to the error object. If the optional parameter is NULL +then no code will be associated with the error. If a code is provided, +the name associated with the error is also updated to be: + +``` +originalName [code] +``` + +where originalName is the original name associated with the error +and code is the code that was provided. For example if the code +is 'ERR_ERROR_1' and a TypeError is being created the name will be: + +``` +TypeError [ERR_ERROR_1] +``` + #### napi_throw ```C -NODE_EXTERN napi_status napi_throw_error(napi_env env, const char* msg); +NODE_EXTERN napi_status napi_throw_error(napi_env env, + const char* code, + const char* msg); ``` - `[in] env`: The environment that the API is invoked under. +- `[in] code`: Optional error code to be set on the error. - `[in] msg`: C string representing the text to be associated with the error. @@ -358,9 +386,12 @@ This API throws a JavaScript Error with the text provided. added: v8.0.0 --> ```C -NODE_EXTERN napi_status napi_throw_type_error(napi_env env, const char* msg); +NODE_EXTERN napi_status napi_throw_type_error(napi_env env, + const char* code, + const char* msg); ``` - `[in] env`: The environment that the API is invoked under. +- `[in] code`: Optional error code to be set on the error. - `[in] msg`: C string representing the text to be associated with the error. @@ -373,9 +404,12 @@ This API throws a JavaScript TypeError with the text provided. added: v8.0.0 --> ```C -NODE_EXTERN napi_status napi_throw_range_error(napi_env env, const char* msg); +NODE_EXTERN napi_status napi_throw_range_error(napi_env env, + const char* code, + const char* msg); ``` - `[in] env`: The environment that the API is invoked under. +- `[in] code`: Optional error code to be set on the error. - `[in] msg`: C string representing the text to be associated with the error. @@ -409,10 +443,13 @@ added: v8.0.0 --> ```C NODE_EXTERN napi_status napi_create_error(napi_env env, + napi_value code, napi_value msg, napi_value* result); ``` - `[in] env`: The environment that the API is invoked under. +- `[in] code`: Optional `napi_value` with the string for the error code to + be associated with the error. - `[in] msg`: napi_value that references a JavaScript String to be used as the message for the Error. - `[out] result`: `napi_value` representing the error created. @@ -427,10 +464,13 @@ added: v8.0.0 --> ```C NODE_EXTERN napi_status napi_create_type_error(napi_env env, + napi_value code, napi_value msg, napi_value* result); ``` - `[in] env`: The environment that the API is invoked under. +- `[in] code`: Optional `napi_value` with the string for the error code to + be associated with the error. - `[in] msg`: napi_value that references a JavaScript String to be used as the message for the Error. - `[out] result`: `napi_value` representing the error created. @@ -446,10 +486,13 @@ added: v8.0.0 --> ```C NODE_EXTERN napi_status napi_create_range_error(napi_env env, + napi_value code, const char* msg, napi_value* result); ``` - `[in] env`: The environment that the API is invoked under. +- `[in] code`: Optional `napi_value` with the string for the error code to + be associated with the error. - `[in] msg`: napi_value that references a JavaScript String to be used as the message for the Error. - `[out] result`: `napi_value` representing the error created. diff --git a/lib/internal/errors.js b/lib/internal/errors.js index 402377a3a17287..7725f4560dc885 100644 --- a/lib/internal/errors.js +++ b/lib/internal/errors.js @@ -143,6 +143,10 @@ E('ERR_UNKNOWN_BUILTIN_MODULE', (id) => `No such built-in module: ${id}`); E('ERR_UNKNOWN_SIGNAL', (signal) => `Unknown signal: ${signal}`); E('ERR_UNKNOWN_STDIN_TYPE', 'Unknown stdin file type'); E('ERR_UNKNOWN_STREAM_TYPE', 'Unknown stream file type'); +E('ERR_NAPI_CONS_FUNCTION', 'Constructor must be a function'); +E('ERR_NAPI_CONS_PROTOTYPE_OBJECT', 'Constructor.prototype must be an object'); +E('ERR_NO_CRYPTO', 'Node.js is not compiled with OpenSSL crypto support'); +E('ERR_PARSE_HISTORY_DATA', 'Could not parse history data in %s'); E('ERR_SOCKET_ALREADY_BOUND', 'Socket is already bound'); E('ERR_SOCKET_BAD_TYPE', 'Bad socket type specified. Valid types are: udp4, udp6'); diff --git a/src/node_api.cc b/src/node_api.cc index d7df50e2b5729f..5818cb25c1b6e8 100644 --- a/src/node_api.cc +++ b/src/node_api.cc @@ -18,6 +18,7 @@ #include "uv.h" #include "node_api.h" #include "node_internals.h" +#include "util.h" #define NAPI_VERSION 1 @@ -1527,7 +1528,61 @@ napi_status napi_create_symbol(napi_env env, return GET_RETURN_STATUS(env); } +static napi_status set_error_code(napi_env env, + v8::Local error, + napi_value code, + const char* code_cstring) { + if ((code != nullptr) || (code_cstring != nullptr)) { + v8::Isolate* isolate = env->isolate; + v8::Local context = isolate->GetCurrentContext(); + v8::Local err_object = error.As(); + + v8::Local code_value = v8impl::V8LocalValueFromJsValue(code); + if (code != nullptr) { + code_value = v8impl::V8LocalValueFromJsValue(code); + RETURN_STATUS_IF_FALSE(env, code_value->IsString(), napi_string_expected); + } else { + CHECK_NEW_FROM_UTF8(env, code_value, code_cstring); + } + + v8::Local code_key; + CHECK_NEW_FROM_UTF8(env, code_key, "code"); + + v8::Maybe set_maybe = err_object->Set(context, code_key, code_value); + RETURN_STATUS_IF_FALSE(env, + set_maybe.FromMaybe(false), + napi_generic_failure); + + // now update the name to be "name [code]" where name is the + // original name and code is the code associated with the Error + v8::Local name_string; + CHECK_NEW_FROM_UTF8(env, name_string, ""); + v8::Local name_key; + CHECK_NEW_FROM_UTF8(env, name_key, "name"); + + auto maybe_name = err_object->Get(context, name_key); + if (!maybe_name.IsEmpty()) { + v8::Local name = maybe_name.ToLocalChecked(); + if (name->IsString()) { + name_string = v8::String::Concat(name_string, name.As()); + } + } + name_string = v8::String::Concat(name_string, + FIXED_ONE_BYTE_STRING(isolate, " [")); + name_string = v8::String::Concat(name_string, code_value.As()); + name_string = v8::String::Concat(name_string, + FIXED_ONE_BYTE_STRING(isolate, "]")); + + set_maybe = err_object->Set(context, name_key, name_string); + RETURN_STATUS_IF_FALSE(env, + set_maybe.FromMaybe(false), + napi_generic_failure); + } + return napi_ok; +} + napi_status napi_create_error(napi_env env, + napi_value code, napi_value msg, napi_value* result) { NAPI_PREAMBLE(env); @@ -1537,13 +1592,18 @@ napi_status napi_create_error(napi_env env, v8::Local message_value = v8impl::V8LocalValueFromJsValue(msg); RETURN_STATUS_IF_FALSE(env, message_value->IsString(), napi_string_expected); - *result = v8impl::JsValueFromV8LocalValue(v8::Exception::Error( - message_value.As())); + v8::Local error_obj = + v8::Exception::Error(message_value.As()); + napi_status status = set_error_code(env, error_obj, code, nullptr); + if (status != napi_ok) return status; + + *result = v8impl::JsValueFromV8LocalValue(error_obj); return GET_RETURN_STATUS(env); } napi_status napi_create_type_error(napi_env env, + napi_value code, napi_value msg, napi_value* result) { NAPI_PREAMBLE(env); @@ -1553,13 +1613,18 @@ napi_status napi_create_type_error(napi_env env, v8::Local message_value = v8impl::V8LocalValueFromJsValue(msg); RETURN_STATUS_IF_FALSE(env, message_value->IsString(), napi_string_expected); - *result = v8impl::JsValueFromV8LocalValue(v8::Exception::TypeError( - message_value.As())); + v8::Local error_obj = + v8::Exception::TypeError(message_value.As()); + napi_status status = set_error_code(env, error_obj, code, nullptr); + if (status != napi_ok) return status; + + *result = v8impl::JsValueFromV8LocalValue(error_obj); return GET_RETURN_STATUS(env); } napi_status napi_create_range_error(napi_env env, + napi_value code, napi_value msg, napi_value* result) { NAPI_PREAMBLE(env); @@ -1569,8 +1634,12 @@ napi_status napi_create_range_error(napi_env env, v8::Local message_value = v8impl::V8LocalValueFromJsValue(msg); RETURN_STATUS_IF_FALSE(env, message_value->IsString(), napi_string_expected); - *result = v8impl::JsValueFromV8LocalValue(v8::Exception::RangeError( - message_value.As())); + v8::Local error_obj = + v8::Exception::RangeError(message_value.As()); + napi_status status = set_error_code(env, error_obj, code, nullptr); + if (status != napi_ok) return status; + + *result = v8impl::JsValueFromV8LocalValue(error_obj); return GET_RETURN_STATUS(env); } @@ -1743,40 +1812,58 @@ napi_status napi_throw(napi_env env, napi_value error) { return napi_clear_last_error(env); } -napi_status napi_throw_error(napi_env env, const char* msg) { +napi_status napi_throw_error(napi_env env, + const char* code, + const char* msg) { NAPI_PREAMBLE(env); v8::Isolate* isolate = env->isolate; v8::Local str; CHECK_NEW_FROM_UTF8(env, str, msg); - isolate->ThrowException(v8::Exception::Error(str)); + v8::Local error_obj = v8::Exception::Error(str); + napi_status status = set_error_code(env, error_obj, nullptr, code); + if (status != napi_ok) return status; + + isolate->ThrowException(error_obj); // any VM calls after this point and before returning // to the javascript invoker will fail return napi_clear_last_error(env); } -napi_status napi_throw_type_error(napi_env env, const char* msg) { +napi_status napi_throw_type_error(napi_env env, + const char* code, + const char* msg) { NAPI_PREAMBLE(env); v8::Isolate* isolate = env->isolate; v8::Local str; CHECK_NEW_FROM_UTF8(env, str, msg); - isolate->ThrowException(v8::Exception::TypeError(str)); + v8::Local error_obj = v8::Exception::TypeError(str); + napi_status status = set_error_code(env, error_obj, nullptr, code); + if (status != napi_ok) return status; + + isolate->ThrowException(error_obj); // any VM calls after this point and before returning // to the javascript invoker will fail return napi_clear_last_error(env); } -napi_status napi_throw_range_error(napi_env env, const char* msg) { +napi_status napi_throw_range_error(napi_env env, + const char* code, + const char* msg) { NAPI_PREAMBLE(env); v8::Isolate* isolate = env->isolate; v8::Local str; CHECK_NEW_FROM_UTF8(env, str, msg); - isolate->ThrowException(v8::Exception::RangeError(str)); + v8::Local error_obj = v8::Exception::RangeError(str); + napi_status status = set_error_code(env, error_obj, nullptr, code); + if (status != napi_ok) return status; + + isolate->ThrowException(error_obj); // any VM calls after this point and before returning // to the javascript invoker will fail return napi_clear_last_error(env); @@ -2415,7 +2502,9 @@ napi_status napi_instanceof(napi_env env, CHECK_TO_OBJECT(env, context, ctor, constructor); if (!ctor->IsFunction()) { - napi_throw_type_error(env, "constructor must be a function"); + napi_throw_type_error(env, + "ERR_NAPI_CONS_FUNCTION", + "Constructor must be a function"); return napi_set_last_error(env, napi_function_expected); } @@ -2483,7 +2572,10 @@ napi_status napi_instanceof(napi_env env, v8::Local prototype_property = maybe_prototype.ToLocalChecked(); if (!prototype_property->IsObject()) { - napi_throw_type_error(env, "constructor.prototype must be an object"); + napi_throw_type_error( + env, + "ERR_NAPI_CONS_PROTOTYPE_OBJECT", + "Constructor.prototype must be an object"); return napi_set_last_error(env, napi_object_expected); } diff --git a/src/node_api.h b/src/node_api.h index d60ddf7466ef1f..f4d097ad104cf9 100644 --- a/src/node_api.h +++ b/src/node_api.h @@ -151,12 +151,15 @@ NAPI_EXTERN napi_status napi_create_function(napi_env env, void* data, napi_value* result); NAPI_EXTERN napi_status napi_create_error(napi_env env, + napi_value code, napi_value msg, napi_value* result); NAPI_EXTERN napi_status napi_create_type_error(napi_env env, + napi_value code, napi_value msg, napi_value* result); NAPI_EXTERN napi_status napi_create_range_error(napi_env env, + napi_value code, napi_value msg, napi_value* result); @@ -413,9 +416,15 @@ NAPI_EXTERN napi_status napi_escape_handle(napi_env env, // Methods to support error handling NAPI_EXTERN napi_status napi_throw(napi_env env, napi_value error); -NAPI_EXTERN napi_status napi_throw_error(napi_env env, const char* msg); -NAPI_EXTERN napi_status napi_throw_type_error(napi_env env, const char* msg); -NAPI_EXTERN napi_status napi_throw_range_error(napi_env env, const char* msg); +NAPI_EXTERN napi_status napi_throw_error(napi_env env, + const char* code, + const char* msg); +NAPI_EXTERN napi_status napi_throw_type_error(napi_env env, + const char* code, + const char* msg); +NAPI_EXTERN napi_status napi_throw_range_error(napi_env env, + const char* code, + const char* msg); NAPI_EXTERN napi_status napi_is_error(napi_env env, napi_value value, bool* result); diff --git a/test/addons-napi/common.h b/test/addons-napi/common.h index e9640935d4154b..422418ced49a39 100644 --- a/test/addons-napi/common.h +++ b/test/addons-napi/common.h @@ -12,7 +12,7 @@ const char* error_message = error_info->error_message != NULL ? \ error_info->error_message : \ "empty error message"; \ - napi_throw_error((env), error_message); \ + napi_throw_error((env), NULL, error_message); \ } \ } while (0) @@ -21,6 +21,7 @@ if (!(assertion)) { \ napi_throw_error( \ (env), \ + NULL, \ "assertion (" #assertion ") failed: " message); \ return ret_val; \ } \ diff --git a/test/addons-napi/test_async/test_async.cc b/test/addons-napi/test_async/test_async.cc index cc7bc334304323..f257b268b93159 100644 --- a/test/addons-napi/test_async/test_async.cc +++ b/test/addons-napi/test_async/test_async.cc @@ -29,7 +29,7 @@ void Execute(napi_env env, void* data) { carrier* c = static_cast(data); if (c != &the_carrier) { - napi_throw_type_error(env, "Wrong data parameter to Execute."); + napi_throw_type_error(env, nullptr, "Wrong data parameter to Execute."); return; } @@ -40,12 +40,12 @@ void Complete(napi_env env, napi_status status, void* data) { carrier* c = static_cast(data); if (c != &the_carrier) { - napi_throw_type_error(env, "Wrong data parameter to Complete."); + napi_throw_type_error(env, nullptr, "Wrong data parameter to Complete."); return; } if (status != napi_ok) { - napi_throw_type_error(env, "Execute callback failed."); + napi_throw_type_error(env, nullptr, "Execute callback failed."); return; } diff --git a/test/addons-napi/test_error/test.js b/test/addons-napi/test_error/test.js index f7479f2c9a64d8..80f99f48ba79f3 100644 --- a/test/addons-napi/test_error/test.js +++ b/test/addons-napi/test_error/test.js @@ -72,6 +72,30 @@ assert.throws(() => { test_error.throwTypeError(); }, /^TypeError: type error$/); +assert.throws( + () => test_error.throwErrorCode(), + common.expectsError({ + code: 'ERR_TEST_CODE', + message: 'Error [error]' + }) +); + +assert.throws( + () => test_error.throwRangeErrorCode(), + common.expectsError({ + code: 'ERR_TEST_CODE', + message: 'RangeError [range error]' + }) +); + +assert.throws( + () => test_error.throwTypeErrorCode(), + common.expectsError({ + code: 'ERR_TEST_CODE', + message: 'TypeError [type error]' + }) +); + let error = test_error.createError(); assert.ok(error instanceof Error, 'expected error to be an instance of Error'); assert.strictEqual(error.message, 'error', 'expected message to be "error"'); @@ -89,3 +113,41 @@ assert.ok(error instanceof TypeError, assert.strictEqual(error.message, 'type error', 'expected message to be "type error"'); + +error = test_error.createErrorCode(); +assert.ok(error instanceof Error, 'expected error to be an instance of Error'); +assert.strictEqual(error.code, + 'ERR_TEST_CODE', + 'expected code to be "ERR_TEST_CODE"'); +assert.strictEqual(error.message, + 'Error [error]', + 'expected message to be "Error [error]"'); +assert.strictEqual(error.name, + 'Error [ERR_TEST_CODE]', + 'expected name to be "Error [ERR_TEST_CODE]"'); + +error = test_error.createRangeErrorCode(); +assert.ok(error instanceof RangeError, + 'expected error to be an instance of RangeError'); +assert.strictEqual(error.message, + 'RangeError [range error]', + 'expected message to be "RangeError [range error]"'); +assert.strictEqual(error.code, + 'ERR_TEST_CODE', + 'expected code to be "ERR_TEST_CODE"'); +assert.strictEqual(error.name, + 'RangeError [ERR_TEST_CODE]', + 'expected name to be "RangeError[ERR_TEST_CODE]"'); + +error = test_error.createTypeErrorCode(); +assert.ok(error instanceof TypeError, + 'expected error to be an instance of TypeError'); +assert.strictEqual(error.message, + 'TypeError [type error]', + 'expected message to be "TypeError [type error]"'); +assert.strictEqual(error.code, + 'ERR_TEST_CODE', + 'expected code to be "ERR_TEST_CODE"'); +assert.strictEqual(error.name, + 'TypeError [ERR_TEST_CODE]', + 'expected name to be "TypeError[ERR_TEST_CODE]"'); diff --git a/test/addons-napi/test_error/test_error.cc b/test/addons-napi/test_error/test_error.cc index ddba2059f23be6..29aba1f1ef62f6 100644 --- a/test/addons-napi/test_error/test_error.cc +++ b/test/addons-napi/test_error/test_error.cc @@ -19,31 +19,51 @@ napi_value throwExistingError(napi_env env, napi_callback_info info) { napi_value message; napi_value error; NAPI_CALL(env, napi_create_string_utf8(env, "existing error", -1, &message)); - NAPI_CALL(env, napi_create_error(env, message, &error)); + NAPI_CALL(env, napi_create_error(env, nullptr, message, &error)); NAPI_CALL(env, napi_throw(env, error)); return nullptr; } napi_value throwError(napi_env env, napi_callback_info info) { - NAPI_CALL(env, napi_throw_error(env, "error")); + NAPI_CALL(env, napi_throw_error(env, nullptr, "error")); return nullptr; } napi_value throwRangeError(napi_env env, napi_callback_info info) { - NAPI_CALL(env, napi_throw_range_error(env, "range error")); + NAPI_CALL(env, napi_throw_range_error(env, nullptr, "range error")); return nullptr; } napi_value throwTypeError(napi_env env, napi_callback_info info) { - NAPI_CALL(env, napi_throw_type_error(env, "type error")); + NAPI_CALL(env, napi_throw_type_error(env, nullptr, "type error")); return nullptr; } +napi_value throwErrorCode(napi_env env, napi_callback_info info) { + NAPI_CALL(env, napi_throw_error(env, "ERR_TEST_CODE", "Error [error]")); + return nullptr; +} + +napi_value throwRangeErrorCode(napi_env env, napi_callback_info info) { + NAPI_CALL(env, napi_throw_range_error(env, + "ERR_TEST_CODE", + "RangeError [range error]")); + return nullptr; +} + +napi_value throwTypeErrorCode(napi_env env, napi_callback_info info) { + NAPI_CALL(env, napi_throw_type_error(env, + "ERR_TEST_CODE", + "TypeError [type error]")); + return nullptr; +} + + napi_value createError(napi_env env, napi_callback_info info) { napi_value result; napi_value message; NAPI_CALL(env, napi_create_string_utf8(env, "error", -1, &message)); - NAPI_CALL(env, napi_create_error(env, message, &result)); + NAPI_CALL(env, napi_create_error(env, nullptr, message, &result)); return result; } @@ -51,7 +71,7 @@ napi_value createRangeError(napi_env env, napi_callback_info info) { napi_value result; napi_value message; NAPI_CALL(env, napi_create_string_utf8(env, "range error", -1, &message)); - NAPI_CALL(env, napi_create_range_error(env, message, &result)); + NAPI_CALL(env, napi_create_range_error(env, nullptr, message, &result)); return result; } @@ -59,7 +79,43 @@ napi_value createTypeError(napi_env env, napi_callback_info info) { napi_value result; napi_value message; NAPI_CALL(env, napi_create_string_utf8(env, "type error", -1, &message)); - NAPI_CALL(env, napi_create_type_error(env, message, &result)); + NAPI_CALL(env, napi_create_type_error(env, nullptr, message, &result)); + return result; +} + +napi_value createErrorCode(napi_env env, napi_callback_info info) { + napi_value result; + napi_value message; + napi_value code; + NAPI_CALL(env, napi_create_string_utf8(env, "Error [error]", -1, &message)); + NAPI_CALL(env, napi_create_string_utf8(env, "ERR_TEST_CODE", -1, &code)); + NAPI_CALL(env, napi_create_error(env, code, message, &result)); + return result; +} + +napi_value createRangeErrorCode(napi_env env, napi_callback_info info) { + napi_value result; + napi_value message; + napi_value code; + NAPI_CALL(env, napi_create_string_utf8(env, + "RangeError [range error]", + -1, + &message)); + NAPI_CALL(env, napi_create_string_utf8(env, "ERR_TEST_CODE", -1, &code)); + NAPI_CALL(env, napi_create_range_error(env, code, message, &result)); + return result; +} + +napi_value createTypeErrorCode(napi_env env, napi_callback_info info) { + napi_value result; + napi_value message; + napi_value code; + NAPI_CALL(env, napi_create_string_utf8(env, + "TypeError [type error]", + -1, + &message)); + NAPI_CALL(env, napi_create_string_utf8(env, "ERR_TEST_CODE", -1, &code)); + NAPI_CALL(env, napi_create_type_error(env, code, message, &result)); return result; } @@ -70,9 +126,15 @@ void Init(napi_env env, napi_value exports, napi_value module, void* priv) { DECLARE_NAPI_PROPERTY("throwError", throwError), DECLARE_NAPI_PROPERTY("throwRangeError", throwRangeError), DECLARE_NAPI_PROPERTY("throwTypeError", throwTypeError), + DECLARE_NAPI_PROPERTY("throwErrorCode", throwErrorCode), + DECLARE_NAPI_PROPERTY("throwRangeErrorCode", throwRangeErrorCode), + DECLARE_NAPI_PROPERTY("throwTypeErrorCode", throwTypeErrorCode), DECLARE_NAPI_PROPERTY("createError", createError), DECLARE_NAPI_PROPERTY("createRangeError", createRangeError), DECLARE_NAPI_PROPERTY("createTypeError", createTypeError), + DECLARE_NAPI_PROPERTY("createErrorCode", createErrorCode), + DECLARE_NAPI_PROPERTY("createRangeErrorCode", createRangeErrorCode), + DECLARE_NAPI_PROPERTY("createTypeErrorCode", createTypeErrorCode), }; NAPI_CALL_RETURN_VOID(env, napi_define_properties( diff --git a/test/addons-napi/test_typedarray/test_typedarray.c b/test/addons-napi/test_typedarray/test_typedarray.c index 4194492cae8b3a..ffc118681bad9e 100644 --- a/test/addons-napi/test_typedarray/test_typedarray.c +++ b/test/addons-napi/test_typedarray/test_typedarray.c @@ -65,7 +65,7 @@ napi_value Multiply(napi_env env, napi_callback_info info) { output_doubles[i] = input_doubles[i] * multiplier; } } else { - napi_throw_error(env, "Typed array was of a type not expected by test."); + napi_throw_error(env, NULL, "Typed array was of a type not expected by test."); return NULL; } From 142ce5ce2c658299aafee8ed722579fa33cf08ef Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Mon, 24 Jul 2017 18:45:53 +0200 Subject: [PATCH 048/157] errors: order internal errors list alphabetically To make backporting easier. PR-URL: https://github.com/nodejs/node/pull/14453 Reviewed-By: James M Snell --- lib/internal/errors.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/internal/errors.js b/lib/internal/errors.js index 7725f4560dc885..985d2fb57ee6b6 100644 --- a/lib/internal/errors.js +++ b/lib/internal/errors.js @@ -137,12 +137,6 @@ E('ERR_IPC_DISCONNECTED', 'IPC channel is already disconnected'); E('ERR_IPC_ONE_PIPE', 'Child process can have only one IPC pipe'); E('ERR_IPC_SYNC_FORK', 'IPC cannot be used with synchronous forks'); E('ERR_MISSING_ARGS', missingArgs); -E('ERR_STDERR_CLOSE', 'process.stderr cannot be closed'); -E('ERR_STDOUT_CLOSE', 'process.stdout cannot be closed'); -E('ERR_UNKNOWN_BUILTIN_MODULE', (id) => `No such built-in module: ${id}`); -E('ERR_UNKNOWN_SIGNAL', (signal) => `Unknown signal: ${signal}`); -E('ERR_UNKNOWN_STDIN_TYPE', 'Unknown stdin file type'); -E('ERR_UNKNOWN_STREAM_TYPE', 'Unknown stream file type'); E('ERR_NAPI_CONS_FUNCTION', 'Constructor must be a function'); E('ERR_NAPI_CONS_PROTOTYPE_OBJECT', 'Constructor.prototype must be an object'); E('ERR_NO_CRYPTO', 'Node.js is not compiled with OpenSSL crypto support'); @@ -153,6 +147,12 @@ E('ERR_SOCKET_BAD_TYPE', E('ERR_SOCKET_CANNOT_SEND', 'Unable to send data'); E('ERR_SOCKET_BAD_PORT', 'Port should be > 0 and < 65536'); E('ERR_SOCKET_DGRAM_NOT_RUNNING', 'Not running'); +E('ERR_STDERR_CLOSE', 'process.stderr cannot be closed'); +E('ERR_STDOUT_CLOSE', 'process.stdout cannot be closed'); +E('ERR_UNKNOWN_BUILTIN_MODULE', (id) => `No such built-in module: ${id}`); +E('ERR_UNKNOWN_SIGNAL', (signal) => `Unknown signal: ${signal}`); +E('ERR_UNKNOWN_STDIN_TYPE', 'Unknown stdin file type'); +E('ERR_UNKNOWN_STREAM_TYPE', 'Unknown stream file type'); // Add new errors from here... function invalidArgType(name, expected, actual) { From 751e87338fc60fbf65a705929f7d30ce849b8571 Mon Sep 17 00:00:00 2001 From: Trevor Norris Date: Fri, 21 Jul 2017 17:10:56 -0600 Subject: [PATCH 049/157] http: check for handle before running asyncReset() If an uninitialized or user supplied Socket is in the freeSockets list of the Agent it would automatically attempt to run ._handle.asyncReset(), but would throw from those not existing. Guard against that by first checking that they exist. PR-URL: https://github.com/nodejs/node/pull/14419 Fixes: https://github.com/nodejs/node/issues/13539 Refs: https://github.com/nodejs/node/issues/13352 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Refael Ackermann --- lib/_http_agent.js | 9 ++++-- ...st-http-agent-uninitialized-with-handle.js | 30 +++++++++++++++++++ .../parallel/test-http-agent-uninitialized.js | 25 ++++++++++++++++ 3 files changed, 61 insertions(+), 3 deletions(-) create mode 100644 test/parallel/test-http-agent-uninitialized-with-handle.js create mode 100644 test/parallel/test-http-agent-uninitialized.js diff --git a/lib/_http_agent.js b/lib/_http_agent.js index 426cf5b502702a..ddd36c158ec3ca 100644 --- a/lib/_http_agent.js +++ b/lib/_http_agent.js @@ -167,9 +167,12 @@ Agent.prototype.addRequest = function addRequest(req, options, port/*legacy*/, if (freeLen) { // we have a free socket, so use that. var socket = this.freeSockets[name].shift(); - // Assign the handle a new asyncId and run any init() hooks. - socket._handle.asyncReset(); - socket[async_id_symbol] = socket._handle.getAsyncId(); + // Guard against an uninitialized or user supplied Socket. + if (socket._handle && typeof socket._handle.asyncReset === 'function') { + // Assign the handle a new asyncId and run any init() hooks. + socket._handle.asyncReset(); + socket[async_id_symbol] = socket._handle.getAsyncId(); + } // don't leak if (!this.freeSockets[name].length) diff --git a/test/parallel/test-http-agent-uninitialized-with-handle.js b/test/parallel/test-http-agent-uninitialized-with-handle.js new file mode 100644 index 00000000000000..fab32ade45efe4 --- /dev/null +++ b/test/parallel/test-http-agent-uninitialized-with-handle.js @@ -0,0 +1,30 @@ +'use strict'; + +const common = require('../common'); +const http = require('http'); +const net = require('net'); + +const agent = new http.Agent({ + keepAlive: true, +}); +const socket = new net.Socket(); +// If _handle exists then internals assume a couple methods exist. +socket._handle = { + ref() { }, + readStart() { }, +}; +const req = new http.ClientRequest(`http://localhost:${common.PORT}/`); + +const server = http.createServer(common.mustCall((req, res) => { + res.end(); +})).listen(common.PORT, common.mustCall(() => { + // Manually add the socket without a _handle. + agent.freeSockets[agent.getName(req)] = [socket]; + // Now force the agent to use the socket and check that _handle exists before + // calling asyncReset(). + agent.addRequest(req, {}); + req.on('response', common.mustCall(() => { + server.close(); + })); + req.end(); +})); diff --git a/test/parallel/test-http-agent-uninitialized.js b/test/parallel/test-http-agent-uninitialized.js new file mode 100644 index 00000000000000..c522b5fdbd43e9 --- /dev/null +++ b/test/parallel/test-http-agent-uninitialized.js @@ -0,0 +1,25 @@ +'use strict'; + +const common = require('../common'); +const http = require('http'); +const net = require('net'); + +const agent = new http.Agent({ + keepAlive: true, +}); +const socket = new net.Socket(); +const req = new http.ClientRequest(`http://localhost:${common.PORT}/`); + +const server = http.createServer(common.mustCall((req, res) => { + res.end(); +})).listen(common.PORT, common.mustCall(() => { + // Manually add the socket without a _handle. + agent.freeSockets[agent.getName(req)] = [socket]; + // Now force the agent to use the socket and check that _handle exists before + // calling asyncReset(). + agent.addRequest(req, {}); + req.on('response', common.mustCall(() => { + server.close(); + })); + req.end(); +})); From 3c50c592a5c52f3ca66d96ebbb57628f32c26390 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AC=91=E6=96=8C?= Date: Sun, 16 Jul 2017 16:21:16 +0800 Subject: [PATCH 050/157] test: replace concatenation with template literals MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/14293 Reviewed-By: Rich Trott Reviewed-By: Michaël Zasso Reviewed-By: Gibson Fahnestock Reviewed-By: Benjamin Gruenbaum Reviewed-By: Gireesh Punathil --- test/inspector/inspector-helper.js | 2 +- test/parallel/test-https-server-keep-alive-timeout.js | 4 ++-- test/sequential/test-debugger-debug-brk.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/inspector/inspector-helper.js b/test/inspector/inspector-helper.js index bc6097436425af..a640bb8f66fbc4 100644 --- a/test/inspector/inspector-helper.js +++ b/test/inspector/inspector-helper.js @@ -393,7 +393,7 @@ Harness.prototype.addStderrFilter = function(regexp, callback) { Harness.prototype.assertStillAlive = function() { assert.strictEqual(this.running_, true, - 'Child died: ' + JSON.stringify(this.result_)); + `Child died: ${JSON.stringify(this.result_)}`); }; Harness.prototype.run_ = function() { diff --git a/test/parallel/test-https-server-keep-alive-timeout.js b/test/parallel/test-https-server-keep-alive-timeout.js index 01d0fa6078b021..b302205e5e272f 100644 --- a/test/parallel/test-https-server-keep-alive-timeout.js +++ b/test/parallel/test-https-server-keep-alive-timeout.js @@ -12,8 +12,8 @@ const fs = require('fs'); const tests = []; const serverOptions = { - key: fs.readFileSync(common.fixturesDir + '/keys/agent1-key.pem'), - cert: fs.readFileSync(common.fixturesDir + '/keys/agent1-cert.pem') + key: fs.readFileSync(`${common.fixturesDir}/keys/agent1-key.pem`), + cert: fs.readFileSync(`${common.fixturesDir}/keys/agent1-cert.pem`) }; function test(fn) { diff --git a/test/sequential/test-debugger-debug-brk.js b/test/sequential/test-debugger-debug-brk.js index f6a7ce0605ad07..54e17135640f19 100644 --- a/test/sequential/test-debugger-debug-brk.js +++ b/test/sequential/test-debugger-debug-brk.js @@ -4,7 +4,7 @@ common.skipIfInspectorDisabled(); const assert = require('assert'); const spawn = require('child_process').spawn; -const script = common.fixturesDir + '/empty.js'; +const script = `${common.fixturesDir}/empty.js`; function test(arg) { const child = spawn(process.execPath, ['--inspect', arg, script]); From aeb8d66eece897b24daaa8b3dc09d8f3c7e6442d Mon Sep 17 00:00:00 2001 From: Julien Gilli Date: Mon, 17 Jul 2017 10:21:21 -0700 Subject: [PATCH 051/157] test: fix test-async-wrap-getasyncid flakyness The test used to assume that if the client successfully writes data to the server and closes the connection, then the server must have received that data and ran its connection callback wrapped by common.mustCall. However, it is not necessarily the case, and as a result the test was flaky. With this change, the server is closed only once the server's connection callback has been called, which guarantees that the server can accept connections until it actually accepted the single connection that this test requires to accept, making the test not flaky. PR-URL: https://github.com/nodejs/node/pull/14329 Fixes: https://github.com/nodejs/node/issues/13020 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Refael Ackermann Reviewed-By: Anna Henningsen Reviewed-By: Wyatt Preul --- test/parallel/test-async-wrap-getasyncid.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-async-wrap-getasyncid.js b/test/parallel/test-async-wrap-getasyncid.js index cdb97ef8f27bc8..a693f94efbb9d1 100644 --- a/test/parallel/test-async-wrap-getasyncid.js +++ b/test/parallel/test-async-wrap-getasyncid.js @@ -160,6 +160,7 @@ if (common.hasCrypto) { const stream_wrap = process.binding('stream_wrap'); const tcp_wrap = process.binding('tcp_wrap'); const server = net.createServer(common.mustCall((socket) => { + server.close(); socket.on('data', (x) => { socket.end(); socket.destroy(); @@ -176,7 +177,6 @@ if (common.hasCrypto) { sreq.oncomplete = common.mustCall(() => { handle.close(); - server.close(); }); wreq.handle = handle; From ab9bc81b0eac369e638e52e6569b5335b7e5c67f Mon Sep 17 00:00:00 2001 From: atever Date: Sun, 23 Jul 2017 10:53:37 -0400 Subject: [PATCH 052/157] doc: add docs for module.paths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/14435 Refs: https://github.com/nodejs/node/issues/14371#issuecomment-317184131 Reviewed-By: Vse Mozhet Byt Reviewed-By: Luigi Pinca Reviewed-By: Khaidi Chu Reviewed-By: Colin Ihrig Reviewed-By: Refael Ackermann Reviewed-By: Tobias Nießen Reviewed-By: Gibson Fahnestock --- doc/api/modules.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/doc/api/modules.md b/doc/api/modules.md index e07e21217c7d71..13e3731cae749d 100644 --- a/doc/api/modules.md +++ b/doc/api/modules.md @@ -768,6 +768,15 @@ added: v0.1.16 The module that first required this one. +### module.paths + + +* {string[]} + +The search paths for the module. + ### module.require(id) +# character-entities [![Build Status][travis-badge]][travis] HTML character entity information. ## Installation -[npm][npm-install]: +[npm][]: ```bash npm install character-entities @@ -15,9 +13,9 @@ npm install character-entities ## Usage ```js -console.log(characterEntities.AElig); // Æ -console.log(characterEntities.aelig); // æ -console.log(characterEntities.amp); // & +console.log(characterEntities.AElig); //=> 'Æ' +console.log(characterEntities.aelig); //=> 'æ' +console.log(characterEntities.amp); //=> '&' ``` ## API @@ -30,6 +28,17 @@ Mapping between (case-sensitive) character entity names to replacements. See [html.spec.whatwg.org][html]. +## Related + +* [`character-entities-html4`](https://github.com/wooorm/character-entities-html4) + — HTML 4 character entity info +* [`character-entities-legacy`](https://github.com/wooorm/character-entities-legacy) + — Legacy character entity info +* [`parse-entities`](https://github.com/wooorm/parse-entities) + — Parse HTML character references +* [`stringify-entities`](https://github.com/wooorm/stringify-entities) + — Stringify HTML character references + ## License [MIT][license] © [Titus Wormer][author] @@ -40,11 +49,7 @@ See [html.spec.whatwg.org][html]. [travis]: https://travis-ci.org/wooorm/character-entities -[codecov-badge]: https://img.shields.io/codecov/c/github/wooorm/character-entities.svg - -[codecov]: https://codecov.io/github/wooorm/character-entities - -[npm-install]: https://docs.npmjs.com/cli/install +[npm]: https://docs.npmjs.com/cli/install [license]: LICENSE diff --git a/tools/eslint/node_modules/character-reference-invalid/package.json b/tools/eslint/node_modules/character-reference-invalid/package.json index 77517d9d99ddc3..d43a2ae0eaad12 100644 --- a/tools/eslint/node_modules/character-reference-invalid/package.json +++ b/tools/eslint/node_modules/character-reference-invalid/package.json @@ -1,8 +1,8 @@ { "_from": "character-reference-invalid@^1.0.0", - "_id": "character-reference-invalid@1.1.0", + "_id": "character-reference-invalid@1.1.1", "_inBundle": false, - "_integrity": "sha1-3smtHfufjQa0/NqircPE/ZevHmg=", + "_integrity": "sha1-lCg191Dk7GGjCOYMLvjMEBEgLvw=", "_location": "/character-reference-invalid", "_phantomChildren": {}, "_requested": { @@ -18,8 +18,8 @@ "_requiredBy": [ "/parse-entities" ], - "_resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.0.tgz", - "_shasum": "dec9ad1dfb9f8d06b4fcdaa2adc3c4fd97af1e68", + "_resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.1.tgz", + "_shasum": "942835f750e4ec61a308e60c2ef8cc1011202efc", "_spec": "character-reference-invalid@^1.0.0", "_where": "/Users/trott/io.js/tools/eslint-tmp/node_modules/eslint/node_modules/parse-entities", "author": { @@ -43,14 +43,17 @@ "description": "HTML invalid numeric character reference information", "devDependencies": { "bail": "^1.0.1", - "browserify": "^13.0.1", + "browserify": "^14.0.0", + "concat-stream": "^1.6.0", "esmangle": "^1.0.1", - "jsdom": "^9.4.1", - "nyc": "^8.0.0", - "remark-cli": "^2.0.0", - "remark-preset-wooorm": "^1.0.0", + "hast-util-select": "^1.0.1", + "hast-util-to-string": "^1.0.0", + "rehype-parse": "^4.0.0", + "remark-cli": "^3.0.0", + "remark-preset-wooorm": "^3.0.0", "tape": "^4.0.0", - "xo": "^0.17.0" + "unified": "^6.1.5", + "xo": "^0.18.0" }, "files": [ "index.json" @@ -70,27 +73,28 @@ "main": "index.json", "name": "character-reference-invalid", "remarkConfig": { - "output": true, - "presets": "wooorm" + "plugins": [ + "preset-wooorm" + ] }, "repository": { "type": "git", "url": "git+https://github.com/wooorm/character-reference-invalid.git" }, "scripts": { - "build": "npm run build-md && npm run build-bundle && npm run build-mangle", + "build": "npm run build-generate && npm run build-md && npm run build-bundle && npm run build-mangle", "build-bundle": "browserify index.json --bare -s characterReferenceInvalid > character-reference-invalid.js", "build-generate": "node build", "build-mangle": "esmangle character-reference-invalid.js > character-reference-invalid.min.js", - "build-md": "remark . --quiet --frail", + "build-md": "remark . -qfo", "lint": "xo", - "test": "npm run build && npm run lint && npm run test-coverage", - "test-api": "node test", - "test-coverage": "nyc --reporter lcov tape test.js" + "test": "npm run build && npm run lint && npm run test-api", + "test-api": "node test" }, - "version": "1.1.0", + "version": "1.1.1", "xo": { "space": true, + "esnext": false, "rules": { "guard-for-in": "off" }, diff --git a/tools/eslint/node_modules/character-reference-invalid/readme.md b/tools/eslint/node_modules/character-reference-invalid/readme.md index ac6e3e1f384991..487c61de5faf4b 100644 --- a/tools/eslint/node_modules/character-reference-invalid/readme.md +++ b/tools/eslint/node_modules/character-reference-invalid/readme.md @@ -1,10 +1,10 @@ -# character-reference-invalid [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov] +# character-reference-invalid [![Build Status][travis-badge]][travis] HTML invalid numeric character reference information. ## Installation -[npm][npm-install]: +[npm][]: ```bash npm install character-reference-invalid @@ -13,9 +13,9 @@ npm install character-reference-invalid ## Usage ```js -console.log(characterReferenceInvalid[0x80]); // € -console.log(characterReferenceInvalid[0x89]); // ‰ -console.log(characterReferenceInvalid[0x99]); // ™ +console.log(characterReferenceInvalid[0x80]); //=> '€' +console.log(characterReferenceInvalid[0x89]); //=> '‰' +console.log(characterReferenceInvalid[0x99]); //=> '™' ``` ## API @@ -28,6 +28,19 @@ Mapping between invalid numeric character reference to replacements. See [html.spec.whatwg.org][html]. +## Related + +* [`character-entities`](https://github.com/wooorm/character-entities) + — HTML character entity info +* [`character-entities-html4`](https://github.com/wooorm/character-entities-html4) + — HTML 4 character entity info +* [`character-entities-legacy`](https://github.com/wooorm/character-entities-legacy) + — Legacy character entity info +* [`parse-entities`](https://github.com/wooorm/parse-entities) + — Parse HTML character references +* [`stringify-entities`](https://github.com/wooorm/stringify-entities) + — Stringify HTML character references + ## License [MIT][license] © [Titus Wormer][author] @@ -38,11 +51,7 @@ See [html.spec.whatwg.org][html]. [travis]: https://travis-ci.org/wooorm/character-reference-invalid -[codecov-badge]: https://img.shields.io/codecov/c/github/wooorm/character-reference-invalid.svg - -[codecov]: https://codecov.io/github/wooorm/character-reference-invalid - -[npm-install]: https://docs.npmjs.com/cli/install +[npm]: https://docs.npmjs.com/cli/install [license]: LICENSE diff --git a/tools/eslint/node_modules/color-name/.eslintrc.json b/tools/eslint/node_modules/color-name/.eslintrc.json new file mode 100644 index 00000000000000..c50c250446ee6d --- /dev/null +++ b/tools/eslint/node_modules/color-name/.eslintrc.json @@ -0,0 +1,43 @@ +{ + "env": { + "browser": true, + "node": true, + "commonjs": true, + "es6": true + }, + "extends": "eslint:recommended", + "rules": { + "strict": 2, + "indent": 0, + "linebreak-style": 0, + "quotes": 0, + "semi": 0, + "no-cond-assign": 1, + "no-constant-condition": 1, + "no-duplicate-case": 1, + "no-empty": 1, + "no-ex-assign": 1, + "no-extra-boolean-cast": 1, + "no-extra-semi": 1, + "no-fallthrough": 1, + "no-func-assign": 1, + "no-global-assign": 1, + "no-implicit-globals": 2, + "no-inner-declarations": ["error", "functions"], + "no-irregular-whitespace": 2, + "no-loop-func": 1, + "no-multi-str": 1, + "no-mixed-spaces-and-tabs": 1, + "no-proto": 1, + "no-sequences": 1, + "no-throw-literal": 1, + "no-unmodified-loop-condition": 1, + "no-useless-call": 1, + "no-void": 1, + "no-with": 2, + "wrap-iife": 1, + "no-redeclare": 1, + "no-unused-vars": ["error", { "vars": "all", "args": "none" }], + "no-sparse-arrays": 1 + } +} diff --git a/tools/eslint/node_modules/color-name/index.js b/tools/eslint/node_modules/color-name/index.js index 7d85e58c9a93ef..e42aa68a542d9e 100644 --- a/tools/eslint/node_modules/color-name/index.js +++ b/tools/eslint/node_modules/color-name/index.js @@ -1,3 +1,5 @@ +'use strict' + module.exports = { "aliceblue": [240, 248, 255], "antiquewhite": [250, 235, 215], @@ -147,4 +149,4 @@ module.exports = { "whitesmoke": [245, 245, 245], "yellow": [255, 255, 0], "yellowgreen": [154, 205, 50] -}; \ No newline at end of file +}; diff --git a/tools/eslint/node_modules/color-name/package.json b/tools/eslint/node_modules/color-name/package.json index bd009b0c541d1c..56c5ea48f91cc0 100644 --- a/tools/eslint/node_modules/color-name/package.json +++ b/tools/eslint/node_modules/color-name/package.json @@ -1,8 +1,8 @@ { "_from": "color-name@^1.1.1", - "_id": "color-name@1.1.2", + "_id": "color-name@1.1.3", "_inBundle": false, - "_integrity": "sha1-XIq3K2S9IhXWF66VWeuxSEdc+Y0=", + "_integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "_location": "/eslint/color-name", "_phantomChildren": {}, "_requested": { @@ -18,8 +18,8 @@ "_requiredBy": [ "/eslint/color-convert" ], - "_resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.2.tgz", - "_shasum": "5c8ab72b64bd2215d617ae9559ebb148475cf98d", + "_resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "_shasum": "a7d0558bd89c42f795dd42328f740831ca53bc25", "_spec": "color-name@^1.1.1", "_where": "/Users/trott/io.js/tools/eslint-tmp/node_modules/eslint/node_modules/color-convert", "author": { @@ -32,9 +32,6 @@ "bundleDependencies": false, "deprecated": false, "description": "A list of color names and its values", - "files": [ - "index.js" - ], "homepage": "https://github.com/dfcreative/color-name", "keywords": [ "color-name", @@ -52,5 +49,5 @@ "scripts": { "test": "node test.js" }, - "version": "1.1.2" + "version": "1.1.3" } diff --git a/tools/eslint/node_modules/cross-spawn/LICENSE b/tools/eslint/node_modules/cross-spawn/LICENSE new file mode 100644 index 00000000000000..db5e914de1f585 --- /dev/null +++ b/tools/eslint/node_modules/cross-spawn/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2014 IndigoUnited + +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: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +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. diff --git a/tools/eslint/node_modules/cross-spawn/README.md b/tools/eslint/node_modules/cross-spawn/README.md new file mode 100644 index 00000000000000..dde730df1b13b1 --- /dev/null +++ b/tools/eslint/node_modules/cross-spawn/README.md @@ -0,0 +1,85 @@ +# cross-spawn + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Build status][appveyor-image]][appveyor-url] [![Dependency status][david-dm-image]][david-dm-url] [![Dev Dependency status][david-dm-dev-image]][david-dm-dev-url] + +[npm-url]:https://npmjs.org/package/cross-spawn +[downloads-image]:http://img.shields.io/npm/dm/cross-spawn.svg +[npm-image]:http://img.shields.io/npm/v/cross-spawn.svg +[travis-url]:https://travis-ci.org/IndigoUnited/node-cross-spawn +[travis-image]:http://img.shields.io/travis/IndigoUnited/node-cross-spawn/master.svg +[appveyor-url]:https://ci.appveyor.com/project/satazor/node-cross-spawn +[appveyor-image]:https://img.shields.io/appveyor/ci/satazor/node-cross-spawn/master.svg +[david-dm-url]:https://david-dm.org/IndigoUnited/node-cross-spawn +[david-dm-image]:https://img.shields.io/david/IndigoUnited/node-cross-spawn.svg +[david-dm-dev-url]:https://david-dm.org/IndigoUnited/node-cross-spawn#info=devDependencies +[david-dm-dev-image]:https://img.shields.io/david/dev/IndigoUnited/node-cross-spawn.svg + +A cross platform solution to node's spawn and spawnSync. + + +## Installation + +`$ npm install cross-spawn` + +If you are using `spawnSync` on node 0.10 or older, you will also need to install `spawn-sync`: + +`$ npm install spawn-sync` + + +## Why + +Node has issues when using spawn on Windows: + +- It ignores [PATHEXT](https://github.com/joyent/node/issues/2318) +- It does not support [shebangs](http://pt.wikipedia.org/wiki/Shebang) +- No `options.shell` support on node < v6 +- It does not allow you to run `del` or `dir` + +All these issues are handled correctly by `cross-spawn`. +There are some known modules, such as [win-spawn](https://github.com/ForbesLindesay/win-spawn), that try to solve this but they are either broken or provide faulty escaping of shell arguments. + + +## Usage + +Exactly the same way as node's [`spawn`](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options) or [`spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options), so it's a drop in replacement. + + +```js +var spawn = require('cross-spawn'); + +// Spawn NPM asynchronously +var child = spawn('npm', ['list', '-g', '-depth', '0'], { stdio: 'inherit' }); + +// Spawn NPM synchronously +var results = spawn.sync('npm', ['list', '-g', '-depth', '0'], { stdio: 'inherit' }); +``` + + +## Caveats + +#### `options.shell` as an alternative to `cross-spawn` + +Starting from node v6, `spawn` has a `shell` option that allows you run commands from within a shell. This new option solves most of the problems that `cross-spawn` attempts to solve, but: + +- It's not supported in node < v6 +- It has no support for shebangs on Windows +- You must manually escape the command and arguments which is very error prone, specially when passing user input + +If you are using the `shell` option to spawn a command in a cross platform way, consider using `cross-spawn` instead. You have been warned. + + +#### Shebangs + +While `cross-spawn` handles shebangs on Windows, its support is limited: e.g.: it doesn't handle arguments after the path, e.g.: `#!/bin/bash -e`. + +Remember to always test your code on Windows! + + +## Tests + +`$ npm test` + + +## License + +Released under the [MIT License](http://www.opensource.org/licenses/mit-license.php). diff --git a/tools/eslint/node_modules/cross-spawn/index.js b/tools/eslint/node_modules/cross-spawn/index.js new file mode 100644 index 00000000000000..7814a9692dc0cc --- /dev/null +++ b/tools/eslint/node_modules/cross-spawn/index.js @@ -0,0 +1,59 @@ +'use strict'; + +var cp = require('child_process'); +var parse = require('./lib/parse'); +var enoent = require('./lib/enoent'); + +var cpSpawnSync = cp.spawnSync; + +function spawn(command, args, options) { + var parsed; + var spawned; + + // Parse the arguments + parsed = parse(command, args, options); + + // Spawn the child process + spawned = cp.spawn(parsed.command, parsed.args, parsed.options); + + // Hook into child process "exit" event to emit an error if the command + // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 + enoent.hookChildProcess(spawned, parsed); + + return spawned; +} + +function spawnSync(command, args, options) { + var parsed; + var result; + + if (!cpSpawnSync) { + try { + cpSpawnSync = require('spawn-sync'); // eslint-disable-line global-require + } catch (ex) { + throw new Error( + 'In order to use spawnSync on node 0.10 or older, you must ' + + 'install spawn-sync:\n\n' + + ' npm install spawn-sync --save' + ); + } + } + + // Parse the arguments + parsed = parse(command, args, options); + + // Spawn the child process + result = cpSpawnSync(parsed.command, parsed.args, parsed.options); + + // Analyze if the command does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 + result.error = result.error || enoent.verifyENOENTSync(result.status, parsed); + + return result; +} + +module.exports = spawn; +module.exports.spawn = spawn; +module.exports.sync = spawnSync; + +module.exports._parse = parse; +module.exports._enoent = enoent; diff --git a/tools/eslint/node_modules/cross-spawn/lib/enoent.js b/tools/eslint/node_modules/cross-spawn/lib/enoent.js new file mode 100644 index 00000000000000..d0a193aecd92b7 --- /dev/null +++ b/tools/eslint/node_modules/cross-spawn/lib/enoent.js @@ -0,0 +1,73 @@ +'use strict'; + +var isWin = process.platform === 'win32'; +var resolveCommand = require('./util/resolveCommand'); + +var isNode10 = process.version.indexOf('v0.10.') === 0; + +function notFoundError(command, syscall) { + var err; + + err = new Error(syscall + ' ' + command + ' ENOENT'); + err.code = err.errno = 'ENOENT'; + err.syscall = syscall + ' ' + command; + + return err; +} + +function hookChildProcess(cp, parsed) { + var originalEmit; + + if (!isWin) { + return; + } + + originalEmit = cp.emit; + cp.emit = function (name, arg1) { + var err; + + // If emitting "exit" event and exit code is 1, we need to check if + // the command exists and emit an "error" instead + // See: https://github.com/IndigoUnited/node-cross-spawn/issues/16 + if (name === 'exit') { + err = verifyENOENT(arg1, parsed, 'spawn'); + + if (err) { + return originalEmit.call(cp, 'error', err); + } + } + + return originalEmit.apply(cp, arguments); + }; +} + +function verifyENOENT(status, parsed) { + if (isWin && status === 1 && !parsed.file) { + return notFoundError(parsed.original, 'spawn'); + } + + return null; +} + +function verifyENOENTSync(status, parsed) { + if (isWin && status === 1 && !parsed.file) { + return notFoundError(parsed.original, 'spawnSync'); + } + + // If we are in node 10, then we are using spawn-sync; if it exited + // with -1 it probably means that the command does not exist + if (isNode10 && status === -1) { + parsed.file = isWin ? parsed.file : resolveCommand(parsed.original); + + if (!parsed.file) { + return notFoundError(parsed.original, 'spawnSync'); + } + } + + return null; +} + +module.exports.hookChildProcess = hookChildProcess; +module.exports.verifyENOENT = verifyENOENT; +module.exports.verifyENOENTSync = verifyENOENTSync; +module.exports.notFoundError = notFoundError; diff --git a/tools/eslint/node_modules/cross-spawn/lib/parse.js b/tools/eslint/node_modules/cross-spawn/lib/parse.js new file mode 100644 index 00000000000000..10a013625be10a --- /dev/null +++ b/tools/eslint/node_modules/cross-spawn/lib/parse.js @@ -0,0 +1,113 @@ +'use strict'; + +var resolveCommand = require('./util/resolveCommand'); +var hasEmptyArgumentBug = require('./util/hasEmptyArgumentBug'); +var escapeArgument = require('./util/escapeArgument'); +var escapeCommand = require('./util/escapeCommand'); +var readShebang = require('./util/readShebang'); + +var isWin = process.platform === 'win32'; +var skipShellRegExp = /\.(?:com|exe)$/i; + +// Supported in Node >= 6 and >= 4.8 +var supportsShellOption = parseInt(process.version.substr(1).split('.')[0], 10) >= 6 || + parseInt(process.version.substr(1).split('.')[0], 10) === 4 && parseInt(process.version.substr(1).split('.')[1], 10) >= 8; + +function parseNonShell(parsed) { + var shebang; + var needsShell; + var applyQuotes; + + if (!isWin) { + return parsed; + } + + // Detect & add support for shebangs + parsed.file = resolveCommand(parsed.command); + parsed.file = parsed.file || resolveCommand(parsed.command, true); + shebang = parsed.file && readShebang(parsed.file); + + if (shebang) { + parsed.args.unshift(parsed.file); + parsed.command = shebang; + needsShell = hasEmptyArgumentBug || !skipShellRegExp.test(resolveCommand(shebang) || resolveCommand(shebang, true)); + } else { + needsShell = hasEmptyArgumentBug || !skipShellRegExp.test(parsed.file); + } + + // If a shell is required, use cmd.exe and take care of escaping everything correctly + if (needsShell) { + // Escape command & arguments + applyQuotes = (parsed.command !== 'echo'); // Do not quote arguments for the special "echo" command + parsed.command = escapeCommand(parsed.command); + parsed.args = parsed.args.map(function (arg) { + return escapeArgument(arg, applyQuotes); + }); + + // Make use of cmd.exe + parsed.args = ['/d', '/s', '/c', '"' + parsed.command + (parsed.args.length ? ' ' + parsed.args.join(' ') : '') + '"']; + parsed.command = process.env.comspec || 'cmd.exe'; + parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped + } + + return parsed; +} + +function parseShell(parsed) { + var shellCommand; + + // If node supports the shell option, there's no need to mimic its behavior + if (supportsShellOption) { + return parsed; + } + + // Mimic node shell option, see: https://github.com/nodejs/node/blob/b9f6a2dc059a1062776133f3d4fd848c4da7d150/lib/child_process.js#L335 + shellCommand = [parsed.command].concat(parsed.args).join(' '); + + if (isWin) { + parsed.command = typeof parsed.options.shell === 'string' ? parsed.options.shell : process.env.comspec || 'cmd.exe'; + parsed.args = ['/d', '/s', '/c', '"' + shellCommand + '"']; + parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped + } else { + if (typeof parsed.options.shell === 'string') { + parsed.command = parsed.options.shell; + } else if (process.platform === 'android') { + parsed.command = '/system/bin/sh'; + } else { + parsed.command = '/bin/sh'; + } + + parsed.args = ['-c', shellCommand]; + } + + return parsed; +} + +// ------------------------------------------------ + +function parse(command, args, options) { + var parsed; + + // Normalize arguments, similar to nodejs + if (args && !Array.isArray(args)) { + options = args; + args = null; + } + + args = args ? args.slice(0) : []; // Clone array to avoid changing the original + options = options || {}; + + // Build our parsed object + parsed = { + command: command, + args: args, + options: options, + file: undefined, + original: command, + }; + + // Delegate further parsing to shell or non-shell + return options.shell ? parseShell(parsed) : parseNonShell(parsed); +} + +module.exports = parse; diff --git a/tools/eslint/node_modules/cross-spawn/lib/util/escapeArgument.js b/tools/eslint/node_modules/cross-spawn/lib/util/escapeArgument.js new file mode 100644 index 00000000000000..367263f6699201 --- /dev/null +++ b/tools/eslint/node_modules/cross-spawn/lib/util/escapeArgument.js @@ -0,0 +1,30 @@ +'use strict'; + +function escapeArgument(arg, quote) { + // Convert to string + arg = '' + arg; + + // If we are not going to quote the argument, + // escape shell metacharacters, including double and single quotes: + if (!quote) { + arg = arg.replace(/([()%!^<>&|;,"'\s])/g, '^$1'); + } else { + // Sequence of backslashes followed by a double quote: + // double up all the backslashes and escape the double quote + arg = arg.replace(/(\\*)"/g, '$1$1\\"'); + + // Sequence of backslashes followed by the end of the string + // (which will become a double quote later): + // double up all the backslashes + arg = arg.replace(/(\\*)$/, '$1$1'); + + // All other backslashes occur literally + + // Quote the whole thing: + arg = '"' + arg + '"'; + } + + return arg; +} + +module.exports = escapeArgument; diff --git a/tools/eslint/node_modules/cross-spawn/lib/util/escapeCommand.js b/tools/eslint/node_modules/cross-spawn/lib/util/escapeCommand.js new file mode 100644 index 00000000000000..d9c25b26566bc6 --- /dev/null +++ b/tools/eslint/node_modules/cross-spawn/lib/util/escapeCommand.js @@ -0,0 +1,12 @@ +'use strict'; + +var escapeArgument = require('./escapeArgument'); + +function escapeCommand(command) { + // Do not escape if this command is not dangerous.. + // We do this so that commands like "echo" or "ifconfig" work + // Quoting them, will make them unaccessible + return /^[a-z0-9_-]+$/i.test(command) ? command : escapeArgument(command, true); +} + +module.exports = escapeCommand; diff --git a/tools/eslint/node_modules/cross-spawn/lib/util/hasEmptyArgumentBug.js b/tools/eslint/node_modules/cross-spawn/lib/util/hasEmptyArgumentBug.js new file mode 100644 index 00000000000000..9f2eba63555360 --- /dev/null +++ b/tools/eslint/node_modules/cross-spawn/lib/util/hasEmptyArgumentBug.js @@ -0,0 +1,18 @@ +'use strict'; + +// See: https://github.com/IndigoUnited/node-cross-spawn/pull/34#issuecomment-221623455 +function hasEmptyArgumentBug() { + var nodeVer; + + if (process.platform !== 'win32') { + return false; + } + + nodeVer = process.version.substr(1).split('.').map(function (num) { + return parseInt(num, 10); + }); + + return (nodeVer[0] === 0 && nodeVer[1] < 12); +} + +module.exports = hasEmptyArgumentBug(); diff --git a/tools/eslint/node_modules/cross-spawn/lib/util/readShebang.js b/tools/eslint/node_modules/cross-spawn/lib/util/readShebang.js new file mode 100644 index 00000000000000..2cf3541c99b88a --- /dev/null +++ b/tools/eslint/node_modules/cross-spawn/lib/util/readShebang.js @@ -0,0 +1,37 @@ +'use strict'; + +var fs = require('fs'); +var LRU = require('lru-cache'); +var shebangCommand = require('shebang-command'); + +var shebangCache = new LRU({ max: 50, maxAge: 30 * 1000 }); // Cache just for 30sec + +function readShebang(command) { + var buffer; + var fd; + var shebang; + + // Check if it is in the cache first + if (shebangCache.has(command)) { + return shebangCache.get(command); + } + + // Read the first 150 bytes from the file + buffer = new Buffer(150); + + try { + fd = fs.openSync(command, 'r'); + fs.readSync(fd, buffer, 0, 150, 0); + fs.closeSync(fd); + } catch (e) { /* empty */ } + + // Attempt to extract shebang (null is returned if not a shebang) + shebang = shebangCommand(buffer.toString()); + + // Store the shebang in the cache + shebangCache.set(command, shebang); + + return shebang; +} + +module.exports = readShebang; diff --git a/tools/eslint/node_modules/cross-spawn/lib/util/resolveCommand.js b/tools/eslint/node_modules/cross-spawn/lib/util/resolveCommand.js new file mode 100644 index 00000000000000..b7a94909749bf4 --- /dev/null +++ b/tools/eslint/node_modules/cross-spawn/lib/util/resolveCommand.js @@ -0,0 +1,31 @@ +'use strict'; + +var path = require('path'); +var which = require('which'); +var LRU = require('lru-cache'); + +var commandCache = new LRU({ max: 50, maxAge: 30 * 1000 }); // Cache just for 30sec + +function resolveCommand(command, noExtension) { + var resolved; + + noExtension = !!noExtension; + resolved = commandCache.get(command + '!' + noExtension); + + // Check if its resolved in the cache + if (commandCache.has(command)) { + return commandCache.get(command); + } + + try { + resolved = !noExtension ? + which.sync(command) : + which.sync(command, { pathExt: path.delimiter + (process.env.PATHEXT || '') }); + } catch (e) { /* empty */ } + + commandCache.set(command + '!' + noExtension, resolved); + + return resolved; +} + +module.exports = resolveCommand; diff --git a/tools/eslint/node_modules/cross-spawn/package.json b/tools/eslint/node_modules/cross-spawn/package.json new file mode 100644 index 00000000000000..765850eae1175e --- /dev/null +++ b/tools/eslint/node_modules/cross-spawn/package.json @@ -0,0 +1,83 @@ +{ + "_from": "cross-spawn@^5.1.0", + "_id": "cross-spawn@5.1.0", + "_inBundle": false, + "_integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "_location": "/eslint/cross-spawn", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "cross-spawn@^5.1.0", + "name": "cross-spawn", + "escapedName": "cross-spawn", + "rawSpec": "^5.1.0", + "saveSpec": null, + "fetchSpec": "^5.1.0" + }, + "_requiredBy": [ + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "_shasum": "e8bd0efee58fcff6f8f94510a0a554bbfa235449", + "_spec": "cross-spawn@^5.1.0", + "_where": "/Users/trott/io.js/tools/eslint-tmp/node_modules/eslint", + "author": { + "name": "IndigoUnited", + "email": "hello@indigounited.com", + "url": "http://indigounited.com" + }, + "bugs": { + "url": "https://github.com/IndigoUnited/node-cross-spawn/issues/" + }, + "bundleDependencies": false, + "dependencies": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "deprecated": false, + "description": "Cross platform child_process#spawn and child_process#spawnSync", + "devDependencies": { + "@satazor/eslint-config": "^3.0.0", + "eslint": "^3.0.0", + "expect.js": "^0.3.0", + "glob": "^7.0.0", + "mkdirp": "^0.5.1", + "mocha": "^3.0.2", + "once": "^1.4.0", + "rimraf": "^2.5.0" + }, + "files": [ + "index.js", + "lib" + ], + "homepage": "https://github.com/IndigoUnited/node-cross-spawn#readme", + "keywords": [ + "spawn", + "spawnSync", + "windows", + "cross", + "platform", + "path", + "ext", + "path-ext", + "path_ext", + "shebang", + "hashbang", + "cmd", + "execute" + ], + "license": "MIT", + "main": "index.js", + "name": "cross-spawn", + "repository": { + "type": "git", + "url": "git://github.com/IndigoUnited/node-cross-spawn.git" + }, + "scripts": { + "lint": "eslint '{*.js,lib/**/*.js,test/**/*.js}'", + "test": "node test/prepare && mocha --bail test/test" + }, + "version": "5.1.0" +} diff --git a/tools/eslint/node_modules/functional-red-black-tree/LICENSE b/tools/eslint/node_modules/functional-red-black-tree/LICENSE new file mode 100644 index 00000000000000..8ce206a84544ae --- /dev/null +++ b/tools/eslint/node_modules/functional-red-black-tree/LICENSE @@ -0,0 +1,22 @@ + +The MIT License (MIT) + +Copyright (c) 2013 Mikola Lysenko + +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: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +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. diff --git a/tools/eslint/node_modules/functional-red-black-tree/README.md b/tools/eslint/node_modules/functional-red-black-tree/README.md new file mode 100644 index 00000000000000..edd19cbf31206f --- /dev/null +++ b/tools/eslint/node_modules/functional-red-black-tree/README.md @@ -0,0 +1,237 @@ +functional-red-black-tree +========================= +A [fully persistent](http://en.wikipedia.org/wiki/Persistent_data_structure) [red-black tree](http://en.wikipedia.org/wiki/Red%E2%80%93black_tree) written 100% in JavaScript. Works both in node.js and in the browser via [browserify](http://browserify.org/). + +Functional (or fully presistent) data structures allow for non-destructive updates. So if you insert an element into the tree, it returns a new tree with the inserted element rather than destructively updating the existing tree in place. Doing this requires using extra memory, and if one were naive it could cost as much as reallocating the entire tree. Instead, this data structure saves some memory by recycling references to previously allocated subtrees. This requires using only O(log(n)) additional memory per update instead of a full O(n) copy. + +Some advantages of this is that it is possible to apply insertions and removals to the tree while still iterating over previous versions of the tree. Functional and persistent data structures can also be useful in many geometric algorithms like point location within triangulations or ray queries, and can be used to analyze the history of executing various algorithms. This added power though comes at a cost, since it is generally a bit slower to use a functional data structure than an imperative version. However, if your application needs this behavior then you may consider using this module. + +# Install + + npm install functional-red-black-tree + +# Example + +Here is an example of some basic usage: + +```javascript +//Load the library +var createTree = require("functional-red-black-tree") + +//Create a tree +var t1 = createTree() + +//Insert some items into the tree +var t2 = t1.insert(1, "foo") +var t3 = t2.insert(2, "bar") + +//Remove something +var t4 = t3.remove(1) +``` + + +# API + +```javascript +var createTree = require("functional-red-black-tree") +``` + +## Overview + +- [Tree methods](#tree-methods) + - [`var tree = createTree([compare])`](#var-tree-=-createtreecompare) + - [`tree.keys`](#treekeys) + - [`tree.values`](#treevalues) + - [`tree.length`](#treelength) + - [`tree.get(key)`](#treegetkey) + - [`tree.insert(key, value)`](#treeinsertkey-value) + - [`tree.remove(key)`](#treeremovekey) + - [`tree.find(key)`](#treefindkey) + - [`tree.ge(key)`](#treegekey) + - [`tree.gt(key)`](#treegtkey) + - [`tree.lt(key)`](#treeltkey) + - [`tree.le(key)`](#treelekey) + - [`tree.at(position)`](#treeatposition) + - [`tree.begin`](#treebegin) + - [`tree.end`](#treeend) + - [`tree.forEach(visitor(key,value)[, lo[, hi]])`](#treeforEachvisitorkeyvalue-lo-hi) + - [`tree.root`](#treeroot) +- [Node properties](#node-properties) + - [`node.key`](#nodekey) + - [`node.value`](#nodevalue) + - [`node.left`](#nodeleft) + - [`node.right`](#noderight) +- [Iterator methods](#iterator-methods) + - [`iter.key`](#iterkey) + - [`iter.value`](#itervalue) + - [`iter.node`](#iternode) + - [`iter.tree`](#itertree) + - [`iter.index`](#iterindex) + - [`iter.valid`](#itervalid) + - [`iter.clone()`](#iterclone) + - [`iter.remove()`](#iterremove) + - [`iter.update(value)`](#iterupdatevalue) + - [`iter.next()`](#iternext) + - [`iter.prev()`](#iterprev) + - [`iter.hasNext`](#iterhasnext) + - [`iter.hasPrev`](#iterhasprev) + +## Tree methods + +### `var tree = createTree([compare])` +Creates an empty functional tree + +* `compare` is an optional comparison function, same semantics as array.sort() + +**Returns** An empty tree ordered by `compare` + +### `tree.keys` +A sorted array of all the keys in the tree + +### `tree.values` +An array array of all the values in the tree + +### `tree.length` +The number of items in the tree + +### `tree.get(key)` +Retrieves the value associated to the given key + +* `key` is the key of the item to look up + +**Returns** The value of the first node associated to `key` + +### `tree.insert(key, value)` +Creates a new tree with the new pair inserted. + +* `key` is the key of the item to insert +* `value` is the value of the item to insert + +**Returns** A new tree with `key` and `value` inserted + +### `tree.remove(key)` +Removes the first item with `key` in the tree + +* `key` is the key of the item to remove + +**Returns** A new tree with the given item removed if it exists + +### `tree.find(key)` +Returns an iterator pointing to the first item in the tree with `key`, otherwise `null`. + +### `tree.ge(key)` +Find the first item in the tree whose key is `>= key` + +* `key` is the key to search for + +**Returns** An iterator at the given element. + +### `tree.gt(key)` +Finds the first item in the tree whose key is `> key` + +* `key` is the key to search for + +**Returns** An iterator at the given element + +### `tree.lt(key)` +Finds the last item in the tree whose key is `< key` + +* `key` is the key to search for + +**Returns** An iterator at the given element + +### `tree.le(key)` +Finds the last item in the tree whose key is `<= key` + +* `key` is the key to search for + +**Returns** An iterator at the given element + +### `tree.at(position)` +Finds an iterator starting at the given element + +* `position` is the index at which the iterator gets created + +**Returns** An iterator starting at position + +### `tree.begin` +An iterator pointing to the first element in the tree + +### `tree.end` +An iterator pointing to the last element in the tree + +### `tree.forEach(visitor(key,value)[, lo[, hi]])` +Walks a visitor function over the nodes of the tree in order. + +* `visitor(key,value)` is a callback that gets executed on each node. If a truthy value is returned from the visitor, then iteration is stopped. +* `lo` is an optional start of the range to visit (inclusive) +* `hi` is an optional end of the range to visit (non-inclusive) + +**Returns** The last value returned by the callback + +### `tree.root` +Returns the root node of the tree + + +## Node properties +Each node of the tree has the following properties: + +### `node.key` +The key associated to the node + +### `node.value` +The value associated to the node + +### `node.left` +The left subtree of the node + +### `node.right` +The right subtree of the node + +## Iterator methods + +### `iter.key` +The key of the item referenced by the iterator + +### `iter.value` +The value of the item referenced by the iterator + +### `iter.node` +The value of the node at the iterator's current position. `null` is iterator is node valid. + +### `iter.tree` +The tree associated to the iterator + +### `iter.index` +Returns the position of this iterator in the sequence. + +### `iter.valid` +Checks if the iterator is valid + +### `iter.clone()` +Makes a copy of the iterator + +### `iter.remove()` +Removes the item at the position of the iterator + +**Returns** A new binary search tree with `iter`'s item removed + +### `iter.update(value)` +Updates the value of the node in the tree at this iterator + +**Returns** A new binary search tree with the corresponding node updated + +### `iter.next()` +Advances the iterator to the next position + +### `iter.prev()` +Moves the iterator backward one element + +### `iter.hasNext` +If true, then the iterator is not at the end of the sequence + +### `iter.hasPrev` +If true, then the iterator is not at the beginning of the sequence + +# Credits +(c) 2013 Mikola Lysenko. MIT License \ No newline at end of file diff --git a/tools/eslint/node_modules/functional-red-black-tree/bench/test.js b/tools/eslint/node_modules/functional-red-black-tree/bench/test.js new file mode 100644 index 00000000000000..41c5a31c3abbef --- /dev/null +++ b/tools/eslint/node_modules/functional-red-black-tree/bench/test.js @@ -0,0 +1,11 @@ +"use strict" + +var createTree = require("../rbtree.js") + +var t = createTree() + +var s = Date.now() +for(var i=0; i<100000; ++i) { + t = t.insert(Math.random(), Math.random()) +} +console.log(Date.now() - s) \ No newline at end of file diff --git a/tools/eslint/node_modules/functional-red-black-tree/package.json b/tools/eslint/node_modules/functional-red-black-tree/package.json new file mode 100644 index 00000000000000..57693e21aca5a0 --- /dev/null +++ b/tools/eslint/node_modules/functional-red-black-tree/package.json @@ -0,0 +1,68 @@ +{ + "_from": "functional-red-black-tree@^1.0.1", + "_id": "functional-red-black-tree@1.0.1", + "_inBundle": false, + "_integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "_location": "/eslint/functional-red-black-tree", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "functional-red-black-tree@^1.0.1", + "name": "functional-red-black-tree", + "escapedName": "functional-red-black-tree", + "rawSpec": "^1.0.1", + "saveSpec": null, + "fetchSpec": "^1.0.1" + }, + "_requiredBy": [ + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "_shasum": "1b0ab3bd553b2a0d6399d29c0e3ea0b252078327", + "_spec": "functional-red-black-tree@^1.0.1", + "_where": "/Users/trott/io.js/tools/eslint-tmp/node_modules/eslint", + "author": { + "name": "Mikola Lysenko" + }, + "bugs": { + "url": "https://github.com/mikolalysenko/functional-red-black-tree/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "A fully persistent balanced binary search tree", + "devDependencies": { + "iota-array": "^0.0.1", + "tape": "^2.12.0" + }, + "directories": { + "test": "test" + }, + "homepage": "https://github.com/mikolalysenko/functional-red-black-tree#readme", + "keywords": [ + "functional", + "red", + "black", + "tree", + "binary", + "search", + "balance", + "persistent", + "fully", + "dynamic", + "data", + "structure" + ], + "license": "MIT", + "main": "rbtree.js", + "name": "functional-red-black-tree", + "repository": { + "type": "git", + "url": "git://github.com/mikolalysenko/functional-red-black-tree.git" + }, + "scripts": { + "test": "tape test/*.js" + }, + "version": "1.0.1" +} diff --git a/tools/eslint/node_modules/functional-red-black-tree/rbtree.js b/tools/eslint/node_modules/functional-red-black-tree/rbtree.js new file mode 100644 index 00000000000000..5a69a4090d4476 --- /dev/null +++ b/tools/eslint/node_modules/functional-red-black-tree/rbtree.js @@ -0,0 +1,996 @@ +"use strict" + +module.exports = createRBTree + +var RED = 0 +var BLACK = 1 + +function RBNode(color, key, value, left, right, count) { + this._color = color + this.key = key + this.value = value + this.left = left + this.right = right + this._count = count +} + +function cloneNode(node) { + return new RBNode(node._color, node.key, node.value, node.left, node.right, node._count) +} + +function repaint(color, node) { + return new RBNode(color, node.key, node.value, node.left, node.right, node._count) +} + +function recount(node) { + node._count = 1 + (node.left ? node.left._count : 0) + (node.right ? node.right._count : 0) +} + +function RedBlackTree(compare, root) { + this._compare = compare + this.root = root +} + +var proto = RedBlackTree.prototype + +Object.defineProperty(proto, "keys", { + get: function() { + var result = [] + this.forEach(function(k,v) { + result.push(k) + }) + return result + } +}) + +Object.defineProperty(proto, "values", { + get: function() { + var result = [] + this.forEach(function(k,v) { + result.push(v) + }) + return result + } +}) + +//Returns the number of nodes in the tree +Object.defineProperty(proto, "length", { + get: function() { + if(this.root) { + return this.root._count + } + return 0 + } +}) + +//Insert a new item into the tree +proto.insert = function(key, value) { + var cmp = this._compare + //Find point to insert new node at + var n = this.root + var n_stack = [] + var d_stack = [] + while(n) { + var d = cmp(key, n.key) + n_stack.push(n) + d_stack.push(d) + if(d <= 0) { + n = n.left + } else { + n = n.right + } + } + //Rebuild path to leaf node + n_stack.push(new RBNode(RED, key, value, null, null, 1)) + for(var s=n_stack.length-2; s>=0; --s) { + var n = n_stack[s] + if(d_stack[s] <= 0) { + n_stack[s] = new RBNode(n._color, n.key, n.value, n_stack[s+1], n.right, n._count+1) + } else { + n_stack[s] = new RBNode(n._color, n.key, n.value, n.left, n_stack[s+1], n._count+1) + } + } + //Rebalance tree using rotations + //console.log("start insert", key, d_stack) + for(var s=n_stack.length-1; s>1; --s) { + var p = n_stack[s-1] + var n = n_stack[s] + if(p._color === BLACK || n._color === BLACK) { + break + } + var pp = n_stack[s-2] + if(pp.left === p) { + if(p.left === n) { + var y = pp.right + if(y && y._color === RED) { + //console.log("LLr") + p._color = BLACK + pp.right = repaint(BLACK, y) + pp._color = RED + s -= 1 + } else { + //console.log("LLb") + pp._color = RED + pp.left = p.right + p._color = BLACK + p.right = pp + n_stack[s-2] = p + n_stack[s-1] = n + recount(pp) + recount(p) + if(s >= 3) { + var ppp = n_stack[s-3] + if(ppp.left === pp) { + ppp.left = p + } else { + ppp.right = p + } + } + break + } + } else { + var y = pp.right + if(y && y._color === RED) { + //console.log("LRr") + p._color = BLACK + pp.right = repaint(BLACK, y) + pp._color = RED + s -= 1 + } else { + //console.log("LRb") + p.right = n.left + pp._color = RED + pp.left = n.right + n._color = BLACK + n.left = p + n.right = pp + n_stack[s-2] = n + n_stack[s-1] = p + recount(pp) + recount(p) + recount(n) + if(s >= 3) { + var ppp = n_stack[s-3] + if(ppp.left === pp) { + ppp.left = n + } else { + ppp.right = n + } + } + break + } + } + } else { + if(p.right === n) { + var y = pp.left + if(y && y._color === RED) { + //console.log("RRr", y.key) + p._color = BLACK + pp.left = repaint(BLACK, y) + pp._color = RED + s -= 1 + } else { + //console.log("RRb") + pp._color = RED + pp.right = p.left + p._color = BLACK + p.left = pp + n_stack[s-2] = p + n_stack[s-1] = n + recount(pp) + recount(p) + if(s >= 3) { + var ppp = n_stack[s-3] + if(ppp.right === pp) { + ppp.right = p + } else { + ppp.left = p + } + } + break + } + } else { + var y = pp.left + if(y && y._color === RED) { + //console.log("RLr") + p._color = BLACK + pp.left = repaint(BLACK, y) + pp._color = RED + s -= 1 + } else { + //console.log("RLb") + p.left = n.right + pp._color = RED + pp.right = n.left + n._color = BLACK + n.right = p + n.left = pp + n_stack[s-2] = n + n_stack[s-1] = p + recount(pp) + recount(p) + recount(n) + if(s >= 3) { + var ppp = n_stack[s-3] + if(ppp.right === pp) { + ppp.right = n + } else { + ppp.left = n + } + } + break + } + } + } + } + //Return new tree + n_stack[0]._color = BLACK + return new RedBlackTree(cmp, n_stack[0]) +} + + +//Visit all nodes inorder +function doVisitFull(visit, node) { + if(node.left) { + var v = doVisitFull(visit, node.left) + if(v) { return v } + } + var v = visit(node.key, node.value) + if(v) { return v } + if(node.right) { + return doVisitFull(visit, node.right) + } +} + +//Visit half nodes in order +function doVisitHalf(lo, compare, visit, node) { + var l = compare(lo, node.key) + if(l <= 0) { + if(node.left) { + var v = doVisitHalf(lo, compare, visit, node.left) + if(v) { return v } + } + var v = visit(node.key, node.value) + if(v) { return v } + } + if(node.right) { + return doVisitHalf(lo, compare, visit, node.right) + } +} + +//Visit all nodes within a range +function doVisit(lo, hi, compare, visit, node) { + var l = compare(lo, node.key) + var h = compare(hi, node.key) + var v + if(l <= 0) { + if(node.left) { + v = doVisit(lo, hi, compare, visit, node.left) + if(v) { return v } + } + if(h > 0) { + v = visit(node.key, node.value) + if(v) { return v } + } + } + if(h > 0 && node.right) { + return doVisit(lo, hi, compare, visit, node.right) + } +} + + +proto.forEach = function rbTreeForEach(visit, lo, hi) { + if(!this.root) { + return + } + switch(arguments.length) { + case 1: + return doVisitFull(visit, this.root) + break + + case 2: + return doVisitHalf(lo, this._compare, visit, this.root) + break + + case 3: + if(this._compare(lo, hi) >= 0) { + return + } + return doVisit(lo, hi, this._compare, visit, this.root) + break + } +} + +//First item in list +Object.defineProperty(proto, "begin", { + get: function() { + var stack = [] + var n = this.root + while(n) { + stack.push(n) + n = n.left + } + return new RedBlackTreeIterator(this, stack) + } +}) + +//Last item in list +Object.defineProperty(proto, "end", { + get: function() { + var stack = [] + var n = this.root + while(n) { + stack.push(n) + n = n.right + } + return new RedBlackTreeIterator(this, stack) + } +}) + +//Find the ith item in the tree +proto.at = function(idx) { + if(idx < 0) { + return new RedBlackTreeIterator(this, []) + } + var n = this.root + var stack = [] + while(true) { + stack.push(n) + if(n.left) { + if(idx < n.left._count) { + n = n.left + continue + } + idx -= n.left._count + } + if(!idx) { + return new RedBlackTreeIterator(this, stack) + } + idx -= 1 + if(n.right) { + if(idx >= n.right._count) { + break + } + n = n.right + } else { + break + } + } + return new RedBlackTreeIterator(this, []) +} + +proto.ge = function(key) { + var cmp = this._compare + var n = this.root + var stack = [] + var last_ptr = 0 + while(n) { + var d = cmp(key, n.key) + stack.push(n) + if(d <= 0) { + last_ptr = stack.length + } + if(d <= 0) { + n = n.left + } else { + n = n.right + } + } + stack.length = last_ptr + return new RedBlackTreeIterator(this, stack) +} + +proto.gt = function(key) { + var cmp = this._compare + var n = this.root + var stack = [] + var last_ptr = 0 + while(n) { + var d = cmp(key, n.key) + stack.push(n) + if(d < 0) { + last_ptr = stack.length + } + if(d < 0) { + n = n.left + } else { + n = n.right + } + } + stack.length = last_ptr + return new RedBlackTreeIterator(this, stack) +} + +proto.lt = function(key) { + var cmp = this._compare + var n = this.root + var stack = [] + var last_ptr = 0 + while(n) { + var d = cmp(key, n.key) + stack.push(n) + if(d > 0) { + last_ptr = stack.length + } + if(d <= 0) { + n = n.left + } else { + n = n.right + } + } + stack.length = last_ptr + return new RedBlackTreeIterator(this, stack) +} + +proto.le = function(key) { + var cmp = this._compare + var n = this.root + var stack = [] + var last_ptr = 0 + while(n) { + var d = cmp(key, n.key) + stack.push(n) + if(d >= 0) { + last_ptr = stack.length + } + if(d < 0) { + n = n.left + } else { + n = n.right + } + } + stack.length = last_ptr + return new RedBlackTreeIterator(this, stack) +} + +//Finds the item with key if it exists +proto.find = function(key) { + var cmp = this._compare + var n = this.root + var stack = [] + while(n) { + var d = cmp(key, n.key) + stack.push(n) + if(d === 0) { + return new RedBlackTreeIterator(this, stack) + } + if(d <= 0) { + n = n.left + } else { + n = n.right + } + } + return new RedBlackTreeIterator(this, []) +} + +//Removes item with key from tree +proto.remove = function(key) { + var iter = this.find(key) + if(iter) { + return iter.remove() + } + return this +} + +//Returns the item at `key` +proto.get = function(key) { + var cmp = this._compare + var n = this.root + while(n) { + var d = cmp(key, n.key) + if(d === 0) { + return n.value + } + if(d <= 0) { + n = n.left + } else { + n = n.right + } + } + return +} + +//Iterator for red black tree +function RedBlackTreeIterator(tree, stack) { + this.tree = tree + this._stack = stack +} + +var iproto = RedBlackTreeIterator.prototype + +//Test if iterator is valid +Object.defineProperty(iproto, "valid", { + get: function() { + return this._stack.length > 0 + } +}) + +//Node of the iterator +Object.defineProperty(iproto, "node", { + get: function() { + if(this._stack.length > 0) { + return this._stack[this._stack.length-1] + } + return null + }, + enumerable: true +}) + +//Makes a copy of an iterator +iproto.clone = function() { + return new RedBlackTreeIterator(this.tree, this._stack.slice()) +} + +//Swaps two nodes +function swapNode(n, v) { + n.key = v.key + n.value = v.value + n.left = v.left + n.right = v.right + n._color = v._color + n._count = v._count +} + +//Fix up a double black node in a tree +function fixDoubleBlack(stack) { + var n, p, s, z + for(var i=stack.length-1; i>=0; --i) { + n = stack[i] + if(i === 0) { + n._color = BLACK + return + } + //console.log("visit node:", n.key, i, stack[i].key, stack[i-1].key) + p = stack[i-1] + if(p.left === n) { + //console.log("left child") + s = p.right + if(s.right && s.right._color === RED) { + //console.log("case 1: right sibling child red") + s = p.right = cloneNode(s) + z = s.right = cloneNode(s.right) + p.right = s.left + s.left = p + s.right = z + s._color = p._color + n._color = BLACK + p._color = BLACK + z._color = BLACK + recount(p) + recount(s) + if(i > 1) { + var pp = stack[i-2] + if(pp.left === p) { + pp.left = s + } else { + pp.right = s + } + } + stack[i-1] = s + return + } else if(s.left && s.left._color === RED) { + //console.log("case 1: left sibling child red") + s = p.right = cloneNode(s) + z = s.left = cloneNode(s.left) + p.right = z.left + s.left = z.right + z.left = p + z.right = s + z._color = p._color + p._color = BLACK + s._color = BLACK + n._color = BLACK + recount(p) + recount(s) + recount(z) + if(i > 1) { + var pp = stack[i-2] + if(pp.left === p) { + pp.left = z + } else { + pp.right = z + } + } + stack[i-1] = z + return + } + if(s._color === BLACK) { + if(p._color === RED) { + //console.log("case 2: black sibling, red parent", p.right.value) + p._color = BLACK + p.right = repaint(RED, s) + return + } else { + //console.log("case 2: black sibling, black parent", p.right.value) + p.right = repaint(RED, s) + continue + } + } else { + //console.log("case 3: red sibling") + s = cloneNode(s) + p.right = s.left + s.left = p + s._color = p._color + p._color = RED + recount(p) + recount(s) + if(i > 1) { + var pp = stack[i-2] + if(pp.left === p) { + pp.left = s + } else { + pp.right = s + } + } + stack[i-1] = s + stack[i] = p + if(i+1 < stack.length) { + stack[i+1] = n + } else { + stack.push(n) + } + i = i+2 + } + } else { + //console.log("right child") + s = p.left + if(s.left && s.left._color === RED) { + //console.log("case 1: left sibling child red", p.value, p._color) + s = p.left = cloneNode(s) + z = s.left = cloneNode(s.left) + p.left = s.right + s.right = p + s.left = z + s._color = p._color + n._color = BLACK + p._color = BLACK + z._color = BLACK + recount(p) + recount(s) + if(i > 1) { + var pp = stack[i-2] + if(pp.right === p) { + pp.right = s + } else { + pp.left = s + } + } + stack[i-1] = s + return + } else if(s.right && s.right._color === RED) { + //console.log("case 1: right sibling child red") + s = p.left = cloneNode(s) + z = s.right = cloneNode(s.right) + p.left = z.right + s.right = z.left + z.right = p + z.left = s + z._color = p._color + p._color = BLACK + s._color = BLACK + n._color = BLACK + recount(p) + recount(s) + recount(z) + if(i > 1) { + var pp = stack[i-2] + if(pp.right === p) { + pp.right = z + } else { + pp.left = z + } + } + stack[i-1] = z + return + } + if(s._color === BLACK) { + if(p._color === RED) { + //console.log("case 2: black sibling, red parent") + p._color = BLACK + p.left = repaint(RED, s) + return + } else { + //console.log("case 2: black sibling, black parent") + p.left = repaint(RED, s) + continue + } + } else { + //console.log("case 3: red sibling") + s = cloneNode(s) + p.left = s.right + s.right = p + s._color = p._color + p._color = RED + recount(p) + recount(s) + if(i > 1) { + var pp = stack[i-2] + if(pp.right === p) { + pp.right = s + } else { + pp.left = s + } + } + stack[i-1] = s + stack[i] = p + if(i+1 < stack.length) { + stack[i+1] = n + } else { + stack.push(n) + } + i = i+2 + } + } + } +} + +//Removes item at iterator from tree +iproto.remove = function() { + var stack = this._stack + if(stack.length === 0) { + return this.tree + } + //First copy path to node + var cstack = new Array(stack.length) + var n = stack[stack.length-1] + cstack[cstack.length-1] = new RBNode(n._color, n.key, n.value, n.left, n.right, n._count) + for(var i=stack.length-2; i>=0; --i) { + var n = stack[i] + if(n.left === stack[i+1]) { + cstack[i] = new RBNode(n._color, n.key, n.value, cstack[i+1], n.right, n._count) + } else { + cstack[i] = new RBNode(n._color, n.key, n.value, n.left, cstack[i+1], n._count) + } + } + + //Get node + n = cstack[cstack.length-1] + //console.log("start remove: ", n.value) + + //If not leaf, then swap with previous node + if(n.left && n.right) { + //console.log("moving to leaf") + + //First walk to previous leaf + var split = cstack.length + n = n.left + while(n.right) { + cstack.push(n) + n = n.right + } + //Copy path to leaf + var v = cstack[split-1] + cstack.push(new RBNode(n._color, v.key, v.value, n.left, n.right, n._count)) + cstack[split-1].key = n.key + cstack[split-1].value = n.value + + //Fix up stack + for(var i=cstack.length-2; i>=split; --i) { + n = cstack[i] + cstack[i] = new RBNode(n._color, n.key, n.value, n.left, cstack[i+1], n._count) + } + cstack[split-1].left = cstack[split] + } + //console.log("stack=", cstack.map(function(v) { return v.value })) + + //Remove leaf node + n = cstack[cstack.length-1] + if(n._color === RED) { + //Easy case: removing red leaf + //console.log("RED leaf") + var p = cstack[cstack.length-2] + if(p.left === n) { + p.left = null + } else if(p.right === n) { + p.right = null + } + cstack.pop() + for(var i=0; i 0) { + return this._stack[this._stack.length-1].key + } + return + }, + enumerable: true +}) + +//Returns value +Object.defineProperty(iproto, "value", { + get: function() { + if(this._stack.length > 0) { + return this._stack[this._stack.length-1].value + } + return + }, + enumerable: true +}) + + +//Returns the position of this iterator in the sorted list +Object.defineProperty(iproto, "index", { + get: function() { + var idx = 0 + var stack = this._stack + if(stack.length === 0) { + var r = this.tree.root + if(r) { + return r._count + } + return 0 + } else if(stack[stack.length-1].left) { + idx = stack[stack.length-1].left._count + } + for(var s=stack.length-2; s>=0; --s) { + if(stack[s+1] === stack[s].right) { + ++idx + if(stack[s].left) { + idx += stack[s].left._count + } + } + } + return idx + }, + enumerable: true +}) + +//Advances iterator to next element in list +iproto.next = function() { + var stack = this._stack + if(stack.length === 0) { + return + } + var n = stack[stack.length-1] + if(n.right) { + n = n.right + while(n) { + stack.push(n) + n = n.left + } + } else { + stack.pop() + while(stack.length > 0 && stack[stack.length-1].right === n) { + n = stack[stack.length-1] + stack.pop() + } + } +} + +//Checks if iterator is at end of tree +Object.defineProperty(iproto, "hasNext", { + get: function() { + var stack = this._stack + if(stack.length === 0) { + return false + } + if(stack[stack.length-1].right) { + return true + } + for(var s=stack.length-1; s>0; --s) { + if(stack[s-1].left === stack[s]) { + return true + } + } + return false + } +}) + +//Update value +iproto.update = function(value) { + var stack = this._stack + if(stack.length === 0) { + throw new Error("Can't update empty node!") + } + var cstack = new Array(stack.length) + var n = stack[stack.length-1] + cstack[cstack.length-1] = new RBNode(n._color, n.key, value, n.left, n.right, n._count) + for(var i=stack.length-2; i>=0; --i) { + n = stack[i] + if(n.left === stack[i+1]) { + cstack[i] = new RBNode(n._color, n.key, n.value, cstack[i+1], n.right, n._count) + } else { + cstack[i] = new RBNode(n._color, n.key, n.value, n.left, cstack[i+1], n._count) + } + } + return new RedBlackTree(this.tree._compare, cstack[0]) +} + +//Moves iterator backward one element +iproto.prev = function() { + var stack = this._stack + if(stack.length === 0) { + return + } + var n = stack[stack.length-1] + if(n.left) { + n = n.left + while(n) { + stack.push(n) + n = n.right + } + } else { + stack.pop() + while(stack.length > 0 && stack[stack.length-1].left === n) { + n = stack[stack.length-1] + stack.pop() + } + } +} + +//Checks if iterator is at start of tree +Object.defineProperty(iproto, "hasPrev", { + get: function() { + var stack = this._stack + if(stack.length === 0) { + return false + } + if(stack[stack.length-1].left) { + return true + } + for(var s=stack.length-1; s>0; --s) { + if(stack[s-1].right === stack[s]) { + return true + } + } + return false + } +}) + +//Default comparison function +function defaultCompare(a, b) { + if(a < b) { + return -1 + } + if(a > b) { + return 1 + } + return 0 +} + +//Build a tree +function createRBTree(compare) { + return new RedBlackTree(compare || defaultCompare, null) +} \ No newline at end of file diff --git a/tools/eslint/node_modules/is-alphabetical/history.md b/tools/eslint/node_modules/is-alphabetical/history.md deleted file mode 100644 index ef81df4296778c..00000000000000 --- a/tools/eslint/node_modules/is-alphabetical/history.md +++ /dev/null @@ -1,6 +0,0 @@ - - - - -1.0.0 / 2016-07-11 -================== diff --git a/tools/eslint/node_modules/is-alphabetical/index.js b/tools/eslint/node_modules/is-alphabetical/index.js index 090d47010ff3c0..3b27588720441b 100644 --- a/tools/eslint/node_modules/is-alphabetical/index.js +++ b/tools/eslint/node_modules/is-alphabetical/index.js @@ -1,25 +1,9 @@ -/** - * @author Titus Wormer - * @copyright 2016 Titus Wormer - * @license MIT - * @module is-alphabetical - * @fileoverview Check if a character is alphabetical. - */ - 'use strict'; -/* eslint-env commonjs */ - -/* Expose. */ module.exports = alphabetical; -/** - * Check whether the given character code, or the character - * code at the first character, is alphabetical. - * - * @param {string|number} character - * @return {boolean} - Whether `character` is alphabetical. - */ +/* Check if the given character code, or the character + * code at the first character, is alphabetical. */ function alphabetical(character) { var code = typeof character === 'string' ? character.charCodeAt(0) : character; diff --git a/tools/eslint/node_modules/is-alphabetical/package.json b/tools/eslint/node_modules/is-alphabetical/package.json index 7033fc8f26a19b..2c7811526a082b 100644 --- a/tools/eslint/node_modules/is-alphabetical/package.json +++ b/tools/eslint/node_modules/is-alphabetical/package.json @@ -1,8 +1,8 @@ { "_from": "is-alphabetical@^1.0.0", - "_id": "is-alphabetical@1.0.0", + "_id": "is-alphabetical@1.0.1", "_inBundle": false, - "_integrity": "sha1-4lRMEwWCVfIUTLdXBmzTNCocjEY=", + "_integrity": "sha1-x3B5zJHU76x3W+EDS/LSQ/lebwg=", "_location": "/is-alphabetical", "_phantomChildren": {}, "_requested": { @@ -19,8 +19,8 @@ "/is-alphanumerical", "/remark-parse" ], - "_resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.0.tgz", - "_shasum": "e2544c13058255f2144cb757066cd3342a1c8c46", + "_resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.1.tgz", + "_shasum": "c77079cc91d4efac775be1034bf2d243f95e6f08", "_spec": "is-alphabetical@^1.0.0", "_where": "/Users/trott/io.js/tools/eslint-tmp/node_modules/eslint/node_modules/remark-parse", "author": { @@ -43,16 +43,13 @@ "deprecated": false, "description": "Check if a character is alphabetical", "devDependencies": { - "browserify": "^13.0.1", + "browserify": "^14.1.0", "esmangle": "^1.0.1", - "nyc": "^7.0.0", - "remark-cli": "^1.0.0", - "remark-comment-config": "^4.0.0", - "remark-github": "^5.0.0", - "remark-lint": "^4.0.0", - "remark-validate-links": "^4.0.0", + "nyc": "^11.0.0", + "remark-cli": "^3.0.0", + "remark-preset-wooorm": "^3.0.0", "tape": "^4.0.0", - "xo": "^0.16.0" + "xo": "^0.18.0" }, "files": [ "index.js" @@ -74,16 +71,9 @@ "branches": 100 }, "remarkConfig": { - "output": true, "plugins": [ - "comment-config", - "github", - "lint", - "validate-links" - ], - "settings": { - "bullet": "*" - } + "preset-wooorm" + ] }, "repository": { "type": "git", @@ -93,18 +83,21 @@ "build": "npm run build-md && npm run build-bundle && npm run build-mangle", "build-bundle": "browserify index.js --bare -s isAlphabetical > is-alphabetical.js", "build-mangle": "esmangle < is-alphabetical.js > is-alphabetical.min.js", - "build-md": "remark . --quiet --frail", + "build-md": "remark . -qfo", "lint": "xo", "test": "npm run build && npm run lint && npm run test-coverage", "test-api": "node test", "test-coverage": "nyc --reporter lcov tape test.js" }, - "version": "1.0.0", + "version": "1.0.1", "xo": { "space": true, + "esnext": false, + "rules": { + "capitalized-comments": "off" + }, "ignores": [ - "is-alphabetical.js", - "is-alphabetical.min.js" + "is-alphabetical.js" ] } } diff --git a/tools/eslint/node_modules/is-alphabetical/readme.md b/tools/eslint/node_modules/is-alphabetical/readme.md index ea08662dad3bc2..372b18837889b0 100644 --- a/tools/eslint/node_modules/is-alphabetical/readme.md +++ b/tools/eslint/node_modules/is-alphabetical/readme.md @@ -1,12 +1,10 @@ # is-alphabetical [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov] - - Check if a character is alphabetical. ## Installation -[npm][npm-install]: +[npm][]: ```bash npm install is-alphabetical @@ -14,8 +12,6 @@ npm install is-alphabetical ## Usage -Dependencies: - ```javascript var alphabetical = require('is-alphabetical'); @@ -27,7 +23,7 @@ alphabetical('💩'); // false ## API -### `alphabetical(character)` +### `alphabetical(character|code)` Check whether the given character code (`number`), or the character code at the first position (`string`), is alphabetical. @@ -36,6 +32,9 @@ code at the first position (`string`), is alphabetical. * [`is-decimal`](https://github.com/wooorm/is-decimal) * [`is-hexadecimal`](https://github.com/wooorm/is-hexadecimal) +* [`is-alphanumerical`](https://github.com/wooorm/is-alphanumerical) +* [`is-whitespace-character`](https://github.com/wooorm/is-whitespace-character) +* [`is-word-character`](https://github.com/wooorm/is-word-character) ## License @@ -51,7 +50,7 @@ code at the first position (`string`), is alphabetical. [codecov]: https://codecov.io/github/wooorm/is-alphabetical -[npm-install]: https://docs.npmjs.com/cli/install +[npm]: https://docs.npmjs.com/cli/install [license]: LICENSE diff --git a/tools/eslint/node_modules/is-alphanumerical/history.md b/tools/eslint/node_modules/is-alphanumerical/history.md deleted file mode 100644 index 674e111c479ebb..00000000000000 --- a/tools/eslint/node_modules/is-alphanumerical/history.md +++ /dev/null @@ -1,6 +0,0 @@ - - - - -1.0.0 / 2016-07-12 -================== diff --git a/tools/eslint/node_modules/is-alphanumerical/index.js b/tools/eslint/node_modules/is-alphanumerical/index.js index 58ea455baa4efe..441d6171fa4037 100644 --- a/tools/eslint/node_modules/is-alphanumerical/index.js +++ b/tools/eslint/node_modules/is-alphanumerical/index.js @@ -1,29 +1,12 @@ -/** - * @author Titus Wormer - * @copyright 2016 Titus Wormer - * @license MIT - * @module is-alphanumerical - * @fileoverview Check if a character is alphanumerical. - */ - 'use strict'; -/* eslint-env commonjs */ - -/* Dependencies. */ var alphabetical = require('is-alphabetical'); var decimal = require('is-decimal'); -/* Expose. */ module.exports = alphanumerical; -/** - * Check whether the given character code, or the character - * code at the first character, is alphanumerical. - * - * @param {string|number} character - * @return {boolean} - Whether `character` is alphanumerical. - */ +/* Check if the given character code, or the character + * code at the first character, is alphanumerical. */ function alphanumerical(character) { return alphabetical(character) || decimal(character); } diff --git a/tools/eslint/node_modules/is-alphanumerical/package.json b/tools/eslint/node_modules/is-alphanumerical/package.json index 629f3d31df1b6e..aafc45e7979df0 100644 --- a/tools/eslint/node_modules/is-alphanumerical/package.json +++ b/tools/eslint/node_modules/is-alphanumerical/package.json @@ -1,8 +1,8 @@ { "_from": "is-alphanumerical@^1.0.0", - "_id": "is-alphanumerical@1.0.0", + "_id": "is-alphanumerical@1.0.1", "_inBundle": false, - "_integrity": "sha1-4GSS5xnBvxXewjnk8a9fZ7TW578=", + "_integrity": "sha1-37SqTRCF4zvbYcLe6cgOnGwZ9Ts=", "_location": "/is-alphanumerical", "_phantomChildren": {}, "_requested": { @@ -18,8 +18,8 @@ "_requiredBy": [ "/parse-entities" ], - "_resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.0.tgz", - "_shasum": "e06492e719c1bf15dec239e4f1af5f67b4d6e7bf", + "_resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.1.tgz", + "_shasum": "dfb4aa4d1085e33bdb61c2dee9c80e9c6c19f53b", "_spec": "is-alphanumerical@^1.0.0", "_where": "/Users/trott/io.js/tools/eslint-tmp/node_modules/eslint/node_modules/parse-entities", "author": { @@ -45,16 +45,13 @@ "deprecated": false, "description": "Check if a character is alphanumerical", "devDependencies": { - "browserify": "^13.0.1", + "browserify": "^14.1.0", "esmangle": "^1.0.1", - "nyc": "^7.0.0", - "remark-cli": "^1.0.0", - "remark-comment-config": "^4.0.0", - "remark-github": "^5.0.0", - "remark-lint": "^4.0.0", - "remark-validate-links": "^4.0.0", + "nyc": "^11.0.0", + "remark-cli": "^3.0.0", + "remark-preset-wooorm": "^3.0.0", "tape": "^4.0.0", - "xo": "^0.16.0" + "xo": "^0.18.0" }, "files": [ "index.js" @@ -78,16 +75,9 @@ "branches": 100 }, "remarkConfig": { - "output": true, "plugins": [ - "comment-config", - "github", - "lint", - "validate-links" - ], - "settings": { - "bullet": "*" - } + "preset-wooorm" + ] }, "repository": { "type": "git", @@ -97,18 +87,18 @@ "build": "npm run build-md && npm run build-bundle && npm run build-mangle", "build-bundle": "browserify index.js --bare -s isAlphanumerical > is-alphanumerical.js", "build-mangle": "esmangle < is-alphanumerical.js > is-alphanumerical.min.js", - "build-md": "remark . --quiet --frail", + "build-md": "remark . -qfo", "lint": "xo", "test": "npm run build && npm run lint && npm run test-coverage", "test-api": "node test", "test-coverage": "nyc --reporter lcov tape test.js" }, - "version": "1.0.0", + "version": "1.0.1", "xo": { "space": true, + "esnext": false, "ignores": [ - "is-alphanumerical.js", - "is-alphanumerical.min.js" + "is-alphanumerical.js" ] } } diff --git a/tools/eslint/node_modules/is-alphanumerical/readme.md b/tools/eslint/node_modules/is-alphanumerical/readme.md index 26e6289d38bfc7..9b1ffddddcc1c5 100644 --- a/tools/eslint/node_modules/is-alphanumerical/readme.md +++ b/tools/eslint/node_modules/is-alphanumerical/readme.md @@ -1,12 +1,10 @@ # is-alphanumerical [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov] - - Check if a character is alphanumerical (`[a-zA-Z0-9]`). ## Installation -[npm][npm-install]: +[npm][]: ```bash npm install is-alphanumerical @@ -17,11 +15,11 @@ npm install is-alphanumerical ```javascript var alphanumerical = require('is-alphanumerical'); -alphanumerical('a'); // true -alphanumerical('Z'); // true -alphanumerical('0'); // true -alphanumerical(' '); // false -alphanumerical('💩'); // false +alphanumerical('a'); //=> true +alphanumerical('Z'); //=> true +alphanumerical('0'); //=> true +alphanumerical(' '); //=> false +alphanumerical('💩'); //=> false ``` ## API @@ -53,7 +51,7 @@ code at the first position (`string`), is alphanumerical. [codecov]: https://codecov.io/github/wooorm/is-alphanumerical -[npm-install]: https://docs.npmjs.com/cli/install +[npm]: https://docs.npmjs.com/cli/install [license]: LICENSE diff --git a/tools/eslint/node_modules/is-decimal/history.md b/tools/eslint/node_modules/is-decimal/history.md deleted file mode 100644 index ef81df4296778c..00000000000000 --- a/tools/eslint/node_modules/is-decimal/history.md +++ /dev/null @@ -1,6 +0,0 @@ - - - - -1.0.0 / 2016-07-11 -================== diff --git a/tools/eslint/node_modules/is-decimal/index.js b/tools/eslint/node_modules/is-decimal/index.js index 15ed373507932f..e0940c040da7cc 100644 --- a/tools/eslint/node_modules/is-decimal/index.js +++ b/tools/eslint/node_modules/is-decimal/index.js @@ -1,25 +1,9 @@ -/** - * @author Titus Wormer - * @copyright 2016 Titus Wormer - * @license MIT - * @module is-decimal - * @fileoverview Check if a character is decimal. - */ - 'use strict'; -/* eslint-env commonjs */ - -/* Expose. */ module.exports = decimal; -/** - * Check whether the given character code, or the character - * code at the first character, is decimal. - * - * @param {string|number} character - * @return {boolean} - Whether `character` is decimal. - */ +/* Check if the given character code, or the character + * code at the first character, is decimal. */ function decimal(character) { var code = typeof character === 'string' ? character.charCodeAt(0) : character; diff --git a/tools/eslint/node_modules/is-decimal/package.json b/tools/eslint/node_modules/is-decimal/package.json index 9cb4650d3fe995..fb2988848f35b3 100644 --- a/tools/eslint/node_modules/is-decimal/package.json +++ b/tools/eslint/node_modules/is-decimal/package.json @@ -1,8 +1,8 @@ { "_from": "is-decimal@^1.0.0", - "_id": "is-decimal@1.0.0", + "_id": "is-decimal@1.0.1", "_inBundle": false, - "_integrity": "sha1-lAV5tupjxigICmnmK9qIyEcLT+A=", + "_integrity": "sha1-9ftqlJlq2ejjdh+/vQkfH8qMToI=", "_location": "/is-decimal", "_phantomChildren": {}, "_requested": { @@ -20,8 +20,8 @@ "/parse-entities", "/remark-parse" ], - "_resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.0.tgz", - "_shasum": "940579b6ea63c628080a69e62bda88c8470b4fe0", + "_resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.1.tgz", + "_shasum": "f5fb6a94996ad9e8e3761fbfbd091f1fca8c4e82", "_spec": "is-decimal@^1.0.0", "_where": "/Users/trott/io.js/tools/eslint-tmp/node_modules/eslint/node_modules/remark-parse", "author": { @@ -44,16 +44,13 @@ "deprecated": false, "description": "Check if a character is decimal", "devDependencies": { - "browserify": "^13.0.1", + "browserify": "^14.1.0", "esmangle": "^1.0.1", - "nyc": "^7.0.0", - "remark-cli": "^1.0.0", - "remark-comment-config": "^4.0.0", - "remark-github": "^5.0.0", - "remark-lint": "^4.0.0", - "remark-validate-links": "^4.0.0", + "nyc": "^11.0.0", + "remark-cli": "^3.0.0", + "remark-preset-wooorm": "^3.0.0", "tape": "^4.0.0", - "xo": "^0.16.0" + "xo": "^0.18.0" }, "files": [ "index.js" @@ -75,16 +72,9 @@ "branches": 100 }, "remarkConfig": { - "output": true, "plugins": [ - "comment-config", - "github", - "lint", - "validate-links" - ], - "settings": { - "bullet": "*" - } + "preset-wooorm" + ] }, "repository": { "type": "git", @@ -94,18 +84,18 @@ "build": "npm run build-md && npm run build-bundle && npm run build-mangle", "build-bundle": "browserify index.js --bare -s isDecimal > is-decimal.js", "build-mangle": "esmangle < is-decimal.js > is-decimal.min.js", - "build-md": "remark . --quiet --frail", + "build-md": "remark . -qfo", "lint": "xo", "test": "npm run build && npm run lint && npm run test-coverage", "test-api": "node test", "test-coverage": "nyc --reporter lcov tape test.js" }, - "version": "1.0.0", + "version": "1.0.1", "xo": { "space": true, + "esnext": false, "ignores": [ - "is-decimal.js", - "is-decimal.min.js" + "is-decimal.js" ] } } diff --git a/tools/eslint/node_modules/is-decimal/readme.md b/tools/eslint/node_modules/is-decimal/readme.md index 58d25c26bc55ce..5d5de46683a536 100644 --- a/tools/eslint/node_modules/is-decimal/readme.md +++ b/tools/eslint/node_modules/is-decimal/readme.md @@ -1,12 +1,10 @@ # is-decimal [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov] - - Check if a character is decimal. ## Installation -[npm][npm-install]: +[npm][]: ```bash npm install is-decimal @@ -14,20 +12,18 @@ npm install is-decimal ## Usage -Dependencies: - ```javascript var decimal = require('is-decimal'); -decimal('0'); // true -decimal('9'); // true -decimal('a'); // false -decimal('💩'); // false +decimal('0'); //=> true +decimal('9'); //=> true +decimal('a'); //=> false +decimal('💩'); //=> false ``` ## API -### `decimal(character)` +### `decimal(character|code)` Check whether the given character code (`number`), or the character code at the first position (`string`), is decimal. @@ -36,6 +32,8 @@ code at the first position (`string`), is decimal. * [`is-alphabetical`](https://github.com/wooorm/is-alphabetical) * [`is-hexadecimal`](https://github.com/wooorm/is-hexadecimal) +* [`is-whitespace-character`](https://github.com/wooorm/is-whitespace-character) +* [`is-word-character`](https://github.com/wooorm/is-word-character) ## License @@ -51,7 +49,7 @@ code at the first position (`string`), is decimal. [codecov]: https://codecov.io/github/wooorm/is-decimal -[npm-install]: https://docs.npmjs.com/cli/install +[npm]: https://docs.npmjs.com/cli/install [license]: LICENSE diff --git a/tools/eslint/node_modules/is-hexadecimal/history.md b/tools/eslint/node_modules/is-hexadecimal/history.md deleted file mode 100644 index ef81df4296778c..00000000000000 --- a/tools/eslint/node_modules/is-hexadecimal/history.md +++ /dev/null @@ -1,6 +0,0 @@ - - - - -1.0.0 / 2016-07-11 -================== diff --git a/tools/eslint/node_modules/is-hexadecimal/index.js b/tools/eslint/node_modules/is-hexadecimal/index.js index dfb9ddb5780072..533e74a67f6579 100644 --- a/tools/eslint/node_modules/is-hexadecimal/index.js +++ b/tools/eslint/node_modules/is-hexadecimal/index.js @@ -1,25 +1,9 @@ -/** - * @author Titus Wormer - * @copyright 2016 Titus Wormer - * @license MIT - * @module is-hexadecimal - * @fileoverview Check if a character is hexadecimal. - */ - 'use strict'; -/* eslint-env commonjs */ - -/* Expose. */ module.exports = hexadecimal; -/** - * Check whether the given character code, or the character - * code at the first character, is hexadecimal. - * - * @param {string|number} character - * @return {boolean} - Whether `character` is hexadecimal. - */ +/* Check if the given character code, or the character + * code at the first character, is hexadecimal. */ function hexadecimal(character) { var code = typeof character === 'string' ? character.charCodeAt(0) : character; diff --git a/tools/eslint/node_modules/is-hexadecimal/package.json b/tools/eslint/node_modules/is-hexadecimal/package.json index b53102a1add786..d8a2111a3a03e3 100644 --- a/tools/eslint/node_modules/is-hexadecimal/package.json +++ b/tools/eslint/node_modules/is-hexadecimal/package.json @@ -1,8 +1,8 @@ { "_from": "is-hexadecimal@^1.0.0", - "_id": "is-hexadecimal@1.0.0", + "_id": "is-hexadecimal@1.0.1", "_inBundle": false, - "_integrity": "sha1-XEWXcdKvmi45Ungf1U/LG8/kETw=", + "_integrity": "sha1-bghLvJIGH7sJcexYts5tQE4k2mk=", "_location": "/is-hexadecimal", "_phantomChildren": {}, "_requested": { @@ -18,8 +18,8 @@ "_requiredBy": [ "/parse-entities" ], - "_resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.0.tgz", - "_shasum": "5c459771d2af9a2e3952781fd54fcb1bcfe4113c", + "_resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.1.tgz", + "_shasum": "6e084bbc92061fbb0971ec58b6ce6d404e24da69", "_spec": "is-hexadecimal@^1.0.0", "_where": "/Users/trott/io.js/tools/eslint-tmp/node_modules/eslint/node_modules/parse-entities", "author": { @@ -42,16 +42,13 @@ "deprecated": false, "description": "Check if a character is hexadecimal", "devDependencies": { - "browserify": "^13.0.1", + "browserify": "^14.1.0", "esmangle": "^1.0.1", - "nyc": "^7.0.0", - "remark-cli": "^1.0.0", - "remark-comment-config": "^4.0.0", - "remark-github": "^5.0.0", - "remark-lint": "^4.0.0", - "remark-validate-links": "^4.0.0", + "nyc": "^11.0.0", + "remark-cli": "^3.0.0", + "remark-preset-wooorm": "^3.0.0", "tape": "^4.0.0", - "xo": "^0.16.0" + "xo": "^0.18.0" }, "files": [ "index.js" @@ -73,16 +70,9 @@ "branches": 100 }, "remarkConfig": { - "output": true, "plugins": [ - "comment-config", - "github", - "lint", - "validate-links" - ], - "settings": { - "bullet": "*" - } + "preset-wooorm" + ] }, "repository": { "type": "git", @@ -92,18 +82,18 @@ "build": "npm run build-md && npm run build-bundle && npm run build-mangle", "build-bundle": "browserify index.js --bare -s isHexadecimal > is-hexadecimal.js", "build-mangle": "esmangle < is-hexadecimal.js > is-hexadecimal.min.js", - "build-md": "remark . --quiet --frail", + "build-md": "remark . -qfo", "lint": "xo", "test": "npm run build && npm run lint && npm run test-coverage", "test-api": "node test", "test-coverage": "nyc --reporter lcov tape test.js" }, - "version": "1.0.0", + "version": "1.0.1", "xo": { "space": true, + "esnext": false, "ignores": [ - "is-hexadecimal.js", - "is-hexadecimal.min.js" + "is-hexadecimal.js" ] } } diff --git a/tools/eslint/node_modules/is-hexadecimal/readme.md b/tools/eslint/node_modules/is-hexadecimal/readme.md index 19640e3668278b..5c4b6e63d26db1 100644 --- a/tools/eslint/node_modules/is-hexadecimal/readme.md +++ b/tools/eslint/node_modules/is-hexadecimal/readme.md @@ -1,12 +1,10 @@ # is-hexadecimal [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov] - - Check if a character is hexadecimal. ## Installation -[npm][npm-install]: +[npm][]: ```bash npm install is-hexadecimal @@ -14,20 +12,18 @@ npm install is-hexadecimal ## Usage -Dependencies: - ```javascript var hexadecimal = require('is-hexadecimal'); -hexadecimal('a'); // true -hexadecimal('0'); // true -hexadecimal('G'); // false -hexadecimal('💩'); // false +hexadecimal('a'); //=> true +hexadecimal('0'); //=> true +hexadecimal('G'); //=> false +hexadecimal('💩'); //=> false ``` ## API -### `hexadecimal(character)` +### `hexadecimal(character|code)` Check whether the given character code (`number`), or the character code at the first position (`string`), is hexadecimal. @@ -35,7 +31,10 @@ code at the first position (`string`), is hexadecimal. ## Related * [`is-alphabetical`](https://github.com/wooorm/is-alphabetical) +* [`is-alphanumerical`](https://github.com/wooorm/is-alphabetical) * [`is-decimal`](https://github.com/wooorm/is-decimal) +* [`is-whitespace-character`](https://github.com/wooorm/is-whitespace-character) +* [`is-word-character`](https://github.com/wooorm/is-word-character) ## License @@ -51,7 +50,7 @@ code at the first position (`string`), is hexadecimal. [codecov]: https://codecov.io/github/wooorm/is-hexadecimal -[npm-install]: https://docs.npmjs.com/cli/install +[npm]: https://docs.npmjs.com/cli/install [license]: LICENSE diff --git a/tools/eslint/node_modules/is-whitespace-character/history.md b/tools/eslint/node_modules/is-whitespace-character/history.md deleted file mode 100644 index 674e111c479ebb..00000000000000 --- a/tools/eslint/node_modules/is-whitespace-character/history.md +++ /dev/null @@ -1,6 +0,0 @@ - - - - -1.0.0 / 2016-07-12 -================== diff --git a/tools/eslint/node_modules/is-whitespace-character/index.js b/tools/eslint/node_modules/is-whitespace-character/index.js index f9e23df3f72b0b..57d4ca68eb2e9b 100644 --- a/tools/eslint/node_modules/is-whitespace-character/index.js +++ b/tools/eslint/node_modules/is-whitespace-character/index.js @@ -1,31 +1,12 @@ -/** - * @author Titus Wormer - * @copyright 2016 Titus Wormer - * @license MIT - * @module is-whitespace-character - * @fileoverview Check if a character is a whitespace character. - */ - 'use strict'; -/* eslint-env commonjs */ - -/* Expose. */ module.exports = whitespace; -/* Methods. */ var fromCode = String.fromCharCode; - -/* Constants. */ var re = /\s/; -/** - * Check whether the given character code, or the character - * code at the first character, is a whitespace character. - * - * @param {string|number} character - * @return {boolean} - Whether `character` is a whitespaces character. - */ +/* Check if the given character code, or the character + * code at the first character, is a whitespace character. */ function whitespace(character) { return re.test( typeof character === 'number' ? fromCode(character) : character.charAt(0) diff --git a/tools/eslint/node_modules/is-whitespace-character/package.json b/tools/eslint/node_modules/is-whitespace-character/package.json index 1663491e3a8b9d..5639b3bd425c24 100644 --- a/tools/eslint/node_modules/is-whitespace-character/package.json +++ b/tools/eslint/node_modules/is-whitespace-character/package.json @@ -1,8 +1,8 @@ { "_from": "is-whitespace-character@^1.0.0", - "_id": "is-whitespace-character@1.0.0", + "_id": "is-whitespace-character@1.0.1", "_inBundle": false, - "_integrity": "sha1-u/SoN2Tq0NRRvsKlUhjpGWGtwnU=", + "_integrity": "sha1-muAXbzKCtlRXoZks2whPil+DPjs=", "_location": "/is-whitespace-character", "_phantomChildren": {}, "_requested": { @@ -18,8 +18,8 @@ "_requiredBy": [ "/remark-parse" ], - "_resolved": "https://registry.npmjs.org/is-whitespace-character/-/is-whitespace-character-1.0.0.tgz", - "_shasum": "bbf4a83764ead0d451bec2a55218e91961adc275", + "_resolved": "https://registry.npmjs.org/is-whitespace-character/-/is-whitespace-character-1.0.1.tgz", + "_shasum": "9ae0176f3282b65457a1992cdb084f8a5f833e3b", "_spec": "is-whitespace-character@^1.0.0", "_where": "/Users/trott/io.js/tools/eslint-tmp/node_modules/eslint/node_modules/remark-parse", "author": { @@ -42,16 +42,13 @@ "deprecated": false, "description": "Check if a character is a whitespace character", "devDependencies": { - "browserify": "^13.0.1", + "browserify": "^14.1.0", "esmangle": "^1.0.1", - "nyc": "^7.0.0", - "remark-cli": "^1.0.0", - "remark-comment-config": "^4.0.0", - "remark-github": "^5.0.0", - "remark-lint": "^4.0.0", - "remark-validate-links": "^4.0.0", + "nyc": "^11.0.0", + "remark-cli": "^3.0.0", + "remark-preset-wooorm": "^3.0.0", "tape": "^4.0.0", - "xo": "^0.16.0" + "xo": "^0.18.0" }, "files": [ "index.js" @@ -75,16 +72,9 @@ "branches": 100 }, "remarkConfig": { - "output": true, "plugins": [ - "comment-config", - "github", - "lint", - "validate-links" - ], - "settings": { - "bullet": "*" - } + "preset-wooorm" + ] }, "repository": { "type": "git", @@ -94,18 +84,18 @@ "build": "npm run build-md && npm run build-bundle && npm run build-mangle", "build-bundle": "browserify index.js --bare -s isWhitespaceCharacter > is-whitespace-character.js", "build-mangle": "esmangle < is-whitespace-character.js > is-whitespace-character.min.js", - "build-md": "remark . --quiet --frail", + "build-md": "remark . -qfo", "lint": "xo", "test": "npm run build && npm run lint && npm run test-coverage", "test-api": "node test", "test-coverage": "nyc --reporter lcov tape test.js" }, - "version": "1.0.0", + "version": "1.0.1", "xo": { "space": true, + "esnext": false, "ignores": [ - "is-whitespace-character.js", - "is-whitespace-character.min.js" + "is-whitespace-character.js" ] } } diff --git a/tools/eslint/node_modules/is-whitespace-character/readme.md b/tools/eslint/node_modules/is-whitespace-character/readme.md index c2ac49c21300e8..171c2071fa7b02 100644 --- a/tools/eslint/node_modules/is-whitespace-character/readme.md +++ b/tools/eslint/node_modules/is-whitespace-character/readme.md @@ -1,14 +1,12 @@ # is-whitespace-character [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov] - - Check if a character is a whitespace character: `\s`, which equals all Unicode Space Separators (including `[ \t\v\f]`), the BOM (`\uFEFF`), and line terminator (`[\n\r\u2028\u2029]`). ## Installation -[npm][npm-install]: +[npm][]: ```bash npm install is-whitespace-character @@ -29,7 +27,7 @@ whitespace('💩'); // false ## API -### `whitespaceCharacter(character)` +### `whitespaceCharacter(character|code)` Check whether the given character code (`number`), or the character code at the first position (`string`), is a whitespace character. @@ -56,7 +54,7 @@ code at the first position (`string`), is a whitespace character. [codecov]: https://codecov.io/github/wooorm/is-whitespace-character -[npm-install]: https://docs.npmjs.com/cli/install +[npm]: https://docs.npmjs.com/cli/install [license]: LICENSE diff --git a/tools/eslint/node_modules/is-word-character/history.md b/tools/eslint/node_modules/is-word-character/history.md deleted file mode 100644 index 674e111c479ebb..00000000000000 --- a/tools/eslint/node_modules/is-word-character/history.md +++ /dev/null @@ -1,6 +0,0 @@ - - - - -1.0.0 / 2016-07-12 -================== diff --git a/tools/eslint/node_modules/is-word-character/index.js b/tools/eslint/node_modules/is-word-character/index.js index c2f9c3fd05992c..96411474379fd0 100644 --- a/tools/eslint/node_modules/is-word-character/index.js +++ b/tools/eslint/node_modules/is-word-character/index.js @@ -1,31 +1,12 @@ -/** - * @author Titus Wormer - * @copyright 2016 Titus Wormer - * @license MIT - * @module is-word-character - * @fileoverview Check if a character is a word character. - */ - 'use strict'; -/* eslint-env commonjs */ - -/* Expose. */ module.exports = wordCharacter; -/* Methods. */ var fromCode = String.fromCharCode; - -/* Constants. */ var re = /\w/; -/** - * Check whether the given character code, or the character - * code at the first character, is a word character. - * - * @param {string|number} character - * @return {boolean} - Whether `character` is a word character. - */ +/* Check if the given character code, or the character + * code at the first character, is a word character. */ function wordCharacter(character) { return re.test( typeof character === 'number' ? fromCode(character) : character.charAt(0) diff --git a/tools/eslint/node_modules/is-word-character/package.json b/tools/eslint/node_modules/is-word-character/package.json index 562d2830dcd8d8..944d0712df290c 100644 --- a/tools/eslint/node_modules/is-word-character/package.json +++ b/tools/eslint/node_modules/is-word-character/package.json @@ -1,8 +1,8 @@ { "_from": "is-word-character@^1.0.0", - "_id": "is-word-character@1.0.0", + "_id": "is-word-character@1.0.1", "_inBundle": false, - "_integrity": "sha1-o6nl3a1wxcLuNvSpz8mlP0RTUkc=", + "_integrity": "sha1-WgP6HqkazopusMfNdw64bWXIvvs=", "_location": "/is-word-character", "_phantomChildren": {}, "_requested": { @@ -18,8 +18,8 @@ "_requiredBy": [ "/remark-parse" ], - "_resolved": "https://registry.npmjs.org/is-word-character/-/is-word-character-1.0.0.tgz", - "_shasum": "a3a9e5ddad70c5c2ee36f4a9cfc9a53f44535247", + "_resolved": "https://registry.npmjs.org/is-word-character/-/is-word-character-1.0.1.tgz", + "_shasum": "5a03fa1ea91ace8a6eb0c7cd770eb86d65c8befb", "_spec": "is-word-character@^1.0.0", "_where": "/Users/trott/io.js/tools/eslint-tmp/node_modules/eslint/node_modules/remark-parse", "author": { @@ -42,16 +42,13 @@ "deprecated": false, "description": "Check if a character is a word character", "devDependencies": { - "browserify": "^13.0.1", + "browserify": "^14.1.0", "esmangle": "^1.0.1", - "nyc": "^7.0.0", - "remark-cli": "^1.0.0", - "remark-comment-config": "^4.0.0", - "remark-github": "^5.0.0", - "remark-lint": "^4.0.0", - "remark-validate-links": "^4.0.0", + "nyc": "^11.0.0", + "remark-cli": "^3.0.0", + "remark-preset-wooorm": "^3.0.0", "tape": "^4.0.0", - "xo": "^0.16.0" + "xo": "^0.18.0" }, "files": [ "index.js" @@ -73,16 +70,9 @@ "branches": 100 }, "remarkConfig": { - "output": true, "plugins": [ - "comment-config", - "github", - "lint", - "validate-links" - ], - "settings": { - "bullet": "*" - } + "preset-wooorm" + ] }, "repository": { "type": "git", @@ -92,18 +82,18 @@ "build": "npm run build-md && npm run build-bundle && npm run build-mangle", "build-bundle": "browserify index.js --bare -s isWordCharacter > is-word-character.js", "build-mangle": "esmangle < is-word-character.js > is-word-character.min.js", - "build-md": "remark . --quiet --frail", + "build-md": "remark . -qfo", "lint": "xo", "test": "npm run build && npm run lint && npm run test-coverage", "test-api": "node test", "test-coverage": "nyc --reporter lcov tape test.js" }, - "version": "1.0.0", + "version": "1.0.1", "xo": { "space": true, + "esnext": false, "ignores": [ - "is-word-character.js", - "is-word-character.min.js" + "is-word-character.js" ] } } diff --git a/tools/eslint/node_modules/is-word-character/readme.md b/tools/eslint/node_modules/is-word-character/readme.md index 4a0a25fd299d77..acf4f2a011f29c 100644 --- a/tools/eslint/node_modules/is-word-character/readme.md +++ b/tools/eslint/node_modules/is-word-character/readme.md @@ -1,13 +1,11 @@ # is-word-character [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov] - - Check if a character is a word character (`\w`, which equals `[a-zA-Z0-9_]`). ## Installation -[npm][npm-install]: +[npm][]: ```bash npm install is-word-character @@ -18,17 +16,17 @@ npm install is-word-character ```javascript var wordCharacter = require('is-word-character'); -wordCharacter('a'); // true -wordCharacter('Z'); // true -wordCharacter('0'); // true -wordCharacter('_'); // true -wordCharacter(' '); // false -wordCharacter('💩'); // false +wordCharacter('a'); //=> true +wordCharacter('Z'); //=> true +wordCharacter('0'); //=> true +wordCharacter('_'); //=> true +wordCharacter(' '); //=> false +wordCharacter('💩'); //=> false ``` ## API -### `wordCharacter(character)` +### `wordCharacter(character|code)` Check whether the given character code (`number`), or the character code at the first position (`string`), is a word character. @@ -55,7 +53,7 @@ code at the first position (`string`), is a word character. [codecov]: https://codecov.io/github/wooorm/is-word-character -[npm-install]: https://docs.npmjs.com/cli/install +[npm]: https://docs.npmjs.com/cli/install [license]: LICENSE diff --git a/tools/eslint/node_modules/isexe/LICENSE b/tools/eslint/node_modules/isexe/LICENSE new file mode 100644 index 00000000000000..19129e315fe593 --- /dev/null +++ b/tools/eslint/node_modules/isexe/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/tools/eslint/node_modules/isexe/README.md b/tools/eslint/node_modules/isexe/README.md new file mode 100644 index 00000000000000..35769e84408ce9 --- /dev/null +++ b/tools/eslint/node_modules/isexe/README.md @@ -0,0 +1,51 @@ +# isexe + +Minimal module to check if a file is executable, and a normal file. + +Uses `fs.stat` and tests against the `PATHEXT` environment variable on +Windows. + +## USAGE + +```javascript +var isexe = require('isexe') +isexe('some-file-name', function (err, isExe) { + if (err) { + console.error('probably file does not exist or something', err) + } else if (isExe) { + console.error('this thing can be run') + } else { + console.error('cannot be run') + } +}) + +// same thing but synchronous, throws errors +var isExe = isexe.sync('some-file-name') + +// treat errors as just "not executable" +isexe('maybe-missing-file', { ignoreErrors: true }, callback) +var isExe = isexe.sync('maybe-missing-file', { ignoreErrors: true }) +``` + +## API + +### `isexe(path, [options], [callback])` + +Check if the path is executable. If no callback provided, and a +global `Promise` object is available, then a Promise will be returned. + +Will raise whatever errors may be raised by `fs.stat`, unless +`options.ignoreErrors` is set to true. + +### `isexe.sync(path, [options])` + +Same as `isexe` but returns the value and throws any errors raised. + +### Options + +* `ignoreErrors` Treat all errors as "no, this is not executable", but + don't raise them. +* `uid` Number to use as the user id +* `gid` Number to use as the group id +* `pathExt` List of path extensions to use instead of `PATHEXT` + environment variable on Windows. diff --git a/tools/eslint/node_modules/isexe/index.js b/tools/eslint/node_modules/isexe/index.js new file mode 100644 index 00000000000000..553fb32b119bdf --- /dev/null +++ b/tools/eslint/node_modules/isexe/index.js @@ -0,0 +1,57 @@ +var fs = require('fs') +var core +if (process.platform === 'win32' || global.TESTING_WINDOWS) { + core = require('./windows.js') +} else { + core = require('./mode.js') +} + +module.exports = isexe +isexe.sync = sync + +function isexe (path, options, cb) { + if (typeof options === 'function') { + cb = options + options = {} + } + + if (!cb) { + if (typeof Promise !== 'function') { + throw new TypeError('callback not provided') + } + + return new Promise(function (resolve, reject) { + isexe(path, options || {}, function (er, is) { + if (er) { + reject(er) + } else { + resolve(is) + } + }) + }) + } + + core(path, options || {}, function (er, is) { + // ignore EACCES because that just means we aren't allowed to run it + if (er) { + if (er.code === 'EACCES' || options && options.ignoreErrors) { + er = null + is = false + } + } + cb(er, is) + }) +} + +function sync (path, options) { + // my kingdom for a filtered catch + try { + return core.sync(path, options || {}) + } catch (er) { + if (options && options.ignoreErrors || er.code === 'EACCES') { + return false + } else { + throw er + } + } +} diff --git a/tools/eslint/node_modules/isexe/mode.js b/tools/eslint/node_modules/isexe/mode.js new file mode 100644 index 00000000000000..1995ea4a06aec4 --- /dev/null +++ b/tools/eslint/node_modules/isexe/mode.js @@ -0,0 +1,41 @@ +module.exports = isexe +isexe.sync = sync + +var fs = require('fs') + +function isexe (path, options, cb) { + fs.stat(path, function (er, stat) { + cb(er, er ? false : checkStat(stat, options)) + }) +} + +function sync (path, options) { + return checkStat(fs.statSync(path), options) +} + +function checkStat (stat, options) { + return stat.isFile() && checkMode(stat, options) +} + +function checkMode (stat, options) { + var mod = stat.mode + var uid = stat.uid + var gid = stat.gid + + var myUid = options.uid !== undefined ? + options.uid : process.getuid && process.getuid() + var myGid = options.gid !== undefined ? + options.gid : process.getgid && process.getgid() + + var u = parseInt('100', 8) + var g = parseInt('010', 8) + var o = parseInt('001', 8) + var ug = u | g + + var ret = (mod & o) || + (mod & g) && gid === myGid || + (mod & u) && uid === myUid || + (mod & ug) && myUid === 0 + + return ret +} diff --git a/tools/eslint/node_modules/isexe/package.json b/tools/eslint/node_modules/isexe/package.json new file mode 100644 index 00000000000000..9e235ec1600589 --- /dev/null +++ b/tools/eslint/node_modules/isexe/package.json @@ -0,0 +1,60 @@ +{ + "_from": "isexe@^2.0.0", + "_id": "isexe@2.0.0", + "_inBundle": false, + "_integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "_location": "/eslint/isexe", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "isexe@^2.0.0", + "name": "isexe", + "escapedName": "isexe", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/eslint/which" + ], + "_resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "_shasum": "e8fbf374dc556ff8947a10dcb0572d633f2cfa10", + "_spec": "isexe@^2.0.0", + "_where": "/Users/trott/io.js/tools/eslint-tmp/node_modules/eslint/node_modules/which", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/isexe/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Minimal module to check if a file is executable.", + "devDependencies": { + "mkdirp": "^0.5.1", + "rimraf": "^2.5.0", + "tap": "^10.3.0" + }, + "directories": { + "test": "test" + }, + "homepage": "https://github.com/isaacs/isexe#readme", + "keywords": [], + "license": "ISC", + "main": "index.js", + "name": "isexe", + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/isexe.git" + }, + "scripts": { + "postpublish": "git push origin --all; git push origin --tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap test/*.js --100" + }, + "version": "2.0.0" +} diff --git a/tools/eslint/node_modules/isexe/windows.js b/tools/eslint/node_modules/isexe/windows.js new file mode 100644 index 00000000000000..34996734d8ef39 --- /dev/null +++ b/tools/eslint/node_modules/isexe/windows.js @@ -0,0 +1,42 @@ +module.exports = isexe +isexe.sync = sync + +var fs = require('fs') + +function checkPathExt (path, options) { + var pathext = options.pathExt !== undefined ? + options.pathExt : process.env.PATHEXT + + if (!pathext) { + return true + } + + pathext = pathext.split(';') + if (pathext.indexOf('') !== -1) { + return true + } + for (var i = 0; i < pathext.length; i++) { + var p = pathext[i].toLowerCase() + if (p && path.substr(-p.length).toLowerCase() === p) { + return true + } + } + return false +} + +function checkStat (stat, path, options) { + if (!stat.isSymbolicLink() && !stat.isFile()) { + return false + } + return checkPathExt(path, options) +} + +function isexe (path, options, cb) { + fs.stat(path, function (er, stat) { + cb(er, er ? false : checkStat(stat, path, options)) + }) +} + +function sync (path, options) { + return checkStat(fs.statSync(path), path, options) +} diff --git a/tools/eslint/node_modules/jschardet/LICENSE b/tools/eslint/node_modules/jschardet/LICENSE new file mode 100755 index 00000000000000..19e307187ac8b9 --- /dev/null +++ b/tools/eslint/node_modules/jschardet/LICENSE @@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +(This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.) + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + {description} + Copyright (C) {year} {fullname} + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random + Hacker. + + {signature of Ty Coon}, 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/tools/eslint/node_modules/jschardet/dist/jschardet.js b/tools/eslint/node_modules/jschardet/dist/jschardet.js index 20ca69ae2a29a3..5a1fa6e4811407 100755 --- a/tools/eslint/node_modules/jschardet/dist/jschardet.js +++ b/tools/eslint/node_modules/jschardet/dist/jschardet.js @@ -1,6 +1,17 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.jschardet = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= 0x81 && aStr.charCodeAt(0) <= 0x9F ) { var order = 188 * (aStr.charCodeAt(0) - 0x81); @@ -1230,7 +1243,7 @@ jschardet.SJISDistributionAnalysis = function() { return -1; } order += aStr.charCodeAt(1) - 0x40; - if( aStr.charCodeAt(1) > 0x7F ) { + if( aStr.charCodeAt(1) < 0x40 || aStr.charCodeAt(1) === 0x7F || aStr.charCodeAt(1) > 0xFC) { order = -1; } return order; @@ -1269,7 +1282,7 @@ jschardet.EUCJPDistributionAnalysis.prototype = new jschardet.CharDistributionAn }(require('./init')); -},{"./init":20}],5:[function(require,module,exports){ +},{"./init":21}],6:[function(require,module,exports){ /* * The Original Code is Mozilla Universal charset detector code. * @@ -1389,7 +1402,7 @@ jschardet.CharSetGroupProber.prototype = new jschardet.CharSetProber(); }(require('./init')); -},{"./init":20}],6:[function(require,module,exports){ +},{"./init":21}],7:[function(require,module,exports){ /* * The Original Code is Mozilla Universal charset detector code. * @@ -1459,7 +1472,7 @@ jschardet.CharSetProber = function() { }(require('./init')); -},{"./init":20}],7:[function(require,module,exports){ +},{"./init":21}],8:[function(require,module,exports){ /* * The Original Code is Mozilla Universal charset detector code. * @@ -1532,7 +1545,7 @@ jschardet.CodingStateMachine = function(sm) { }(require('./init')); -},{"./init":20}],8:[function(require,module,exports){ +},{"./init":21}],9:[function(require,module,exports){ /* * The Original Code is Mozilla Universal charset detector code. * @@ -1581,7 +1594,7 @@ jschardet.Constants = { }(require('./init')); -},{"./init":20}],9:[function(require,module,exports){ +},{"./init":21}],10:[function(require,module,exports){ /* * The Original Code is Mozilla Universal charset detector code. * @@ -1681,7 +1694,7 @@ jschardet.EscCharSetProber.prototype = new jschardet.CharSetProber(); }(require('./init')); -},{"./init":20}],10:[function(require,module,exports){ +},{"./init":21}],11:[function(require,module,exports){ /* * The Original Code is Mozilla Universal charset detector code. * @@ -1937,7 +1950,7 @@ jschardet.ISO2022KRSMModel = { }(require('./init')); -},{"./init":20}],11:[function(require,module,exports){ +},{"./init":21}],12:[function(require,module,exports){ /* * The Original Code is Mozilla Universal charset detector code. * @@ -2041,7 +2054,7 @@ jschardet.EUCJPProber.prototype = new jschardet.MultiByteCharSetProber(); }(require('./init')); -},{"./init":20}],12:[function(require,module,exports){ +},{"./init":21}],13:[function(require,module,exports){ /* * The Original Code is Mozilla Universal charset detector code. * @@ -2644,7 +2657,7 @@ jschardet.EUCKRCharToFreqOrder = [ }(require('./init')); -},{"./init":20}],13:[function(require,module,exports){ +},{"./init":21}],14:[function(require,module,exports){ /* * The Original Code is Mozilla Universal charset detector code. * @@ -2697,7 +2710,7 @@ jschardet.EUCKRProber.prototype = new jschardet.MultiByteCharSetProber(); }(require('./init')); -},{"./init":20}],14:[function(require,module,exports){ +},{"./init":21}],15:[function(require,module,exports){ /* * The Original Code is Mozilla Universal charset detector code. * @@ -3132,7 +3145,7 @@ jschardet.EUCTWCharToFreqOrder = [ }(require('./init')); -},{"./init":20}],15:[function(require,module,exports){ +},{"./init":21}],16:[function(require,module,exports){ /* * The Original Code is Mozilla Universal charset detector code. * @@ -3185,7 +3198,7 @@ jschardet.EUCTWProber.prototype = new jschardet.MultiByteCharSetProber(); }(require('./init')); -},{"./init":20}],16:[function(require,module,exports){ +},{"./init":21}],17:[function(require,module,exports){ /* * The Original Code is Mozilla Universal charset detector code. * @@ -3664,7 +3677,7 @@ jschardet.GB2312CharToFreqOrder = [ }(require('./init')); -},{"./init":20}],17:[function(require,module,exports){ +},{"./init":21}],18:[function(require,module,exports){ /* * The Original Code is Mozilla Universal charset detector code. * @@ -3717,7 +3730,7 @@ jschardet.GB2312Prober.prototype = new jschardet.MultiByteCharSetProber(); }(require('./init')); -},{"./init":20}],18:[function(require,module,exports){ +},{"./init":21}],19:[function(require,module,exports){ /* * The Original Code is Mozilla Universal charset detector code. * @@ -4041,9 +4054,9 @@ if (!Array.prototype.indexOf) }(require('./init')); -},{"./init":20}],19:[function(require,module,exports){ +},{"./init":21}],20:[function(require,module,exports){ module.exports = require('./init') -},{"./init":20}],20:[function(require,module,exports){ +},{"./init":21}],21:[function(require,module,exports){ /* * The Original Code is Mozilla Universal charset detector code. * @@ -4126,7 +4139,7 @@ jschardet.log = function() { console.log.apply(console, arguments); } -},{"./big5freq":2,"./big5prober":3,"./chardistribution":4,"./charsetgroupprober":5,"./charsetprober":6,"./codingstatemachine":7,"./constants":8,"./escprober":9,"./escsm":10,"./eucjpprober":11,"./euckrfreq":12,"./euckrprober":13,"./euctwfreq":14,"./euctwprober":15,"./gb2312freq":16,"./gb2312prober":17,"./hebrewprober":18,"./jisfreq":21,"./jpcntx":22,"./langbulgarianmodel":23,"./langcyrillicmodel":24,"./langgreekmodel":25,"./langhebrewmodel":26,"./langhungarianmodel":27,"./langthaimodel":28,"./latin1prober":29,"./mbcharsetprober":30,"./mbcsgroupprober":31,"./mbcssm":32,"./sbcharsetprober":33,"./sbcsgroupprober":34,"./sjisprober":35,"./universaldetector":36,"./utf8prober":37}],21:[function(require,module,exports){ +},{"./big5freq":3,"./big5prober":4,"./chardistribution":5,"./charsetgroupprober":6,"./charsetprober":7,"./codingstatemachine":8,"./constants":9,"./escprober":10,"./escsm":11,"./eucjpprober":12,"./euckrfreq":13,"./euckrprober":14,"./euctwfreq":15,"./euctwprober":16,"./gb2312freq":17,"./gb2312prober":18,"./hebrewprober":19,"./jisfreq":22,"./jpcntx":23,"./langbulgarianmodel":24,"./langcyrillicmodel":25,"./langgreekmodel":26,"./langhebrewmodel":27,"./langhungarianmodel":28,"./langthaimodel":29,"./latin1prober":30,"./mbcharsetprober":31,"./mbcsgroupprober":32,"./mbcssm":33,"./sbcharsetprober":34,"./sbcsgroupprober":35,"./sjisprober":36,"./universaldetector":37,"./utf8prober":38}],22:[function(require,module,exports){ /* * The Original Code is Mozilla Universal charset detector code. * @@ -4701,7 +4714,7 @@ jschardet.JISCharToFreqOrder = [ }(require('./init')); -},{"./init":20}],22:[function(require,module,exports){ +},{"./init":21}],23:[function(require,module,exports){ /* * The Original Code is Mozilla Universal charset detector code. * @@ -4945,7 +4958,7 @@ jschardet.EUCJPContextAnalysis.prototype = new jschardet.JapaneseContextAnalysis }(require('./init')); -},{"./init":20}],23:[function(require,module,exports){ +},{"./init":21}],24:[function(require,module,exports){ /* * The Original Code is Mozilla Universal charset detector code. * @@ -5179,7 +5192,7 @@ jschardet.Win1251BulgarianModel = { }(require('./init')); -},{"./init":20}],24:[function(require,module,exports){ +},{"./init":21}],25:[function(require,module,exports){ /* * The Original Code is Mozilla Universal charset detector code. * @@ -5514,7 +5527,7 @@ jschardet.Ibm855Model = { }(require('./init')); -},{"./init":20}],25:[function(require,module,exports){ +},{"./init":21}],26:[function(require,module,exports){ /* * The Original Code is Mozilla Universal charset detector code. * @@ -5745,7 +5758,7 @@ jschardet.Win1253GreekModel = { }(require('./init')); -},{"./init":20}],26:[function(require,module,exports){ +},{"./init":21}],27:[function(require,module,exports){ /* * The Original Code is Mozilla Universal charset detector code. * @@ -5950,7 +5963,7 @@ jschardet.Win1255HebrewModel = { }(require('./init')); -},{"./init":20}],27:[function(require,module,exports){ +},{"./init":21}],28:[function(require,module,exports){ /* * The Original Code is Mozilla Universal charset detector code. * @@ -6181,7 +6194,7 @@ jschardet.Win1250HungarianModel = { }(require('./init')); -},{"./init":20}],28:[function(require,module,exports){ +},{"./init":21}],29:[function(require,module,exports){ /* * The Original Code is Mozilla Universal charset detector code. * @@ -6387,7 +6400,7 @@ jschardet.TIS620ThaiModel = { }(require('./init')); -},{"./init":20}],29:[function(require,module,exports){ +},{"./init":21}],30:[function(require,module,exports){ /* * The Original Code is Mozilla Universal charset detector code. * @@ -6555,7 +6568,7 @@ jschardet.Latin1Prober.prototype = new jschardet.CharSetProber(); }(require('./init')); -},{"./init":20}],30:[function(require,module,exports){ +},{"./init":21}],31:[function(require,module,exports){ /* * The Original Code is Mozilla Universal charset detector code. * @@ -6658,7 +6671,7 @@ jschardet.MultiByteCharSetProber.prototype = new jschardet.CharSetProber(); }(require('./init')); -},{"./init":20}],31:[function(require,module,exports){ +},{"./init":21}],32:[function(require,module,exports){ /* * The Original Code is Mozilla Universal charset detector code. * @@ -6707,7 +6720,7 @@ jschardet.MBCSGroupProber.prototype = new jschardet.CharSetGroupProber(); }(require('./init')); -},{"./init":20}],32:[function(require,module,exports){ +},{"./init":21}],33:[function(require,module,exports){ /* * The Original Code is Mozilla Universal charset detector code. * @@ -7053,8 +7066,8 @@ jschardet.SJIS_cls = [ 2,2,2,2,2,2,2,2, // d8 - df 3,3,3,3,3,3,3,3, // e0 - e7 3,3,3,3,3,4,4,4, // e8 - ef - 4,4,4,4,4,4,4,4, // f0 - f7 - 4,4,4,4,4,0,0,0 // f8 - ff + 3,3,3,3,3,3,3,3, // f0 - f7 + 3,3,3,3,3,0,0,0 // f8 - ff ]; jschardet.SJIS_st = [ @@ -7265,7 +7278,7 @@ jschardet.UTF8SMModel = { }(require('./init')); -},{"./init":20}],33:[function(require,module,exports){ +},{"./init":21}],34:[function(require,module,exports){ /* * The Original Code is Mozilla Universal charset detector code. * @@ -7406,7 +7419,7 @@ jschardet.SingleByteCharSetProber.prototype = new jschardet.CharSetProber(); }(require('./init')); -},{"./init":20}],34:[function(require,module,exports){ +},{"./init":21}],35:[function(require,module,exports){ /* * The Original Code is Mozilla Universal charset detector code. * @@ -7474,7 +7487,7 @@ jschardet.SBCSGroupProber.prototype = new jschardet.CharSetGroupProber(); }(require('./init')); -},{"./init":20}],35:[function(require,module,exports){ +},{"./init":21}],36:[function(require,module,exports){ /* * The Original Code is Mozilla Universal charset detector code. * @@ -7577,7 +7590,7 @@ jschardet.SJISProber.prototype = new jschardet.MultiByteCharSetProber(); }(require('./init')); -},{"./init":20}],36:[function(require,module,exports){ +},{"./init":21}],37:[function(require,module,exports){ /* * The Original Code is Mozilla Universal charset detector code. * @@ -7789,7 +7802,7 @@ jschardet.UniversalDetector = function() { }(require('./init')); -},{"./init":20}],37:[function(require,module,exports){ +},{"./init":21}],38:[function(require,module,exports){ /* * The Original Code is Mozilla Universal charset detector code. * @@ -7886,5 +7899,5 @@ jschardet.UTF8Prober.prototype = new jschardet.CharSetProber(); }(require('./init')); -},{"./init":20}]},{},[1])(1) +},{"./init":21}]},{},[1])(1) }); \ No newline at end of file diff --git a/tools/eslint/node_modules/jschardet/dist/jschardet.min.js b/tools/eslint/node_modules/jschardet/dist/jschardet.min.js index e4753136bd3a7b..06ca20343b1342 100755 --- a/tools/eslint/node_modules/jschardet/dist/jschardet.min.js +++ b/tools/eslint/node_modules/jschardet/dist/jschardet.min.js @@ -1,673 +1,673 @@ (function(l){"object"===typeof exports&&"undefined"!==typeof module?module.exports=l():"function"===typeof define&&define.amd?define([],l):("undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:this).jschardet=l()})(function(){return function b(a,d,h){function k(c,n){if(!d[c]){if(!a[c]){var g="function"==typeof require&&require;if(!n&&g)return g(c,!0);if(f)return f(c,!0);g=Error("Cannot find module '"+c+"'");throw g.code="MODULE_NOT_FOUND",g;}g=d[c]= -{exports:{}};a[c][0].call(g.exports,function(h){var b=a[c][1][h];return k(b?b:h)},g,g.exports,b,a,d,h)}return d[c].exports}for(var f="function"==typeof require&&require,c=0;cthis._mCharToFreqOrder[h]&&this._mFreqChars++)};this.getConfidence=function(){if(0>=this._mTotalChars)return.01;if(this._mTotalChars!=this._mFreqChars){var a=this._mFreqChars/((this._mTotalChars-this._mFreqChars)*this._mTypicalDistributionRatio);if(.99>a)return a}return.99};this.gotEnoughData=function(){return 1024=a.charCodeAt(0))var b=188*(a.charCodeAt(0)-129);else if(224<=a.charCodeAt(0)&&239>=a.charCodeAt(0))b=188*(a.charCodeAt(0)-224+ -31);else return-1;b+=a.charCodeAt(1)-64;127=this._mActiveNum)){this._mState=a.Constants.notMe;break}}return this.getState()};this.getConfidence=function(){var b=this.getState();if(b==a.Constants.foundIt)return.99; -if(b==a.Constants.notMe)return.01;b=0;this._mBestGuessProber=null;for(var f=0,c;c=this._mProbers[f];f++)if(c)if(c.active){var e=c.getConfidence();a.Constants._debug&&a.log(c.getCharsetName()+" confidence = "+e+"\n");b=this._mActiveSM)return this._mState=a.Constants.notMe, -this.getState()}else if(m==a.Constants.itsMe)return this._mState=a.Constants.foundIt,this._mDetectedCharset=g.getCodingStateMachine(),this.getState()}}return this.getState()};b._mCodingSM=[new a.CodingStateMachine(a.HZSMModel),new a.CodingStateMachine(a.ISO2022CNSMModel),new a.CodingStateMachine(a.ISO2022JPSMModel),new a.CodingStateMachine(a.ISO2022KRSMModel)];b.reset()};a.EscCharSetProber.prototype=new a.CharSetProber}(b("./init"))},{"./init":20}],10:[function(b,a,d){b=b("./init");a=b.Constants; -b.HZ_cls=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,5,2,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,1,1,1,1];b.HZ_st=[a.start,a.error,3,a.start,a.start,a.start,a.error,a.error,a.error,a.error,a.error,a.error,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.error,a.error,a.start,a.start,4,a.error,5,a.error,6,a.error,5,5,4,a.error,4,a.error,4,4,4,a.error,4,a.error,4,a.itsMe,a.start,a.start,a.start,a.start,a.start,a.start];b.HZCharLenTable=[0,0,0,0,0,0];b.HZSMModel={classTable:b.HZ_cls,classFactor:6,stateTable:b.HZ_st,charLenTable:b.HZCharLenTable,name:"HZ-GB-2312"};b.ISO2022CN_cls=[2, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,2];b.ISO2022CN_st=[a.start,3,a.error,a.start,a.start,a.start,a.start,a.start,a.start,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.error,a.error,a.error,4,a.error,a.error,a.error,a.error,a.itsMe,a.error,a.error,a.error,a.error,5,6,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.itsMe,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.itsMe,a.error, -a.start];b.ISO2022CNCharLenTable=[0,0,0,0,0,0,0,0,0];b.ISO2022CNSMModel={classTable:b.ISO2022CN_cls,classFactor:9,stateTable:b.ISO2022CN_st,charLenTable:b.ISO2022CNCharLenTable,name:"ISO-2022-CN"};b.ISO2022JP_cls=[2,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,7,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,4,0,8,0,0,0,0,9,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2];b.ISO2022JP_st=[a.start,3,a.error,a.start,a.start,a.start,a.start,a.start,a.start,a.start,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.error,a.error,a.error,5, -a.error,a.error,a.error,4,a.error,a.error,a.error,a.error,a.error,6,a.itsMe,a.error,a.itsMe,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.itsMe,a.itsMe,a.error,a.error,a.error,a.itsMe,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.itsMe,a.error,a.start,a.start];b.ISO2022JPCharLenTable=[0,0,0,0,0,0,0,0,0,0];b.ISO2022JPSMModel={classTable:b.ISO2022JP_cls,classFactor:10,stateTable:b.ISO2022JP_st,charLenTable:b.ISO2022JPCharLenTable,name:"ISO-2022-JP"};b.ISO2022KR_cls=[2, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,3,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,2];b.ISO2022KR_st=[a.start,3,a.error,a.start,a.start,a.start,a.error,a.error,a.error,a.error,a.error,a.error,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.error,a.error,a.error,4,a.error,a.error,a.error,a.error,a.error,a.error,5,a.error,a.error,a.error,a.error,a.error,a.error,a.itsMe,a.start,a.start,a.start,a.start];b.ISO2022KRCharLenTable=[0,0,0,0,0,0];b.ISO2022KRSMModel={classTable:b.ISO2022KR_cls,classFactor:6,stateTable:b.ISO2022KR_st,charLenTable:b.ISO2022KRCharLenTable,name:"ISO-2022-KR"}; -!0},{"./init":20}],11:[function(b,a,d){!function(a){a.EUCJPProber=function(){a.MultiByteCharSetProber.apply(this);this.reset=function(){a.EUCJPProber.prototype.reset.apply(this);this._mContextAnalyzer.reset()};this.getCharsetName=function(){return"EUC-JP"};this.feed=function(b){for(var f=b.length,c=0;ca.Constants.SHORTCUT_THRESHOLD&& -(this._mState=a.Constants.foundIt);return this.getState()};this.getConfidence=function(){var a=this._mContextAnalyzer.getConfidence(),b=this._mDistributionAnalyzer.getConfidence();return Math.max(a,b)};this._mCodingSM=new a.CodingStateMachine(a.EUCJPSMModel);this._mDistributionAnalyzer=new a.EUCJPDistributionAnalysis;this._mContextAnalyzer=new a.EUCJPContextAnalysis;this.reset()};a.EUCJPProber.prototype=new a.MultiByteCharSetProber}(b("./init"))},{"./init":20}],12:[function(b,a,d){b=b("./init");b.EUCKR_TYPICAL_DISTRIBUTION_RATIO= -6;b.EUCKR_TABLE_SIZE=2352;b.EUCKRCharToFreqOrder=[13,130,120,1396,481,1719,1720,328,609,212,1721,707,400,299,1722,87,1397,1723,104,536,1117,1203,1724,1267,685,1268,508,1725,1726,1727,1728,1398,1399,1729,1730,1731,141,621,326,1057,368,1732,267,488,20,1733,1269,1734,945,1400,1735,47,904,1270,1736,1737,773,248,1738,409,313,786,429,1739,116,987,813,1401,683,75,1204,145,1740,1741,1742,1743,16,847,667,622,708,1744,1745,1746,966,787,304,129,1747,60,820,123,676,1748,1749,1750,1751,617,1752,626,1753,1754, -1755,1756,653,1757,1758,1759,1760,1761,1762,856,344,1763,1764,1765,1766,89,401,418,806,905,848,1767,1768,1769,946,1205,709,1770,1118,1771,241,1772,1773,1774,1271,1775,569,1776,999,1777,1778,1779,1780,337,751,1058,28,628,254,1781,177,906,270,349,891,1079,1782,19,1783,379,1784,315,1785,629,754,1402,559,1786,636,203,1206,1787,710,567,1788,935,814,1789,1790,1207,766,528,1791,1792,1208,1793,1794,1795,1796,1797,1403,1798,1799,533,1059,1404,1405,1156,1406,936,884,1080,1800,351,1801,1802,1803,1804,1805,801, -1806,1807,1808,1119,1809,1157,714,474,1407,1810,298,899,885,1811,1120,802,1158,1812,892,1813,1814,1408,659,1815,1816,1121,1817,1818,1819,1820,1821,1822,319,1823,594,545,1824,815,937,1209,1825,1826,573,1409,1022,1827,1210,1828,1829,1830,1831,1832,1833,556,722,807,1122,1060,1834,697,1835,900,557,715,1836,1410,540,1411,752,1159,294,597,1211,976,803,770,1412,1837,1838,39,794,1413,358,1839,371,925,1840,453,661,788,531,723,544,1023,1081,869,91,1841,392,430,790,602,1414,677,1082,457,1415,1416,1842,1843, -475,327,1024,1417,795,121,1844,733,403,1418,1845,1846,1847,300,119,711,1212,627,1848,1272,207,1849,1850,796,1213,382,1851,519,1852,1083,893,1853,1854,1855,367,809,487,671,1856,663,1857,1858,956,471,306,857,1859,1860,1160,1084,1861,1862,1863,1864,1865,1061,1866,1867,1868,1869,1870,1871,282,96,574,1872,502,1085,1873,1214,1874,907,1875,1876,827,977,1419,1420,1421,268,1877,1422,1878,1879,1880,308,1881,2,537,1882,1883,1215,1884,1885,127,791,1886,1273,1423,1887,34,336,404,643,1888,571,654,894,840,1889, -0,886,1274,122,575,260,908,938,1890,1275,410,316,1891,1892,100,1893,1894,1123,48,1161,1124,1025,1895,633,901,1276,1896,1897,115,816,1898,317,1899,694,1900,909,734,1424,572,866,1425,691,85,524,1010,543,394,841,1901,1902,1903,1026,1904,1905,1906,1907,1908,1909,30,451,651,988,310,1910,1911,1426,810,1216,93,1912,1913,1277,1217,1914,858,759,45,58,181,610,269,1915,1916,131,1062,551,443,1E3,821,1427,957,895,1086,1917,1918,375,1919,359,1920,687,1921,822,1922,293,1923,1924,40,662,118,692,29,939,887,640,482, -174,1925,69,1162,728,1428,910,1926,1278,1218,1279,386,870,217,854,1163,823,1927,1928,1929,1930,834,1931,78,1932,859,1933,1063,1934,1935,1936,1937,438,1164,208,595,1938,1939,1940,1941,1219,1125,1942,280,888,1429,1430,1220,1431,1943,1944,1945,1946,1947,1280,150,510,1432,1948,1949,1950,1951,1952,1953,1954,1011,1087,1955,1433,1043,1956,881,1957,614,958,1064,1065,1221,1958,638,1001,860,967,896,1434,989,492,553,1281,1165,1959,1282,1002,1283,1222,1960,1961,1962,1963,36,383,228,753,247,454,1964,876,678,1965, -1966,1284,126,464,490,835,136,672,529,940,1088,1435,473,1967,1968,467,50,390,227,587,279,378,598,792,968,240,151,160,849,882,1126,1285,639,1044,133,140,288,360,811,563,1027,561,142,523,1969,1970,1971,7,103,296,439,407,506,634,990,1972,1973,1974,1975,645,1976,1977,1978,1979,1980,1981,236,1982,1436,1983,1984,1089,192,828,618,518,1166,333,1127,1985,818,1223,1986,1987,1988,1989,1990,1991,1992,1993,342,1128,1286,746,842,1994,1995,560,223,1287,98,8,189,650,978,1288,1996,1437,1997,17,345,250,423,277,234, -512,226,97,289,42,167,1998,201,1999,2E3,843,836,824,532,338,783,1090,182,576,436,1438,1439,527,500,2001,947,889,2002,2003,2004,2005,262,600,314,447,2006,547,2007,693,738,1129,2008,71,1440,745,619,688,2009,829,2010,2011,147,2012,33,948,2013,2014,74,224,2015,61,191,918,399,637,2016,1028,1130,257,902,2017,2018,2019,2020,2021,2022,2023,2024,2025,2026,837,2027,2028,2029,2030,179,874,591,52,724,246,2031,2032,2033,2034,1167,969,2035,1289,630,605,911,1091,1168,2036,2037,2038,1441,912,2039,623,2040,2041,253, -1169,1290,2042,1442,146,620,611,577,433,2043,1224,719,1170,959,440,437,534,84,388,480,1131,159,220,198,679,2044,1012,819,1066,1443,113,1225,194,318,1003,1029,2045,2046,2047,2048,1067,2049,2050,2051,2052,2053,59,913,112,2054,632,2055,455,144,739,1291,2056,273,681,499,2057,448,2058,2059,760,2060,2061,970,384,169,245,1132,2062,2063,414,1444,2064,2065,41,235,2066,157,252,877,568,919,789,580,2067,725,2068,2069,1292,2070,2071,1445,2072,1446,2073,2074,55,588,66,1447,271,1092,2075,1226,2076,960,1013,372, -2077,2078,2079,2080,2081,1293,2082,2083,2084,2085,850,2086,2087,2088,2089,2090,186,2091,1068,180,2092,2093,2094,109,1227,522,606,2095,867,1448,1093,991,1171,926,353,1133,2096,581,2097,2098,2099,1294,1449,1450,2100,596,1172,1014,1228,2101,1451,1295,1173,1229,2102,2103,1296,1134,1452,949,1135,2104,2105,1094,1453,1454,1455,2106,1095,2107,2108,2109,2110,2111,2112,2113,2114,2115,2116,2117,804,2118,2119,1230,1231,805,1456,405,1136,2120,2121,2122,2123,2124,720,701,1297,992,1457,927,1004,2125,2126,2127,2128, -2129,2130,22,417,2131,303,2132,385,2133,971,520,513,2134,1174,73,1096,231,274,962,1458,673,2135,1459,2136,152,1137,2137,2138,2139,2140,1005,1138,1460,1139,2141,2142,2143,2144,11,374,844,2145,154,1232,46,1461,2146,838,830,721,1233,106,2147,90,428,462,578,566,1175,352,2148,2149,538,1234,124,1298,2150,1462,761,565,2151,686,2152,649,2153,72,173,2154,460,415,2155,1463,2156,1235,305,2157,2158,2159,2160,2161,2162,579,2163,2164,2165,2166,2167,747,2168,2169,2170,2171,1464,669,2172,2173,2174,2175,2176,1465, -2177,23,530,285,2178,335,729,2179,397,2180,2181,2182,1030,2183,2184,698,2185,2186,325,2187,2188,369,2189,799,1097,1015,348,2190,1069,680,2191,851,1466,2192,2193,10,2194,613,424,2195,979,108,449,589,27,172,81,1031,80,774,281,350,1032,525,301,582,1176,2196,674,1045,2197,2198,1467,730,762,2199,2200,2201,2202,1468,2203,993,2204,2205,266,1070,963,1140,2206,2207,2208,664,1098,972,2209,2210,2211,1177,1469,1470,871,2212,2213,2214,2215,2216,1471,2217,2218,2219,2220,2221,2222,2223,2224,2225,2226,2227,1472, -1236,2228,2229,2230,2231,2232,2233,2234,2235,1299,2236,2237,200,2238,477,373,2239,2240,731,825,777,2241,2242,2243,521,486,548,2244,2245,2246,1473,1300,53,549,137,875,76,158,2247,1301,1474,469,396,1016,278,712,2248,321,442,503,767,744,941,1237,1178,1475,2249,82,178,1141,1179,973,2250,1302,2251,297,2252,2253,570,2254,2255,2256,18,450,206,2257,290,292,1142,2258,511,162,99,346,164,735,2259,1476,1477,4,554,343,798,1099,2260,1100,2261,43,171,1303,139,215,2262,2263,717,775,2264,1033,322,216,2265,831,2266, -149,2267,1304,2268,2269,702,1238,135,845,347,309,2270,484,2271,878,655,238,1006,1478,2272,67,2273,295,2274,2275,461,2276,478,942,412,2277,1034,2278,2279,2280,265,2281,541,2282,2283,2284,2285,2286,70,852,1071,2287,2288,2289,2290,21,56,509,117,432,2291,2292,331,980,552,1101,148,284,105,393,1180,1239,755,2293,187,2294,1046,1479,2295,340,2296,63,1047,230,2297,2298,1305,763,1306,101,800,808,494,2299,2300,2301,903,2302,37,1072,14,5,2303,79,675,2304,312,2305,2306,2307,2308,2309,1480,6,1307,2310,2311,2312, -1,470,35,24,229,2313,695,210,86,778,15,784,592,779,32,77,855,964,2314,259,2315,501,380,2316,2317,83,981,153,689,1308,1481,1482,1483,2318,2319,716,1484,2320,2321,2322,2323,2324,2325,1485,2326,2327,128,57,68,261,1048,211,170,1240,31,2328,51,435,742,2329,2330,2331,635,2332,264,456,2333,2334,2335,425,2336,1486,143,507,263,943,2337,363,920,1487,256,1488,1102,243,601,1489,2338,2339,2340,2341,2342,2343,2344,861,2345,2346,2347,2348,2349,2350,395,2351,1490,1491,62,535,166,225,2352,2353,668,419,1241,138,604, -928,2354,1181,2355,1492,1493,2356,2357,2358,1143,2359,696,2360,387,307,1309,682,476,2361,2362,332,12,222,156,2363,232,2364,641,276,656,517,1494,1495,1035,416,736,1496,2365,1017,586,2366,2367,2368,1497,2369,242,2370,2371,2372,1498,2373,965,713,2374,2375,2376,2377,740,982,1499,944,1500,1007,2378,2379,1310,1501,2380,2381,2382,785,329,2383,2384,1502,2385,2386,2387,932,2388,1503,2389,2390,2391,2392,1242,2393,2394,2395,2396,2397,994,950,2398,2399,2400,2401,1504,1311,2402,2403,2404,2405,1049,749,2406,2407, -853,718,1144,1312,2408,1182,1505,2409,2410,255,516,479,564,550,214,1506,1507,1313,413,239,444,339,1145,1036,1508,1509,1314,1037,1510,1315,2411,1511,2412,2413,2414,176,703,497,624,593,921,302,2415,341,165,1103,1512,2416,1513,2417,2418,2419,376,2420,700,2421,2422,2423,258,768,1316,2424,1183,2425,995,608,2426,2427,2428,2429,221,2430,2431,2432,2433,2434,2435,2436,2437,195,323,726,188,897,983,1317,377,644,1050,879,2438,452,2439,2440,2441,2442,2443,2444,914,2445,2446,2447,2448,915,489,2449,1514,1184,2450, -2451,515,64,427,495,2452,583,2453,483,485,1038,562,213,1515,748,666,2454,2455,2456,2457,334,2458,780,996,1008,705,1243,2459,2460,2461,2462,2463,114,2464,493,1146,366,163,1516,961,1104,2465,291,2466,1318,1105,2467,1517,365,2468,355,951,1244,2469,1319,2470,631,2471,2472,218,1320,364,320,756,1518,1519,1321,1520,1322,2473,2474,2475,2476,997,2477,2478,2479,2480,665,1185,2481,916,1521,2482,2483,2484,584,684,2485,2486,797,2487,1051,1186,2488,2489,2490,1522,2491,2492,370,2493,1039,1187,65,2494,434,205,463, -1188,2495,125,812,391,402,826,699,286,398,155,781,771,585,2496,590,505,1073,2497,599,244,219,917,1018,952,646,1523,2498,1323,2499,2500,49,984,354,741,2501,625,2502,1324,2503,1019,190,357,757,491,95,782,868,2504,2505,2506,2507,2508,2509,134,1524,1074,422,1525,898,2510,161,2511,2512,2513,2514,769,2515,1526,2516,2517,411,1325,2518,472,1527,2519,2520,2521,2522,2523,2524,985,2525,2526,2527,2528,2529,2530,764,2531,1245,2532,2533,25,204,311,2534,496,2535,1052,2536,2537,2538,2539,2540,2541,2542,199,704,504, -468,758,657,1528,196,44,839,1246,272,750,2543,765,862,2544,2545,1326,2546,132,615,933,2547,732,2548,2549,2550,1189,1529,2551,283,1247,1053,607,929,2552,2553,2554,930,183,872,616,1040,1147,2555,1148,1020,441,249,1075,2556,2557,2558,466,743,2559,2560,2561,92,514,426,420,526,2562,2563,2564,2565,2566,2567,2568,185,2569,2570,2571,2572,776,1530,658,2573,362,2574,361,922,1076,793,2575,2576,2577,2578,2579,2580,1531,251,2581,2582,2583,2584,1532,54,612,237,1327,2585,2586,275,408,647,111,2587,1533,1106,465, -3,458,9,38,2588,107,110,890,209,26,737,498,2589,1534,2590,431,202,88,1535,356,287,1107,660,1149,2591,381,1536,986,1150,445,1248,1151,974,2592,2593,846,2594,446,953,184,1249,1250,727,2595,923,193,883,2596,2597,2598,102,324,539,817,2599,421,1041,2600,832,2601,94,175,197,406,2602,459,2603,2604,2605,2606,2607,330,555,2608,2609,2610,706,1108,389,2611,2612,2613,2614,233,2615,833,558,931,954,1251,2616,2617,1537,546,2618,2619,1009,2620,2621,2622,1538,690,1328,2623,955,2624,1539,2625,2626,772,2627,2628,2629, -2630,2631,924,648,863,603,2632,2633,934,1540,864,865,2634,642,1042,670,1190,2635,2636,2637,2638,168,2639,652,873,542,1054,1541,2640,2641,2642,2643,2644,2645,2646,2647,2648,2649,2650,2651,2652,2653,2654,2655,2656,2657,2658,2659,2660,2661,2662,2663,2664,2665,2666,2667,2668,2669,2670,2671,2672,2673,2674,2675,2676,2677,2678,2679,2680,2681,2682,2683,2684,2685,2686,2687,2688,2689,2690,2691,2692,2693,2694,2695,2696,2697,2698,2699,1542,880,2700,2701,2702,2703,2704,2705,2706,2707,2708,2709,2710,2711,2712, -2713,2714,2715,2716,2717,2718,2719,2720,2721,2722,2723,2724,2725,1543,2726,2727,2728,2729,2730,2731,2732,1544,2733,2734,2735,2736,2737,2738,2739,2740,2741,2742,2743,2744,2745,2746,2747,2748,2749,2750,2751,2752,2753,2754,1545,2755,2756,2757,2758,2759,2760,2761,2762,2763,2764,2765,2766,1546,2767,1547,2768,2769,2770,2771,2772,2773,2774,2775,2776,2777,2778,2779,2780,2781,2782,2783,2784,2785,2786,1548,2787,2788,2789,1109,2790,2791,2792,2793,2794,2795,2796,2797,2798,2799,2800,2801,2802,2803,2804,2805,2806, -2807,2808,2809,2810,2811,2812,1329,2813,2814,2815,2816,2817,2818,2819,2820,2821,2822,2823,2824,2825,2826,2827,2828,2829,2830,2831,2832,2833,2834,2835,2836,2837,2838,2839,2840,2841,2842,2843,2844,2845,2846,2847,2848,2849,2850,2851,2852,2853,2854,2855,2856,1549,2857,2858,2859,2860,1550,2861,2862,1551,2863,2864,2865,2866,2867,2868,2869,2870,2871,2872,2873,2874,1110,1330,2875,2876,2877,2878,2879,2880,2881,2882,2883,2884,2885,2886,2887,2888,2889,2890,2891,2892,2893,2894,2895,2896,2897,2898,2899,2900,2901, -2902,2903,2904,2905,2906,2907,2908,2909,2910,2911,2912,2913,2914,2915,2916,2917,2918,2919,2920,2921,2922,2923,2924,2925,2926,2927,2928,2929,2930,1331,2931,2932,2933,2934,2935,2936,2937,2938,2939,2940,2941,2942,2943,1552,2944,2945,2946,2947,2948,2949,2950,2951,2952,2953,2954,2955,2956,2957,2958,2959,2960,2961,2962,2963,2964,1252,2965,2966,2967,2968,2969,2970,2971,2972,2973,2974,2975,2976,2977,2978,2979,2980,2981,2982,2983,2984,2985,2986,2987,2988,2989,2990,2991,2992,2993,2994,2995,2996,2997,2998,2999, -3E3,3001,3002,3003,3004,3005,3006,3007,3008,3009,3010,3011,3012,1553,3013,3014,3015,3016,3017,1554,3018,1332,3019,3020,3021,3022,3023,3024,3025,3026,3027,3028,3029,3030,3031,3032,3033,3034,3035,3036,3037,3038,3039,3040,3041,3042,3043,3044,3045,3046,3047,3048,3049,3050,1555,3051,3052,3053,1556,1557,3054,3055,3056,3057,3058,3059,3060,3061,3062,3063,3064,3065,3066,3067,1558,3068,3069,3070,3071,3072,3073,3074,3075,3076,1559,3077,3078,3079,3080,3081,3082,3083,1253,3084,3085,3086,3087,3088,3089,3090,3091, -3092,3093,3094,3095,3096,3097,3098,3099,3100,3101,3102,3103,3104,3105,3106,3107,3108,1152,3109,3110,3111,3112,3113,1560,3114,3115,3116,3117,1111,3118,3119,3120,3121,3122,3123,3124,3125,3126,3127,3128,3129,3130,3131,3132,3133,3134,3135,3136,3137,3138,3139,3140,3141,3142,3143,3144,3145,3146,3147,3148,3149,3150,3151,3152,3153,3154,3155,3156,3157,3158,3159,3160,3161,3162,3163,3164,3165,3166,3167,3168,3169,3170,3171,3172,3173,3174,3175,3176,1333,3177,3178,3179,3180,3181,3182,3183,3184,3185,3186,3187,3188, -3189,1561,3190,3191,1334,3192,3193,3194,3195,3196,3197,3198,3199,3200,3201,3202,3203,3204,3205,3206,3207,3208,3209,3210,3211,3212,3213,3214,3215,3216,3217,3218,3219,3220,3221,3222,3223,3224,3225,3226,3227,3228,3229,3230,3231,3232,3233,3234,1562,3235,3236,3237,3238,3239,3240,3241,3242,3243,3244,3245,3246,3247,3248,3249,3250,3251,3252,3253,3254,3255,3256,3257,3258,3259,3260,3261,3262,3263,3264,3265,3266,3267,3268,3269,3270,3271,3272,3273,3274,3275,3276,3277,1563,3278,3279,3280,3281,3282,3283,3284,3285, -3286,3287,3288,3289,3290,3291,3292,3293,3294,3295,3296,3297,3298,3299,3300,3301,3302,3303,3304,3305,3306,3307,3308,3309,3310,3311,3312,3313,3314,3315,3316,3317,3318,3319,3320,3321,3322,3323,3324,3325,3326,3327,3328,3329,3330,3331,3332,3333,3334,3335,3336,3337,3338,3339,3340,3341,3342,3343,3344,3345,3346,3347,3348,3349,3350,3351,3352,3353,3354,3355,3356,3357,3358,3359,3360,3361,3362,3363,3364,1335,3365,3366,3367,3368,3369,3370,3371,3372,3373,3374,3375,3376,3377,3378,3379,3380,3381,3382,3383,3384,3385, -3386,3387,1336,3388,3389,3390,3391,3392,3393,3394,3395,3396,3397,3398,3399,3400,3401,3402,3403,3404,3405,3406,3407,3408,3409,3410,3411,3412,3413,3414,1337,3415,3416,3417,3418,3419,1338,3420,3421,3422,1564,1565,3423,3424,3425,3426,3427,3428,3429,3430,3431,1254,3432,3433,3434,1339,3435,3436,3437,3438,3439,1566,3440,3441,3442,3443,3444,3445,3446,3447,3448,3449,3450,3451,3452,3453,3454,1255,3455,3456,3457,3458,3459,1567,1191,3460,1568,1569,3461,3462,3463,1570,3464,3465,3466,3467,3468,1571,3469,3470,3471, -3472,3473,1572,3474,3475,3476,3477,3478,3479,3480,3481,3482,3483,3484,3485,3486,1340,3487,3488,3489,3490,3491,3492,1021,3493,3494,3495,3496,3497,3498,1573,3499,1341,3500,3501,3502,3503,3504,3505,3506,3507,3508,3509,3510,3511,1342,3512,3513,3514,3515,3516,1574,1343,3517,3518,3519,1575,3520,1576,3521,3522,3523,3524,3525,3526,3527,3528,3529,3530,3531,3532,3533,3534,3535,3536,3537,3538,3539,3540,3541,3542,3543,3544,3545,3546,3547,3548,3549,3550,3551,3552,3553,3554,3555,3556,3557,3558,3559,3560,3561,3562, -3563,3564,3565,3566,3567,3568,3569,3570,3571,3572,3573,3574,3575,3576,3577,3578,3579,3580,1577,3581,3582,1578,3583,3584,3585,3586,3587,3588,3589,3590,3591,3592,3593,3594,3595,3596,3597,3598,3599,3600,3601,3602,3603,3604,1579,3605,3606,3607,3608,3609,3610,3611,3612,3613,3614,3615,3616,3617,3618,3619,3620,3621,3622,3623,3624,3625,3626,3627,3628,3629,1580,3630,3631,1581,3632,3633,3634,3635,3636,3637,3638,3639,3640,3641,3642,3643,3644,3645,3646,3647,3648,3649,3650,3651,3652,3653,3654,3655,3656,1582,3657, -3658,3659,3660,3661,3662,3663,3664,3665,3666,3667,3668,3669,3670,3671,3672,3673,3674,3675,3676,3677,3678,3679,3680,3681,3682,3683,3684,3685,3686,3687,3688,3689,3690,3691,3692,3693,3694,3695,3696,3697,3698,3699,3700,1192,3701,3702,3703,3704,1256,3705,3706,3707,3708,1583,1257,3709,3710,3711,3712,3713,3714,3715,3716,1584,3717,3718,3719,3720,3721,3722,3723,3724,3725,3726,3727,3728,3729,3730,3731,3732,3733,3734,3735,3736,3737,3738,3739,3740,3741,3742,3743,3744,3745,1344,3746,3747,3748,3749,3750,3751,3752, -3753,3754,3755,3756,1585,3757,3758,3759,3760,3761,3762,3763,3764,3765,3766,1586,3767,3768,3769,3770,3771,3772,3773,3774,3775,3776,3777,3778,1345,3779,3780,3781,3782,3783,3784,3785,3786,3787,3788,3789,3790,3791,3792,3793,3794,3795,1346,1587,3796,3797,1588,3798,3799,3800,3801,3802,3803,3804,3805,3806,1347,3807,3808,3809,3810,3811,1589,3812,3813,3814,3815,3816,3817,3818,3819,3820,3821,1590,3822,3823,1591,1348,3824,3825,3826,3827,3828,3829,3830,1592,3831,3832,1593,3833,3834,3835,3836,3837,3838,3839,3840, -3841,3842,3843,3844,1349,3845,3846,3847,3848,3849,3850,3851,3852,3853,3854,3855,3856,3857,3858,1594,3859,3860,3861,3862,3863,3864,3865,3866,3867,3868,3869,1595,3870,3871,3872,3873,1596,3874,3875,3876,3877,3878,3879,3880,3881,3882,3883,3884,3885,3886,1597,3887,3888,3889,3890,3891,3892,3893,3894,3895,1598,3896,3897,3898,1599,1600,3899,1350,3900,1351,3901,3902,1352,3903,3904,3905,3906,3907,3908,3909,3910,3911,3912,3913,3914,3915,3916,3917,3918,3919,3920,3921,3922,3923,3924,1258,3925,3926,3927,3928,3929, -3930,3931,1193,3932,1601,3933,3934,3935,3936,3937,3938,3939,3940,3941,3942,3943,1602,3944,3945,3946,3947,3948,1603,3949,3950,3951,3952,3953,3954,3955,3956,3957,3958,3959,3960,3961,3962,3963,3964,3965,1604,3966,3967,3968,3969,3970,3971,3972,3973,3974,3975,3976,3977,1353,3978,3979,3980,3981,3982,3983,3984,3985,3986,3987,3988,3989,3990,3991,1354,3992,3993,3994,3995,3996,3997,3998,3999,4E3,4001,4002,4003,4004,4005,4006,4007,4008,4009,4010,4011,4012,4013,4014,4015,4016,4017,4018,4019,4020,4021,4022,4023, -1355,4024,4025,4026,4027,4028,4029,4030,4031,4032,4033,4034,4035,4036,4037,4038,4039,4040,1605,4041,4042,4043,4044,4045,4046,4047,4048,4049,4050,4051,4052,4053,4054,4055,4056,4057,4058,4059,4060,1606,4061,4062,4063,4064,1607,4065,4066,4067,4068,4069,4070,4071,4072,4073,4074,4075,4076,1194,4077,4078,1608,4079,4080,4081,4082,4083,4084,4085,4086,4087,1609,4088,4089,4090,4091,4092,4093,4094,4095,4096,4097,4098,4099,4100,4101,4102,4103,4104,4105,4106,4107,4108,1259,4109,4110,4111,4112,4113,4114,4115,4116, -4117,4118,4119,4120,4121,4122,4123,4124,1195,4125,4126,4127,1610,4128,4129,4130,4131,4132,4133,4134,4135,4136,4137,1356,4138,4139,4140,4141,4142,4143,4144,1611,4145,4146,4147,4148,4149,4150,4151,4152,4153,4154,4155,4156,4157,4158,4159,4160,4161,4162,4163,4164,4165,4166,4167,4168,4169,4170,4171,4172,4173,4174,4175,4176,4177,4178,4179,4180,4181,4182,4183,4184,4185,4186,4187,4188,4189,4190,4191,4192,4193,4194,4195,4196,4197,4198,4199,4200,4201,4202,4203,4204,4205,4206,4207,4208,4209,4210,4211,4212,4213, -4214,4215,4216,4217,4218,4219,1612,4220,4221,4222,4223,4224,4225,4226,4227,1357,4228,1613,4229,4230,4231,4232,4233,4234,4235,4236,4237,4238,4239,4240,4241,4242,4243,1614,4244,4245,4246,4247,4248,4249,4250,4251,4252,4253,4254,4255,4256,4257,4258,4259,4260,4261,4262,4263,4264,4265,4266,4267,4268,4269,4270,1196,1358,4271,4272,4273,4274,4275,4276,4277,4278,4279,4280,4281,4282,4283,4284,4285,4286,4287,1615,4288,4289,4290,4291,4292,4293,4294,4295,4296,4297,4298,4299,4300,4301,4302,4303,4304,4305,4306,4307, -4308,4309,4310,4311,4312,4313,4314,4315,4316,4317,4318,4319,4320,4321,4322,4323,4324,4325,4326,4327,4328,4329,4330,4331,4332,4333,4334,1616,4335,4336,4337,4338,4339,4340,4341,4342,4343,4344,4345,4346,4347,4348,4349,4350,4351,4352,4353,4354,4355,4356,4357,4358,4359,4360,1617,4361,4362,4363,4364,4365,1618,4366,4367,4368,4369,4370,4371,4372,4373,4374,4375,4376,4377,4378,4379,4380,4381,4382,4383,4384,4385,4386,4387,4388,4389,4390,4391,4392,4393,4394,4395,4396,4397,4398,4399,4400,4401,4402,4403,4404,4405, -4406,4407,4408,4409,4410,4411,4412,4413,4414,4415,4416,1619,4417,4418,4419,4420,4421,4422,4423,4424,4425,1112,4426,4427,4428,4429,4430,1620,4431,4432,4433,4434,4435,4436,4437,4438,4439,4440,4441,4442,1260,1261,4443,4444,4445,4446,4447,4448,4449,4450,4451,4452,4453,4454,4455,1359,4456,4457,4458,4459,4460,4461,4462,4463,4464,4465,1621,4466,4467,4468,4469,4470,4471,4472,4473,4474,4475,4476,4477,4478,4479,4480,4481,4482,4483,4484,4485,4486,4487,4488,4489,1055,4490,4491,4492,4493,4494,4495,4496,4497,4498, -4499,4500,4501,4502,4503,4504,4505,4506,4507,4508,4509,4510,4511,4512,4513,4514,4515,4516,4517,4518,1622,4519,4520,4521,1623,4522,4523,4524,4525,4526,4527,4528,4529,4530,4531,4532,4533,4534,4535,1360,4536,4537,4538,4539,4540,4541,4542,4543,975,4544,4545,4546,4547,4548,4549,4550,4551,4552,4553,4554,4555,4556,4557,4558,4559,4560,4561,4562,4563,4564,4565,4566,4567,4568,4569,4570,4571,1624,4572,4573,4574,4575,4576,1625,4577,4578,4579,4580,4581,4582,4583,4584,1626,4585,4586,4587,4588,4589,4590,4591,4592, -4593,4594,4595,1627,4596,4597,4598,4599,4600,4601,4602,4603,4604,4605,4606,4607,4608,4609,4610,4611,4612,4613,4614,4615,1628,4616,4617,4618,4619,4620,4621,4622,4623,4624,4625,4626,4627,4628,4629,4630,4631,4632,4633,4634,4635,4636,4637,4638,4639,4640,4641,4642,4643,4644,4645,4646,4647,4648,4649,1361,4650,4651,4652,4653,4654,4655,4656,4657,4658,4659,4660,4661,1362,4662,4663,4664,4665,4666,4667,4668,4669,4670,4671,4672,4673,4674,4675,4676,4677,4678,4679,4680,4681,4682,1629,4683,4684,4685,4686,4687,1630, -4688,4689,4690,4691,1153,4692,4693,4694,1113,4695,4696,4697,4698,4699,4700,4701,4702,4703,4704,4705,4706,4707,4708,4709,4710,4711,1197,4712,4713,4714,4715,4716,4717,4718,4719,4720,4721,4722,4723,4724,4725,4726,4727,4728,4729,4730,4731,4732,4733,4734,4735,1631,4736,1632,4737,4738,4739,4740,4741,4742,4743,4744,1633,4745,4746,4747,4748,4749,1262,4750,4751,4752,4753,4754,1363,4755,4756,4757,4758,4759,4760,4761,4762,4763,4764,4765,4766,4767,4768,1634,4769,4770,4771,4772,4773,4774,4775,4776,4777,4778,1635, -4779,4780,4781,4782,4783,4784,4785,4786,4787,4788,4789,1636,4790,4791,4792,4793,4794,4795,4796,4797,4798,4799,4800,4801,4802,4803,4804,4805,4806,1637,4807,4808,4809,1638,4810,4811,4812,4813,4814,4815,4816,4817,4818,1639,4819,4820,4821,4822,4823,4824,4825,4826,4827,4828,4829,4830,4831,4832,4833,1077,4834,4835,4836,4837,4838,4839,4840,4841,4842,4843,4844,4845,4846,4847,4848,4849,4850,4851,4852,4853,4854,4855,4856,4857,4858,4859,4860,4861,4862,4863,4864,4865,4866,4867,4868,4869,4870,4871,4872,4873,4874, -4875,4876,4877,4878,4879,4880,4881,4882,4883,1640,4884,4885,1641,4886,4887,4888,4889,4890,4891,4892,4893,4894,4895,4896,4897,4898,4899,4900,4901,4902,4903,4904,4905,4906,4907,4908,4909,4910,4911,1642,4912,4913,4914,1364,4915,4916,4917,4918,4919,4920,4921,4922,4923,4924,4925,4926,4927,4928,4929,4930,4931,1643,4932,4933,4934,4935,4936,4937,4938,4939,4940,4941,4942,4943,4944,4945,4946,4947,4948,4949,4950,4951,4952,4953,4954,4955,4956,4957,4958,4959,4960,4961,4962,4963,4964,4965,4966,4967,4968,4969,4970, -4971,4972,4973,4974,4975,4976,4977,4978,4979,4980,1644,4981,4982,4983,4984,1645,4985,4986,1646,4987,4988,4989,4990,4991,4992,4993,4994,4995,4996,4997,4998,4999,5E3,5001,5002,5003,5004,5005,1647,5006,1648,5007,5008,5009,5010,5011,5012,1078,5013,5014,5015,5016,5017,5018,5019,5020,5021,5022,5023,5024,5025,5026,5027,5028,1365,5029,5030,5031,5032,5033,5034,5035,5036,5037,5038,5039,1649,5040,5041,5042,5043,5044,5045,1366,5046,5047,5048,5049,5050,5051,5052,5053,5054,5055,1650,5056,5057,5058,5059,5060,5061, -5062,5063,5064,5065,5066,5067,5068,5069,5070,5071,5072,5073,5074,5075,5076,5077,1651,5078,5079,5080,5081,5082,5083,5084,5085,5086,5087,5088,5089,5090,5091,5092,5093,5094,5095,5096,5097,5098,5099,5100,5101,5102,5103,5104,5105,5106,5107,5108,5109,5110,1652,5111,5112,5113,5114,5115,5116,5117,5118,1367,5119,5120,5121,5122,5123,5124,5125,5126,5127,5128,5129,1653,5130,5131,5132,5133,5134,5135,5136,5137,5138,5139,5140,5141,5142,5143,5144,5145,5146,5147,5148,5149,1368,5150,1654,5151,1369,5152,5153,5154,5155, -5156,5157,5158,5159,5160,5161,5162,5163,5164,5165,5166,5167,5168,5169,5170,5171,5172,5173,5174,5175,5176,5177,5178,1370,5179,5180,5181,5182,5183,5184,5185,5186,5187,5188,5189,5190,5191,5192,5193,5194,5195,5196,5197,5198,1655,5199,5200,5201,5202,1656,5203,5204,5205,5206,1371,5207,1372,5208,5209,5210,5211,1373,5212,5213,1374,5214,5215,5216,5217,5218,5219,5220,5221,5222,5223,5224,5225,5226,5227,5228,5229,5230,5231,5232,5233,5234,5235,5236,5237,5238,5239,5240,5241,5242,5243,5244,5245,5246,5247,1657,5248, -5249,5250,5251,1658,1263,5252,5253,5254,5255,5256,1375,5257,5258,5259,5260,5261,5262,5263,5264,5265,5266,5267,5268,5269,5270,5271,5272,5273,5274,5275,5276,5277,5278,5279,5280,5281,5282,5283,1659,5284,5285,5286,5287,5288,5289,5290,5291,5292,5293,5294,5295,5296,5297,5298,5299,5300,1660,5301,5302,5303,5304,5305,5306,5307,5308,5309,5310,5311,5312,5313,5314,5315,5316,5317,5318,5319,5320,5321,1376,5322,5323,5324,5325,5326,5327,5328,5329,5330,5331,5332,5333,1198,5334,5335,5336,5337,5338,5339,5340,5341,5342, -5343,1661,5344,5345,5346,5347,5348,5349,5350,5351,5352,5353,5354,5355,5356,5357,5358,5359,5360,5361,5362,5363,5364,5365,5366,5367,5368,5369,5370,5371,5372,5373,5374,5375,5376,5377,5378,5379,5380,5381,5382,5383,5384,5385,5386,5387,5388,5389,5390,5391,5392,5393,5394,5395,5396,5397,5398,1264,5399,5400,5401,5402,5403,5404,5405,5406,5407,5408,5409,5410,5411,5412,1662,5413,5414,5415,5416,1663,5417,5418,5419,5420,5421,5422,5423,5424,5425,5426,5427,5428,5429,5430,5431,5432,5433,5434,5435,5436,5437,5438,1664, -5439,5440,5441,5442,5443,5444,5445,5446,5447,5448,5449,5450,5451,5452,5453,5454,5455,5456,5457,5458,5459,5460,5461,5462,5463,5464,5465,5466,5467,5468,5469,5470,5471,5472,5473,5474,5475,5476,5477,5478,1154,5479,5480,5481,5482,5483,5484,5485,1665,5486,5487,5488,5489,5490,5491,5492,5493,5494,5495,5496,5497,5498,5499,5500,5501,5502,5503,5504,5505,5506,5507,5508,5509,5510,5511,5512,5513,5514,5515,5516,5517,5518,5519,5520,5521,5522,5523,5524,5525,5526,5527,5528,5529,5530,5531,5532,5533,5534,5535,5536,5537, -5538,5539,5540,5541,5542,5543,5544,5545,5546,5547,5548,1377,5549,5550,5551,5552,5553,5554,5555,5556,5557,5558,5559,5560,5561,5562,5563,5564,5565,5566,5567,5568,5569,5570,1114,5571,5572,5573,5574,5575,5576,5577,5578,5579,5580,5581,5582,5583,5584,5585,5586,5587,5588,5589,5590,5591,5592,1378,5593,5594,5595,5596,5597,5598,5599,5600,5601,5602,5603,5604,5605,5606,5607,5608,5609,5610,5611,5612,5613,5614,1379,5615,5616,5617,5618,5619,5620,5621,5622,5623,5624,5625,5626,5627,5628,5629,5630,5631,5632,5633,5634, -1380,5635,5636,5637,5638,5639,5640,5641,5642,5643,5644,5645,5646,5647,5648,5649,1381,1056,5650,5651,5652,5653,5654,5655,5656,5657,5658,5659,5660,1666,5661,5662,5663,5664,5665,5666,5667,5668,1667,5669,1668,5670,5671,5672,5673,5674,5675,5676,5677,5678,1155,5679,5680,5681,5682,5683,5684,5685,5686,5687,5688,5689,5690,5691,5692,5693,5694,5695,5696,5697,5698,1669,5699,5700,5701,5702,5703,5704,5705,1670,5706,5707,5708,5709,5710,1671,5711,5712,5713,5714,1382,5715,5716,5717,5718,5719,5720,5721,5722,5723,5724, -5725,1672,5726,5727,1673,1674,5728,5729,5730,5731,5732,5733,5734,5735,5736,1675,5737,5738,5739,5740,5741,5742,5743,5744,1676,5745,5746,5747,5748,5749,5750,5751,1383,5752,5753,5754,5755,5756,5757,5758,5759,5760,5761,5762,5763,5764,5765,5766,5767,5768,1677,5769,5770,5771,5772,5773,1678,5774,5775,5776,998,5777,5778,5779,5780,5781,5782,5783,5784,5785,1384,5786,5787,5788,5789,5790,5791,5792,5793,5794,5795,5796,5797,5798,5799,5800,1679,5801,5802,5803,1115,1116,5804,5805,5806,5807,5808,5809,5810,5811,5812, -5813,5814,5815,5816,5817,5818,5819,5820,5821,5822,5823,5824,5825,5826,5827,5828,5829,5830,5831,5832,5833,5834,5835,5836,5837,5838,5839,5840,5841,5842,5843,5844,5845,5846,5847,5848,5849,5850,5851,5852,5853,5854,5855,1680,5856,5857,5858,5859,5860,5861,5862,5863,5864,1681,5865,5866,5867,1682,5868,5869,5870,5871,5872,5873,5874,5875,5876,5877,5878,5879,1683,5880,1684,5881,5882,5883,5884,1685,5885,5886,5887,5888,5889,5890,5891,5892,5893,5894,5895,5896,5897,5898,5899,5900,5901,5902,5903,5904,5905,5906,5907, -1686,5908,5909,5910,5911,5912,5913,5914,5915,5916,5917,5918,5919,5920,5921,5922,5923,5924,5925,5926,5927,5928,5929,5930,5931,5932,5933,5934,5935,1687,5936,5937,5938,5939,5940,5941,5942,5943,5944,5945,5946,5947,5948,5949,5950,5951,5952,1688,1689,5953,1199,5954,5955,5956,5957,5958,5959,5960,5961,1690,5962,5963,5964,5965,5966,5967,5968,5969,5970,5971,5972,5973,5974,5975,5976,5977,5978,5979,5980,5981,1385,5982,1386,5983,5984,5985,5986,5987,5988,5989,5990,5991,5992,5993,5994,5995,5996,5997,5998,5999,6E3, -6001,6002,6003,6004,6005,6006,6007,6008,6009,6010,6011,6012,6013,6014,6015,6016,6017,6018,6019,6020,6021,6022,6023,6024,6025,6026,6027,1265,6028,6029,1691,6030,6031,6032,6033,6034,6035,6036,6037,6038,6039,6040,6041,6042,6043,6044,6045,6046,6047,6048,6049,6050,6051,6052,6053,6054,6055,6056,6057,6058,6059,6060,6061,6062,6063,6064,6065,6066,6067,6068,6069,6070,6071,6072,6073,6074,6075,6076,6077,6078,6079,6080,6081,6082,6083,6084,1692,6085,6086,6087,6088,6089,6090,6091,6092,6093,6094,6095,6096,6097,6098, -6099,6100,6101,6102,6103,6104,6105,6106,6107,6108,6109,6110,6111,6112,6113,6114,6115,6116,6117,6118,6119,6120,6121,6122,6123,6124,6125,6126,6127,6128,6129,6130,6131,1693,6132,6133,6134,6135,6136,1694,6137,6138,6139,6140,6141,1695,6142,6143,6144,6145,6146,6147,6148,6149,6150,6151,6152,6153,6154,6155,6156,6157,6158,6159,6160,6161,6162,6163,6164,6165,6166,6167,6168,6169,6170,6171,6172,6173,6174,6175,6176,6177,6178,6179,6180,6181,6182,6183,6184,6185,1696,6186,6187,6188,6189,6190,6191,6192,6193,6194,6195, -6196,6197,6198,6199,6200,6201,6202,6203,6204,6205,6206,6207,6208,6209,6210,6211,6212,6213,6214,6215,6216,6217,6218,6219,1697,6220,6221,6222,6223,6224,6225,6226,6227,6228,6229,6230,6231,6232,6233,6234,6235,6236,6237,6238,6239,6240,6241,6242,6243,6244,6245,6246,6247,6248,6249,6250,6251,6252,6253,1698,6254,6255,6256,6257,6258,6259,6260,6261,6262,6263,1200,6264,6265,6266,6267,6268,6269,6270,6271,6272,6273,6274,6275,6276,6277,6278,6279,6280,6281,6282,6283,6284,6285,6286,6287,6288,6289,6290,6291,6292,6293, -6294,6295,6296,6297,6298,6299,6300,6301,6302,1699,6303,6304,1700,6305,6306,6307,6308,6309,6310,6311,6312,6313,6314,6315,6316,6317,6318,6319,6320,6321,6322,6323,6324,6325,6326,6327,6328,6329,6330,6331,6332,6333,6334,6335,6336,6337,6338,6339,1701,6340,6341,6342,6343,6344,1387,6345,6346,6347,6348,6349,6350,6351,6352,6353,6354,6355,6356,6357,6358,6359,6360,6361,6362,6363,6364,6365,6366,6367,6368,6369,6370,6371,6372,6373,6374,6375,6376,6377,6378,6379,6380,6381,6382,6383,6384,6385,6386,6387,6388,6389,6390, -6391,6392,6393,6394,6395,6396,6397,6398,6399,6400,6401,6402,6403,6404,6405,6406,6407,6408,6409,6410,6411,6412,6413,1702,6414,6415,6416,6417,6418,6419,6420,6421,6422,1703,6423,6424,6425,6426,6427,6428,6429,6430,6431,6432,6433,6434,6435,6436,6437,6438,1704,6439,6440,6441,6442,6443,6444,6445,6446,6447,6448,6449,6450,6451,6452,6453,6454,6455,6456,6457,6458,6459,6460,6461,6462,6463,6464,6465,6466,6467,6468,6469,6470,6471,6472,6473,6474,6475,6476,6477,6478,6479,6480,6481,6482,6483,6484,6485,6486,6487,6488, -6489,6490,6491,6492,6493,6494,6495,6496,6497,6498,6499,6500,6501,6502,6503,1266,6504,6505,6506,6507,6508,6509,6510,6511,6512,6513,6514,6515,6516,6517,6518,6519,6520,6521,6522,6523,6524,6525,6526,6527,6528,6529,6530,6531,6532,6533,6534,6535,6536,6537,6538,6539,6540,6541,6542,6543,6544,6545,6546,6547,6548,6549,6550,6551,1705,1706,6552,6553,6554,6555,6556,6557,6558,6559,6560,6561,6562,6563,6564,6565,6566,6567,6568,6569,6570,6571,6572,6573,6574,6575,6576,6577,6578,6579,6580,6581,6582,6583,6584,6585,6586, -6587,6588,6589,6590,6591,6592,6593,6594,6595,6596,6597,6598,6599,6600,6601,6602,6603,6604,6605,6606,6607,6608,6609,6610,6611,6612,6613,6614,6615,6616,6617,6618,6619,6620,6621,6622,6623,6624,6625,6626,6627,6628,6629,6630,6631,6632,6633,6634,6635,6636,6637,1388,6638,6639,6640,6641,6642,6643,6644,1707,6645,6646,6647,6648,6649,6650,6651,6652,6653,6654,6655,6656,6657,6658,6659,6660,6661,6662,6663,1708,6664,6665,6666,6667,6668,6669,6670,6671,6672,6673,6674,1201,6675,6676,6677,6678,6679,6680,6681,6682,6683, -6684,6685,6686,6687,6688,6689,6690,6691,6692,6693,6694,6695,6696,6697,6698,6699,6700,6701,6702,6703,6704,6705,6706,6707,6708,6709,6710,6711,6712,6713,6714,6715,6716,6717,6718,6719,6720,6721,6722,6723,6724,6725,1389,6726,6727,6728,6729,6730,6731,6732,6733,6734,6735,6736,1390,1709,6737,6738,6739,6740,6741,6742,1710,6743,6744,6745,6746,1391,6747,6748,6749,6750,6751,6752,6753,6754,6755,6756,6757,1392,6758,6759,6760,6761,6762,6763,6764,6765,6766,6767,6768,6769,6770,6771,6772,6773,6774,6775,6776,6777,6778, -6779,6780,1202,6781,6782,6783,6784,6785,6786,6787,6788,6789,6790,6791,6792,6793,6794,6795,6796,6797,6798,6799,6800,6801,6802,6803,6804,6805,6806,6807,6808,6809,1711,6810,6811,6812,6813,6814,6815,6816,6817,6818,6819,6820,6821,6822,6823,6824,6825,6826,6827,6828,6829,6830,6831,6832,6833,6834,6835,6836,1393,6837,6838,6839,6840,6841,6842,6843,6844,6845,6846,6847,6848,6849,6850,6851,6852,6853,6854,6855,6856,6857,6858,6859,6860,6861,6862,6863,6864,6865,6866,6867,6868,6869,6870,6871,6872,6873,6874,6875,6876, -6877,6878,6879,6880,6881,6882,6883,6884,6885,6886,6887,6888,6889,6890,6891,6892,6893,6894,6895,6896,6897,6898,6899,6900,6901,6902,1712,6903,6904,6905,6906,6907,6908,6909,6910,1713,6911,6912,6913,6914,6915,6916,6917,6918,6919,6920,6921,6922,6923,6924,6925,6926,6927,6928,6929,6930,6931,6932,6933,6934,6935,6936,6937,6938,6939,6940,6941,6942,6943,6944,6945,6946,6947,6948,6949,6950,6951,6952,6953,6954,6955,6956,6957,6958,6959,6960,6961,6962,6963,6964,6965,6966,6967,6968,6969,6970,6971,6972,6973,6974,1714, -6975,6976,6977,6978,6979,6980,6981,6982,6983,6984,6985,6986,6987,6988,1394,6989,6990,6991,6992,6993,6994,6995,6996,6997,6998,6999,7E3,1715,7001,7002,7003,7004,7005,7006,7007,7008,7009,7010,7011,7012,7013,7014,7015,7016,7017,7018,7019,7020,7021,7022,7023,7024,7025,7026,7027,7028,1716,7029,7030,7031,7032,7033,7034,7035,7036,7037,7038,7039,7040,7041,7042,7043,7044,7045,7046,7047,7048,7049,7050,7051,7052,7053,7054,7055,7056,7057,7058,7059,7060,7061,7062,7063,7064,7065,7066,7067,7068,7069,7070,7071,7072, -7073,7074,7075,7076,7077,7078,7079,7080,7081,7082,7083,7084,7085,7086,7087,7088,7089,7090,7091,7092,7093,7094,7095,7096,7097,7098,7099,7100,7101,7102,7103,7104,7105,7106,7107,7108,7109,7110,7111,7112,7113,7114,7115,7116,7117,7118,7119,7120,7121,7122,7123,7124,7125,7126,7127,7128,7129,7130,7131,7132,7133,7134,7135,7136,7137,7138,7139,7140,7141,7142,7143,7144,7145,7146,7147,7148,7149,7150,7151,7152,7153,7154,7155,7156,7157,7158,7159,7160,7161,7162,7163,7164,7165,7166,7167,7168,7169,7170,7171,7172,7173, -7174,7175,7176,7177,7178,7179,7180,7181,7182,7183,7184,7185,7186,7187,7188,7189,7190,7191,7192,7193,7194,7195,7196,7197,7198,7199,7200,7201,7202,7203,7204,7205,7206,7207,1395,7208,7209,7210,7211,7212,7213,1717,7214,7215,7216,7217,7218,7219,7220,7221,7222,7223,7224,7225,7226,7227,7228,7229,7230,7231,7232,7233,7234,7235,7236,7237,7238,7239,7240,7241,7242,7243,7244,7245,7246,7247,7248,7249,7250,7251,7252,7253,7254,7255,7256,7257,7258,7259,7260,7261,7262,7263,7264,7265,7266,7267,7268,7269,7270,7271,7272, -7273,7274,7275,7276,7277,7278,7279,7280,7281,7282,7283,7284,7285,7286,7287,7288,7289,7290,7291,7292,7293,7294,7295,7296,7297,7298,7299,7300,7301,7302,7303,7304,7305,7306,7307,7308,7309,7310,7311,7312,7313,1718,7314,7315,7316,7317,7318,7319,7320,7321,7322,7323,7324,7325,7326,7327,7328,7329,7330,7331,7332,7333,7334,7335,7336,7337,7338,7339,7340,7341,7342,7343,7344,7345,7346,7347,7348,7349,7350,7351,7352,7353,7354,7355,7356,7357,7358,7359,7360,7361,7362,7363,7364,7365,7366,7367,7368,7369,7370,7371,7372, -7373,7374,7375,7376,7377,7378,7379,7380,7381,7382,7383,7384,7385,7386,7387,7388,7389,7390,7391,7392,7393,7394,7395,7396,7397,7398,7399,7400,7401,7402,7403,7404,7405,7406,7407,7408,7409,7410,7411,7412,7413,7414,7415,7416,7417,7418,7419,7420,7421,7422,7423,7424,7425,7426,7427,7428,7429,7430,7431,7432,7433,7434,7435,7436,7437,7438,7439,7440,7441,7442,7443,7444,7445,7446,7447,7448,7449,7450,7451,7452,7453,7454,7455,7456,7457,7458,7459,7460,7461,7462,7463,7464,7465,7466,7467,7468,7469,7470,7471,7472,7473, -7474,7475,7476,7477,7478,7479,7480,7481,7482,7483,7484,7485,7486,7487,7488,7489,7490,7491,7492,7493,7494,7495,7496,7497,7498,7499,7500,7501,7502,7503,7504,7505,7506,7507,7508,7509,7510,7511,7512,7513,7514,7515,7516,7517,7518,7519,7520,7521,7522,7523,7524,7525,7526,7527,7528,7529,7530,7531,7532,7533,7534,7535,7536,7537,7538,7539,7540,7541,7542,7543,7544,7545,7546,7547,7548,7549,7550,7551,7552,7553,7554,7555,7556,7557,7558,7559,7560,7561,7562,7563,7564,7565,7566,7567,7568,7569,7570,7571,7572,7573,7574, -7575,7576,7577,7578,7579,7580,7581,7582,7583,7584,7585,7586,7587,7588,7589,7590,7591,7592,7593,7594,7595,7596,7597,7598,7599,7600,7601,7602,7603,7604,7605,7606,7607,7608,7609,7610,7611,7612,7613,7614,7615,7616,7617,7618,7619,7620,7621,7622,7623,7624,7625,7626,7627,7628,7629,7630,7631,7632,7633,7634,7635,7636,7637,7638,7639,7640,7641,7642,7643,7644,7645,7646,7647,7648,7649,7650,7651,7652,7653,7654,7655,7656,7657,7658,7659,7660,7661,7662,7663,7664,7665,7666,7667,7668,7669,7670,7671,7672,7673,7674,7675, -7676,7677,7678,7679,7680,7681,7682,7683,7684,7685,7686,7687,7688,7689,7690,7691,7692,7693,7694,7695,7696,7697,7698,7699,7700,7701,7702,7703,7704,7705,7706,7707,7708,7709,7710,7711,7712,7713,7714,7715,7716,7717,7718,7719,7720,7721,7722,7723,7724,7725,7726,7727,7728,7729,7730,7731,7732,7733,7734,7735,7736,7737,7738,7739,7740,7741,7742,7743,7744,7745,7746,7747,7748,7749,7750,7751,7752,7753,7754,7755,7756,7757,7758,7759,7760,7761,7762,7763,7764,7765,7766,7767,7768,7769,7770,7771,7772,7773,7774,7775,7776, -7777,7778,7779,7780,7781,7782,7783,7784,7785,7786,7787,7788,7789,7790,7791,7792,7793,7794,7795,7796,7797,7798,7799,7800,7801,7802,7803,7804,7805,7806,7807,7808,7809,7810,7811,7812,7813,7814,7815,7816,7817,7818,7819,7820,7821,7822,7823,7824,7825,7826,7827,7828,7829,7830,7831,7832,7833,7834,7835,7836,7837,7838,7839,7840,7841,7842,7843,7844,7845,7846,7847,7848,7849,7850,7851,7852,7853,7854,7855,7856,7857,7858,7859,7860,7861,7862,7863,7864,7865,7866,7867,7868,7869,7870,7871,7872,7873,7874,7875,7876,7877, -7878,7879,7880,7881,7882,7883,7884,7885,7886,7887,7888,7889,7890,7891,7892,7893,7894,7895,7896,7897,7898,7899,7900,7901,7902,7903,7904,7905,7906,7907,7908,7909,7910,7911,7912,7913,7914,7915,7916,7917,7918,7919,7920,7921,7922,7923,7924,7925,7926,7927,7928,7929,7930,7931,7932,7933,7934,7935,7936,7937,7938,7939,7940,7941,7942,7943,7944,7945,7946,7947,7948,7949,7950,7951,7952,7953,7954,7955,7956,7957,7958,7959,7960,7961,7962,7963,7964,7965,7966,7967,7968,7969,7970,7971,7972,7973,7974,7975,7976,7977,7978, -7979,7980,7981,7982,7983,7984,7985,7986,7987,7988,7989,7990,7991,7992,7993,7994,7995,7996,7997,7998,7999,8E3,8001,8002,8003,8004,8005,8006,8007,8008,8009,8010,8011,8012,8013,8014,8015,8016,8017,8018,8019,8020,8021,8022,8023,8024,8025,8026,8027,8028,8029,8030,8031,8032,8033,8034,8035,8036,8037,8038,8039,8040,8041,8042,8043,8044,8045,8046,8047,8048,8049,8050,8051,8052,8053,8054,8055,8056,8057,8058,8059,8060,8061,8062,8063,8064,8065,8066,8067,8068,8069,8070,8071,8072,8073,8074,8075,8076,8077,8078,8079, -8080,8081,8082,8083,8084,8085,8086,8087,8088,8089,8090,8091,8092,8093,8094,8095,8096,8097,8098,8099,8100,8101,8102,8103,8104,8105,8106,8107,8108,8109,8110,8111,8112,8113,8114,8115,8116,8117,8118,8119,8120,8121,8122,8123,8124,8125,8126,8127,8128,8129,8130,8131,8132,8133,8134,8135,8136,8137,8138,8139,8140,8141,8142,8143,8144,8145,8146,8147,8148,8149,8150,8151,8152,8153,8154,8155,8156,8157,8158,8159,8160,8161,8162,8163,8164,8165,8166,8167,8168,8169,8170,8171,8172,8173,8174,8175,8176,8177,8178,8179,8180, -8181,8182,8183,8184,8185,8186,8187,8188,8189,8190,8191,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8208,8209,8210,8211,8212,8213,8214,8215,8216,8217,8218,8219,8220,8221,8222,8223,8224,8225,8226,8227,8228,8229,8230,8231,8232,8233,8234,8235,8236,8237,8238,8239,8240,8241,8242,8243,8244,8245,8246,8247,8248,8249,8250,8251,8252,8253,8254,8255,8256,8257,8258,8259,8260,8261,8262,8263,8264,8265,8266,8267,8268,8269,8270,8271,8272,8273,8274,8275,8276,8277,8278,8279,8280,8281, -8282,8283,8284,8285,8286,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,8304,8305,8306,8307,8308,8309,8310,8311,8312,8313,8314,8315,8316,8317,8318,8319,8320,8321,8322,8323,8324,8325,8326,8327,8328,8329,8330,8331,8332,8333,8334,8335,8336,8337,8338,8339,8340,8341,8342,8343,8344,8345,8346,8347,8348,8349,8350,8351,8352,8353,8354,8355,8356,8357,8358,8359,8360,8361,8362,8363,8364,8365,8366,8367,8368,8369,8370,8371,8372,8373,8374,8375,8376,8377,8378,8379,8380,8381,8382, -8383,8384,8385,8386,8387,8388,8389,8390,8391,8392,8393,8394,8395,8396,8397,8398,8399,8400,8401,8402,8403,8404,8405,8406,8407,8408,8409,8410,8411,8412,8413,8414,8415,8416,8417,8418,8419,8420,8421,8422,8423,8424,8425,8426,8427,8428,8429,8430,8431,8432,8433,8434,8435,8436,8437,8438,8439,8440,8441,8442,8443,8444,8445,8446,8447,8448,8449,8450,8451,8452,8453,8454,8455,8456,8457,8458,8459,8460,8461,8462,8463,8464,8465,8466,8467,8468,8469,8470,8471,8472,8473,8474,8475,8476,8477,8478,8479,8480,8481,8482,8483, -8484,8485,8486,8487,8488,8489,8490,8491,8492,8493,8494,8495,8496,8497,8498,8499,8500,8501,8502,8503,8504,8505,8506,8507,8508,8509,8510,8511,8512,8513,8514,8515,8516,8517,8518,8519,8520,8521,8522,8523,8524,8525,8526,8527,8528,8529,8530,8531,8532,8533,8534,8535,8536,8537,8538,8539,8540,8541,8542,8543,8544,8545,8546,8547,8548,8549,8550,8551,8552,8553,8554,8555,8556,8557,8558,8559,8560,8561,8562,8563,8564,8565,8566,8567,8568,8569,8570,8571,8572,8573,8574,8575,8576,8577,8578,8579,8580,8581,8582,8583,8584, -8585,8586,8587,8588,8589,8590,8591,8592,8593,8594,8595,8596,8597,8598,8599,8600,8601,8602,8603,8604,8605,8606,8607,8608,8609,8610,8611,8612,8613,8614,8615,8616,8617,8618,8619,8620,8621,8622,8623,8624,8625,8626,8627,8628,8629,8630,8631,8632,8633,8634,8635,8636,8637,8638,8639,8640,8641,8642,8643,8644,8645,8646,8647,8648,8649,8650,8651,8652,8653,8654,8655,8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671,8672,8673,8674,8675,8676,8677,8678,8679,8680,8681,8682,8683,8684,8685, -8686,8687,8688,8689,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699,8700,8701,8702,8703,8704,8705,8706,8707,8708,8709,8710,8711,8712,8713,8714,8715,8716,8717,8718,8719,8720,8721,8722,8723,8724,8725,8726,8727,8728,8729,8730,8731,8732,8733,8734,8735,8736,8737,8738,8739,8740,8741];!0},{"./init":20}],13:[function(b,a,d){!function(a){a.EUCKRProber=function(){a.MultiByteCharSetProber.apply(this);this.getCharsetName=function(){return"EUC-KR"};this._mCodingSM=new a.CodingStateMachine(a.EUCKRSMModel);this._mDistributionAnalyzer= -new a.EUCKRDistributionAnalysis;this.reset()};a.EUCKRProber.prototype=new a.MultiByteCharSetProber}(b("./init"))},{"./init":20}],14:[function(b,a,d){b=b("./init");b.EUCTW_TYPICAL_DISTRIBUTION_RATIO=.75;b.EUCTW_TABLE_SIZE=8102;b.EUCTWCharToFreqOrder=[1,1800,1506,255,1431,198,9,82,6,7310,177,202,3615,1256,2808,110,3735,33,3241,261,76,44,2113,16,2931,2184,1176,659,3868,26,3404,2643,1198,3869,3313,4060,410,2211,302,590,361,1963,8,204,58,4296,7311,1931,63,7312,7313,317,1614,75,222,159,4061,2412,1480,7314, -3500,3068,224,2809,3616,3,10,3870,1471,29,2774,1135,2852,1939,873,130,3242,1123,312,7315,4297,2051,507,252,682,7316,142,1914,124,206,2932,34,3501,3173,64,604,7317,2494,1976,1977,155,1990,645,641,1606,7318,3405,337,72,406,7319,80,630,238,3174,1509,263,939,1092,2644,756,1440,1094,3406,449,69,2969,591,179,2095,471,115,2034,1843,60,50,2970,134,806,1868,734,2035,3407,180,995,1607,156,537,2893,688,7320,319,1305,779,2144,514,2374,298,4298,359,2495,90,2707,1338,663,11,906,1099,2545,20,2436,182,532,1716,7321, -732,1376,4062,1311,1420,3175,25,2312,1056,113,399,382,1949,242,3408,2467,529,3243,475,1447,3617,7322,117,21,656,810,1297,2295,2329,3502,7323,126,4063,706,456,150,613,4299,71,1118,2036,4064,145,3069,85,835,486,2114,1246,1426,428,727,1285,1015,800,106,623,303,1281,7324,2127,2354,347,3736,221,3503,3110,7325,1955,1153,4065,83,296,1199,3070,192,624,93,7326,822,1897,2810,3111,795,2064,991,1554,1542,1592,27,43,2853,859,139,1456,860,4300,437,712,3871,164,2392,3112,695,211,3017,2096,195,3872,1608,3504,3505, -3618,3873,234,811,2971,2097,3874,2229,1441,3506,1615,2375,668,2076,1638,305,228,1664,4301,467,415,7327,262,2098,1593,239,108,300,200,1033,512,1247,2077,7328,7329,2173,3176,3619,2673,593,845,1062,3244,88,1723,2037,3875,1950,212,266,152,149,468,1898,4066,4302,77,187,7330,3018,37,5,2972,7331,3876,7332,7333,39,2517,4303,2894,3177,2078,55,148,74,4304,545,483,1474,1029,1665,217,1869,1531,3113,1104,2645,4067,24,172,3507,900,3877,3508,3509,4305,32,1408,2811,1312,329,487,2355,2247,2708,784,2674,4,3019,3314, -1427,1788,188,109,499,7334,3620,1717,1789,888,1217,3020,4306,7335,3510,7336,3315,1520,3621,3878,196,1034,775,7337,7338,929,1815,249,439,38,7339,1063,7340,794,3879,1435,2296,46,178,3245,2065,7341,2376,7342,214,1709,4307,804,35,707,324,3622,1601,2546,140,459,4068,7343,7344,1365,839,272,978,2257,2572,3409,2128,1363,3623,1423,697,100,3071,48,70,1231,495,3114,2193,7345,1294,7346,2079,462,586,1042,3246,853,256,988,185,2377,3410,1698,434,1084,7347,3411,314,2615,2775,4308,2330,2331,569,2280,637,1816,2518, -757,1162,1878,1616,3412,287,1577,2115,768,4309,1671,2854,3511,2519,1321,3737,909,2413,7348,4069,933,3738,7349,2052,2356,1222,4310,765,2414,1322,786,4311,7350,1919,1462,1677,2895,1699,7351,4312,1424,2437,3115,3624,2590,3316,1774,1940,3413,3880,4070,309,1369,1130,2812,364,2230,1653,1299,3881,3512,3882,3883,2646,525,1085,3021,902,2E3,1475,964,4313,421,1844,1415,1057,2281,940,1364,3116,376,4314,4315,1381,7,2520,983,2378,336,1710,2675,1845,321,3414,559,1131,3022,2742,1808,1132,1313,265,1481,1857,7352, -352,1203,2813,3247,167,1089,420,2814,776,792,1724,3513,4071,2438,3248,7353,4072,7354,446,229,333,2743,901,3739,1200,1557,4316,2647,1920,395,2744,2676,3740,4073,1835,125,916,3178,2616,4317,7355,7356,3741,7357,7358,7359,4318,3117,3625,1133,2547,1757,3415,1510,2313,1409,3514,7360,2145,438,2591,2896,2379,3317,1068,958,3023,461,311,2855,2677,4074,1915,3179,4075,1978,383,750,2745,2617,4076,274,539,385,1278,1442,7361,1154,1964,384,561,210,98,1295,2548,3515,7362,1711,2415,1482,3416,3884,2897,1257,129,7363, -3742,642,523,2776,2777,2648,7364,141,2231,1333,68,176,441,876,907,4077,603,2592,710,171,3417,404,549,18,3118,2393,1410,3626,1666,7365,3516,4319,2898,4320,7366,2973,368,7367,146,366,99,871,3627,1543,748,807,1586,1185,22,2258,379,3743,3180,7368,3181,505,1941,2618,1991,1382,2314,7369,380,2357,218,702,1817,1248,3418,3024,3517,3318,3249,7370,2974,3628,930,3250,3744,7371,59,7372,585,601,4078,497,3419,1112,1314,4321,1801,7373,1223,1472,2174,7374,749,1836,690,1899,3745,1772,3885,1476,429,1043,1790,2232,2116, -917,4079,447,1086,1629,7375,556,7376,7377,2020,1654,844,1090,105,550,966,1758,2815,1008,1782,686,1095,7378,2282,793,1602,7379,3518,2593,4322,4080,2933,2297,4323,3746,980,2496,544,353,527,4324,908,2678,2899,7380,381,2619,1942,1348,7381,1341,1252,560,3072,7382,3420,2856,7383,2053,973,886,2080,143,4325,7384,7385,157,3886,496,4081,57,840,540,2038,4326,4327,3421,2117,1445,970,2259,1748,1965,2081,4082,3119,1234,1775,3251,2816,3629,773,1206,2129,1066,2039,1326,3887,1738,1725,4083,279,3120,51,1544,2594,423, -1578,2130,2066,173,4328,1879,7386,7387,1583,264,610,3630,4329,2439,280,154,7388,7389,7390,1739,338,1282,3073,693,2857,1411,1074,3747,2440,7391,4330,7392,7393,1240,952,2394,7394,2900,1538,2679,685,1483,4084,2468,1436,953,4085,2054,4331,671,2395,79,4086,2441,3252,608,567,2680,3422,4087,4088,1691,393,1261,1791,2396,7395,4332,7396,7397,7398,7399,1383,1672,3748,3182,1464,522,1119,661,1150,216,675,4333,3888,1432,3519,609,4334,2681,2397,7400,7401,7402,4089,3025,0,7403,2469,315,231,2442,301,3319,4335,2380, -7404,233,4090,3631,1818,4336,4337,7405,96,1776,1315,2082,7406,257,7407,1809,3632,2709,1139,1819,4091,2021,1124,2163,2778,1777,2649,7408,3074,363,1655,3183,7409,2975,7410,7411,7412,3889,1567,3890,718,103,3184,849,1443,341,3320,2934,1484,7413,1712,127,67,339,4092,2398,679,1412,821,7414,7415,834,738,351,2976,2146,846,235,1497,1880,418,1992,3749,2710,186,1100,2147,2746,3520,1545,1355,2935,2858,1377,583,3891,4093,2573,2977,7416,1298,3633,1078,2549,3634,2358,78,3750,3751,267,1289,2099,2001,1594,4094,348, -369,1274,2194,2175,1837,4338,1820,2817,3635,2747,2283,2002,4339,2936,2748,144,3321,882,4340,3892,2749,3423,4341,2901,7417,4095,1726,320,7418,3893,3026,788,2978,7419,2818,1773,1327,2859,3894,2819,7420,1306,4342,2003,1700,3752,3521,2359,2650,787,2022,506,824,3636,534,323,4343,1044,3322,2023,1900,946,3424,7421,1778,1500,1678,7422,1881,4344,165,243,4345,3637,2521,123,683,4096,764,4346,36,3895,1792,589,2902,816,626,1667,3027,2233,1639,1555,1622,3753,3896,7423,3897,2860,1370,1228,1932,891,2083,2903,304, -4097,7424,292,2979,2711,3522,691,2100,4098,1115,4347,118,662,7425,611,1156,854,2381,1316,2861,2,386,515,2904,7426,7427,3253,868,2234,1486,855,2651,785,2212,3028,7428,1040,3185,3523,7429,3121,448,7430,1525,7431,2164,4348,7432,3754,7433,4099,2820,3524,3122,503,818,3898,3123,1568,814,676,1444,306,1749,7434,3755,1416,1030,197,1428,805,2821,1501,4349,7435,7436,7437,1993,7438,4350,7439,7440,2195,13,2779,3638,2980,3124,1229,1916,7441,3756,2131,7442,4100,4351,2399,3525,7443,2213,1511,1727,1120,7444,7445, -646,3757,2443,307,7446,7447,1595,3186,7448,7449,7450,3639,1113,1356,3899,1465,2522,2523,7451,519,7452,128,2132,92,2284,1979,7453,3900,1512,342,3125,2196,7454,2780,2214,1980,3323,7455,290,1656,1317,789,827,2360,7456,3758,4352,562,581,3901,7457,401,4353,2248,94,4354,1399,2781,7458,1463,2024,4355,3187,1943,7459,828,1105,4101,1262,1394,7460,4102,605,4356,7461,1783,2862,7462,2822,819,2101,578,2197,2937,7463,1502,436,3254,4103,3255,2823,3902,2905,3425,3426,7464,2712,2315,7465,7466,2332,2067,23,4357,193, -826,3759,2102,699,1630,4104,3075,390,1793,1064,3526,7467,1579,3076,3077,1400,7468,4105,1838,1640,2863,7469,4358,4359,137,4106,598,3078,1966,780,104,974,2938,7470,278,899,253,402,572,504,493,1339,7471,3903,1275,4360,2574,2550,7472,3640,3029,3079,2249,565,1334,2713,863,41,7473,7474,4361,7475,1657,2333,19,463,2750,4107,606,7476,2981,3256,1087,2084,1323,2652,2982,7477,1631,1623,1750,4108,2682,7478,2864,791,2714,2653,2334,232,2416,7479,2983,1498,7480,2654,2620,755,1366,3641,3257,3126,2025,1609,119,1917, -3427,862,1026,4109,7481,3904,3760,4362,3905,4363,2260,1951,2470,7482,1125,817,4110,4111,3906,1513,1766,2040,1487,4112,3030,3258,2824,3761,3127,7483,7484,1507,7485,2683,733,40,1632,1106,2865,345,4113,841,2524,230,4364,2984,1846,3259,3428,7486,1263,986,3429,7487,735,879,254,1137,857,622,1300,1180,1388,1562,3907,3908,2939,967,2751,2655,1349,592,2133,1692,3324,2985,1994,4114,1679,3909,1901,2185,7488,739,3642,2715,1296,1290,7489,4115,2198,2199,1921,1563,2595,2551,1870,2752,2986,7490,435,7491,343,1108, -596,17,1751,4365,2235,3430,3643,7492,4366,294,3527,2940,1693,477,979,281,2041,3528,643,2042,3644,2621,2782,2261,1031,2335,2134,2298,3529,4367,367,1249,2552,7493,3530,7494,4368,1283,3325,2004,240,1762,3326,4369,4370,836,1069,3128,474,7495,2148,2525,268,3531,7496,3188,1521,1284,7497,1658,1546,4116,7498,3532,3533,7499,4117,3327,2684,1685,4118,961,1673,2622,190,2005,2200,3762,4371,4372,7500,570,2497,3645,1490,7501,4373,2623,3260,1956,4374,584,1514,396,1045,1944,7502,4375,1967,2444,7503,7504,4376,3910, -619,7505,3129,3261,215,2006,2783,2553,3189,4377,3190,4378,763,4119,3763,4379,7506,7507,1957,1767,2941,3328,3646,1174,452,1477,4380,3329,3130,7508,2825,1253,2382,2186,1091,2285,4120,492,7509,638,1169,1824,2135,1752,3911,648,926,1021,1324,4381,520,4382,997,847,1007,892,4383,3764,2262,1871,3647,7510,2400,1784,4384,1952,2942,3080,3191,1728,4121,2043,3648,4385,2007,1701,3131,1551,30,2263,4122,7511,2026,4386,3534,7512,501,7513,4123,594,3431,2165,1821,3535,3432,3536,3192,829,2826,4124,7514,1680,3132,1225, -4125,7515,3262,4387,4126,3133,2336,7516,4388,4127,7517,3912,3913,7518,1847,2383,2596,3330,7519,4389,374,3914,652,4128,4129,375,1140,798,7520,7521,7522,2361,4390,2264,546,1659,138,3031,2445,4391,7523,2250,612,1848,910,796,3765,1740,1371,825,3766,3767,7524,2906,2554,7525,692,444,3032,2624,801,4392,4130,7526,1491,244,1053,3033,4131,4132,340,7527,3915,1041,2987,293,1168,87,1357,7528,1539,959,7529,2236,721,694,4133,3768,219,1478,644,1417,3331,2656,1413,1401,1335,1389,3916,7530,7531,2988,2362,3134,1825, -730,1515,184,2827,66,4393,7532,1660,2943,246,3332,378,1457,226,3433,975,3917,2944,1264,3537,674,696,7533,163,7534,1141,2417,2166,713,3538,3333,4394,3918,7535,7536,1186,15,7537,1079,1070,7538,1522,3193,3539,276,1050,2716,758,1126,653,2945,3263,7539,2337,889,3540,3919,3081,2989,903,1250,4395,3920,3434,3541,1342,1681,1718,766,3264,286,89,2946,3649,7540,1713,7541,2597,3334,2990,7542,2947,2215,3194,2866,7543,4396,2498,2526,181,387,1075,3921,731,2187,3335,7544,3265,310,313,3435,2299,770,4134,54,3034,189, -4397,3082,3769,3922,7545,1230,1617,1849,355,3542,4135,4398,3336,111,4136,3650,1350,3135,3436,3035,4137,2149,3266,3543,7546,2784,3923,3924,2991,722,2008,7547,1071,247,1207,2338,2471,1378,4399,2009,864,1437,1214,4400,373,3770,1142,2216,667,4401,442,2753,2555,3771,3925,1968,4138,3267,1839,837,170,1107,934,1336,1882,7548,7549,2118,4139,2828,743,1569,7550,4402,4140,582,2384,1418,3437,7551,1802,7552,357,1395,1729,3651,3268,2418,1564,2237,7553,3083,3772,1633,4403,1114,2085,4141,1532,7554,482,2446,4404,7555, -7556,1492,833,1466,7557,2717,3544,1641,2829,7558,1526,1272,3652,4142,1686,1794,416,2556,1902,1953,1803,7559,3773,2785,3774,1159,2316,7560,2867,4405,1610,1584,3036,2419,2754,443,3269,1163,3136,7561,7562,3926,7563,4143,2499,3037,4406,3927,3137,2103,1647,3545,2010,1872,4144,7564,4145,431,3438,7565,250,97,81,4146,7566,1648,1850,1558,160,848,7567,866,740,1694,7568,2201,2830,3195,4147,4407,3653,1687,950,2472,426,469,3196,3654,3655,3928,7569,7570,1188,424,1995,861,3546,4148,3775,2202,2685,168,1235,3547, -4149,7571,2086,1674,4408,3337,3270,220,2557,1009,7572,3776,670,2992,332,1208,717,7573,7574,3548,2447,3929,3338,7575,513,7576,1209,2868,3339,3138,4409,1080,7577,7578,7579,7580,2527,3656,3549,815,1587,3930,3931,7581,3550,3439,3777,1254,4410,1328,3038,1390,3932,1741,3933,3778,3934,7582,236,3779,2448,3271,7583,7584,3657,3780,1273,3781,4411,7585,308,7586,4412,245,4413,1851,2473,1307,2575,430,715,2136,2449,7587,270,199,2869,3935,7588,3551,2718,1753,761,1754,725,1661,1840,4414,3440,3658,7589,7590,587,14, -3272,227,2598,326,480,2265,943,2755,3552,291,650,1883,7591,1702,1226,102,1547,62,3441,904,4415,3442,1164,4150,7592,7593,1224,1548,2756,391,498,1493,7594,1386,1419,7595,2055,1177,4416,813,880,1081,2363,566,1145,4417,2286,1001,1035,2558,2599,2238,394,1286,7596,7597,2068,7598,86,1494,1730,3936,491,1588,745,897,2948,843,3340,3937,2757,2870,3273,1768,998,2217,2069,397,1826,1195,1969,3659,2993,3341,284,7599,3782,2500,2137,2119,1903,7600,3938,2150,3939,4151,1036,3443,1904,114,2559,4152,209,1527,7601,7602, -2949,2831,2625,2385,2719,3139,812,2560,7603,3274,7604,1559,737,1884,3660,1210,885,28,2686,3553,3783,7605,4153,1004,1779,4418,7606,346,1981,2218,2687,4419,3784,1742,797,1642,3940,1933,1072,1384,2151,896,3941,3275,3661,3197,2871,3554,7607,2561,1958,4420,2450,1785,7608,7609,7610,3942,4154,1005,1308,3662,4155,2720,4421,4422,1528,2600,161,1178,4156,1982,987,4423,1101,4157,631,3943,1157,3198,2420,1343,1241,1016,2239,2562,372,877,2339,2501,1160,555,1934,911,3944,7611,466,1170,169,1051,2907,2688,3663,2474, -2994,1182,2011,2563,1251,2626,7612,992,2340,3444,1540,2721,1201,2070,2401,1996,2475,7613,4424,528,1922,2188,1503,1873,1570,2364,3342,3276,7614,557,1073,7615,1827,3445,2087,2266,3140,3039,3084,767,3085,2786,4425,1006,4158,4426,2341,1267,2176,3664,3199,778,3945,3200,2722,1597,2657,7616,4427,7617,3446,7618,7619,7620,3277,2689,1433,3278,131,95,1504,3946,723,4159,3141,1841,3555,2758,2189,3947,2027,2104,3665,7621,2995,3948,1218,7622,3343,3201,3949,4160,2576,248,1634,3785,912,7623,2832,3666,3040,3786,654, -53,7624,2996,7625,1688,4428,777,3447,1032,3950,1425,7626,191,820,2120,2833,971,4429,931,3202,135,664,783,3787,1997,772,2908,1935,3951,3788,4430,2909,3203,282,2723,640,1372,3448,1127,922,325,3344,7627,7628,711,2044,7629,7630,3952,2219,2787,1936,3953,3345,2220,2251,3789,2300,7631,4431,3790,1258,3279,3954,3204,2138,2950,3955,3956,7632,2221,258,3205,4432,101,1227,7633,3280,1755,7634,1391,3281,7635,2910,2056,893,7636,7637,7638,1402,4161,2342,7639,7640,3206,3556,7641,7642,878,1325,1780,2788,4433,259,1385, -2577,744,1183,2267,4434,7643,3957,2502,7644,684,1024,4162,7645,472,3557,3449,1165,3282,3958,3959,322,2152,881,455,1695,1152,1340,660,554,2153,4435,1058,4436,4163,830,1065,3346,3960,4437,1923,7646,1703,1918,7647,932,2268,122,7648,4438,947,677,7649,3791,2627,297,1905,1924,2269,4439,2317,3283,7650,7651,4164,7652,4165,84,4166,112,989,7653,547,1059,3961,701,3558,1019,7654,4167,7655,3450,942,639,457,2301,2451,993,2951,407,851,494,4440,3347,927,7656,1237,7657,2421,3348,573,4168,680,921,2911,1279,1874,285, -790,1448,1983,719,2167,7658,7659,4441,3962,3963,1649,7660,1541,563,7661,1077,7662,3349,3041,3451,511,2997,3964,3965,3667,3966,1268,2564,3350,3207,4442,4443,7663,535,1048,1276,1189,2912,2028,3142,1438,1373,2834,2952,1134,2012,7664,4169,1238,2578,3086,1259,7665,700,7666,2953,3143,3668,4170,7667,4171,1146,1875,1906,4444,2601,3967,781,2422,132,1589,203,147,273,2789,2402,898,1786,2154,3968,3969,7668,3792,2790,7669,7670,4445,4446,7671,3208,7672,1635,3793,965,7673,1804,2690,1516,3559,1121,1082,1329,3284, -3970,1449,3794,65,1128,2835,2913,2759,1590,3795,7674,7675,12,2658,45,976,2579,3144,4447,517,2528,1013,1037,3209,7676,3796,2836,7677,3797,7678,3452,7679,2602,614,1998,2318,3798,3087,2724,2628,7680,2580,4172,599,1269,7681,1810,3669,7682,2691,3088,759,1060,489,1805,3351,3285,1358,7683,7684,2386,1387,1215,2629,2252,490,7685,7686,4173,1759,2387,2343,7687,4448,3799,1907,3971,2630,1806,3210,4449,3453,3286,2760,2344,874,7688,7689,3454,3670,1858,91,2914,3671,3042,3800,4450,7690,3145,3972,2659,7691,3455,1202, -1403,3801,2954,2529,1517,2503,4451,3456,2504,7692,4452,7693,2692,1885,1495,1731,3973,2365,4453,7694,2029,7695,7696,3974,2693,1216,237,2581,4174,2319,3975,3802,4454,4455,2694,3560,3457,445,4456,7697,7698,7699,7700,2761,61,3976,3672,1822,3977,7701,687,2045,935,925,405,2660,703,1096,1859,2725,4457,3978,1876,1367,2695,3352,918,2105,1781,2476,334,3287,1611,1093,4458,564,3146,3458,3673,3353,945,2631,2057,4459,7702,1925,872,4175,7703,3459,2696,3089,349,4176,3674,3979,4460,3803,4177,3675,2155,3980,4461,4462, -4178,4463,2403,2046,782,3981,400,251,4179,1624,7704,7705,277,3676,299,1265,476,1191,3804,2121,4180,4181,1109,205,7706,2582,1E3,2156,3561,1860,7707,7708,7709,4464,7710,4465,2565,107,2477,2157,3982,3460,3147,7711,1533,541,1301,158,753,4182,2872,3562,7712,1696,370,1088,4183,4466,3563,579,327,440,162,2240,269,1937,1374,3461,968,3043,56,1396,3090,2106,3288,3354,7713,1926,2158,4467,2998,7714,3564,7715,7716,3677,4468,2478,7717,2791,7718,1650,4469,7719,2603,7720,7721,3983,2661,3355,1149,3356,3984,3805,3985, -7722,1076,49,7723,951,3211,3289,3290,450,2837,920,7724,1811,2792,2366,4184,1908,1138,2367,3806,3462,7725,3212,4470,1909,1147,1518,2423,4471,3807,7726,4472,2388,2604,260,1795,3213,7727,7728,3808,3291,708,7729,3565,1704,7730,3566,1351,1618,3357,2999,1886,944,4185,3358,4186,3044,3359,4187,7731,3678,422,413,1714,3292,500,2058,2345,4188,2479,7732,1344,1910,954,7733,1668,7734,7735,3986,2404,4189,3567,3809,4190,7736,2302,1318,2505,3091,133,3092,2873,4473,629,31,2838,2697,3810,4474,850,949,4475,3987,2955, -1732,2088,4191,1496,1852,7737,3988,620,3214,981,1242,3679,3360,1619,3680,1643,3293,2139,2452,1970,1719,3463,2168,7738,3215,7739,7740,3361,1828,7741,1277,4476,1565,2047,7742,1636,3568,3093,7743,869,2839,655,3811,3812,3094,3989,3E3,3813,1310,3569,4477,7744,7745,7746,1733,558,4478,3681,335,1549,3045,1756,4192,3682,1945,3464,1829,1291,1192,470,2726,2107,2793,913,1054,3990,7747,1027,7748,3046,3991,4479,982,2662,3362,3148,3465,3216,3217,1946,2794,7749,571,4480,7750,1830,7751,3570,2583,1523,2424,7752,2089, -984,4481,3683,1959,7753,3684,852,923,2795,3466,3685,969,1519,999,2048,2320,1705,7754,3095,615,1662,151,597,3992,2405,2321,1049,275,4482,3686,4193,568,3687,3571,2480,4194,3688,7755,2425,2270,409,3218,7756,1566,2874,3467,1002,769,2840,194,2090,3149,3689,2222,3294,4195,628,1505,7757,7758,1763,2177,3001,3993,521,1161,2584,1787,2203,2406,4483,3994,1625,4196,4197,412,42,3096,464,7759,2632,4484,3363,1760,1571,2875,3468,2530,1219,2204,3814,2633,2140,2368,4485,4486,3295,1651,3364,3572,7760,7761,3573,2481, -3469,7762,3690,7763,7764,2271,2091,460,7765,4487,7766,3002,962,588,3574,289,3219,2634,1116,52,7767,3047,1796,7768,7769,7770,1467,7771,1598,1143,3691,4198,1984,1734,1067,4488,1280,3365,465,4489,1572,510,7772,1927,2241,1812,1644,3575,7773,4490,3692,7774,7775,2663,1573,1534,7776,7777,4199,536,1807,1761,3470,3815,3150,2635,7778,7779,7780,4491,3471,2915,1911,2796,7781,3296,1122,377,3220,7782,360,7783,7784,4200,1529,551,7785,2059,3693,1769,2426,7786,2916,4201,3297,3097,2322,2108,2030,4492,1404,136,1468, -1479,672,1171,3221,2303,271,3151,7787,2762,7788,2049,678,2727,865,1947,4493,7789,2013,3995,2956,7790,2728,2223,1397,3048,3694,4494,4495,1735,2917,3366,3576,7791,3816,509,2841,2453,2876,3817,7792,7793,3152,3153,4496,4202,2531,4497,2304,1166,1010,552,681,1887,7794,7795,2957,2958,3996,1287,1596,1861,3154,358,453,736,175,478,1117,905,1167,1097,7796,1853,1530,7797,1706,7798,2178,3472,2287,3695,3473,3577,4203,2092,4204,7799,3367,1193,2482,4205,1458,2190,2205,1862,1888,1421,3298,2918,3049,2179,3474,595, -2122,7800,3997,7801,7802,4206,1707,2636,223,3696,1359,751,3098,183,3475,7803,2797,3003,419,2369,633,704,3818,2389,241,7804,7805,7806,838,3004,3697,2272,2763,2454,3819,1938,2050,3998,1309,3099,2242,1181,7807,1136,2206,3820,2370,1446,4207,2305,4498,7808,7809,4208,1055,2605,484,3698,7810,3999,625,4209,2273,3368,1499,4210,4E3,7811,4001,4211,3222,2274,2275,3476,7812,7813,2764,808,2606,3699,3369,4002,4212,3100,2532,526,3370,3821,4213,955,7814,1620,4214,2637,2427,7815,1429,3700,1669,1831,994,928,7816,3578, -1260,7817,7818,7819,1948,2288,741,2919,1626,4215,2729,2455,867,1184,362,3371,1392,7820,7821,4003,4216,1770,1736,3223,2920,4499,4500,1928,2698,1459,1158,7822,3050,3372,2877,1292,1929,2506,2842,3701,1985,1187,2071,2014,2607,4217,7823,2566,2507,2169,3702,2483,3299,7824,3703,4501,7825,7826,666,1003,3005,1022,3579,4218,7827,4502,1813,2253,574,3822,1603,295,1535,705,3823,4219,283,858,417,7828,7829,3224,4503,4504,3051,1220,1889,1046,2276,2456,4004,1393,1599,689,2567,388,4220,7830,2484,802,7831,2798,3824, -2060,1405,2254,7832,4505,3825,2109,1052,1345,3225,1585,7833,809,7834,7835,7836,575,2730,3477,956,1552,1469,1144,2323,7837,2324,1560,2457,3580,3226,4005,616,2207,3155,2180,2289,7838,1832,7839,3478,4506,7840,1319,3704,3705,1211,3581,1023,3227,1293,2799,7841,7842,7843,3826,607,2306,3827,762,2878,1439,4221,1360,7844,1485,3052,7845,4507,1038,4222,1450,2061,2638,4223,1379,4508,2585,7846,7847,4224,1352,1414,2325,2921,1172,7848,7849,3828,3829,7850,1797,1451,7851,7852,7853,7854,2922,4006,4007,2485,2346,411, -4008,4009,3582,3300,3101,4509,1561,2664,1452,4010,1375,7855,7856,47,2959,316,7857,1406,1591,2923,3156,7858,1025,2141,3102,3157,354,2731,884,2224,4225,2407,508,3706,726,3583,996,2428,3584,729,7859,392,2191,1453,4011,4510,3707,7860,7861,2458,3585,2608,1675,2800,919,2347,2960,2348,1270,4511,4012,73,7862,7863,647,7864,3228,2843,2255,1550,1346,3006,7865,1332,883,3479,7866,7867,7868,7869,3301,2765,7870,1212,831,1347,4226,4512,2326,3830,1863,3053,720,3831,4513,4514,3832,7871,4227,7872,7873,4515,7874,7875, -1798,4516,3708,2609,4517,3586,1645,2371,7876,7877,2924,669,2208,2665,2429,7878,2879,7879,7880,1028,3229,7881,4228,2408,7882,2256,1353,7883,7884,4518,3158,518,7885,4013,7886,4229,1960,7887,2142,4230,7888,7889,3007,2349,2350,3833,516,1833,1454,4014,2699,4231,4519,2225,2610,1971,1129,3587,7890,2766,7891,2961,1422,577,1470,3008,1524,3373,7892,7893,432,4232,3054,3480,7894,2586,1455,2508,2226,1972,1175,7895,1020,2732,4015,3481,4520,7896,2733,7897,1743,1361,3055,3482,2639,4016,4233,4521,2290,895,924,4234, -2170,331,2243,3056,166,1627,3057,1098,7898,1232,2880,2227,3374,4522,657,403,1196,2372,542,3709,3375,1600,4235,3483,7899,4523,2767,3230,576,530,1362,7900,4524,2533,2666,3710,4017,7901,842,3834,7902,2801,2031,1014,4018,213,2700,3376,665,621,4236,7903,3711,2925,2430,7904,2431,3302,3588,3377,7905,4237,2534,4238,4525,3589,1682,4239,3484,1380,7906,724,2277,600,1670,7907,1337,1233,4526,3103,2244,7908,1621,4527,7909,651,4240,7910,1612,4241,2611,7911,2844,7912,2734,2307,3058,7913,716,2459,3059,174,1255,2701, -4019,3590,548,1320,1398,728,4020,1574,7914,1890,1197,3060,4021,7915,3061,3062,3712,3591,3713,747,7916,635,4242,4528,7917,7918,7919,4243,7920,7921,4529,7922,3378,4530,2432,451,7923,3714,2535,2072,4244,2735,4245,4022,7924,1764,4531,7925,4246,350,7926,2278,2390,2486,7927,4247,4023,2245,1434,4024,488,4532,458,4248,4025,3715,771,1330,2391,3835,2568,3159,2159,2409,1553,2667,3160,4249,7928,2487,2881,2612,1720,2702,4250,3379,4533,7929,2536,4251,7930,3231,4252,2768,7931,2015,2736,7932,1155,1017,3716,3836, -7933,3303,2308,201,1864,4253,1430,7934,4026,7935,7936,7937,7938,7939,4254,1604,7940,414,1865,371,2587,4534,4535,3485,2016,3104,4536,1708,960,4255,887,389,2171,1536,1663,1721,7941,2228,4027,2351,2926,1580,7942,7943,7944,1744,7945,2537,4537,4538,7946,4539,7947,2073,7948,7949,3592,3380,2882,4256,7950,4257,2640,3381,2802,673,2703,2460,709,3486,4028,3593,4258,7951,1148,502,634,7952,7953,1204,4540,3594,1575,4541,2613,3717,7954,3718,3105,948,3232,121,1745,3837,1110,7955,4259,3063,2509,3009,4029,3719,1151, -1771,3838,1488,4030,1986,7956,2433,3487,7957,7958,2093,7959,4260,3839,1213,1407,2803,531,2737,2538,3233,1011,1537,7960,2769,4261,3106,1061,7961,3720,3721,1866,2883,7962,2017,120,4262,4263,2062,3595,3234,2309,3840,2668,3382,1954,4542,7963,7964,3488,1047,2704,1266,7965,1368,4543,2845,649,3383,3841,2539,2738,1102,2846,2669,7966,7967,1999,7968,1111,3596,2962,7969,2488,3842,3597,2804,1854,3384,3722,7970,7971,3385,2410,2884,3304,3235,3598,7972,2569,7973,3599,2805,4031,1460,856,7974,3600,7975,2885,2963, -7976,2886,3843,7977,4264,632,2510,875,3844,1697,3845,2291,7978,7979,4544,3010,1239,580,4545,4265,7980,914,936,2074,1190,4032,1039,2123,7981,7982,7983,3386,1473,7984,1354,4266,3846,7985,2172,3064,4033,915,3305,4267,4268,3306,1605,1834,7986,2739,398,3601,4269,3847,4034,328,1912,2847,4035,3848,1331,4270,3011,937,4271,7987,3602,4036,4037,3387,2160,4546,3388,524,742,538,3065,1012,7988,7989,3849,2461,7990,658,1103,225,3850,7991,7992,4547,7993,4548,7994,3236,1243,7995,4038,963,2246,4549,7996,2705,3603,3161, -7997,7998,2588,2327,7999,4550,8E3,8001,8002,3489,3307,957,3389,2540,2032,1930,2927,2462,870,2018,3604,1746,2770,2771,2434,2463,8003,3851,8004,3723,3107,3724,3490,3390,3725,8005,1179,3066,8006,3162,2373,4272,3726,2541,3163,3108,2740,4039,8007,3391,1556,2542,2292,977,2887,2033,4040,1205,3392,8008,1765,3393,3164,2124,1271,1689,714,4551,3491,8009,2328,3852,533,4273,3605,2181,617,8010,2464,3308,3492,2310,8011,8012,3165,8013,8014,3853,1987,618,427,2641,3493,3394,8015,8016,1244,1690,8017,2806,4274,4552, -8018,3494,8019,8020,2279,1576,473,3606,4275,3395,972,8021,3607,8022,3067,8023,8024,4553,4554,8025,3727,4041,4042,8026,153,4555,356,8027,1891,2888,4276,2143,408,803,2352,8028,3854,8029,4277,1646,2570,2511,4556,4557,3855,8030,3856,4278,8031,2411,3396,752,8032,8033,1961,2964,8034,746,3012,2465,8035,4279,3728,698,4558,1892,4280,3608,2543,4559,3609,3857,8036,3166,3397,8037,1823,1302,4043,2706,3858,1973,4281,8038,4282,3167,823,1303,1288,1236,2848,3495,4044,3398,774,3859,8039,1581,4560,1304,2849,3860,4561, -8040,2435,2161,1083,3237,4283,4045,4284,344,1173,288,2311,454,1683,8041,8042,1461,4562,4046,2589,8043,8044,4563,985,894,8045,3399,3168,8046,1913,2928,3729,1988,8047,2110,1974,8048,4047,8049,2571,1194,425,8050,4564,3169,1245,3730,4285,8051,8052,2850,8053,636,4565,1855,3861,760,1799,8054,4286,2209,1508,4566,4048,1893,1684,2293,8055,8056,8057,4287,4288,2210,479,8058,8059,832,8060,4049,2489,8061,2965,2490,3731,990,3109,627,1814,2642,4289,1582,4290,2125,2111,3496,4567,8062,799,4291,3170,8063,4568,2112, -1737,3013,1018,543,754,4292,3309,1676,4569,4570,4050,8064,1489,8065,3497,8066,2614,2889,4051,8067,8068,2966,8069,8070,8071,8072,3171,4571,4572,2182,1722,8073,3238,3239,1842,3610,1715,481,365,1975,1856,8074,8075,1962,2491,4573,8076,2126,3611,3240,433,1894,2063,2075,8077,602,2741,8078,8079,8080,8081,8082,3014,1628,3400,8083,3172,4574,4052,2890,4575,2512,8084,2544,2772,8085,8086,8087,3310,4576,2891,8088,4577,8089,2851,4578,4579,1221,2967,4053,2513,8090,8091,8092,1867,1989,8093,8094,8095,1895,8096,8097, -4580,1896,4054,318,8098,2094,4055,4293,8099,8100,485,8101,938,3862,553,2670,116,8102,3863,3612,8103,3498,2671,2773,3401,3311,2807,8104,3613,2929,4056,1747,2930,2968,8105,8106,207,8107,8108,2672,4581,2514,8109,3015,890,3614,3864,8110,1877,3732,3402,8111,2183,2353,3403,1652,8112,8113,8114,941,2294,208,3499,4057,2019,330,4294,3865,2892,2492,3733,4295,8115,8116,8117,8118,2515,1613,4582,8119,3312,3866,2516,8120,4058,8121,1637,4059,2466,4583,3867,8122,2493,3016,3734,8123,8124,2192,8125,8126,2162,8127,8128, -8129,8130,8131,8132,8133,8134,8135,8136,8137,8138,8139,8140,8141,8142,8143,8144,8145,8146,8147,8148,8149,8150,8151,8152,8153,8154,8155,8156,8157,8158,8159,8160,8161,8162,8163,8164,8165,8166,8167,8168,8169,8170,8171,8172,8173,8174,8175,8176,8177,8178,8179,8180,8181,8182,8183,8184,8185,8186,8187,8188,8189,8190,8191,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8208,8209,8210,8211,8212,8213,8214,8215,8216,8217,8218,8219,8220,8221,8222,8223,8224,8225,8226,8227,8228,8229, -8230,8231,8232,8233,8234,8235,8236,8237,8238,8239,8240,8241,8242,8243,8244,8245,8246,8247,8248,8249,8250,8251,8252,8253,8254,8255,8256,8257,8258,8259,8260,8261,8262,8263,8264,8265,8266,8267,8268,8269,8270,8271,8272,8273,8274,8275,8276,8277,8278,8279,8280,8281,8282,8283,8284,8285,8286,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,8304,8305,8306,8307,8308,8309,8310,8311,8312,8313,8314,8315,8316,8317,8318,8319,8320,8321,8322,8323,8324,8325,8326,8327,8328,8329,8330, -8331,8332,8333,8334,8335,8336,8337,8338,8339,8340,8341,8342,8343,8344,8345,8346,8347,8348,8349,8350,8351,8352,8353,8354,8355,8356,8357,8358,8359,8360,8361,8362,8363,8364,8365,8366,8367,8368,8369,8370,8371,8372,8373,8374,8375,8376,8377,8378,8379,8380,8381,8382,8383,8384,8385,8386,8387,8388,8389,8390,8391,8392,8393,8394,8395,8396,8397,8398,8399,8400,8401,8402,8403,8404,8405,8406,8407,8408,8409,8410,8411,8412,8413,8414,8415,8416,8417,8418,8419,8420,8421,8422,8423,8424,8425,8426,8427,8428,8429,8430,8431, -8432,8433,8434,8435,8436,8437,8438,8439,8440,8441,8442,8443,8444,8445,8446,8447,8448,8449,8450,8451,8452,8453,8454,8455,8456,8457,8458,8459,8460,8461,8462,8463,8464,8465,8466,8467,8468,8469,8470,8471,8472,8473,8474,8475,8476,8477,8478,8479,8480,8481,8482,8483,8484,8485,8486,8487,8488,8489,8490,8491,8492,8493,8494,8495,8496,8497,8498,8499,8500,8501,8502,8503,8504,8505,8506,8507,8508,8509,8510,8511,8512,8513,8514,8515,8516,8517,8518,8519,8520,8521,8522,8523,8524,8525,8526,8527,8528,8529,8530,8531,8532, -8533,8534,8535,8536,8537,8538,8539,8540,8541,8542,8543,8544,8545,8546,8547,8548,8549,8550,8551,8552,8553,8554,8555,8556,8557,8558,8559,8560,8561,8562,8563,8564,8565,8566,8567,8568,8569,8570,8571,8572,8573,8574,8575,8576,8577,8578,8579,8580,8581,8582,8583,8584,8585,8586,8587,8588,8589,8590,8591,8592,8593,8594,8595,8596,8597,8598,8599,8600,8601,8602,8603,8604,8605,8606,8607,8608,8609,8610,8611,8612,8613,8614,8615,8616,8617,8618,8619,8620,8621,8622,8623,8624,8625,8626,8627,8628,8629,8630,8631,8632,8633, -8634,8635,8636,8637,8638,8639,8640,8641,8642,8643,8644,8645,8646,8647,8648,8649,8650,8651,8652,8653,8654,8655,8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671,8672,8673,8674,8675,8676,8677,8678,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699,8700,8701,8702,8703,8704,8705,8706,8707,8708,8709,8710,8711,8712,8713,8714,8715,8716,8717,8718,8719,8720,8721,8722,8723,8724,8725,8726,8727,8728,8729,8730,8731,8732,8733,8734, -8735,8736,8737,8738,8739,8740,8741];!0},{"./init":20}],15:[function(b,a,d){!function(a){a.EUCTWProber=function(){a.MultiByteCharSetProber.apply(this);this.getCharsetName=function(){return"EUC-TW"};this._mCodingSM=new a.CodingStateMachine(a.EUCTWSMModel);this._mDistributionAnalyzer=new a.EUCTWDistributionAnalysis;this.reset()};a.EUCTWProber.prototype=new a.MultiByteCharSetProber}(b("./init"))},{"./init":20}],16:[function(b,a,d){b=b("./init");b.GB2312_TYPICAL_DISTRIBUTION_RATIO=.9;b.GB2312_TABLE_SIZE= -3760;b.GB2312CharToFreqOrder=[1671,749,1443,2364,3924,3807,2330,3921,1704,3463,2691,1511,1515,572,3191,2205,2361,224,2558,479,1711,963,3162,440,4060,1905,2966,2947,3580,2647,3961,3842,2204,869,4207,970,2678,5626,2944,2956,1479,4048,514,3595,588,1346,2820,3409,249,4088,1746,1873,2047,1774,581,1813,358,1174,3590,1014,1561,4844,2245,670,1636,3112,889,1286,953,556,2327,3060,1290,3141,613,185,3477,1367,850,3820,1715,2428,2642,2303,2732,3041,2562,2648,3566,3946,1349,388,3098,2091,1360,3585,152,1687,1539, -738,1559,59,1232,2925,2267,1388,1249,1741,1679,2960,151,1566,1125,1352,4271,924,4296,385,3166,4459,310,1245,2850,70,3285,2729,3534,3575,2398,3298,3466,1960,2265,217,3647,864,1909,2084,4401,2773,1010,3269,5152,853,3051,3121,1244,4251,1895,364,1499,1540,2313,1180,3655,2268,562,715,2417,3061,544,336,3768,2380,1752,4075,950,280,2425,4382,183,2759,3272,333,4297,2155,1688,2356,1444,1039,4540,736,1177,3349,2443,2368,2144,2225,565,196,1482,3406,927,1335,4147,692,878,1311,1653,3911,3622,1378,4200,1840,2969, -3149,2126,1816,2534,1546,2393,2760,737,2494,13,447,245,2747,38,2765,2129,2589,1079,606,360,471,3755,2890,404,848,699,1785,1236,370,2221,1023,3746,2074,2026,2023,2388,1581,2119,812,1141,3091,2536,1519,804,2053,406,1596,1090,784,548,4414,1806,2264,2936,1100,343,4114,5096,622,3358,743,3668,1510,1626,5020,3567,2513,3195,4115,5627,2489,2991,24,2065,2697,1087,2719,48,1634,315,68,985,2052,198,2239,1347,1107,1439,597,2366,2172,871,3307,919,2487,2790,1867,236,2570,1413,3794,906,3365,3381,1701,1982,1818,1524, -2924,1205,616,2586,2072,2004,575,253,3099,32,1365,1182,197,1714,2454,1201,554,3388,3224,2748,756,2587,250,2567,1507,1517,3529,1922,2761,2337,3416,1961,1677,2452,2238,3153,615,911,1506,1474,2495,1265,1906,2749,3756,3280,2161,898,2714,1759,3450,2243,2444,563,26,3286,2266,3769,3344,2707,3677,611,1402,531,1028,2871,4548,1375,261,2948,835,1190,4134,353,840,2684,1900,3082,1435,2109,1207,1674,329,1872,2781,4055,2686,2104,608,3318,2423,2957,2768,1108,3739,3512,3271,3985,2203,1771,3520,1418,2054,1681,1153, -225,1627,2929,162,2050,2511,3687,1954,124,1859,2431,1684,3032,2894,585,4805,3969,2869,2704,2088,2032,2095,3656,2635,4362,2209,256,518,2042,2105,3777,3657,643,2298,1148,1779,190,989,3544,414,11,2135,2063,2979,1471,403,3678,126,770,1563,671,2499,3216,2877,600,1179,307,2805,4937,1268,1297,2694,252,4032,1448,1494,1331,1394,127,2256,222,1647,1035,1481,3056,1915,1048,873,3651,210,33,1608,2516,200,1520,415,102,0,3389,1287,817,91,3299,2940,836,1814,549,2197,1396,1669,2987,3582,2297,2848,4528,1070,687,20, -1819,121,1552,1364,1461,1968,2617,3540,2824,2083,177,948,4938,2291,110,4549,2066,648,3359,1755,2110,2114,4642,4845,1693,3937,3308,1257,1869,2123,208,1804,3159,2992,2531,2549,3361,2418,1350,2347,2800,2568,1291,2036,2680,72,842,1990,212,1233,1154,1586,75,2027,3410,4900,1823,1337,2710,2676,728,2810,1522,3026,4995,157,755,1050,4022,710,785,1936,2194,2085,1406,2777,2400,150,1250,4049,1206,807,1910,534,529,3309,1721,1660,274,39,2827,661,2670,1578,925,3248,3815,1094,4278,4901,4252,41,1150,3747,2572,2227, -4501,3658,4902,3813,3357,3617,2884,2258,887,538,4187,3199,1294,2439,3042,2329,2343,2497,1255,107,543,1527,521,3478,3568,194,5062,15,961,3870,1241,1192,2664,66,5215,3260,2111,1295,1127,2152,3805,4135,901,1164,1976,398,1278,530,1460,748,904,1054,1966,1426,53,2909,509,523,2279,1534,536,1019,239,1685,460,2353,673,1065,2401,3600,4298,2272,1272,2363,284,1753,3679,4064,1695,81,815,2677,2757,2731,1386,859,500,4221,2190,2566,757,1006,2519,2068,1166,1455,337,2654,3203,1863,1682,1914,3025,1252,1409,1366,847, -714,2834,2038,3209,964,2970,1901,885,2553,1078,1756,3049,301,1572,3326,688,2130,1996,2429,1805,1648,2930,3421,2750,3652,3088,262,1158,1254,389,1641,1812,526,1719,923,2073,1073,1902,468,489,4625,1140,857,2375,3070,3319,2863,380,116,1328,2693,1161,2244,273,1212,1884,2769,3011,1775,1142,461,3066,1200,2147,2212,790,702,2695,4222,1601,1058,434,2338,5153,3640,67,2360,4099,2502,618,3472,1329,416,1132,830,2782,1807,2653,3211,3510,1662,192,2124,296,3979,1739,1611,3684,23,118,324,446,1239,1225,293,2520,3814, -3795,2535,3116,17,1074,467,2692,2201,387,2922,45,1326,3055,1645,3659,2817,958,243,1903,2320,1339,2825,1784,3289,356,576,865,2315,2381,3377,3916,1088,3122,1713,1655,935,628,4689,1034,1327,441,800,720,894,1979,2183,1528,5289,2702,1071,4046,3572,2399,1571,3281,79,761,1103,327,134,758,1899,1371,1615,879,442,215,2605,2579,173,2048,2485,1057,2975,3317,1097,2253,3801,4263,1403,1650,2946,814,4968,3487,1548,2644,1567,1285,2,295,2636,97,946,3576,832,141,4257,3273,760,3821,3521,3156,2607,949,1024,1733,1516, -1803,1920,2125,2283,2665,3180,1501,2064,3560,2171,1592,803,3518,1416,732,3897,4258,1363,1362,2458,119,1427,602,1525,2608,1605,1639,3175,694,3064,10,465,76,2E3,4846,4208,444,3781,1619,3353,2206,1273,3796,740,2483,320,1723,2377,3660,2619,1359,1137,1762,1724,2345,2842,1850,1862,912,821,1866,612,2625,1735,2573,3369,1093,844,89,937,930,1424,3564,2413,2972,1004,3046,3019,2011,711,3171,1452,4178,428,801,1943,432,445,2811,206,4136,1472,730,349,73,397,2802,2547,998,1637,1167,789,396,3217,154,1218,716,1120, -1780,2819,4826,1931,3334,3762,2139,1215,2627,552,3664,3628,3232,1405,2383,3111,1356,2652,3577,3320,3101,1703,640,1045,1370,1246,4996,371,1575,2436,1621,2210,984,4033,1734,2638,16,4529,663,2755,3255,1451,3917,2257,1253,1955,2234,1263,2951,214,1229,617,485,359,1831,1969,473,2310,750,2058,165,80,2864,2419,361,4344,2416,2479,1134,796,3726,1266,2943,860,2715,938,390,2734,1313,1384,248,202,877,1064,2854,522,3907,279,1602,297,2357,395,3740,137,2075,944,4089,2584,1267,3802,62,1533,2285,178,176,780,2440,201, -3707,590,478,1560,4354,2117,1075,30,74,4643,4004,1635,1441,2745,776,2596,238,1077,1692,1912,2844,605,499,1742,3947,241,3053,980,1749,936,2640,4511,2582,515,1543,2162,5322,2892,2993,890,2148,1924,665,1827,3581,1032,968,3163,339,1044,1896,270,583,1791,1720,4367,1194,3488,3669,43,2523,1657,163,2167,290,1209,1622,3378,550,634,2508,2510,695,2634,2384,2512,1476,1414,220,1469,2341,2138,2852,3183,2900,4939,2865,3502,1211,3680,854,3227,1299,2976,3172,186,2998,1459,443,1067,3251,1495,321,1932,3054,909,753, -1410,1828,436,2441,1119,1587,3164,2186,1258,227,231,1425,1890,3200,3942,247,959,725,5254,2741,577,2158,2079,929,120,174,838,2813,591,1115,417,2024,40,3240,1536,1037,291,4151,2354,632,1298,2406,2500,3535,1825,1846,3451,205,1171,345,4238,18,1163,811,685,2208,1217,425,1312,1508,1175,4308,2552,1033,587,1381,3059,2984,3482,340,1316,4023,3972,792,3176,519,777,4690,918,933,4130,2981,3741,90,3360,2911,2200,5184,4550,609,3079,2030,272,3379,2736,363,3881,1130,1447,286,779,357,1169,3350,3137,1630,1220,2687, -2391,747,1277,3688,2618,2682,2601,1156,3196,5290,4034,3102,1689,3596,3128,874,219,2783,798,508,1843,2461,269,1658,1776,1392,1913,2983,3287,2866,2159,2372,829,4076,46,4253,2873,1889,1894,915,1834,1631,2181,2318,298,664,2818,3555,2735,954,3228,3117,527,3511,2173,681,2712,3033,2247,2346,3467,1652,155,2164,3382,113,1994,450,899,494,994,1237,2958,1875,2336,1926,3727,545,1577,1550,633,3473,204,1305,3072,2410,1956,2471,707,2134,841,2195,2196,2663,3843,1026,4940,990,3252,4997,368,1092,437,3212,3258,1933, -1829,675,2977,2893,412,943,3723,4644,3294,3283,2230,2373,5154,2389,2241,2661,2323,1404,2524,593,787,677,3008,1275,2059,438,2709,2609,2240,2269,2246,1446,36,1568,1373,3892,1574,2301,1456,3962,693,2276,5216,2035,1143,2720,1919,1797,1811,2763,4137,2597,1830,1699,1488,1198,2090,424,1694,312,3634,3390,4179,3335,2252,1214,561,1059,3243,2295,2561,975,5155,2321,2751,3772,472,1537,3282,3398,1047,2077,2348,2878,1323,3340,3076,690,2906,51,369,170,3541,1060,2187,2688,3670,2541,1083,1683,928,3918,459,109,4427, -599,3744,4286,143,2101,2730,2490,82,1588,3036,2121,281,1860,477,4035,1238,2812,3020,2716,3312,1530,2188,2055,1317,843,636,1808,1173,3495,649,181,1002,147,3641,1159,2414,3750,2289,2795,813,3123,2610,1136,4368,5,3391,4541,2174,420,429,1728,754,1228,2115,2219,347,2223,2733,735,1518,3003,2355,3134,1764,3948,3329,1888,2424,1001,1234,1972,3321,3363,1672,1021,1450,1584,226,765,655,2526,3404,3244,2302,3665,731,594,2184,319,1576,621,658,2656,4299,2099,3864,1279,2071,2598,2739,795,3086,3699,3908,1707,2352, -2402,1382,3136,2475,1465,4847,3496,3865,1085,3004,2591,1084,213,2287,1963,3565,2250,822,793,4574,3187,1772,1789,3050,595,1484,1959,2770,1080,2650,456,422,2996,940,3322,4328,4345,3092,2742,965,2784,739,4124,952,1358,2498,2949,2565,332,2698,2378,660,2260,2473,4194,3856,2919,535,1260,2651,1208,1428,1300,1949,1303,2942,433,2455,2450,1251,1946,614,1269,641,1306,1810,2737,3078,2912,564,2365,1419,1415,1497,4460,2367,2185,1379,3005,1307,3218,2175,1897,3063,682,1157,4040,4005,1712,1160,1941,1399,394,402,2952, -1573,1151,2986,2404,862,299,2033,1489,3006,346,171,2886,3401,1726,2932,168,2533,47,2507,1030,3735,1145,3370,1395,1318,1579,3609,4560,2857,4116,1457,2529,1965,504,1036,2690,2988,2405,745,5871,849,2397,2056,3081,863,2359,3857,2096,99,1397,1769,2300,4428,1643,3455,1978,1757,3718,1440,35,4879,3742,1296,4228,2280,160,5063,1599,2013,166,520,3479,1646,3345,3012,490,1937,1545,1264,2182,2505,1096,1188,1369,1436,2421,1667,2792,2460,1270,2122,727,3167,2143,806,1706,1012,1800,3037,960,2218,1882,805,139,2456, -1139,1521,851,1052,3093,3089,342,2039,744,5097,1468,1502,1585,2087,223,939,326,2140,2577,892,2481,1623,4077,982,3708,135,2131,87,2503,3114,2326,1106,876,1616,547,2997,2831,2093,3441,4530,4314,9,3256,4229,4148,659,1462,1986,1710,2046,2913,2231,4090,4880,5255,3392,3274,1368,3689,4645,1477,705,3384,3635,1068,1529,2941,1458,3782,1509,100,1656,2548,718,2339,408,1590,2780,3548,1838,4117,3719,1345,3530,717,3442,2778,3220,2898,1892,4590,3614,3371,2043,1998,1224,3483,891,635,584,2559,3355,733,1766,1729,1172, -3789,1891,2307,781,2982,2271,1957,1580,5773,2633,2005,4195,3097,1535,3213,1189,1934,5693,3262,586,3118,1324,1598,517,1564,2217,1868,1893,4445,3728,2703,3139,1526,1787,1992,3882,2875,1549,1199,1056,2224,1904,2711,5098,4287,338,1993,3129,3489,2689,1809,2815,1997,957,1855,3898,2550,3275,3057,1105,1319,627,1505,1911,1883,3526,698,3629,3456,1833,1431,746,77,1261,2017,2296,1977,1885,125,1334,1600,525,1798,1109,2222,1470,1945,559,2236,1186,3443,2476,1929,1411,2411,3135,1777,3372,2621,1841,1613,3229,668, -1430,1839,2643,2916,195,1989,2671,2358,1387,629,3205,2293,5256,4439,123,1310,888,1879,4300,3021,3605,1003,1162,3192,2910,2010,140,2395,2859,55,1082,2012,2901,662,419,2081,1438,680,2774,4654,3912,1620,1731,1625,5035,4065,2328,512,1344,802,5443,2163,2311,2537,524,3399,98,1155,2103,1918,2606,3925,2816,1393,2465,1504,3773,2177,3963,1478,4346,180,1113,4655,3461,2028,1698,833,2696,1235,1322,1594,4408,3623,3013,3225,2040,3022,541,2881,607,3632,2029,1665,1219,639,1385,1686,1099,2803,3231,1938,3188,2858,427, -676,2772,1168,2025,454,3253,2486,3556,230,1950,580,791,1991,1280,1086,1974,2034,630,257,3338,2788,4903,1017,86,4790,966,2789,1995,1696,1131,259,3095,4188,1308,179,1463,5257,289,4107,1248,42,3413,1725,2288,896,1947,774,4474,4254,604,3430,4264,392,2514,2588,452,237,1408,3018,988,4531,1970,3034,3310,540,2370,1562,1288,2990,502,4765,1147,4,1853,2708,207,294,2814,4078,2902,2509,684,34,3105,3532,2551,644,709,2801,2344,573,1727,3573,3557,2021,1081,3100,4315,2100,3681,199,2263,1837,2385,146,3484,1195,2776, -3949,997,1939,3973,1008,1091,1202,1962,1847,1149,4209,5444,1076,493,117,5400,2521,972,1490,2934,1796,4542,2374,1512,2933,2657,413,2888,1135,2762,2314,2156,1355,2369,766,2007,2527,2170,3124,2491,2593,2632,4757,2437,234,3125,3591,1898,1750,1376,1942,3468,3138,570,2127,2145,3276,4131,962,132,1445,4196,19,941,3624,3480,3366,1973,1374,4461,3431,2629,283,2415,2275,808,2887,3620,2112,2563,1353,3610,955,1089,3103,1053,96,88,4097,823,3808,1583,399,292,4091,3313,421,1128,642,4006,903,2539,1877,2082,596,29, -4066,1790,722,2157,130,995,1569,769,1485,464,513,2213,288,1923,1101,2453,4316,133,486,2445,50,625,487,2207,57,423,481,2962,159,3729,1558,491,303,482,501,240,2837,112,3648,2392,1783,362,8,3433,3422,610,2793,3277,1390,1284,1654,21,3823,734,367,623,193,287,374,1009,1483,816,476,313,2255,2340,1262,2150,2899,1146,2581,782,2116,1659,2018,1880,255,3586,3314,1110,2867,2137,2564,986,2767,5185,2006,650,158,926,762,881,3157,2717,2362,3587,306,3690,3245,1542,3077,2427,1691,2478,2118,2985,3490,2438,539,2305,983, -129,1754,355,4201,2386,827,2923,104,1773,2838,2771,411,2905,3919,376,767,122,1114,828,2422,1817,3506,266,3460,1007,1609,4998,945,2612,4429,2274,726,1247,1964,2914,2199,2070,4002,4108,657,3323,1422,579,455,2764,4737,1222,2895,1670,824,1223,1487,2525,558,861,3080,598,2659,2515,1967,752,2583,2376,2214,4180,977,704,2464,4999,2622,4109,1210,2961,819,1541,142,2284,44,418,457,1126,3730,4347,4626,1644,1876,3671,1864,302,1063,5694,624,723,1984,3745,1314,1676,2488,1610,1449,3558,3569,2166,2098,409,1011,2325, -3704,2306,818,1732,1383,1824,1844,3757,999,2705,3497,1216,1423,2683,2426,2954,2501,2726,2229,1475,2554,5064,1971,1794,1666,2014,1343,783,724,191,2434,1354,2220,5065,1763,2752,2472,4152,131,175,2885,3434,92,1466,4920,2616,3871,3872,3866,128,1551,1632,669,1854,3682,4691,4125,1230,188,2973,3290,1302,1213,560,3266,917,763,3909,3249,1760,868,1958,764,1782,2097,145,2277,3774,4462,64,1491,3062,971,2132,3606,2442,221,1226,1617,218,323,1185,3207,3147,571,619,1473,1005,1744,2281,449,1887,2396,3685,275,375, -3816,1743,3844,3731,845,1983,2350,4210,1377,773,967,3499,3052,3743,2725,4007,1697,1022,3943,1464,3264,2855,2722,1952,1029,2839,2467,84,4383,2215,820,1391,2015,2448,3672,377,1948,2168,797,2545,3536,2578,2645,94,2874,1678,405,1259,3071,771,546,1315,470,1243,3083,895,2468,981,969,2037,846,4181,653,1276,2928,14,2594,557,3007,2474,156,902,1338,1740,2574,537,2518,973,2282,2216,2433,1928,138,2903,1293,2631,1612,646,3457,839,2935,111,496,2191,2847,589,3186,149,3994,2060,4031,2641,4067,3145,1870,37,3597,2136, -1025,2051,3009,3383,3549,1121,1016,3261,1301,251,2446,2599,2153,872,3246,637,334,3705,831,884,921,3065,3140,4092,2198,1944,246,2964,108,2045,1152,1921,2308,1031,203,3173,4170,1907,3890,810,1401,2003,1690,506,647,1242,2828,1761,1649,3208,2249,1589,3709,2931,5156,1708,498,666,2613,834,3817,1231,184,2851,1124,883,3197,2261,3710,1765,1553,2658,1178,2639,2351,93,1193,942,2538,2141,4402,235,1821,870,1591,2192,1709,1871,3341,1618,4126,2595,2334,603,651,69,701,268,2662,3411,2555,1380,1606,503,448,254,2371, -2646,574,1187,2309,1770,322,2235,1292,1801,305,566,1133,229,2067,2057,706,167,483,2002,2672,3295,1820,3561,3067,316,378,2746,3452,1112,136,1981,507,1651,2917,1117,285,4591,182,2580,3522,1304,335,3303,1835,2504,1795,1792,2248,674,1018,2106,2449,1857,2292,2845,976,3047,1781,2600,2727,1389,1281,52,3152,153,265,3950,672,3485,3951,4463,430,1183,365,278,2169,27,1407,1336,2304,209,1340,1730,2202,1852,2403,2883,979,1737,1062,631,2829,2542,3876,2592,825,2086,2226,3048,3625,352,1417,3724,542,991,431,1351,3938, -1861,2294,826,1361,2927,3142,3503,1738,463,2462,2723,582,1916,1595,2808,400,3845,3891,2868,3621,2254,58,2492,1123,910,2160,2614,1372,1603,1196,1072,3385,1700,3267,1980,696,480,2430,920,799,1570,2920,1951,2041,4047,2540,1321,4223,2469,3562,2228,1271,2602,401,2833,3351,2575,5157,907,2312,1256,410,263,3507,1582,996,678,1849,2316,1480,908,3545,2237,703,2322,667,1826,2849,1531,2604,2999,2407,3146,2151,2630,1786,3711,469,3542,497,3899,2409,858,837,4446,3393,1274,786,620,1845,2001,3311,484,308,3367,1204, -1815,3691,2332,1532,2557,1842,2020,2724,1927,2333,4440,567,22,1673,2728,4475,1987,1858,1144,1597,101,1832,3601,12,974,3783,4391,951,1412,1,3720,453,4608,4041,528,1041,1027,3230,2628,1129,875,1051,3291,1203,2262,1069,2860,2799,2149,2615,3278,144,1758,3040,31,475,1680,366,2685,3184,311,1642,4008,2466,5036,1593,1493,2809,216,1420,1668,233,304,2128,3284,232,1429,1768,1040,2008,3407,2740,2967,2543,242,2133,778,1565,2022,2620,505,2189,2756,1098,2273,372,1614,708,553,2846,2094,2278,169,3626,2835,4161,228, -2674,3165,809,1454,1309,466,1705,1095,900,3423,880,2667,3751,5258,2317,3109,2571,4317,2766,1503,1342,866,4447,1118,63,2076,314,1881,1348,1061,172,978,3515,1747,532,511,3970,6,601,905,2699,3300,1751,276,1467,3725,2668,65,4239,2544,2779,2556,1604,578,2451,1802,992,2331,2624,1320,3446,713,1513,1013,103,2786,2447,1661,886,1702,916,654,3574,2031,1556,751,2178,2821,2179,1498,1538,2176,271,914,2251,2080,1325,638,1953,2937,3877,2432,2754,95,3265,1716,260,1227,4083,775,106,1357,3254,426,1607,555,2480,772, -1985,244,2546,474,495,1046,2611,1851,2061,71,2089,1675,2590,742,3758,2843,3222,1433,267,2180,2576,2826,2233,2092,3913,2435,956,1745,3075,856,2113,1116,451,3,1988,2896,1398,993,2463,1878,2049,1341,2718,2721,2870,2108,712,2904,4363,2753,2324,277,2872,2349,2649,384,987,435,691,3E3,922,164,3939,652,1500,1184,4153,2482,3373,2165,4848,2335,3775,3508,3154,2806,2830,1554,2102,1664,2530,1434,2408,893,1547,2623,3447,2832,2242,2532,3169,2856,3223,2078,49,3770,3469,462,318,656,2259,3250,3069,679,1629,2758,344, -1138,1104,3120,1836,1283,3115,2154,1437,4448,934,759,1999,794,2862,1038,533,2560,1722,2342,855,2626,1197,1663,4476,3127,85,4240,2528,25,1111,1181,3673,407,3470,4561,2679,2713,768,1925,2841,3986,1544,1165,932,373,1240,2146,1930,2673,721,4766,354,4333,391,2963,187,61,3364,1442,1102,330,1940,1767,341,3809,4118,393,2496,2062,2211,105,331,300,439,913,1332,626,379,3304,1557,328,689,3952,309,1555,931,317,2517,3027,325,569,686,2107,3084,60,1042,1333,2794,264,3177,4014,1628,258,3712,7,4464,1176,1043,1778, -683,114,1975,78,1492,383,1886,510,386,645,5291,2891,2069,3305,4138,3867,2939,2603,2493,1935,1066,1848,3588,1015,1282,1289,4609,697,1453,3044,2666,3611,1856,2412,54,719,1330,568,3778,2459,1748,788,492,551,1191,1E3,488,3394,3763,282,1799,348,2016,1523,3155,2390,1049,382,2019,1788,1170,729,2968,3523,897,3926,2785,2938,3292,350,2319,3238,1718,1717,2655,3453,3143,4465,161,2889,2980,2009,1421,56,1908,1640,2387,2232,1917,1874,2477,4921,148,83,3438,592,4245,2882,1822,1055,741,115,1496,1624,381,1638,4592, -1020,516,3214,458,947,4575,1432,211,1514,2926,1865,2142,189,852,1221,1400,1486,882,2299,4036,351,28,1122,700,6479,6480,6481,6482,6483,5508,6484,3900,3414,3974,4441,4024,3537,4037,5628,5099,3633,6485,3148,6486,3636,5509,3257,5510,5973,5445,5872,4941,4403,3174,4627,5873,6276,2286,4230,5446,5874,5122,6102,6103,4162,5447,5123,5323,4849,6277,3980,3851,5066,4246,5774,5067,6278,3001,2807,5695,3346,5775,5974,5158,5448,6487,5975,5976,5776,3598,6279,5696,4806,4211,4154,6280,6488,6489,6490,6281,4212,5037,3374, -4171,6491,4562,4807,4722,4827,5977,6104,4532,4079,5159,5324,5160,4404,3858,5359,5875,3975,4288,4610,3486,4512,5325,3893,5360,6282,6283,5560,2522,4231,5978,5186,5449,2569,3878,6284,5401,3578,4415,6285,4656,5124,5979,2506,4247,4449,3219,3417,4334,4969,4329,6492,4576,4828,4172,4416,4829,5402,6286,3927,3852,5361,4369,4830,4477,4867,5876,4173,6493,6105,4657,6287,6106,5877,5450,6494,4155,4868,5451,3700,5629,4384,6288,6289,5878,3189,4881,6107,6290,6495,4513,6496,4692,4515,4723,5100,3356,6497,6291,3810,4080, -5561,3570,4430,5980,6498,4355,5697,6499,4724,6108,6109,3764,4050,5038,5879,4093,3226,6292,5068,5217,4693,3342,5630,3504,4831,4377,4466,4309,5698,4431,5777,6293,5778,4272,3706,6110,5326,3752,4676,5327,4273,5403,4767,5631,6500,5699,5880,3475,5039,6294,5562,5125,4348,4301,4482,4068,5126,4593,5700,3380,3462,5981,5563,3824,5404,4970,5511,3825,4738,6295,6501,5452,4516,6111,5881,5564,6502,6296,5982,6503,4213,4163,3454,6504,6112,4009,4450,6113,4658,6297,6114,3035,6505,6115,3995,4904,4739,4563,4942,4110,5040, -3661,3928,5362,3674,6506,5292,3612,4791,5565,4149,5983,5328,5259,5021,4725,4577,4564,4517,4364,6298,5405,4578,5260,4594,4156,4157,5453,3592,3491,6507,5127,5512,4709,4922,5984,5701,4726,4289,6508,4015,6116,5128,4628,3424,4241,5779,6299,4905,6509,6510,5454,5702,5780,6300,4365,4923,3971,6511,5161,3270,3158,5985,4100,867,5129,5703,6117,5363,3695,3301,5513,4467,6118,6512,5455,4232,4242,4629,6513,3959,4478,6514,5514,5329,5986,4850,5162,5566,3846,4694,6119,5456,4869,5781,3779,6301,5704,5987,5515,4710,6302, -5882,6120,4392,5364,5705,6515,6121,6516,6517,3736,5988,5457,5989,4695,2457,5883,4551,5782,6303,6304,6305,5130,4971,6122,5163,6123,4870,3263,5365,3150,4871,6518,6306,5783,5069,5706,3513,3498,4409,5330,5632,5366,5458,5459,3991,5990,4502,3324,5991,5784,3696,4518,5633,4119,6519,4630,5634,4417,5707,4832,5992,3418,6124,5993,5567,4768,5218,6520,4595,3458,5367,6125,5635,6126,4202,6521,4740,4924,6307,3981,4069,4385,6308,3883,2675,4051,3834,4302,4483,5568,5994,4972,4101,5368,6309,5164,5884,3922,6127,6522,6523, -5261,5460,5187,4164,5219,3538,5516,4111,3524,5995,6310,6311,5369,3181,3386,2484,5188,3464,5569,3627,5708,6524,5406,5165,4677,4492,6312,4872,4851,5885,4468,5996,6313,5709,5710,6128,2470,5886,6314,5293,4882,5785,3325,5461,5101,6129,5711,5786,6525,4906,6526,6527,4418,5887,5712,4808,2907,3701,5713,5888,6528,3765,5636,5331,6529,6530,3593,5889,3637,4943,3692,5714,5787,4925,6315,6130,5462,4405,6131,6132,6316,5262,6531,6532,5715,3859,5716,5070,4696,5102,3929,5788,3987,4792,5997,6533,6534,3920,4809,5E3,5998, -6535,2974,5370,6317,5189,5263,5717,3826,6536,3953,5001,4883,3190,5463,5890,4973,5999,4741,6133,6134,3607,5570,6E3,4711,3362,3630,4552,5041,6318,6001,2950,2953,5637,4646,5371,4944,6002,2044,4120,3429,6319,6537,5103,4833,6538,6539,4884,4647,3884,6003,6004,4758,3835,5220,5789,4565,5407,6540,6135,5294,4697,4852,6320,6321,3206,4907,6541,6322,4945,6542,6136,6543,6323,6005,4631,3519,6544,5891,6545,5464,3784,5221,6546,5571,4659,6547,6324,6137,5190,6548,3853,6549,4016,4834,3954,6138,5332,3827,4017,3210,3546, -4469,5408,5718,3505,4648,5790,5131,5638,5791,5465,4727,4318,6325,6326,5792,4553,4010,4698,3439,4974,3638,4335,3085,6006,5104,5042,5166,5892,5572,6327,4356,4519,5222,5573,5333,5793,5043,6550,5639,5071,4503,6328,6139,6551,6140,3914,3901,5372,6007,5640,4728,4793,3976,3836,4885,6552,4127,6553,4451,4102,5002,6554,3686,5105,6555,5191,5072,5295,4611,5794,5296,6556,5893,5264,5894,4975,5466,5265,4699,4976,4370,4056,3492,5044,4886,6557,5795,4432,4769,4357,5467,3940,4660,4290,6141,4484,4770,4661,3992,6329,4025, -4662,5022,4632,4835,4070,5297,4663,4596,5574,5132,5409,5895,6142,4504,5192,4664,5796,5896,3885,5575,5797,5023,4810,5798,3732,5223,4712,5298,4084,5334,5468,6143,4052,4053,4336,4977,4794,6558,5335,4908,5576,5224,4233,5024,4128,5469,5225,4873,6008,5045,4729,4742,4633,3675,4597,6559,5897,5133,5577,5003,5641,5719,6330,6560,3017,2382,3854,4406,4811,6331,4393,3964,4946,6561,2420,3722,6562,4926,4378,3247,1736,4442,6332,5134,6333,5226,3996,2918,5470,4319,4003,4598,4743,4744,4485,3785,3902,5167,5004,5373,4394, -5898,6144,4874,1793,3997,6334,4085,4214,5106,5642,4909,5799,6009,4419,4189,3330,5899,4165,4420,5299,5720,5227,3347,6145,4081,6335,2876,3930,6146,3293,3786,3910,3998,5900,5300,5578,2840,6563,5901,5579,6147,3531,5374,6564,6565,5580,4759,5375,6566,6148,3559,5643,6336,6010,5517,6337,6338,5721,5902,3873,6011,6339,6567,5518,3868,3649,5722,6568,4771,4947,6569,6149,4812,6570,2853,5471,6340,6341,5644,4795,6342,6012,5723,6343,5724,6013,4349,6344,3160,6150,5193,4599,4514,4493,5168,4320,6345,4927,3666,4745,5169, -5903,5005,4928,6346,5725,6014,4730,4203,5046,4948,3395,5170,6015,4150,6016,5726,5519,6347,5047,3550,6151,6348,4197,4310,5904,6571,5581,2965,6152,4978,3960,4291,5135,6572,5301,5727,4129,4026,5905,4853,5728,5472,6153,6349,4533,2700,4505,5336,4678,3583,5073,2994,4486,3043,4554,5520,6350,6017,5800,4487,6351,3931,4103,5376,6352,4011,4321,4311,4190,5136,6018,3988,3233,4350,5906,5645,4198,6573,5107,3432,4191,3435,5582,6574,4139,5410,6353,5411,3944,5583,5074,3198,6575,6354,4358,6576,5302,4600,5584,5194,5412, -6577,6578,5585,5413,5303,4248,5414,3879,4433,6579,4479,5025,4854,5415,6355,4760,4772,3683,2978,4700,3797,4452,3965,3932,3721,4910,5801,6580,5195,3551,5907,3221,3471,3029,6019,3999,5908,5909,5266,5267,3444,3023,3828,3170,4796,5646,4979,4259,6356,5647,5337,3694,6357,5648,5338,4520,4322,5802,3031,3759,4071,6020,5586,4836,4386,5048,6581,3571,4679,4174,4949,6154,4813,3787,3402,3822,3958,3215,3552,5268,4387,3933,4950,4359,6021,5910,5075,3579,6358,4234,4566,5521,6359,3613,5049,6022,5911,3375,3702,3178,4911, -5339,4521,6582,6583,4395,3087,3811,5377,6023,6360,6155,4027,5171,5649,4421,4249,2804,6584,2270,6585,4E3,4235,3045,6156,5137,5729,4140,4312,3886,6361,4330,6157,4215,6158,3500,3676,4929,4331,3713,4930,5912,4265,3776,3368,5587,4470,4855,3038,4980,3631,6159,6160,4132,4680,6161,6362,3923,4379,5588,4255,6586,4121,6587,6363,4649,6364,3288,4773,4774,6162,6024,6365,3543,6588,4274,3107,3737,5050,5803,4797,4522,5589,5051,5730,3714,4887,5378,4001,4523,6163,5026,5522,4701,4175,2791,3760,6589,5473,4224,4133,3847, -4814,4815,4775,3259,5416,6590,2738,6164,6025,5304,3733,5076,5650,4816,5590,6591,6165,6592,3934,5269,6593,3396,5340,6594,5804,3445,3602,4042,4488,5731,5732,3525,5591,4601,5196,6166,6026,5172,3642,4612,3202,4506,4798,6366,3818,5108,4303,5138,5139,4776,3332,4304,2915,3415,4434,5077,5109,4856,2879,5305,4817,6595,5913,3104,3144,3903,4634,5341,3133,5110,5651,5805,6167,4057,5592,2945,4371,5593,6596,3474,4182,6367,6597,6168,4507,4279,6598,2822,6599,4777,4713,5594,3829,6169,3887,5417,6170,3653,5474,6368,4216, -2971,5228,3790,4579,6369,5733,6600,6601,4951,4746,4555,6602,5418,5475,6027,3400,4665,5806,6171,4799,6028,5052,6172,3343,4800,4747,5006,6370,4556,4217,5476,4396,5229,5379,5477,3839,5914,5652,5807,4714,3068,4635,5808,6173,5342,4192,5078,5419,5523,5734,6174,4557,6175,4602,6371,6176,6603,5809,6372,5735,4260,3869,5111,5230,6029,5112,6177,3126,4681,5524,5915,2706,3563,4748,3130,6178,4018,5525,6604,6605,5478,4012,4837,6606,4534,4193,5810,4857,3615,5479,6030,4082,3697,3539,4086,5270,3662,4508,4931,5916,4912, -5811,5027,3888,6607,4397,3527,3302,3798,2775,2921,2637,3966,4122,4388,4028,4054,1633,4858,5079,3024,5007,3982,3412,5736,6608,3426,3236,5595,3030,6179,3427,3336,3279,3110,6373,3874,3039,5080,5917,5140,4489,3119,6374,5812,3405,4494,6031,4666,4141,6180,4166,6032,5813,4981,6609,5081,4422,4982,4112,3915,5653,3296,3983,6375,4266,4410,5654,6610,6181,3436,5082,6611,5380,6033,3819,5596,4535,5231,5306,5113,6612,4952,5918,4275,3113,6613,6376,6182,6183,5814,3073,4731,4838,5008,3831,6614,4888,3090,3848,4280,5526, -5232,3014,5655,5009,5737,5420,5527,6615,5815,5343,5173,5381,4818,6616,3151,4953,6617,5738,2796,3204,4360,2989,4281,5739,5174,5421,5197,3132,5141,3849,5142,5528,5083,3799,3904,4839,5480,2880,4495,3448,6377,6184,5271,5919,3771,3193,6034,6035,5920,5010,6036,5597,6037,6378,6038,3106,5422,6618,5423,5424,4142,6619,4889,5084,4890,4313,5740,6620,3437,5175,5307,5816,4199,5198,5529,5817,5199,5656,4913,5028,5344,3850,6185,2955,5272,5011,5818,4567,4580,5029,5921,3616,5233,6621,6622,6186,4176,6039,6379,6380,3352, -5200,5273,2908,5598,5234,3837,5308,6623,6624,5819,4496,4323,5309,5201,6625,6626,4983,3194,3838,4167,5530,5922,5274,6381,6382,3860,3861,5599,3333,4292,4509,6383,3553,5481,5820,5531,4778,6187,3955,3956,4324,4389,4218,3945,4325,3397,2681,5923,4779,5085,4019,5482,4891,5382,5383,6040,4682,3425,5275,4094,6627,5310,3015,5483,5657,4398,5924,3168,4819,6628,5925,6629,5532,4932,4613,6041,6630,4636,6384,4780,4204,5658,4423,5821,3989,4683,5822,6385,4954,6631,5345,6188,5425,5012,5384,3894,6386,4490,4104,6632,5741, -5053,6633,5823,5926,5659,5660,5927,6634,5235,5742,5824,4840,4933,4820,6387,4859,5928,4955,6388,4143,3584,5825,5346,5013,6635,5661,6389,5014,5484,5743,4337,5176,5662,6390,2836,6391,3268,6392,6636,6042,5236,6637,4158,6638,5744,5663,4471,5347,3663,4123,5143,4293,3895,6639,6640,5311,5929,5826,3800,6189,6393,6190,5664,5348,3554,3594,4749,4603,6641,5385,4801,6043,5827,4183,6642,5312,5426,4761,6394,5665,6191,4715,2669,6643,6644,5533,3185,5427,5086,5930,5931,5386,6192,6044,6645,4781,4013,5745,4282,4435,5534, -4390,4267,6045,5746,4984,6046,2743,6193,3501,4087,5485,5932,5428,4184,4095,5747,4061,5054,3058,3862,5933,5600,6646,5144,3618,6395,3131,5055,5313,6396,4650,4956,3855,6194,3896,5202,4985,4029,4225,6195,6647,5828,5486,5829,3589,3002,6648,6397,4782,5276,6649,6196,6650,4105,3803,4043,5237,5830,6398,4096,3643,6399,3528,6651,4453,3315,4637,6652,3984,6197,5535,3182,3339,6653,3096,2660,6400,6654,3449,5934,4250,4236,6047,6401,5831,6655,5487,3753,4062,5832,6198,6199,6656,3766,6657,3403,4667,6048,6658,4338,2897, -5833,3880,2797,3780,4326,6659,5748,5015,6660,5387,4351,5601,4411,6661,3654,4424,5935,4339,4072,5277,4568,5536,6402,6662,5238,6663,5349,5203,6200,5204,6201,5145,4536,5016,5056,4762,5834,4399,4957,6202,6403,5666,5749,6664,4340,6665,5936,5177,5667,6666,6667,3459,4668,6404,6668,6669,4543,6203,6670,4276,6405,4480,5537,6671,4614,5205,5668,6672,3348,2193,4763,6406,6204,5937,5602,4177,5669,3419,6673,4020,6205,4443,4569,5388,3715,3639,6407,6049,4058,6206,6674,5938,4544,6050,4185,4294,4841,4651,4615,5488,6207, -6408,6051,5178,3241,3509,5835,6208,4958,5836,4341,5489,5278,6209,2823,5538,5350,5206,5429,6675,4638,4875,4073,3516,4684,4914,4860,5939,5603,5389,6052,5057,3237,5490,3791,6676,6409,6677,4821,4915,4106,5351,5058,4243,5539,4244,5604,4842,4916,5239,3028,3716,5837,5114,5605,5390,5940,5430,6210,4332,6678,5540,4732,3667,3840,6053,4305,3408,5670,5541,6410,2744,5240,5750,6679,3234,5606,6680,5607,5671,3608,4283,4159,4400,5352,4783,6681,6411,6682,4491,4802,6211,6412,5941,6413,6414,5542,5751,6683,4669,3734,5942, -6684,6415,5943,5059,3328,4670,4144,4268,6685,6686,6687,6688,4372,3603,6689,5944,5491,4373,3440,6416,5543,4784,4822,5608,3792,4616,5838,5672,3514,5391,6417,4892,6690,4639,6691,6054,5673,5839,6055,6692,6056,5392,6212,4038,5544,5674,4497,6057,6693,5840,4284,5675,4021,4545,5609,6418,4454,6419,6213,4113,4472,5314,3738,5087,5279,4074,5610,4959,4063,3179,4750,6058,6420,6214,3476,4498,4716,5431,4960,4685,6215,5241,6694,6421,6216,6695,5841,5945,6422,3748,5946,5179,3905,5752,5545,5947,4374,6217,4455,6423,4412, -6218,4803,5353,6696,3832,5280,6219,4327,4702,6220,6221,6059,4652,5432,6424,3749,4751,6425,5753,4986,5393,4917,5948,5030,5754,4861,4733,6426,4703,6697,6222,4671,5949,4546,4961,5180,6223,5031,3316,5281,6698,4862,4295,4934,5207,3644,6427,5842,5950,6428,6429,4570,5843,5282,6430,6224,5088,3239,6060,6699,5844,5755,6061,6431,2701,5546,6432,5115,5676,4039,3993,3327,4752,4425,5315,6433,3941,6434,5677,4617,4604,3074,4581,6225,5433,6435,6226,6062,4823,5756,5116,6227,3717,5678,4717,5845,6436,5679,5846,6063,5847, -6064,3977,3354,6437,3863,5117,6228,5547,5394,4499,4524,6229,4605,6230,4306,4500,6700,5951,6065,3693,5952,5089,4366,4918,6701,6231,5548,6232,6702,6438,4704,5434,6703,6704,5953,4168,6705,5680,3420,6706,5242,4407,6066,3812,5757,5090,5954,4672,4525,3481,5681,4618,5395,5354,5316,5955,6439,4962,6707,4526,6440,3465,4673,6067,6441,5682,6708,5435,5492,5758,5683,4619,4571,4674,4804,4893,4686,5493,4753,6233,6068,4269,6442,6234,5032,4705,5146,5243,5208,5848,6235,6443,4963,5033,4640,4226,6236,5849,3387,6444,6445, -4436,4437,5850,4843,5494,4785,4894,6709,4361,6710,5091,5956,3331,6237,4987,5549,6069,6711,4342,3517,4473,5317,6070,6712,6071,4706,6446,5017,5355,6713,6714,4988,5436,6447,4734,5759,6715,4735,4547,4456,4754,6448,5851,6449,6450,3547,5852,5318,6451,6452,5092,4205,6716,6238,4620,4219,5611,6239,6072,4481,5760,5957,5958,4059,6240,6453,4227,4537,6241,5761,4030,4186,5244,5209,3761,4457,4876,3337,5495,5181,6242,5959,5319,5612,5684,5853,3493,5854,6073,4169,5613,5147,4895,6074,5210,6717,5182,6718,3830,6243,2798, -3841,6075,6244,5855,5614,3604,4606,5496,5685,5118,5356,6719,6454,5960,5357,5961,6720,4145,3935,4621,5119,5962,4261,6721,6455,4786,5963,4375,4582,6245,6246,6247,6076,5437,4877,5856,3376,4380,6248,4160,6722,5148,6456,5211,6457,6723,4718,6458,6724,6249,5358,4044,3297,6459,6250,5857,5615,5497,5245,6460,5498,6725,6251,6252,5550,3793,5499,2959,5396,6461,6462,4572,5093,5500,5964,3806,4146,6463,4426,5762,5858,6077,6253,4755,3967,4220,5965,6254,4989,5501,6464,4352,6726,6078,4764,2290,5246,3906,5438,5283,3767, -4964,2861,5763,5094,6255,6256,4622,5616,5859,5860,4707,6727,4285,4708,4824,5617,6257,5551,4787,5212,4965,4935,4687,6465,6728,6466,5686,6079,3494,4413,2995,5247,5966,5618,6729,5967,5764,5765,5687,5502,6730,6731,6080,5397,6467,4990,6258,6732,4538,5060,5619,6733,4719,5688,5439,5018,5149,5284,5503,6734,6081,4607,6259,5120,3645,5861,4583,6260,4584,4675,5620,4098,5440,6261,4863,2379,3306,4585,5552,5689,4586,5285,6735,4864,6736,5286,6082,6737,4623,3010,4788,4381,4558,5621,4587,4896,3698,3161,5248,4353,4045, -6262,3754,5183,4588,6738,6263,6739,6740,5622,3936,6741,6468,6742,6264,5095,6469,4991,5968,6743,4992,6744,6083,4897,6745,4256,5766,4307,3108,3968,4444,5287,3889,4343,6084,4510,6085,4559,6086,4898,5969,6746,5623,5061,4919,5249,5250,5504,5441,6265,5320,4878,3242,5862,5251,3428,6087,6747,4237,5624,5442,6266,5553,4539,6748,2585,3533,5398,4262,6088,5150,4736,4438,6089,6267,5505,4966,6749,6268,6750,6269,5288,5554,3650,6090,6091,4624,6092,5690,6751,5863,4270,5691,4277,5555,5864,6752,5692,4720,4865,6470,5151, -4688,4825,6753,3094,6754,6471,3235,4653,6755,5213,5399,6756,3201,4589,5865,4967,6472,5866,6473,5019,3016,6757,5321,4756,3957,4573,6093,4993,5767,4721,6474,6758,5625,6759,4458,6475,6270,6760,5556,4994,5214,5252,6271,3875,5768,6094,5034,5506,4376,5769,6761,2120,6476,5253,5770,6762,5771,5970,3990,5971,5557,5558,5772,6477,6095,2787,4641,5972,5121,6096,6097,6272,6763,3703,5867,5507,6273,4206,6274,4789,6098,6764,3619,3646,3833,3804,2394,3788,4936,3978,4866,4899,6099,6100,5559,6478,6765,3599,5868,6101,5869, -5870,6275,6766,4527,6767];!0},{"./init":20}],17:[function(b,a,d){!function(a){a.GB2312Prober=function(){a.MultiByteCharSetProber.apply(this);this.getCharsetName=function(){return"GB2312"};this._mCodingSM=new a.CodingStateMachine(a.GB2312SMModel);this._mDistributionAnalyzer=new a.GB2312DistributionAnalysis;this.reset()};a.GB2312Prober.prototype=new a.MultiByteCharSetProber}(b("./init"))},{"./init":20}],18:[function(b,a,d){!function(a){a.HebrewProber=function(){a.CharSetProber.apply(this);this.reset= -function(){this._mFinalCharVisualScore=this._mFinalCharLogicalScore=0;this._mBeforePrev=this._mPrev=" "};this.setModelProbers=function(a,b){this._mLogicalProber=a;this._mVisualProber=b};this.isFinal=function(a){return-1!=["\u00ea","\u00ed","\u00ef","\u00f3","\u00f5"].indexOf(a)};this.isNonFinal=function(a){return-1!=["\u00eb","\u00ee","\u00f0","\u00f4"].indexOf(a)};this.feed=function(b){if(this.getState()==a.Constants.notMe)return a.Constants.notMe;b=this.filterHighBitOnly(b);for(var f=0,c;f=a)return"ISO-8859-8";var b=this._mLogicalProber.getConfidence()- -this._mVisualProber.getConfidence();return.01b||0>a?"ISO-8859-8":"windows-1255"};this.getState=function(){return this._mLogicalProber.getState()==a.Constants.notMe&&this._mVisualProber.getState()==a.Constants.notMe?a.Constants.notMe:a.Constants.detecting};this._mVisualProber=this._mLogicalProber=null;this.reset()};a.HebrewProber.prototype=new a.CharSetProber;Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){var h=this.length>>>0,e=Number(b)||0,e=0>e?Math.ceil(e): -Math.floor(e);for(0>e&&(e+=h);ea;this._mRelSample[a++]=0);this._mNeedToSkipCharNum=0;this._mLastCharOrder=-1;this._mDone=!1};this.feed=function(b,f){if(!this._mDone)for(var c= -this._mNeedToSkipCharNum;cf)this._mNeedToSkipCharNum=c-f,this._mLastCharOrder=-1;else{if(-1!=d&&-1!=this._mLastCharOrder){this._mTotalRel+=1;if(1E3=a.charCodeAt(0)||224<=a.charCodeAt(0)&&252>=a.charCodeAt(0)?2:1;return 1=a.charCodeAt(0)?[a.charCodeAt(1)-159,b]:[-1,b]}};a.SJISContextAnalysis.prototype=new a.JapaneseContextAnalysis;a.EUCJPContextAnalysis=function(){this.getOrder=function(a){if(!a)return[-1,1];var b=142<= -a.charCodeAt(0)||161<=a.charCodeAt(0)&&254>=a.charCodeAt(0)?2:143==a.charCodeAt(0)?3:1;return 1=a.charCodeAt(1)?[a.charCodeAt(1)-161,b]:[-1,b]}};a.EUCJPContextAnalysis.prototype=new a.JapaneseContextAnalysis}(b("./init"))},{"./init":20}],23:[function(b,a,d){b=b("./init");b.Latin5_BulgarianCharToOrderMap=[255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,253,253, -253,253,253,253,253,253,253,253,253,253,253,253,253,253,252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,253,77,90,99,100,72,109,107,101,79,185,81,102,76,94,82,110,186,108,91,74,119,84,96,111,187,115,253,253,253,253,253,253,65,69,70,66,63,68,112,103,92,194,104,95,86,87,71,116,195,85,93,97,113,196,197,198,199,200,253,253,253,253,253,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,81,226,227,228,229,230,105, -231,232,233,234,235,236,45,237,238,31,32,35,43,37,44,55,47,40,59,33,46,38,36,41,30,39,28,34,51,48,49,53,50,54,57,61,239,67,240,60,56,1,18,9,20,11,3,23,15,2,26,12,10,14,6,4,13,7,8,5,19,29,25,22,21,27,24,17,75,52,241,42,16,62,242,243,244,58,245,98,246,247,248,249,250,251,91,252,253];b.win1251BulgarianCharToOrderMap=[255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253, -253,252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,253,77,90,99,100,72,109,107,101,79,185,81,102,76,94,82,110,186,108,91,74,119,84,96,111,187,115,253,253,253,253,253,253,65,69,70,66,63,68,112,103,92,194,104,95,86,87,71,116,195,85,93,97,113,196,197,198,199,200,253,253,253,253,253,206,207,208,209,210,211,212,213,120,214,215,216,217,218,219,220,221,78,64,83,121,98,117,105,222,223,224,225,226,227,228,229,88,230,231,232,233,122,89,106,234,235,236,237,238,45,239,240,73,80,118,114,241,242, -243,244,245,62,58,246,247,248,249,250,31,32,35,43,37,44,55,47,40,59,33,46,38,36,41,30,39,28,34,51,48,49,53,50,54,57,61,251,67,252,60,56,1,18,9,20,11,3,23,15,2,26,12,10,14,6,4,13,7,8,5,19,29,25,22,21,27,24,17,75,52,253,42,16];b.BulgarianLangModel=[0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,3,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,charsetName:"ISO-8859-5"};b.Win1251BulgarianModel={charToOrderMap:b.win1251BulgarianCharToOrderMap,precedenceMatrix:b.BulgarianLangModel,mTypicalPositiveRatio:.969392,keepEnglishLetter:!1,charsetName:"windows-1251"};!0},{"./init":20}],24:[function(b,a,d){b=b("./init");b.KOI8R_CharToOrderMap=[255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,253,253,253,253,253,253,253,253, -253,253,253,253,253,253,253,253,252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,253,142,143,144,145,146,147,148,149,150,151,152,74,153,75,154,155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253,253,71,172,66,173,65,174,76,175,64,176,177,77,72,178,69,67,179,78,73,180,181,79,182,183,184,185,253,253,253,253,253,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,68,226,227,228,229,230, -231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,27,3,21,28,13,2,39,19,26,4,23,11,8,12,5,1,15,16,9,7,6,14,24,10,17,18,20,25,30,29,22,54,59,37,44,58,41,48,53,46,55,42,60,36,49,38,31,34,35,43,45,32,40,52,56,33,61,62,51,57,47,63,50,70];b.win1251_CharToOrderMap=[255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,252,252, -252,252,252,252,252,252,252,252,253,253,253,253,253,253,253,142,143,144,145,146,147,148,149,150,151,152,74,153,75,154,155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253,253,71,172,66,173,65,174,76,175,64,176,177,77,72,178,69,67,179,78,73,180,181,79,182,183,184,185,253,253,253,253,253,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241, -242,243,244,245,246,68,247,248,249,250,251,252,253,37,44,33,46,41,48,56,51,42,60,36,49,38,31,34,35,45,32,40,52,53,55,58,50,57,63,70,62,61,47,59,43,3,21,10,19,13,2,24,20,4,23,11,8,12,5,1,15,9,7,6,14,39,26,28,22,25,29,54,18,17,30,27,16];b.latin5_CharToOrderMap=[255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,252,252,252,252,252,252,252,252,252,252,253,253,253, -253,253,253,253,142,143,144,145,146,147,148,149,150,151,152,74,153,75,154,155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253,253,71,172,66,173,65,174,76,175,64,176,177,77,72,178,69,67,179,78,73,180,181,79,182,183,184,185,253,253,253,253,253,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,37,44,33,46,41,48,56,51,42,60,36,49,38,31,34,35,45,32,40, -52,53,55,58,50,57,63,70,62,61,47,59,43,3,21,10,19,13,2,24,20,4,23,11,8,12,5,1,15,9,7,6,14,39,26,28,22,25,29,54,18,17,30,27,16,239,68,240,241,242,243,244,245,246,247,248,249,250,251,252,255];b.macCyrillic_CharToOrderMap=[255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,253,142,143,144,145,146,147, -148,149,150,151,152,74,153,75,154,155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253,253,71,172,66,173,65,174,76,175,64,176,177,77,72,178,69,67,179,78,73,180,181,79,182,183,184,185,253,253,253,253,253,37,44,33,46,41,48,56,51,42,60,36,49,38,31,34,35,45,32,40,52,53,55,58,50,57,63,70,62,61,47,59,43,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238, -239,240,241,242,243,244,245,246,247,248,249,250,251,252,68,16,3,21,10,19,13,2,24,20,4,23,11,8,12,5,1,15,9,7,6,14,39,26,28,22,25,29,54,18,17,30,27,255];b.IBM855_CharToOrderMap=[255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,253,142,143,144,145,146,147,148,149,150,151,152,74,153,75,154,155,156, -157,158,159,160,161,162,163,164,165,253,253,253,253,253,253,71,172,66,173,65,174,76,175,64,176,177,77,72,178,69,67,179,78,73,180,181,79,182,183,184,185,253,253,253,253,253,191,192,193,194,68,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,27,59,54,70,3,37,21,44,28,58,13,41,2,48,39,53,19,46,218,219,220,221,222,223,224,26,55,4,42,225,226,227,228,23,60,229,230,231,232,233,234,235,11,36,236,237,238,239,240,241,242,243,8,49,12,38,5,31,1,34,15,244,245,246,247, -35,16,248,43,9,45,7,32,6,40,14,52,24,56,10,33,17,61,249,250,18,62,20,51,25,57,30,47,29,63,22,50,251,252,255];b.IBM866_CharToOrderMap=[255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,253,142,143,144,145,146,147,148,149,150,151,152,74,153,75,154,155,156,157,158,159,160,161,162,163,164,165,253,253, -253,253,253,253,71,172,66,173,65,174,76,175,64,176,177,77,72,178,69,67,179,78,73,180,181,79,182,183,184,185,253,253,253,253,253,37,44,33,46,41,48,56,51,42,60,36,49,38,31,34,35,45,32,40,52,53,55,58,50,57,63,70,62,61,47,59,43,3,21,10,19,13,2,24,20,4,23,11,8,12,5,1,15,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,9,7,6,14,39,26,28,22,25,29,54,18,17,30,27,16, -239,68,240,241,242,243,244,245,246,247,248,249,250,251,252,255];b.RussianLangModel=[0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,3,3,3,3,1,3,3,3,2,3,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,2,2,2,2,2,0,0,2,3,3,3,2,3,3,3,3,3,3,3,3,3,3,2,3,3,0,0,3,3,3,3,3,3,3,3,3,2,3,2,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,2,2,3,3,3,3,3,3,3,3,3,2,3,3,0,0,3,3,3,3,3,3,3,3,2,3,3,1,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,2,3,2,3,3,3,3,3,3,3,3,3,3,3,3,3, -0,0,3,3,3,3,3,3,3,3,3,3,3,2,1,0,0,0,0,0,0,0,2,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,0,0,3,3,3,3,3,3,3,3,3,3,3,2,1,0,0,0,0,0,1,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3,3,3,2,2,2,3,1,3,3,1,3,3,3,3,2,2,3,0,2,2,2,3,3,2,1,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,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0,0,1,0,0,0,0,1,0,0,0,1,0,1,0,0,0,0,1,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,1,1,0,1,0,1,0,0,0,0,1,1,0,1,1,0,0,0,0,0,1,0,1,1,0,1,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0];b.Koi8rModel={charToOrderMap:b.KOI8R_CharToOrderMap,precedenceMatrix:b.RussianLangModel,mTypicalPositiveRatio:.976601,keepEnglishLetter:!1,charsetName:"KOI8-R"};b.Win1251CyrillicModel={charToOrderMap:b.win1251_CharToOrderMap,precedenceMatrix:b.RussianLangModel, -mTypicalPositiveRatio:.976601,keepEnglishLetter:!1,charsetName:"windows-1251"};b.Latin5CyrillicModel={charToOrderMap:b.latin5_CharToOrderMap,precedenceMatrix:b.RussianLangModel,mTypicalPositiveRatio:.976601,keepEnglishLetter:!1,charsetName:"ISO-8859-5"};b.MacCyrillicModel={charToOrderMap:b.macCyrillic_CharToOrderMap,precedenceMatrix:b.RussianLangModel,mTypicalPositiveRatio:.976601,keepEnglishLetter:!1,charsetName:"MacCyrillic"};b.Ibm866Model={charToOrderMap:b.IBM866_CharToOrderMap,precedenceMatrix:b.RussianLangModel, -mTypicalPositiveRatio:.976601,keepEnglishLetter:!1,charsetName:"IBM866"};b.Ibm855Model={charToOrderMap:b.IBM855_CharToOrderMap,precedenceMatrix:b.RussianLangModel,mTypicalPositiveRatio:.976601,keepEnglishLetter:!1,charsetName:"IBM855"};!0},{"./init":20}],25:[function(b,a,d){b=b("./init");b.Latin7_CharToOrderMap=[255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253, -253,252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,253,82,100,104,94,98,101,116,102,111,187,117,92,88,113,85,79,118,105,83,67,114,119,95,99,109,188,253,253,253,253,253,253,72,70,80,81,60,96,93,89,68,120,97,77,86,69,55,78,115,65,66,58,76,106,103,87,107,112,253,253,253,253,253,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,253,233,90,253,253,253,253,253,253,253,253,253,253,74,253,253,253,253,253,253,247, -248,61,36,46,71,73,253,54,253,108,123,110,31,51,43,41,34,91,40,52,47,44,53,38,49,59,39,35,48,250,37,33,45,56,50,84,57,120,121,17,18,22,15,124,1,29,20,21,3,32,13,25,5,11,16,10,6,30,4,9,8,14,7,2,12,28,23,42,24,64,75,19,26,27,253];b.win1253_CharToOrderMap=[255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,252,252,252,252,252,252,252,252,252,252,253,253,253,253, -253,253,253,82,100,104,94,98,101,116,102,111,187,117,92,88,113,85,79,118,105,83,67,114,119,95,99,109,188,253,253,253,253,253,253,72,70,80,81,60,96,93,89,68,120,97,77,86,69,55,78,115,65,66,58,76,106,103,87,107,112,253,253,253,253,253,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,253,233,61,253,253,253,253,253,253,253,253,253,253,74,253,253,253,253,253,253,247,253,253,36,46,71,73,253,54,253,108,123,110,31,51,43,41,34, -91,40,52,47,44,53,38,49,59,39,35,48,250,37,33,45,56,50,84,57,120,121,17,18,22,15,124,1,29,20,21,3,32,13,25,5,11,16,10,6,30,4,9,8,14,7,2,12,28,23,42,24,64,75,19,26,27,253];b.GreekLangModel=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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b.GreekLangModel,mTypicalPositiveRatio:.982851,keepEnglishLetter:!1,charsetName:"ISO-8859-7"}; -b.Win1253GreekModel={charToOrderMap:b.win1253_CharToOrderMap,precedenceMatrix:b.GreekLangModel,mTypicalPositiveRatio:.982851,keepEnglishLetter:!1,charsetName:"windows-1253"};!0},{"./init":20}],26:[function(b,a,d){b=b("./init");b.win1255_CharToOrderMap=[255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,252,252,252,252,252,252,252,252,252,252,253,253,253,253, -253,253,253,69,91,79,80,92,89,97,90,68,111,112,82,73,95,85,78,121,86,71,67,102,107,84,114,103,115,253,253,253,253,253,253,50,74,60,61,42,76,70,64,53,105,93,56,65,54,49,66,110,51,43,44,63,81,77,98,75,108,253,253,253,253,253,124,202,203,204,205,40,58,206,207,208,209,210,211,212,213,214,215,83,52,47,46,72,32,94,216,113,217,109,218,219,220,221,34,116,222,118,100,223,224,117,119,104,125,225,226,87,99,227,106,122,123,228,55,229,230,101,231,232,120,233,48,39,57,234,30,59,41,88,33,37,36,31,29,35,235,62,28, -236,126,237,238,38,45,239,240,241,242,243,127,244,245,246,247,248,249,250,9,8,20,16,3,2,24,14,22,1,25,15,4,11,6,23,12,19,13,26,18,27,21,17,7,10,5,251,252,128,96,253];b.HebrewLangModel=[0,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,3,2,3,2,1,2,0,1,0,0,3,0,3,1,0,0,1,3,2,0,1,1,2,0,2,2,2,1,1,1,1,2,1,1,1,2,0,0,2,2,0,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,1,2,1,2,1,2,0,0,2,0,0,0,0,0,1,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,1,0,0,2,0,2,1,1,0,1,0,1,0,0,1,0,0,0,0,1,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,2,0,1,0,0,1,1,1,0,1,0,0,1,0,0,0,1,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,1,1,0,0,1,0,0,2,1,1,1,1,1,0,1,0,0,0,0,1,0,1,0,1,1,1,2,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,1,0,0,0,0,0,1,1,1,1,1,0,1,0,0,0,1,1,0,0];b.Win1255HebrewModel={charToOrderMap:b.win1255_CharToOrderMap,precedenceMatrix:b.HebrewLangModel,mTypicalPositiveRatio:.984004,keepEnglishLetter:!1,charsetName:"windows-1255"}; -!0},{"./init":20}],27:[function(b,a,d){b=b("./init");b.Latin2_HungarianCharToOrderMap=[255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,253,28,40,54,45,32,50,49,38,39,53,36,41,34,35,47,46,71,43,33,37,57,48,64,68,55,52,253,253,253,253,253,253,2,18,26,17,1,27,12,20,9,22,7,6,13,4,8,23,67,10,5,3,21, -19,65,62,16,11,253,253,253,253,253,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,75,198,199,200,201,202,203,204,205,79,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,51,81,222,78,223,224,225,226,44,227,228,229,61,230,231,232,233,234,58,235,66,59,236,237,238,60,69,63,239,240,241,82,14,74,242,70,80,243,72,244,15,83,77,84,30,76,85,245,246,247,25,73,42,24,248,249,250,31,56,29, -251,252,253];b.win1250HungarianCharToOrderMap=[255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,253,28,40,54,45,32,50,49,38,39,53,36,41,34,35,47,46,72,43,33,37,57,48,64,68,55,52,253,253,253,253,253,253,2,18,26,17,1,27,12,20,9,22,7,6,13,4,8,23,67,10,5,3,21,19,65,62,16,11,253,253,253,253,253,161, -162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,78,181,69,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,76,198,199,200,201,202,203,204,205,81,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,51,83,222,80,223,224,225,226,44,227,228,229,61,230,231,232,233,234,58,235,66,59,236,237,238,60,70,63,239,240,241,84,14,75,242,71,82,243,73,244,15,85,79,86,30,77,87,245,246,247,25,74,42,24,248,249,250,31,56,29,251,252,253];b.HungarianLangModel=[0,3,3, -3,3,3,3,3,3,3,3,3,3,3,3,3,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,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EnglishLetter:!0,charsetName:"ISO-8859-2"};b.Win1250HungarianModel={charToOrderMap:b.win1250HungarianCharToOrderMap,precedenceMatrix:b.HungarianLangModel,mTypicalPositiveRatio:.947368,keepEnglishLetter:!0, -charsetName:"windows-1250"};!0},{"./init":20}],28:[function(b,a,d){b=b("./init");b.TIS620CharToOrderMap=[255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,253,182,106,107,100,183,184,185,101,94,186,187,108,109,110,111,188,189,190,89,95,112,113,191,192,193,194,253,253,253,253,253,253,64,72,73,114, -74,115,116,102,81,201,117,90,103,78,82,96,202,91,79,84,104,105,97,98,92,203,253,253,253,253,253,209,210,211,212,213,88,214,215,216,217,218,219,220,118,221,222,223,224,99,85,83,225,226,227,228,229,230,231,232,233,234,235,236,5,30,237,24,238,75,8,26,52,34,51,119,47,58,57,49,53,55,43,20,19,44,14,48,3,17,25,39,62,31,54,45,9,16,2,61,15,239,12,42,46,18,21,76,4,66,63,22,10,1,36,23,13,40,27,32,35,86,240,241,242,243,244,11,28,41,29,33,245,50,37,6,7,67,77,38,93,246,247,68,56,59,65,69,60,70,80,71,87,248,249, -250,251,252,253];b.ThaiLangModel=[0,1,3,3,3,3,0,0,3,3,0,3,3,0,3,3,3,3,3,3,3,3,0,0,3,3,3,0,3,3,3,3,0,3,3,0,0,0,1,3,0,3,3,2,3,3,0,1,2,3,3,3,3,0,2,0,2,0,0,3,2,1,2,2,3,0,3,3,2,3,0,0,3,3,0,3,3,0,3,3,3,3,3,3,3,3,3,0,3,2,3,0,2,2,2,3,0,2,3,0,0,0,0,1,0,1,2,3,1,1,3,2,2,0,1,1,0,0,1,0,0,0,0,0,0,0,1,1,3,3,3,2,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,3,3,2,3,2,3,3,2,2,2,3,1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2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,1,1,1,1,0,1,7,1,1,1,1,1,1,5,1,5,0,5,0,0,1,1,1,1,1,1,1,1,1,7,1,7,0,7,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,4,4,4,5,5,4,4,4,4,4,4,4,4,5,5,4,4,4,4,4,1,4,4,4,4,4,5,5,5,6,6,6,6,6,6,7,7,6,6,6,6,6,6,6,6,7,7,6,6,6,6,6,1,6,6,6,6,6,7,7,7];a.Latin1ClassModel=[0,0,0,0,0,0,0,0,0,3,3,3,3,3, -3,3,0,3,3,3,3,3,3,3,0,3,3,3,1,1,3,3,0,3,3,3,1,2,1,2,0,3,3,3,3,3,3,3,0,3,1,3,1,1,1,3,0,3,1,3,1,1,3,3];a.Latin1Prober=function(){a.CharSetProber.apply(this);this.reset=function(){this._mLastCharClass=a.OTH;this._mFreqCounter=[];for(var b=0;4>b;this._mFreqCounter[b++]=0);a.Latin1Prober.prototype.reset.apply(this)};this.getCharsetName=function(){return"windows-1252"};this.feed=function(b){b=this.filterWithEnglishLetters(b);for(var f=0;ff||(b=this._mFreqCounter[3]/f-20*this._mFreqCounter[1]/f);0>b&&(b=0);return.95*b};this.reset()};a.Latin1Prober.prototype=new a.CharSetProber}(b("./init"))},{"./init":20}],30:[function(b, -a,d){!function(a){a.MultiByteCharSetProber=function(){a.CharSetProber.apply(this);this.reset=function(){a.MultiByteCharSetProber.prototype.reset.apply(this);this._mCodingSM&&this._mCodingSM.reset();this._mDistributionAnalyzer&&this._mDistributionAnalyzer.reset();this._mLastChar="\x00\x00"};this.getCharsetName=function(){};this.feed=function(b){for(var f=b.length,c=0;ca.Constants.SHORTCUT_THRESHOLD&&(this._mState=a.Constants.foundIt); -return this.getState()};this.getConfidence=function(){return this._mDistributionAnalyzer.getConfidence()}};a.MultiByteCharSetProber.prototype=new a.CharSetProber}(b("./init"))},{"./init":20}],31:[function(b,a,d){!function(a){a.MBCSGroupProber=function(){a.CharSetGroupProber.apply(this);this._mProbers=[new a.UTF8Prober,new a.SJISProber,new a.EUCJPProber,new a.GB2312Prober,new a.EUCKRProber,new a.Big5Prober,new a.EUCTWProber];this.reset()};a.MBCSGroupProber.prototype=new a.CharSetGroupProber}(b("./init"))}, -{"./init":20}],32:[function(b,a,d){b=b("./init");a=b.Constants;b.BIG5_cls=[1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, -3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0];b.BIG5_st=[a.error,a.start,a.start,3,a.error,a.error,a.error,a.error,a.error,a.error,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.error,a.error,a.start,a.start,a.start,a.start,a.start,a.start,a.start];b.Big5CharLenTable=[0,1,1,2,0];b.Big5SMModel={classTable:b.BIG5_cls,classFactor:5,stateTable:b.BIG5_st,charLenTable:b.Big5CharLenTable,name:"Big5"};b.EUCJP_cls=[4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,4,4,4,4,4,4,4,4,4,4,4,5, -4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,1,3,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5];b.EUCJP_st=[3,4,3,5,a.start,a.error,a.error, -a.error,a.error,a.error,a.error,a.error,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.start,a.error,a.start,a.error,a.error,a.error,a.error,a.error,a.start,a.error,a.error,a.error,3,a.error,3,a.error,a.error,a.error,a.start,a.start,a.start,a.start];b.EUCJPCharLenTable=[2,2,2,3,1,0];b.EUCJPSMModel={classTable:b.EUCJP_cls,classFactor:6,stateTable:b.EUCJP_st,charLenTable:b.EUCJPCharLenTable,name:"EUC-JP"};b.EUCKR_cls=[1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0];b.EUCKR_st=[a.error,a.start,3,a.error,a.error,a.error,a.error,a.error, -a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.error,a.error,a.start,a.start];b.EUCKRCharLenTable=[0,1,2,0];b.EUCKRSMModel={classTable:b.EUCKR_cls,classFactor:4,stateTable:b.EUCKR_st,charLenTable:b.EUCKRCharLenTable,name:"EUC-KR"};b.EUCTW_cls=[2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,2,2,2,2,2,2,2,2,2,2,2,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,4,4,4,4,4,5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0];b.EUCTW_st=[a.error,a.error,a.start,3,3,3,4,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.error,a.start,a.error,a.start,a.start,a.start,a.error,a.error,a.error,a.error,a.error,5,a.error,a.error, -a.error,a.start,a.error,a.start,a.start,a.start,a.error,a.start,a.start,a.start,a.start,a.start,a.start];b.EUCTWCharLenTable=[0,0,1,2,2,2,3];b.EUCTWSMModel={classTable:b.EUCTW_cls,classFactor:7,stateTable:b.EUCTW_st,charLenTable:b.EUCTWCharLenTable,name:"x-euc-tw"};b.GB2312_cls=[1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,4,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,0];b.GB2312_st=[a.error,a.start,a.start,a.start,a.start,a.start,3,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.error,a.error,a.start,4,a.error,a.start, -a.start,a.error,a.error,a.error,a.error,a.error,a.error,5,a.error,a.error,a.error,a.itsMe,a.error,a.error,a.error,a.start,a.start,a.start,a.start,a.start,a.start];b.GB2312CharLenTable=[0,1,1,1,1,1,2];b.GB2312SMModel={classTable:b.GB2312_cls,classFactor:7,stateTable:b.GB2312_st,charLenTable:b.GB2312CharLenTable,name:"GB2312"};b.SJIS_cls=[1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0];b.SJIS_st=[a.error,a.start,a.start,3,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.error, -a.error,a.start,a.start,a.start,a.start];b.SJISCharLenTable=[0,1,1,2,0,0];b.SJISSMModel={classTable:b.SJIS_cls,classFactor:6,stateTable:b.SJIS_st,charLenTable:b.SJISCharLenTable,name:"Shift_JIS"};b.UCS2BE_cls=[0,0,0,0,0,0,0,0,0,0,1,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,5];b.UCS2BE_st=[5,7,7,a.error,4,3,a.error,a.error,a.error,a.error,a.error,a.error,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,6,6,6,6,a.error,a.error,6,6,6,6,6,a.itsMe,6,6,6,6,6,6,5,7,7,a.error,5,8,6,6,a.error,6,6,6,6,6,6,6,a.error,a.error,a.start,a.start];b.UCS2BECharLenTable=[2, -2,2,0,2,2];b.UCS2BESMModel={classTable:b.UCS2BE_cls,classFactor:6,stateTable:b.UCS2BE_st,charLenTable:b.UCS2BECharLenTable,name:"UTF-16BE"};b.UCS2LE_cls=[0,0,0,0,0,0,0,0,0,0,1,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,5];b.UCS2LE_st=[6,6,7,6,4,3,a.error,a.error,a.error,a.error,a.error,a.error,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,5,5,5,a.error,a.itsMe,a.error,5,5,5,a.error,5,a.error,6,6,7,6,8,8,5,5,5,a.error,5,5,5,a.error,a.error,a.error,5,5,5,5,5,a.error,5,a.error,a.start,a.start];b.UCS2LECharLenTable=[2,2,2,2,2,2];b.UCS2LESMModel={classTable:b.UCS2LE_cls, -classFactor:6,stateTable:b.UCS2LE_st,charLenTable:b.UCS2LECharLenTable,name:"UTF-16LE"};b.UTF8_cls=[1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,6,6,6,6,6,6,6, -6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,8,8,8,8,8,8,8,8,8,8,8,8,9,8,8,10,11,11,11,11,11,11,11,12,13,13,13,14,15,0,0];b.UTF8_st=[a.error,a.start,a.error,a.error,a.error,a.error,12,10,9,11,8,7,6,5,4,3,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.error,a.error,5,5,5,5,a.error,a.error, -a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,5,5,5,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,7,7,7,7,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,7,7,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,9,9,9,9,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error, -a.error,a.error,a.error,a.error,9,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,12,12,12,12,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,12,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,12,12,12,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.start,a.start,a.start,a.start, -a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error];b.UTF8CharLenTable=[0,1,0,0,0,0,2,3,3,3,4,4,5,5,6,6];b.UTF8SMModel={classTable:b.UTF8_cls,classFactor:16,stateTable:b.UTF8_st,charLenTable:b.UTF8CharLenTable,name:"UTF-8"};!0},{"./init":20}],33:[function(b,a,d){!function(a){a.SingleByteCharSetProber=function(b,f,c){a.CharSetProber.apply(this);var e=this;this.reset=function(){a.SingleByteCharSetProber.prototype.reset.apply(this);this._mLastOrder=255;this._mSeqCounters= -[];for(var b=0;4>b;this._mSeqCounters[b++]=0);this._mFreqChar=this._mTotalChar=this._mTotalSeqs=0};this.getCharsetName=function(){return this._mNameProber?this._mNameProber.getCharsetName():this._mModel.charsetName};this.feed=function(b){this._mModel.keepEnglishLetter||(b=this.filterWithoutEnglishLetters(b));var c=b.length;if(!c)return this.getState();for(var f=0,d;fd&&this._mTotalChar++,64>d&&(this._mFreqChar++,64>this._mLastOrder&&(this._mTotalSeqs++, -this._mReversed?this._mSeqCounters[this._mModel.precedenceMatrix[64*d+this._mLastOrder]]++:this._mSeqCounters[this._mModel.precedenceMatrix[64*this._mLastOrder+d]]++)),this._mLastOrder=d;this.getState()==a.Constants.detecting&&1024b&&(a.Constants._debug&&a.log(this._mModel.charsetName+" confidence = "+b+", below negative shortcut threshhold 0.05\n"),this._mState= -a.Constants.notMe));return this.getState()};this.getConfidence=function(){var a=.01;0a.Constants.SHORTCUT_THRESHOLD&&(this._mState=a.Constants.foundIt);return this.getState()};this.getConfidence=function(){var a= -this._mContextAnalyzer.getConfidence(),b=this._mDistributionAnalyzer.getConfidence();return Math.max(a,b)};this._mCodingSM=new a.CodingStateMachine(a.SJISSMModel);this._mDistributionAnalyzer=new a.SJISDistributionAnalysis;this._mContextAnalyzer=new a.SJISContextAnalysis;this.reset()};a.SJISProber.prototype=new a.MultiByteCharSetProber}(b("./init"))},{"./init":20}],36:[function(b,a,d){!function(a){a.UniversalDetector=function(){var b=a.Constants.MINIMUM_THRESHOLD;this.reset=function(){this.result= -{encoding:null,confidence:0};this.done=!1;this._mStart=!0;this._mGotData=!1;this._mInputState=0;this._mBOM=this._mLastChar="";this._mEscCharsetProber&&this._mEscCharsetProber.reset();for(var a=0,b;b=this._mCharsetProbers[a];a++)b.reset()};this.feed=function(b){if(!this.done&&b.length)if(this._mGotData||(this._mBOM+=b,"\u00ef\u00bb\u00bf"==this._mBOM.slice(0,3)?this.result={encoding:"UTF-8",confidence:1}:"\u00ff\u00fe\x00\x00"==this._mBOM.slice(0,4)?this.result={encoding:"UTF-32LE",confidence:1}:"\x00\x00\u00fe\u00ff"== -this._mBOM.slice(0,4)?this.result={encoding:"UTF-32BE",confidence:1}:"\u00fe\u00ff\x00\x00"==this._mBOM.slice(0,4)?this.result={encoding:"X-ISO-10646-UCS-4-3412",confidence:1}:"\x00\x00\u00ff\u00fe"==this._mBOM.slice(0,4)?this.result={encoding:"X-ISO-10646-UCS-4-2143",confidence:1}:"\u00ff\u00fe"==this._mBOM.slice(0,2)?this.result={encoding:"UTF-16LE",confidence:1}:"\u00fe\u00ff"==this._mBOM.slice(0,2)&&(this.result={encoding:"UTF-16BE",confidence:1}),3c&&(c=f,e=g),a.Constants._debug&&a.log(g.getCharsetName()+" confidence "+g.getConfidence()));if(e&&c>b)return this.result={encoding:e.getCharsetName(),confidence:e.getConfidence()}}if(a.Constants._debug)for(a.log("no probers hit minimum threshhold\n"),d=0;g=this._mCharsetProbers[d];d++)g&&a.log(g.getCharsetName()+" confidence = "+g.getConfidence()+ -"\n")}};this._highBitDetector=/[\x80-\xFF]/;this._escDetector=/(\x1B|~\{)/;this._mEscCharsetProber=null;this._mCharsetProbers=[];this.reset()}}(b("./init"))},{"./init":20}],37:[function(b,a,d){!function(a){a.UTF8Prober=function(){a.CharSetProber.apply(this);this.reset=function(){a.UTF8Prober.prototype.reset.apply(this);this._mCodingSM.reset();this._mNumOfMBChar=0};this.getCharsetName=function(){return"UTF-8"};this.feed=function(b){for(var d=0,c;da.Constants.SHORTCUT_THRESHOLD&&(this._mState=a.Constants.foundIt);return this.getState()};this.getConfidence=function(){var a=.99;if(6>this._mNumOfMBChar){for(var b=0;bthis._mCharToFreqOrder[h]&&this._mFreqChars++)};this.getConfidence=function(){if(0>=this._mTotalChars||3>=this._mFreqChars)return.01;if(this._mTotalChars!=this._mFreqChars){var a=this._mFreqChars/((this._mTotalChars-this._mFreqChars)*this._mTypicalDistributionRatio); +if(.99>a)return a}return.99};this.gotEnoughData=function(){return 1024=a.charCodeAt(0))var b=188*(a.charCodeAt(0)-129);else if(224<=a.charCodeAt(0)&&239>=a.charCodeAt(0))b=188*(a.charCodeAt(0)-224+31);else return-1;b+=a.charCodeAt(1)-64;if(64>a.charCodeAt(1)||127===a.charCodeAt(1)||252=this._mActiveNum)){this._mState=a.Constants.notMe;break}}return this.getState()};this.getConfidence=function(){var b=this.getState();if(b==a.Constants.foundIt)return.99;if(b==a.Constants.notMe)return.01;b=0;this._mBestGuessProber=null;for(var f=0,c;c=this._mProbers[f];f++)if(c)if(c.active){var e=c.getConfidence();a.Constants._debug&&a.log(c.getCharsetName()+" confidence = "+e+"\n");b=this._mActiveSM)return this._mState=a.Constants.notMe,this.getState()}else if(m==a.Constants.itsMe)return this._mState=a.Constants.foundIt,this._mDetectedCharset=g.getCodingStateMachine(),this.getState()}}return this.getState()};b._mCodingSM=[new a.CodingStateMachine(a.HZSMModel),new a.CodingStateMachine(a.ISO2022CNSMModel),new a.CodingStateMachine(a.ISO2022JPSMModel),new a.CodingStateMachine(a.ISO2022KRSMModel)];b.reset()};a.EscCharSetProber.prototype= +new a.CharSetProber}(b("./init"))},{"./init":21}],11:[function(b,a,d){b=b("./init");a=b.Constants;b.HZ_cls=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,5,2,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];b.HZ_st=[a.start,a.error,3,a.start,a.start,a.start,a.error,a.error,a.error,a.error,a.error,a.error,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.error,a.error,a.start,a.start,4,a.error,5,a.error,6,a.error,5,5,4,a.error,4,a.error,4,4,4,a.error,4,a.error,4,a.itsMe,a.start,a.start,a.start,a.start,a.start,a.start];b.HZCharLenTable=[0,0,0,0,0,0];b.HZSMModel={classTable:b.HZ_cls,classFactor:6, +stateTable:b.HZ_st,charLenTable:b.HZCharLenTable,name:"HZ-GB-2312"};b.ISO2022CN_cls=[2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2];b.ISO2022CN_st=[a.start,3,a.error,a.start,a.start,a.start,a.start,a.start,a.start,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.error,a.error,a.error,4,a.error,a.error,a.error,a.error,a.itsMe,a.error,a.error,a.error,a.error,5,6,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.itsMe, +a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.itsMe,a.error,a.start];b.ISO2022CNCharLenTable=[0,0,0,0,0,0,0,0,0];b.ISO2022CNSMModel={classTable:b.ISO2022CN_cls,classFactor:9,stateTable:b.ISO2022CN_st,charLenTable:b.ISO2022CNCharLenTable,name:"ISO-2022-CN"};b.ISO2022JP_cls=[2,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,7,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,4,0,8,0,0,0,0,9,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2];b.ISO2022JP_st=[a.start,3,a.error,a.start,a.start,a.start,a.start,a.start,a.start,a.start,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.itsMe,a.itsMe,a.itsMe, +a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.error,a.error,a.error,5,a.error,a.error,a.error,4,a.error,a.error,a.error,a.error,a.error,6,a.itsMe,a.error,a.itsMe,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.itsMe,a.itsMe,a.error,a.error,a.error,a.itsMe,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.itsMe,a.error,a.start,a.start];b.ISO2022JPCharLenTable=[0,0,0,0,0,0,0,0,0,0];b.ISO2022JPSMModel={classTable:b.ISO2022JP_cls,classFactor:10,stateTable:b.ISO2022JP_st, +charLenTable:b.ISO2022JPCharLenTable,name:"ISO-2022-JP"};b.ISO2022KR_cls=[2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,3,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2];b.ISO2022KR_st=[a.start,3,a.error,a.start,a.start,a.start,a.error,a.error,a.error,a.error,a.error,a.error,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.error,a.error,a.error,4,a.error,a.error,a.error,a.error,a.error,a.error,5,a.error,a.error,a.error,a.error,a.error,a.error,a.itsMe,a.start,a.start,a.start,a.start];b.ISO2022KRCharLenTable=[0,0,0,0,0,0];b.ISO2022KRSMModel={classTable:b.ISO2022KR_cls,classFactor:6, +stateTable:b.ISO2022KR_st,charLenTable:b.ISO2022KRCharLenTable,name:"ISO-2022-KR"};!0},{"./init":21}],12:[function(b,a,d){!function(a){a.EUCJPProber=function(){a.MultiByteCharSetProber.apply(this);this.reset=function(){a.EUCJPProber.prototype.reset.apply(this);this._mContextAnalyzer.reset()};this.getCharsetName=function(){return"EUC-JP"};this.feed=function(b){for(var f=b.length,c=0;ca.Constants.SHORTCUT_THRESHOLD&&(this._mState=a.Constants.foundIt);return this.getState()};this.getConfidence=function(){var a=this._mContextAnalyzer.getConfidence(),b=this._mDistributionAnalyzer.getConfidence();return Math.max(a,b)};this._mCodingSM=new a.CodingStateMachine(a.EUCJPSMModel);this._mDistributionAnalyzer=new a.EUCJPDistributionAnalysis;this._mContextAnalyzer=new a.EUCJPContextAnalysis;this.reset()};a.EUCJPProber.prototype=new a.MultiByteCharSetProber}(b("./init"))}, +{"./init":21}],13:[function(b,a,d){b=b("./init");b.EUCKR_TYPICAL_DISTRIBUTION_RATIO=6;b.EUCKR_TABLE_SIZE=2352;b.EUCKRCharToFreqOrder=[13,130,120,1396,481,1719,1720,328,609,212,1721,707,400,299,1722,87,1397,1723,104,536,1117,1203,1724,1267,685,1268,508,1725,1726,1727,1728,1398,1399,1729,1730,1731,141,621,326,1057,368,1732,267,488,20,1733,1269,1734,945,1400,1735,47,904,1270,1736,1737,773,248,1738,409,313,786,429,1739,116,987,813,1401,683,75,1204,145,1740,1741,1742,1743,16,847,667,622,708,1744,1745, +1746,966,787,304,129,1747,60,820,123,676,1748,1749,1750,1751,617,1752,626,1753,1754,1755,1756,653,1757,1758,1759,1760,1761,1762,856,344,1763,1764,1765,1766,89,401,418,806,905,848,1767,1768,1769,946,1205,709,1770,1118,1771,241,1772,1773,1774,1271,1775,569,1776,999,1777,1778,1779,1780,337,751,1058,28,628,254,1781,177,906,270,349,891,1079,1782,19,1783,379,1784,315,1785,629,754,1402,559,1786,636,203,1206,1787,710,567,1788,935,814,1789,1790,1207,766,528,1791,1792,1208,1793,1794,1795,1796,1797,1403,1798, +1799,533,1059,1404,1405,1156,1406,936,884,1080,1800,351,1801,1802,1803,1804,1805,801,1806,1807,1808,1119,1809,1157,714,474,1407,1810,298,899,885,1811,1120,802,1158,1812,892,1813,1814,1408,659,1815,1816,1121,1817,1818,1819,1820,1821,1822,319,1823,594,545,1824,815,937,1209,1825,1826,573,1409,1022,1827,1210,1828,1829,1830,1831,1832,1833,556,722,807,1122,1060,1834,697,1835,900,557,715,1836,1410,540,1411,752,1159,294,597,1211,976,803,770,1412,1837,1838,39,794,1413,358,1839,371,925,1840,453,661,788,531, +723,544,1023,1081,869,91,1841,392,430,790,602,1414,677,1082,457,1415,1416,1842,1843,475,327,1024,1417,795,121,1844,733,403,1418,1845,1846,1847,300,119,711,1212,627,1848,1272,207,1849,1850,796,1213,382,1851,519,1852,1083,893,1853,1854,1855,367,809,487,671,1856,663,1857,1858,956,471,306,857,1859,1860,1160,1084,1861,1862,1863,1864,1865,1061,1866,1867,1868,1869,1870,1871,282,96,574,1872,502,1085,1873,1214,1874,907,1875,1876,827,977,1419,1420,1421,268,1877,1422,1878,1879,1880,308,1881,2,537,1882,1883, +1215,1884,1885,127,791,1886,1273,1423,1887,34,336,404,643,1888,571,654,894,840,1889,0,886,1274,122,575,260,908,938,1890,1275,410,316,1891,1892,100,1893,1894,1123,48,1161,1124,1025,1895,633,901,1276,1896,1897,115,816,1898,317,1899,694,1900,909,734,1424,572,866,1425,691,85,524,1010,543,394,841,1901,1902,1903,1026,1904,1905,1906,1907,1908,1909,30,451,651,988,310,1910,1911,1426,810,1216,93,1912,1913,1277,1217,1914,858,759,45,58,181,610,269,1915,1916,131,1062,551,443,1E3,821,1427,957,895,1086,1917,1918, +375,1919,359,1920,687,1921,822,1922,293,1923,1924,40,662,118,692,29,939,887,640,482,174,1925,69,1162,728,1428,910,1926,1278,1218,1279,386,870,217,854,1163,823,1927,1928,1929,1930,834,1931,78,1932,859,1933,1063,1934,1935,1936,1937,438,1164,208,595,1938,1939,1940,1941,1219,1125,1942,280,888,1429,1430,1220,1431,1943,1944,1945,1946,1947,1280,150,510,1432,1948,1949,1950,1951,1952,1953,1954,1011,1087,1955,1433,1043,1956,881,1957,614,958,1064,1065,1221,1958,638,1001,860,967,896,1434,989,492,553,1281,1165, +1959,1282,1002,1283,1222,1960,1961,1962,1963,36,383,228,753,247,454,1964,876,678,1965,1966,1284,126,464,490,835,136,672,529,940,1088,1435,473,1967,1968,467,50,390,227,587,279,378,598,792,968,240,151,160,849,882,1126,1285,639,1044,133,140,288,360,811,563,1027,561,142,523,1969,1970,1971,7,103,296,439,407,506,634,990,1972,1973,1974,1975,645,1976,1977,1978,1979,1980,1981,236,1982,1436,1983,1984,1089,192,828,618,518,1166,333,1127,1985,818,1223,1986,1987,1988,1989,1990,1991,1992,1993,342,1128,1286,746, +842,1994,1995,560,223,1287,98,8,189,650,978,1288,1996,1437,1997,17,345,250,423,277,234,512,226,97,289,42,167,1998,201,1999,2E3,843,836,824,532,338,783,1090,182,576,436,1438,1439,527,500,2001,947,889,2002,2003,2004,2005,262,600,314,447,2006,547,2007,693,738,1129,2008,71,1440,745,619,688,2009,829,2010,2011,147,2012,33,948,2013,2014,74,224,2015,61,191,918,399,637,2016,1028,1130,257,902,2017,2018,2019,2020,2021,2022,2023,2024,2025,2026,837,2027,2028,2029,2030,179,874,591,52,724,246,2031,2032,2033,2034, +1167,969,2035,1289,630,605,911,1091,1168,2036,2037,2038,1441,912,2039,623,2040,2041,253,1169,1290,2042,1442,146,620,611,577,433,2043,1224,719,1170,959,440,437,534,84,388,480,1131,159,220,198,679,2044,1012,819,1066,1443,113,1225,194,318,1003,1029,2045,2046,2047,2048,1067,2049,2050,2051,2052,2053,59,913,112,2054,632,2055,455,144,739,1291,2056,273,681,499,2057,448,2058,2059,760,2060,2061,970,384,169,245,1132,2062,2063,414,1444,2064,2065,41,235,2066,157,252,877,568,919,789,580,2067,725,2068,2069,1292, +2070,2071,1445,2072,1446,2073,2074,55,588,66,1447,271,1092,2075,1226,2076,960,1013,372,2077,2078,2079,2080,2081,1293,2082,2083,2084,2085,850,2086,2087,2088,2089,2090,186,2091,1068,180,2092,2093,2094,109,1227,522,606,2095,867,1448,1093,991,1171,926,353,1133,2096,581,2097,2098,2099,1294,1449,1450,2100,596,1172,1014,1228,2101,1451,1295,1173,1229,2102,2103,1296,1134,1452,949,1135,2104,2105,1094,1453,1454,1455,2106,1095,2107,2108,2109,2110,2111,2112,2113,2114,2115,2116,2117,804,2118,2119,1230,1231,805, +1456,405,1136,2120,2121,2122,2123,2124,720,701,1297,992,1457,927,1004,2125,2126,2127,2128,2129,2130,22,417,2131,303,2132,385,2133,971,520,513,2134,1174,73,1096,231,274,962,1458,673,2135,1459,2136,152,1137,2137,2138,2139,2140,1005,1138,1460,1139,2141,2142,2143,2144,11,374,844,2145,154,1232,46,1461,2146,838,830,721,1233,106,2147,90,428,462,578,566,1175,352,2148,2149,538,1234,124,1298,2150,1462,761,565,2151,686,2152,649,2153,72,173,2154,460,415,2155,1463,2156,1235,305,2157,2158,2159,2160,2161,2162,579, +2163,2164,2165,2166,2167,747,2168,2169,2170,2171,1464,669,2172,2173,2174,2175,2176,1465,2177,23,530,285,2178,335,729,2179,397,2180,2181,2182,1030,2183,2184,698,2185,2186,325,2187,2188,369,2189,799,1097,1015,348,2190,1069,680,2191,851,1466,2192,2193,10,2194,613,424,2195,979,108,449,589,27,172,81,1031,80,774,281,350,1032,525,301,582,1176,2196,674,1045,2197,2198,1467,730,762,2199,2200,2201,2202,1468,2203,993,2204,2205,266,1070,963,1140,2206,2207,2208,664,1098,972,2209,2210,2211,1177,1469,1470,871,2212, +2213,2214,2215,2216,1471,2217,2218,2219,2220,2221,2222,2223,2224,2225,2226,2227,1472,1236,2228,2229,2230,2231,2232,2233,2234,2235,1299,2236,2237,200,2238,477,373,2239,2240,731,825,777,2241,2242,2243,521,486,548,2244,2245,2246,1473,1300,53,549,137,875,76,158,2247,1301,1474,469,396,1016,278,712,2248,321,442,503,767,744,941,1237,1178,1475,2249,82,178,1141,1179,973,2250,1302,2251,297,2252,2253,570,2254,2255,2256,18,450,206,2257,290,292,1142,2258,511,162,99,346,164,735,2259,1476,1477,4,554,343,798,1099, +2260,1100,2261,43,171,1303,139,215,2262,2263,717,775,2264,1033,322,216,2265,831,2266,149,2267,1304,2268,2269,702,1238,135,845,347,309,2270,484,2271,878,655,238,1006,1478,2272,67,2273,295,2274,2275,461,2276,478,942,412,2277,1034,2278,2279,2280,265,2281,541,2282,2283,2284,2285,2286,70,852,1071,2287,2288,2289,2290,21,56,509,117,432,2291,2292,331,980,552,1101,148,284,105,393,1180,1239,755,2293,187,2294,1046,1479,2295,340,2296,63,1047,230,2297,2298,1305,763,1306,101,800,808,494,2299,2300,2301,903,2302, +37,1072,14,5,2303,79,675,2304,312,2305,2306,2307,2308,2309,1480,6,1307,2310,2311,2312,1,470,35,24,229,2313,695,210,86,778,15,784,592,779,32,77,855,964,2314,259,2315,501,380,2316,2317,83,981,153,689,1308,1481,1482,1483,2318,2319,716,1484,2320,2321,2322,2323,2324,2325,1485,2326,2327,128,57,68,261,1048,211,170,1240,31,2328,51,435,742,2329,2330,2331,635,2332,264,456,2333,2334,2335,425,2336,1486,143,507,263,943,2337,363,920,1487,256,1488,1102,243,601,1489,2338,2339,2340,2341,2342,2343,2344,861,2345,2346, +2347,2348,2349,2350,395,2351,1490,1491,62,535,166,225,2352,2353,668,419,1241,138,604,928,2354,1181,2355,1492,1493,2356,2357,2358,1143,2359,696,2360,387,307,1309,682,476,2361,2362,332,12,222,156,2363,232,2364,641,276,656,517,1494,1495,1035,416,736,1496,2365,1017,586,2366,2367,2368,1497,2369,242,2370,2371,2372,1498,2373,965,713,2374,2375,2376,2377,740,982,1499,944,1500,1007,2378,2379,1310,1501,2380,2381,2382,785,329,2383,2384,1502,2385,2386,2387,932,2388,1503,2389,2390,2391,2392,1242,2393,2394,2395, +2396,2397,994,950,2398,2399,2400,2401,1504,1311,2402,2403,2404,2405,1049,749,2406,2407,853,718,1144,1312,2408,1182,1505,2409,2410,255,516,479,564,550,214,1506,1507,1313,413,239,444,339,1145,1036,1508,1509,1314,1037,1510,1315,2411,1511,2412,2413,2414,176,703,497,624,593,921,302,2415,341,165,1103,1512,2416,1513,2417,2418,2419,376,2420,700,2421,2422,2423,258,768,1316,2424,1183,2425,995,608,2426,2427,2428,2429,221,2430,2431,2432,2433,2434,2435,2436,2437,195,323,726,188,897,983,1317,377,644,1050,879,2438, +452,2439,2440,2441,2442,2443,2444,914,2445,2446,2447,2448,915,489,2449,1514,1184,2450,2451,515,64,427,495,2452,583,2453,483,485,1038,562,213,1515,748,666,2454,2455,2456,2457,334,2458,780,996,1008,705,1243,2459,2460,2461,2462,2463,114,2464,493,1146,366,163,1516,961,1104,2465,291,2466,1318,1105,2467,1517,365,2468,355,951,1244,2469,1319,2470,631,2471,2472,218,1320,364,320,756,1518,1519,1321,1520,1322,2473,2474,2475,2476,997,2477,2478,2479,2480,665,1185,2481,916,1521,2482,2483,2484,584,684,2485,2486, +797,2487,1051,1186,2488,2489,2490,1522,2491,2492,370,2493,1039,1187,65,2494,434,205,463,1188,2495,125,812,391,402,826,699,286,398,155,781,771,585,2496,590,505,1073,2497,599,244,219,917,1018,952,646,1523,2498,1323,2499,2500,49,984,354,741,2501,625,2502,1324,2503,1019,190,357,757,491,95,782,868,2504,2505,2506,2507,2508,2509,134,1524,1074,422,1525,898,2510,161,2511,2512,2513,2514,769,2515,1526,2516,2517,411,1325,2518,472,1527,2519,2520,2521,2522,2523,2524,985,2525,2526,2527,2528,2529,2530,764,2531,1245, +2532,2533,25,204,311,2534,496,2535,1052,2536,2537,2538,2539,2540,2541,2542,199,704,504,468,758,657,1528,196,44,839,1246,272,750,2543,765,862,2544,2545,1326,2546,132,615,933,2547,732,2548,2549,2550,1189,1529,2551,283,1247,1053,607,929,2552,2553,2554,930,183,872,616,1040,1147,2555,1148,1020,441,249,1075,2556,2557,2558,466,743,2559,2560,2561,92,514,426,420,526,2562,2563,2564,2565,2566,2567,2568,185,2569,2570,2571,2572,776,1530,658,2573,362,2574,361,922,1076,793,2575,2576,2577,2578,2579,2580,1531,251, +2581,2582,2583,2584,1532,54,612,237,1327,2585,2586,275,408,647,111,2587,1533,1106,465,3,458,9,38,2588,107,110,890,209,26,737,498,2589,1534,2590,431,202,88,1535,356,287,1107,660,1149,2591,381,1536,986,1150,445,1248,1151,974,2592,2593,846,2594,446,953,184,1249,1250,727,2595,923,193,883,2596,2597,2598,102,324,539,817,2599,421,1041,2600,832,2601,94,175,197,406,2602,459,2603,2604,2605,2606,2607,330,555,2608,2609,2610,706,1108,389,2611,2612,2613,2614,233,2615,833,558,931,954,1251,2616,2617,1537,546,2618, +2619,1009,2620,2621,2622,1538,690,1328,2623,955,2624,1539,2625,2626,772,2627,2628,2629,2630,2631,924,648,863,603,2632,2633,934,1540,864,865,2634,642,1042,670,1190,2635,2636,2637,2638,168,2639,652,873,542,1054,1541,2640,2641,2642,2643,2644,2645,2646,2647,2648,2649,2650,2651,2652,2653,2654,2655,2656,2657,2658,2659,2660,2661,2662,2663,2664,2665,2666,2667,2668,2669,2670,2671,2672,2673,2674,2675,2676,2677,2678,2679,2680,2681,2682,2683,2684,2685,2686,2687,2688,2689,2690,2691,2692,2693,2694,2695,2696,2697, +2698,2699,1542,880,2700,2701,2702,2703,2704,2705,2706,2707,2708,2709,2710,2711,2712,2713,2714,2715,2716,2717,2718,2719,2720,2721,2722,2723,2724,2725,1543,2726,2727,2728,2729,2730,2731,2732,1544,2733,2734,2735,2736,2737,2738,2739,2740,2741,2742,2743,2744,2745,2746,2747,2748,2749,2750,2751,2752,2753,2754,1545,2755,2756,2757,2758,2759,2760,2761,2762,2763,2764,2765,2766,1546,2767,1547,2768,2769,2770,2771,2772,2773,2774,2775,2776,2777,2778,2779,2780,2781,2782,2783,2784,2785,2786,1548,2787,2788,2789,1109, +2790,2791,2792,2793,2794,2795,2796,2797,2798,2799,2800,2801,2802,2803,2804,2805,2806,2807,2808,2809,2810,2811,2812,1329,2813,2814,2815,2816,2817,2818,2819,2820,2821,2822,2823,2824,2825,2826,2827,2828,2829,2830,2831,2832,2833,2834,2835,2836,2837,2838,2839,2840,2841,2842,2843,2844,2845,2846,2847,2848,2849,2850,2851,2852,2853,2854,2855,2856,1549,2857,2858,2859,2860,1550,2861,2862,1551,2863,2864,2865,2866,2867,2868,2869,2870,2871,2872,2873,2874,1110,1330,2875,2876,2877,2878,2879,2880,2881,2882,2883,2884, +2885,2886,2887,2888,2889,2890,2891,2892,2893,2894,2895,2896,2897,2898,2899,2900,2901,2902,2903,2904,2905,2906,2907,2908,2909,2910,2911,2912,2913,2914,2915,2916,2917,2918,2919,2920,2921,2922,2923,2924,2925,2926,2927,2928,2929,2930,1331,2931,2932,2933,2934,2935,2936,2937,2938,2939,2940,2941,2942,2943,1552,2944,2945,2946,2947,2948,2949,2950,2951,2952,2953,2954,2955,2956,2957,2958,2959,2960,2961,2962,2963,2964,1252,2965,2966,2967,2968,2969,2970,2971,2972,2973,2974,2975,2976,2977,2978,2979,2980,2981,2982, +2983,2984,2985,2986,2987,2988,2989,2990,2991,2992,2993,2994,2995,2996,2997,2998,2999,3E3,3001,3002,3003,3004,3005,3006,3007,3008,3009,3010,3011,3012,1553,3013,3014,3015,3016,3017,1554,3018,1332,3019,3020,3021,3022,3023,3024,3025,3026,3027,3028,3029,3030,3031,3032,3033,3034,3035,3036,3037,3038,3039,3040,3041,3042,3043,3044,3045,3046,3047,3048,3049,3050,1555,3051,3052,3053,1556,1557,3054,3055,3056,3057,3058,3059,3060,3061,3062,3063,3064,3065,3066,3067,1558,3068,3069,3070,3071,3072,3073,3074,3075,3076, +1559,3077,3078,3079,3080,3081,3082,3083,1253,3084,3085,3086,3087,3088,3089,3090,3091,3092,3093,3094,3095,3096,3097,3098,3099,3100,3101,3102,3103,3104,3105,3106,3107,3108,1152,3109,3110,3111,3112,3113,1560,3114,3115,3116,3117,1111,3118,3119,3120,3121,3122,3123,3124,3125,3126,3127,3128,3129,3130,3131,3132,3133,3134,3135,3136,3137,3138,3139,3140,3141,3142,3143,3144,3145,3146,3147,3148,3149,3150,3151,3152,3153,3154,3155,3156,3157,3158,3159,3160,3161,3162,3163,3164,3165,3166,3167,3168,3169,3170,3171,3172, +3173,3174,3175,3176,1333,3177,3178,3179,3180,3181,3182,3183,3184,3185,3186,3187,3188,3189,1561,3190,3191,1334,3192,3193,3194,3195,3196,3197,3198,3199,3200,3201,3202,3203,3204,3205,3206,3207,3208,3209,3210,3211,3212,3213,3214,3215,3216,3217,3218,3219,3220,3221,3222,3223,3224,3225,3226,3227,3228,3229,3230,3231,3232,3233,3234,1562,3235,3236,3237,3238,3239,3240,3241,3242,3243,3244,3245,3246,3247,3248,3249,3250,3251,3252,3253,3254,3255,3256,3257,3258,3259,3260,3261,3262,3263,3264,3265,3266,3267,3268,3269, +3270,3271,3272,3273,3274,3275,3276,3277,1563,3278,3279,3280,3281,3282,3283,3284,3285,3286,3287,3288,3289,3290,3291,3292,3293,3294,3295,3296,3297,3298,3299,3300,3301,3302,3303,3304,3305,3306,3307,3308,3309,3310,3311,3312,3313,3314,3315,3316,3317,3318,3319,3320,3321,3322,3323,3324,3325,3326,3327,3328,3329,3330,3331,3332,3333,3334,3335,3336,3337,3338,3339,3340,3341,3342,3343,3344,3345,3346,3347,3348,3349,3350,3351,3352,3353,3354,3355,3356,3357,3358,3359,3360,3361,3362,3363,3364,1335,3365,3366,3367,3368, +3369,3370,3371,3372,3373,3374,3375,3376,3377,3378,3379,3380,3381,3382,3383,3384,3385,3386,3387,1336,3388,3389,3390,3391,3392,3393,3394,3395,3396,3397,3398,3399,3400,3401,3402,3403,3404,3405,3406,3407,3408,3409,3410,3411,3412,3413,3414,1337,3415,3416,3417,3418,3419,1338,3420,3421,3422,1564,1565,3423,3424,3425,3426,3427,3428,3429,3430,3431,1254,3432,3433,3434,1339,3435,3436,3437,3438,3439,1566,3440,3441,3442,3443,3444,3445,3446,3447,3448,3449,3450,3451,3452,3453,3454,1255,3455,3456,3457,3458,3459,1567, +1191,3460,1568,1569,3461,3462,3463,1570,3464,3465,3466,3467,3468,1571,3469,3470,3471,3472,3473,1572,3474,3475,3476,3477,3478,3479,3480,3481,3482,3483,3484,3485,3486,1340,3487,3488,3489,3490,3491,3492,1021,3493,3494,3495,3496,3497,3498,1573,3499,1341,3500,3501,3502,3503,3504,3505,3506,3507,3508,3509,3510,3511,1342,3512,3513,3514,3515,3516,1574,1343,3517,3518,3519,1575,3520,1576,3521,3522,3523,3524,3525,3526,3527,3528,3529,3530,3531,3532,3533,3534,3535,3536,3537,3538,3539,3540,3541,3542,3543,3544,3545, +3546,3547,3548,3549,3550,3551,3552,3553,3554,3555,3556,3557,3558,3559,3560,3561,3562,3563,3564,3565,3566,3567,3568,3569,3570,3571,3572,3573,3574,3575,3576,3577,3578,3579,3580,1577,3581,3582,1578,3583,3584,3585,3586,3587,3588,3589,3590,3591,3592,3593,3594,3595,3596,3597,3598,3599,3600,3601,3602,3603,3604,1579,3605,3606,3607,3608,3609,3610,3611,3612,3613,3614,3615,3616,3617,3618,3619,3620,3621,3622,3623,3624,3625,3626,3627,3628,3629,1580,3630,3631,1581,3632,3633,3634,3635,3636,3637,3638,3639,3640,3641, +3642,3643,3644,3645,3646,3647,3648,3649,3650,3651,3652,3653,3654,3655,3656,1582,3657,3658,3659,3660,3661,3662,3663,3664,3665,3666,3667,3668,3669,3670,3671,3672,3673,3674,3675,3676,3677,3678,3679,3680,3681,3682,3683,3684,3685,3686,3687,3688,3689,3690,3691,3692,3693,3694,3695,3696,3697,3698,3699,3700,1192,3701,3702,3703,3704,1256,3705,3706,3707,3708,1583,1257,3709,3710,3711,3712,3713,3714,3715,3716,1584,3717,3718,3719,3720,3721,3722,3723,3724,3725,3726,3727,3728,3729,3730,3731,3732,3733,3734,3735,3736, +3737,3738,3739,3740,3741,3742,3743,3744,3745,1344,3746,3747,3748,3749,3750,3751,3752,3753,3754,3755,3756,1585,3757,3758,3759,3760,3761,3762,3763,3764,3765,3766,1586,3767,3768,3769,3770,3771,3772,3773,3774,3775,3776,3777,3778,1345,3779,3780,3781,3782,3783,3784,3785,3786,3787,3788,3789,3790,3791,3792,3793,3794,3795,1346,1587,3796,3797,1588,3798,3799,3800,3801,3802,3803,3804,3805,3806,1347,3807,3808,3809,3810,3811,1589,3812,3813,3814,3815,3816,3817,3818,3819,3820,3821,1590,3822,3823,1591,1348,3824,3825, +3826,3827,3828,3829,3830,1592,3831,3832,1593,3833,3834,3835,3836,3837,3838,3839,3840,3841,3842,3843,3844,1349,3845,3846,3847,3848,3849,3850,3851,3852,3853,3854,3855,3856,3857,3858,1594,3859,3860,3861,3862,3863,3864,3865,3866,3867,3868,3869,1595,3870,3871,3872,3873,1596,3874,3875,3876,3877,3878,3879,3880,3881,3882,3883,3884,3885,3886,1597,3887,3888,3889,3890,3891,3892,3893,3894,3895,1598,3896,3897,3898,1599,1600,3899,1350,3900,1351,3901,3902,1352,3903,3904,3905,3906,3907,3908,3909,3910,3911,3912,3913, +3914,3915,3916,3917,3918,3919,3920,3921,3922,3923,3924,1258,3925,3926,3927,3928,3929,3930,3931,1193,3932,1601,3933,3934,3935,3936,3937,3938,3939,3940,3941,3942,3943,1602,3944,3945,3946,3947,3948,1603,3949,3950,3951,3952,3953,3954,3955,3956,3957,3958,3959,3960,3961,3962,3963,3964,3965,1604,3966,3967,3968,3969,3970,3971,3972,3973,3974,3975,3976,3977,1353,3978,3979,3980,3981,3982,3983,3984,3985,3986,3987,3988,3989,3990,3991,1354,3992,3993,3994,3995,3996,3997,3998,3999,4E3,4001,4002,4003,4004,4005,4006, +4007,4008,4009,4010,4011,4012,4013,4014,4015,4016,4017,4018,4019,4020,4021,4022,4023,1355,4024,4025,4026,4027,4028,4029,4030,4031,4032,4033,4034,4035,4036,4037,4038,4039,4040,1605,4041,4042,4043,4044,4045,4046,4047,4048,4049,4050,4051,4052,4053,4054,4055,4056,4057,4058,4059,4060,1606,4061,4062,4063,4064,1607,4065,4066,4067,4068,4069,4070,4071,4072,4073,4074,4075,4076,1194,4077,4078,1608,4079,4080,4081,4082,4083,4084,4085,4086,4087,1609,4088,4089,4090,4091,4092,4093,4094,4095,4096,4097,4098,4099,4100, +4101,4102,4103,4104,4105,4106,4107,4108,1259,4109,4110,4111,4112,4113,4114,4115,4116,4117,4118,4119,4120,4121,4122,4123,4124,1195,4125,4126,4127,1610,4128,4129,4130,4131,4132,4133,4134,4135,4136,4137,1356,4138,4139,4140,4141,4142,4143,4144,1611,4145,4146,4147,4148,4149,4150,4151,4152,4153,4154,4155,4156,4157,4158,4159,4160,4161,4162,4163,4164,4165,4166,4167,4168,4169,4170,4171,4172,4173,4174,4175,4176,4177,4178,4179,4180,4181,4182,4183,4184,4185,4186,4187,4188,4189,4190,4191,4192,4193,4194,4195,4196, +4197,4198,4199,4200,4201,4202,4203,4204,4205,4206,4207,4208,4209,4210,4211,4212,4213,4214,4215,4216,4217,4218,4219,1612,4220,4221,4222,4223,4224,4225,4226,4227,1357,4228,1613,4229,4230,4231,4232,4233,4234,4235,4236,4237,4238,4239,4240,4241,4242,4243,1614,4244,4245,4246,4247,4248,4249,4250,4251,4252,4253,4254,4255,4256,4257,4258,4259,4260,4261,4262,4263,4264,4265,4266,4267,4268,4269,4270,1196,1358,4271,4272,4273,4274,4275,4276,4277,4278,4279,4280,4281,4282,4283,4284,4285,4286,4287,1615,4288,4289,4290, +4291,4292,4293,4294,4295,4296,4297,4298,4299,4300,4301,4302,4303,4304,4305,4306,4307,4308,4309,4310,4311,4312,4313,4314,4315,4316,4317,4318,4319,4320,4321,4322,4323,4324,4325,4326,4327,4328,4329,4330,4331,4332,4333,4334,1616,4335,4336,4337,4338,4339,4340,4341,4342,4343,4344,4345,4346,4347,4348,4349,4350,4351,4352,4353,4354,4355,4356,4357,4358,4359,4360,1617,4361,4362,4363,4364,4365,1618,4366,4367,4368,4369,4370,4371,4372,4373,4374,4375,4376,4377,4378,4379,4380,4381,4382,4383,4384,4385,4386,4387,4388, +4389,4390,4391,4392,4393,4394,4395,4396,4397,4398,4399,4400,4401,4402,4403,4404,4405,4406,4407,4408,4409,4410,4411,4412,4413,4414,4415,4416,1619,4417,4418,4419,4420,4421,4422,4423,4424,4425,1112,4426,4427,4428,4429,4430,1620,4431,4432,4433,4434,4435,4436,4437,4438,4439,4440,4441,4442,1260,1261,4443,4444,4445,4446,4447,4448,4449,4450,4451,4452,4453,4454,4455,1359,4456,4457,4458,4459,4460,4461,4462,4463,4464,4465,1621,4466,4467,4468,4469,4470,4471,4472,4473,4474,4475,4476,4477,4478,4479,4480,4481,4482, +4483,4484,4485,4486,4487,4488,4489,1055,4490,4491,4492,4493,4494,4495,4496,4497,4498,4499,4500,4501,4502,4503,4504,4505,4506,4507,4508,4509,4510,4511,4512,4513,4514,4515,4516,4517,4518,1622,4519,4520,4521,1623,4522,4523,4524,4525,4526,4527,4528,4529,4530,4531,4532,4533,4534,4535,1360,4536,4537,4538,4539,4540,4541,4542,4543,975,4544,4545,4546,4547,4548,4549,4550,4551,4552,4553,4554,4555,4556,4557,4558,4559,4560,4561,4562,4563,4564,4565,4566,4567,4568,4569,4570,4571,1624,4572,4573,4574,4575,4576,1625, +4577,4578,4579,4580,4581,4582,4583,4584,1626,4585,4586,4587,4588,4589,4590,4591,4592,4593,4594,4595,1627,4596,4597,4598,4599,4600,4601,4602,4603,4604,4605,4606,4607,4608,4609,4610,4611,4612,4613,4614,4615,1628,4616,4617,4618,4619,4620,4621,4622,4623,4624,4625,4626,4627,4628,4629,4630,4631,4632,4633,4634,4635,4636,4637,4638,4639,4640,4641,4642,4643,4644,4645,4646,4647,4648,4649,1361,4650,4651,4652,4653,4654,4655,4656,4657,4658,4659,4660,4661,1362,4662,4663,4664,4665,4666,4667,4668,4669,4670,4671,4672, +4673,4674,4675,4676,4677,4678,4679,4680,4681,4682,1629,4683,4684,4685,4686,4687,1630,4688,4689,4690,4691,1153,4692,4693,4694,1113,4695,4696,4697,4698,4699,4700,4701,4702,4703,4704,4705,4706,4707,4708,4709,4710,4711,1197,4712,4713,4714,4715,4716,4717,4718,4719,4720,4721,4722,4723,4724,4725,4726,4727,4728,4729,4730,4731,4732,4733,4734,4735,1631,4736,1632,4737,4738,4739,4740,4741,4742,4743,4744,1633,4745,4746,4747,4748,4749,1262,4750,4751,4752,4753,4754,1363,4755,4756,4757,4758,4759,4760,4761,4762,4763, +4764,4765,4766,4767,4768,1634,4769,4770,4771,4772,4773,4774,4775,4776,4777,4778,1635,4779,4780,4781,4782,4783,4784,4785,4786,4787,4788,4789,1636,4790,4791,4792,4793,4794,4795,4796,4797,4798,4799,4800,4801,4802,4803,4804,4805,4806,1637,4807,4808,4809,1638,4810,4811,4812,4813,4814,4815,4816,4817,4818,1639,4819,4820,4821,4822,4823,4824,4825,4826,4827,4828,4829,4830,4831,4832,4833,1077,4834,4835,4836,4837,4838,4839,4840,4841,4842,4843,4844,4845,4846,4847,4848,4849,4850,4851,4852,4853,4854,4855,4856,4857, +4858,4859,4860,4861,4862,4863,4864,4865,4866,4867,4868,4869,4870,4871,4872,4873,4874,4875,4876,4877,4878,4879,4880,4881,4882,4883,1640,4884,4885,1641,4886,4887,4888,4889,4890,4891,4892,4893,4894,4895,4896,4897,4898,4899,4900,4901,4902,4903,4904,4905,4906,4907,4908,4909,4910,4911,1642,4912,4913,4914,1364,4915,4916,4917,4918,4919,4920,4921,4922,4923,4924,4925,4926,4927,4928,4929,4930,4931,1643,4932,4933,4934,4935,4936,4937,4938,4939,4940,4941,4942,4943,4944,4945,4946,4947,4948,4949,4950,4951,4952,4953, +4954,4955,4956,4957,4958,4959,4960,4961,4962,4963,4964,4965,4966,4967,4968,4969,4970,4971,4972,4973,4974,4975,4976,4977,4978,4979,4980,1644,4981,4982,4983,4984,1645,4985,4986,1646,4987,4988,4989,4990,4991,4992,4993,4994,4995,4996,4997,4998,4999,5E3,5001,5002,5003,5004,5005,1647,5006,1648,5007,5008,5009,5010,5011,5012,1078,5013,5014,5015,5016,5017,5018,5019,5020,5021,5022,5023,5024,5025,5026,5027,5028,1365,5029,5030,5031,5032,5033,5034,5035,5036,5037,5038,5039,1649,5040,5041,5042,5043,5044,5045,1366, +5046,5047,5048,5049,5050,5051,5052,5053,5054,5055,1650,5056,5057,5058,5059,5060,5061,5062,5063,5064,5065,5066,5067,5068,5069,5070,5071,5072,5073,5074,5075,5076,5077,1651,5078,5079,5080,5081,5082,5083,5084,5085,5086,5087,5088,5089,5090,5091,5092,5093,5094,5095,5096,5097,5098,5099,5100,5101,5102,5103,5104,5105,5106,5107,5108,5109,5110,1652,5111,5112,5113,5114,5115,5116,5117,5118,1367,5119,5120,5121,5122,5123,5124,5125,5126,5127,5128,5129,1653,5130,5131,5132,5133,5134,5135,5136,5137,5138,5139,5140,5141, +5142,5143,5144,5145,5146,5147,5148,5149,1368,5150,1654,5151,1369,5152,5153,5154,5155,5156,5157,5158,5159,5160,5161,5162,5163,5164,5165,5166,5167,5168,5169,5170,5171,5172,5173,5174,5175,5176,5177,5178,1370,5179,5180,5181,5182,5183,5184,5185,5186,5187,5188,5189,5190,5191,5192,5193,5194,5195,5196,5197,5198,1655,5199,5200,5201,5202,1656,5203,5204,5205,5206,1371,5207,1372,5208,5209,5210,5211,1373,5212,5213,1374,5214,5215,5216,5217,5218,5219,5220,5221,5222,5223,5224,5225,5226,5227,5228,5229,5230,5231,5232, +5233,5234,5235,5236,5237,5238,5239,5240,5241,5242,5243,5244,5245,5246,5247,1657,5248,5249,5250,5251,1658,1263,5252,5253,5254,5255,5256,1375,5257,5258,5259,5260,5261,5262,5263,5264,5265,5266,5267,5268,5269,5270,5271,5272,5273,5274,5275,5276,5277,5278,5279,5280,5281,5282,5283,1659,5284,5285,5286,5287,5288,5289,5290,5291,5292,5293,5294,5295,5296,5297,5298,5299,5300,1660,5301,5302,5303,5304,5305,5306,5307,5308,5309,5310,5311,5312,5313,5314,5315,5316,5317,5318,5319,5320,5321,1376,5322,5323,5324,5325,5326, +5327,5328,5329,5330,5331,5332,5333,1198,5334,5335,5336,5337,5338,5339,5340,5341,5342,5343,1661,5344,5345,5346,5347,5348,5349,5350,5351,5352,5353,5354,5355,5356,5357,5358,5359,5360,5361,5362,5363,5364,5365,5366,5367,5368,5369,5370,5371,5372,5373,5374,5375,5376,5377,5378,5379,5380,5381,5382,5383,5384,5385,5386,5387,5388,5389,5390,5391,5392,5393,5394,5395,5396,5397,5398,1264,5399,5400,5401,5402,5403,5404,5405,5406,5407,5408,5409,5410,5411,5412,1662,5413,5414,5415,5416,1663,5417,5418,5419,5420,5421,5422, +5423,5424,5425,5426,5427,5428,5429,5430,5431,5432,5433,5434,5435,5436,5437,5438,1664,5439,5440,5441,5442,5443,5444,5445,5446,5447,5448,5449,5450,5451,5452,5453,5454,5455,5456,5457,5458,5459,5460,5461,5462,5463,5464,5465,5466,5467,5468,5469,5470,5471,5472,5473,5474,5475,5476,5477,5478,1154,5479,5480,5481,5482,5483,5484,5485,1665,5486,5487,5488,5489,5490,5491,5492,5493,5494,5495,5496,5497,5498,5499,5500,5501,5502,5503,5504,5505,5506,5507,5508,5509,5510,5511,5512,5513,5514,5515,5516,5517,5518,5519,5520, +5521,5522,5523,5524,5525,5526,5527,5528,5529,5530,5531,5532,5533,5534,5535,5536,5537,5538,5539,5540,5541,5542,5543,5544,5545,5546,5547,5548,1377,5549,5550,5551,5552,5553,5554,5555,5556,5557,5558,5559,5560,5561,5562,5563,5564,5565,5566,5567,5568,5569,5570,1114,5571,5572,5573,5574,5575,5576,5577,5578,5579,5580,5581,5582,5583,5584,5585,5586,5587,5588,5589,5590,5591,5592,1378,5593,5594,5595,5596,5597,5598,5599,5600,5601,5602,5603,5604,5605,5606,5607,5608,5609,5610,5611,5612,5613,5614,1379,5615,5616,5617, +5618,5619,5620,5621,5622,5623,5624,5625,5626,5627,5628,5629,5630,5631,5632,5633,5634,1380,5635,5636,5637,5638,5639,5640,5641,5642,5643,5644,5645,5646,5647,5648,5649,1381,1056,5650,5651,5652,5653,5654,5655,5656,5657,5658,5659,5660,1666,5661,5662,5663,5664,5665,5666,5667,5668,1667,5669,1668,5670,5671,5672,5673,5674,5675,5676,5677,5678,1155,5679,5680,5681,5682,5683,5684,5685,5686,5687,5688,5689,5690,5691,5692,5693,5694,5695,5696,5697,5698,1669,5699,5700,5701,5702,5703,5704,5705,1670,5706,5707,5708,5709, +5710,1671,5711,5712,5713,5714,1382,5715,5716,5717,5718,5719,5720,5721,5722,5723,5724,5725,1672,5726,5727,1673,1674,5728,5729,5730,5731,5732,5733,5734,5735,5736,1675,5737,5738,5739,5740,5741,5742,5743,5744,1676,5745,5746,5747,5748,5749,5750,5751,1383,5752,5753,5754,5755,5756,5757,5758,5759,5760,5761,5762,5763,5764,5765,5766,5767,5768,1677,5769,5770,5771,5772,5773,1678,5774,5775,5776,998,5777,5778,5779,5780,5781,5782,5783,5784,5785,1384,5786,5787,5788,5789,5790,5791,5792,5793,5794,5795,5796,5797,5798, +5799,5800,1679,5801,5802,5803,1115,1116,5804,5805,5806,5807,5808,5809,5810,5811,5812,5813,5814,5815,5816,5817,5818,5819,5820,5821,5822,5823,5824,5825,5826,5827,5828,5829,5830,5831,5832,5833,5834,5835,5836,5837,5838,5839,5840,5841,5842,5843,5844,5845,5846,5847,5848,5849,5850,5851,5852,5853,5854,5855,1680,5856,5857,5858,5859,5860,5861,5862,5863,5864,1681,5865,5866,5867,1682,5868,5869,5870,5871,5872,5873,5874,5875,5876,5877,5878,5879,1683,5880,1684,5881,5882,5883,5884,1685,5885,5886,5887,5888,5889,5890, +5891,5892,5893,5894,5895,5896,5897,5898,5899,5900,5901,5902,5903,5904,5905,5906,5907,1686,5908,5909,5910,5911,5912,5913,5914,5915,5916,5917,5918,5919,5920,5921,5922,5923,5924,5925,5926,5927,5928,5929,5930,5931,5932,5933,5934,5935,1687,5936,5937,5938,5939,5940,5941,5942,5943,5944,5945,5946,5947,5948,5949,5950,5951,5952,1688,1689,5953,1199,5954,5955,5956,5957,5958,5959,5960,5961,1690,5962,5963,5964,5965,5966,5967,5968,5969,5970,5971,5972,5973,5974,5975,5976,5977,5978,5979,5980,5981,1385,5982,1386,5983, +5984,5985,5986,5987,5988,5989,5990,5991,5992,5993,5994,5995,5996,5997,5998,5999,6E3,6001,6002,6003,6004,6005,6006,6007,6008,6009,6010,6011,6012,6013,6014,6015,6016,6017,6018,6019,6020,6021,6022,6023,6024,6025,6026,6027,1265,6028,6029,1691,6030,6031,6032,6033,6034,6035,6036,6037,6038,6039,6040,6041,6042,6043,6044,6045,6046,6047,6048,6049,6050,6051,6052,6053,6054,6055,6056,6057,6058,6059,6060,6061,6062,6063,6064,6065,6066,6067,6068,6069,6070,6071,6072,6073,6074,6075,6076,6077,6078,6079,6080,6081,6082, +6083,6084,1692,6085,6086,6087,6088,6089,6090,6091,6092,6093,6094,6095,6096,6097,6098,6099,6100,6101,6102,6103,6104,6105,6106,6107,6108,6109,6110,6111,6112,6113,6114,6115,6116,6117,6118,6119,6120,6121,6122,6123,6124,6125,6126,6127,6128,6129,6130,6131,1693,6132,6133,6134,6135,6136,1694,6137,6138,6139,6140,6141,1695,6142,6143,6144,6145,6146,6147,6148,6149,6150,6151,6152,6153,6154,6155,6156,6157,6158,6159,6160,6161,6162,6163,6164,6165,6166,6167,6168,6169,6170,6171,6172,6173,6174,6175,6176,6177,6178,6179, +6180,6181,6182,6183,6184,6185,1696,6186,6187,6188,6189,6190,6191,6192,6193,6194,6195,6196,6197,6198,6199,6200,6201,6202,6203,6204,6205,6206,6207,6208,6209,6210,6211,6212,6213,6214,6215,6216,6217,6218,6219,1697,6220,6221,6222,6223,6224,6225,6226,6227,6228,6229,6230,6231,6232,6233,6234,6235,6236,6237,6238,6239,6240,6241,6242,6243,6244,6245,6246,6247,6248,6249,6250,6251,6252,6253,1698,6254,6255,6256,6257,6258,6259,6260,6261,6262,6263,1200,6264,6265,6266,6267,6268,6269,6270,6271,6272,6273,6274,6275,6276, +6277,6278,6279,6280,6281,6282,6283,6284,6285,6286,6287,6288,6289,6290,6291,6292,6293,6294,6295,6296,6297,6298,6299,6300,6301,6302,1699,6303,6304,1700,6305,6306,6307,6308,6309,6310,6311,6312,6313,6314,6315,6316,6317,6318,6319,6320,6321,6322,6323,6324,6325,6326,6327,6328,6329,6330,6331,6332,6333,6334,6335,6336,6337,6338,6339,1701,6340,6341,6342,6343,6344,1387,6345,6346,6347,6348,6349,6350,6351,6352,6353,6354,6355,6356,6357,6358,6359,6360,6361,6362,6363,6364,6365,6366,6367,6368,6369,6370,6371,6372,6373, +6374,6375,6376,6377,6378,6379,6380,6381,6382,6383,6384,6385,6386,6387,6388,6389,6390,6391,6392,6393,6394,6395,6396,6397,6398,6399,6400,6401,6402,6403,6404,6405,6406,6407,6408,6409,6410,6411,6412,6413,1702,6414,6415,6416,6417,6418,6419,6420,6421,6422,1703,6423,6424,6425,6426,6427,6428,6429,6430,6431,6432,6433,6434,6435,6436,6437,6438,1704,6439,6440,6441,6442,6443,6444,6445,6446,6447,6448,6449,6450,6451,6452,6453,6454,6455,6456,6457,6458,6459,6460,6461,6462,6463,6464,6465,6466,6467,6468,6469,6470,6471, +6472,6473,6474,6475,6476,6477,6478,6479,6480,6481,6482,6483,6484,6485,6486,6487,6488,6489,6490,6491,6492,6493,6494,6495,6496,6497,6498,6499,6500,6501,6502,6503,1266,6504,6505,6506,6507,6508,6509,6510,6511,6512,6513,6514,6515,6516,6517,6518,6519,6520,6521,6522,6523,6524,6525,6526,6527,6528,6529,6530,6531,6532,6533,6534,6535,6536,6537,6538,6539,6540,6541,6542,6543,6544,6545,6546,6547,6548,6549,6550,6551,1705,1706,6552,6553,6554,6555,6556,6557,6558,6559,6560,6561,6562,6563,6564,6565,6566,6567,6568,6569, +6570,6571,6572,6573,6574,6575,6576,6577,6578,6579,6580,6581,6582,6583,6584,6585,6586,6587,6588,6589,6590,6591,6592,6593,6594,6595,6596,6597,6598,6599,6600,6601,6602,6603,6604,6605,6606,6607,6608,6609,6610,6611,6612,6613,6614,6615,6616,6617,6618,6619,6620,6621,6622,6623,6624,6625,6626,6627,6628,6629,6630,6631,6632,6633,6634,6635,6636,6637,1388,6638,6639,6640,6641,6642,6643,6644,1707,6645,6646,6647,6648,6649,6650,6651,6652,6653,6654,6655,6656,6657,6658,6659,6660,6661,6662,6663,1708,6664,6665,6666,6667, +6668,6669,6670,6671,6672,6673,6674,1201,6675,6676,6677,6678,6679,6680,6681,6682,6683,6684,6685,6686,6687,6688,6689,6690,6691,6692,6693,6694,6695,6696,6697,6698,6699,6700,6701,6702,6703,6704,6705,6706,6707,6708,6709,6710,6711,6712,6713,6714,6715,6716,6717,6718,6719,6720,6721,6722,6723,6724,6725,1389,6726,6727,6728,6729,6730,6731,6732,6733,6734,6735,6736,1390,1709,6737,6738,6739,6740,6741,6742,1710,6743,6744,6745,6746,1391,6747,6748,6749,6750,6751,6752,6753,6754,6755,6756,6757,1392,6758,6759,6760,6761, +6762,6763,6764,6765,6766,6767,6768,6769,6770,6771,6772,6773,6774,6775,6776,6777,6778,6779,6780,1202,6781,6782,6783,6784,6785,6786,6787,6788,6789,6790,6791,6792,6793,6794,6795,6796,6797,6798,6799,6800,6801,6802,6803,6804,6805,6806,6807,6808,6809,1711,6810,6811,6812,6813,6814,6815,6816,6817,6818,6819,6820,6821,6822,6823,6824,6825,6826,6827,6828,6829,6830,6831,6832,6833,6834,6835,6836,1393,6837,6838,6839,6840,6841,6842,6843,6844,6845,6846,6847,6848,6849,6850,6851,6852,6853,6854,6855,6856,6857,6858,6859, +6860,6861,6862,6863,6864,6865,6866,6867,6868,6869,6870,6871,6872,6873,6874,6875,6876,6877,6878,6879,6880,6881,6882,6883,6884,6885,6886,6887,6888,6889,6890,6891,6892,6893,6894,6895,6896,6897,6898,6899,6900,6901,6902,1712,6903,6904,6905,6906,6907,6908,6909,6910,1713,6911,6912,6913,6914,6915,6916,6917,6918,6919,6920,6921,6922,6923,6924,6925,6926,6927,6928,6929,6930,6931,6932,6933,6934,6935,6936,6937,6938,6939,6940,6941,6942,6943,6944,6945,6946,6947,6948,6949,6950,6951,6952,6953,6954,6955,6956,6957,6958, +6959,6960,6961,6962,6963,6964,6965,6966,6967,6968,6969,6970,6971,6972,6973,6974,1714,6975,6976,6977,6978,6979,6980,6981,6982,6983,6984,6985,6986,6987,6988,1394,6989,6990,6991,6992,6993,6994,6995,6996,6997,6998,6999,7E3,1715,7001,7002,7003,7004,7005,7006,7007,7008,7009,7010,7011,7012,7013,7014,7015,7016,7017,7018,7019,7020,7021,7022,7023,7024,7025,7026,7027,7028,1716,7029,7030,7031,7032,7033,7034,7035,7036,7037,7038,7039,7040,7041,7042,7043,7044,7045,7046,7047,7048,7049,7050,7051,7052,7053,7054,7055, +7056,7057,7058,7059,7060,7061,7062,7063,7064,7065,7066,7067,7068,7069,7070,7071,7072,7073,7074,7075,7076,7077,7078,7079,7080,7081,7082,7083,7084,7085,7086,7087,7088,7089,7090,7091,7092,7093,7094,7095,7096,7097,7098,7099,7100,7101,7102,7103,7104,7105,7106,7107,7108,7109,7110,7111,7112,7113,7114,7115,7116,7117,7118,7119,7120,7121,7122,7123,7124,7125,7126,7127,7128,7129,7130,7131,7132,7133,7134,7135,7136,7137,7138,7139,7140,7141,7142,7143,7144,7145,7146,7147,7148,7149,7150,7151,7152,7153,7154,7155,7156, +7157,7158,7159,7160,7161,7162,7163,7164,7165,7166,7167,7168,7169,7170,7171,7172,7173,7174,7175,7176,7177,7178,7179,7180,7181,7182,7183,7184,7185,7186,7187,7188,7189,7190,7191,7192,7193,7194,7195,7196,7197,7198,7199,7200,7201,7202,7203,7204,7205,7206,7207,1395,7208,7209,7210,7211,7212,7213,1717,7214,7215,7216,7217,7218,7219,7220,7221,7222,7223,7224,7225,7226,7227,7228,7229,7230,7231,7232,7233,7234,7235,7236,7237,7238,7239,7240,7241,7242,7243,7244,7245,7246,7247,7248,7249,7250,7251,7252,7253,7254,7255, +7256,7257,7258,7259,7260,7261,7262,7263,7264,7265,7266,7267,7268,7269,7270,7271,7272,7273,7274,7275,7276,7277,7278,7279,7280,7281,7282,7283,7284,7285,7286,7287,7288,7289,7290,7291,7292,7293,7294,7295,7296,7297,7298,7299,7300,7301,7302,7303,7304,7305,7306,7307,7308,7309,7310,7311,7312,7313,1718,7314,7315,7316,7317,7318,7319,7320,7321,7322,7323,7324,7325,7326,7327,7328,7329,7330,7331,7332,7333,7334,7335,7336,7337,7338,7339,7340,7341,7342,7343,7344,7345,7346,7347,7348,7349,7350,7351,7352,7353,7354,7355, +7356,7357,7358,7359,7360,7361,7362,7363,7364,7365,7366,7367,7368,7369,7370,7371,7372,7373,7374,7375,7376,7377,7378,7379,7380,7381,7382,7383,7384,7385,7386,7387,7388,7389,7390,7391,7392,7393,7394,7395,7396,7397,7398,7399,7400,7401,7402,7403,7404,7405,7406,7407,7408,7409,7410,7411,7412,7413,7414,7415,7416,7417,7418,7419,7420,7421,7422,7423,7424,7425,7426,7427,7428,7429,7430,7431,7432,7433,7434,7435,7436,7437,7438,7439,7440,7441,7442,7443,7444,7445,7446,7447,7448,7449,7450,7451,7452,7453,7454,7455,7456, +7457,7458,7459,7460,7461,7462,7463,7464,7465,7466,7467,7468,7469,7470,7471,7472,7473,7474,7475,7476,7477,7478,7479,7480,7481,7482,7483,7484,7485,7486,7487,7488,7489,7490,7491,7492,7493,7494,7495,7496,7497,7498,7499,7500,7501,7502,7503,7504,7505,7506,7507,7508,7509,7510,7511,7512,7513,7514,7515,7516,7517,7518,7519,7520,7521,7522,7523,7524,7525,7526,7527,7528,7529,7530,7531,7532,7533,7534,7535,7536,7537,7538,7539,7540,7541,7542,7543,7544,7545,7546,7547,7548,7549,7550,7551,7552,7553,7554,7555,7556,7557, +7558,7559,7560,7561,7562,7563,7564,7565,7566,7567,7568,7569,7570,7571,7572,7573,7574,7575,7576,7577,7578,7579,7580,7581,7582,7583,7584,7585,7586,7587,7588,7589,7590,7591,7592,7593,7594,7595,7596,7597,7598,7599,7600,7601,7602,7603,7604,7605,7606,7607,7608,7609,7610,7611,7612,7613,7614,7615,7616,7617,7618,7619,7620,7621,7622,7623,7624,7625,7626,7627,7628,7629,7630,7631,7632,7633,7634,7635,7636,7637,7638,7639,7640,7641,7642,7643,7644,7645,7646,7647,7648,7649,7650,7651,7652,7653,7654,7655,7656,7657,7658, +7659,7660,7661,7662,7663,7664,7665,7666,7667,7668,7669,7670,7671,7672,7673,7674,7675,7676,7677,7678,7679,7680,7681,7682,7683,7684,7685,7686,7687,7688,7689,7690,7691,7692,7693,7694,7695,7696,7697,7698,7699,7700,7701,7702,7703,7704,7705,7706,7707,7708,7709,7710,7711,7712,7713,7714,7715,7716,7717,7718,7719,7720,7721,7722,7723,7724,7725,7726,7727,7728,7729,7730,7731,7732,7733,7734,7735,7736,7737,7738,7739,7740,7741,7742,7743,7744,7745,7746,7747,7748,7749,7750,7751,7752,7753,7754,7755,7756,7757,7758,7759, +7760,7761,7762,7763,7764,7765,7766,7767,7768,7769,7770,7771,7772,7773,7774,7775,7776,7777,7778,7779,7780,7781,7782,7783,7784,7785,7786,7787,7788,7789,7790,7791,7792,7793,7794,7795,7796,7797,7798,7799,7800,7801,7802,7803,7804,7805,7806,7807,7808,7809,7810,7811,7812,7813,7814,7815,7816,7817,7818,7819,7820,7821,7822,7823,7824,7825,7826,7827,7828,7829,7830,7831,7832,7833,7834,7835,7836,7837,7838,7839,7840,7841,7842,7843,7844,7845,7846,7847,7848,7849,7850,7851,7852,7853,7854,7855,7856,7857,7858,7859,7860, +7861,7862,7863,7864,7865,7866,7867,7868,7869,7870,7871,7872,7873,7874,7875,7876,7877,7878,7879,7880,7881,7882,7883,7884,7885,7886,7887,7888,7889,7890,7891,7892,7893,7894,7895,7896,7897,7898,7899,7900,7901,7902,7903,7904,7905,7906,7907,7908,7909,7910,7911,7912,7913,7914,7915,7916,7917,7918,7919,7920,7921,7922,7923,7924,7925,7926,7927,7928,7929,7930,7931,7932,7933,7934,7935,7936,7937,7938,7939,7940,7941,7942,7943,7944,7945,7946,7947,7948,7949,7950,7951,7952,7953,7954,7955,7956,7957,7958,7959,7960,7961, +7962,7963,7964,7965,7966,7967,7968,7969,7970,7971,7972,7973,7974,7975,7976,7977,7978,7979,7980,7981,7982,7983,7984,7985,7986,7987,7988,7989,7990,7991,7992,7993,7994,7995,7996,7997,7998,7999,8E3,8001,8002,8003,8004,8005,8006,8007,8008,8009,8010,8011,8012,8013,8014,8015,8016,8017,8018,8019,8020,8021,8022,8023,8024,8025,8026,8027,8028,8029,8030,8031,8032,8033,8034,8035,8036,8037,8038,8039,8040,8041,8042,8043,8044,8045,8046,8047,8048,8049,8050,8051,8052,8053,8054,8055,8056,8057,8058,8059,8060,8061,8062, +8063,8064,8065,8066,8067,8068,8069,8070,8071,8072,8073,8074,8075,8076,8077,8078,8079,8080,8081,8082,8083,8084,8085,8086,8087,8088,8089,8090,8091,8092,8093,8094,8095,8096,8097,8098,8099,8100,8101,8102,8103,8104,8105,8106,8107,8108,8109,8110,8111,8112,8113,8114,8115,8116,8117,8118,8119,8120,8121,8122,8123,8124,8125,8126,8127,8128,8129,8130,8131,8132,8133,8134,8135,8136,8137,8138,8139,8140,8141,8142,8143,8144,8145,8146,8147,8148,8149,8150,8151,8152,8153,8154,8155,8156,8157,8158,8159,8160,8161,8162,8163, +8164,8165,8166,8167,8168,8169,8170,8171,8172,8173,8174,8175,8176,8177,8178,8179,8180,8181,8182,8183,8184,8185,8186,8187,8188,8189,8190,8191,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8208,8209,8210,8211,8212,8213,8214,8215,8216,8217,8218,8219,8220,8221,8222,8223,8224,8225,8226,8227,8228,8229,8230,8231,8232,8233,8234,8235,8236,8237,8238,8239,8240,8241,8242,8243,8244,8245,8246,8247,8248,8249,8250,8251,8252,8253,8254,8255,8256,8257,8258,8259,8260,8261,8262,8263,8264, +8265,8266,8267,8268,8269,8270,8271,8272,8273,8274,8275,8276,8277,8278,8279,8280,8281,8282,8283,8284,8285,8286,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,8304,8305,8306,8307,8308,8309,8310,8311,8312,8313,8314,8315,8316,8317,8318,8319,8320,8321,8322,8323,8324,8325,8326,8327,8328,8329,8330,8331,8332,8333,8334,8335,8336,8337,8338,8339,8340,8341,8342,8343,8344,8345,8346,8347,8348,8349,8350,8351,8352,8353,8354,8355,8356,8357,8358,8359,8360,8361,8362,8363,8364,8365, +8366,8367,8368,8369,8370,8371,8372,8373,8374,8375,8376,8377,8378,8379,8380,8381,8382,8383,8384,8385,8386,8387,8388,8389,8390,8391,8392,8393,8394,8395,8396,8397,8398,8399,8400,8401,8402,8403,8404,8405,8406,8407,8408,8409,8410,8411,8412,8413,8414,8415,8416,8417,8418,8419,8420,8421,8422,8423,8424,8425,8426,8427,8428,8429,8430,8431,8432,8433,8434,8435,8436,8437,8438,8439,8440,8441,8442,8443,8444,8445,8446,8447,8448,8449,8450,8451,8452,8453,8454,8455,8456,8457,8458,8459,8460,8461,8462,8463,8464,8465,8466, +8467,8468,8469,8470,8471,8472,8473,8474,8475,8476,8477,8478,8479,8480,8481,8482,8483,8484,8485,8486,8487,8488,8489,8490,8491,8492,8493,8494,8495,8496,8497,8498,8499,8500,8501,8502,8503,8504,8505,8506,8507,8508,8509,8510,8511,8512,8513,8514,8515,8516,8517,8518,8519,8520,8521,8522,8523,8524,8525,8526,8527,8528,8529,8530,8531,8532,8533,8534,8535,8536,8537,8538,8539,8540,8541,8542,8543,8544,8545,8546,8547,8548,8549,8550,8551,8552,8553,8554,8555,8556,8557,8558,8559,8560,8561,8562,8563,8564,8565,8566,8567, +8568,8569,8570,8571,8572,8573,8574,8575,8576,8577,8578,8579,8580,8581,8582,8583,8584,8585,8586,8587,8588,8589,8590,8591,8592,8593,8594,8595,8596,8597,8598,8599,8600,8601,8602,8603,8604,8605,8606,8607,8608,8609,8610,8611,8612,8613,8614,8615,8616,8617,8618,8619,8620,8621,8622,8623,8624,8625,8626,8627,8628,8629,8630,8631,8632,8633,8634,8635,8636,8637,8638,8639,8640,8641,8642,8643,8644,8645,8646,8647,8648,8649,8650,8651,8652,8653,8654,8655,8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668, +8669,8670,8671,8672,8673,8674,8675,8676,8677,8678,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699,8700,8701,8702,8703,8704,8705,8706,8707,8708,8709,8710,8711,8712,8713,8714,8715,8716,8717,8718,8719,8720,8721,8722,8723,8724,8725,8726,8727,8728,8729,8730,8731,8732,8733,8734,8735,8736,8737,8738,8739,8740,8741];!0},{"./init":21}],14:[function(b,a,d){!function(a){a.EUCKRProber=function(){a.MultiByteCharSetProber.apply(this);this.getCharsetName=function(){return"EUC-KR"}; +this._mCodingSM=new a.CodingStateMachine(a.EUCKRSMModel);this._mDistributionAnalyzer=new a.EUCKRDistributionAnalysis;this.reset()};a.EUCKRProber.prototype=new a.MultiByteCharSetProber}(b("./init"))},{"./init":21}],15:[function(b,a,d){b=b("./init");b.EUCTW_TYPICAL_DISTRIBUTION_RATIO=.75;b.EUCTW_TABLE_SIZE=8102;b.EUCTWCharToFreqOrder=[1,1800,1506,255,1431,198,9,82,6,7310,177,202,3615,1256,2808,110,3735,33,3241,261,76,44,2113,16,2931,2184,1176,659,3868,26,3404,2643,1198,3869,3313,4060,410,2211,302,590, +361,1963,8,204,58,4296,7311,1931,63,7312,7313,317,1614,75,222,159,4061,2412,1480,7314,3500,3068,224,2809,3616,3,10,3870,1471,29,2774,1135,2852,1939,873,130,3242,1123,312,7315,4297,2051,507,252,682,7316,142,1914,124,206,2932,34,3501,3173,64,604,7317,2494,1976,1977,155,1990,645,641,1606,7318,3405,337,72,406,7319,80,630,238,3174,1509,263,939,1092,2644,756,1440,1094,3406,449,69,2969,591,179,2095,471,115,2034,1843,60,50,2970,134,806,1868,734,2035,3407,180,995,1607,156,537,2893,688,7320,319,1305,779,2144, +514,2374,298,4298,359,2495,90,2707,1338,663,11,906,1099,2545,20,2436,182,532,1716,7321,732,1376,4062,1311,1420,3175,25,2312,1056,113,399,382,1949,242,3408,2467,529,3243,475,1447,3617,7322,117,21,656,810,1297,2295,2329,3502,7323,126,4063,706,456,150,613,4299,71,1118,2036,4064,145,3069,85,835,486,2114,1246,1426,428,727,1285,1015,800,106,623,303,1281,7324,2127,2354,347,3736,221,3503,3110,7325,1955,1153,4065,83,296,1199,3070,192,624,93,7326,822,1897,2810,3111,795,2064,991,1554,1542,1592,27,43,2853,859, +139,1456,860,4300,437,712,3871,164,2392,3112,695,211,3017,2096,195,3872,1608,3504,3505,3618,3873,234,811,2971,2097,3874,2229,1441,3506,1615,2375,668,2076,1638,305,228,1664,4301,467,415,7327,262,2098,1593,239,108,300,200,1033,512,1247,2077,7328,7329,2173,3176,3619,2673,593,845,1062,3244,88,1723,2037,3875,1950,212,266,152,149,468,1898,4066,4302,77,187,7330,3018,37,5,2972,7331,3876,7332,7333,39,2517,4303,2894,3177,2078,55,148,74,4304,545,483,1474,1029,1665,217,1869,1531,3113,1104,2645,4067,24,172,3507, +900,3877,3508,3509,4305,32,1408,2811,1312,329,487,2355,2247,2708,784,2674,4,3019,3314,1427,1788,188,109,499,7334,3620,1717,1789,888,1217,3020,4306,7335,3510,7336,3315,1520,3621,3878,196,1034,775,7337,7338,929,1815,249,439,38,7339,1063,7340,794,3879,1435,2296,46,178,3245,2065,7341,2376,7342,214,1709,4307,804,35,707,324,3622,1601,2546,140,459,4068,7343,7344,1365,839,272,978,2257,2572,3409,2128,1363,3623,1423,697,100,3071,48,70,1231,495,3114,2193,7345,1294,7346,2079,462,586,1042,3246,853,256,988,185, +2377,3410,1698,434,1084,7347,3411,314,2615,2775,4308,2330,2331,569,2280,637,1816,2518,757,1162,1878,1616,3412,287,1577,2115,768,4309,1671,2854,3511,2519,1321,3737,909,2413,7348,4069,933,3738,7349,2052,2356,1222,4310,765,2414,1322,786,4311,7350,1919,1462,1677,2895,1699,7351,4312,1424,2437,3115,3624,2590,3316,1774,1940,3413,3880,4070,309,1369,1130,2812,364,2230,1653,1299,3881,3512,3882,3883,2646,525,1085,3021,902,2E3,1475,964,4313,421,1844,1415,1057,2281,940,1364,3116,376,4314,4315,1381,7,2520,983, +2378,336,1710,2675,1845,321,3414,559,1131,3022,2742,1808,1132,1313,265,1481,1857,7352,352,1203,2813,3247,167,1089,420,2814,776,792,1724,3513,4071,2438,3248,7353,4072,7354,446,229,333,2743,901,3739,1200,1557,4316,2647,1920,395,2744,2676,3740,4073,1835,125,916,3178,2616,4317,7355,7356,3741,7357,7358,7359,4318,3117,3625,1133,2547,1757,3415,1510,2313,1409,3514,7360,2145,438,2591,2896,2379,3317,1068,958,3023,461,311,2855,2677,4074,1915,3179,4075,1978,383,750,2745,2617,4076,274,539,385,1278,1442,7361,1154, +1964,384,561,210,98,1295,2548,3515,7362,1711,2415,1482,3416,3884,2897,1257,129,7363,3742,642,523,2776,2777,2648,7364,141,2231,1333,68,176,441,876,907,4077,603,2592,710,171,3417,404,549,18,3118,2393,1410,3626,1666,7365,3516,4319,2898,4320,7366,2973,368,7367,146,366,99,871,3627,1543,748,807,1586,1185,22,2258,379,3743,3180,7368,3181,505,1941,2618,1991,1382,2314,7369,380,2357,218,702,1817,1248,3418,3024,3517,3318,3249,7370,2974,3628,930,3250,3744,7371,59,7372,585,601,4078,497,3419,1112,1314,4321,1801, +7373,1223,1472,2174,7374,749,1836,690,1899,3745,1772,3885,1476,429,1043,1790,2232,2116,917,4079,447,1086,1629,7375,556,7376,7377,2020,1654,844,1090,105,550,966,1758,2815,1008,1782,686,1095,7378,2282,793,1602,7379,3518,2593,4322,4080,2933,2297,4323,3746,980,2496,544,353,527,4324,908,2678,2899,7380,381,2619,1942,1348,7381,1341,1252,560,3072,7382,3420,2856,7383,2053,973,886,2080,143,4325,7384,7385,157,3886,496,4081,57,840,540,2038,4326,4327,3421,2117,1445,970,2259,1748,1965,2081,4082,3119,1234,1775, +3251,2816,3629,773,1206,2129,1066,2039,1326,3887,1738,1725,4083,279,3120,51,1544,2594,423,1578,2130,2066,173,4328,1879,7386,7387,1583,264,610,3630,4329,2439,280,154,7388,7389,7390,1739,338,1282,3073,693,2857,1411,1074,3747,2440,7391,4330,7392,7393,1240,952,2394,7394,2900,1538,2679,685,1483,4084,2468,1436,953,4085,2054,4331,671,2395,79,4086,2441,3252,608,567,2680,3422,4087,4088,1691,393,1261,1791,2396,7395,4332,7396,7397,7398,7399,1383,1672,3748,3182,1464,522,1119,661,1150,216,675,4333,3888,1432,3519, +609,4334,2681,2397,7400,7401,7402,4089,3025,0,7403,2469,315,231,2442,301,3319,4335,2380,7404,233,4090,3631,1818,4336,4337,7405,96,1776,1315,2082,7406,257,7407,1809,3632,2709,1139,1819,4091,2021,1124,2163,2778,1777,2649,7408,3074,363,1655,3183,7409,2975,7410,7411,7412,3889,1567,3890,718,103,3184,849,1443,341,3320,2934,1484,7413,1712,127,67,339,4092,2398,679,1412,821,7414,7415,834,738,351,2976,2146,846,235,1497,1880,418,1992,3749,2710,186,1100,2147,2746,3520,1545,1355,2935,2858,1377,583,3891,4093,2573, +2977,7416,1298,3633,1078,2549,3634,2358,78,3750,3751,267,1289,2099,2001,1594,4094,348,369,1274,2194,2175,1837,4338,1820,2817,3635,2747,2283,2002,4339,2936,2748,144,3321,882,4340,3892,2749,3423,4341,2901,7417,4095,1726,320,7418,3893,3026,788,2978,7419,2818,1773,1327,2859,3894,2819,7420,1306,4342,2003,1700,3752,3521,2359,2650,787,2022,506,824,3636,534,323,4343,1044,3322,2023,1900,946,3424,7421,1778,1500,1678,7422,1881,4344,165,243,4345,3637,2521,123,683,4096,764,4346,36,3895,1792,589,2902,816,626,1667, +3027,2233,1639,1555,1622,3753,3896,7423,3897,2860,1370,1228,1932,891,2083,2903,304,4097,7424,292,2979,2711,3522,691,2100,4098,1115,4347,118,662,7425,611,1156,854,2381,1316,2861,2,386,515,2904,7426,7427,3253,868,2234,1486,855,2651,785,2212,3028,7428,1040,3185,3523,7429,3121,448,7430,1525,7431,2164,4348,7432,3754,7433,4099,2820,3524,3122,503,818,3898,3123,1568,814,676,1444,306,1749,7434,3755,1416,1030,197,1428,805,2821,1501,4349,7435,7436,7437,1993,7438,4350,7439,7440,2195,13,2779,3638,2980,3124,1229, +1916,7441,3756,2131,7442,4100,4351,2399,3525,7443,2213,1511,1727,1120,7444,7445,646,3757,2443,307,7446,7447,1595,3186,7448,7449,7450,3639,1113,1356,3899,1465,2522,2523,7451,519,7452,128,2132,92,2284,1979,7453,3900,1512,342,3125,2196,7454,2780,2214,1980,3323,7455,290,1656,1317,789,827,2360,7456,3758,4352,562,581,3901,7457,401,4353,2248,94,4354,1399,2781,7458,1463,2024,4355,3187,1943,7459,828,1105,4101,1262,1394,7460,4102,605,4356,7461,1783,2862,7462,2822,819,2101,578,2197,2937,7463,1502,436,3254,4103, +3255,2823,3902,2905,3425,3426,7464,2712,2315,7465,7466,2332,2067,23,4357,193,826,3759,2102,699,1630,4104,3075,390,1793,1064,3526,7467,1579,3076,3077,1400,7468,4105,1838,1640,2863,7469,4358,4359,137,4106,598,3078,1966,780,104,974,2938,7470,278,899,253,402,572,504,493,1339,7471,3903,1275,4360,2574,2550,7472,3640,3029,3079,2249,565,1334,2713,863,41,7473,7474,4361,7475,1657,2333,19,463,2750,4107,606,7476,2981,3256,1087,2084,1323,2652,2982,7477,1631,1623,1750,4108,2682,7478,2864,791,2714,2653,2334,232, +2416,7479,2983,1498,7480,2654,2620,755,1366,3641,3257,3126,2025,1609,119,1917,3427,862,1026,4109,7481,3904,3760,4362,3905,4363,2260,1951,2470,7482,1125,817,4110,4111,3906,1513,1766,2040,1487,4112,3030,3258,2824,3761,3127,7483,7484,1507,7485,2683,733,40,1632,1106,2865,345,4113,841,2524,230,4364,2984,1846,3259,3428,7486,1263,986,3429,7487,735,879,254,1137,857,622,1300,1180,1388,1562,3907,3908,2939,967,2751,2655,1349,592,2133,1692,3324,2985,1994,4114,1679,3909,1901,2185,7488,739,3642,2715,1296,1290, +7489,4115,2198,2199,1921,1563,2595,2551,1870,2752,2986,7490,435,7491,343,1108,596,17,1751,4365,2235,3430,3643,7492,4366,294,3527,2940,1693,477,979,281,2041,3528,643,2042,3644,2621,2782,2261,1031,2335,2134,2298,3529,4367,367,1249,2552,7493,3530,7494,4368,1283,3325,2004,240,1762,3326,4369,4370,836,1069,3128,474,7495,2148,2525,268,3531,7496,3188,1521,1284,7497,1658,1546,4116,7498,3532,3533,7499,4117,3327,2684,1685,4118,961,1673,2622,190,2005,2200,3762,4371,4372,7500,570,2497,3645,1490,7501,4373,2623, +3260,1956,4374,584,1514,396,1045,1944,7502,4375,1967,2444,7503,7504,4376,3910,619,7505,3129,3261,215,2006,2783,2553,3189,4377,3190,4378,763,4119,3763,4379,7506,7507,1957,1767,2941,3328,3646,1174,452,1477,4380,3329,3130,7508,2825,1253,2382,2186,1091,2285,4120,492,7509,638,1169,1824,2135,1752,3911,648,926,1021,1324,4381,520,4382,997,847,1007,892,4383,3764,2262,1871,3647,7510,2400,1784,4384,1952,2942,3080,3191,1728,4121,2043,3648,4385,2007,1701,3131,1551,30,2263,4122,7511,2026,4386,3534,7512,501,7513, +4123,594,3431,2165,1821,3535,3432,3536,3192,829,2826,4124,7514,1680,3132,1225,4125,7515,3262,4387,4126,3133,2336,7516,4388,4127,7517,3912,3913,7518,1847,2383,2596,3330,7519,4389,374,3914,652,4128,4129,375,1140,798,7520,7521,7522,2361,4390,2264,546,1659,138,3031,2445,4391,7523,2250,612,1848,910,796,3765,1740,1371,825,3766,3767,7524,2906,2554,7525,692,444,3032,2624,801,4392,4130,7526,1491,244,1053,3033,4131,4132,340,7527,3915,1041,2987,293,1168,87,1357,7528,1539,959,7529,2236,721,694,4133,3768,219, +1478,644,1417,3331,2656,1413,1401,1335,1389,3916,7530,7531,2988,2362,3134,1825,730,1515,184,2827,66,4393,7532,1660,2943,246,3332,378,1457,226,3433,975,3917,2944,1264,3537,674,696,7533,163,7534,1141,2417,2166,713,3538,3333,4394,3918,7535,7536,1186,15,7537,1079,1070,7538,1522,3193,3539,276,1050,2716,758,1126,653,2945,3263,7539,2337,889,3540,3919,3081,2989,903,1250,4395,3920,3434,3541,1342,1681,1718,766,3264,286,89,2946,3649,7540,1713,7541,2597,3334,2990,7542,2947,2215,3194,2866,7543,4396,2498,2526, +181,387,1075,3921,731,2187,3335,7544,3265,310,313,3435,2299,770,4134,54,3034,189,4397,3082,3769,3922,7545,1230,1617,1849,355,3542,4135,4398,3336,111,4136,3650,1350,3135,3436,3035,4137,2149,3266,3543,7546,2784,3923,3924,2991,722,2008,7547,1071,247,1207,2338,2471,1378,4399,2009,864,1437,1214,4400,373,3770,1142,2216,667,4401,442,2753,2555,3771,3925,1968,4138,3267,1839,837,170,1107,934,1336,1882,7548,7549,2118,4139,2828,743,1569,7550,4402,4140,582,2384,1418,3437,7551,1802,7552,357,1395,1729,3651,3268, +2418,1564,2237,7553,3083,3772,1633,4403,1114,2085,4141,1532,7554,482,2446,4404,7555,7556,1492,833,1466,7557,2717,3544,1641,2829,7558,1526,1272,3652,4142,1686,1794,416,2556,1902,1953,1803,7559,3773,2785,3774,1159,2316,7560,2867,4405,1610,1584,3036,2419,2754,443,3269,1163,3136,7561,7562,3926,7563,4143,2499,3037,4406,3927,3137,2103,1647,3545,2010,1872,4144,7564,4145,431,3438,7565,250,97,81,4146,7566,1648,1850,1558,160,848,7567,866,740,1694,7568,2201,2830,3195,4147,4407,3653,1687,950,2472,426,469,3196, +3654,3655,3928,7569,7570,1188,424,1995,861,3546,4148,3775,2202,2685,168,1235,3547,4149,7571,2086,1674,4408,3337,3270,220,2557,1009,7572,3776,670,2992,332,1208,717,7573,7574,3548,2447,3929,3338,7575,513,7576,1209,2868,3339,3138,4409,1080,7577,7578,7579,7580,2527,3656,3549,815,1587,3930,3931,7581,3550,3439,3777,1254,4410,1328,3038,1390,3932,1741,3933,3778,3934,7582,236,3779,2448,3271,7583,7584,3657,3780,1273,3781,4411,7585,308,7586,4412,245,4413,1851,2473,1307,2575,430,715,2136,2449,7587,270,199,2869, +3935,7588,3551,2718,1753,761,1754,725,1661,1840,4414,3440,3658,7589,7590,587,14,3272,227,2598,326,480,2265,943,2755,3552,291,650,1883,7591,1702,1226,102,1547,62,3441,904,4415,3442,1164,4150,7592,7593,1224,1548,2756,391,498,1493,7594,1386,1419,7595,2055,1177,4416,813,880,1081,2363,566,1145,4417,2286,1001,1035,2558,2599,2238,394,1286,7596,7597,2068,7598,86,1494,1730,3936,491,1588,745,897,2948,843,3340,3937,2757,2870,3273,1768,998,2217,2069,397,1826,1195,1969,3659,2993,3341,284,7599,3782,2500,2137,2119, +1903,7600,3938,2150,3939,4151,1036,3443,1904,114,2559,4152,209,1527,7601,7602,2949,2831,2625,2385,2719,3139,812,2560,7603,3274,7604,1559,737,1884,3660,1210,885,28,2686,3553,3783,7605,4153,1004,1779,4418,7606,346,1981,2218,2687,4419,3784,1742,797,1642,3940,1933,1072,1384,2151,896,3941,3275,3661,3197,2871,3554,7607,2561,1958,4420,2450,1785,7608,7609,7610,3942,4154,1005,1308,3662,4155,2720,4421,4422,1528,2600,161,1178,4156,1982,987,4423,1101,4157,631,3943,1157,3198,2420,1343,1241,1016,2239,2562,372, +877,2339,2501,1160,555,1934,911,3944,7611,466,1170,169,1051,2907,2688,3663,2474,2994,1182,2011,2563,1251,2626,7612,992,2340,3444,1540,2721,1201,2070,2401,1996,2475,7613,4424,528,1922,2188,1503,1873,1570,2364,3342,3276,7614,557,1073,7615,1827,3445,2087,2266,3140,3039,3084,767,3085,2786,4425,1006,4158,4426,2341,1267,2176,3664,3199,778,3945,3200,2722,1597,2657,7616,4427,7617,3446,7618,7619,7620,3277,2689,1433,3278,131,95,1504,3946,723,4159,3141,1841,3555,2758,2189,3947,2027,2104,3665,7621,2995,3948, +1218,7622,3343,3201,3949,4160,2576,248,1634,3785,912,7623,2832,3666,3040,3786,654,53,7624,2996,7625,1688,4428,777,3447,1032,3950,1425,7626,191,820,2120,2833,971,4429,931,3202,135,664,783,3787,1997,772,2908,1935,3951,3788,4430,2909,3203,282,2723,640,1372,3448,1127,922,325,3344,7627,7628,711,2044,7629,7630,3952,2219,2787,1936,3953,3345,2220,2251,3789,2300,7631,4431,3790,1258,3279,3954,3204,2138,2950,3955,3956,7632,2221,258,3205,4432,101,1227,7633,3280,1755,7634,1391,3281,7635,2910,2056,893,7636,7637, +7638,1402,4161,2342,7639,7640,3206,3556,7641,7642,878,1325,1780,2788,4433,259,1385,2577,744,1183,2267,4434,7643,3957,2502,7644,684,1024,4162,7645,472,3557,3449,1165,3282,3958,3959,322,2152,881,455,1695,1152,1340,660,554,2153,4435,1058,4436,4163,830,1065,3346,3960,4437,1923,7646,1703,1918,7647,932,2268,122,7648,4438,947,677,7649,3791,2627,297,1905,1924,2269,4439,2317,3283,7650,7651,4164,7652,4165,84,4166,112,989,7653,547,1059,3961,701,3558,1019,7654,4167,7655,3450,942,639,457,2301,2451,993,2951,407, +851,494,4440,3347,927,7656,1237,7657,2421,3348,573,4168,680,921,2911,1279,1874,285,790,1448,1983,719,2167,7658,7659,4441,3962,3963,1649,7660,1541,563,7661,1077,7662,3349,3041,3451,511,2997,3964,3965,3667,3966,1268,2564,3350,3207,4442,4443,7663,535,1048,1276,1189,2912,2028,3142,1438,1373,2834,2952,1134,2012,7664,4169,1238,2578,3086,1259,7665,700,7666,2953,3143,3668,4170,7667,4171,1146,1875,1906,4444,2601,3967,781,2422,132,1589,203,147,273,2789,2402,898,1786,2154,3968,3969,7668,3792,2790,7669,7670, +4445,4446,7671,3208,7672,1635,3793,965,7673,1804,2690,1516,3559,1121,1082,1329,3284,3970,1449,3794,65,1128,2835,2913,2759,1590,3795,7674,7675,12,2658,45,976,2579,3144,4447,517,2528,1013,1037,3209,7676,3796,2836,7677,3797,7678,3452,7679,2602,614,1998,2318,3798,3087,2724,2628,7680,2580,4172,599,1269,7681,1810,3669,7682,2691,3088,759,1060,489,1805,3351,3285,1358,7683,7684,2386,1387,1215,2629,2252,490,7685,7686,4173,1759,2387,2343,7687,4448,3799,1907,3971,2630,1806,3210,4449,3453,3286,2760,2344,874,7688, +7689,3454,3670,1858,91,2914,3671,3042,3800,4450,7690,3145,3972,2659,7691,3455,1202,1403,3801,2954,2529,1517,2503,4451,3456,2504,7692,4452,7693,2692,1885,1495,1731,3973,2365,4453,7694,2029,7695,7696,3974,2693,1216,237,2581,4174,2319,3975,3802,4454,4455,2694,3560,3457,445,4456,7697,7698,7699,7700,2761,61,3976,3672,1822,3977,7701,687,2045,935,925,405,2660,703,1096,1859,2725,4457,3978,1876,1367,2695,3352,918,2105,1781,2476,334,3287,1611,1093,4458,564,3146,3458,3673,3353,945,2631,2057,4459,7702,1925,872, +4175,7703,3459,2696,3089,349,4176,3674,3979,4460,3803,4177,3675,2155,3980,4461,4462,4178,4463,2403,2046,782,3981,400,251,4179,1624,7704,7705,277,3676,299,1265,476,1191,3804,2121,4180,4181,1109,205,7706,2582,1E3,2156,3561,1860,7707,7708,7709,4464,7710,4465,2565,107,2477,2157,3982,3460,3147,7711,1533,541,1301,158,753,4182,2872,3562,7712,1696,370,1088,4183,4466,3563,579,327,440,162,2240,269,1937,1374,3461,968,3043,56,1396,3090,2106,3288,3354,7713,1926,2158,4467,2998,7714,3564,7715,7716,3677,4468,2478, +7717,2791,7718,1650,4469,7719,2603,7720,7721,3983,2661,3355,1149,3356,3984,3805,3985,7722,1076,49,7723,951,3211,3289,3290,450,2837,920,7724,1811,2792,2366,4184,1908,1138,2367,3806,3462,7725,3212,4470,1909,1147,1518,2423,4471,3807,7726,4472,2388,2604,260,1795,3213,7727,7728,3808,3291,708,7729,3565,1704,7730,3566,1351,1618,3357,2999,1886,944,4185,3358,4186,3044,3359,4187,7731,3678,422,413,1714,3292,500,2058,2345,4188,2479,7732,1344,1910,954,7733,1668,7734,7735,3986,2404,4189,3567,3809,4190,7736,2302, +1318,2505,3091,133,3092,2873,4473,629,31,2838,2697,3810,4474,850,949,4475,3987,2955,1732,2088,4191,1496,1852,7737,3988,620,3214,981,1242,3679,3360,1619,3680,1643,3293,2139,2452,1970,1719,3463,2168,7738,3215,7739,7740,3361,1828,7741,1277,4476,1565,2047,7742,1636,3568,3093,7743,869,2839,655,3811,3812,3094,3989,3E3,3813,1310,3569,4477,7744,7745,7746,1733,558,4478,3681,335,1549,3045,1756,4192,3682,1945,3464,1829,1291,1192,470,2726,2107,2793,913,1054,3990,7747,1027,7748,3046,3991,4479,982,2662,3362,3148, +3465,3216,3217,1946,2794,7749,571,4480,7750,1830,7751,3570,2583,1523,2424,7752,2089,984,4481,3683,1959,7753,3684,852,923,2795,3466,3685,969,1519,999,2048,2320,1705,7754,3095,615,1662,151,597,3992,2405,2321,1049,275,4482,3686,4193,568,3687,3571,2480,4194,3688,7755,2425,2270,409,3218,7756,1566,2874,3467,1002,769,2840,194,2090,3149,3689,2222,3294,4195,628,1505,7757,7758,1763,2177,3001,3993,521,1161,2584,1787,2203,2406,4483,3994,1625,4196,4197,412,42,3096,464,7759,2632,4484,3363,1760,1571,2875,3468,2530, +1219,2204,3814,2633,2140,2368,4485,4486,3295,1651,3364,3572,7760,7761,3573,2481,3469,7762,3690,7763,7764,2271,2091,460,7765,4487,7766,3002,962,588,3574,289,3219,2634,1116,52,7767,3047,1796,7768,7769,7770,1467,7771,1598,1143,3691,4198,1984,1734,1067,4488,1280,3365,465,4489,1572,510,7772,1927,2241,1812,1644,3575,7773,4490,3692,7774,7775,2663,1573,1534,7776,7777,4199,536,1807,1761,3470,3815,3150,2635,7778,7779,7780,4491,3471,2915,1911,2796,7781,3296,1122,377,3220,7782,360,7783,7784,4200,1529,551,7785, +2059,3693,1769,2426,7786,2916,4201,3297,3097,2322,2108,2030,4492,1404,136,1468,1479,672,1171,3221,2303,271,3151,7787,2762,7788,2049,678,2727,865,1947,4493,7789,2013,3995,2956,7790,2728,2223,1397,3048,3694,4494,4495,1735,2917,3366,3576,7791,3816,509,2841,2453,2876,3817,7792,7793,3152,3153,4496,4202,2531,4497,2304,1166,1010,552,681,1887,7794,7795,2957,2958,3996,1287,1596,1861,3154,358,453,736,175,478,1117,905,1167,1097,7796,1853,1530,7797,1706,7798,2178,3472,2287,3695,3473,3577,4203,2092,4204,7799, +3367,1193,2482,4205,1458,2190,2205,1862,1888,1421,3298,2918,3049,2179,3474,595,2122,7800,3997,7801,7802,4206,1707,2636,223,3696,1359,751,3098,183,3475,7803,2797,3003,419,2369,633,704,3818,2389,241,7804,7805,7806,838,3004,3697,2272,2763,2454,3819,1938,2050,3998,1309,3099,2242,1181,7807,1136,2206,3820,2370,1446,4207,2305,4498,7808,7809,4208,1055,2605,484,3698,7810,3999,625,4209,2273,3368,1499,4210,4E3,7811,4001,4211,3222,2274,2275,3476,7812,7813,2764,808,2606,3699,3369,4002,4212,3100,2532,526,3370, +3821,4213,955,7814,1620,4214,2637,2427,7815,1429,3700,1669,1831,994,928,7816,3578,1260,7817,7818,7819,1948,2288,741,2919,1626,4215,2729,2455,867,1184,362,3371,1392,7820,7821,4003,4216,1770,1736,3223,2920,4499,4500,1928,2698,1459,1158,7822,3050,3372,2877,1292,1929,2506,2842,3701,1985,1187,2071,2014,2607,4217,7823,2566,2507,2169,3702,2483,3299,7824,3703,4501,7825,7826,666,1003,3005,1022,3579,4218,7827,4502,1813,2253,574,3822,1603,295,1535,705,3823,4219,283,858,417,7828,7829,3224,4503,4504,3051,1220, +1889,1046,2276,2456,4004,1393,1599,689,2567,388,4220,7830,2484,802,7831,2798,3824,2060,1405,2254,7832,4505,3825,2109,1052,1345,3225,1585,7833,809,7834,7835,7836,575,2730,3477,956,1552,1469,1144,2323,7837,2324,1560,2457,3580,3226,4005,616,2207,3155,2180,2289,7838,1832,7839,3478,4506,7840,1319,3704,3705,1211,3581,1023,3227,1293,2799,7841,7842,7843,3826,607,2306,3827,762,2878,1439,4221,1360,7844,1485,3052,7845,4507,1038,4222,1450,2061,2638,4223,1379,4508,2585,7846,7847,4224,1352,1414,2325,2921,1172, +7848,7849,3828,3829,7850,1797,1451,7851,7852,7853,7854,2922,4006,4007,2485,2346,411,4008,4009,3582,3300,3101,4509,1561,2664,1452,4010,1375,7855,7856,47,2959,316,7857,1406,1591,2923,3156,7858,1025,2141,3102,3157,354,2731,884,2224,4225,2407,508,3706,726,3583,996,2428,3584,729,7859,392,2191,1453,4011,4510,3707,7860,7861,2458,3585,2608,1675,2800,919,2347,2960,2348,1270,4511,4012,73,7862,7863,647,7864,3228,2843,2255,1550,1346,3006,7865,1332,883,3479,7866,7867,7868,7869,3301,2765,7870,1212,831,1347,4226, +4512,2326,3830,1863,3053,720,3831,4513,4514,3832,7871,4227,7872,7873,4515,7874,7875,1798,4516,3708,2609,4517,3586,1645,2371,7876,7877,2924,669,2208,2665,2429,7878,2879,7879,7880,1028,3229,7881,4228,2408,7882,2256,1353,7883,7884,4518,3158,518,7885,4013,7886,4229,1960,7887,2142,4230,7888,7889,3007,2349,2350,3833,516,1833,1454,4014,2699,4231,4519,2225,2610,1971,1129,3587,7890,2766,7891,2961,1422,577,1470,3008,1524,3373,7892,7893,432,4232,3054,3480,7894,2586,1455,2508,2226,1972,1175,7895,1020,2732,4015, +3481,4520,7896,2733,7897,1743,1361,3055,3482,2639,4016,4233,4521,2290,895,924,4234,2170,331,2243,3056,166,1627,3057,1098,7898,1232,2880,2227,3374,4522,657,403,1196,2372,542,3709,3375,1600,4235,3483,7899,4523,2767,3230,576,530,1362,7900,4524,2533,2666,3710,4017,7901,842,3834,7902,2801,2031,1014,4018,213,2700,3376,665,621,4236,7903,3711,2925,2430,7904,2431,3302,3588,3377,7905,4237,2534,4238,4525,3589,1682,4239,3484,1380,7906,724,2277,600,1670,7907,1337,1233,4526,3103,2244,7908,1621,4527,7909,651,4240, +7910,1612,4241,2611,7911,2844,7912,2734,2307,3058,7913,716,2459,3059,174,1255,2701,4019,3590,548,1320,1398,728,4020,1574,7914,1890,1197,3060,4021,7915,3061,3062,3712,3591,3713,747,7916,635,4242,4528,7917,7918,7919,4243,7920,7921,4529,7922,3378,4530,2432,451,7923,3714,2535,2072,4244,2735,4245,4022,7924,1764,4531,7925,4246,350,7926,2278,2390,2486,7927,4247,4023,2245,1434,4024,488,4532,458,4248,4025,3715,771,1330,2391,3835,2568,3159,2159,2409,1553,2667,3160,4249,7928,2487,2881,2612,1720,2702,4250,3379, +4533,7929,2536,4251,7930,3231,4252,2768,7931,2015,2736,7932,1155,1017,3716,3836,7933,3303,2308,201,1864,4253,1430,7934,4026,7935,7936,7937,7938,7939,4254,1604,7940,414,1865,371,2587,4534,4535,3485,2016,3104,4536,1708,960,4255,887,389,2171,1536,1663,1721,7941,2228,4027,2351,2926,1580,7942,7943,7944,1744,7945,2537,4537,4538,7946,4539,7947,2073,7948,7949,3592,3380,2882,4256,7950,4257,2640,3381,2802,673,2703,2460,709,3486,4028,3593,4258,7951,1148,502,634,7952,7953,1204,4540,3594,1575,4541,2613,3717,7954, +3718,3105,948,3232,121,1745,3837,1110,7955,4259,3063,2509,3009,4029,3719,1151,1771,3838,1488,4030,1986,7956,2433,3487,7957,7958,2093,7959,4260,3839,1213,1407,2803,531,2737,2538,3233,1011,1537,7960,2769,4261,3106,1061,7961,3720,3721,1866,2883,7962,2017,120,4262,4263,2062,3595,3234,2309,3840,2668,3382,1954,4542,7963,7964,3488,1047,2704,1266,7965,1368,4543,2845,649,3383,3841,2539,2738,1102,2846,2669,7966,7967,1999,7968,1111,3596,2962,7969,2488,3842,3597,2804,1854,3384,3722,7970,7971,3385,2410,2884,3304, +3235,3598,7972,2569,7973,3599,2805,4031,1460,856,7974,3600,7975,2885,2963,7976,2886,3843,7977,4264,632,2510,875,3844,1697,3845,2291,7978,7979,4544,3010,1239,580,4545,4265,7980,914,936,2074,1190,4032,1039,2123,7981,7982,7983,3386,1473,7984,1354,4266,3846,7985,2172,3064,4033,915,3305,4267,4268,3306,1605,1834,7986,2739,398,3601,4269,3847,4034,328,1912,2847,4035,3848,1331,4270,3011,937,4271,7987,3602,4036,4037,3387,2160,4546,3388,524,742,538,3065,1012,7988,7989,3849,2461,7990,658,1103,225,3850,7991,7992, +4547,7993,4548,7994,3236,1243,7995,4038,963,2246,4549,7996,2705,3603,3161,7997,7998,2588,2327,7999,4550,8E3,8001,8002,3489,3307,957,3389,2540,2032,1930,2927,2462,870,2018,3604,1746,2770,2771,2434,2463,8003,3851,8004,3723,3107,3724,3490,3390,3725,8005,1179,3066,8006,3162,2373,4272,3726,2541,3163,3108,2740,4039,8007,3391,1556,2542,2292,977,2887,2033,4040,1205,3392,8008,1765,3393,3164,2124,1271,1689,714,4551,3491,8009,2328,3852,533,4273,3605,2181,617,8010,2464,3308,3492,2310,8011,8012,3165,8013,8014, +3853,1987,618,427,2641,3493,3394,8015,8016,1244,1690,8017,2806,4274,4552,8018,3494,8019,8020,2279,1576,473,3606,4275,3395,972,8021,3607,8022,3067,8023,8024,4553,4554,8025,3727,4041,4042,8026,153,4555,356,8027,1891,2888,4276,2143,408,803,2352,8028,3854,8029,4277,1646,2570,2511,4556,4557,3855,8030,3856,4278,8031,2411,3396,752,8032,8033,1961,2964,8034,746,3012,2465,8035,4279,3728,698,4558,1892,4280,3608,2543,4559,3609,3857,8036,3166,3397,8037,1823,1302,4043,2706,3858,1973,4281,8038,4282,3167,823,1303, +1288,1236,2848,3495,4044,3398,774,3859,8039,1581,4560,1304,2849,3860,4561,8040,2435,2161,1083,3237,4283,4045,4284,344,1173,288,2311,454,1683,8041,8042,1461,4562,4046,2589,8043,8044,4563,985,894,8045,3399,3168,8046,1913,2928,3729,1988,8047,2110,1974,8048,4047,8049,2571,1194,425,8050,4564,3169,1245,3730,4285,8051,8052,2850,8053,636,4565,1855,3861,760,1799,8054,4286,2209,1508,4566,4048,1893,1684,2293,8055,8056,8057,4287,4288,2210,479,8058,8059,832,8060,4049,2489,8061,2965,2490,3731,990,3109,627,1814, +2642,4289,1582,4290,2125,2111,3496,4567,8062,799,4291,3170,8063,4568,2112,1737,3013,1018,543,754,4292,3309,1676,4569,4570,4050,8064,1489,8065,3497,8066,2614,2889,4051,8067,8068,2966,8069,8070,8071,8072,3171,4571,4572,2182,1722,8073,3238,3239,1842,3610,1715,481,365,1975,1856,8074,8075,1962,2491,4573,8076,2126,3611,3240,433,1894,2063,2075,8077,602,2741,8078,8079,8080,8081,8082,3014,1628,3400,8083,3172,4574,4052,2890,4575,2512,8084,2544,2772,8085,8086,8087,3310,4576,2891,8088,4577,8089,2851,4578,4579, +1221,2967,4053,2513,8090,8091,8092,1867,1989,8093,8094,8095,1895,8096,8097,4580,1896,4054,318,8098,2094,4055,4293,8099,8100,485,8101,938,3862,553,2670,116,8102,3863,3612,8103,3498,2671,2773,3401,3311,2807,8104,3613,2929,4056,1747,2930,2968,8105,8106,207,8107,8108,2672,4581,2514,8109,3015,890,3614,3864,8110,1877,3732,3402,8111,2183,2353,3403,1652,8112,8113,8114,941,2294,208,3499,4057,2019,330,4294,3865,2892,2492,3733,4295,8115,8116,8117,8118,2515,1613,4582,8119,3312,3866,2516,8120,4058,8121,1637,4059, +2466,4583,3867,8122,2493,3016,3734,8123,8124,2192,8125,8126,2162,8127,8128,8129,8130,8131,8132,8133,8134,8135,8136,8137,8138,8139,8140,8141,8142,8143,8144,8145,8146,8147,8148,8149,8150,8151,8152,8153,8154,8155,8156,8157,8158,8159,8160,8161,8162,8163,8164,8165,8166,8167,8168,8169,8170,8171,8172,8173,8174,8175,8176,8177,8178,8179,8180,8181,8182,8183,8184,8185,8186,8187,8188,8189,8190,8191,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8208,8209,8210,8211,8212,8213,8214, +8215,8216,8217,8218,8219,8220,8221,8222,8223,8224,8225,8226,8227,8228,8229,8230,8231,8232,8233,8234,8235,8236,8237,8238,8239,8240,8241,8242,8243,8244,8245,8246,8247,8248,8249,8250,8251,8252,8253,8254,8255,8256,8257,8258,8259,8260,8261,8262,8263,8264,8265,8266,8267,8268,8269,8270,8271,8272,8273,8274,8275,8276,8277,8278,8279,8280,8281,8282,8283,8284,8285,8286,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,8304,8305,8306,8307,8308,8309,8310,8311,8312,8313,8314,8315, +8316,8317,8318,8319,8320,8321,8322,8323,8324,8325,8326,8327,8328,8329,8330,8331,8332,8333,8334,8335,8336,8337,8338,8339,8340,8341,8342,8343,8344,8345,8346,8347,8348,8349,8350,8351,8352,8353,8354,8355,8356,8357,8358,8359,8360,8361,8362,8363,8364,8365,8366,8367,8368,8369,8370,8371,8372,8373,8374,8375,8376,8377,8378,8379,8380,8381,8382,8383,8384,8385,8386,8387,8388,8389,8390,8391,8392,8393,8394,8395,8396,8397,8398,8399,8400,8401,8402,8403,8404,8405,8406,8407,8408,8409,8410,8411,8412,8413,8414,8415,8416, +8417,8418,8419,8420,8421,8422,8423,8424,8425,8426,8427,8428,8429,8430,8431,8432,8433,8434,8435,8436,8437,8438,8439,8440,8441,8442,8443,8444,8445,8446,8447,8448,8449,8450,8451,8452,8453,8454,8455,8456,8457,8458,8459,8460,8461,8462,8463,8464,8465,8466,8467,8468,8469,8470,8471,8472,8473,8474,8475,8476,8477,8478,8479,8480,8481,8482,8483,8484,8485,8486,8487,8488,8489,8490,8491,8492,8493,8494,8495,8496,8497,8498,8499,8500,8501,8502,8503,8504,8505,8506,8507,8508,8509,8510,8511,8512,8513,8514,8515,8516,8517, +8518,8519,8520,8521,8522,8523,8524,8525,8526,8527,8528,8529,8530,8531,8532,8533,8534,8535,8536,8537,8538,8539,8540,8541,8542,8543,8544,8545,8546,8547,8548,8549,8550,8551,8552,8553,8554,8555,8556,8557,8558,8559,8560,8561,8562,8563,8564,8565,8566,8567,8568,8569,8570,8571,8572,8573,8574,8575,8576,8577,8578,8579,8580,8581,8582,8583,8584,8585,8586,8587,8588,8589,8590,8591,8592,8593,8594,8595,8596,8597,8598,8599,8600,8601,8602,8603,8604,8605,8606,8607,8608,8609,8610,8611,8612,8613,8614,8615,8616,8617,8618, +8619,8620,8621,8622,8623,8624,8625,8626,8627,8628,8629,8630,8631,8632,8633,8634,8635,8636,8637,8638,8639,8640,8641,8642,8643,8644,8645,8646,8647,8648,8649,8650,8651,8652,8653,8654,8655,8656,8657,8658,8659,8660,8661,8662,8663,8664,8665,8666,8667,8668,8669,8670,8671,8672,8673,8674,8675,8676,8677,8678,8679,8680,8681,8682,8683,8684,8685,8686,8687,8688,8689,8690,8691,8692,8693,8694,8695,8696,8697,8698,8699,8700,8701,8702,8703,8704,8705,8706,8707,8708,8709,8710,8711,8712,8713,8714,8715,8716,8717,8718,8719, +8720,8721,8722,8723,8724,8725,8726,8727,8728,8729,8730,8731,8732,8733,8734,8735,8736,8737,8738,8739,8740,8741];!0},{"./init":21}],16:[function(b,a,d){!function(a){a.EUCTWProber=function(){a.MultiByteCharSetProber.apply(this);this.getCharsetName=function(){return"EUC-TW"};this._mCodingSM=new a.CodingStateMachine(a.EUCTWSMModel);this._mDistributionAnalyzer=new a.EUCTWDistributionAnalysis;this.reset()};a.EUCTWProber.prototype=new a.MultiByteCharSetProber}(b("./init"))},{"./init":21}],17:[function(b, +a,d){b=b("./init");b.GB2312_TYPICAL_DISTRIBUTION_RATIO=.9;b.GB2312_TABLE_SIZE=3760;b.GB2312CharToFreqOrder=[1671,749,1443,2364,3924,3807,2330,3921,1704,3463,2691,1511,1515,572,3191,2205,2361,224,2558,479,1711,963,3162,440,4060,1905,2966,2947,3580,2647,3961,3842,2204,869,4207,970,2678,5626,2944,2956,1479,4048,514,3595,588,1346,2820,3409,249,4088,1746,1873,2047,1774,581,1813,358,1174,3590,1014,1561,4844,2245,670,1636,3112,889,1286,953,556,2327,3060,1290,3141,613,185,3477,1367,850,3820,1715,2428,2642, +2303,2732,3041,2562,2648,3566,3946,1349,388,3098,2091,1360,3585,152,1687,1539,738,1559,59,1232,2925,2267,1388,1249,1741,1679,2960,151,1566,1125,1352,4271,924,4296,385,3166,4459,310,1245,2850,70,3285,2729,3534,3575,2398,3298,3466,1960,2265,217,3647,864,1909,2084,4401,2773,1010,3269,5152,853,3051,3121,1244,4251,1895,364,1499,1540,2313,1180,3655,2268,562,715,2417,3061,544,336,3768,2380,1752,4075,950,280,2425,4382,183,2759,3272,333,4297,2155,1688,2356,1444,1039,4540,736,1177,3349,2443,2368,2144,2225, +565,196,1482,3406,927,1335,4147,692,878,1311,1653,3911,3622,1378,4200,1840,2969,3149,2126,1816,2534,1546,2393,2760,737,2494,13,447,245,2747,38,2765,2129,2589,1079,606,360,471,3755,2890,404,848,699,1785,1236,370,2221,1023,3746,2074,2026,2023,2388,1581,2119,812,1141,3091,2536,1519,804,2053,406,1596,1090,784,548,4414,1806,2264,2936,1100,343,4114,5096,622,3358,743,3668,1510,1626,5020,3567,2513,3195,4115,5627,2489,2991,24,2065,2697,1087,2719,48,1634,315,68,985,2052,198,2239,1347,1107,1439,597,2366,2172, +871,3307,919,2487,2790,1867,236,2570,1413,3794,906,3365,3381,1701,1982,1818,1524,2924,1205,616,2586,2072,2004,575,253,3099,32,1365,1182,197,1714,2454,1201,554,3388,3224,2748,756,2587,250,2567,1507,1517,3529,1922,2761,2337,3416,1961,1677,2452,2238,3153,615,911,1506,1474,2495,1265,1906,2749,3756,3280,2161,898,2714,1759,3450,2243,2444,563,26,3286,2266,3769,3344,2707,3677,611,1402,531,1028,2871,4548,1375,261,2948,835,1190,4134,353,840,2684,1900,3082,1435,2109,1207,1674,329,1872,2781,4055,2686,2104,608, +3318,2423,2957,2768,1108,3739,3512,3271,3985,2203,1771,3520,1418,2054,1681,1153,225,1627,2929,162,2050,2511,3687,1954,124,1859,2431,1684,3032,2894,585,4805,3969,2869,2704,2088,2032,2095,3656,2635,4362,2209,256,518,2042,2105,3777,3657,643,2298,1148,1779,190,989,3544,414,11,2135,2063,2979,1471,403,3678,126,770,1563,671,2499,3216,2877,600,1179,307,2805,4937,1268,1297,2694,252,4032,1448,1494,1331,1394,127,2256,222,1647,1035,1481,3056,1915,1048,873,3651,210,33,1608,2516,200,1520,415,102,0,3389,1287,817, +91,3299,2940,836,1814,549,2197,1396,1669,2987,3582,2297,2848,4528,1070,687,20,1819,121,1552,1364,1461,1968,2617,3540,2824,2083,177,948,4938,2291,110,4549,2066,648,3359,1755,2110,2114,4642,4845,1693,3937,3308,1257,1869,2123,208,1804,3159,2992,2531,2549,3361,2418,1350,2347,2800,2568,1291,2036,2680,72,842,1990,212,1233,1154,1586,75,2027,3410,4900,1823,1337,2710,2676,728,2810,1522,3026,4995,157,755,1050,4022,710,785,1936,2194,2085,1406,2777,2400,150,1250,4049,1206,807,1910,534,529,3309,1721,1660,274, +39,2827,661,2670,1578,925,3248,3815,1094,4278,4901,4252,41,1150,3747,2572,2227,4501,3658,4902,3813,3357,3617,2884,2258,887,538,4187,3199,1294,2439,3042,2329,2343,2497,1255,107,543,1527,521,3478,3568,194,5062,15,961,3870,1241,1192,2664,66,5215,3260,2111,1295,1127,2152,3805,4135,901,1164,1976,398,1278,530,1460,748,904,1054,1966,1426,53,2909,509,523,2279,1534,536,1019,239,1685,460,2353,673,1065,2401,3600,4298,2272,1272,2363,284,1753,3679,4064,1695,81,815,2677,2757,2731,1386,859,500,4221,2190,2566,757, +1006,2519,2068,1166,1455,337,2654,3203,1863,1682,1914,3025,1252,1409,1366,847,714,2834,2038,3209,964,2970,1901,885,2553,1078,1756,3049,301,1572,3326,688,2130,1996,2429,1805,1648,2930,3421,2750,3652,3088,262,1158,1254,389,1641,1812,526,1719,923,2073,1073,1902,468,489,4625,1140,857,2375,3070,3319,2863,380,116,1328,2693,1161,2244,273,1212,1884,2769,3011,1775,1142,461,3066,1200,2147,2212,790,702,2695,4222,1601,1058,434,2338,5153,3640,67,2360,4099,2502,618,3472,1329,416,1132,830,2782,1807,2653,3211,3510, +1662,192,2124,296,3979,1739,1611,3684,23,118,324,446,1239,1225,293,2520,3814,3795,2535,3116,17,1074,467,2692,2201,387,2922,45,1326,3055,1645,3659,2817,958,243,1903,2320,1339,2825,1784,3289,356,576,865,2315,2381,3377,3916,1088,3122,1713,1655,935,628,4689,1034,1327,441,800,720,894,1979,2183,1528,5289,2702,1071,4046,3572,2399,1571,3281,79,761,1103,327,134,758,1899,1371,1615,879,442,215,2605,2579,173,2048,2485,1057,2975,3317,1097,2253,3801,4263,1403,1650,2946,814,4968,3487,1548,2644,1567,1285,2,295,2636, +97,946,3576,832,141,4257,3273,760,3821,3521,3156,2607,949,1024,1733,1516,1803,1920,2125,2283,2665,3180,1501,2064,3560,2171,1592,803,3518,1416,732,3897,4258,1363,1362,2458,119,1427,602,1525,2608,1605,1639,3175,694,3064,10,465,76,2E3,4846,4208,444,3781,1619,3353,2206,1273,3796,740,2483,320,1723,2377,3660,2619,1359,1137,1762,1724,2345,2842,1850,1862,912,821,1866,612,2625,1735,2573,3369,1093,844,89,937,930,1424,3564,2413,2972,1004,3046,3019,2011,711,3171,1452,4178,428,801,1943,432,445,2811,206,4136,1472, +730,349,73,397,2802,2547,998,1637,1167,789,396,3217,154,1218,716,1120,1780,2819,4826,1931,3334,3762,2139,1215,2627,552,3664,3628,3232,1405,2383,3111,1356,2652,3577,3320,3101,1703,640,1045,1370,1246,4996,371,1575,2436,1621,2210,984,4033,1734,2638,16,4529,663,2755,3255,1451,3917,2257,1253,1955,2234,1263,2951,214,1229,617,485,359,1831,1969,473,2310,750,2058,165,80,2864,2419,361,4344,2416,2479,1134,796,3726,1266,2943,860,2715,938,390,2734,1313,1384,248,202,877,1064,2854,522,3907,279,1602,297,2357,395, +3740,137,2075,944,4089,2584,1267,3802,62,1533,2285,178,176,780,2440,201,3707,590,478,1560,4354,2117,1075,30,74,4643,4004,1635,1441,2745,776,2596,238,1077,1692,1912,2844,605,499,1742,3947,241,3053,980,1749,936,2640,4511,2582,515,1543,2162,5322,2892,2993,890,2148,1924,665,1827,3581,1032,968,3163,339,1044,1896,270,583,1791,1720,4367,1194,3488,3669,43,2523,1657,163,2167,290,1209,1622,3378,550,634,2508,2510,695,2634,2384,2512,1476,1414,220,1469,2341,2138,2852,3183,2900,4939,2865,3502,1211,3680,854,3227, +1299,2976,3172,186,2998,1459,443,1067,3251,1495,321,1932,3054,909,753,1410,1828,436,2441,1119,1587,3164,2186,1258,227,231,1425,1890,3200,3942,247,959,725,5254,2741,577,2158,2079,929,120,174,838,2813,591,1115,417,2024,40,3240,1536,1037,291,4151,2354,632,1298,2406,2500,3535,1825,1846,3451,205,1171,345,4238,18,1163,811,685,2208,1217,425,1312,1508,1175,4308,2552,1033,587,1381,3059,2984,3482,340,1316,4023,3972,792,3176,519,777,4690,918,933,4130,2981,3741,90,3360,2911,2200,5184,4550,609,3079,2030,272,3379, +2736,363,3881,1130,1447,286,779,357,1169,3350,3137,1630,1220,2687,2391,747,1277,3688,2618,2682,2601,1156,3196,5290,4034,3102,1689,3596,3128,874,219,2783,798,508,1843,2461,269,1658,1776,1392,1913,2983,3287,2866,2159,2372,829,4076,46,4253,2873,1889,1894,915,1834,1631,2181,2318,298,664,2818,3555,2735,954,3228,3117,527,3511,2173,681,2712,3033,2247,2346,3467,1652,155,2164,3382,113,1994,450,899,494,994,1237,2958,1875,2336,1926,3727,545,1577,1550,633,3473,204,1305,3072,2410,1956,2471,707,2134,841,2195,2196, +2663,3843,1026,4940,990,3252,4997,368,1092,437,3212,3258,1933,1829,675,2977,2893,412,943,3723,4644,3294,3283,2230,2373,5154,2389,2241,2661,2323,1404,2524,593,787,677,3008,1275,2059,438,2709,2609,2240,2269,2246,1446,36,1568,1373,3892,1574,2301,1456,3962,693,2276,5216,2035,1143,2720,1919,1797,1811,2763,4137,2597,1830,1699,1488,1198,2090,424,1694,312,3634,3390,4179,3335,2252,1214,561,1059,3243,2295,2561,975,5155,2321,2751,3772,472,1537,3282,3398,1047,2077,2348,2878,1323,3340,3076,690,2906,51,369,170, +3541,1060,2187,2688,3670,2541,1083,1683,928,3918,459,109,4427,599,3744,4286,143,2101,2730,2490,82,1588,3036,2121,281,1860,477,4035,1238,2812,3020,2716,3312,1530,2188,2055,1317,843,636,1808,1173,3495,649,181,1002,147,3641,1159,2414,3750,2289,2795,813,3123,2610,1136,4368,5,3391,4541,2174,420,429,1728,754,1228,2115,2219,347,2223,2733,735,1518,3003,2355,3134,1764,3948,3329,1888,2424,1001,1234,1972,3321,3363,1672,1021,1450,1584,226,765,655,2526,3404,3244,2302,3665,731,594,2184,319,1576,621,658,2656,4299, +2099,3864,1279,2071,2598,2739,795,3086,3699,3908,1707,2352,2402,1382,3136,2475,1465,4847,3496,3865,1085,3004,2591,1084,213,2287,1963,3565,2250,822,793,4574,3187,1772,1789,3050,595,1484,1959,2770,1080,2650,456,422,2996,940,3322,4328,4345,3092,2742,965,2784,739,4124,952,1358,2498,2949,2565,332,2698,2378,660,2260,2473,4194,3856,2919,535,1260,2651,1208,1428,1300,1949,1303,2942,433,2455,2450,1251,1946,614,1269,641,1306,1810,2737,3078,2912,564,2365,1419,1415,1497,4460,2367,2185,1379,3005,1307,3218,2175, +1897,3063,682,1157,4040,4005,1712,1160,1941,1399,394,402,2952,1573,1151,2986,2404,862,299,2033,1489,3006,346,171,2886,3401,1726,2932,168,2533,47,2507,1030,3735,1145,3370,1395,1318,1579,3609,4560,2857,4116,1457,2529,1965,504,1036,2690,2988,2405,745,5871,849,2397,2056,3081,863,2359,3857,2096,99,1397,1769,2300,4428,1643,3455,1978,1757,3718,1440,35,4879,3742,1296,4228,2280,160,5063,1599,2013,166,520,3479,1646,3345,3012,490,1937,1545,1264,2182,2505,1096,1188,1369,1436,2421,1667,2792,2460,1270,2122,727, +3167,2143,806,1706,1012,1800,3037,960,2218,1882,805,139,2456,1139,1521,851,1052,3093,3089,342,2039,744,5097,1468,1502,1585,2087,223,939,326,2140,2577,892,2481,1623,4077,982,3708,135,2131,87,2503,3114,2326,1106,876,1616,547,2997,2831,2093,3441,4530,4314,9,3256,4229,4148,659,1462,1986,1710,2046,2913,2231,4090,4880,5255,3392,3274,1368,3689,4645,1477,705,3384,3635,1068,1529,2941,1458,3782,1509,100,1656,2548,718,2339,408,1590,2780,3548,1838,4117,3719,1345,3530,717,3442,2778,3220,2898,1892,4590,3614,3371, +2043,1998,1224,3483,891,635,584,2559,3355,733,1766,1729,1172,3789,1891,2307,781,2982,2271,1957,1580,5773,2633,2005,4195,3097,1535,3213,1189,1934,5693,3262,586,3118,1324,1598,517,1564,2217,1868,1893,4445,3728,2703,3139,1526,1787,1992,3882,2875,1549,1199,1056,2224,1904,2711,5098,4287,338,1993,3129,3489,2689,1809,2815,1997,957,1855,3898,2550,3275,3057,1105,1319,627,1505,1911,1883,3526,698,3629,3456,1833,1431,746,77,1261,2017,2296,1977,1885,125,1334,1600,525,1798,1109,2222,1470,1945,559,2236,1186,3443, +2476,1929,1411,2411,3135,1777,3372,2621,1841,1613,3229,668,1430,1839,2643,2916,195,1989,2671,2358,1387,629,3205,2293,5256,4439,123,1310,888,1879,4300,3021,3605,1003,1162,3192,2910,2010,140,2395,2859,55,1082,2012,2901,662,419,2081,1438,680,2774,4654,3912,1620,1731,1625,5035,4065,2328,512,1344,802,5443,2163,2311,2537,524,3399,98,1155,2103,1918,2606,3925,2816,1393,2465,1504,3773,2177,3963,1478,4346,180,1113,4655,3461,2028,1698,833,2696,1235,1322,1594,4408,3623,3013,3225,2040,3022,541,2881,607,3632,2029, +1665,1219,639,1385,1686,1099,2803,3231,1938,3188,2858,427,676,2772,1168,2025,454,3253,2486,3556,230,1950,580,791,1991,1280,1086,1974,2034,630,257,3338,2788,4903,1017,86,4790,966,2789,1995,1696,1131,259,3095,4188,1308,179,1463,5257,289,4107,1248,42,3413,1725,2288,896,1947,774,4474,4254,604,3430,4264,392,2514,2588,452,237,1408,3018,988,4531,1970,3034,3310,540,2370,1562,1288,2990,502,4765,1147,4,1853,2708,207,294,2814,4078,2902,2509,684,34,3105,3532,2551,644,709,2801,2344,573,1727,3573,3557,2021,1081, +3100,4315,2100,3681,199,2263,1837,2385,146,3484,1195,2776,3949,997,1939,3973,1008,1091,1202,1962,1847,1149,4209,5444,1076,493,117,5400,2521,972,1490,2934,1796,4542,2374,1512,2933,2657,413,2888,1135,2762,2314,2156,1355,2369,766,2007,2527,2170,3124,2491,2593,2632,4757,2437,234,3125,3591,1898,1750,1376,1942,3468,3138,570,2127,2145,3276,4131,962,132,1445,4196,19,941,3624,3480,3366,1973,1374,4461,3431,2629,283,2415,2275,808,2887,3620,2112,2563,1353,3610,955,1089,3103,1053,96,88,4097,823,3808,1583,399, +292,4091,3313,421,1128,642,4006,903,2539,1877,2082,596,29,4066,1790,722,2157,130,995,1569,769,1485,464,513,2213,288,1923,1101,2453,4316,133,486,2445,50,625,487,2207,57,423,481,2962,159,3729,1558,491,303,482,501,240,2837,112,3648,2392,1783,362,8,3433,3422,610,2793,3277,1390,1284,1654,21,3823,734,367,623,193,287,374,1009,1483,816,476,313,2255,2340,1262,2150,2899,1146,2581,782,2116,1659,2018,1880,255,3586,3314,1110,2867,2137,2564,986,2767,5185,2006,650,158,926,762,881,3157,2717,2362,3587,306,3690,3245, +1542,3077,2427,1691,2478,2118,2985,3490,2438,539,2305,983,129,1754,355,4201,2386,827,2923,104,1773,2838,2771,411,2905,3919,376,767,122,1114,828,2422,1817,3506,266,3460,1007,1609,4998,945,2612,4429,2274,726,1247,1964,2914,2199,2070,4002,4108,657,3323,1422,579,455,2764,4737,1222,2895,1670,824,1223,1487,2525,558,861,3080,598,2659,2515,1967,752,2583,2376,2214,4180,977,704,2464,4999,2622,4109,1210,2961,819,1541,142,2284,44,418,457,1126,3730,4347,4626,1644,1876,3671,1864,302,1063,5694,624,723,1984,3745, +1314,1676,2488,1610,1449,3558,3569,2166,2098,409,1011,2325,3704,2306,818,1732,1383,1824,1844,3757,999,2705,3497,1216,1423,2683,2426,2954,2501,2726,2229,1475,2554,5064,1971,1794,1666,2014,1343,783,724,191,2434,1354,2220,5065,1763,2752,2472,4152,131,175,2885,3434,92,1466,4920,2616,3871,3872,3866,128,1551,1632,669,1854,3682,4691,4125,1230,188,2973,3290,1302,1213,560,3266,917,763,3909,3249,1760,868,1958,764,1782,2097,145,2277,3774,4462,64,1491,3062,971,2132,3606,2442,221,1226,1617,218,323,1185,3207,3147, +571,619,1473,1005,1744,2281,449,1887,2396,3685,275,375,3816,1743,3844,3731,845,1983,2350,4210,1377,773,967,3499,3052,3743,2725,4007,1697,1022,3943,1464,3264,2855,2722,1952,1029,2839,2467,84,4383,2215,820,1391,2015,2448,3672,377,1948,2168,797,2545,3536,2578,2645,94,2874,1678,405,1259,3071,771,546,1315,470,1243,3083,895,2468,981,969,2037,846,4181,653,1276,2928,14,2594,557,3007,2474,156,902,1338,1740,2574,537,2518,973,2282,2216,2433,1928,138,2903,1293,2631,1612,646,3457,839,2935,111,496,2191,2847,589, +3186,149,3994,2060,4031,2641,4067,3145,1870,37,3597,2136,1025,2051,3009,3383,3549,1121,1016,3261,1301,251,2446,2599,2153,872,3246,637,334,3705,831,884,921,3065,3140,4092,2198,1944,246,2964,108,2045,1152,1921,2308,1031,203,3173,4170,1907,3890,810,1401,2003,1690,506,647,1242,2828,1761,1649,3208,2249,1589,3709,2931,5156,1708,498,666,2613,834,3817,1231,184,2851,1124,883,3197,2261,3710,1765,1553,2658,1178,2639,2351,93,1193,942,2538,2141,4402,235,1821,870,1591,2192,1709,1871,3341,1618,4126,2595,2334,603, +651,69,701,268,2662,3411,2555,1380,1606,503,448,254,2371,2646,574,1187,2309,1770,322,2235,1292,1801,305,566,1133,229,2067,2057,706,167,483,2002,2672,3295,1820,3561,3067,316,378,2746,3452,1112,136,1981,507,1651,2917,1117,285,4591,182,2580,3522,1304,335,3303,1835,2504,1795,1792,2248,674,1018,2106,2449,1857,2292,2845,976,3047,1781,2600,2727,1389,1281,52,3152,153,265,3950,672,3485,3951,4463,430,1183,365,278,2169,27,1407,1336,2304,209,1340,1730,2202,1852,2403,2883,979,1737,1062,631,2829,2542,3876,2592, +825,2086,2226,3048,3625,352,1417,3724,542,991,431,1351,3938,1861,2294,826,1361,2927,3142,3503,1738,463,2462,2723,582,1916,1595,2808,400,3845,3891,2868,3621,2254,58,2492,1123,910,2160,2614,1372,1603,1196,1072,3385,1700,3267,1980,696,480,2430,920,799,1570,2920,1951,2041,4047,2540,1321,4223,2469,3562,2228,1271,2602,401,2833,3351,2575,5157,907,2312,1256,410,263,3507,1582,996,678,1849,2316,1480,908,3545,2237,703,2322,667,1826,2849,1531,2604,2999,2407,3146,2151,2630,1786,3711,469,3542,497,3899,2409,858, +837,4446,3393,1274,786,620,1845,2001,3311,484,308,3367,1204,1815,3691,2332,1532,2557,1842,2020,2724,1927,2333,4440,567,22,1673,2728,4475,1987,1858,1144,1597,101,1832,3601,12,974,3783,4391,951,1412,1,3720,453,4608,4041,528,1041,1027,3230,2628,1129,875,1051,3291,1203,2262,1069,2860,2799,2149,2615,3278,144,1758,3040,31,475,1680,366,2685,3184,311,1642,4008,2466,5036,1593,1493,2809,216,1420,1668,233,304,2128,3284,232,1429,1768,1040,2008,3407,2740,2967,2543,242,2133,778,1565,2022,2620,505,2189,2756,1098, +2273,372,1614,708,553,2846,2094,2278,169,3626,2835,4161,228,2674,3165,809,1454,1309,466,1705,1095,900,3423,880,2667,3751,5258,2317,3109,2571,4317,2766,1503,1342,866,4447,1118,63,2076,314,1881,1348,1061,172,978,3515,1747,532,511,3970,6,601,905,2699,3300,1751,276,1467,3725,2668,65,4239,2544,2779,2556,1604,578,2451,1802,992,2331,2624,1320,3446,713,1513,1013,103,2786,2447,1661,886,1702,916,654,3574,2031,1556,751,2178,2821,2179,1498,1538,2176,271,914,2251,2080,1325,638,1953,2937,3877,2432,2754,95,3265, +1716,260,1227,4083,775,106,1357,3254,426,1607,555,2480,772,1985,244,2546,474,495,1046,2611,1851,2061,71,2089,1675,2590,742,3758,2843,3222,1433,267,2180,2576,2826,2233,2092,3913,2435,956,1745,3075,856,2113,1116,451,3,1988,2896,1398,993,2463,1878,2049,1341,2718,2721,2870,2108,712,2904,4363,2753,2324,277,2872,2349,2649,384,987,435,691,3E3,922,164,3939,652,1500,1184,4153,2482,3373,2165,4848,2335,3775,3508,3154,2806,2830,1554,2102,1664,2530,1434,2408,893,1547,2623,3447,2832,2242,2532,3169,2856,3223,2078, +49,3770,3469,462,318,656,2259,3250,3069,679,1629,2758,344,1138,1104,3120,1836,1283,3115,2154,1437,4448,934,759,1999,794,2862,1038,533,2560,1722,2342,855,2626,1197,1663,4476,3127,85,4240,2528,25,1111,1181,3673,407,3470,4561,2679,2713,768,1925,2841,3986,1544,1165,932,373,1240,2146,1930,2673,721,4766,354,4333,391,2963,187,61,3364,1442,1102,330,1940,1767,341,3809,4118,393,2496,2062,2211,105,331,300,439,913,1332,626,379,3304,1557,328,689,3952,309,1555,931,317,2517,3027,325,569,686,2107,3084,60,1042,1333, +2794,264,3177,4014,1628,258,3712,7,4464,1176,1043,1778,683,114,1975,78,1492,383,1886,510,386,645,5291,2891,2069,3305,4138,3867,2939,2603,2493,1935,1066,1848,3588,1015,1282,1289,4609,697,1453,3044,2666,3611,1856,2412,54,719,1330,568,3778,2459,1748,788,492,551,1191,1E3,488,3394,3763,282,1799,348,2016,1523,3155,2390,1049,382,2019,1788,1170,729,2968,3523,897,3926,2785,2938,3292,350,2319,3238,1718,1717,2655,3453,3143,4465,161,2889,2980,2009,1421,56,1908,1640,2387,2232,1917,1874,2477,4921,148,83,3438,592, +4245,2882,1822,1055,741,115,1496,1624,381,1638,4592,1020,516,3214,458,947,4575,1432,211,1514,2926,1865,2142,189,852,1221,1400,1486,882,2299,4036,351,28,1122,700,6479,6480,6481,6482,6483,5508,6484,3900,3414,3974,4441,4024,3537,4037,5628,5099,3633,6485,3148,6486,3636,5509,3257,5510,5973,5445,5872,4941,4403,3174,4627,5873,6276,2286,4230,5446,5874,5122,6102,6103,4162,5447,5123,5323,4849,6277,3980,3851,5066,4246,5774,5067,6278,3001,2807,5695,3346,5775,5974,5158,5448,6487,5975,5976,5776,3598,6279,5696, +4806,4211,4154,6280,6488,6489,6490,6281,4212,5037,3374,4171,6491,4562,4807,4722,4827,5977,6104,4532,4079,5159,5324,5160,4404,3858,5359,5875,3975,4288,4610,3486,4512,5325,3893,5360,6282,6283,5560,2522,4231,5978,5186,5449,2569,3878,6284,5401,3578,4415,6285,4656,5124,5979,2506,4247,4449,3219,3417,4334,4969,4329,6492,4576,4828,4172,4416,4829,5402,6286,3927,3852,5361,4369,4830,4477,4867,5876,4173,6493,6105,4657,6287,6106,5877,5450,6494,4155,4868,5451,3700,5629,4384,6288,6289,5878,3189,4881,6107,6290,6495, +4513,6496,4692,4515,4723,5100,3356,6497,6291,3810,4080,5561,3570,4430,5980,6498,4355,5697,6499,4724,6108,6109,3764,4050,5038,5879,4093,3226,6292,5068,5217,4693,3342,5630,3504,4831,4377,4466,4309,5698,4431,5777,6293,5778,4272,3706,6110,5326,3752,4676,5327,4273,5403,4767,5631,6500,5699,5880,3475,5039,6294,5562,5125,4348,4301,4482,4068,5126,4593,5700,3380,3462,5981,5563,3824,5404,4970,5511,3825,4738,6295,6501,5452,4516,6111,5881,5564,6502,6296,5982,6503,4213,4163,3454,6504,6112,4009,4450,6113,4658,6297, +6114,3035,6505,6115,3995,4904,4739,4563,4942,4110,5040,3661,3928,5362,3674,6506,5292,3612,4791,5565,4149,5983,5328,5259,5021,4725,4577,4564,4517,4364,6298,5405,4578,5260,4594,4156,4157,5453,3592,3491,6507,5127,5512,4709,4922,5984,5701,4726,4289,6508,4015,6116,5128,4628,3424,4241,5779,6299,4905,6509,6510,5454,5702,5780,6300,4365,4923,3971,6511,5161,3270,3158,5985,4100,867,5129,5703,6117,5363,3695,3301,5513,4467,6118,6512,5455,4232,4242,4629,6513,3959,4478,6514,5514,5329,5986,4850,5162,5566,3846,4694, +6119,5456,4869,5781,3779,6301,5704,5987,5515,4710,6302,5882,6120,4392,5364,5705,6515,6121,6516,6517,3736,5988,5457,5989,4695,2457,5883,4551,5782,6303,6304,6305,5130,4971,6122,5163,6123,4870,3263,5365,3150,4871,6518,6306,5783,5069,5706,3513,3498,4409,5330,5632,5366,5458,5459,3991,5990,4502,3324,5991,5784,3696,4518,5633,4119,6519,4630,5634,4417,5707,4832,5992,3418,6124,5993,5567,4768,5218,6520,4595,3458,5367,6125,5635,6126,4202,6521,4740,4924,6307,3981,4069,4385,6308,3883,2675,4051,3834,4302,4483,5568, +5994,4972,4101,5368,6309,5164,5884,3922,6127,6522,6523,5261,5460,5187,4164,5219,3538,5516,4111,3524,5995,6310,6311,5369,3181,3386,2484,5188,3464,5569,3627,5708,6524,5406,5165,4677,4492,6312,4872,4851,5885,4468,5996,6313,5709,5710,6128,2470,5886,6314,5293,4882,5785,3325,5461,5101,6129,5711,5786,6525,4906,6526,6527,4418,5887,5712,4808,2907,3701,5713,5888,6528,3765,5636,5331,6529,6530,3593,5889,3637,4943,3692,5714,5787,4925,6315,6130,5462,4405,6131,6132,6316,5262,6531,6532,5715,3859,5716,5070,4696,5102, +3929,5788,3987,4792,5997,6533,6534,3920,4809,5E3,5998,6535,2974,5370,6317,5189,5263,5717,3826,6536,3953,5001,4883,3190,5463,5890,4973,5999,4741,6133,6134,3607,5570,6E3,4711,3362,3630,4552,5041,6318,6001,2950,2953,5637,4646,5371,4944,6002,2044,4120,3429,6319,6537,5103,4833,6538,6539,4884,4647,3884,6003,6004,4758,3835,5220,5789,4565,5407,6540,6135,5294,4697,4852,6320,6321,3206,4907,6541,6322,4945,6542,6136,6543,6323,6005,4631,3519,6544,5891,6545,5464,3784,5221,6546,5571,4659,6547,6324,6137,5190,6548, +3853,6549,4016,4834,3954,6138,5332,3827,4017,3210,3546,4469,5408,5718,3505,4648,5790,5131,5638,5791,5465,4727,4318,6325,6326,5792,4553,4010,4698,3439,4974,3638,4335,3085,6006,5104,5042,5166,5892,5572,6327,4356,4519,5222,5573,5333,5793,5043,6550,5639,5071,4503,6328,6139,6551,6140,3914,3901,5372,6007,5640,4728,4793,3976,3836,4885,6552,4127,6553,4451,4102,5002,6554,3686,5105,6555,5191,5072,5295,4611,5794,5296,6556,5893,5264,5894,4975,5466,5265,4699,4976,4370,4056,3492,5044,4886,6557,5795,4432,4769,4357, +5467,3940,4660,4290,6141,4484,4770,4661,3992,6329,4025,4662,5022,4632,4835,4070,5297,4663,4596,5574,5132,5409,5895,6142,4504,5192,4664,5796,5896,3885,5575,5797,5023,4810,5798,3732,5223,4712,5298,4084,5334,5468,6143,4052,4053,4336,4977,4794,6558,5335,4908,5576,5224,4233,5024,4128,5469,5225,4873,6008,5045,4729,4742,4633,3675,4597,6559,5897,5133,5577,5003,5641,5719,6330,6560,3017,2382,3854,4406,4811,6331,4393,3964,4946,6561,2420,3722,6562,4926,4378,3247,1736,4442,6332,5134,6333,5226,3996,2918,5470,4319, +4003,4598,4743,4744,4485,3785,3902,5167,5004,5373,4394,5898,6144,4874,1793,3997,6334,4085,4214,5106,5642,4909,5799,6009,4419,4189,3330,5899,4165,4420,5299,5720,5227,3347,6145,4081,6335,2876,3930,6146,3293,3786,3910,3998,5900,5300,5578,2840,6563,5901,5579,6147,3531,5374,6564,6565,5580,4759,5375,6566,6148,3559,5643,6336,6010,5517,6337,6338,5721,5902,3873,6011,6339,6567,5518,3868,3649,5722,6568,4771,4947,6569,6149,4812,6570,2853,5471,6340,6341,5644,4795,6342,6012,5723,6343,5724,6013,4349,6344,3160,6150, +5193,4599,4514,4493,5168,4320,6345,4927,3666,4745,5169,5903,5005,4928,6346,5725,6014,4730,4203,5046,4948,3395,5170,6015,4150,6016,5726,5519,6347,5047,3550,6151,6348,4197,4310,5904,6571,5581,2965,6152,4978,3960,4291,5135,6572,5301,5727,4129,4026,5905,4853,5728,5472,6153,6349,4533,2700,4505,5336,4678,3583,5073,2994,4486,3043,4554,5520,6350,6017,5800,4487,6351,3931,4103,5376,6352,4011,4321,4311,4190,5136,6018,3988,3233,4350,5906,5645,4198,6573,5107,3432,4191,3435,5582,6574,4139,5410,6353,5411,3944,5583, +5074,3198,6575,6354,4358,6576,5302,4600,5584,5194,5412,6577,6578,5585,5413,5303,4248,5414,3879,4433,6579,4479,5025,4854,5415,6355,4760,4772,3683,2978,4700,3797,4452,3965,3932,3721,4910,5801,6580,5195,3551,5907,3221,3471,3029,6019,3999,5908,5909,5266,5267,3444,3023,3828,3170,4796,5646,4979,4259,6356,5647,5337,3694,6357,5648,5338,4520,4322,5802,3031,3759,4071,6020,5586,4836,4386,5048,6581,3571,4679,4174,4949,6154,4813,3787,3402,3822,3958,3215,3552,5268,4387,3933,4950,4359,6021,5910,5075,3579,6358,4234, +4566,5521,6359,3613,5049,6022,5911,3375,3702,3178,4911,5339,4521,6582,6583,4395,3087,3811,5377,6023,6360,6155,4027,5171,5649,4421,4249,2804,6584,2270,6585,4E3,4235,3045,6156,5137,5729,4140,4312,3886,6361,4330,6157,4215,6158,3500,3676,4929,4331,3713,4930,5912,4265,3776,3368,5587,4470,4855,3038,4980,3631,6159,6160,4132,4680,6161,6362,3923,4379,5588,4255,6586,4121,6587,6363,4649,6364,3288,4773,4774,6162,6024,6365,3543,6588,4274,3107,3737,5050,5803,4797,4522,5589,5051,5730,3714,4887,5378,4001,4523,6163, +5026,5522,4701,4175,2791,3760,6589,5473,4224,4133,3847,4814,4815,4775,3259,5416,6590,2738,6164,6025,5304,3733,5076,5650,4816,5590,6591,6165,6592,3934,5269,6593,3396,5340,6594,5804,3445,3602,4042,4488,5731,5732,3525,5591,4601,5196,6166,6026,5172,3642,4612,3202,4506,4798,6366,3818,5108,4303,5138,5139,4776,3332,4304,2915,3415,4434,5077,5109,4856,2879,5305,4817,6595,5913,3104,3144,3903,4634,5341,3133,5110,5651,5805,6167,4057,5592,2945,4371,5593,6596,3474,4182,6367,6597,6168,4507,4279,6598,2822,6599,4777, +4713,5594,3829,6169,3887,5417,6170,3653,5474,6368,4216,2971,5228,3790,4579,6369,5733,6600,6601,4951,4746,4555,6602,5418,5475,6027,3400,4665,5806,6171,4799,6028,5052,6172,3343,4800,4747,5006,6370,4556,4217,5476,4396,5229,5379,5477,3839,5914,5652,5807,4714,3068,4635,5808,6173,5342,4192,5078,5419,5523,5734,6174,4557,6175,4602,6371,6176,6603,5809,6372,5735,4260,3869,5111,5230,6029,5112,6177,3126,4681,5524,5915,2706,3563,4748,3130,6178,4018,5525,6604,6605,5478,4012,4837,6606,4534,4193,5810,4857,3615,5479, +6030,4082,3697,3539,4086,5270,3662,4508,4931,5916,4912,5811,5027,3888,6607,4397,3527,3302,3798,2775,2921,2637,3966,4122,4388,4028,4054,1633,4858,5079,3024,5007,3982,3412,5736,6608,3426,3236,5595,3030,6179,3427,3336,3279,3110,6373,3874,3039,5080,5917,5140,4489,3119,6374,5812,3405,4494,6031,4666,4141,6180,4166,6032,5813,4981,6609,5081,4422,4982,4112,3915,5653,3296,3983,6375,4266,4410,5654,6610,6181,3436,5082,6611,5380,6033,3819,5596,4535,5231,5306,5113,6612,4952,5918,4275,3113,6613,6376,6182,6183,5814, +3073,4731,4838,5008,3831,6614,4888,3090,3848,4280,5526,5232,3014,5655,5009,5737,5420,5527,6615,5815,5343,5173,5381,4818,6616,3151,4953,6617,5738,2796,3204,4360,2989,4281,5739,5174,5421,5197,3132,5141,3849,5142,5528,5083,3799,3904,4839,5480,2880,4495,3448,6377,6184,5271,5919,3771,3193,6034,6035,5920,5010,6036,5597,6037,6378,6038,3106,5422,6618,5423,5424,4142,6619,4889,5084,4890,4313,5740,6620,3437,5175,5307,5816,4199,5198,5529,5817,5199,5656,4913,5028,5344,3850,6185,2955,5272,5011,5818,4567,4580,5029, +5921,3616,5233,6621,6622,6186,4176,6039,6379,6380,3352,5200,5273,2908,5598,5234,3837,5308,6623,6624,5819,4496,4323,5309,5201,6625,6626,4983,3194,3838,4167,5530,5922,5274,6381,6382,3860,3861,5599,3333,4292,4509,6383,3553,5481,5820,5531,4778,6187,3955,3956,4324,4389,4218,3945,4325,3397,2681,5923,4779,5085,4019,5482,4891,5382,5383,6040,4682,3425,5275,4094,6627,5310,3015,5483,5657,4398,5924,3168,4819,6628,5925,6629,5532,4932,4613,6041,6630,4636,6384,4780,4204,5658,4423,5821,3989,4683,5822,6385,4954,6631, +5345,6188,5425,5012,5384,3894,6386,4490,4104,6632,5741,5053,6633,5823,5926,5659,5660,5927,6634,5235,5742,5824,4840,4933,4820,6387,4859,5928,4955,6388,4143,3584,5825,5346,5013,6635,5661,6389,5014,5484,5743,4337,5176,5662,6390,2836,6391,3268,6392,6636,6042,5236,6637,4158,6638,5744,5663,4471,5347,3663,4123,5143,4293,3895,6639,6640,5311,5929,5826,3800,6189,6393,6190,5664,5348,3554,3594,4749,4603,6641,5385,4801,6043,5827,4183,6642,5312,5426,4761,6394,5665,6191,4715,2669,6643,6644,5533,3185,5427,5086,5930, +5931,5386,6192,6044,6645,4781,4013,5745,4282,4435,5534,4390,4267,6045,5746,4984,6046,2743,6193,3501,4087,5485,5932,5428,4184,4095,5747,4061,5054,3058,3862,5933,5600,6646,5144,3618,6395,3131,5055,5313,6396,4650,4956,3855,6194,3896,5202,4985,4029,4225,6195,6647,5828,5486,5829,3589,3002,6648,6397,4782,5276,6649,6196,6650,4105,3803,4043,5237,5830,6398,4096,3643,6399,3528,6651,4453,3315,4637,6652,3984,6197,5535,3182,3339,6653,3096,2660,6400,6654,3449,5934,4250,4236,6047,6401,5831,6655,5487,3753,4062,5832, +6198,6199,6656,3766,6657,3403,4667,6048,6658,4338,2897,5833,3880,2797,3780,4326,6659,5748,5015,6660,5387,4351,5601,4411,6661,3654,4424,5935,4339,4072,5277,4568,5536,6402,6662,5238,6663,5349,5203,6200,5204,6201,5145,4536,5016,5056,4762,5834,4399,4957,6202,6403,5666,5749,6664,4340,6665,5936,5177,5667,6666,6667,3459,4668,6404,6668,6669,4543,6203,6670,4276,6405,4480,5537,6671,4614,5205,5668,6672,3348,2193,4763,6406,6204,5937,5602,4177,5669,3419,6673,4020,6205,4443,4569,5388,3715,3639,6407,6049,4058,6206, +6674,5938,4544,6050,4185,4294,4841,4651,4615,5488,6207,6408,6051,5178,3241,3509,5835,6208,4958,5836,4341,5489,5278,6209,2823,5538,5350,5206,5429,6675,4638,4875,4073,3516,4684,4914,4860,5939,5603,5389,6052,5057,3237,5490,3791,6676,6409,6677,4821,4915,4106,5351,5058,4243,5539,4244,5604,4842,4916,5239,3028,3716,5837,5114,5605,5390,5940,5430,6210,4332,6678,5540,4732,3667,3840,6053,4305,3408,5670,5541,6410,2744,5240,5750,6679,3234,5606,6680,5607,5671,3608,4283,4159,4400,5352,4783,6681,6411,6682,4491,4802, +6211,6412,5941,6413,6414,5542,5751,6683,4669,3734,5942,6684,6415,5943,5059,3328,4670,4144,4268,6685,6686,6687,6688,4372,3603,6689,5944,5491,4373,3440,6416,5543,4784,4822,5608,3792,4616,5838,5672,3514,5391,6417,4892,6690,4639,6691,6054,5673,5839,6055,6692,6056,5392,6212,4038,5544,5674,4497,6057,6693,5840,4284,5675,4021,4545,5609,6418,4454,6419,6213,4113,4472,5314,3738,5087,5279,4074,5610,4959,4063,3179,4750,6058,6420,6214,3476,4498,4716,5431,4960,4685,6215,5241,6694,6421,6216,6695,5841,5945,6422,3748, +5946,5179,3905,5752,5545,5947,4374,6217,4455,6423,4412,6218,4803,5353,6696,3832,5280,6219,4327,4702,6220,6221,6059,4652,5432,6424,3749,4751,6425,5753,4986,5393,4917,5948,5030,5754,4861,4733,6426,4703,6697,6222,4671,5949,4546,4961,5180,6223,5031,3316,5281,6698,4862,4295,4934,5207,3644,6427,5842,5950,6428,6429,4570,5843,5282,6430,6224,5088,3239,6060,6699,5844,5755,6061,6431,2701,5546,6432,5115,5676,4039,3993,3327,4752,4425,5315,6433,3941,6434,5677,4617,4604,3074,4581,6225,5433,6435,6226,6062,4823,5756, +5116,6227,3717,5678,4717,5845,6436,5679,5846,6063,5847,6064,3977,3354,6437,3863,5117,6228,5547,5394,4499,4524,6229,4605,6230,4306,4500,6700,5951,6065,3693,5952,5089,4366,4918,6701,6231,5548,6232,6702,6438,4704,5434,6703,6704,5953,4168,6705,5680,3420,6706,5242,4407,6066,3812,5757,5090,5954,4672,4525,3481,5681,4618,5395,5354,5316,5955,6439,4962,6707,4526,6440,3465,4673,6067,6441,5682,6708,5435,5492,5758,5683,4619,4571,4674,4804,4893,4686,5493,4753,6233,6068,4269,6442,6234,5032,4705,5146,5243,5208,5848, +6235,6443,4963,5033,4640,4226,6236,5849,3387,6444,6445,4436,4437,5850,4843,5494,4785,4894,6709,4361,6710,5091,5956,3331,6237,4987,5549,6069,6711,4342,3517,4473,5317,6070,6712,6071,4706,6446,5017,5355,6713,6714,4988,5436,6447,4734,5759,6715,4735,4547,4456,4754,6448,5851,6449,6450,3547,5852,5318,6451,6452,5092,4205,6716,6238,4620,4219,5611,6239,6072,4481,5760,5957,5958,4059,6240,6453,4227,4537,6241,5761,4030,4186,5244,5209,3761,4457,4876,3337,5495,5181,6242,5959,5319,5612,5684,5853,3493,5854,6073,4169, +5613,5147,4895,6074,5210,6717,5182,6718,3830,6243,2798,3841,6075,6244,5855,5614,3604,4606,5496,5685,5118,5356,6719,6454,5960,5357,5961,6720,4145,3935,4621,5119,5962,4261,6721,6455,4786,5963,4375,4582,6245,6246,6247,6076,5437,4877,5856,3376,4380,6248,4160,6722,5148,6456,5211,6457,6723,4718,6458,6724,6249,5358,4044,3297,6459,6250,5857,5615,5497,5245,6460,5498,6725,6251,6252,5550,3793,5499,2959,5396,6461,6462,4572,5093,5500,5964,3806,4146,6463,4426,5762,5858,6077,6253,4755,3967,4220,5965,6254,4989,5501, +6464,4352,6726,6078,4764,2290,5246,3906,5438,5283,3767,4964,2861,5763,5094,6255,6256,4622,5616,5859,5860,4707,6727,4285,4708,4824,5617,6257,5551,4787,5212,4965,4935,4687,6465,6728,6466,5686,6079,3494,4413,2995,5247,5966,5618,6729,5967,5764,5765,5687,5502,6730,6731,6080,5397,6467,4990,6258,6732,4538,5060,5619,6733,4719,5688,5439,5018,5149,5284,5503,6734,6081,4607,6259,5120,3645,5861,4583,6260,4584,4675,5620,4098,5440,6261,4863,2379,3306,4585,5552,5689,4586,5285,6735,4864,6736,5286,6082,6737,4623,3010, +4788,4381,4558,5621,4587,4896,3698,3161,5248,4353,4045,6262,3754,5183,4588,6738,6263,6739,6740,5622,3936,6741,6468,6742,6264,5095,6469,4991,5968,6743,4992,6744,6083,4897,6745,4256,5766,4307,3108,3968,4444,5287,3889,4343,6084,4510,6085,4559,6086,4898,5969,6746,5623,5061,4919,5249,5250,5504,5441,6265,5320,4878,3242,5862,5251,3428,6087,6747,4237,5624,5442,6266,5553,4539,6748,2585,3533,5398,4262,6088,5150,4736,4438,6089,6267,5505,4966,6749,6268,6750,6269,5288,5554,3650,6090,6091,4624,6092,5690,6751,5863, +4270,5691,4277,5555,5864,6752,5692,4720,4865,6470,5151,4688,4825,6753,3094,6754,6471,3235,4653,6755,5213,5399,6756,3201,4589,5865,4967,6472,5866,6473,5019,3016,6757,5321,4756,3957,4573,6093,4993,5767,4721,6474,6758,5625,6759,4458,6475,6270,6760,5556,4994,5214,5252,6271,3875,5768,6094,5034,5506,4376,5769,6761,2120,6476,5253,5770,6762,5771,5970,3990,5971,5557,5558,5772,6477,6095,2787,4641,5972,5121,6096,6097,6272,6763,3703,5867,5507,6273,4206,6274,4789,6098,6764,3619,3646,3833,3804,2394,3788,4936,3978, +4866,4899,6099,6100,5559,6478,6765,3599,5868,6101,5869,5870,6275,6766,4527,6767];!0},{"./init":21}],18:[function(b,a,d){!function(a){a.GB2312Prober=function(){a.MultiByteCharSetProber.apply(this);this.getCharsetName=function(){return"GB2312"};this._mCodingSM=new a.CodingStateMachine(a.GB2312SMModel);this._mDistributionAnalyzer=new a.GB2312DistributionAnalysis;this.reset()};a.GB2312Prober.prototype=new a.MultiByteCharSetProber}(b("./init"))},{"./init":21}],19:[function(b,a,d){!function(a){a.HebrewProber= +function(){a.CharSetProber.apply(this);this.reset=function(){this._mFinalCharVisualScore=this._mFinalCharLogicalScore=0;this._mBeforePrev=this._mPrev=" "};this.setModelProbers=function(a,b){this._mLogicalProber=a;this._mVisualProber=b};this.isFinal=function(a){return-1!=["\u00ea","\u00ed","\u00ef","\u00f3","\u00f5"].indexOf(a)};this.isNonFinal=function(a){return-1!=["\u00eb","\u00ee","\u00f0","\u00f4"].indexOf(a)};this.feed=function(b){if(this.getState()==a.Constants.notMe)return a.Constants.notMe; +b=this.filterHighBitOnly(b);for(var f=0,c;f= +a)return"ISO-8859-8";var b=this._mLogicalProber.getConfidence()-this._mVisualProber.getConfidence();return.01b||0>a?"ISO-8859-8":"windows-1255"};this.getState=function(){return this._mLogicalProber.getState()==a.Constants.notMe&&this._mVisualProber.getState()==a.Constants.notMe?a.Constants.notMe:a.Constants.detecting};this._mVisualProber=this._mLogicalProber=null;this.reset()};a.HebrewProber.prototype=new a.CharSetProber;Array.prototype.indexOf||(Array.prototype.indexOf=function(a, +b){var h=this.length>>>0,e=Number(b)||0,e=0>e?Math.ceil(e):Math.floor(e);for(0>e&&(e+=h);ea;this._mRelSample[a++]=0);this._mNeedToSkipCharNum=0;this._mLastCharOrder= +-1;this._mDone=!1};this.feed=function(b,f){if(!this._mDone)for(var c=this._mNeedToSkipCharNum;cf)this._mNeedToSkipCharNum=c-f,this._mLastCharOrder=-1;else{if(-1!=d&&-1!=this._mLastCharOrder){this._mTotalRel+=1;if(1E3=a.charCodeAt(0)||224<=a.charCodeAt(0)&&252>=a.charCodeAt(0)?2:1;return 1=a.charCodeAt(0)?[a.charCodeAt(1)-159,b]:[-1,b]}};a.SJISContextAnalysis.prototype=new a.JapaneseContextAnalysis;a.EUCJPContextAnalysis= +function(){this.getOrder=function(a){if(!a)return[-1,1];var b=142<=a.charCodeAt(0)||161<=a.charCodeAt(0)&&254>=a.charCodeAt(0)?2:143==a.charCodeAt(0)?3:1;return 1=a.charCodeAt(1)?[a.charCodeAt(1)-161,b]:[-1,b]}};a.EUCJPContextAnalysis.prototype=new a.JapaneseContextAnalysis}(b("./init"))},{"./init":21}],24:[function(b,a,d){b=b("./init");b.Latin5_BulgarianCharToOrderMap=[255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,253,77,90,99,100,72,109,107,101,79,185,81,102,76,94,82,110,186,108,91,74,119,84,96,111,187,115,253,253,253,253,253,253,65,69,70,66,63,68,112,103,92,194,104,95,86,87,71,116,195,85,93,97,113,196,197,198,199,200,253,253,253,253,253,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215, +216,217,218,219,220,221,222,223,224,225,81,226,227,228,229,230,105,231,232,233,234,235,236,45,237,238,31,32,35,43,37,44,55,47,40,59,33,46,38,36,41,30,39,28,34,51,48,49,53,50,54,57,61,239,67,240,60,56,1,18,9,20,11,3,23,15,2,26,12,10,14,6,4,13,7,8,5,19,29,25,22,21,27,24,17,75,52,241,42,16,62,242,243,244,58,245,98,246,247,248,249,250,251,91,252,253];b.win1251BulgarianCharToOrderMap=[255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,253,77,90,99,100,72,109,107,101,79,185,81,102,76,94,82,110,186,108,91,74,119,84,96,111,187,115,253,253,253,253,253,253,65,69,70,66,63,68,112,103,92,194,104,95,86,87,71,116,195,85,93,97,113,196,197,198,199,200,253,253,253,253,253,206,207,208,209,210,211,212,213,120,214,215,216,217,218,219,220,221,78,64,83,121,98,117,105,222,223,224,225,226,227,228,229,88,230,231,232, +233,122,89,106,234,235,236,237,238,45,239,240,73,80,118,114,241,242,243,244,245,62,58,246,247,248,249,250,31,32,35,43,37,44,55,47,40,59,33,46,38,36,41,30,39,28,34,51,48,49,53,50,54,57,61,251,67,252,60,56,1,18,9,20,11,3,23,15,2,26,12,10,14,6,4,13,7,8,5,19,29,25,22,21,27,24,17,75,52,253,42,16];b.BulgarianLangModel=[0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,3,3,2,2,3,2,2,1,2,2,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.Win1251BulgarianModel={charToOrderMap:b.win1251BulgarianCharToOrderMap,precedenceMatrix:b.BulgarianLangModel,mTypicalPositiveRatio:.969392,keepEnglishLetter:!1,charsetName:"windows-1251"};!0},{"./init":21}],25:[function(b,a,d){b=b("./init");b.KOI8R_CharToOrderMap=[255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,253,142,143,144,145,146,147,148,149,150,151,152,74,153,75,154,155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253,253,71,172,66,173,65,174,76,175,64,176,177,77,72,178,69,67,179,78,73,180,181,79,182,183,184,185,253,253,253,253,253,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221, +222,223,224,225,68,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,27,3,21,28,13,2,39,19,26,4,23,11,8,12,5,1,15,16,9,7,6,14,24,10,17,18,20,25,30,29,22,54,59,37,44,58,41,48,53,46,55,42,60,36,49,38,31,34,35,43,45,32,40,52,56,33,61,62,51,57,47,63,50,70];b.win1251_CharToOrderMap=[255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,253,253,253,253,253,253,253,253, +253,253,253,253,253,253,253,253,252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,253,142,143,144,145,146,147,148,149,150,151,152,74,153,75,154,155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253,253,71,172,66,173,65,174,76,175,64,176,177,77,72,178,69,67,179,78,73,180,181,79,182,183,184,185,253,253,253,253,253,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231, +232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,68,247,248,249,250,251,252,253,37,44,33,46,41,48,56,51,42,60,36,49,38,31,34,35,45,32,40,52,53,55,58,50,57,63,70,62,61,47,59,43,3,21,10,19,13,2,24,20,4,23,11,8,12,5,1,15,9,7,6,14,39,26,28,22,25,29,54,18,17,30,27,16];b.latin5_CharToOrderMap=[255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,252,252,252, +252,252,252,252,252,252,252,253,253,253,253,253,253,253,142,143,144,145,146,147,148,149,150,151,152,74,153,75,154,155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253,253,71,172,66,173,65,174,76,175,64,176,177,77,72,178,69,67,179,78,73,180,181,79,182,183,184,185,253,253,253,253,253,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,37,44,33,46,41, +48,56,51,42,60,36,49,38,31,34,35,45,32,40,52,53,55,58,50,57,63,70,62,61,47,59,43,3,21,10,19,13,2,24,20,4,23,11,8,12,5,1,15,9,7,6,14,39,26,28,22,25,29,54,18,17,30,27,16,239,68,240,241,242,243,244,245,246,247,248,249,250,251,252,255];b.macCyrillic_CharToOrderMap=[255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,252,252,252,252,252,252,252,252,252,252,253,253, +253,253,253,253,253,142,143,144,145,146,147,148,149,150,151,152,74,153,75,154,155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253,253,71,172,66,173,65,174,76,175,64,176,177,77,72,178,69,67,179,78,73,180,181,79,182,183,184,185,253,253,253,253,253,37,44,33,46,41,48,56,51,42,60,36,49,38,31,34,35,45,32,40,52,53,55,58,50,57,63,70,62,61,47,59,43,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227, +228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,68,16,3,21,10,19,13,2,24,20,4,23,11,8,12,5,1,15,9,7,6,14,39,26,28,22,25,29,54,18,17,30,27,255];b.IBM855_CharToOrderMap=[255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,253,142,143,144,145,146,147, +148,149,150,151,152,74,153,75,154,155,156,157,158,159,160,161,162,163,164,165,253,253,253,253,253,253,71,172,66,173,65,174,76,175,64,176,177,77,72,178,69,67,179,78,73,180,181,79,182,183,184,185,253,253,253,253,253,191,192,193,194,68,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,27,59,54,70,3,37,21,44,28,58,13,41,2,48,39,53,19,46,218,219,220,221,222,223,224,26,55,4,42,225,226,227,228,23,60,229,230,231,232,233,234,235,11,36,236,237,238,239,240,241,242,243, +8,49,12,38,5,31,1,34,15,244,245,246,247,35,16,248,43,9,45,7,32,6,40,14,52,24,56,10,33,17,61,249,250,18,62,20,51,25,57,30,47,29,63,22,50,251,252,255];b.IBM866_CharToOrderMap=[255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,253,142,143,144,145,146,147,148,149,150,151,152,74,153,75,154,155,156,157, +158,159,160,161,162,163,164,165,253,253,253,253,253,253,71,172,66,173,65,174,76,175,64,176,177,77,72,178,69,67,179,78,73,180,181,79,182,183,184,185,253,253,253,253,253,37,44,33,46,41,48,56,51,42,60,36,49,38,31,34,35,45,32,40,52,53,55,58,50,57,63,70,62,61,47,59,43,3,21,10,19,13,2,24,20,4,23,11,8,12,5,1,15,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,9,7, +6,14,39,26,28,22,25,29,54,18,17,30,27,16,239,68,240,241,242,243,244,245,246,247,248,249,250,251,252,255];b.RussianLangModel=[0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,3,3,3,3,1,3,3,3,2,3,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,2,2,2,2,2,0,0,2,3,3,3,2,3,3,3,3,3,3,3,3,3,3,2,3,3,0,0,3,3,3,3,3,3,3,3,3,2,3,2,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,2,2,3,3,3,3,3,3,3,3,3,2,3,3,0,0,3,3,3,3,3,3,3,3,2,3,3,1,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,3,2,3,2,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,3,3,3,3,3,3,3,3,3,3,3,2,1,0,0,0,0,0,0,0,2,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,0,0,3,3,3,3,3,3,3,3,3,3,3,2,1,0,0,0,0,0,1,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3,3,3,2,2,2,3,1,3,3,1,3,3,3,3,2,2,3,0,2,2,2,3,3,2,1,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,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,0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,1,1,0,1,0,1,0,0,0,0,1,1,0,1,1,0,0,0,0,0,1,0,1,1,0,1,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0];b.Koi8rModel={charToOrderMap:b.KOI8R_CharToOrderMap,precedenceMatrix:b.RussianLangModel,mTypicalPositiveRatio:.976601,keepEnglishLetter:!1,charsetName:"KOI8-R"};b.Win1251CyrillicModel={charToOrderMap:b.win1251_CharToOrderMap, +precedenceMatrix:b.RussianLangModel,mTypicalPositiveRatio:.976601,keepEnglishLetter:!1,charsetName:"windows-1251"};b.Latin5CyrillicModel={charToOrderMap:b.latin5_CharToOrderMap,precedenceMatrix:b.RussianLangModel,mTypicalPositiveRatio:.976601,keepEnglishLetter:!1,charsetName:"ISO-8859-5"};b.MacCyrillicModel={charToOrderMap:b.macCyrillic_CharToOrderMap,precedenceMatrix:b.RussianLangModel,mTypicalPositiveRatio:.976601,keepEnglishLetter:!1,charsetName:"MacCyrillic"};b.Ibm866Model={charToOrderMap:b.IBM866_CharToOrderMap, +precedenceMatrix:b.RussianLangModel,mTypicalPositiveRatio:.976601,keepEnglishLetter:!1,charsetName:"IBM866"};b.Ibm855Model={charToOrderMap:b.IBM855_CharToOrderMap,precedenceMatrix:b.RussianLangModel,mTypicalPositiveRatio:.976601,keepEnglishLetter:!1,charsetName:"IBM855"};!0},{"./init":21}],26:[function(b,a,d){b=b("./init");b.Latin7_CharToOrderMap=[255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,253,253,253,253,253,253, +253,253,253,253,253,253,253,253,253,253,252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,253,82,100,104,94,98,101,116,102,111,187,117,92,88,113,85,79,118,105,83,67,114,119,95,99,109,188,253,253,253,253,253,253,72,70,80,81,60,96,93,89,68,120,97,77,86,69,55,78,115,65,66,58,76,106,103,87,107,112,253,253,253,253,253,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,253,233,90,253,253,253,253,253,253,253,253,253, +253,74,253,253,253,253,253,253,247,248,61,36,46,71,73,253,54,253,108,123,110,31,51,43,41,34,91,40,52,47,44,53,38,49,59,39,35,48,250,37,33,45,56,50,84,57,120,121,17,18,22,15,124,1,29,20,21,3,32,13,25,5,11,16,10,6,30,4,9,8,14,7,2,12,28,23,42,24,64,75,19,26,27,253];b.win1253_CharToOrderMap=[255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,252,252,252,252,252, +252,252,252,252,252,253,253,253,253,253,253,253,82,100,104,94,98,101,116,102,111,187,117,92,88,113,85,79,118,105,83,67,114,119,95,99,109,188,253,253,253,253,253,253,72,70,80,81,60,96,93,89,68,120,97,77,86,69,55,78,115,65,66,58,76,106,103,87,107,112,253,253,253,253,253,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,253,233,61,253,253,253,253,253,253,253,253,253,253,74,253,253,253,253,253,253,247,253,253,36,46,71,73,253, +54,253,108,123,110,31,51,43,41,34,91,40,52,47,44,53,38,49,59,39,35,48,250,37,33,45,56,50,84,57,120,121,17,18,22,15,124,1,29,20,21,3,32,13,25,5,11,16,10,6,30,4,9,8,14,7,2,12,28,23,42,24,64,75,19,26,27,253];b.GreekLangModel=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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veRatio:.982851, +keepEnglishLetter:!1,charsetName:"ISO-8859-7"};b.Win1253GreekModel={charToOrderMap:b.win1253_CharToOrderMap,precedenceMatrix:b.GreekLangModel,mTypicalPositiveRatio:.982851,keepEnglishLetter:!1,charsetName:"windows-1253"};!0},{"./init":21}],27:[function(b,a,d){b=b("./init");b.win1255_CharToOrderMap=[255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,252,252,252, +252,252,252,252,252,252,252,253,253,253,253,253,253,253,69,91,79,80,92,89,97,90,68,111,112,82,73,95,85,78,121,86,71,67,102,107,84,114,103,115,253,253,253,253,253,253,50,74,60,61,42,76,70,64,53,105,93,56,65,54,49,66,110,51,43,44,63,81,77,98,75,108,253,253,253,253,253,124,202,203,204,205,40,58,206,207,208,209,210,211,212,213,214,215,83,52,47,46,72,32,94,216,113,217,109,218,219,220,221,34,116,222,118,100,223,224,117,119,104,125,225,226,87,99,227,106,122,123,228,55,229,230,101,231,232,120,233,48,39,57, +234,30,59,41,88,33,37,36,31,29,35,235,62,28,236,126,237,238,38,45,239,240,241,242,243,127,244,245,246,247,248,249,250,9,8,20,16,3,2,24,14,22,1,25,15,4,11,6,23,12,19,13,26,18,27,21,17,7,10,5,251,252,128,96,253];b.HebrewLangModel=[0,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,3,2,3,2,1,2,0,1,0,0,3,0,3,1,0,0,1,3,2,0,1,1,2,0,2,2,2,1,1,1,1,2,1,1,1,2,0,0,2,2,0,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,1,2,1,2,1,2,0,0,2,0,0,0,0,0,1,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,3,3,3,3,3,3,3,3, +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,1,0,0,2,0,2,1,1,0,1,0,1,0,0,1,0,0,0,0,1,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,2,0,1,0,0,1,1,1,0,1,0,0,1,0,0,0,1, +0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,1,1,0,0,1,0,0,2,1,1,1,1,1,0,1,0,0,0,0,1,0,1,0,1,1,1,2,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,1,0,0,0,0,0,1,1,1,1,1,0,1,0,0,0,1,1,0,0];b.Win1255HebrewModel={charToOrderMap:b.win1255_CharToOrderMap,precedenceMatrix:b.HebrewLangModel,mTypicalPositiveRatio:.984004, +keepEnglishLetter:!1,charsetName:"windows-1255"};!0},{"./init":21}],28:[function(b,a,d){b=b("./init");b.Latin2_HungarianCharToOrderMap=[255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,253,28,40,54,45,32,50,49,38,39,53,36,41,34,35,47,46,71,43,33,37,57,48,64,68,55,52,253,253,253,253,253,253,2,18, +26,17,1,27,12,20,9,22,7,6,13,4,8,23,67,10,5,3,21,19,65,62,16,11,253,253,253,253,253,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,75,198,199,200,201,202,203,204,205,79,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,51,81,222,78,223,224,225,226,44,227,228,229,61,230,231,232,233,234,58,235,66,59,236,237,238,60,69,63,239,240,241,82,14,74,242,70,80,243,72,244,15,83,77,84,30,76, +85,245,246,247,25,73,42,24,248,249,250,31,56,29,251,252,253];b.win1250HungarianCharToOrderMap=[255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,253,28,40,54,45,32,50,49,38,39,53,36,41,34,35,47,46,72,43,33,37,57,48,64,68,55,52,253,253,253,253,253,253,2,18,26,17,1,27,12,20,9,22,7,6,13,4,8,23,67, +10,5,3,21,19,65,62,16,11,253,253,253,253,253,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,78,181,69,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,76,198,199,200,201,202,203,204,205,81,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,51,83,222,80,223,224,225,226,44,227,228,229,61,230,231,232,233,234,58,235,66,59,236,237,238,60,70,63,239,240,241,84,14,75,242,71,82,243,73,244,15,85,79,86,30,77,87,245,246,247,25,74,42,24,248,249,250, +31,56,29,251,252,253];b.HungarianLangModel=[0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,2,2,3,3,1,1,2,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-8859-2"};b.Win1250HungarianModel={charToOrderMap:b.win1250HungarianCharToOrderMap,precedenceMatrix:b.HungarianLangModel, +mTypicalPositiveRatio:.947368,keepEnglishLetter:!0,charsetName:"windows-1250"};!0},{"./init":21}],29:[function(b,a,d){b=b("./init");b.TIS620CharToOrderMap=[255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,252,252,252,252,252,252,252,252,252,252,253,253,253,253,253,253,253,182,106,107,100,183,184,185,101,94,186,187,108,109,110,111,188,189,190,89,95,112,113, +191,192,193,194,253,253,253,253,253,253,64,72,73,114,74,115,116,102,81,201,117,90,103,78,82,96,202,91,79,84,104,105,97,98,92,203,253,253,253,253,253,209,210,211,212,213,88,214,215,216,217,218,219,220,118,221,222,223,224,99,85,83,225,226,227,228,229,230,231,232,233,234,235,236,5,30,237,24,238,75,8,26,52,34,51,119,47,58,57,49,53,55,43,20,19,44,14,48,3,17,25,39,62,31,54,45,9,16,2,61,15,239,12,42,46,18,21,76,4,66,63,22,10,1,36,23,13,40,27,32,35,86,240,241,242,243,244,11,28,41,29,33,245,50,37,6,7,67,77, +38,93,246,247,68,56,59,65,69,60,70,80,71,87,248,249,250,251,252,253];b.ThaiLangModel=[0,1,3,3,3,3,0,0,3,3,0,3,3,0,3,3,3,3,3,3,3,3,0,0,3,3,3,0,3,3,3,3,0,3,3,0,0,0,1,3,0,3,3,2,3,3,0,1,2,3,3,3,3,0,2,0,2,0,0,3,2,1,2,2,3,0,3,3,2,3,0,0,3,3,0,3,3,0,3,3,3,3,3,3,3,3,3,0,3,2,3,0,2,2,2,3,0,2,3,0,0,0,0,1,0,1,2,3,1,1,3,2,2,0,1,1,0,0,1,0,0,0,0,0,0,0,1,1,3,3,3,2,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,3,3,2,3,2,3,3,2,2,2,3,1,2,3,0,3,3,2,2,1,2,3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2,2,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,1,1,1,1,0,1,7,1,1,1,1,1,1,5,1,5,0,5,0,0,1,1,1,1,1,1,1,1,1,7,1,7,0,7,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,4,4,4,5,5,4,4,4,4,4,4,4,4,5,5,4,4,4,4,4,1,4,4,4,4,4,5,5,5,6,6,6,6,6,6,7,7,6,6,6,6,6,6,6,6,7,7,6,6,6,6,6,1,6,6,6,6,6,7,7, +7];a.Latin1ClassModel=[0,0,0,0,0,0,0,0,0,3,3,3,3,3,3,3,0,3,3,3,3,3,3,3,0,3,3,3,1,1,3,3,0,3,3,3,1,2,1,2,0,3,3,3,3,3,3,3,0,3,1,3,1,1,1,3,0,3,1,3,1,1,3,3];a.Latin1Prober=function(){a.CharSetProber.apply(this);this.reset=function(){this._mLastCharClass=a.OTH;this._mFreqCounter=[];for(var b=0;4>b;this._mFreqCounter[b++]=0);a.Latin1Prober.prototype.reset.apply(this)};this.getCharsetName=function(){return"windows-1252"};this.feed=function(b){b=this.filterWithEnglishLetters(b);for(var f=0;ff||(b=this._mFreqCounter[3]/f-20*this._mFreqCounter[1]/f);0>b&&(b=0);return.95*b};this.reset()};a.Latin1Prober.prototype=new a.CharSetProber}(b("./init"))}, +{"./init":21}],31:[function(b,a,d){!function(a){a.MultiByteCharSetProber=function(){a.CharSetProber.apply(this);this.reset=function(){a.MultiByteCharSetProber.prototype.reset.apply(this);this._mCodingSM&&this._mCodingSM.reset();this._mDistributionAnalyzer&&this._mDistributionAnalyzer.reset();this._mLastChar="\x00\x00"};this.getCharsetName=function(){};this.feed=function(b){for(var f=b.length,c=0;ca.Constants.SHORTCUT_THRESHOLD&& +(this._mState=a.Constants.foundIt);return this.getState()};this.getConfidence=function(){return this._mDistributionAnalyzer.getConfidence()}};a.MultiByteCharSetProber.prototype=new a.CharSetProber}(b("./init"))},{"./init":21}],32:[function(b,a,d){!function(a){a.MBCSGroupProber=function(){a.CharSetGroupProber.apply(this);this._mProbers=[new a.UTF8Prober,new a.SJISProber,new a.EUCJPProber,new a.GB2312Prober,new a.EUCKRProber,new a.Big5Prober,new a.EUCTWProber];this.reset()};a.MBCSGroupProber.prototype= +new a.CharSetGroupProber}(b("./init"))},{"./init":21}],33:[function(b,a,d){b=b("./init");a=b.Constants;b.BIG5_cls=[1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0];b.BIG5_st=[a.error,a.start,a.start,3,a.error,a.error,a.error,a.error,a.error,a.error,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.error,a.error,a.start,a.start,a.start,a.start,a.start,a.start,a.start];b.Big5CharLenTable=[0,1,1,2,0];b.Big5SMModel={classTable:b.BIG5_cls,classFactor:5,stateTable:b.BIG5_st,charLenTable:b.Big5CharLenTable,name:"Big5"};b.EUCJP_cls=[4,4,4,4,4,4,4,4, +4,4,4,4,4,4,5,5,4,4,4,4,4,4,4,4,4,4,4,5,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,1,3,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5];b.EUCJP_st= +[3,4,3,5,a.start,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.start,a.error,a.start,a.error,a.error,a.error,a.error,a.error,a.start,a.error,a.error,a.error,3,a.error,3,a.error,a.error,a.error,a.start,a.start,a.start,a.start];b.EUCJPCharLenTable=[2,2,2,3,1,0];b.EUCJPSMModel={classTable:b.EUCJP_cls,classFactor:6,stateTable:b.EUCJP_st,charLenTable:b.EUCJPCharLenTable,name:"EUC-JP"};b.EUCKR_cls=[1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1, +1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0];b.EUCKR_st=[a.error,a.start,3,a.error, +a.error,a.error,a.error,a.error,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.error,a.error,a.start,a.start];b.EUCKRCharLenTable=[0,1,2,0];b.EUCKRSMModel={classTable:b.EUCKR_cls,classFactor:4,stateTable:b.EUCKR_st,charLenTable:b.EUCKRCharLenTable,name:"EUC-KR"};b.EUCTW_cls=[2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,2,2,2,2,2,2,2,2,2,2,2,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,2,2,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,4,4,4,4,4,5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0];b.EUCTW_st=[a.error,a.error,a.start,3,3,3,4,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.error,a.start,a.error,a.start,a.start,a.start,a.error,a.error,a.error, +a.error,a.error,5,a.error,a.error,a.error,a.start,a.error,a.start,a.start,a.start,a.error,a.start,a.start,a.start,a.start,a.start,a.start];b.EUCTWCharLenTable=[0,0,1,2,2,2,3];b.EUCTWSMModel={classTable:b.EUCTW_cls,classFactor:7,stateTable:b.EUCTW_st,charLenTable:b.EUCTWCharLenTable,name:"x-euc-tw"};b.GB2312_cls=[1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,4,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,0];b.GB2312_st=[a.error,a.start,a.start,a.start,a.start,a.start,3,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.error, +a.error,a.start,4,a.error,a.start,a.start,a.error,a.error,a.error,a.error,a.error,a.error,5,a.error,a.error,a.error,a.itsMe,a.error,a.error,a.error,a.start,a.start,a.start,a.start,a.start,a.start];b.GB2312CharLenTable=[0,1,1,1,1,1,2];b.GB2312SMModel={classTable:b.GB2312_cls,classFactor:7,stateTable:b.GB2312_st,charLenTable:b.GB2312CharLenTable,name:"GB2312"};b.SJIS_cls=[1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0];b.SJIS_st=[a.error,a.start,a.start,3,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.itsMe,a.itsMe, +a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.error,a.error,a.start,a.start,a.start,a.start];b.SJISCharLenTable=[0,1,1,2,0,0];b.SJISSMModel={classTable:b.SJIS_cls,classFactor:6,stateTable:b.SJIS_st,charLenTable:b.SJISCharLenTable,name:"Shift_JIS"};b.UCS2BE_cls=[0,0,0,0,0,0,0,0,0,0,1,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,5];b.UCS2BE_st=[5,7,7,a.error,4,3,a.error,a.error,a.error,a.error,a.error,a.error,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,6,6,6,6,a.error,a.error,6,6,6,6,6,a.itsMe,6,6,6,6,6,6,5,7,7,a.error,5,8,6,6,a.error,6,6,6,6,6,6,6,a.error,a.error, +a.start,a.start];b.UCS2BECharLenTable=[2,2,2,0,2,2];b.UCS2BESMModel={classTable:b.UCS2BE_cls,classFactor:6,stateTable:b.UCS2BE_st,charLenTable:b.UCS2BECharLenTable,name:"UTF-16BE"};b.UCS2LE_cls=[0,0,0,0,0,0,0,0,0,0,1,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,5];b.UCS2LE_st=[6,6,7,6,4,3,a.error,a.error,a.error,a.error,a.error,a.error,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,5,5,5,a.error,a.itsMe,a.error,5,5,5,a.error,5,a.error,6,6,7,6,8,8,5,5,5,a.error,5,5,5,a.error,a.error,a.error,5,5,5,5,5,a.error,5,a.error,a.start,a.start];b.UCS2LECharLenTable= +[2,2,2,2,2,2];b.UCS2LESMModel={classTable:b.UCS2LE_cls,classFactor:6,stateTable:b.UCS2LE_st,charLenTable:b.UCS2LECharLenTable,name:"UTF-16LE"};b.UTF8_cls=[1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,8,8,8,8,8,8,8,8,8,8,8,8,9,8,8,10,11,11,11,11,11,11,11,12,13,13,13,14,15,0,0];b.UTF8_st=[a.error,a.start,a.error,a.error,a.error,a.error,12,10,9,11,8,7,6,5,4,3,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe,a.itsMe, +a.itsMe,a.itsMe,a.error,a.error,5,5,5,5,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,5,5,5,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,7,7,7,7,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,7,7,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,9,9,9,9,a.error,a.error,a.error,a.error, +a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,9,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,12,12,12,12,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,12,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,12,12,12,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error, +a.error,a.error,a.error,a.start,a.start,a.start,a.start,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error,a.error];b.UTF8CharLenTable=[0,1,0,0,0,0,2,3,3,3,4,4,5,5,6,6];b.UTF8SMModel={classTable:b.UTF8_cls,classFactor:16,stateTable:b.UTF8_st,charLenTable:b.UTF8CharLenTable,name:"UTF-8"};!0},{"./init":21}],34:[function(b,a,d){!function(a){a.SingleByteCharSetProber=function(b,f,c){a.CharSetProber.apply(this);var e=this;this.reset=function(){a.SingleByteCharSetProber.prototype.reset.apply(this); +this._mLastOrder=255;this._mSeqCounters=[];for(var b=0;4>b;this._mSeqCounters[b++]=0);this._mFreqChar=this._mTotalChar=this._mTotalSeqs=0};this.getCharsetName=function(){return this._mNameProber?this._mNameProber.getCharsetName():this._mModel.charsetName};this.feed=function(b){this._mModel.keepEnglishLetter||(b=this.filterWithoutEnglishLetters(b));var c=b.length;if(!c)return this.getState();for(var f=0,d;fd&&this._mTotalChar++,64>d&&(this._mFreqChar++, +64>this._mLastOrder&&(this._mTotalSeqs++,this._mReversed?this._mSeqCounters[this._mModel.precedenceMatrix[64*d+this._mLastOrder]]++:this._mSeqCounters[this._mModel.precedenceMatrix[64*this._mLastOrder+d]]++)),this._mLastOrder=d;this.getState()==a.Constants.detecting&&1024b&&(a.Constants._debug&&a.log(this._mModel.charsetName+" confidence = "+b+", below negative shortcut threshhold 0.05\n"), +this._mState=a.Constants.notMe));return this.getState()};this.getConfidence=function(){var a=.01;0a.Constants.SHORTCUT_THRESHOLD&&(this._mState= +a.Constants.foundIt);return this.getState()};this.getConfidence=function(){var a=this._mContextAnalyzer.getConfidence(),b=this._mDistributionAnalyzer.getConfidence();return Math.max(a,b)};this._mCodingSM=new a.CodingStateMachine(a.SJISSMModel);this._mDistributionAnalyzer=new a.SJISDistributionAnalysis;this._mContextAnalyzer=new a.SJISContextAnalysis;this.reset()};a.SJISProber.prototype=new a.MultiByteCharSetProber}(b("./init"))},{"./init":21}],37:[function(b,a,d){!function(a){a.UniversalDetector= +function(){var b=a.Constants.MINIMUM_THRESHOLD;this.reset=function(){this.result={encoding:null,confidence:0};this.done=!1;this._mStart=!0;this._mGotData=!1;this._mInputState=0;this._mBOM=this._mLastChar="";this._mEscCharsetProber&&this._mEscCharsetProber.reset();for(var a=0,b;b=this._mCharsetProbers[a];a++)b.reset()};this.feed=function(b){if(!this.done&&b.length)if(this._mGotData||(this._mBOM+=b,"\u00ef\u00bb\u00bf"==this._mBOM.slice(0,3)?this.result={encoding:"UTF-8",confidence:1}:"\u00ff\u00fe\x00\x00"== +this._mBOM.slice(0,4)?this.result={encoding:"UTF-32LE",confidence:1}:"\x00\x00\u00fe\u00ff"==this._mBOM.slice(0,4)?this.result={encoding:"UTF-32BE",confidence:1}:"\u00fe\u00ff\x00\x00"==this._mBOM.slice(0,4)?this.result={encoding:"X-ISO-10646-UCS-4-3412",confidence:1}:"\x00\x00\u00ff\u00fe"==this._mBOM.slice(0,4)?this.result={encoding:"X-ISO-10646-UCS-4-2143",confidence:1}:"\u00ff\u00fe"==this._mBOM.slice(0,2)?this.result={encoding:"UTF-16LE",confidence:1}:"\u00fe\u00ff"==this._mBOM.slice(0,2)&&(this.result= +{encoding:"UTF-16BE",confidence:1}),3c&&(c=f,e=g),a.Constants._debug&&a.log(g.getCharsetName()+" confidence "+g.getConfidence()));if(e&&c>b)return this.result={encoding:e.getCharsetName(),confidence:e.getConfidence()}}if(a.Constants._debug)for(a.log("no probers hit minimum threshhold\n"),d= +0;g=this._mCharsetProbers[d];d++)g&&a.log(g.getCharsetName()+" confidence = "+g.getConfidence()+"\n")}};this._highBitDetector=/[\x80-\xFF]/;this._escDetector=/(\x1B|~\{)/;this._mEscCharsetProber=null;this._mCharsetProbers=[];this.reset()}}(b("./init"))},{"./init":21}],38:[function(b,a,d){!function(a){a.UTF8Prober=function(){a.CharSetProber.apply(this);this.reset=function(){a.UTF8Prober.prototype.reset.apply(this);this._mCodingSM.reset();this._mNumOfMBChar=0};this.getCharsetName=function(){return"UTF-8"}; +this.feed=function(b){for(var d=0,c;da.Constants.SHORTCUT_THRESHOLD&&(this._mState=a.Constants.foundIt);return this.getState()};this.getConfidence=function(){var a=.99;if(6> +this._mNumOfMBChar){for(var b=0;b dist/jschardet.min.js", "dist-dev": "mkdir -p dist && browserify index.js -s jschardet --detect-globals false -o dist/jschardet.js" }, - "version": "1.4.2" + "version": "1.5.0" } diff --git a/tools/eslint/node_modules/jschardet/src/chardistribution.js b/tools/eslint/node_modules/jschardet/src/chardistribution.js index 95c736d2f0eeb7..e0b99a3fc239ee 100755 --- a/tools/eslint/node_modules/jschardet/src/chardistribution.js +++ b/tools/eslint/node_modules/jschardet/src/chardistribution.js @@ -33,6 +33,8 @@ jschardet.CharDistributionAnalysis = function() { var ENOUGH_DATA_THRESHOLD = 1024; var SURE_YES = 0.99; var SURE_NO = 0.01; + var MINIMUM_DATA_THRESHOLD = 3; + var self = this; function init() { @@ -77,7 +79,7 @@ jschardet.CharDistributionAnalysis = function() { */ this.getConfidence = function() { // if we didn't receive any character in our consideration range, return negative answer - if( this._mTotalChars <= 0 ) { + if( this._mTotalChars <= 0 || this._mFreqChars <= MINIMUM_DATA_THRESHOLD) { return SURE_NO; } if( this._mTotalChars != this._mFreqChars ) { @@ -232,8 +234,8 @@ jschardet.SJISDistributionAnalysis = function() { this.getOrder = function(aStr) { // for sjis encoding, we are interested - // first byte range: 0x81 -- 0x9f , 0xe0 -- 0xfe - // second byte range: 0x40 -- 0x7e, 0x81 -- 0xfe + // first byte range: 0x81 -- 0x9f , 0xe0 -- 0xef + // second byte range: 0x40 -- 0x7e, 0x80 -- 0xfc // no validation needed here. State machine has done that if( aStr.charCodeAt(0) >= 0x81 && aStr.charCodeAt(0) <= 0x9F ) { var order = 188 * (aStr.charCodeAt(0) - 0x81); @@ -243,7 +245,7 @@ jschardet.SJISDistributionAnalysis = function() { return -1; } order += aStr.charCodeAt(1) - 0x40; - if( aStr.charCodeAt(1) > 0x7F ) { + if( aStr.charCodeAt(1) < 0x40 || aStr.charCodeAt(1) === 0x7F || aStr.charCodeAt(1) > 0xFC) { order = -1; } return order; diff --git a/tools/eslint/node_modules/jschardet/src/mbcssm.js b/tools/eslint/node_modules/jschardet/src/mbcssm.js index 20412069aea149..2596bd845eb376 100755 --- a/tools/eslint/node_modules/jschardet/src/mbcssm.js +++ b/tools/eslint/node_modules/jschardet/src/mbcssm.js @@ -343,8 +343,8 @@ jschardet.SJIS_cls = [ 2,2,2,2,2,2,2,2, // d8 - df 3,3,3,3,3,3,3,3, // e0 - e7 3,3,3,3,3,4,4,4, // e8 - ef - 4,4,4,4,4,4,4,4, // f0 - f7 - 4,4,4,4,4,0,0,0 // f8 - ff + 3,3,3,3,3,3,3,3, // f0 - f7 + 3,3,3,3,3,0,0,0 // f8 - ff ]; jschardet.SJIS_st = [ diff --git a/tools/eslint/node_modules/lru-cache/LICENSE b/tools/eslint/node_modules/lru-cache/LICENSE new file mode 100644 index 00000000000000..19129e315fe593 --- /dev/null +++ b/tools/eslint/node_modules/lru-cache/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/tools/eslint/node_modules/lru-cache/README.md b/tools/eslint/node_modules/lru-cache/README.md new file mode 100644 index 00000000000000..f646c1cb8e50b1 --- /dev/null +++ b/tools/eslint/node_modules/lru-cache/README.md @@ -0,0 +1,152 @@ +# lru cache + +A cache object that deletes the least-recently-used items. + +[![Build Status](https://travis-ci.org/isaacs/node-lru-cache.svg?branch=master)](https://travis-ci.org/isaacs/node-lru-cache) [![Coverage Status](https://coveralls.io/repos/isaacs/node-lru-cache/badge.svg?service=github)](https://coveralls.io/github/isaacs/node-lru-cache) + +## Installation: + +```javascript +npm install lru-cache --save +``` + +## Usage: + +```javascript +var LRU = require("lru-cache") + , options = { max: 500 + , length: function (n, key) { return n * 2 + key.length } + , dispose: function (key, n) { n.close() } + , maxAge: 1000 * 60 * 60 } + , cache = LRU(options) + , otherCache = LRU(50) // sets just the max size + +cache.set("key", "value") +cache.get("key") // "value" + +// non-string keys ARE fully supported +var someObject = {} +cache.set(someObject, 'a value') +cache.set('[object Object]', 'a different value') +assert.equal(cache.get(someObject), 'a value') + +cache.reset() // empty the cache +``` + +If you put more stuff in it, then items will fall out. + +If you try to put an oversized thing in it, then it'll fall out right +away. + +## Options + +* `max` The maximum size of the cache, checked by applying the length + function to all values in the cache. Not setting this is kind of + silly, since that's the whole purpose of this lib, but it defaults + to `Infinity`. +* `maxAge` Maximum age in ms. Items are not pro-actively pruned out + as they age, but if you try to get an item that is too old, it'll + drop it and return undefined instead of giving it to you. +* `length` Function that is used to calculate the length of stored + items. If you're storing strings or buffers, then you probably want + to do something like `function(n, key){return n.length}`. The default is + `function(){return 1}`, which is fine if you want to store `max` + like-sized things. The item is passed as the first argument, and + the key is passed as the second argumnet. +* `dispose` Function that is called on items when they are dropped + from the cache. This can be handy if you want to close file + descriptors or do other cleanup tasks when items are no longer + accessible. Called with `key, value`. It's called *before* + actually removing the item from the internal cache, so if you want + to immediately put it back in, you'll have to do that in a + `nextTick` or `setTimeout` callback or it won't do anything. +* `stale` By default, if you set a `maxAge`, it'll only actually pull + stale items out of the cache when you `get(key)`. (That is, it's + not pre-emptively doing a `setTimeout` or anything.) If you set + `stale:true`, it'll return the stale value before deleting it. If + you don't set this, then it'll return `undefined` when you try to + get a stale entry, as if it had already been deleted. +* `noDisposeOnSet` By default, if you set a `dispose()` method, then + it'll be called whenever a `set()` operation overwrites an existing + key. If you set this option, `dispose()` will only be called when a + key falls out of the cache, not when it is overwritten. + +## API + +* `set(key, value, maxAge)` +* `get(key) => value` + + Both of these will update the "recently used"-ness of the key. + They do what you think. `maxAge` is optional and overrides the + cache `maxAge` option if provided. + + If the key is not found, `get()` will return `undefined`. + + The key and val can be any value. + +* `peek(key)` + + Returns the key value (or `undefined` if not found) without + updating the "recently used"-ness of the key. + + (If you find yourself using this a lot, you *might* be using the + wrong sort of data structure, but there are some use cases where + it's handy.) + +* `del(key)` + + Deletes a key out of the cache. + +* `reset()` + + Clear the cache entirely, throwing away all values. + +* `has(key)` + + Check if a key is in the cache, without updating the recent-ness + or deleting it for being stale. + +* `forEach(function(value,key,cache), [thisp])` + + Just like `Array.prototype.forEach`. Iterates over all the keys + in the cache, in order of recent-ness. (Ie, more recently used + items are iterated over first.) + +* `rforEach(function(value,key,cache), [thisp])` + + The same as `cache.forEach(...)` but items are iterated over in + reverse order. (ie, less recently used items are iterated over + first.) + +* `keys()` + + Return an array of the keys in the cache. + +* `values()` + + Return an array of the values in the cache. + +* `length` + + Return total length of objects in cache taking into account + `length` options function. + +* `itemCount` + + Return total quantity of objects currently in cache. Note, that + `stale` (see options) items are returned as part of this item + count. + +* `dump()` + + Return an array of the cache entries ready for serialization and usage + with 'destinationCache.load(arr)`. + +* `load(cacheEntriesArray)` + + Loads another cache entries array, obtained with `sourceCache.dump()`, + into the cache. The destination cache is reset before loading new entries + +* `prune()` + + Manually iterates over the entire cache proactively pruning old entries diff --git a/tools/eslint/node_modules/lru-cache/index.js b/tools/eslint/node_modules/lru-cache/index.js new file mode 100644 index 00000000000000..460462aadc9dd9 --- /dev/null +++ b/tools/eslint/node_modules/lru-cache/index.js @@ -0,0 +1,467 @@ +'use strict' + +module.exports = LRUCache + +// This will be a proper iterable 'Map' in engines that support it, +// or a fakey-fake PseudoMap in older versions. +var Map = require('pseudomap') +var util = require('util') + +// A linked list to keep track of recently-used-ness +var Yallist = require('yallist') + +// use symbols if possible, otherwise just _props +var hasSymbol = typeof Symbol === 'function' +var makeSymbol +if (hasSymbol) { + makeSymbol = function (key) { + return Symbol.for(key) + } +} else { + makeSymbol = function (key) { + return '_' + key + } +} + +var MAX = makeSymbol('max') +var LENGTH = makeSymbol('length') +var LENGTH_CALCULATOR = makeSymbol('lengthCalculator') +var ALLOW_STALE = makeSymbol('allowStale') +var MAX_AGE = makeSymbol('maxAge') +var DISPOSE = makeSymbol('dispose') +var NO_DISPOSE_ON_SET = makeSymbol('noDisposeOnSet') +var LRU_LIST = makeSymbol('lruList') +var CACHE = makeSymbol('cache') + +function naiveLength () { return 1 } + +// lruList is a yallist where the head is the youngest +// item, and the tail is the oldest. the list contains the Hit +// objects as the entries. +// Each Hit object has a reference to its Yallist.Node. This +// never changes. +// +// cache is a Map (or PseudoMap) that matches the keys to +// the Yallist.Node object. +function LRUCache (options) { + if (!(this instanceof LRUCache)) { + return new LRUCache(options) + } + + if (typeof options === 'number') { + options = { max: options } + } + + if (!options) { + options = {} + } + + var max = this[MAX] = options.max + // Kind of weird to have a default max of Infinity, but oh well. + if (!max || + !(typeof max === 'number') || + max <= 0) { + this[MAX] = Infinity + } + + var lc = options.length || naiveLength + if (typeof lc !== 'function') { + lc = naiveLength + } + this[LENGTH_CALCULATOR] = lc + + this[ALLOW_STALE] = options.stale || false + this[MAX_AGE] = options.maxAge || 0 + this[DISPOSE] = options.dispose + this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false + this.reset() +} + +// resize the cache when the max changes. +Object.defineProperty(LRUCache.prototype, 'max', { + set: function (mL) { + if (!mL || !(typeof mL === 'number') || mL <= 0) { + mL = Infinity + } + this[MAX] = mL + trim(this) + }, + get: function () { + return this[MAX] + }, + enumerable: true +}) + +Object.defineProperty(LRUCache.prototype, 'allowStale', { + set: function (allowStale) { + this[ALLOW_STALE] = !!allowStale + }, + get: function () { + return this[ALLOW_STALE] + }, + enumerable: true +}) + +Object.defineProperty(LRUCache.prototype, 'maxAge', { + set: function (mA) { + if (!mA || !(typeof mA === 'number') || mA < 0) { + mA = 0 + } + this[MAX_AGE] = mA + trim(this) + }, + get: function () { + return this[MAX_AGE] + }, + enumerable: true +}) + +// resize the cache when the lengthCalculator changes. +Object.defineProperty(LRUCache.prototype, 'lengthCalculator', { + set: function (lC) { + if (typeof lC !== 'function') { + lC = naiveLength + } + if (lC !== this[LENGTH_CALCULATOR]) { + this[LENGTH_CALCULATOR] = lC + this[LENGTH] = 0 + this[LRU_LIST].forEach(function (hit) { + hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key) + this[LENGTH] += hit.length + }, this) + } + trim(this) + }, + get: function () { return this[LENGTH_CALCULATOR] }, + enumerable: true +}) + +Object.defineProperty(LRUCache.prototype, 'length', { + get: function () { return this[LENGTH] }, + enumerable: true +}) + +Object.defineProperty(LRUCache.prototype, 'itemCount', { + get: function () { return this[LRU_LIST].length }, + enumerable: true +}) + +LRUCache.prototype.rforEach = function (fn, thisp) { + thisp = thisp || this + for (var walker = this[LRU_LIST].tail; walker !== null;) { + var prev = walker.prev + forEachStep(this, fn, walker, thisp) + walker = prev + } +} + +function forEachStep (self, fn, node, thisp) { + var hit = node.value + if (isStale(self, hit)) { + del(self, node) + if (!self[ALLOW_STALE]) { + hit = undefined + } + } + if (hit) { + fn.call(thisp, hit.value, hit.key, self) + } +} + +LRUCache.prototype.forEach = function (fn, thisp) { + thisp = thisp || this + for (var walker = this[LRU_LIST].head; walker !== null;) { + var next = walker.next + forEachStep(this, fn, walker, thisp) + walker = next + } +} + +LRUCache.prototype.keys = function () { + return this[LRU_LIST].toArray().map(function (k) { + return k.key + }, this) +} + +LRUCache.prototype.values = function () { + return this[LRU_LIST].toArray().map(function (k) { + return k.value + }, this) +} + +LRUCache.prototype.reset = function () { + if (this[DISPOSE] && + this[LRU_LIST] && + this[LRU_LIST].length) { + this[LRU_LIST].forEach(function (hit) { + this[DISPOSE](hit.key, hit.value) + }, this) + } + + this[CACHE] = new Map() // hash of items by key + this[LRU_LIST] = new Yallist() // list of items in order of use recency + this[LENGTH] = 0 // length of items in the list +} + +LRUCache.prototype.dump = function () { + return this[LRU_LIST].map(function (hit) { + if (!isStale(this, hit)) { + return { + k: hit.key, + v: hit.value, + e: hit.now + (hit.maxAge || 0) + } + } + }, this).toArray().filter(function (h) { + return h + }) +} + +LRUCache.prototype.dumpLru = function () { + return this[LRU_LIST] +} + +LRUCache.prototype.inspect = function (n, opts) { + var str = 'LRUCache {' + var extras = false + + var as = this[ALLOW_STALE] + if (as) { + str += '\n allowStale: true' + extras = true + } + + var max = this[MAX] + if (max && max !== Infinity) { + if (extras) { + str += ',' + } + str += '\n max: ' + util.inspect(max, opts) + extras = true + } + + var maxAge = this[MAX_AGE] + if (maxAge) { + if (extras) { + str += ',' + } + str += '\n maxAge: ' + util.inspect(maxAge, opts) + extras = true + } + + var lc = this[LENGTH_CALCULATOR] + if (lc && lc !== naiveLength) { + if (extras) { + str += ',' + } + str += '\n length: ' + util.inspect(this[LENGTH], opts) + extras = true + } + + var didFirst = false + this[LRU_LIST].forEach(function (item) { + if (didFirst) { + str += ',\n ' + } else { + if (extras) { + str += ',\n' + } + didFirst = true + str += '\n ' + } + var key = util.inspect(item.key).split('\n').join('\n ') + var val = { value: item.value } + if (item.maxAge !== maxAge) { + val.maxAge = item.maxAge + } + if (lc !== naiveLength) { + val.length = item.length + } + if (isStale(this, item)) { + val.stale = true + } + + val = util.inspect(val, opts).split('\n').join('\n ') + str += key + ' => ' + val + }) + + if (didFirst || extras) { + str += '\n' + } + str += '}' + + return str +} + +LRUCache.prototype.set = function (key, value, maxAge) { + maxAge = maxAge || this[MAX_AGE] + + var now = maxAge ? Date.now() : 0 + var len = this[LENGTH_CALCULATOR](value, key) + + if (this[CACHE].has(key)) { + if (len > this[MAX]) { + del(this, this[CACHE].get(key)) + return false + } + + var node = this[CACHE].get(key) + var item = node.value + + // dispose of the old one before overwriting + // split out into 2 ifs for better coverage tracking + if (this[DISPOSE]) { + if (!this[NO_DISPOSE_ON_SET]) { + this[DISPOSE](key, item.value) + } + } + + item.now = now + item.maxAge = maxAge + item.value = value + this[LENGTH] += len - item.length + item.length = len + this.get(key) + trim(this) + return true + } + + var hit = new Entry(key, value, len, now, maxAge) + + // oversized objects fall out of cache automatically. + if (hit.length > this[MAX]) { + if (this[DISPOSE]) { + this[DISPOSE](key, value) + } + return false + } + + this[LENGTH] += hit.length + this[LRU_LIST].unshift(hit) + this[CACHE].set(key, this[LRU_LIST].head) + trim(this) + return true +} + +LRUCache.prototype.has = function (key) { + if (!this[CACHE].has(key)) return false + var hit = this[CACHE].get(key).value + if (isStale(this, hit)) { + return false + } + return true +} + +LRUCache.prototype.get = function (key) { + return get(this, key, true) +} + +LRUCache.prototype.peek = function (key) { + return get(this, key, false) +} + +LRUCache.prototype.pop = function () { + var node = this[LRU_LIST].tail + if (!node) return null + del(this, node) + return node.value +} + +LRUCache.prototype.del = function (key) { + del(this, this[CACHE].get(key)) +} + +LRUCache.prototype.load = function (arr) { + // reset the cache + this.reset() + + var now = Date.now() + // A previous serialized cache has the most recent items first + for (var l = arr.length - 1; l >= 0; l--) { + var hit = arr[l] + var expiresAt = hit.e || 0 + if (expiresAt === 0) { + // the item was created without expiration in a non aged cache + this.set(hit.k, hit.v) + } else { + var maxAge = expiresAt - now + // dont add already expired items + if (maxAge > 0) { + this.set(hit.k, hit.v, maxAge) + } + } + } +} + +LRUCache.prototype.prune = function () { + var self = this + this[CACHE].forEach(function (value, key) { + get(self, key, false) + }) +} + +function get (self, key, doUse) { + var node = self[CACHE].get(key) + if (node) { + var hit = node.value + if (isStale(self, hit)) { + del(self, node) + if (!self[ALLOW_STALE]) hit = undefined + } else { + if (doUse) { + self[LRU_LIST].unshiftNode(node) + } + } + if (hit) hit = hit.value + } + return hit +} + +function isStale (self, hit) { + if (!hit || (!hit.maxAge && !self[MAX_AGE])) { + return false + } + var stale = false + var diff = Date.now() - hit.now + if (hit.maxAge) { + stale = diff > hit.maxAge + } else { + stale = self[MAX_AGE] && (diff > self[MAX_AGE]) + } + return stale +} + +function trim (self) { + if (self[LENGTH] > self[MAX]) { + for (var walker = self[LRU_LIST].tail; + self[LENGTH] > self[MAX] && walker !== null;) { + // We know that we're about to delete this one, and also + // what the next least recently used key will be, so just + // go ahead and set it now. + var prev = walker.prev + del(self, walker) + walker = prev + } + } +} + +function del (self, node) { + if (node) { + var hit = node.value + if (self[DISPOSE]) { + self[DISPOSE](hit.key, hit.value) + } + self[LENGTH] -= hit.length + self[CACHE].delete(hit.key) + self[LRU_LIST].removeNode(node) + } +} + +// classy, since V8 prefers predictable objects. +function Entry (key, value, length, now, maxAge) { + this.key = key + this.value = value + this.length = length + this.now = now + this.maxAge = maxAge || 0 +} diff --git a/tools/eslint/node_modules/lru-cache/package.json b/tools/eslint/node_modules/lru-cache/package.json new file mode 100644 index 00000000000000..4cec8d2f23bd4c --- /dev/null +++ b/tools/eslint/node_modules/lru-cache/package.json @@ -0,0 +1,68 @@ +{ + "_from": "lru-cache@^4.0.1", + "_id": "lru-cache@4.1.1", + "_inBundle": false, + "_integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", + "_location": "/eslint/lru-cache", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "lru-cache@^4.0.1", + "name": "lru-cache", + "escapedName": "lru-cache", + "rawSpec": "^4.0.1", + "saveSpec": null, + "fetchSpec": "^4.0.1" + }, + "_requiredBy": [ + "/eslint/cross-spawn" + ], + "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", + "_shasum": "622e32e82488b49279114a4f9ecf45e7cd6bba55", + "_spec": "lru-cache@^4.0.1", + "_where": "/Users/trott/io.js/tools/eslint-tmp/node_modules/eslint/node_modules/cross-spawn", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me" + }, + "bugs": { + "url": "https://github.com/isaacs/node-lru-cache/issues" + }, + "bundleDependencies": false, + "dependencies": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + }, + "deprecated": false, + "description": "A cache object that deletes the least-recently-used items.", + "devDependencies": { + "benchmark": "^2.1.4", + "standard": "^5.4.1", + "tap": "^10.3.3" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/isaacs/node-lru-cache#readme", + "keywords": [ + "mru", + "lru", + "cache" + ], + "license": "ISC", + "main": "index.js", + "name": "lru-cache", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-lru-cache.git" + }, + "scripts": { + "postpublish": "git push origin --all; git push origin --tags", + "posttest": "standard test/*.js index.js", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap test/*.js --100 -J" + }, + "version": "4.1.1" +} diff --git a/tools/eslint/node_modules/markdown-escapes/history.md b/tools/eslint/node_modules/markdown-escapes/history.md deleted file mode 100644 index f20d5035693db5..00000000000000 --- a/tools/eslint/node_modules/markdown-escapes/history.md +++ /dev/null @@ -1,6 +0,0 @@ - - - - -1.0.0 / 2016-07-16 -================== diff --git a/tools/eslint/node_modules/markdown-escapes/index.js b/tools/eslint/node_modules/markdown-escapes/index.js index 38f81193e81238..9e5b7739f9656a 100644 --- a/tools/eslint/node_modules/markdown-escapes/index.js +++ b/tools/eslint/node_modules/markdown-escapes/index.js @@ -1,19 +1,7 @@ -/** - * @author Titus Wormer - * @copyright 2016 Titus Wormer - * @license MIT - * @module markdown-escapes - * @fileoverview List of escapable characters in markdown. - */ - 'use strict'; -/* eslint-env commonjs */ - -/* Expose. */ module.exports = escapes; -/* Characters. */ var defaults = [ '\\', '`', @@ -53,17 +41,11 @@ var commonmark = gfm.concat([ '^' ]); -/* Expose characters. */ escapes.default = defaults; escapes.gfm = gfm; escapes.commonmark = commonmark; -/** - * Get markdown escapes. - * - * @param {Object?} [options] - Configuration. - * @return {Array.} - Escapes. - */ +/* Get markdown escapes. */ function escapes(options) { var settings = options || {}; diff --git a/tools/eslint/node_modules/markdown-escapes/package.json b/tools/eslint/node_modules/markdown-escapes/package.json index 1d4ce55f5ac1b5..0b21321443f16d 100644 --- a/tools/eslint/node_modules/markdown-escapes/package.json +++ b/tools/eslint/node_modules/markdown-escapes/package.json @@ -1,8 +1,8 @@ { "_from": "markdown-escapes@^1.0.0", - "_id": "markdown-escapes@1.0.0", + "_id": "markdown-escapes@1.0.1", "_inBundle": false, - "_integrity": "sha1-yMoZ8dlNaCRZ4Kk8htsnp+9xayM=", + "_integrity": "sha1-GZTfLTr0gR3lmmcUk0wrIpJzRRg=", "_location": "/markdown-escapes", "_phantomChildren": {}, "_requested": { @@ -18,8 +18,8 @@ "_requiredBy": [ "/remark-parse" ], - "_resolved": "https://registry.npmjs.org/markdown-escapes/-/markdown-escapes-1.0.0.tgz", - "_shasum": "c8ca19f1d94d682459e0a93c86db27a7ef716b23", + "_resolved": "https://registry.npmjs.org/markdown-escapes/-/markdown-escapes-1.0.1.tgz", + "_shasum": "1994df2d3af4811de59a6714934c2b2292734518", "_spec": "markdown-escapes@^1.0.0", "_where": "/Users/trott/io.js/tools/eslint-tmp/node_modules/eslint/node_modules/remark-parse", "author": { @@ -42,16 +42,13 @@ "deprecated": false, "description": "List of escapable characters in markdown", "devDependencies": { - "browserify": "^13.0.1", + "browserify": "^14.1.0", "esmangle": "^1.0.1", - "nyc": "^7.0.0", - "remark-cli": "^1.0.0", - "remark-comment-config": "^4.0.0", - "remark-github": "^5.0.0", - "remark-lint": "^4.0.0", - "remark-validate-links": "^4.0.0", + "nyc": "^11.0.0", + "remark-cli": "^3.0.0", + "remark-preset-wooorm": "^3.0.0", "tape": "^4.0.0", - "xo": "^0.16.0" + "xo": "^0.18.0" }, "files": [ "index.js" @@ -73,16 +70,9 @@ "branches": 100 }, "remarkConfig": { - "output": true, "plugins": [ - "comment-config", - "github", - "lint", - "validate-links" - ], - "settings": { - "bullet": "*" - } + "preset-wooorm" + ] }, "repository": { "type": "git", @@ -92,18 +82,18 @@ "build": "npm run build-md && npm run build-bundle && npm run build-mangle", "build-bundle": "browserify index.js --bare -s markdownEscapes > markdown-escapes.js", "build-mangle": "esmangle < markdown-escapes.js > markdown-escapes.min.js", - "build-md": "remark . --quiet --frail", + "build-md": "remark . -qfo", "lint": "xo", "test": "npm run build && npm run lint && npm run test-coverage", "test-api": "node test", "test-coverage": "nyc --reporter lcov tape test.js" }, - "version": "1.0.0", + "version": "1.0.1", "xo": { "space": true, + "esnext": false, "ignores": [ - "markdown-escapes.js", - "markdown-escapes.min.js" + "markdown-escapes.js" ] } } diff --git a/tools/eslint/node_modules/markdown-escapes/readme.md b/tools/eslint/node_modules/markdown-escapes/readme.md index 8ab33f397d289d..2f01806a34cb7b 100644 --- a/tools/eslint/node_modules/markdown-escapes/readme.md +++ b/tools/eslint/node_modules/markdown-escapes/readme.md @@ -1,12 +1,10 @@ # markdown-escapes [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov] - - List of escapable characters in markdown. ## Installation -[npm][npm-install]: +[npm][]: ```bash npm install markdown-escapes @@ -18,12 +16,10 @@ npm install markdown-escapes var escapes = require('markdown-escapes'); // Access by property: -escapes.commonmark; -// ['\\', '`', ..., '@', '^'] +escapes.commonmark; //=> ['\\', '`', ..., '@', '^'] // Access by options object: -escapes({gfm: true}); -// ['\\', '`', ..., '~', '|'] +escapes({gfm: true}); //=> ['\\', '`', ..., '~', '|'] ``` ## API @@ -64,7 +60,7 @@ List of escapable characters in CommonMark (which includes all `gfm`s). [codecov]: https://codecov.io/github/wooorm/markdown-escapes -[npm-install]: https://docs.npmjs.com/cli/install +[npm]: https://docs.npmjs.com/cli/install [license]: LICENSE diff --git a/tools/eslint/node_modules/pseudomap/LICENSE b/tools/eslint/node_modules/pseudomap/LICENSE new file mode 100644 index 00000000000000..19129e315fe593 --- /dev/null +++ b/tools/eslint/node_modules/pseudomap/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/tools/eslint/node_modules/pseudomap/README.md b/tools/eslint/node_modules/pseudomap/README.md new file mode 100644 index 00000000000000..778bf01dfaaf9f --- /dev/null +++ b/tools/eslint/node_modules/pseudomap/README.md @@ -0,0 +1,60 @@ +# pseudomap + +A thing that is a lot like ES6 `Map`, but without iterators, for use +in environments where `for..of` syntax and `Map` are not available. + +If you need iterators, or just in general a more faithful polyfill to +ES6 Maps, check out [es6-map](http://npm.im/es6-map). + +If you are in an environment where `Map` is supported, then that will +be returned instead, unless `process.env.TEST_PSEUDOMAP` is set. + +You can use any value as keys, and any value as data. Setting again +with the identical key will overwrite the previous value. + +Internally, data is stored on an `Object.create(null)` style object. +The key is coerced to a string to generate the key on the internal +data-bag object. The original key used is stored along with the data. + +In the event of a stringified-key collision, a new key is generated by +appending an increasing number to the stringified-key until finding +either the intended key or an empty spot. + +Note that because object traversal order of plain objects is not +guaranteed to be identical to insertion order, the insertion order +guarantee of `Map.prototype.forEach` is not guaranteed in this +implementation. However, in all versions of Node.js and V8 where this +module works, `forEach` does traverse data in insertion order. + +## API + +Most of the [Map +API](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map), +with the following exceptions: + +1. A `Map` object is not an iterator. +2. `values`, `keys`, and `entries` methods are not implemented, + because they return iterators. +3. The argument to the constructor can be an Array of `[key, value]` + pairs, or a `Map` or `PseudoMap` object. But, since iterators + aren't used, passing any plain-old iterator won't initialize the + map properly. + +## USAGE + +Use just like a regular ES6 Map. + +```javascript +var PseudoMap = require('pseudomap') + +// optionally provide a pseudomap, or an array of [key,value] pairs +// as the argument to initialize the map with +var myMap = new PseudoMap() + +myMap.set(1, 'number 1') +myMap.set('1', 'string 1') +var akey = {} +var bkey = {} +myMap.set(akey, { some: 'data' }) +myMap.set(bkey, { some: 'other data' }) +``` diff --git a/tools/eslint/node_modules/pseudomap/map.js b/tools/eslint/node_modules/pseudomap/map.js new file mode 100644 index 00000000000000..7db15994612fd9 --- /dev/null +++ b/tools/eslint/node_modules/pseudomap/map.js @@ -0,0 +1,9 @@ +if (process.env.npm_package_name === 'pseudomap' && + process.env.npm_lifecycle_script === 'test') + process.env.TEST_PSEUDOMAP = 'true' + +if (typeof Map === 'function' && !process.env.TEST_PSEUDOMAP) { + module.exports = Map +} else { + module.exports = require('./pseudomap') +} diff --git a/tools/eslint/node_modules/pseudomap/package.json b/tools/eslint/node_modules/pseudomap/package.json new file mode 100644 index 00000000000000..6f9da04a229d21 --- /dev/null +++ b/tools/eslint/node_modules/pseudomap/package.json @@ -0,0 +1,54 @@ +{ + "_from": "pseudomap@^1.0.2", + "_id": "pseudomap@1.0.2", + "_inBundle": false, + "_integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "_location": "/eslint/pseudomap", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "pseudomap@^1.0.2", + "name": "pseudomap", + "escapedName": "pseudomap", + "rawSpec": "^1.0.2", + "saveSpec": null, + "fetchSpec": "^1.0.2" + }, + "_requiredBy": [ + "/eslint/lru-cache" + ], + "_resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "_shasum": "f052a28da70e618917ef0a8ac34c1ae5a68286b3", + "_spec": "pseudomap@^1.0.2", + "_where": "/Users/trott/io.js/tools/eslint-tmp/node_modules/eslint/node_modules/lru-cache", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/pseudomap/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "A thing that is a lot like ES6 `Map`, but without iterators, for use in environments where `for..of` syntax and `Map` are not available.", + "devDependencies": { + "tap": "^2.3.1" + }, + "directories": { + "test": "test" + }, + "homepage": "https://github.com/isaacs/pseudomap#readme", + "license": "ISC", + "main": "map.js", + "name": "pseudomap", + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/pseudomap.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "1.0.2" +} diff --git a/tools/eslint/node_modules/pseudomap/pseudomap.js b/tools/eslint/node_modules/pseudomap/pseudomap.js new file mode 100644 index 00000000000000..25a21d829e8b3f --- /dev/null +++ b/tools/eslint/node_modules/pseudomap/pseudomap.js @@ -0,0 +1,113 @@ +var hasOwnProperty = Object.prototype.hasOwnProperty + +module.exports = PseudoMap + +function PseudoMap (set) { + if (!(this instanceof PseudoMap)) // whyyyyyyy + throw new TypeError("Constructor PseudoMap requires 'new'") + + this.clear() + + if (set) { + if ((set instanceof PseudoMap) || + (typeof Map === 'function' && set instanceof Map)) + set.forEach(function (value, key) { + this.set(key, value) + }, this) + else if (Array.isArray(set)) + set.forEach(function (kv) { + this.set(kv[0], kv[1]) + }, this) + else + throw new TypeError('invalid argument') + } +} + +PseudoMap.prototype.forEach = function (fn, thisp) { + thisp = thisp || this + Object.keys(this._data).forEach(function (k) { + if (k !== 'size') + fn.call(thisp, this._data[k].value, this._data[k].key) + }, this) +} + +PseudoMap.prototype.has = function (k) { + return !!find(this._data, k) +} + +PseudoMap.prototype.get = function (k) { + var res = find(this._data, k) + return res && res.value +} + +PseudoMap.prototype.set = function (k, v) { + set(this._data, k, v) +} + +PseudoMap.prototype.delete = function (k) { + var res = find(this._data, k) + if (res) { + delete this._data[res._index] + this._data.size-- + } +} + +PseudoMap.prototype.clear = function () { + var data = Object.create(null) + data.size = 0 + + Object.defineProperty(this, '_data', { + value: data, + enumerable: false, + configurable: true, + writable: false + }) +} + +Object.defineProperty(PseudoMap.prototype, 'size', { + get: function () { + return this._data.size + }, + set: function (n) {}, + enumerable: true, + configurable: true +}) + +PseudoMap.prototype.values = +PseudoMap.prototype.keys = +PseudoMap.prototype.entries = function () { + throw new Error('iterators are not implemented in this version') +} + +// Either identical, or both NaN +function same (a, b) { + return a === b || a !== a && b !== b +} + +function Entry (k, v, i) { + this.key = k + this.value = v + this._index = i +} + +function find (data, k) { + for (var i = 0, s = '_' + k, key = s; + hasOwnProperty.call(data, key); + key = s + i++) { + if (same(data[key].key, k)) + return data[key] + } +} + +function set (data, k, v) { + for (var i = 0, s = '_' + k, key = s; + hasOwnProperty.call(data, key); + key = s + i++) { + if (same(data[key].key, k)) { + data[key].value = v + return + } + } + data.size++ + data[key] = new Entry(k, v, key) +} diff --git a/tools/eslint/node_modules/semver/LICENSE b/tools/eslint/node_modules/semver/LICENSE new file mode 100644 index 00000000000000..19129e315fe593 --- /dev/null +++ b/tools/eslint/node_modules/semver/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/tools/eslint/node_modules/semver/README.md b/tools/eslint/node_modules/semver/README.md new file mode 100644 index 00000000000000..cbd956549dbb01 --- /dev/null +++ b/tools/eslint/node_modules/semver/README.md @@ -0,0 +1,350 @@ +semver(1) -- The semantic versioner for npm +=========================================== + +## Usage + + $ npm install semver + $ node + var semver = require('semver') + + semver.valid('1.2.3') // '1.2.3' + semver.valid('a.b.c') // null + semver.clean(' =v1.2.3 ') // '1.2.3' + semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true + semver.gt('1.2.3', '9.8.7') // false + semver.lt('1.2.3', '9.8.7') // true + +As a command-line utility: + + $ semver -h + + SemVer 5.1.0 + + A JavaScript implementation of the http://semver.org/ specification + Copyright Isaac Z. Schlueter + + Usage: semver [options] [ [...]] + Prints valid versions sorted by SemVer precedence + + Options: + -r --range + Print versions that match the specified range. + + -i --increment [] + Increment a version by the specified level. Level can + be one of: major, minor, patch, premajor, preminor, + prepatch, or prerelease. Default level is 'patch'. + Only one version may be specified. + + --preid + Identifier to be used to prefix premajor, preminor, + prepatch or prerelease version increments. + + -l --loose + Interpret versions and ranges loosely + + Program exits successfully if any valid version satisfies + all supplied ranges, and prints all satisfying versions. + + If no satisfying versions are found, then exits failure. + + Versions are printed in ascending order, so supplying + multiple versions to the utility will just sort them. + +## Versions + +A "version" is described by the `v2.0.0` specification found at +. + +A leading `"="` or `"v"` character is stripped off and ignored. + +## Ranges + +A `version range` is a set of `comparators` which specify versions +that satisfy the range. + +A `comparator` is composed of an `operator` and a `version`. The set +of primitive `operators` is: + +* `<` Less than +* `<=` Less than or equal to +* `>` Greater than +* `>=` Greater than or equal to +* `=` Equal. If no operator is specified, then equality is assumed, + so this operator is optional, but MAY be included. + +For example, the comparator `>=1.2.7` would match the versions +`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6` +or `1.1.0`. + +Comparators can be joined by whitespace to form a `comparator set`, +which is satisfied by the **intersection** of all of the comparators +it includes. + +A range is composed of one or more comparator sets, joined by `||`. A +version matches a range if and only if every comparator in at least +one of the `||`-separated comparator sets is satisfied by the version. + +For example, the range `>=1.2.7 <1.3.0` would match the versions +`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`, +or `1.1.0`. + +The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`, +`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`. + +### Prerelease Tags + +If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then +it will only be allowed to satisfy comparator sets if at least one +comparator with the same `[major, minor, patch]` tuple also has a +prerelease tag. + +For example, the range `>1.2.3-alpha.3` would be allowed to match the +version `1.2.3-alpha.7`, but it would *not* be satisfied by +`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater +than" `1.2.3-alpha.3` according to the SemVer sort rules. The version +range only accepts prerelease tags on the `1.2.3` version. The +version `3.4.5` *would* satisfy the range, because it does not have a +prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`. + +The purpose for this behavior is twofold. First, prerelease versions +frequently are updated very quickly, and contain many breaking changes +that are (by the author's design) not yet fit for public consumption. +Therefore, by default, they are excluded from range matching +semantics. + +Second, a user who has opted into using a prerelease version has +clearly indicated the intent to use *that specific* set of +alpha/beta/rc versions. By including a prerelease tag in the range, +the user is indicating that they are aware of the risk. However, it +is still not appropriate to assume that they have opted into taking a +similar risk on the *next* set of prerelease versions. + +#### Prerelease Identifiers + +The method `.inc` takes an additional `identifier` string argument that +will append the value of the string as a prerelease identifier: + +```javascript +> semver.inc('1.2.3', 'prerelease', 'beta') +'1.2.4-beta.0' +``` + +command-line example: + +```shell +$ semver 1.2.3 -i prerelease --preid beta +1.2.4-beta.0 +``` + +Which then can be used to increment further: + +```shell +$ semver 1.2.4-beta.0 -i prerelease +1.2.4-beta.1 +``` + +### Advanced Range Syntax + +Advanced range syntax desugars to primitive comparators in +deterministic ways. + +Advanced ranges may be combined in the same way as primitive +comparators using white space or `||`. + +#### Hyphen Ranges `X.Y.Z - A.B.C` + +Specifies an inclusive set. + +* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4` + +If a partial version is provided as the first version in the inclusive +range, then the missing pieces are replaced with zeroes. + +* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4` + +If a partial version is provided as the second version in the +inclusive range, then all versions that start with the supplied parts +of the tuple are accepted, but nothing that would be greater than the +provided tuple parts. + +* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0` +* `1.2.3 - 2` := `>=1.2.3 <3.0.0` + +#### X-Ranges `1.2.x` `1.X` `1.2.*` `*` + +Any of `X`, `x`, or `*` may be used to "stand in" for one of the +numeric values in the `[major, minor, patch]` tuple. + +* `*` := `>=0.0.0` (Any version satisfies) +* `1.x` := `>=1.0.0 <2.0.0` (Matching major version) +* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions) + +A partial version range is treated as an X-Range, so the special +character is in fact optional. + +* `""` (empty string) := `*` := `>=0.0.0` +* `1` := `1.x.x` := `>=1.0.0 <2.0.0` +* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0` + +#### Tilde Ranges `~1.2.3` `~1.2` `~1` + +Allows patch-level changes if a minor version is specified on the +comparator. Allows minor-level changes if not. + +* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0` +* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`) +* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`) +* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0` +* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`) +* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`) +* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in + the `1.2.3` version will be allowed, if they are greater than or + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but + `1.2.4-beta.2` would not, because it is a prerelease of a + different `[major, minor, patch]` tuple. + +#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` + +Allows changes that do not modify the left-most non-zero digit in the +`[major, minor, patch]` tuple. In other words, this allows patch and +minor updates for versions `1.0.0` and above, patch updates for +versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`. + +Many authors treat a `0.x` version as if the `x` were the major +"breaking-change" indicator. + +Caret ranges are ideal when an author may make breaking changes +between `0.2.4` and `0.3.0` releases, which is a common practice. +However, it presumes that there will *not* be breaking changes between +`0.2.4` and `0.2.5`. It allows for changes that are presumed to be +additive (but non-breaking), according to commonly observed practices. + +* `^1.2.3` := `>=1.2.3 <2.0.0` +* `^0.2.3` := `>=0.2.3 <0.3.0` +* `^0.0.3` := `>=0.0.3 <0.0.4` +* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in + the `1.2.3` version will be allowed, if they are greater than or + equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but + `1.2.4-beta.2` would not, because it is a prerelease of a + different `[major, minor, patch]` tuple. +* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the + `0.0.3` version *only* will be allowed, if they are greater than or + equal to `beta`. So, `0.0.3-pr.2` would be allowed. + +When parsing caret ranges, a missing `patch` value desugars to the +number `0`, but will allow flexibility within that value, even if the +major and minor versions are both `0`. + +* `^1.2.x` := `>=1.2.0 <2.0.0` +* `^0.0.x` := `>=0.0.0 <0.1.0` +* `^0.0` := `>=0.0.0 <0.1.0` + +A missing `minor` and `patch` values will desugar to zero, but also +allow flexibility within those values, even if the major version is +zero. + +* `^1.x` := `>=1.0.0 <2.0.0` +* `^0.x` := `>=0.0.0 <1.0.0` + +### Range Grammar + +Putting all this together, here is a Backus-Naur grammar for ranges, +for the benefit of parser authors: + +```bnf +range-set ::= range ( logical-or range ) * +logical-or ::= ( ' ' ) * '||' ( ' ' ) * +range ::= hyphen | simple ( ' ' simple ) * | '' +hyphen ::= partial ' - ' partial +simple ::= primitive | partial | tilde | caret +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | ) partial +partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? +xr ::= 'x' | 'X' | '*' | nr +nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) * +tilde ::= '~' partial +caret ::= '^' partial +qualifier ::= ( '-' pre )? ( '+' build )? +pre ::= parts +build ::= parts +parts ::= part ( '.' part ) * +part ::= nr | [-0-9A-Za-z]+ +``` + +## Functions + +All methods and classes take a final `loose` boolean argument that, if +true, will be more forgiving about not-quite-valid semver strings. +The resulting output will always be 100% strict, of course. + +Strict-mode Comparators and Ranges will be strict about the SemVer +strings that they parse. + +* `valid(v)`: Return the parsed version, or null if it's not valid. +* `inc(v, release)`: Return the version incremented by the release + type (`major`, `premajor`, `minor`, `preminor`, `patch`, + `prepatch`, or `prerelease`), or null if it's not valid + * `premajor` in one call will bump the version up to the next major + version and down to a prerelease of that major version. + `preminor`, and `prepatch` work the same way. + * If called from a non-prerelease version, the `prerelease` will work the + same as `prepatch`. It increments the patch version, then makes a + prerelease. If the input version is already a prerelease it simply + increments it. +* `prerelease(v)`: Returns an array of prerelease components, or null + if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]` +* `major(v)`: Return the major version number. +* `minor(v)`: Return the minor version number. +* `patch(v)`: Return the patch version number. + +### Comparison + +* `gt(v1, v2)`: `v1 > v2` +* `gte(v1, v2)`: `v1 >= v2` +* `lt(v1, v2)`: `v1 < v2` +* `lte(v1, v2)`: `v1 <= v2` +* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent, + even if they're not the exact same string. You already know how to + compare strings. +* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`. +* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call + the corresponding function above. `"==="` and `"!=="` do simple + string comparison, but are included for completeness. Throws if an + invalid comparison string is provided. +* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if + `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. +* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions + in descending order when passed to `Array.sort()`. +* `diff(v1, v2)`: Returns difference between two versions by the release type + (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), + or null if the versions are the same. + + +### Ranges + +* `validRange(range)`: Return the valid range or null if it's not valid +* `satisfies(version, range)`: Return true if the version satisfies the + range. +* `maxSatisfying(versions, range)`: Return the highest version in the list + that satisfies the range, or `null` if none of them do. +* `minSatisfying(versions, range)`: Return the lowest version in the list + that satisfies the range, or `null` if none of them do. +* `gtr(version, range)`: Return `true` if version is greater than all the + versions possible in the range. +* `ltr(version, range)`: Return `true` if version is less than all the + versions possible in the range. +* `outside(version, range, hilo)`: Return true if the version is outside + the bounds of the range in either the high or low direction. The + `hilo` argument must be either the string `'>'` or `'<'`. (This is + the function called by `gtr` and `ltr`.) + +Note that, since ranges may be non-contiguous, a version might not be +greater than a range, less than a range, *or* satisfy a range! For +example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9` +until `2.0.0`, so the version `1.2.10` would not be greater than the +range (because `2.0.1` satisfies, which is higher), nor less than the +range (since `1.2.8` satisfies, which is lower), and it also does not +satisfy the range. + +If you want to know if a version satisfies or does not satisfy a +range, use the `satisfies(version, range)` function. diff --git a/tools/eslint/node_modules/semver/bin/semver b/tools/eslint/node_modules/semver/bin/semver new file mode 100755 index 00000000000000..c5f2e857e82790 --- /dev/null +++ b/tools/eslint/node_modules/semver/bin/semver @@ -0,0 +1,133 @@ +#!/usr/bin/env node +// Standalone semver comparison program. +// Exits successfully and prints matching version(s) if +// any supplied version is valid and passes all tests. + +var argv = process.argv.slice(2) + , versions = [] + , range = [] + , gt = [] + , lt = [] + , eq = [] + , inc = null + , version = require("../package.json").version + , loose = false + , identifier = undefined + , semver = require("../semver") + , reverse = false + +main() + +function main () { + if (!argv.length) return help() + while (argv.length) { + var a = argv.shift() + var i = a.indexOf('=') + if (i !== -1) { + a = a.slice(0, i) + argv.unshift(a.slice(i + 1)) + } + switch (a) { + case "-rv": case "-rev": case "--rev": case "--reverse": + reverse = true + break + case "-l": case "--loose": + loose = true + break + case "-v": case "--version": + versions.push(argv.shift()) + break + case "-i": case "--inc": case "--increment": + switch (argv[0]) { + case "major": case "minor": case "patch": case "prerelease": + case "premajor": case "preminor": case "prepatch": + inc = argv.shift() + break + default: + inc = "patch" + break + } + break + case "--preid": + identifier = argv.shift() + break + case "-r": case "--range": + range.push(argv.shift()) + break + case "-h": case "--help": case "-?": + return help() + default: + versions.push(a) + break + } + } + + versions = versions.filter(function (v) { + return semver.valid(v, loose) + }) + if (!versions.length) return fail() + if (inc && (versions.length !== 1 || range.length)) + return failInc() + + for (var i = 0, l = range.length; i < l ; i ++) { + versions = versions.filter(function (v) { + return semver.satisfies(v, range[i], loose) + }) + if (!versions.length) return fail() + } + return success(versions) +} + +function failInc () { + console.error("--inc can only be used on a single version with no range") + fail() +} + +function fail () { process.exit(1) } + +function success () { + var compare = reverse ? "rcompare" : "compare" + versions.sort(function (a, b) { + return semver[compare](a, b, loose) + }).map(function (v) { + return semver.clean(v, loose) + }).map(function (v) { + return inc ? semver.inc(v, inc, loose, identifier) : v + }).forEach(function (v,i,_) { console.log(v) }) +} + +function help () { + console.log(["SemVer " + version + ,"" + ,"A JavaScript implementation of the http://semver.org/ specification" + ,"Copyright Isaac Z. Schlueter" + ,"" + ,"Usage: semver [options] [ [...]]" + ,"Prints valid versions sorted by SemVer precedence" + ,"" + ,"Options:" + ,"-r --range " + ," Print versions that match the specified range." + ,"" + ,"-i --increment []" + ," Increment a version by the specified level. Level can" + ," be one of: major, minor, patch, premajor, preminor," + ," prepatch, or prerelease. Default level is 'patch'." + ," Only one version may be specified." + ,"" + ,"--preid " + ," Identifier to be used to prefix premajor, preminor," + ," prepatch or prerelease version increments." + ,"" + ,"-l --loose" + ," Interpret versions and ranges loosely" + ,"" + ,"Program exits successfully if any valid version satisfies" + ,"all supplied ranges, and prints all satisfying versions." + ,"" + ,"If no satisfying versions are found, then exits failure." + ,"" + ,"Versions are printed in ascending order, so supplying" + ,"multiple versions to the utility will just sort them." + ].join("\n")) +} diff --git a/tools/eslint/node_modules/semver/package.json b/tools/eslint/node_modules/semver/package.json new file mode 100644 index 00000000000000..258eba3c29dac8 --- /dev/null +++ b/tools/eslint/node_modules/semver/package.json @@ -0,0 +1,54 @@ +{ + "_from": "semver@^5.3.0", + "_id": "semver@5.3.0", + "_inBundle": false, + "_integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", + "_location": "/eslint/semver", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "semver@^5.3.0", + "name": "semver", + "escapedName": "semver", + "rawSpec": "^5.3.0", + "saveSpec": null, + "fetchSpec": "^5.3.0" + }, + "_requiredBy": [ + "/eslint" + ], + "_resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "_shasum": "9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f", + "_spec": "semver@^5.3.0", + "_where": "/Users/trott/io.js/tools/eslint-tmp/node_modules/eslint", + "bin": { + "semver": "./bin/semver" + }, + "bugs": { + "url": "https://github.com/npm/node-semver/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "The semantic version parser used by npm.", + "devDependencies": { + "tap": "^2.0.0" + }, + "files": [ + "bin", + "range.bnf", + "semver.js" + ], + "homepage": "https://github.com/npm/node-semver#readme", + "license": "ISC", + "main": "semver.js", + "name": "semver", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/node-semver.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "5.3.0" +} diff --git a/tools/eslint/node_modules/semver/range.bnf b/tools/eslint/node_modules/semver/range.bnf new file mode 100644 index 00000000000000..25ebd5c8325488 --- /dev/null +++ b/tools/eslint/node_modules/semver/range.bnf @@ -0,0 +1,16 @@ +range-set ::= range ( logical-or range ) * +logical-or ::= ( ' ' ) * '||' ( ' ' ) * +range ::= hyphen | simple ( ' ' simple ) * | '' +hyphen ::= partial ' - ' partial +simple ::= primitive | partial | tilde | caret +primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | ) partial +partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? +xr ::= 'x' | 'X' | '*' | nr +nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) * +tilde ::= '~' partial +caret ::= '^' partial +qualifier ::= ( '-' pre )? ( '+' build )? +pre ::= parts +build ::= parts +parts ::= part ( '.' part ) * +part ::= nr | [-0-9A-Za-z]+ diff --git a/tools/eslint/node_modules/semver/semver.js b/tools/eslint/node_modules/semver/semver.js new file mode 100644 index 00000000000000..5f1a3c5c9e5dc9 --- /dev/null +++ b/tools/eslint/node_modules/semver/semver.js @@ -0,0 +1,1203 @@ +exports = module.exports = SemVer; + +// The debug function is excluded entirely from the minified version. +/* nomin */ var debug; +/* nomin */ if (typeof process === 'object' && + /* nomin */ process.env && + /* nomin */ process.env.NODE_DEBUG && + /* nomin */ /\bsemver\b/i.test(process.env.NODE_DEBUG)) + /* nomin */ debug = function() { + /* nomin */ var args = Array.prototype.slice.call(arguments, 0); + /* nomin */ args.unshift('SEMVER'); + /* nomin */ console.log.apply(console, args); + /* nomin */ }; +/* nomin */ else + /* nomin */ debug = function() {}; + +// Note: this is the semver.org version of the spec that it implements +// Not necessarily the package version of this code. +exports.SEMVER_SPEC_VERSION = '2.0.0'; + +var MAX_LENGTH = 256; +var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; + +// The actual regexps go on exports.re +var re = exports.re = []; +var src = exports.src = []; +var R = 0; + +// The following Regular Expressions can be used for tokenizing, +// validating, and parsing SemVer version strings. + +// ## Numeric Identifier +// A single `0`, or a non-zero digit followed by zero or more digits. + +var NUMERICIDENTIFIER = R++; +src[NUMERICIDENTIFIER] = '0|[1-9]\\d*'; +var NUMERICIDENTIFIERLOOSE = R++; +src[NUMERICIDENTIFIERLOOSE] = '[0-9]+'; + + +// ## Non-numeric Identifier +// Zero or more digits, followed by a letter or hyphen, and then zero or +// more letters, digits, or hyphens. + +var NONNUMERICIDENTIFIER = R++; +src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'; + + +// ## Main Version +// Three dot-separated numeric identifiers. + +var MAINVERSION = R++; +src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')\\.' + + '(' + src[NUMERICIDENTIFIER] + ')'; + +var MAINVERSIONLOOSE = R++; +src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + + '(' + src[NUMERICIDENTIFIERLOOSE] + ')'; + +// ## Pre-release Version Identifier +// A numeric identifier, or a non-numeric identifier. + +var PRERELEASEIDENTIFIER = R++; +src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + + '|' + src[NONNUMERICIDENTIFIER] + ')'; + +var PRERELEASEIDENTIFIERLOOSE = R++; +src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + + '|' + src[NONNUMERICIDENTIFIER] + ')'; + + +// ## Pre-release Version +// Hyphen, followed by one or more dot-separated pre-release version +// identifiers. + +var PRERELEASE = R++; +src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + + '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))'; + +var PRERELEASELOOSE = R++; +src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + + '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))'; + +// ## Build Metadata Identifier +// Any combination of digits, letters, or hyphens. + +var BUILDIDENTIFIER = R++; +src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+'; + +// ## Build Metadata +// Plus sign, followed by one or more period-separated build metadata +// identifiers. + +var BUILD = R++; +src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + + '(?:\\.' + src[BUILDIDENTIFIER] + ')*))'; + + +// ## Full Version String +// A main version, followed optionally by a pre-release version and +// build metadata. + +// Note that the only major, minor, patch, and pre-release sections of +// the version string are capturing groups. The build metadata is not a +// capturing group, because it should not ever be used in version +// comparison. + +var FULL = R++; +var FULLPLAIN = 'v?' + src[MAINVERSION] + + src[PRERELEASE] + '?' + + src[BUILD] + '?'; + +src[FULL] = '^' + FULLPLAIN + '$'; + +// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. +// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty +// common in the npm registry. +var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + + src[PRERELEASELOOSE] + '?' + + src[BUILD] + '?'; + +var LOOSE = R++; +src[LOOSE] = '^' + LOOSEPLAIN + '$'; + +var GTLT = R++; +src[GTLT] = '((?:<|>)?=?)'; + +// Something like "2.*" or "1.2.x". +// Note that "x.x" is a valid xRange identifer, meaning "any version" +// Only the first item is strictly required. +var XRANGEIDENTIFIERLOOSE = R++; +src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*'; +var XRANGEIDENTIFIER = R++; +src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*'; + +var XRANGEPLAIN = R++; +src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + + '(?:' + src[PRERELEASE] + ')?' + + src[BUILD] + '?' + + ')?)?'; + +var XRANGEPLAINLOOSE = R++; +src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + + '(?:' + src[PRERELEASELOOSE] + ')?' + + src[BUILD] + '?' + + ')?)?'; + +var XRANGE = R++; +src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$'; +var XRANGELOOSE = R++; +src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$'; + +// Tilde ranges. +// Meaning is "reasonably at or greater than" +var LONETILDE = R++; +src[LONETILDE] = '(?:~>?)'; + +var TILDETRIM = R++; +src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+'; +re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g'); +var tildeTrimReplace = '$1~'; + +var TILDE = R++; +src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$'; +var TILDELOOSE = R++; +src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$'; + +// Caret ranges. +// Meaning is "at least and backwards compatible with" +var LONECARET = R++; +src[LONECARET] = '(?:\\^)'; + +var CARETTRIM = R++; +src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+'; +re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g'); +var caretTrimReplace = '$1^'; + +var CARET = R++; +src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$'; +var CARETLOOSE = R++; +src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$'; + +// A simple gt/lt/eq thing, or just "" to indicate "any version" +var COMPARATORLOOSE = R++; +src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$'; +var COMPARATOR = R++; +src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$'; + + +// An expression to strip any whitespace between the gtlt and the thing +// it modifies, so that `> 1.2.3` ==> `>1.2.3` +var COMPARATORTRIM = R++; +src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + + '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')'; + +// this one has to use the /g flag +re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g'); +var comparatorTrimReplace = '$1$2$3'; + + +// Something like `1.2.3 - 1.2.4` +// Note that these all use the loose form, because they'll be +// checked against either the strict or loose comparator form +// later. +var HYPHENRANGE = R++; +src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + + '\\s+-\\s+' + + '(' + src[XRANGEPLAIN] + ')' + + '\\s*$'; + +var HYPHENRANGELOOSE = R++; +src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + + '\\s+-\\s+' + + '(' + src[XRANGEPLAINLOOSE] + ')' + + '\\s*$'; + +// Star ranges basically just allow anything at all. +var STAR = R++; +src[STAR] = '(<|>)?=?\\s*\\*'; + +// Compile to actual regexp objects. +// All are flag-free, unless they were created above with a flag. +for (var i = 0; i < R; i++) { + debug(i, src[i]); + if (!re[i]) + re[i] = new RegExp(src[i]); +} + +exports.parse = parse; +function parse(version, loose) { + if (version instanceof SemVer) + return version; + + if (typeof version !== 'string') + return null; + + if (version.length > MAX_LENGTH) + return null; + + var r = loose ? re[LOOSE] : re[FULL]; + if (!r.test(version)) + return null; + + try { + return new SemVer(version, loose); + } catch (er) { + return null; + } +} + +exports.valid = valid; +function valid(version, loose) { + var v = parse(version, loose); + return v ? v.version : null; +} + + +exports.clean = clean; +function clean(version, loose) { + var s = parse(version.trim().replace(/^[=v]+/, ''), loose); + return s ? s.version : null; +} + +exports.SemVer = SemVer; + +function SemVer(version, loose) { + if (version instanceof SemVer) { + if (version.loose === loose) + return version; + else + version = version.version; + } else if (typeof version !== 'string') { + throw new TypeError('Invalid Version: ' + version); + } + + if (version.length > MAX_LENGTH) + throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') + + if (!(this instanceof SemVer)) + return new SemVer(version, loose); + + debug('SemVer', version, loose); + this.loose = loose; + var m = version.trim().match(loose ? re[LOOSE] : re[FULL]); + + if (!m) + throw new TypeError('Invalid Version: ' + version); + + this.raw = version; + + // these are actually numbers + this.major = +m[1]; + this.minor = +m[2]; + this.patch = +m[3]; + + if (this.major > MAX_SAFE_INTEGER || this.major < 0) + throw new TypeError('Invalid major version') + + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) + throw new TypeError('Invalid minor version') + + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) + throw new TypeError('Invalid patch version') + + // numberify any prerelease numeric ids + if (!m[4]) + this.prerelease = []; + else + this.prerelease = m[4].split('.').map(function(id) { + if (/^[0-9]+$/.test(id)) { + var num = +id; + if (num >= 0 && num < MAX_SAFE_INTEGER) + return num; + } + return id; + }); + + this.build = m[5] ? m[5].split('.') : []; + this.format(); +} + +SemVer.prototype.format = function() { + this.version = this.major + '.' + this.minor + '.' + this.patch; + if (this.prerelease.length) + this.version += '-' + this.prerelease.join('.'); + return this.version; +}; + +SemVer.prototype.toString = function() { + return this.version; +}; + +SemVer.prototype.compare = function(other) { + debug('SemVer.compare', this.version, this.loose, other); + if (!(other instanceof SemVer)) + other = new SemVer(other, this.loose); + + return this.compareMain(other) || this.comparePre(other); +}; + +SemVer.prototype.compareMain = function(other) { + if (!(other instanceof SemVer)) + other = new SemVer(other, this.loose); + + return compareIdentifiers(this.major, other.major) || + compareIdentifiers(this.minor, other.minor) || + compareIdentifiers(this.patch, other.patch); +}; + +SemVer.prototype.comparePre = function(other) { + if (!(other instanceof SemVer)) + other = new SemVer(other, this.loose); + + // NOT having a prerelease is > having one + if (this.prerelease.length && !other.prerelease.length) + return -1; + else if (!this.prerelease.length && other.prerelease.length) + return 1; + else if (!this.prerelease.length && !other.prerelease.length) + return 0; + + var i = 0; + do { + var a = this.prerelease[i]; + var b = other.prerelease[i]; + debug('prerelease compare', i, a, b); + if (a === undefined && b === undefined) + return 0; + else if (b === undefined) + return 1; + else if (a === undefined) + return -1; + else if (a === b) + continue; + else + return compareIdentifiers(a, b); + } while (++i); +}; + +// preminor will bump the version up to the next minor release, and immediately +// down to pre-release. premajor and prepatch work the same way. +SemVer.prototype.inc = function(release, identifier) { + switch (release) { + case 'premajor': + this.prerelease.length = 0; + this.patch = 0; + this.minor = 0; + this.major++; + this.inc('pre', identifier); + break; + case 'preminor': + this.prerelease.length = 0; + this.patch = 0; + this.minor++; + this.inc('pre', identifier); + break; + case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0; + this.inc('patch', identifier); + this.inc('pre', identifier); + break; + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case 'prerelease': + if (this.prerelease.length === 0) + this.inc('patch', identifier); + this.inc('pre', identifier); + break; + + case 'major': + // If this is a pre-major version, bump up to the same major version. + // Otherwise increment major. + // 1.0.0-5 bumps to 1.0.0 + // 1.1.0 bumps to 2.0.0 + if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) + this.major++; + this.minor = 0; + this.patch = 0; + this.prerelease = []; + break; + case 'minor': + // If this is a pre-minor version, bump up to the same minor version. + // Otherwise increment minor. + // 1.2.0-5 bumps to 1.2.0 + // 1.2.1 bumps to 1.3.0 + if (this.patch !== 0 || this.prerelease.length === 0) + this.minor++; + this.patch = 0; + this.prerelease = []; + break; + case 'patch': + // If this is not a pre-release version, it will increment the patch. + // If it is a pre-release it will bump up to the same patch version. + // 1.2.0-5 patches to 1.2.0 + // 1.2.0 patches to 1.2.1 + if (this.prerelease.length === 0) + this.patch++; + this.prerelease = []; + break; + // This probably shouldn't be used publicly. + // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. + case 'pre': + if (this.prerelease.length === 0) + this.prerelease = [0]; + else { + var i = this.prerelease.length; + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++; + i = -2; + } + } + if (i === -1) // didn't increment anything + this.prerelease.push(0); + } + if (identifier) { + // 1.2.0-beta.1 bumps to 1.2.0-beta.2, + // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) + this.prerelease = [identifier, 0]; + } else + this.prerelease = [identifier, 0]; + } + break; + + default: + throw new Error('invalid increment argument: ' + release); + } + this.format(); + this.raw = this.version; + return this; +}; + +exports.inc = inc; +function inc(version, release, loose, identifier) { + if (typeof(loose) === 'string') { + identifier = loose; + loose = undefined; + } + + try { + return new SemVer(version, loose).inc(release, identifier).version; + } catch (er) { + return null; + } +} + +exports.diff = diff; +function diff(version1, version2) { + if (eq(version1, version2)) { + return null; + } else { + var v1 = parse(version1); + var v2 = parse(version2); + if (v1.prerelease.length || v2.prerelease.length) { + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return 'pre'+key; + } + } + } + return 'prerelease'; + } + for (var key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return key; + } + } + } + } +} + +exports.compareIdentifiers = compareIdentifiers; + +var numeric = /^[0-9]+$/; +function compareIdentifiers(a, b) { + var anum = numeric.test(a); + var bnum = numeric.test(b); + + if (anum && bnum) { + a = +a; + b = +b; + } + + return (anum && !bnum) ? -1 : + (bnum && !anum) ? 1 : + a < b ? -1 : + a > b ? 1 : + 0; +} + +exports.rcompareIdentifiers = rcompareIdentifiers; +function rcompareIdentifiers(a, b) { + return compareIdentifiers(b, a); +} + +exports.major = major; +function major(a, loose) { + return new SemVer(a, loose).major; +} + +exports.minor = minor; +function minor(a, loose) { + return new SemVer(a, loose).minor; +} + +exports.patch = patch; +function patch(a, loose) { + return new SemVer(a, loose).patch; +} + +exports.compare = compare; +function compare(a, b, loose) { + return new SemVer(a, loose).compare(b); +} + +exports.compareLoose = compareLoose; +function compareLoose(a, b) { + return compare(a, b, true); +} + +exports.rcompare = rcompare; +function rcompare(a, b, loose) { + return compare(b, a, loose); +} + +exports.sort = sort; +function sort(list, loose) { + return list.sort(function(a, b) { + return exports.compare(a, b, loose); + }); +} + +exports.rsort = rsort; +function rsort(list, loose) { + return list.sort(function(a, b) { + return exports.rcompare(a, b, loose); + }); +} + +exports.gt = gt; +function gt(a, b, loose) { + return compare(a, b, loose) > 0; +} + +exports.lt = lt; +function lt(a, b, loose) { + return compare(a, b, loose) < 0; +} + +exports.eq = eq; +function eq(a, b, loose) { + return compare(a, b, loose) === 0; +} + +exports.neq = neq; +function neq(a, b, loose) { + return compare(a, b, loose) !== 0; +} + +exports.gte = gte; +function gte(a, b, loose) { + return compare(a, b, loose) >= 0; +} + +exports.lte = lte; +function lte(a, b, loose) { + return compare(a, b, loose) <= 0; +} + +exports.cmp = cmp; +function cmp(a, op, b, loose) { + var ret; + switch (op) { + case '===': + if (typeof a === 'object') a = a.version; + if (typeof b === 'object') b = b.version; + ret = a === b; + break; + case '!==': + if (typeof a === 'object') a = a.version; + if (typeof b === 'object') b = b.version; + ret = a !== b; + break; + case '': case '=': case '==': ret = eq(a, b, loose); break; + case '!=': ret = neq(a, b, loose); break; + case '>': ret = gt(a, b, loose); break; + case '>=': ret = gte(a, b, loose); break; + case '<': ret = lt(a, b, loose); break; + case '<=': ret = lte(a, b, loose); break; + default: throw new TypeError('Invalid operator: ' + op); + } + return ret; +} + +exports.Comparator = Comparator; +function Comparator(comp, loose) { + if (comp instanceof Comparator) { + if (comp.loose === loose) + return comp; + else + comp = comp.value; + } + + if (!(this instanceof Comparator)) + return new Comparator(comp, loose); + + debug('comparator', comp, loose); + this.loose = loose; + this.parse(comp); + + if (this.semver === ANY) + this.value = ''; + else + this.value = this.operator + this.semver.version; + + debug('comp', this); +} + +var ANY = {}; +Comparator.prototype.parse = function(comp) { + var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; + var m = comp.match(r); + + if (!m) + throw new TypeError('Invalid comparator: ' + comp); + + this.operator = m[1]; + if (this.operator === '=') + this.operator = ''; + + // if it literally is just '>' or '' then allow anything. + if (!m[2]) + this.semver = ANY; + else + this.semver = new SemVer(m[2], this.loose); +}; + +Comparator.prototype.toString = function() { + return this.value; +}; + +Comparator.prototype.test = function(version) { + debug('Comparator.test', version, this.loose); + + if (this.semver === ANY) + return true; + + if (typeof version === 'string') + version = new SemVer(version, this.loose); + + return cmp(version, this.operator, this.semver, this.loose); +}; + + +exports.Range = Range; +function Range(range, loose) { + if ((range instanceof Range) && range.loose === loose) + return range; + + if (!(this instanceof Range)) + return new Range(range, loose); + + this.loose = loose; + + // First, split based on boolean or || + this.raw = range; + this.set = range.split(/\s*\|\|\s*/).map(function(range) { + return this.parseRange(range.trim()); + }, this).filter(function(c) { + // throw out any that are not relevant for whatever reason + return c.length; + }); + + if (!this.set.length) { + throw new TypeError('Invalid SemVer Range: ' + range); + } + + this.format(); +} + +Range.prototype.format = function() { + this.range = this.set.map(function(comps) { + return comps.join(' ').trim(); + }).join('||').trim(); + return this.range; +}; + +Range.prototype.toString = function() { + return this.range; +}; + +Range.prototype.parseRange = function(range) { + var loose = this.loose; + range = range.trim(); + debug('range', range, loose); + // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` + var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE]; + range = range.replace(hr, hyphenReplace); + debug('hyphen replace', range); + // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` + range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace); + debug('comparator trim', range, re[COMPARATORTRIM]); + + // `~ 1.2.3` => `~1.2.3` + range = range.replace(re[TILDETRIM], tildeTrimReplace); + + // `^ 1.2.3` => `^1.2.3` + range = range.replace(re[CARETTRIM], caretTrimReplace); + + // normalize spaces + range = range.split(/\s+/).join(' '); + + // At this point, the range is completely trimmed and + // ready to be split into comparators. + + var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; + var set = range.split(' ').map(function(comp) { + return parseComparator(comp, loose); + }).join(' ').split(/\s+/); + if (this.loose) { + // in loose mode, throw out any that are not valid comparators + set = set.filter(function(comp) { + return !!comp.match(compRe); + }); + } + set = set.map(function(comp) { + return new Comparator(comp, loose); + }); + + return set; +}; + +// Mostly just for testing and legacy API reasons +exports.toComparators = toComparators; +function toComparators(range, loose) { + return new Range(range, loose).set.map(function(comp) { + return comp.map(function(c) { + return c.value; + }).join(' ').trim().split(' '); + }); +} + +// comprised of xranges, tildes, stars, and gtlt's at this point. +// already replaced the hyphen ranges +// turn into a set of JUST comparators. +function parseComparator(comp, loose) { + debug('comp', comp); + comp = replaceCarets(comp, loose); + debug('caret', comp); + comp = replaceTildes(comp, loose); + debug('tildes', comp); + comp = replaceXRanges(comp, loose); + debug('xrange', comp); + comp = replaceStars(comp, loose); + debug('stars', comp); + return comp; +} + +function isX(id) { + return !id || id.toLowerCase() === 'x' || id === '*'; +} + +// ~, ~> --> * (any, kinda silly) +// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 +// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 +// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 +// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 +// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 +function replaceTildes(comp, loose) { + return comp.trim().split(/\s+/).map(function(comp) { + return replaceTilde(comp, loose); + }).join(' '); +} + +function replaceTilde(comp, loose) { + var r = loose ? re[TILDELOOSE] : re[TILDE]; + return comp.replace(r, function(_, M, m, p, pr) { + debug('tilde', comp, _, M, m, p, pr); + var ret; + + if (isX(M)) + ret = ''; + else if (isX(m)) + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; + else if (isX(p)) + // ~1.2 == >=1.2.0 <1.3.0 + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; + else if (pr) { + debug('replaceTilde pr', pr); + if (pr.charAt(0) !== '-') + pr = '-' + pr; + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + M + '.' + (+m + 1) + '.0'; + } else + // ~1.2.3 == >=1.2.3 <1.3.0 + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0'; + + debug('tilde return', ret); + return ret; + }); +} + +// ^ --> * (any, kinda silly) +// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 +// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 +// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 +// ^1.2.3 --> >=1.2.3 <2.0.0 +// ^1.2.0 --> >=1.2.0 <2.0.0 +function replaceCarets(comp, loose) { + return comp.trim().split(/\s+/).map(function(comp) { + return replaceCaret(comp, loose); + }).join(' '); +} + +function replaceCaret(comp, loose) { + debug('caret', comp, loose); + var r = loose ? re[CARETLOOSE] : re[CARET]; + return comp.replace(r, function(_, M, m, p, pr) { + debug('caret', comp, _, M, m, p, pr); + var ret; + + if (isX(M)) + ret = ''; + else if (isX(m)) + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; + else if (isX(p)) { + if (M === '0') + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; + else + ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'; + } else if (pr) { + debug('replaceCaret pr', pr); + if (pr.charAt(0) !== '-') + pr = '-' + pr; + if (M === '0') { + if (m === '0') + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + M + '.' + m + '.' + (+p + 1); + else + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + M + '.' + (+m + 1) + '.0'; + } else + ret = '>=' + M + '.' + m + '.' + p + pr + + ' <' + (+M + 1) + '.0.0'; + } else { + debug('no pr'); + if (M === '0') { + if (m === '0') + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + m + '.' + (+p + 1); + else + ret = '>=' + M + '.' + m + '.' + p + + ' <' + M + '.' + (+m + 1) + '.0'; + } else + ret = '>=' + M + '.' + m + '.' + p + + ' <' + (+M + 1) + '.0.0'; + } + + debug('caret return', ret); + return ret; + }); +} + +function replaceXRanges(comp, loose) { + debug('replaceXRanges', comp, loose); + return comp.split(/\s+/).map(function(comp) { + return replaceXRange(comp, loose); + }).join(' '); +} + +function replaceXRange(comp, loose) { + comp = comp.trim(); + var r = loose ? re[XRANGELOOSE] : re[XRANGE]; + return comp.replace(r, function(ret, gtlt, M, m, p, pr) { + debug('xRange', comp, ret, gtlt, M, m, p, pr); + var xM = isX(M); + var xm = xM || isX(m); + var xp = xm || isX(p); + var anyX = xp; + + if (gtlt === '=' && anyX) + gtlt = ''; + + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0'; + } else { + // nothing is forbidden + ret = '*'; + } + } else if (gtlt && anyX) { + // replace X with 0 + if (xm) + m = 0; + if (xp) + p = 0; + + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + // >1.2.3 => >= 1.2.4 + gtlt = '>='; + if (xm) { + M = +M + 1; + m = 0; + p = 0; + } else if (xp) { + m = +m + 1; + p = 0; + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<'; + if (xm) + M = +M + 1; + else + m = +m + 1; + } + + ret = gtlt + M + '.' + m + '.' + p; + } else if (xm) { + ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; + } else if (xp) { + ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; + } + + debug('xRange return', ret); + + return ret; + }); +} + +// Because * is AND-ed with everything else in the comparator, +// and '' means "any version", just remove the *s entirely. +function replaceStars(comp, loose) { + debug('replaceStars', comp, loose); + // Looseness is ignored here. star is always as loose as it gets! + return comp.trim().replace(re[STAR], ''); +} + +// This function is passed to string.replace(re[HYPHENRANGE]) +// M, m, patch, prerelease, build +// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 +// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do +// 1.2 - 3.4 => >=1.2.0 <3.5.0 +function hyphenReplace($0, + from, fM, fm, fp, fpr, fb, + to, tM, tm, tp, tpr, tb) { + + if (isX(fM)) + from = ''; + else if (isX(fm)) + from = '>=' + fM + '.0.0'; + else if (isX(fp)) + from = '>=' + fM + '.' + fm + '.0'; + else + from = '>=' + from; + + if (isX(tM)) + to = ''; + else if (isX(tm)) + to = '<' + (+tM + 1) + '.0.0'; + else if (isX(tp)) + to = '<' + tM + '.' + (+tm + 1) + '.0'; + else if (tpr) + to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr; + else + to = '<=' + to; + + return (from + ' ' + to).trim(); +} + + +// if ANY of the sets match ALL of its comparators, then pass +Range.prototype.test = function(version) { + if (!version) + return false; + + if (typeof version === 'string') + version = new SemVer(version, this.loose); + + for (var i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version)) + return true; + } + return false; +}; + +function testSet(set, version) { + for (var i = 0; i < set.length; i++) { + if (!set[i].test(version)) + return false; + } + + if (version.prerelease.length) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (var i = 0; i < set.length; i++) { + debug(set[i].semver); + if (set[i].semver === ANY) + continue; + + if (set[i].semver.prerelease.length > 0) { + var allowed = set[i].semver; + if (allowed.major === version.major && + allowed.minor === version.minor && + allowed.patch === version.patch) + return true; + } + } + + // Version has a -pre, but it's not one of the ones we like. + return false; + } + + return true; +} + +exports.satisfies = satisfies; +function satisfies(version, range, loose) { + try { + range = new Range(range, loose); + } catch (er) { + return false; + } + return range.test(version); +} + +exports.maxSatisfying = maxSatisfying; +function maxSatisfying(versions, range, loose) { + return versions.filter(function(version) { + return satisfies(version, range, loose); + }).sort(function(a, b) { + return rcompare(a, b, loose); + })[0] || null; +} + +exports.minSatisfying = minSatisfying; +function minSatisfying(versions, range, loose) { + return versions.filter(function(version) { + return satisfies(version, range, loose); + }).sort(function(a, b) { + return compare(a, b, loose); + })[0] || null; +} + +exports.validRange = validRange; +function validRange(range, loose) { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, loose).range || '*'; + } catch (er) { + return null; + } +} + +// Determine if version is less than all the versions possible in the range +exports.ltr = ltr; +function ltr(version, range, loose) { + return outside(version, range, '<', loose); +} + +// Determine if version is greater than all the versions possible in the range. +exports.gtr = gtr; +function gtr(version, range, loose) { + return outside(version, range, '>', loose); +} + +exports.outside = outside; +function outside(version, range, hilo, loose) { + version = new SemVer(version, loose); + range = new Range(range, loose); + + var gtfn, ltefn, ltfn, comp, ecomp; + switch (hilo) { + case '>': + gtfn = gt; + ltefn = lte; + ltfn = lt; + comp = '>'; + ecomp = '>='; + break; + case '<': + gtfn = lt; + ltefn = gte; + ltfn = gt; + comp = '<'; + ecomp = '<='; + break; + default: + throw new TypeError('Must provide a hilo val of "<" or ">"'); + } + + // If it satisifes the range it is not outside + if (satisfies(version, range, loose)) { + return false; + } + + // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. + + for (var i = 0; i < range.set.length; ++i) { + var comparators = range.set[i]; + + var high = null; + var low = null; + + comparators.forEach(function(comparator) { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0') + } + high = high || comparator; + low = low || comparator; + if (gtfn(comparator.semver, high.semver, loose)) { + high = comparator; + } else if (ltfn(comparator.semver, low.semver, loose)) { + low = comparator; + } + }); + + // If the edge version comparator has a operator then our version + // isn't outside it + if (high.operator === comp || high.operator === ecomp) { + return false; + } + + // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + if ((!low.operator || low.operator === comp) && + ltefn(version, low.semver)) { + return false; + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false; + } + } + return true; +} + +exports.prerelease = prerelease; +function prerelease(version, loose) { + var parsed = parse(version, loose); + return (parsed && parsed.prerelease.length) ? parsed.prerelease : null; +} diff --git a/tools/eslint/node_modules/shebang-command/index.js b/tools/eslint/node_modules/shebang-command/index.js new file mode 100644 index 00000000000000..2de70b0742665d --- /dev/null +++ b/tools/eslint/node_modules/shebang-command/index.js @@ -0,0 +1,19 @@ +'use strict'; +var shebangRegex = require('shebang-regex'); + +module.exports = function (str) { + var match = str.match(shebangRegex); + + if (!match) { + return null; + } + + var arr = match[0].replace(/#! ?/, '').split(' '); + var bin = arr[0].split('/').pop(); + var arg = arr[1]; + + return (bin === 'env' ? + arg : + bin + (arg ? ' ' + arg : '') + ); +}; diff --git a/tools/eslint/node_modules/shebang-command/license b/tools/eslint/node_modules/shebang-command/license new file mode 100644 index 00000000000000..0f8cf79c3c93ad --- /dev/null +++ b/tools/eslint/node_modules/shebang-command/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Kevin Martensson (github.com/kevva) + +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: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +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. diff --git a/tools/eslint/node_modules/shebang-command/package.json b/tools/eslint/node_modules/shebang-command/package.json new file mode 100644 index 00000000000000..c11c76fb533637 --- /dev/null +++ b/tools/eslint/node_modules/shebang-command/package.json @@ -0,0 +1,71 @@ +{ + "_from": "shebang-command@^1.2.0", + "_id": "shebang-command@1.2.0", + "_inBundle": false, + "_integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "_location": "/eslint/shebang-command", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "shebang-command@^1.2.0", + "name": "shebang-command", + "escapedName": "shebang-command", + "rawSpec": "^1.2.0", + "saveSpec": null, + "fetchSpec": "^1.2.0" + }, + "_requiredBy": [ + "/eslint/cross-spawn" + ], + "_resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "_shasum": "44aac65b695b03398968c39f363fee5deafdf1ea", + "_spec": "shebang-command@^1.2.0", + "_where": "/Users/trott/io.js/tools/eslint-tmp/node_modules/eslint/node_modules/cross-spawn", + "author": { + "name": "Kevin Martensson", + "email": "kevinmartensson@gmail.com", + "url": "github.com/kevva" + }, + "bugs": { + "url": "https://github.com/kevva/shebang-command/issues" + }, + "bundleDependencies": false, + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "deprecated": false, + "description": "Get the command from a shebang", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/kevva/shebang-command#readme", + "keywords": [ + "cmd", + "command", + "parse", + "shebang" + ], + "license": "MIT", + "name": "shebang-command", + "repository": { + "type": "git", + "url": "git+https://github.com/kevva/shebang-command.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.2.0", + "xo": { + "ignores": [ + "test.js" + ] + } +} diff --git a/tools/eslint/node_modules/shebang-command/readme.md b/tools/eslint/node_modules/shebang-command/readme.md new file mode 100644 index 00000000000000..16b0be4d7d09fa --- /dev/null +++ b/tools/eslint/node_modules/shebang-command/readme.md @@ -0,0 +1,39 @@ +# shebang-command [![Build Status](https://travis-ci.org/kevva/shebang-command.svg?branch=master)](https://travis-ci.org/kevva/shebang-command) + +> Get the command from a shebang + + +## Install + +``` +$ npm install --save shebang-command +``` + + +## Usage + +```js +const shebangCommand = require('shebang-command'); + +shebangCommand('#!/usr/bin/env node'); +//=> 'node' + +shebangCommand('#!/bin/bash'); +//=> 'bash' +``` + + +## API + +### shebangCommand(string) + +#### string + +Type: `string` + +String containing a shebang. + + +## License + +MIT © [Kevin Martensson](http://github.com/kevva) diff --git a/tools/eslint/node_modules/shebang-regex/index.js b/tools/eslint/node_modules/shebang-regex/index.js new file mode 100644 index 00000000000000..d052d2e05e60c7 --- /dev/null +++ b/tools/eslint/node_modules/shebang-regex/index.js @@ -0,0 +1,2 @@ +'use strict'; +module.exports = /^#!.*/; diff --git a/tools/eslint/node_modules/shebang-regex/license b/tools/eslint/node_modules/shebang-regex/license new file mode 100644 index 00000000000000..654d0bfe943437 --- /dev/null +++ b/tools/eslint/node_modules/shebang-regex/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +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: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +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. diff --git a/tools/eslint/node_modules/shebang-regex/package.json b/tools/eslint/node_modules/shebang-regex/package.json new file mode 100644 index 00000000000000..75570d43b65f68 --- /dev/null +++ b/tools/eslint/node_modules/shebang-regex/package.json @@ -0,0 +1,64 @@ +{ + "_from": "shebang-regex@^1.0.0", + "_id": "shebang-regex@1.0.0", + "_inBundle": false, + "_integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "_location": "/eslint/shebang-regex", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "shebang-regex@^1.0.0", + "name": "shebang-regex", + "escapedName": "shebang-regex", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/eslint/shebang-command" + ], + "_resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "_shasum": "da42f49740c0b42db2ca9728571cb190c98efea3", + "_spec": "shebang-regex@^1.0.0", + "_where": "/Users/trott/io.js/tools/eslint-tmp/node_modules/eslint/node_modules/shebang-command", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/shebang-regex/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Regular expression for matching a shebang", + "devDependencies": { + "ava": "0.0.4" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/shebang-regex#readme", + "keywords": [ + "re", + "regex", + "regexp", + "shebang", + "match", + "test" + ], + "license": "MIT", + "name": "shebang-regex", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/shebang-regex.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.0.0" +} diff --git a/tools/eslint/node_modules/shebang-regex/readme.md b/tools/eslint/node_modules/shebang-regex/readme.md new file mode 100644 index 00000000000000..ef75e51b5bf0fe --- /dev/null +++ b/tools/eslint/node_modules/shebang-regex/readme.md @@ -0,0 +1,29 @@ +# shebang-regex [![Build Status](https://travis-ci.org/sindresorhus/shebang-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/shebang-regex) + +> Regular expression for matching a [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) + + +## Install + +``` +$ npm install --save shebang-regex +``` + + +## Usage + +```js +var shebangRegex = require('shebang-regex'); +var str = '#!/usr/bin/env node\nconsole.log("unicorns");'; + +shebangRegex.test(str); +//=> true + +shebangRegex.exec(str)[0]; +//=> '#!/usr/bin/env node' +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/tools/eslint/node_modules/string-width/index.js b/tools/eslint/node_modules/string-width/index.js index 1f8a1f113427b0..bbc49d29b156c3 100644 --- a/tools/eslint/node_modules/string-width/index.js +++ b/tools/eslint/node_modules/string-width/index.js @@ -7,10 +7,10 @@ module.exports = str => { return 0; } - let width = 0; - str = stripAnsi(str); + let width = 0; + for (let i = 0; i < str.length; i++) { const code = str.codePointAt(i); @@ -19,16 +19,17 @@ module.exports = str => { continue; } + // Ignore combining characters + if (code >= 0x300 && code <= 0x36F) { + continue; + } + // Surrogates - if (code >= 0x10000) { + if (code > 0xFFFF) { i++; } - if (isFullwidthCodePoint(code)) { - width += 2; - } else { - width++; - } + width += isFullwidthCodePoint(code) ? 2 : 1; } return width; diff --git a/tools/eslint/node_modules/string-width/package.json b/tools/eslint/node_modules/string-width/package.json index 4d0ef383395c99..08cc96ce7bc1f6 100644 --- a/tools/eslint/node_modules/string-width/package.json +++ b/tools/eslint/node_modules/string-width/package.json @@ -1,8 +1,8 @@ { "_from": "string-width@^2.1.0", - "_id": "string-width@2.1.0", + "_id": "string-width@2.1.1", "_inBundle": false, - "_integrity": "sha1-AwZkVh/BRslCPsfZeP4kV0N/5tA=", + "_integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "_location": "/eslint/string-width", "_phantomChildren": {}, "_requested": { @@ -19,8 +19,8 @@ "/eslint/inquirer", "/eslint/table" ], - "_resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.0.tgz", - "_shasum": "030664561fc146c9423ec7d978fe2457437fe6d0", + "_resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "_shasum": "ab93f27a8dc13d28cac815c462143a6d9012ae9e", "_spec": "string-width@^2.1.0", "_where": "/Users/trott/io.js/tools/eslint-tmp/node_modules/eslint/node_modules/inquirer", "author": { @@ -84,5 +84,5 @@ "scripts": { "test": "xo && ava" }, - "version": "2.1.0" + "version": "2.1.1" } diff --git a/tools/eslint/node_modules/vfile-location/index.js b/tools/eslint/node_modules/vfile-location/index.js index 0f85b86290cfa8..9263d2486a7530 100644 --- a/tools/eslint/node_modules/vfile-location/index.js +++ b/tools/eslint/node_modules/vfile-location/index.js @@ -1,22 +1,9 @@ -/** - * @author Titus Wormer - * @copyright 2016 Titus Wormer - * @license MIT - * @module vfile-location - * @fileoverview Convert between positions (line and column-based) - * and offsets (range-based) locations in a virtual file. - */ - 'use strict'; /* Expose. */ module.exports = factory; -/** - * Factory. - * - * @param {VFile|string|Buffer} file - Virtual file or document. - */ +/* Factory. */ function factory(file) { var contents = indices(String(file)); @@ -26,27 +13,13 @@ function factory(file) { }; } -/** - * Factory to get the line and column-based `position` for - * `offset` in the bound indices. - * - * @param {Array.} indices - Indices of - * line-breaks in `value`. - * @return {Function} - Bound method. - */ +/* Factory to get the line and column-based `position` for + * `offset` in the bound indices. */ function offsetToPositionFactory(indices) { return offsetToPosition; - /** - * Get the line and column-based `position` for - * `offset` in the bound indices. - * - * @param {number} offset - Offset. - * @return {Position} - Object with `line`, `column`, - * and `offset` properties based on the bound - * `indices`. An empty object when given invalid - * or out of bounds input. - */ + /* Get the line and column-based `position` for + * `offset` in the bound indices. */ function offsetToPosition(offset) { var index = -1; var length = indices.length; @@ -69,26 +42,13 @@ function offsetToPositionFactory(indices) { } } -/** - * Factory to get the `offset` for a line and column-based - * `position` in the bound indices. - * - * @param {Array.} indices - Indices of - * line-breaks in `value`. - * @return {Function} - Bound method. - */ +/* Factory to get the `offset` for a line and column-based + * `position` in the bound indices. */ function positionToOffsetFactory(indices) { return positionToOffset; - /** - * Get the `offset` for a line and column-based - * `position` in the bound indices. - * - * @param {Position} position - Object with `line` and - * `column` properties. - * @return {number} - Offset. `-1` when given invalid - * or out of bounds input. - */ + /* Get the `offset` for a line and column-based + * `position` in the bound indices. */ function positionToOffset(position) { var line = position && position.line; var column = position && position.column; @@ -101,13 +61,7 @@ function positionToOffsetFactory(indices) { } } -/** - * Get indices of line-breaks in `value`. - * - * @param {string} value - Value. - * @return {Array.} - List of indices of - * line-breaks. - */ +/* Get indices of line-breaks in `value`. */ function indices(value) { var result = []; var index = value.indexOf('\n'); diff --git a/tools/eslint/node_modules/vfile-location/package.json b/tools/eslint/node_modules/vfile-location/package.json index 685f4bbf2f8287..c8a1d7ace95164 100644 --- a/tools/eslint/node_modules/vfile-location/package.json +++ b/tools/eslint/node_modules/vfile-location/package.json @@ -1,8 +1,8 @@ { "_from": "vfile-location@^2.0.0", - "_id": "vfile-location@2.0.1", + "_id": "vfile-location@2.0.2", "_inBundle": false, - "_integrity": "sha1-C/iBb3MrD4vZAqVv2kxiyOk13FI=", + "_integrity": "sha1-02dcWch3SY5JK0dW/2Xkrxp1IlU=", "_location": "/vfile-location", "_phantomChildren": {}, "_requested": { @@ -18,8 +18,8 @@ "_requiredBy": [ "/remark-parse" ], - "_resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-2.0.1.tgz", - "_shasum": "0bf8816f732b0f8bd902a56fda4c62c8e935dc52", + "_resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-2.0.2.tgz", + "_shasum": "d3675c59c877498e492b4756ff65e4af1a752255", "_spec": "vfile-location@^2.0.0", "_where": "/Users/trott/io.js/tools/eslint-tmp/node_modules/eslint/node_modules/remark-parse", "author": { @@ -28,7 +28,7 @@ "url": "http://wooorm.com" }, "bugs": { - "url": "https://github.com/wooorm/vfile-location/issues" + "url": "https://github.com/vfile/vfile-location/issues" }, "bundleDependencies": false, "contributors": [ @@ -42,22 +42,19 @@ "deprecated": false, "description": "Convert between positions (line and column-based) and offsets (range-based) locations in a virtual file", "devDependencies": { - "browserify": "^13.0.1", + "browserify": "^14.0.0", "esmangle": "^1.0.1", - "nyc": "^8.1.0", - "remark-cli": "^1.0.0", - "remark-comment-config": "^4.0.0", - "remark-github": "^5.0.0", - "remark-lint": "^4.0.0", - "remark-validate-links": "^4.0.0", + "nyc": "^11.0.0", + "remark-cli": "^3.0.0", + "remark-preset-wooorm": "^3.0.0", "tape": "^4.0.0", "vfile": "^2.0.0", - "xo": "^0.16.0" + "xo": "^0.18.0" }, "files": [ "index.js" ], - "homepage": "https://github.com/wooorm/vfile-location#readme", + "homepage": "https://github.com/vfile/vfile-location#readme", "keywords": [ "remark", "comment", @@ -74,34 +71,28 @@ "branches": 100 }, "remarkConfig": { - "output": true, - "plugins": { - "comment-config": null, - "github": null, - "lint": null, - "validate-links": null - }, - "settings": { - "bullet": "*" - } + "plugins": [ + "preset-wooorm" + ] }, "repository": { "type": "git", - "url": "git+https://github.com/wooorm/vfile-location.git" + "url": "git+https://github.com/vfile/vfile-location.git" }, "scripts": { "build": "npm run build-md && npm run build-bundle && npm run build-mangle", "build-bundle": "browserify index.js --bare -s vfileLocation > vfile-location.js", "build-mangle": "esmangle vfile-location.js > vfile-location.min.js", - "build-md": "remark . --quiet --frail", + "build-md": "remark . -qfo", "lint": "xo", "test": "npm run build && npm run lint && npm run test-coverage", "test-api": "node test", "test-coverage": "nyc --reporter lcov tape test.js" }, - "version": "2.0.1", + "version": "2.0.2", "xo": { "space": true, + "esnext": false, "ignores": [ "vfile-location.js" ] diff --git a/tools/eslint/node_modules/vfile-location/readme.md b/tools/eslint/node_modules/vfile-location/readme.md index 02081d68dcfef6..c9bad64cce11f5 100644 --- a/tools/eslint/node_modules/vfile-location/readme.md +++ b/tools/eslint/node_modules/vfile-location/readme.md @@ -5,7 +5,7 @@ Convert between positions (line and column-based) and offsets ## Installation -[npm][npm-install]: +[npm][]: ```bash npm install vfile-location @@ -18,19 +18,8 @@ var vfile = require('vfile'); var vfileLocation = require('vfile-location'); var location = vfileLocation(vfile('foo\nbar\nbaz')); -var offset = location.toOffset({line: 3, column: 3}); -var position = location.toPosition(offset); -``` - -Yields: - -```js -10 -{ - "line": 3, - "column": 3, - "offset": 10 -} +location.toOffset({line: 3, column: 3}); //=> 10 +location.toPosition(offset); //=> {line: 3, column: 3, offset: 10} ``` ## API @@ -60,24 +49,24 @@ the bound file. -[travis-badge]: https://img.shields.io/travis/wooorm/vfile-location.svg +[travis-badge]: https://img.shields.io/travis/vfile/vfile-location.svg -[travis]: https://travis-ci.org/wooorm/vfile-location +[travis]: https://travis-ci.org/vfile/vfile-location -[codecov-badge]: https://img.shields.io/codecov/c/github/wooorm/vfile-location.svg +[codecov-badge]: https://img.shields.io/codecov/c/github/vfile/vfile-location.svg -[codecov]: https://codecov.io/github/wooorm/vfile-location +[codecov]: https://codecov.io/github/vfile/vfile-location -[npm-install]: https://docs.npmjs.com/cli/install +[npm]: https://docs.npmjs.com/cli/install [license]: LICENSE [author]: http://wooorm.com -[vfile]: https://github.com/wooorm/vfile +[vfile]: https://github.com/vfile/vfile [to-offset]: #locationtooffsetposition [to-position]: #locationtopositionoffset -[position]: https://github.com/wooorm/unist#position +[position]: https://github.com/syntax-tree/unist#position diff --git a/tools/eslint/node_modules/vfile/index.js b/tools/eslint/node_modules/vfile/index.js index bc5b0ef853272f..26ec88bc97d12f 100644 --- a/tools/eslint/node_modules/vfile/index.js +++ b/tools/eslint/node_modules/vfile/index.js @@ -12,6 +12,7 @@ var proto = VFile.prototype; proto.toString = toString; proto.message = message; +proto.info = info; proto.fail = fail; /* Slight backwards compatibility. Remove in the future. */ @@ -153,8 +154,7 @@ function toString(encoding) { } /* Create a message with `reason` at `position`. - * When an error is passed in as `reason`, copies the - * stack. This does not add a message to `messages`. */ + * When an error is passed in as `reason`, copies the stack. */ function message(reason, position, ruleId) { var filePath = this.path; var range = stringify(position) || '1:1'; @@ -212,6 +212,16 @@ function fail() { throw message; } +/* Info. Creates a vmessage, associates it with the file, + * and marks the fatality as null. */ +function info() { + var message = this.message.apply(this, arguments); + + message.fatal = null; + + return message; +} + /* Inherit from `Error#`. */ function VMessagePrototype() {} VMessagePrototype.prototype = Error.prototype; diff --git a/tools/eslint/node_modules/vfile/package.json b/tools/eslint/node_modules/vfile/package.json index 014377bf2775cb..63ea20349deb69 100644 --- a/tools/eslint/node_modules/vfile/package.json +++ b/tools/eslint/node_modules/vfile/package.json @@ -1,8 +1,8 @@ { "_from": "vfile@^2.0.0", - "_id": "vfile@2.1.0", + "_id": "vfile@2.2.0", "_inBundle": false, - "_integrity": "sha1-086Lgl57jVO4lhZDQSczgZNvAr0=", + "_integrity": "sha1-zkek+zNZIrIz5TXbD32BIdj87U4=", "_location": "/vfile", "_phantomChildren": {}, "_requested": { @@ -18,8 +18,8 @@ "_requiredBy": [ "/unified" ], - "_resolved": "https://registry.npmjs.org/vfile/-/vfile-2.1.0.tgz", - "_shasum": "d3ce8b825e7b8d53b896164341273381936f02bd", + "_resolved": "https://registry.npmjs.org/vfile/-/vfile-2.2.0.tgz", + "_shasum": "ce47a4fb335922b233e535db0f7d8121d8fced4e", "_spec": "vfile@^2.0.0", "_where": "/Users/trott/io.js/tools/eslint-tmp/node_modules/eslint/node_modules/unified", "author": { @@ -37,6 +37,10 @@ "email": "tituswormer@gmail.com", "url": "http://wooorm.com" }, + { + "name": "Brendan Abbott", + "email": "brendan.abbott@temando.com" + }, { "name": "Denys Dovhan", "email": "email@denysdovhan.com" @@ -64,7 +68,7 @@ "devDependencies": { "browserify": "^14.0.0", "esmangle": "^1.0.0", - "nyc": "^10.0.0", + "nyc": "^11.0.0", "remark-cli": "^3.0.0", "remark-preset-wooorm": "^3.0.0", "tape": "^4.4.0", @@ -112,7 +116,7 @@ "test-api": "node test", "test-coverage": "nyc --reporter lcov tape test.js" }, - "version": "2.1.0", + "version": "2.2.0", "xo": { "space": true, "esnext": false, diff --git a/tools/eslint/node_modules/vfile/readme.md b/tools/eslint/node_modules/vfile/readme.md index 38896f69407d09..dc814456a63363 100644 --- a/tools/eslint/node_modules/vfile/readme.md +++ b/tools/eslint/node_modules/vfile/readme.md @@ -42,6 +42,7 @@ npm install vfile * [vfile.data](#vfiledata) * [VFile#toString(\[encoding\])](#vfiletostringencoding) * [VFile#message(reason\[, position\[, ruleId\]\])](#vfilemessagereason-position-ruleid) + * [VFile#info(reason\[, position\[, ruleId\]\])](#vfileinforeason-position-ruleid) * [VFile#fail(reason\[, position\[, ruleId\]\])](#vfilefailreason-position-ruleid) * [VFileMessage](#vfilemessage) * [License](#license) @@ -206,7 +207,8 @@ Convert contents of `vfile` to string. If `contents` is a buffer, ### `VFile#message(reason[, position[, ruleId]])` Associates a message with the file for `reason` at `position`. When an -error is passed in as `reason`, copies the stack. +error is passed in as `reason`, copies the stack. Each message has a `fatal` +property which by default is set to `false` (ie. `warning`). ###### Parameters @@ -215,7 +217,16 @@ error is passed in as `reason`, copies the stack. * `position` (`Node`, `Location`, or `Position`, optional) — Place at which the message occurred in `vfile` * `ruleId` (`string`, optional) - — Category of warning + — Category of message + +###### Returns + +[`VFileMessage`][message]. + +### `VFile#info(reason[, position[, ruleId]])` + +Associates an informational message with the file, where `fatal` is set to +`null`. Calls [`#message()`][messages] internally. ###### Returns diff --git a/tools/eslint/node_modules/which/LICENSE b/tools/eslint/node_modules/which/LICENSE new file mode 100644 index 00000000000000..19129e315fe593 --- /dev/null +++ b/tools/eslint/node_modules/which/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/tools/eslint/node_modules/which/README.md b/tools/eslint/node_modules/which/README.md new file mode 100644 index 00000000000000..7f679d595c28c2 --- /dev/null +++ b/tools/eslint/node_modules/which/README.md @@ -0,0 +1,48 @@ +# which + +Like the unix `which` utility. + +Finds the first instance of a specified executable in the PATH +environment variable. Does not cache the results, so `hash -r` is not +needed when the PATH changes. + +## USAGE + +```javascript +var which = require('which') + +// async usage +which('node', function (er, resolvedPath) { + // er is returned if no "node" is found on the PATH + // if it is found, then the absolute path to the exec is returned +}) + +// sync usage +// throws if not found +var resolved = which.sync('node') + +// Pass options to override the PATH and PATHEXT environment vars. +which('node', { path: someOtherPath }, function (er, resolved) { + if (er) + throw er + console.log('found at %j', resolved) +}) +``` + +## CLI USAGE + +Same as the BSD `which(1)` binary. + +``` +usage: which [-as] program ... +``` + +## OPTIONS + +You may pass an options object as the second argument. + +- `path`: Use instead of the `PATH` environment variable. +- `pathExt`: Use instead of the `PATHEXT` environment variable. +- `all`: Return all matches, instead of just the first one. Note that + this means the function returns an array of strings instead of a + single string. diff --git a/tools/eslint/node_modules/which/bin/which b/tools/eslint/node_modules/which/bin/which new file mode 100755 index 00000000000000..7cee3729eebdd0 --- /dev/null +++ b/tools/eslint/node_modules/which/bin/which @@ -0,0 +1,52 @@ +#!/usr/bin/env node +var which = require("../") +if (process.argv.length < 3) + usage() + +function usage () { + console.error('usage: which [-as] program ...') + process.exit(1) +} + +var all = false +var silent = false +var dashdash = false +var args = process.argv.slice(2).filter(function (arg) { + if (dashdash || !/^-/.test(arg)) + return true + + if (arg === '--') { + dashdash = true + return false + } + + var flags = arg.substr(1).split('') + for (var f = 0; f < flags.length; f++) { + var flag = flags[f] + switch (flag) { + case 's': + silent = true + break + case 'a': + all = true + break + default: + console.error('which: illegal option -- ' + flag) + usage() + } + } + return false +}) + +process.exit(args.reduce(function (pv, current) { + try { + var f = which.sync(current, { all: all }) + if (all) + f = f.join('\n') + if (!silent) + console.log(f) + return pv; + } catch (e) { + return 1; + } +}, 0)) diff --git a/tools/eslint/node_modules/which/package.json b/tools/eslint/node_modules/which/package.json new file mode 100644 index 00000000000000..68abaa933c3e31 --- /dev/null +++ b/tools/eslint/node_modules/which/package.json @@ -0,0 +1,65 @@ +{ + "_from": "which@^1.2.9", + "_id": "which@1.2.14", + "_inBundle": false, + "_integrity": "sha1-mofEN48D6CfOyvGs31bHNsAcFOU=", + "_location": "/eslint/which", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "which@^1.2.9", + "name": "which", + "escapedName": "which", + "rawSpec": "^1.2.9", + "saveSpec": null, + "fetchSpec": "^1.2.9" + }, + "_requiredBy": [ + "/eslint/cross-spawn" + ], + "_resolved": "https://registry.npmjs.org/which/-/which-1.2.14.tgz", + "_shasum": "9a87c4378f03e827cecaf1acdf56c736c01c14e5", + "_spec": "which@^1.2.9", + "_where": "/Users/trott/io.js/tools/eslint-tmp/node_modules/eslint/node_modules/cross-spawn", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me" + }, + "bin": { + "which": "./bin/which" + }, + "bugs": { + "url": "https://github.com/isaacs/node-which/issues" + }, + "bundleDependencies": false, + "dependencies": { + "isexe": "^2.0.0" + }, + "deprecated": false, + "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", + "devDependencies": { + "mkdirp": "^0.5.0", + "rimraf": "^2.3.3", + "tap": "^10.3.0" + }, + "files": [ + "which.js", + "bin/which" + ], + "homepage": "https://github.com/isaacs/node-which#readme", + "license": "ISC", + "main": "which.js", + "name": "which", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-which.git" + }, + "scripts": { + "changelog": "bash gen-changelog.sh", + "postversion": "npm run changelog && git add CHANGELOG.md && git commit -m 'update changelog - '${npm_package_version}", + "test": "tap test/*.js --cov" + }, + "version": "1.2.14" +} diff --git a/tools/eslint/node_modules/which/which.js b/tools/eslint/node_modules/which/which.js new file mode 100644 index 00000000000000..70d974c18bac9d --- /dev/null +++ b/tools/eslint/node_modules/which/which.js @@ -0,0 +1,132 @@ +module.exports = which +which.sync = whichSync + +var isWindows = process.platform === 'win32' || + process.env.OSTYPE === 'cygwin' || + process.env.OSTYPE === 'msys' + +var path = require('path') +var COLON = isWindows ? ';' : ':' +var isexe = require('isexe') + +function getNotFoundError (cmd) { + var er = new Error('not found: ' + cmd) + er.code = 'ENOENT' + + return er +} + +function getPathInfo (cmd, opt) { + var colon = opt.colon || COLON + var pathEnv = opt.path || process.env.PATH || '' + var pathExt = [''] + + pathEnv = pathEnv.split(colon) + + var pathExtExe = '' + if (isWindows) { + pathEnv.unshift(process.cwd()) + pathExtExe = (opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM') + pathExt = pathExtExe.split(colon) + + + // Always test the cmd itself first. isexe will check to make sure + // it's found in the pathExt set. + if (cmd.indexOf('.') !== -1 && pathExt[0] !== '') + pathExt.unshift('') + } + + // If it has a slash, then we don't bother searching the pathenv. + // just check the file itself, and that's it. + if (cmd.match(/\//) || isWindows && cmd.match(/\\/)) + pathEnv = [''] + + return { + env: pathEnv, + ext: pathExt, + extExe: pathExtExe + } +} + +function which (cmd, opt, cb) { + if (typeof opt === 'function') { + cb = opt + opt = {} + } + + var info = getPathInfo(cmd, opt) + var pathEnv = info.env + var pathExt = info.ext + var pathExtExe = info.extExe + var found = [] + + ;(function F (i, l) { + if (i === l) { + if (opt.all && found.length) + return cb(null, found) + else + return cb(getNotFoundError(cmd)) + } + + var pathPart = pathEnv[i] + if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') + pathPart = pathPart.slice(1, -1) + + var p = path.join(pathPart, cmd) + if (!pathPart && (/^\.[\\\/]/).test(cmd)) { + p = cmd.slice(0, 2) + p + } + ;(function E (ii, ll) { + if (ii === ll) return F(i + 1, l) + var ext = pathExt[ii] + isexe(p + ext, { pathExt: pathExtExe }, function (er, is) { + if (!er && is) { + if (opt.all) + found.push(p + ext) + else + return cb(null, p + ext) + } + return E(ii + 1, ll) + }) + })(0, pathExt.length) + })(0, pathEnv.length) +} + +function whichSync (cmd, opt) { + opt = opt || {} + + var info = getPathInfo(cmd, opt) + var pathEnv = info.env + var pathExt = info.ext + var pathExtExe = info.extExe + var found = [] + + for (var i = 0, l = pathEnv.length; i < l; i ++) { + var pathPart = pathEnv[i] + if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') + pathPart = pathPart.slice(1, -1) + + var p = path.join(pathPart, cmd) + if (!pathPart && /^\.[\\\/]/.test(cmd)) { + p = cmd.slice(0, 2) + p + } + for (var j = 0, ll = pathExt.length; j < ll; j ++) { + var cur = p + pathExt[j] + var is + try { + is = isexe.sync(cur, { pathExt: pathExtExe }) + if (is) { + if (opt.all) + found.push(cur) + else + return cur + } + } catch (ex) {} + } + } + + if (opt.all && found.length) + return found + + throw getNotFoundError(cmd) +} diff --git a/tools/eslint/node_modules/yallist/LICENSE b/tools/eslint/node_modules/yallist/LICENSE new file mode 100644 index 00000000000000..19129e315fe593 --- /dev/null +++ b/tools/eslint/node_modules/yallist/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/tools/eslint/node_modules/yallist/README.md b/tools/eslint/node_modules/yallist/README.md new file mode 100644 index 00000000000000..f5861018696688 --- /dev/null +++ b/tools/eslint/node_modules/yallist/README.md @@ -0,0 +1,204 @@ +# yallist + +Yet Another Linked List + +There are many doubly-linked list implementations like it, but this +one is mine. + +For when an array would be too big, and a Map can't be iterated in +reverse order. + + +[![Build Status](https://travis-ci.org/isaacs/yallist.svg?branch=master)](https://travis-ci.org/isaacs/yallist) [![Coverage Status](https://coveralls.io/repos/isaacs/yallist/badge.svg?service=github)](https://coveralls.io/github/isaacs/yallist) + +## basic usage + +```javascript +var yallist = require('yallist') +var myList = yallist.create([1, 2, 3]) +myList.push('foo') +myList.unshift('bar') +// of course pop() and shift() are there, too +console.log(myList.toArray()) // ['bar', 1, 2, 3, 'foo'] +myList.forEach(function (k) { + // walk the list head to tail +}) +myList.forEachReverse(function (k, index, list) { + // walk the list tail to head +}) +var myDoubledList = myList.map(function (k) { + return k + k +}) +// now myDoubledList contains ['barbar', 2, 4, 6, 'foofoo'] +// mapReverse is also a thing +var myDoubledListReverse = myList.mapReverse(function (k) { + return k + k +}) // ['foofoo', 6, 4, 2, 'barbar'] + +var reduced = myList.reduce(function (set, entry) { + set += entry + return set +}, 'start') +console.log(reduced) // 'startfoo123bar' +``` + +## api + +The whole API is considered "public". + +Functions with the same name as an Array method work more or less the +same way. + +There's reverse versions of most things because that's the point. + +### Yallist + +Default export, the class that holds and manages a list. + +Call it with either a forEach-able (like an array) or a set of +arguments, to initialize the list. + +The Array-ish methods all act like you'd expect. No magic length, +though, so if you change that it won't automatically prune or add +empty spots. + +### Yallist.create(..) + +Alias for Yallist function. Some people like factories. + +#### yallist.head + +The first node in the list + +#### yallist.tail + +The last node in the list + +#### yallist.length + +The number of nodes in the list. (Change this at your peril. It is +not magic like Array length.) + +#### yallist.toArray() + +Convert the list to an array. + +#### yallist.forEach(fn, [thisp]) + +Call a function on each item in the list. + +#### yallist.forEachReverse(fn, [thisp]) + +Call a function on each item in the list, in reverse order. + +#### yallist.get(n) + +Get the data at position `n` in the list. If you use this a lot, +probably better off just using an Array. + +#### yallist.getReverse(n) + +Get the data at position `n`, counting from the tail. + +#### yallist.map(fn, thisp) + +Create a new Yallist with the result of calling the function on each +item. + +#### yallist.mapReverse(fn, thisp) + +Same as `map`, but in reverse. + +#### yallist.pop() + +Get the data from the list tail, and remove the tail from the list. + +#### yallist.push(item, ...) + +Insert one or more items to the tail of the list. + +#### yallist.reduce(fn, initialValue) + +Like Array.reduce. + +#### yallist.reduceReverse + +Like Array.reduce, but in reverse. + +#### yallist.reverse + +Reverse the list in place. + +#### yallist.shift() + +Get the data from the list head, and remove the head from the list. + +#### yallist.slice([from], [to]) + +Just like Array.slice, but returns a new Yallist. + +#### yallist.sliceReverse([from], [to]) + +Just like yallist.slice, but the result is returned in reverse. + +#### yallist.toArray() + +Create an array representation of the list. + +#### yallist.toArrayReverse() + +Create a reversed array representation of the list. + +#### yallist.unshift(item, ...) + +Insert one or more items to the head of the list. + +#### yallist.unshiftNode(node) + +Move a Node object to the front of the list. (That is, pull it out of +wherever it lives, and make it the new head.) + +If the node belongs to a different list, then that list will remove it +first. + +#### yallist.pushNode(node) + +Move a Node object to the end of the list. (That is, pull it out of +wherever it lives, and make it the new tail.) + +If the node belongs to a list already, then that list will remove it +first. + +#### yallist.removeNode(node) + +Remove a node from the list, preserving referential integrity of head +and tail and other nodes. + +Will throw an error if you try to have a list remove a node that +doesn't belong to it. + +### Yallist.Node + +The class that holds the data and is actually the list. + +Call with `var n = new Node(value, previousNode, nextNode)` + +Note that if you do direct operations on Nodes themselves, it's very +easy to get into weird states where the list is broken. Be careful :) + +#### node.next + +The next node in the list. + +#### node.prev + +The previous node in the list. + +#### node.value + +The data the node contains. + +#### node.list + +The list to which this node belongs. (Null if it does not belong to +any list.) diff --git a/tools/eslint/node_modules/yallist/iterator.js b/tools/eslint/node_modules/yallist/iterator.js new file mode 100644 index 00000000000000..4a15bf22c40032 --- /dev/null +++ b/tools/eslint/node_modules/yallist/iterator.js @@ -0,0 +1,7 @@ +var Yallist = require('./yallist.js') + +Yallist.prototype[Symbol.iterator] = function* () { + for (let walker = this.head; walker; walker = walker.next) { + yield walker.value + } +} diff --git a/tools/eslint/node_modules/yallist/package.json b/tools/eslint/node_modules/yallist/package.json new file mode 100644 index 00000000000000..1a26ba81939d24 --- /dev/null +++ b/tools/eslint/node_modules/yallist/package.json @@ -0,0 +1,62 @@ +{ + "_from": "yallist@^2.1.2", + "_id": "yallist@2.1.2", + "_inBundle": false, + "_integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "_location": "/eslint/yallist", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "yallist@^2.1.2", + "name": "yallist", + "escapedName": "yallist", + "rawSpec": "^2.1.2", + "saveSpec": null, + "fetchSpec": "^2.1.2" + }, + "_requiredBy": [ + "/eslint/lru-cache" + ], + "_resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "_shasum": "1c11f9218f076089a47dd512f93c6699a6a81d52", + "_spec": "yallist@^2.1.2", + "_where": "/Users/trott/io.js/tools/eslint-tmp/node_modules/eslint/node_modules/lru-cache", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/yallist/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "Yet Another Linked List", + "devDependencies": { + "tap": "^10.3.0" + }, + "directories": { + "test": "test" + }, + "files": [ + "yallist.js", + "iterator.js" + ], + "homepage": "https://github.com/isaacs/yallist#readme", + "license": "ISC", + "main": "yallist.js", + "name": "yallist", + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/yallist.git" + }, + "scripts": { + "postpublish": "git push origin --all; git push origin --tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap test/*.js --100" + }, + "version": "2.1.2" +} diff --git a/tools/eslint/node_modules/yallist/yallist.js b/tools/eslint/node_modules/yallist/yallist.js new file mode 100644 index 00000000000000..518d23330b936c --- /dev/null +++ b/tools/eslint/node_modules/yallist/yallist.js @@ -0,0 +1,370 @@ +module.exports = Yallist + +Yallist.Node = Node +Yallist.create = Yallist + +function Yallist (list) { + var self = this + if (!(self instanceof Yallist)) { + self = new Yallist() + } + + self.tail = null + self.head = null + self.length = 0 + + if (list && typeof list.forEach === 'function') { + list.forEach(function (item) { + self.push(item) + }) + } else if (arguments.length > 0) { + for (var i = 0, l = arguments.length; i < l; i++) { + self.push(arguments[i]) + } + } + + return self +} + +Yallist.prototype.removeNode = function (node) { + if (node.list !== this) { + throw new Error('removing node which does not belong to this list') + } + + var next = node.next + var prev = node.prev + + if (next) { + next.prev = prev + } + + if (prev) { + prev.next = next + } + + if (node === this.head) { + this.head = next + } + if (node === this.tail) { + this.tail = prev + } + + node.list.length-- + node.next = null + node.prev = null + node.list = null +} + +Yallist.prototype.unshiftNode = function (node) { + if (node === this.head) { + return + } + + if (node.list) { + node.list.removeNode(node) + } + + var head = this.head + node.list = this + node.next = head + if (head) { + head.prev = node + } + + this.head = node + if (!this.tail) { + this.tail = node + } + this.length++ +} + +Yallist.prototype.pushNode = function (node) { + if (node === this.tail) { + return + } + + if (node.list) { + node.list.removeNode(node) + } + + var tail = this.tail + node.list = this + node.prev = tail + if (tail) { + tail.next = node + } + + this.tail = node + if (!this.head) { + this.head = node + } + this.length++ +} + +Yallist.prototype.push = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + push(this, arguments[i]) + } + return this.length +} + +Yallist.prototype.unshift = function () { + for (var i = 0, l = arguments.length; i < l; i++) { + unshift(this, arguments[i]) + } + return this.length +} + +Yallist.prototype.pop = function () { + if (!this.tail) { + return undefined + } + + var res = this.tail.value + this.tail = this.tail.prev + if (this.tail) { + this.tail.next = null + } else { + this.head = null + } + this.length-- + return res +} + +Yallist.prototype.shift = function () { + if (!this.head) { + return undefined + } + + var res = this.head.value + this.head = this.head.next + if (this.head) { + this.head.prev = null + } else { + this.tail = null + } + this.length-- + return res +} + +Yallist.prototype.forEach = function (fn, thisp) { + thisp = thisp || this + for (var walker = this.head, i = 0; walker !== null; i++) { + fn.call(thisp, walker.value, i, this) + walker = walker.next + } +} + +Yallist.prototype.forEachReverse = function (fn, thisp) { + thisp = thisp || this + for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { + fn.call(thisp, walker.value, i, this) + walker = walker.prev + } +} + +Yallist.prototype.get = function (n) { + for (var i = 0, walker = this.head; walker !== null && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.next + } + if (i === n && walker !== null) { + return walker.value + } +} + +Yallist.prototype.getReverse = function (n) { + for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.prev + } + if (i === n && walker !== null) { + return walker.value + } +} + +Yallist.prototype.map = function (fn, thisp) { + thisp = thisp || this + var res = new Yallist() + for (var walker = this.head; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)) + walker = walker.next + } + return res +} + +Yallist.prototype.mapReverse = function (fn, thisp) { + thisp = thisp || this + var res = new Yallist() + for (var walker = this.tail; walker !== null;) { + res.push(fn.call(thisp, walker.value, this)) + walker = walker.prev + } + return res +} + +Yallist.prototype.reduce = function (fn, initial) { + var acc + var walker = this.head + if (arguments.length > 1) { + acc = initial + } else if (this.head) { + walker = this.head.next + acc = this.head.value + } else { + throw new TypeError('Reduce of empty list with no initial value') + } + + for (var i = 0; walker !== null; i++) { + acc = fn(acc, walker.value, i) + walker = walker.next + } + + return acc +} + +Yallist.prototype.reduceReverse = function (fn, initial) { + var acc + var walker = this.tail + if (arguments.length > 1) { + acc = initial + } else if (this.tail) { + walker = this.tail.prev + acc = this.tail.value + } else { + throw new TypeError('Reduce of empty list with no initial value') + } + + for (var i = this.length - 1; walker !== null; i--) { + acc = fn(acc, walker.value, i) + walker = walker.prev + } + + return acc +} + +Yallist.prototype.toArray = function () { + var arr = new Array(this.length) + for (var i = 0, walker = this.head; walker !== null; i++) { + arr[i] = walker.value + walker = walker.next + } + return arr +} + +Yallist.prototype.toArrayReverse = function () { + var arr = new Array(this.length) + for (var i = 0, walker = this.tail; walker !== null; i++) { + arr[i] = walker.value + walker = walker.prev + } + return arr +} + +Yallist.prototype.slice = function (from, to) { + to = to || this.length + if (to < 0) { + to += this.length + } + from = from || 0 + if (from < 0) { + from += this.length + } + var ret = new Yallist() + if (to < from || to < 0) { + return ret + } + if (from < 0) { + from = 0 + } + if (to > this.length) { + to = this.length + } + for (var i = 0, walker = this.head; walker !== null && i < from; i++) { + walker = walker.next + } + for (; walker !== null && i < to; i++, walker = walker.next) { + ret.push(walker.value) + } + return ret +} + +Yallist.prototype.sliceReverse = function (from, to) { + to = to || this.length + if (to < 0) { + to += this.length + } + from = from || 0 + if (from < 0) { + from += this.length + } + var ret = new Yallist() + if (to < from || to < 0) { + return ret + } + if (from < 0) { + from = 0 + } + if (to > this.length) { + to = this.length + } + for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { + walker = walker.prev + } + for (; walker !== null && i > from; i--, walker = walker.prev) { + ret.push(walker.value) + } + return ret +} + +Yallist.prototype.reverse = function () { + var head = this.head + var tail = this.tail + for (var walker = head; walker !== null; walker = walker.prev) { + var p = walker.prev + walker.prev = walker.next + walker.next = p + } + this.head = tail + this.tail = head + return this +} + +function push (self, item) { + self.tail = new Node(item, self.tail, null, self) + if (!self.head) { + self.head = self.tail + } + self.length++ +} + +function unshift (self, item) { + self.head = new Node(item, null, self.head, self) + if (!self.tail) { + self.tail = self.head + } + self.length++ +} + +function Node (value, prev, next, list) { + if (!(this instanceof Node)) { + return new Node(value, prev, next, list) + } + + this.list = list + this.value = value + + if (prev) { + prev.next = this + this.prev = prev + } else { + this.prev = null + } + + if (next) { + next.prev = this + this.next = next + } else { + this.next = null + } +} diff --git a/tools/eslint/package-lock.json b/tools/eslint/package-lock.json index 114bbc6e101d98..a8512b57e476ce 100644 --- a/tools/eslint/package-lock.json +++ b/tools/eslint/package-lock.json @@ -1,6 +1,6 @@ { "name": "eslint", - "version": "4.2.0", + "version": "4.3.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -25,9 +25,9 @@ } }, "ajv": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.2.1.tgz", - "integrity": "sha1-3NAwRRdYg7obY25a6ew9+auFMjo=", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.2.2.tgz", + "integrity": "sha1-R8aNaehvXZUxA7AHSpQw3GPaXjk=", "requires": { "co": "4.6.0", "fast-deep-equal": "1.0.0", @@ -136,19 +136,19 @@ } }, "character-entities": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.0.tgz", - "integrity": "sha1-poPiz3Xb6LFxljUxNk5Y4YobFV8=" + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.1.tgz", + "integrity": "sha1-92hxvl72bdt/j440eOzDdMJ9bco=" }, "character-entities-legacy": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.0.tgz", - "integrity": "sha1-sYqtmPa3vMZGweTIH58ZVjdqVho=" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.1.tgz", + "integrity": "sha1-9Ad53xoQGHK7UQo9KV4fzPFHIC8=" }, "character-reference-invalid": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.0.tgz", - "integrity": "sha1-3smtHfufjQa0/NqircPE/ZevHmg=" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.1.tgz", + "integrity": "sha1-lCg191Dk7GGjCOYMLvjMEBEgLvw=" }, "circular-json": { "version": "0.3.1", @@ -183,13 +183,13 @@ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.0.tgz", "integrity": "sha1-Gsz5fdc5uYO/mU1W/sj5WFNkG3o=", "requires": { - "color-name": "1.1.2" + "color-name": "1.1.3" } }, "color-name": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.2.tgz", - "integrity": "sha1-XIq3K2S9IhXWF66VWeuxSEdc+Y0=" + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, "concat-map": { "version": "0.0.1", @@ -211,6 +211,16 @@ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "requires": { + "lru-cache": "4.1.1", + "shebang-command": "1.2.0", + "which": "1.2.14" + } + }, "debug": { "version": "2.6.8", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", @@ -323,7 +333,7 @@ "integrity": "sha1-HtkZnanL/i7y96MbL96LDRI2iXI=", "requires": { "iconv-lite": "0.4.18", - "jschardet": "1.4.2", + "jschardet": "1.5.0", "tmp": "0.0.31" } }, @@ -375,6 +385,11 @@ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.0.tgz", "integrity": "sha1-FhdnFMgBeY5Ojyz391KUZ7tKV3E=" }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=" + }, "glob": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", @@ -477,7 +492,7 @@ "run-async": "2.3.0", "rx-lite": "4.0.8", "rx-lite-aggregates": "4.0.8", - "string-width": "2.1.0", + "string-width": "2.1.1", "strip-ansi": "4.0.0", "through": "2.3.8" }, @@ -524,17 +539,17 @@ } }, "is-alphabetical": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.0.tgz", - "integrity": "sha1-4lRMEwWCVfIUTLdXBmzTNCocjEY=" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.1.tgz", + "integrity": "sha1-x3B5zJHU76x3W+EDS/LSQ/lebwg=" }, "is-alphanumerical": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.0.tgz", - "integrity": "sha1-4GSS5xnBvxXewjnk8a9fZ7TW578=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.1.tgz", + "integrity": "sha1-37SqTRCF4zvbYcLe6cgOnGwZ9Ts=", "requires": { - "is-alphabetical": "1.0.0", - "is-decimal": "1.0.0" + "is-alphabetical": "1.0.1", + "is-decimal": "1.0.1" } }, "is-buffer": { @@ -543,9 +558,9 @@ "integrity": "sha1-Hzsm72E7IUuIy8ojzGwB2Hlh7sw=" }, "is-decimal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.0.tgz", - "integrity": "sha1-lAV5tupjxigICmnmK9qIyEcLT+A=" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.1.tgz", + "integrity": "sha1-9ftqlJlq2ejjdh+/vQkfH8qMToI=" }, "is-fullwidth-code-point": { "version": "2.0.0", @@ -553,9 +568,9 @@ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" }, "is-hexadecimal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.0.tgz", - "integrity": "sha1-XEWXcdKvmi45Ungf1U/LG8/kETw=" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.1.tgz", + "integrity": "sha1-bghLvJIGH7sJcexYts5tQE4k2mk=" }, "is-path-cwd": { "version": "1.0.0", @@ -597,20 +612,25 @@ } }, "is-whitespace-character": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-whitespace-character/-/is-whitespace-character-1.0.0.tgz", - "integrity": "sha1-u/SoN2Tq0NRRvsKlUhjpGWGtwnU=" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-whitespace-character/-/is-whitespace-character-1.0.1.tgz", + "integrity": "sha1-muAXbzKCtlRXoZks2whPil+DPjs=" }, "is-word-character": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-word-character/-/is-word-character-1.0.0.tgz", - "integrity": "sha1-o6nl3a1wxcLuNvSpz8mlP0RTUkc=" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-word-character/-/is-word-character-1.0.1.tgz", + "integrity": "sha1-WgP6HqkazopusMfNdw64bWXIvvs=" }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, "js-tokens": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", @@ -626,9 +646,9 @@ } }, "jschardet": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/jschardet/-/jschardet-1.4.2.tgz", - "integrity": "sha1-KqEH8UKvQSHRRWWdRPUIMJYeaZo=" + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/jschardet/-/jschardet-1.5.0.tgz", + "integrity": "sha512-+Q8JsoEQbrdE+a/gg1F9XO92gcKXgpE5UACqr0sIubjDmBEkd+OOWPGzQeMrWSLxd73r4dHxBeRW7edHu5LmJQ==" }, "json-schema-traverse": { "version": "0.3.1", @@ -662,10 +682,19 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" }, + "lru-cache": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", + "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", + "requires": { + "pseudomap": "1.0.2", + "yallist": "2.1.2" + } + }, "markdown-escapes": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/markdown-escapes/-/markdown-escapes-1.0.0.tgz", - "integrity": "sha1-yMoZ8dlNaCRZ4Kk8htsnp+9xayM=" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/markdown-escapes/-/markdown-escapes-1.0.1.tgz", + "integrity": "sha1-GZTfLTr0gR3lmmcUk0wrIpJzRRg=" }, "mimic-fn": { "version": "1.1.0", @@ -752,12 +781,12 @@ "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-1.1.1.tgz", "integrity": "sha1-gRLYhHExnyerrk1klksSL+ThuJA=", "requires": { - "character-entities": "1.2.0", - "character-entities-legacy": "1.1.0", - "character-reference-invalid": "1.1.0", - "is-alphanumerical": "1.0.0", - "is-decimal": "1.0.0", - "is-hexadecimal": "1.0.0" + "character-entities": "1.2.1", + "character-entities-legacy": "1.1.1", + "character-reference-invalid": "1.1.1", + "is-alphanumerical": "1.0.1", + "is-decimal": "1.0.1", + "is-hexadecimal": "1.0.1" } }, "path-is-absolute": { @@ -808,6 +837,11 @@ "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz", "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=" }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" + }, "readable-stream": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", @@ -829,11 +863,11 @@ "requires": { "collapse-white-space": "1.0.3", "has": "1.0.1", - "is-alphabetical": "1.0.0", - "is-decimal": "1.0.0", - "is-whitespace-character": "1.0.0", - "is-word-character": "1.0.0", - "markdown-escapes": "1.0.0", + "is-alphabetical": "1.0.1", + "is-decimal": "1.0.1", + "is-whitespace-character": "1.0.1", + "is-word-character": "1.0.1", + "markdown-escapes": "1.0.1", "parse-entities": "1.1.1", "repeat-string": "1.6.1", "state-toggle": "1.0.0", @@ -841,7 +875,7 @@ "trim-trailing-lines": "1.1.0", "unherit": "1.1.0", "unist-util-remove-position": "1.1.1", - "vfile-location": "2.0.1", + "vfile-location": "2.0.2", "xtend": "4.0.1" } }, @@ -912,6 +946,24 @@ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" }, + "semver": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=" + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "requires": { + "shebang-regex": "1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" + }, "signal-exit": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", @@ -941,9 +993,9 @@ } }, "string-width": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.0.tgz", - "integrity": "sha1-AwZkVh/BRslCPsfZeP4kV0N/5tA=", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "requires": { "is-fullwidth-code-point": "2.0.0", "strip-ansi": "4.0.0" @@ -992,7 +1044,7 @@ "chalk": "1.1.3", "lodash": "4.17.4", "slice-ansi": "0.0.4", - "string-width": "2.1.0" + "string-width": "2.1.1" }, "dependencies": { "ajv": { @@ -1075,7 +1127,7 @@ "extend": "3.0.1", "is-plain-obj": "1.1.0", "trough": "1.0.1", - "vfile": "2.1.0", + "vfile": "2.2.0", "x-is-function": "1.0.4", "x-is-string": "0.1.0" } @@ -1104,9 +1156,9 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, "vfile": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/vfile/-/vfile-2.1.0.tgz", - "integrity": "sha1-086Lgl57jVO4lhZDQSczgZNvAr0=", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-2.2.0.tgz", + "integrity": "sha1-zkek+zNZIrIz5TXbD32BIdj87U4=", "requires": { "is-buffer": "1.1.5", "replace-ext": "1.0.0", @@ -1114,9 +1166,17 @@ } }, "vfile-location": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-2.0.1.tgz", - "integrity": "sha1-C/iBb3MrD4vZAqVv2kxiyOk13FI=" + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-2.0.2.tgz", + "integrity": "sha1-02dcWch3SY5JK0dW/2Xkrxp1IlU=" + }, + "which": { + "version": "1.2.14", + "resolved": "https://registry.npmjs.org/which/-/which-1.2.14.tgz", + "integrity": "sha1-mofEN48D6CfOyvGs31bHNsAcFOU=", + "requires": { + "isexe": "2.0.0" + } }, "wordwrap": { "version": "1.0.0", @@ -1150,6 +1210,11 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" } } } diff --git a/tools/eslint/package.json b/tools/eslint/package.json index 5d9698e6c35477..37fb7b951bcecc 100644 --- a/tools/eslint/package.json +++ b/tools/eslint/package.json @@ -1,8 +1,8 @@ { "_from": "eslint@latest", - "_id": "eslint@4.2.0", + "_id": "eslint@4.3.0", "_inBundle": false, - "_integrity": "sha1-orMYQRGxmOAunH88ymJaXgHFaz0=", + "_integrity": "sha1-/NfJY3a780yF7mftABKimWQrEI8=", "_location": "/eslint", "_phantomChildren": {}, "_requested": { @@ -19,8 +19,8 @@ "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/eslint/-/eslint-4.2.0.tgz", - "_shasum": "a2b3184111b198e02e9c7f3cca625a5e01c56b3d", + "_resolved": "https://registry.npmjs.org/eslint/-/eslint-4.3.0.tgz", + "_shasum": "fcd7c96376bbf34c85ee67ed0012a299642b108f", "_spec": "eslint@latest", "_where": "/Users/trott/io.js/tools/eslint-tmp", "author": { @@ -39,6 +39,7 @@ "babel-code-frame": "^6.22.0", "chalk": "^1.1.3", "concat-stream": "^1.6.0", + "cross-spawn": "^5.1.0", "debug": "^2.6.8", "doctrine": "^2.0.0", "eslint-plugin-markdown": "^1.0.0-beta.7", @@ -48,6 +49,7 @@ "estraverse": "^4.2.0", "esutils": "^2.0.2", "file-entry-cache": "^2.0.0", + "functional-red-black-tree": "^1.0.1", "glob": "^7.1.2", "globals": "^9.17.0", "ignore": "^3.3.3", @@ -66,6 +68,7 @@ "pluralize": "^4.0.0", "progress": "^2.0.0", "require-uncached": "^1.0.3", + "semver": "^5.3.0", "strip-json-comments": "~2.0.1", "table": "^4.0.1", "text-table": "~0.2.0" @@ -87,6 +90,7 @@ "eslint-plugin-eslint-plugin": "^0.7.4", "eslint-plugin-node": "^5.1.0", "eslint-release": "^0.10.1", + "eslump": "1.6.0", "esprima": "^3.1.3", "esprima-fb": "^15001.1001.0-dev-harmony-fb", "istanbul": "^0.4.5", @@ -104,7 +108,6 @@ "npm-license": "^0.3.3", "phantomjs-prebuilt": "^2.1.14", "proxyquire": "^1.8.0", - "semver": "^5.3.0", "shelljs": "^0.7.7", "shelljs-nodecli": "~0.1.1", "sinon": "^2.3.2", @@ -145,6 +148,7 @@ "ci-release": "node Makefile.js ciRelease", "coveralls": "cat ./coverage/lcov.info | coveralls", "docs": "node Makefile.js docs", + "fuzz": "node Makefile.js fuzz", "gensite": "node Makefile.js gensite", "lint": "node Makefile.js lint", "perf": "node Makefile.js perf", @@ -152,5 +156,5 @@ "release": "node Makefile.js release", "test": "node Makefile.js test" }, - "version": "4.2.0" + "version": "4.3.0" } From cd0fffd86ace8fbea19af12d2c3a132bbcf04646 Mon Sep 17 00:00:00 2001 From: vixony Date: Sun, 16 Jul 2017 16:03:27 +0800 Subject: [PATCH 057/157] test: convert table in test doc to markdown table MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/14291 Reviewed-By: Rich Trott Reviewed-By: Vse Mozhet Byt Reviewed-By: Colin Ihrig Reviewed-By: Tobias Nießen --- test/README.md | 172 ++++++------------------------------------------- 1 file changed, 21 insertions(+), 151 deletions(-) diff --git a/test/README.md b/test/README.md index 7042882bd568b2..b5853bc7418070 100644 --- a/test/README.md +++ b/test/README.md @@ -10,154 +10,24 @@ On how to run tests in this directory, see ## Test Directories - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DirectoryRuns on CIPurpose
abortNo - Tests for when the --abort-on-uncaught-exception - flag is used. -
addonsYes - Tests for addon - functionality along with some tests that require an addon to function - properly. -
cctestYes - C++ test that is run as part of the build process. -
common - Common modules shared among many tests. - [Documentation] -
debuggerNo - Tests for debugger - functionality along with some tests that require an addon to function - properly. -
disabledNo - Tests that have been disabled from running for various reasons. -
fixturesTest fixtures used in various tests throughout the test suite.
gcNoTests for garbage collection related functionality.
inspectorYesTests for the V8 inspector integration.
internetNo - Tests that make real outbound connections (mainly networking related - modules). Tests for networking related modules may also be present in - other directories, but those tests do not make outbound connections. -
known_issuesYes - Tests reproducing known issues within the system. All tests inside of - this directory are expected to fail consistently. If a test doesn't fail - on certain platforms, those should be skipped via `known_issues.status`. -
messageYes - Tests for messages that are output for various conditions - (console.log, error messages etc.)
parallelYesVarious tests that are able to be run in parallel.
pseudo-ttyYesTests that require stdin/stdout/stderr to be a TTY.
pummelNo - Various tests for various modules / system functionality operating - under load. -
sequentialYes - Various tests that are run sequentially. -
testpy - Test configuration utility used by various test suites. -
tick-processorNo - Tests for the V8 tick processor integration. The tests are for the - logic in lib/internal/v8_prof_processor.js and - lib/internal/v8_prof_polyfill.js. The tests confirm that - the profile processor packages the correct set of scripts from V8 and - introduces the correct platform specific logic. -
timersNo - Tests for - timing utilities - (setTimeout and setInterval). -
+|Directory |Runs on CI |Purpose | +|-------------------|---------------|---------------| +|abort |No |Tests for when the ``` --abort-on-uncaught-exception ``` flag is used.| +|addons |Yes |Tests for [addon](https://nodejs.org/api/addons.html) functionality along with some tests that require an addon to function properly.| +|cctest |Yes |C++ test that is run as part of the build process.| +|common | |Common modules shared among many tests. [Documentation](./common/README.md)| +|debugger |No |Tests for [debugger](https://nodejs.org/api/debugger.html)functionality along with some tests that require an addon to function properly.| +|disabled |No |Tests that have been disabled from running for various reasons.| +|fixtures | |Test fixtures used in various tests throughout the test suite.| +|gc |No |Tests for garbage collection related functionality.| +|inspector |Yes |Tests for the V8 inspector integration.| +|internet |No |Tests that make real outbound connections (mainly networking related modules). Tests for networking related modules may also be present in other directories, but those tests do not make outbound connections.| +|known_issues |Yes |Tests reproducing known issues within the system. All tests inside of this directory are expected to fail consistently. If a test doesn't fail on certain platforms, those should be skipped via `known_issues.status`.| +|message |Yes |Tests for messages that are output for various conditions (```console.log```, error messages etc.)| +|parallel |Yes |Various tests that are able to be run in parallel.| +|pseudo-tty |Yes |Tests that require stdin/stdout/stderr to be a TTY.| +|pummel |No |Various tests for various modules / system functionality operating under load.| +|sequential |Yes |Various tests that are run sequentially.| +|testpy | |Test configuration utility used by various test suites.| +|tick-processor |No |Tests for the V8 tick processor integration. The tests are for the logic in ```lib/internal/v8_prof_processor.js``` and ```lib/internal/v8_prof_polyfill.js```. The tests confirm that the profile processor packages the correct set of scripts from V8 and introduces the correct platform specific logic.| +|timers |No |Tests for [timing utilities](https://nodejs.org/api/timers.html) (```setTimeout``` and ```setInterval```).| From 6420a73f3edd29f14f179503d7344b8a091b42a8 Mon Sep 17 00:00:00 2001 From: Ching Hsu Date: Sun, 16 Jul 2017 15:25:48 +0800 Subject: [PATCH 058/157] test: replace concatenation with template literal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/14284 Reviewed-By: Rich Trott Reviewed-By: Gibson Fahnestock Reviewed-By: Timothy Gu Reviewed-By: Tobias Nießen Reviewed-By: Gireesh Punathil --- test/parallel/test-http-upgrade-client2.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-http-upgrade-client2.js b/test/parallel/test-http-upgrade-client2.js index 70eaeaa95f1706..221017819c562d 100644 --- a/test/parallel/test-http-upgrade-client2.js +++ b/test/parallel/test-http-upgrade-client2.js @@ -27,9 +27,10 @@ const CRLF = '\r\n'; const server = http.createServer(); server.on('upgrade', function(req, socket, head) { - socket.write('HTTP/1.1 101 Ok' + CRLF + - 'Connection: Upgrade' + CRLF + - 'Upgrade: Test' + CRLF + CRLF + 'head'); + socket.write(`HTTP/1.1 101 Ok${CRLF}` + + `Connection: Upgrade${CRLF}` + + `Upgrade: Test${CRLF}${CRLF}` + + 'head'); socket.on('end', function() { socket.end(); }); From 5057c7a953273763c8f54f290fca65c81f7b58c8 Mon Sep 17 00:00:00 2001 From: rockcoder23 Date: Sun, 16 Jul 2017 15:11:14 +0800 Subject: [PATCH 059/157] test: replace concatenation with template literal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/14270 Reviewed-By: Rich Trott Reviewed-By: David Cai Reviewed-By: Gibson Fahnestock Reviewed-By: Evan Lucas Reviewed-By: Colin Ihrig Reviewed-By: Tobias Nießen --- ...require-extensions-same-filename-as-dir-trailing-slash.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-require-extensions-same-filename-as-dir-trailing-slash.js b/test/parallel/test-require-extensions-same-filename-as-dir-trailing-slash.js index 43245e22de8b52..66a58be01c3c4a 100644 --- a/test/parallel/test-require-extensions-same-filename-as-dir-trailing-slash.js +++ b/test/parallel/test-require-extensions-same-filename-as-dir-trailing-slash.js @@ -23,9 +23,8 @@ 'use strict'; const common = require('../common'); const assert = require('assert'); - -const content = require(common.fixturesDir + - '/json-with-directory-name-module/module-stub/one-trailing-slash/two/three.js'); +const filePath = '/json-with-directory-name-module/module-stub/one-trailing-slash/two/three.js'; +const content = require(`${common.fixturesDir}${filePath}`); assert.notStrictEqual(content.rocko, 'artischocko'); assert.strictEqual(content, 'hello from module-stub!'); From 509039fcafbadbc0ea89f8d7d9985d308eb312ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Sun, 23 Jul 2017 21:48:33 +0200 Subject: [PATCH 060/157] path: remove unnecessary string copies As the length of `path` is known at this point, there is no point in making an exact copy using `slice`. PR-URL: https://github.com/nodejs/node/pull/14438 Reviewed-By: Refael Ackermann Reviewed-By: James M Snell Reviewed-By: Anna Henningsen Reviewed-By: Luigi Pinca Reviewed-By: Timothy Gu Reviewed-By: Colin Ihrig Reviewed-By: Khaidi Chu --- lib/path.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/path.js b/lib/path.js index 2f67c8cadc8bd1..4dc4b8398464d3 100644 --- a/lib/path.js +++ b/lib/path.js @@ -788,7 +788,9 @@ const win32 = { } } } else if (code === 47/*/*/ || code === 92/*\*/) { - return path[0]; + // `path` contains just a path separator, exit early to avoid + // unnecessary work + return path; } for (var i = len - 1; i >= offset; --i) { @@ -1041,7 +1043,7 @@ const win32 = { if (len === 3) { // `path` contains just a drive root, exit early to avoid // unnecessary work - ret.root = ret.dir = path.slice(0, 3); + ret.root = ret.dir = path; return ret; } isAbsolute = true; @@ -1050,7 +1052,7 @@ const win32 = { } else { // `path` contains just a drive root, exit early to avoid // unnecessary work - ret.root = ret.dir = path.slice(0, 2); + ret.root = ret.dir = path; return ret; } } @@ -1058,7 +1060,7 @@ const win32 = { } else if (code === 47/*/*/ || code === 92/*\*/) { // `path` contains just a path separator, exit early to avoid // unnecessary work - ret.root = ret.dir = path[0]; + ret.root = ret.dir = path; return ret; } From 14f6a5a367d4cd60e3400b4888dc94bcb6f6199b Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sun, 23 Jul 2017 15:31:19 -0700 Subject: [PATCH 061/157] test: fix flaky test-force-repl test/parallel/test-force-repl.js has an unnecessary timer that makes the test flaky under load. Remove it. PR-URL: https://github.com/nodejs/node/pull/14439 Reviewed-By: Gibson Fahnestock Reviewed-By: Refael Ackermann Reviewed-By: James M Snell Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: Anna Henningsen --- test/parallel/test-force-repl.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/test/parallel/test-force-repl.js b/test/parallel/test-force-repl.js index 03246d269d7765..15475a7e30ed8d 100644 --- a/test/parallel/test-force-repl.js +++ b/test/parallel/test-force-repl.js @@ -3,16 +3,13 @@ const common = require('../common'); const assert = require('assert'); const spawn = require('child_process').spawn; -// spawn a node child process in "interactive" mode (force the repl) +// Spawn a node child process in interactive mode (enabling the REPL) and +// confirm the '> ' prompt is included in the output. const cp = spawn(process.execPath, ['-i']); -// give node + the repl 5 seconds to start -const timeoutId = setTimeout(common.mustNotCall(), - common.platformTimeout(5000)); cp.stdout.setEncoding('utf8'); cp.stdout.once('data', common.mustCall(function(b) { - clearTimeout(timeoutId); assert.strictEqual(b, '> '); cp.kill(); })); From 6078dea35dcc2fdd889562d6e72c5aa7dd38d3f3 Mon Sep 17 00:00:00 2001 From: Kyle Farnung Date: Wed, 12 Jul 2017 17:14:00 -0700 Subject: [PATCH 062/157] n-api: directly create Local from Persistent The `v8::PersistentBase.Get` method didn't exist in node 4 and it's just a helper which creates a new `v8::Local` from the given object. PR-URL: https://github.com/nodejs/node/pull/14211 Reviewed-By: Timothy Gu Reviewed-By: Colin Ihrig Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Reviewed-By: Michael Dawson Reviewed-By: Jason Ginchereau --- src/node_api.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/node_api.cc b/src/node_api.cc index 5818cb25c1b6e8..59bac3a9c1179a 100644 --- a/src/node_api.cc +++ b/src/node_api.cc @@ -56,7 +56,8 @@ struct napi_env__ { (destination)->SetInternalFieldCount((field_count)); \ (env)->prefix ## _template.Reset(isolate, (destination)); \ } else { \ - (destination) = env->prefix ## _template.Get(isolate); \ + (destination) = v8::Local::New( \ + isolate, env->prefix ## _template); \ } \ } while (0) From 50447e837b4c730220b1bbf30146b7e6e23b8819 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Fri, 21 Jul 2017 13:26:50 +0200 Subject: [PATCH 063/157] http: reset stream to unconsumed in `unconsume()` Reset the underlying socket of an HTTP stream to be marked as unconsume after the HTTP parser no longer owns it. Fixes: https://github.com/nodejs/node/issues/14407 PR-URL: https://github.com/nodejs/node/pull/14410 Reviewed-By: Ben Noordhuis Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca --- src/node_http_parser.cc | 1 + src/stream_base.h | 5 ++++ .../test-http-upgrade-reconsume-stream.js | 29 +++++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 test/parallel/test-http-upgrade-reconsume-stream.js diff --git a/src/node_http_parser.cc b/src/node_http_parser.cc index a339043bdca5bd..90fc3b41b525f7 100644 --- a/src/node_http_parser.cc +++ b/src/node_http_parser.cc @@ -527,6 +527,7 @@ class Parser : public AsyncWrap { stream->set_alloc_cb(parser->prev_alloc_cb_); stream->set_read_cb(parser->prev_read_cb_); + stream->Unconsume(); } parser->prev_alloc_cb_.clear(); diff --git a/src/stream_base.h b/src/stream_base.h index 75bf0e937f338b..68c82d243f2913 100644 --- a/src/stream_base.h +++ b/src/stream_base.h @@ -234,6 +234,11 @@ class StreamBase : public StreamResource { consumed_ = true; } + inline void Unconsume() { + CHECK_EQ(consumed_, true); + consumed_ = false; + } + template inline Outer* Cast() { return static_cast(Cast()); } diff --git a/test/parallel/test-http-upgrade-reconsume-stream.js b/test/parallel/test-http-upgrade-reconsume-stream.js new file mode 100644 index 00000000000000..e712ea647b3ad9 --- /dev/null +++ b/test/parallel/test-http-upgrade-reconsume-stream.js @@ -0,0 +1,29 @@ +'use strict'; +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +const tls = require('tls'); +const http = require('http'); + +// Tests that, after the HTTP parser stopped owning a socket that emits an +// 'upgrade' event, another C++ stream can start owning it (e.g. a TLSSocket). + +const server = http.createServer(common.mustNotCall()); + +server.on('upgrade', common.mustCall((request, socket, head) => { + // This should not crash. + new tls.TLSSocket(socket); + server.close(); + socket.destroy(); +})); + +server.listen(0, common.mustCall(() => { + http.get({ + port: server.address().port, + headers: { + 'Connection': 'Upgrade', + 'Upgrade': 'websocket' + } + }).on('error', () => {}); +})); From 8a9de1b3c543028fca6053df261122f21d86c3e2 Mon Sep 17 00:00:00 2001 From: Anton Paras Date: Sat, 22 Jul 2017 12:36:30 -0700 Subject: [PATCH 064/157] doc: fix typo in using-internal-errors.md Change "messasge" to "message". PR-URL: https://github.com/nodejs/node/pull/14429 Reviewed-By: Refael Ackermann Reviewed-By: James M Snell Reviewed-By: Luigi Pinca Reviewed-By: Benjamin Gruenbaum Reviewed-By: Daijiro Wachi Reviewed-By: Colin Ihrig Reviewed-By: Vse Mozhet Byt Reviewed-By: Gibson Fahnestock Reviewed-By: Anna Henningsen --- doc/guides/using-internal-errors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/guides/using-internal-errors.md b/doc/guides/using-internal-errors.md index a91bcd65a5b4c6..3ae11e901a62ba 100644 --- a/doc/guides/using-internal-errors.md +++ b/doc/guides/using-internal-errors.md @@ -70,7 +70,7 @@ codes. ## Testing new errors When adding a new error, corresponding test(s) for the error message -formatting may also be required. If the messasge for the error is a +formatting may also be required. If the message for the error is a constant string then no test is required for the error message formatting as we can trust the error helper implementation. An example of this kind of error would be: From 0ff19b0c4cfd3625b0ffcb2a797a0d833e47a4df Mon Sep 17 00:00:00 2001 From: Pratik Jain Date: Mon, 24 Jul 2017 11:37:31 +0000 Subject: [PATCH 065/157] test: changed error message validator Replaced TypeError with RegEx to match the exact error message in file test/addons-napi/test_properties/test.js. The RegEx will check the validity of the error being thrown. PR-URL: https://github.com/nodejs/node/pull/14443 Reviewed-By: James M Snell Reviewed-By: Luigi Pinca Reviewed-By: Yuta Hiroto Reviewed-By: Vse Mozhet Byt Reviewed-By: Rich Trott Reviewed-By: Anna Henningsen --- test/addons-napi/test_properties/test.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/addons-napi/test_properties/test.js b/test/addons-napi/test_properties/test.js index 8d11a669d46daf..0a3bbee853610f 100644 --- a/test/addons-napi/test_properties/test.js +++ b/test/addons-napi/test_properties/test.js @@ -1,6 +1,7 @@ 'use strict'; const common = require('../../common'); const assert = require('assert'); +const readonlyErrorRE = /^TypeError: Cannot assign to read only property '.*' of object '#'$/; // Testing api calls for defining properties const test_object = require(`./build/${common.buildType}/test_properties`); @@ -12,7 +13,7 @@ assert.strictEqual(test_object.readwriteValue, 1); test_object.readwriteValue = 2; assert.strictEqual(test_object.readwriteValue, 2); -assert.throws(() => { test_object.readonlyValue = 3; }, TypeError); +assert.throws(() => { test_object.readonlyValue = 3; }, readonlyErrorRE); assert.ok(test_object.hiddenValue); @@ -42,11 +43,11 @@ assert.strictEqual(symbolDescription, 'NameKeySymbol'); test_object.readwriteAccessor1 = 1; assert.strictEqual(test_object.readwriteAccessor1, 1); assert.strictEqual(test_object.readonlyAccessor1, 1); -assert.throws(() => { test_object.readonlyAccessor1 = 3; }, TypeError); +assert.throws(() => { test_object.readonlyAccessor1 = 3; }, readonlyErrorRE); test_object.readwriteAccessor2 = 2; assert.strictEqual(test_object.readwriteAccessor2, 2); assert.strictEqual(test_object.readonlyAccessor2, 2); -assert.throws(() => { test_object.readonlyAccessor2 = 3; }, TypeError); +assert.throws(() => { test_object.readonlyAccessor2 = 3; }, readonlyErrorRE); assert.strictEqual(test_object.hasNamedProperty(test_object, 'echo'), true); assert.strictEqual(test_object.hasNamedProperty(test_object, 'hiddenValue'), From 4836f3b9b9355a52f139d4f626f26aa4f2475ef3 Mon Sep 17 00:00:00 2001 From: Eugene Ostroukhov Date: Mon, 24 Jul 2017 16:00:08 -0700 Subject: [PATCH 066/157] inspector: send messages after the Node is done Fixes: https://github.com/nodejs/node/issues/14432 PR-URL: https://github.com/nodejs/node/pull/14463 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- src/inspector_io.cc | 2 -- .../test-inspector-stop-profile-after-done.js | 21 +++++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 test/inspector/test-inspector-stop-profile-after-done.js diff --git a/src/inspector_io.cc b/src/inspector_io.cc index a7d69263edad6d..12a0d20720354a 100644 --- a/src/inspector_io.cc +++ b/src/inspector_io.cc @@ -429,8 +429,6 @@ void InspectorIo::MainThreadReqAsyncCb(uv_async_t* req) { void InspectorIo::Write(TransportAction action, int session_id, const StringView& inspector_message) { - if (state_ == State::kShutDown) - return; AppendMessage(&outgoing_message_queue_, action, session_id, StringBuffer::create(inspector_message)); int err = uv_async_send(&thread_req_); diff --git a/test/inspector/test-inspector-stop-profile-after-done.js b/test/inspector/test-inspector-stop-profile-after-done.js new file mode 100644 index 00000000000000..db43e4ae79c4bd --- /dev/null +++ b/test/inspector/test-inspector-stop-profile-after-done.js @@ -0,0 +1,21 @@ +'use strict'; +const common = require('../common'); +common.skipIfInspectorDisabled(); +const helper = require('./inspector-helper.js'); + +function test(session) { + session.sendInspectorCommands([ + { 'method': 'Runtime.runIfWaitingForDebugger' }, + { 'method': 'Profiler.setSamplingInterval', 'params': { 'interval': 100 } }, + { 'method': 'Profiler.enable' }, + { 'method': 'Profiler.start' }]); + session.expectStderrOutput('Waiting for the debugger to disconnect...'); + session.sendInspectorCommands({ 'method': 'Profiler.stop' }); + session.disconnect(true); +} + +function runTests(harness) { + harness.runFrontendSession([test]).expectShutDown(0); +} + +helper.startNodeForInspectorTest(runTests, ['--inspect-brk'], 'let a = 2;'); From f8c2302a66a796deac6d06c41c591648fccbc0a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AC=91=E6=96=8C?= Date: Sun, 16 Jul 2017 15:00:08 +0800 Subject: [PATCH 067/157] test: use common.mustCall() instead of exit handle PR-URL: https://github.com/nodejs/node/pull/14262 Reviewed-By: Rich Trott Reviewed-By: Colin Ihrig Reviewed-By: Anna Henningsen Reviewed-By: Yuta Hiroto Reviewed-By: Gireesh Punathil Reviewed-By: James M Snell --- .../test-http-server-keep-alive-timeout.js | 18 +++------------ .../test-https-server-keep-alive-timeout.js | 22 +++++-------------- 2 files changed, 9 insertions(+), 31 deletions(-) diff --git a/test/parallel/test-http-server-keep-alive-timeout.js b/test/parallel/test-http-server-keep-alive-timeout.js index dace64e4d02559..767963fbdc2f38 100644 --- a/test/parallel/test-http-server-keep-alive-timeout.js +++ b/test/parallel/test-http-server-keep-alive-timeout.js @@ -1,7 +1,6 @@ 'use strict'; const common = require('../common'); -const assert = require('assert'); const http = require('http'); const net = require('net'); @@ -20,14 +19,9 @@ function run() { } test(function serverEndKeepAliveTimeoutWithPipeline(cb) { - let requestCount = 0; - process.on('exit', () => { - assert.strictEqual(requestCount, 3); - }); - const server = http.createServer((req, res) => { - requestCount++; + const server = http.createServer(common.mustCall((req, res) => { res.end(); - }); + }, 3)); server.setTimeout(500, common.mustCall((socket) => { // End this test and call `run()` for the next test (if any). socket.destroy(); @@ -49,13 +43,7 @@ test(function serverEndKeepAliveTimeoutWithPipeline(cb) { }); test(function serverNoEndKeepAliveTimeoutWithPipeline(cb) { - let requestCount = 0; - process.on('exit', () => { - assert.strictEqual(requestCount, 3); - }); - const server = http.createServer((req, res) => { - requestCount++; - }); + const server = http.createServer(common.mustCall(3)); server.setTimeout(500, common.mustCall((socket) => { // End this test and call `run()` for the next test (if any). socket.destroy(); diff --git a/test/parallel/test-https-server-keep-alive-timeout.js b/test/parallel/test-https-server-keep-alive-timeout.js index b302205e5e272f..ae6b4312684200 100644 --- a/test/parallel/test-https-server-keep-alive-timeout.js +++ b/test/parallel/test-https-server-keep-alive-timeout.js @@ -4,7 +4,6 @@ const common = require('../common'); if (!common.hasCrypto) common.skip('missing crypto'); -const assert = require('assert'); const https = require('https'); const tls = require('tls'); const fs = require('fs'); @@ -29,14 +28,11 @@ function run() { } test(function serverKeepAliveTimeoutWithPipeline(cb) { - let requestCount = 0; - process.on('exit', function() { - assert.strictEqual(requestCount, 3); - }); - const server = https.createServer(serverOptions, (req, res) => { - requestCount++; - res.end(); - }); + const server = https.createServer( + serverOptions, + common.mustCall((req, res) => { + res.end(); + }, 3)); server.setTimeout(500, common.mustCall((socket) => { // End this test and call `run()` for the next test (if any). socket.destroy(); @@ -59,13 +55,7 @@ test(function serverKeepAliveTimeoutWithPipeline(cb) { }); test(function serverNoEndKeepAliveTimeoutWithPipeline(cb) { - let requestCount = 0; - process.on('exit', () => { - assert.strictEqual(requestCount, 3); - }); - const server = https.createServer(serverOptions, (req, res) => { - requestCount++; - }); + const server = https.createServer(serverOptions, common.mustCall(3)); server.setTimeout(500, common.mustCall((socket) => { // End this test and call `run()` for the next test (if any). socket.destroy(); From 71cb1cdf69e1b15fe3d4ef26b6e8cb4bcc210d45 Mon Sep 17 00:00:00 2001 From: Eugene Ostroukhov Date: Mon, 17 Jul 2017 17:08:46 -0700 Subject: [PATCH 068/157] inspector: implement V8Inspector timer This timer is currently only used by a profiler. Note that the timer invocation will not interrupt JavaScript code. Fixes: https://github.com/nodejs/node/issues/11401 PR-URL: https://github.com/nodejs/node/pull/14346 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Ben Noordhuis --- src/inspector_agent.cc | 74 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 73 insertions(+), 1 deletion(-) diff --git a/src/inspector_agent.cc b/src/inspector_agent.cc index a06ff032ff7d51..6599e870432662 100644 --- a/src/inspector_agent.cc +++ b/src/inspector_agent.cc @@ -12,6 +12,7 @@ #include "libplatform/libplatform.h" #include +#include #include #ifdef __POSIX__ @@ -39,6 +40,7 @@ using v8::Value; using v8_inspector::StringBuffer; using v8_inspector::StringView; using v8_inspector::V8Inspector; +using v8_inspector::V8InspectorClient; static uv_sem_t start_io_thread_semaphore; static uv_async_t start_io_thread_async; @@ -429,9 +431,66 @@ class ChannelImpl final : public v8_inspector::V8Inspector::Channel { std::unique_ptr session_; }; +class InspectorTimer { + public: + InspectorTimer(uv_loop_t* loop, + double interval_s, + V8InspectorClient::TimerCallback callback, + void* data) : timer_(), + callback_(callback), + data_(data) { + uv_timer_init(loop, &timer_); + int64_t interval_ms = 1000 * interval_s; + uv_timer_start(&timer_, OnTimer, interval_ms, interval_ms); + } + + InspectorTimer(const InspectorTimer&) = delete; + + void Stop() { + uv_timer_stop(&timer_); + uv_close(reinterpret_cast(&timer_), TimerClosedCb); + } + + private: + static void OnTimer(uv_timer_t* uvtimer) { + InspectorTimer* timer = node::ContainerOf(&InspectorTimer::timer_, uvtimer); + timer->callback_(timer->data_); + } + + static void TimerClosedCb(uv_handle_t* uvtimer) { + InspectorTimer* timer = + node::ContainerOf(&InspectorTimer::timer_, + reinterpret_cast(uvtimer)); + delete timer; + } + + ~InspectorTimer() {} + + uv_timer_t timer_; + V8InspectorClient::TimerCallback callback_; + void* data_; +}; + +class InspectorTimerHandle { + public: + InspectorTimerHandle(uv_loop_t* loop, double interval_s, + V8InspectorClient::TimerCallback callback, void* data) { + timer_ = new InspectorTimer(loop, interval_s, callback, data); + } + + InspectorTimerHandle(const InspectorTimerHandle&) = delete; + + ~InspectorTimerHandle() { + CHECK_NE(timer_, nullptr); + timer_->Stop(); + timer_ = nullptr; + } + private: + InspectorTimer* timer_; +}; } // namespace -class NodeInspectorClient : public v8_inspector::V8InspectorClient { +class NodeInspectorClient : public V8InspectorClient { public: NodeInspectorClient(node::Environment* env, v8::Platform* platform) : env_(env), @@ -527,6 +586,18 @@ class NodeInspectorClient : public v8_inspector::V8InspectorClient { return channel_.get(); } + void startRepeatingTimer(double interval_s, + TimerCallback callback, + void* data) override { + timers_.emplace(std::piecewise_construct, std::make_tuple(data), + std::make_tuple(env_->event_loop(), interval_s, callback, + data)); + } + + void cancelTimer(void* data) override { + timers_.erase(data); + } + private: node::Environment* env_; v8::Platform* platform_; @@ -534,6 +605,7 @@ class NodeInspectorClient : public v8_inspector::V8InspectorClient { bool running_nested_loop_; std::unique_ptr client_; std::unique_ptr channel_; + std::unordered_map timers_; }; Agent::Agent(Environment* env) : parent_env_(env), From b849b3d2237a229b1c16ae4208eb00f9261a5574 Mon Sep 17 00:00:00 2001 From: Gabriel Schulhof Date: Thu, 13 Jul 2017 11:35:55 +0300 Subject: [PATCH 069/157] n-api: re-use napi_env between modules Store the `napi_env` on the global object at a private key. This gives us one `napi_env` per context. Refs: https://github.com/nodejs/node/issues/14367 PR-URL: https://github.com/nodejs/node/pull/14217 Reviewed-By: Ben Noordhuis Reviewed-By: Timothy Gu --- src/node_api.cc | 45 +++++++++++++++++-- test/addons-napi/test_env_sharing/binding.gyp | 12 +++++ .../test_env_sharing/compare_env.c | 22 +++++++++ test/addons-napi/test_env_sharing/store_env.c | 12 +++++ test/addons-napi/test_env_sharing/test.js | 10 +++++ 5 files changed, 98 insertions(+), 3 deletions(-) create mode 100644 test/addons-napi/test_env_sharing/binding.gyp create mode 100644 test/addons-napi/test_env_sharing/compare_env.c create mode 100644 test/addons-napi/test_env_sharing/store_env.c create mode 100644 test/addons-napi/test_env_sharing/test.js diff --git a/src/node_api.cc b/src/node_api.cc index 59bac3a9c1179a..7a0332848b9f92 100644 --- a/src/node_api.cc +++ b/src/node_api.cc @@ -707,6 +707,45 @@ bool FindWrapper(v8::Local obj, return true; } +static void DeleteEnv(napi_env env, void* data, void* hint) { + delete env; +} + +napi_env GetEnv(v8::Local context) { + napi_env result; + + auto isolate = context->GetIsolate(); + auto global = context->Global(); + + // In the case of the string for which we grab the private and the value of + // the private on the global object we can call .ToLocalChecked() directly + // because we need to stop hard if either of them is empty. + // + // Re https://github.com/nodejs/node/pull/14217#discussion_r128775149 + auto key = v8::Private::ForApi(isolate, + v8::String::NewFromOneByte(isolate, + reinterpret_cast("N-API Environment"), + v8::NewStringType::kInternalized).ToLocalChecked()); + auto value = global->GetPrivate(context, key).ToLocalChecked(); + + if (value->IsExternal()) { + result = static_cast(value.As()->Value()); + } else { + result = new napi_env__(isolate); + auto external = v8::External::New(isolate, result); + + // We must also stop hard if the result of assigning the env to the global + // is either nothing or false. + CHECK(global->SetPrivate(context, key, external).FromJust()); + + // Create a self-destructing reference to external that will get rid of the + // napi_env when external goes out of scope. + Reference::New(result, external, 0, true, DeleteEnv, nullptr, nullptr); + } + + return result; +} + } // end of namespace v8impl // Intercepts the Node-V8 module registration callback. Converts parameters @@ -718,9 +757,9 @@ void napi_module_register_cb(v8::Local exports, void* priv) { napi_module* mod = static_cast(priv); - // Create a new napi_env for this module. Once module unloading is supported - // we shall have to call delete on this object from there. - napi_env env = new napi_env__(context->GetIsolate()); + // Create a new napi_env for this module or reference one if a pre-existing + // one is found. + napi_env env = v8impl::GetEnv(context); mod->nm_register_func( env, diff --git a/test/addons-napi/test_env_sharing/binding.gyp b/test/addons-napi/test_env_sharing/binding.gyp new file mode 100644 index 00000000000000..5699a8391dd347 --- /dev/null +++ b/test/addons-napi/test_env_sharing/binding.gyp @@ -0,0 +1,12 @@ +{ + "targets": [ + { + "target_name": "store_env", + "sources": [ "store_env.c" ] + }, + { + "target_name": "compare_env", + "sources": [ "compare_env.c" ] + } + ] +} diff --git a/test/addons-napi/test_env_sharing/compare_env.c b/test/addons-napi/test_env_sharing/compare_env.c new file mode 100644 index 00000000000000..b209c8f6d8e968 --- /dev/null +++ b/test/addons-napi/test_env_sharing/compare_env.c @@ -0,0 +1,22 @@ +#include +#include "../common.h" + +napi_value compare(napi_env env, napi_callback_info info) { + napi_value external; + size_t argc = 1; + void* data; + napi_value return_value; + + NAPI_CALL(env, napi_get_cb_info(env, info, &argc, &external, NULL, NULL)); + NAPI_CALL(env, napi_get_value_external(env, external, &data)); + NAPI_CALL(env, napi_get_boolean(env, ((napi_env)data) == env, &return_value)); + + return return_value; +} + +void Init(napi_env env, napi_value exports, napi_value module, void* context) { + napi_property_descriptor prop = DECLARE_NAPI_PROPERTY("exports", compare); + NAPI_CALL_RETURN_VOID(env, napi_define_properties(env, module, 1, &prop)); +} + +NAPI_MODULE(compare_env, Init) diff --git a/test/addons-napi/test_env_sharing/store_env.c b/test/addons-napi/test_env_sharing/store_env.c new file mode 100644 index 00000000000000..391f6faa27648e --- /dev/null +++ b/test/addons-napi/test_env_sharing/store_env.c @@ -0,0 +1,12 @@ +#include +#include "../common.h" + +void Init(napi_env env, napi_value exports, napi_value module, void* context) { + napi_value external; + NAPI_CALL_RETURN_VOID(env, + napi_create_external(env, env, NULL, NULL, &external)); + NAPI_CALL_RETURN_VOID(env, + napi_set_named_property(env, module, "exports", external)); +} + +NAPI_MODULE(store_env, Init) diff --git a/test/addons-napi/test_env_sharing/test.js b/test/addons-napi/test_env_sharing/test.js new file mode 100644 index 00000000000000..6e21bf4c638b80 --- /dev/null +++ b/test/addons-napi/test_env_sharing/test.js @@ -0,0 +1,10 @@ +'use strict'; + +const common = require('../../common'); +const storeEnv = require(`./build/${common.buildType}/store_env`); +const compareEnv = require(`./build/${common.buildType}/compare_env`); +const assert = require('assert'); + +assert.strictEqual(compareEnv(storeEnv), true, + 'N-API environment pointers in two different modules have ' + + 'the same value'); From 60e0f2bb0ddd51a0d3e89f153ae7887930f27d2e Mon Sep 17 00:00:00 2001 From: Shivanth MP Date: Thu, 20 Jul 2017 01:50:43 +0530 Subject: [PATCH 070/157] n-api: add support for DataView Basic support for Dataview is added in this commit. This is achieved by using three functions, napi_create_dataview(), napi_is_dataview() and napi_get_dataview_info(). PR-URL: https://github.com/nodejs/node/pull/14382 Fixes: https://github.com/nodejs/node/issues/13926 Reviewed-By: Anna Henningsen Reviewed-By: Timothy Gu Reviewed-By: Colin Ihrig --- doc/api/n-api.md | 84 +++++++++++++++++++ src/node_api.cc | 66 +++++++++++++++ src/node_api.h | 15 ++++ test/addons-napi/test_dataview/binding.gyp | 8 ++ test/addons-napi/test_dataview/test.js | 14 ++++ .../addons-napi/test_dataview/test_dataview.c | 49 +++++++++++ 6 files changed, 236 insertions(+) create mode 100644 test/addons-napi/test_dataview/binding.gyp create mode 100644 test/addons-napi/test_dataview/test.js create mode 100644 test/addons-napi/test_dataview/test_dataview.c diff --git a/doc/api/n-api.md b/doc/api/n-api.md index 924e39e9b75f73..724d0f91edf43a 100644 --- a/doc/api/n-api.md +++ b/doc/api/n-api.md @@ -1331,6 +1331,40 @@ JavaScript TypedArray Objects are described in [Section 22.2](https://tc39.github.io/ecma262/#sec-typedarray-objects) of the ECMAScript Language Specification. + +#### *napi_create_dataview* + + +```C +napi_status napi_create_dataview(napi_env env, + size_t byte_length, + napi_value arraybuffer, + size_t byte_offset, + napi_value* result) + +``` + +- `[in] env`: The environment that the API is invoked under. +- `[in] length`: Number of elements in the DataView. +- `[in] arraybuffer`: ArrayBuffer underlying the DataView. +- `[in] byte_offset`: The byte offset within the ArrayBuffer from which to + start projecting the DataView. +- `[out] result`: A `napi_value` representing a JavaScript DataView. + +Returns `napi_ok` if the API succeeded. + +This API creates a JavaScript DataView object over an existing ArrayBuffer. +DataView objects provide an array-like view over an underlying data buffer, +but one which allows items of different size and type in the ArrayBuffer. + +It is required that `byte_length + byte_offset` is less than or equal to the +size in bytes of the array passed in. If not, a RangeError exception is raised. + +JavaScript DataView Objects are described in +[Section 24.3][] of the ECMAScript Language Specification. + ### Functions to convert from C types to N-API #### *napi_create_number* + +```C +napi_status napi_get_dataview_info(napi_env env, + napi_value dataview, + size_t* byte_length, + void** data, + napi_value* arraybuffer, + size_t* byte_offset) +``` + +- `[in] env`: The environment that the API is invoked under. +- `[in] dataview`: `napi_value` representing the DataView whose + properties to query. +- `[out] byte_length`: Number of bytes in the DataView. +- `[out] data`: The data buffer underlying the DataView. +- `[out] arraybuffer`: ArrayBuffer underlying the DataView. +- `[out] byte_offset`: The byte offset within the data buffer from which + to start projecting the DataView. + +Returns `napi_ok` if the API succeeded. + +This API returns various properties of a DataView. + + #### *napi_get_value_bool* + +```C +napi_status napi_is_dataview(napi_env env, napi_value value, bool* result) +``` + +- `[in] env`: The environment that the API is invoked under. +- `[in] value`: The JavaScript value to check. +- `[out] result`: Whether the given `napi_value` represents a DataView. + +Returns `napi_ok` if the API succeeded. + +This API checks if the Object passed in is a DataView. + ### *napi_strict_equals* -*Note*: Using the `delete` keyword on `URL` objects (e.g. -`delete myURL.protocol`, `delete myURL.pathname`, etc) has no effect but will -still return `true`. - ### Class: URL + +Browser-compatible `URL` class, implemented by following the WHATWG URL +Standard. [Examples of parsed URLs][] may be found in the Standard itself. + +*Note*: In accordance with browser conventions, all properties of `URL` objects +are implemented as getters and setters on the class prototype, rather than as +data properties on the object itself. Thus, unlike [legacy urlObject][]s, using +the `delete` keyword on any properties of `URL` objects (e.g. `delete +myURL.protocol`, `delete myURL.pathname`, etc) has no effect but will still +return `true`. + #### Constructor: new URL(input[, base]) * `input` {string} The input URL to parse @@ -116,7 +123,8 @@ const myURL = new URL('https://你好你好'); // https://xn--6qqa088eba/ ``` -Additional [examples of parsed URLs][] may be found in the WHATWG URL Standard. +*Note*: This feature is only available if the `node` executable was compiled +with [ICU][] enabled. If not, the domain names are passed through unchanged. #### url.hash @@ -1142,9 +1150,11 @@ console.log(myURL.origin); [`url.toString()`]: #url_url_tostring [`urlSearchParams.entries()`]: #url_urlsearchparams_entries [`urlSearchParams@@iterator()`]: #url_urlsearchparams_iterator +[ICU]: intl.html#intl_options_for_building_node_js [Punycode]: https://tools.ietf.org/html/rfc5891#section-4.4 [WHATWG URL Standard]: https://url.spec.whatwg.org/ [WHATWG URL]: #url_the_whatwg_url_api [examples of parsed URLs]: https://url.spec.whatwg.org/#example-url-parsing +[legacy urlObject]: #url_legacy_urlobject [percent-encoded]: #whatwg-percent-encoding [stable sorting algorithm]: https://en.wikipedia.org/wiki/Sorting_algorithm#Stability From d90a5e00690240d3b3996eaf929d1ee9bf3eb245 Mon Sep 17 00:00:00 2001 From: Franziska Hinkelmann Date: Mon, 24 Jul 2017 16:56:11 +0200 Subject: [PATCH 099/157] src: replace deprecated ForceSet() method MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ForceSet() is marked to be deprecated. Replacing it with DefineOwnProperty(). PR-URL: https://github.com/nodejs/node/pull/14450 Reviewed-By: James M Snell Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Tobias Nießen --- src/async-wrap.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/async-wrap.cc b/src/async-wrap.cc index 0892fd46096661..3c42fa736e8380 100644 --- a/src/async-wrap.cc +++ b/src/async-wrap.cc @@ -512,10 +512,10 @@ void AsyncWrap::Initialize(Local target, static_cast(v8::ReadOnly | v8::DontDelete); #define FORCE_SET_TARGET_FIELD(obj, str, field) \ - (obj)->ForceSet(context, \ - FIXED_ONE_BYTE_STRING(isolate, str), \ - field, \ - ReadOnlyDontDelete).FromJust() + (obj)->DefineOwnProperty(context, \ + FIXED_ONE_BYTE_STRING(isolate, str), \ + field, \ + ReadOnlyDontDelete).FromJust() // Attach the uint32_t[] where each slot contains the count of the number of // callbacks waiting to be called on a particular event. It can then be From b41ae9847e15bf831ce5b67551a2340614acfce6 Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Mon, 24 Jul 2017 08:39:02 +0800 Subject: [PATCH 100/157] path: fix win32 volume-relative paths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `path.resolve()` and `path.join()` are left alone in this commit due to the lack of clear semantics. PR-URL: https://github.com/nodejs/node/pull/14440 Fixes: https://github.com/nodejs/node/issues/14405 Reviewed-By: Refael Ackermann Reviewed-By: Tobias Nießen --- lib/path.js | 45 ++++++++------ test/parallel/test-path-parse-format.js | 82 ++++++++++++++----------- test/parallel/test-path.js | 28 ++++++++- 3 files changed, 97 insertions(+), 58 deletions(-) diff --git a/lib/path.js b/lib/path.js index 4dc4b8398464d3..3fab7f79d746ec 100644 --- a/lib/path.js +++ b/lib/path.js @@ -908,6 +908,7 @@ const win32 = { extname: function extname(path) { assertPath(path); + var start = 0; var startDot = -1; var startPart = 0; var end = -1; @@ -915,7 +916,20 @@ const win32 = { // Track the state of characters (if any) we see before our first dot and // after any path separator we find var preDotState = 0; - for (var i = path.length - 1; i >= 0; --i) { + + // Check for a drive letter prefix so as not to mistake the following + // path separator as an extra separator at the end of the path that can be + // disregarded + if (path.length >= 2) { + const code = path.charCodeAt(0); + if (path.charCodeAt(1) === 58/*:*/ && + ((code >= 65/*A*/ && code <= 90/*Z*/) || + (code >= 97/*a*/ && code <= 122/*z*/))) { + start = startPart = 2; + } + } + + for (var i = path.length - 1; i >= start; --i) { const code = path.charCodeAt(i); if (code === 47/*/*/ || code === 92/*\*/) { // If we reached a path separator that was not part of a set of path @@ -979,15 +993,12 @@ const win32 = { var len = path.length; var rootEnd = 0; var code = path.charCodeAt(0); - var isAbsolute = false; // Try to match a root if (len > 1) { if (code === 47/*/*/ || code === 92/*\*/) { // Possible UNC root - isAbsolute = true; - code = path.charCodeAt(1); rootEnd = 1; if (code === 47/*/*/ || code === 92/*\*/) { @@ -1046,7 +1057,6 @@ const win32 = { ret.root = ret.dir = path; return ret; } - isAbsolute = true; rootEnd = 3; } } else { @@ -1068,7 +1078,7 @@ const win32 = { ret.root = path.slice(0, rootEnd); var startDot = -1; - var startPart = 0; + var startPart = rootEnd; var end = -1; var matchedSlash = true; var i = path.length - 1; @@ -1117,26 +1127,21 @@ const win32 = { startDot === end - 1 && startDot === startPart + 1)) { if (end !== -1) { - if (startPart === 0 && isAbsolute) - ret.base = ret.name = path.slice(rootEnd, end); - else - ret.base = ret.name = path.slice(startPart, end); + ret.base = ret.name = path.slice(startPart, end); } } else { - if (startPart === 0 && isAbsolute) { - ret.name = path.slice(rootEnd, startDot); - ret.base = path.slice(rootEnd, end); - } else { - ret.name = path.slice(startPart, startDot); - ret.base = path.slice(startPart, end); - } + ret.name = path.slice(startPart, startDot); + ret.base = path.slice(startPart, end); ret.ext = path.slice(startDot, end); } - if (startPart > 0) + // If the directory is the root, use the entire root as the `dir` including + // the trailing slash if any (`C:\abc` -> `C:\`). Otherwise, strip out the + // trailing slash (`C:\abc\def` -> `C:\abc`). + if (startPart > 0 && startPart !== rootEnd) ret.dir = path.slice(0, startPart - 1); - else if (isAbsolute) - ret.dir = path.slice(0, rootEnd); + else + ret.dir = ret.root; return ret; }, diff --git a/test/parallel/test-path-parse-format.js b/test/parallel/test-path-parse-format.js index c75c1a9135cd79..64e9429a2394f0 100644 --- a/test/parallel/test-path-parse-format.js +++ b/test/parallel/test-path-parse-format.js @@ -25,28 +25,33 @@ const assert = require('assert'); const path = require('path'); const winPaths = [ - 'C:\\path\\dir\\index.html', - 'C:\\another_path\\DIR\\1\\2\\33\\\\index', - 'another_path\\DIR with spaces\\1\\2\\33\\index', - '\\foo\\C:', - 'file', - '.\\file', - 'C:\\', - 'C:', - '\\', - '', + // [path, root] + ['C:\\path\\dir\\index.html', 'C:\\'], + ['C:\\another_path\\DIR\\1\\2\\33\\\\index', 'C:\\'], + ['another_path\\DIR with spaces\\1\\2\\33\\index', ''], + ['\\', '\\'], + ['\\foo\\C:', '\\'], + ['file', ''], + ['file:stream', ''], + ['.\\file', ''], + ['C:', 'C:'], + ['C:.', 'C:'], + ['C:..', 'C:'], + ['C:abc', 'C:'], + ['C:\\', 'C:\\'], + ['C:\\abc', 'C:\\' ], + ['', ''], // unc - '\\\\server\\share\\file_path', - '\\\\server two\\shared folder\\file path.zip', - '\\\\teela\\admin$\\system32', - '\\\\?\\UNC\\server\\share' + ['\\\\server\\share\\file_path', '\\\\server\\share\\'], + ['\\\\server two\\shared folder\\file path.zip', + '\\\\server two\\shared folder\\'], + ['\\\\teela\\admin$\\system32', '\\\\teela\\admin$\\'], + ['\\\\?\\UNC\\server\\share', '\\\\?\\UNC\\'] ]; const winSpecialCaseParseTests = [ ['/foo/bar', { root: '/' }], - ['C:', { root: 'C:', dir: 'C:', base: '' }], - ['C:\\', { root: 'C:\\', dir: 'C:\\', base: '' }] ]; const winSpecialCaseFormatTests = [ @@ -60,26 +65,27 @@ const winSpecialCaseFormatTests = [ ]; const unixPaths = [ - '/home/user/dir/file.txt', - '/home/user/a dir/another File.zip', - '/home/user/a dir//another&File.', - '/home/user/a$$$dir//another File.zip', - 'user/dir/another File.zip', - 'file', - '.\\file', - './file', - 'C:\\foo', - '/', - '', - '.', - '..', - '/foo', - '/foo.', - '/foo.bar', - '/.', - '/.foo', - '/.foo.bar', - '/foo/bar.baz', + // [path, root] + ['/home/user/dir/file.txt', '/'], + ['/home/user/a dir/another File.zip', '/'], + ['/home/user/a dir//another&File.', '/'], + ['/home/user/a$$$dir//another File.zip', '/'], + ['user/dir/another File.zip', ''], + ['file', ''], + ['.\\file', ''], + ['./file', ''], + ['C:\\foo', ''], + ['/', '/'], + ['', ''], + ['.', ''], + ['..', ''], + ['/foo', '/'], + ['/foo.', '/'], + ['/foo.bar', '/'], + ['/.', '/'], + ['/.foo', '/'], + ['/.foo.bar', '/'], + ['/foo/bar.baz', '/'] ]; const unixSpecialCaseFormatTests = [ @@ -190,7 +196,7 @@ function checkErrors(path) { } function checkParseFormat(path, paths) { - paths.forEach(function(element) { + paths.forEach(function([element, root]) { const output = path.parse(element); assert.strictEqual(typeof output.root, 'string'); assert.strictEqual(typeof output.dir, 'string'); @@ -198,6 +204,8 @@ function checkParseFormat(path, paths) { assert.strictEqual(typeof output.ext, 'string'); assert.strictEqual(typeof output.name, 'string'); assert.strictEqual(path.format(output), element); + assert.strictEqual(output.root, root); + assert(output.dir.startsWith(output.root)); assert.strictEqual(output.dir, output.dir ? path.dirname(element) : ''); assert.strictEqual(output.base, path.basename(element)); assert.strictEqual(output.ext, path.extname(element)); diff --git a/test/parallel/test-path.js b/test/parallel/test-path.js index ea5de95fb86620..3e4f2b43e4c21e 100644 --- a/test/parallel/test-path.js +++ b/test/parallel/test-path.js @@ -72,6 +72,16 @@ assert.strictEqual(path.win32.basename('aaa\\bbb', 'bbb'), 'bbb'); assert.strictEqual(path.win32.basename('aaa\\bbb\\\\\\\\', 'bbb'), 'bbb'); assert.strictEqual(path.win32.basename('aaa\\bbb', 'bb'), 'b'); assert.strictEqual(path.win32.basename('aaa\\bbb', 'b'), 'bb'); +assert.strictEqual(path.win32.basename('C:'), ''); +assert.strictEqual(path.win32.basename('C:.'), '.'); +assert.strictEqual(path.win32.basename('C:\\'), ''); +assert.strictEqual(path.win32.basename('C:\\dir\\base.ext'), 'base.ext'); +assert.strictEqual(path.win32.basename('C:\\basename.ext'), 'basename.ext'); +assert.strictEqual(path.win32.basename('C:basename.ext'), 'basename.ext'); +assert.strictEqual(path.win32.basename('C:basename.ext\\'), 'basename.ext'); +assert.strictEqual(path.win32.basename('C:basename.ext\\\\'), 'basename.ext'); +assert.strictEqual(path.win32.basename('C:foo'), 'foo'); +assert.strictEqual(path.win32.basename('file:stream'), 'file:stream'); // On unix a backslash is just treated as any other character. assert.strictEqual(path.posix.basename('\\dir\\basename.ext'), @@ -120,6 +130,8 @@ assert.strictEqual(path.win32.dirname('c:foo\\'), 'c:'); assert.strictEqual(path.win32.dirname('c:foo\\bar'), 'c:foo'); assert.strictEqual(path.win32.dirname('c:foo\\bar\\'), 'c:foo'); assert.strictEqual(path.win32.dirname('c:foo\\bar\\baz'), 'c:foo\\bar'); +assert.strictEqual(path.win32.dirname('file:stream'), '.'); +assert.strictEqual(path.win32.dirname('dir\\file:stream'), 'dir'); assert.strictEqual(path.win32.dirname('\\\\unc\\share'), '\\\\unc\\share'); assert.strictEqual(path.win32.dirname('\\\\unc\\share\\foo'), @@ -187,6 +199,7 @@ assert.strictEqual(path.win32.dirname('foo'), '.'); ['file./', '.'], ['file.//', '.'], ].forEach((test) => { + const expected = test[1]; [path.posix.extname, path.win32.extname].forEach((extname) => { let input = test[0]; let os; @@ -197,12 +210,19 @@ assert.strictEqual(path.win32.dirname('foo'), '.'); os = 'posix'; } const actual = extname(input); - const expected = test[1]; const message = `path.${os}.extname(${JSON.stringify(input)})\n expect=${ JSON.stringify(expected)}\n actual=${JSON.stringify(actual)}`; if (actual !== expected) failures.push(`\n${message}`); }); + { + const input = `C:${test[0].replace(slashRE, '\\')}`; + const actual = path.win32.extname(input); + const message = `path.win32.extname(${JSON.stringify(input)})\n expect=${ + JSON.stringify(expected)}\n actual=${JSON.stringify(actual)}`; + if (actual !== expected) + failures.push(`\n${message}`); + } }); assert.strictEqual(failures.length, 0, failures.join('')); @@ -406,6 +426,12 @@ assert.strictEqual(path.win32.normalize('a//b//.'), 'a\\b'); assert.strictEqual(path.win32.normalize('//server/share/dir/file.ext'), '\\\\server\\share\\dir\\file.ext'); assert.strictEqual(path.win32.normalize('/a/b/c/../../../x/y/z'), '\\x\\y\\z'); +assert.strictEqual(path.win32.normalize('C:'), 'C:.'); +assert.strictEqual(path.win32.normalize('C:..\\abc'), 'C:..\\abc'); +assert.strictEqual(path.win32.normalize('C:..\\..\\abc\\..\\def'), + 'C:..\\..\\def'); +assert.strictEqual(path.win32.normalize('C:\\.'), 'C:\\'); +assert.strictEqual(path.win32.normalize('file:stream'), 'file:stream'); assert.strictEqual(path.posix.normalize('./fixtures///b/../b/c.js'), 'fixtures/b/c.js'); From fa8c5f4372ff4f3ca440ccd1a7d11756ba3a72cd Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Thu, 27 Jul 2017 09:29:15 -0700 Subject: [PATCH 101/157] tools: remove legacy indentation linting All linting now uses the current ESLint 4.3.0 indentation linting. Remove legacy indentation rules. PR-URL: https://github.com/nodejs/node/pull/14515 Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: Claudio Rodriguez Reviewed-By: Evan Lucas Reviewed-By: Timothy Gu --- .eslintrc.yaml | 19 +++++++------------ benchmark/.eslintrc.yaml | 13 ------------- doc/.eslintrc.yaml | 10 ---------- lib/.eslintrc.yaml | 9 --------- test/.eslintrc.yaml | 10 ---------- tools/.eslintrc.yaml | 13 ------------- 6 files changed, 7 insertions(+), 67 deletions(-) delete mode 100644 benchmark/.eslintrc.yaml delete mode 100644 tools/.eslintrc.yaml diff --git a/.eslintrc.yaml b/.eslintrc.yaml index 0ba050d4c60628..dfe99dcca24c75 100644 --- a/.eslintrc.yaml +++ b/.eslintrc.yaml @@ -101,18 +101,13 @@ rules: func-call-spacing: error func-name-matching: error func-style: [error, declaration, {allowArrowFunctions: true}] - # indent: [error, 2, {ArrayExpression: first, - # CallExpression: {arguments: first}, - # FunctionDeclaration: {parameters: first}, - # FunctionExpression: {parameters: first}, - # MemberExpression: off, - # ObjectExpression: first, - # SwitchCase: 1}] - indent-legacy: [error, 2, {ArrayExpression: first, - CallExpression: {arguments: first}, - MemberExpression: 1, - ObjectExpression: first, - SwitchCase: 1}] + indent: [error, 2, {ArrayExpression: first, + CallExpression: {arguments: first}, + FunctionDeclaration: {parameters: first}, + FunctionExpression: {parameters: first}, + MemberExpression: off, + ObjectExpression: first, + SwitchCase: 1}] key-spacing: [error, {mode: minimum}] keyword-spacing: error linebreak-style: [error, unix] diff --git a/benchmark/.eslintrc.yaml b/benchmark/.eslintrc.yaml deleted file mode 100644 index beaaea041fc7f5..00000000000000 --- a/benchmark/.eslintrc.yaml +++ /dev/null @@ -1,13 +0,0 @@ -## Benchmarks-specific linter rules - -rules: - # Stylistic Issues - # http://eslint.org/docs/rules/#stylistic-issues - indent: [error, 2, {ArrayExpression: first, - CallExpression: {arguments: first}, - FunctionDeclaration: {parameters: first}, - FunctionExpression: {parameters: first}, - MemberExpression: off, - ObjectExpression: first, - SwitchCase: 1}] - indent-legacy: off diff --git a/doc/.eslintrc.yaml b/doc/.eslintrc.yaml index a112e0f54cd604..1c5177d90642ad 100644 --- a/doc/.eslintrc.yaml +++ b/doc/.eslintrc.yaml @@ -13,13 +13,3 @@ rules: no-var: error prefer-const: error prefer-rest-params: error - - # use stricter indent over indent-legacy - indent-legacy: off - indent: [error, 2, {ArrayExpression: first, - CallExpression: {arguments: first}, - FunctionDeclaration: {parameters: first}, - FunctionExpression: {parameters: first}, - MemberExpression: off, - ObjectExpression: first, - SwitchCase: 1}] diff --git a/lib/.eslintrc.yaml b/lib/.eslintrc.yaml index 29d938e27d6c23..24f54e682636ee 100644 --- a/lib/.eslintrc.yaml +++ b/lib/.eslintrc.yaml @@ -1,13 +1,4 @@ rules: - indent: [error, 2, {ArrayExpression: first, - CallExpression: {arguments: first}, - FunctionDeclaration: {parameters: first}, - FunctionExpression: {parameters: first}, - MemberExpression: off, - ObjectExpression: first, - SwitchCase: 1}] - indent-legacy: off - # Custom rules in tools/eslint-rules require-buffer: error buffer-constructor: error diff --git a/test/.eslintrc.yaml b/test/.eslintrc.yaml index 85d89ebb8647f9..aeaf09fb0ff732 100644 --- a/test/.eslintrc.yaml +++ b/test/.eslintrc.yaml @@ -1,16 +1,6 @@ ## Test-specific linter rules rules: - # Stylistic Issues - # http://eslint.org/docs/rules/#stylistic-issues - indent: [error, 2, {ArrayExpression: first, - CallExpression: {arguments: first}, - FunctionDeclaration: {parameters: first}, - FunctionExpression: {parameters: first}, - MemberExpression: off, - ObjectExpression: first, - SwitchCase: 1}] - indent-legacy: off # ECMAScript 6 # http://eslint.org/docs/rules/#ecmascript-6 no-var: error diff --git a/tools/.eslintrc.yaml b/tools/.eslintrc.yaml deleted file mode 100644 index 1655ae36f41d74..00000000000000 --- a/tools/.eslintrc.yaml +++ /dev/null @@ -1,13 +0,0 @@ -## Tools-specific linter rules - -rules: - # Stylistic Issues - # http://eslint.org/docs/rules/#stylistic-issues - indent: [error, 2, {ArrayExpression: first, - CallExpression: {arguments: first}, - FunctionDeclaration: {parameters: first}, - FunctionExpression: {parameters: first}, - MemberExpression: off, - ObjectExpression: first, - SwitchCase: 1}] - indent-legacy: off From 19a0e06317f76496da97d3c4b5f1a941efa79bab Mon Sep 17 00:00:00 2001 From: alexbostock Date: Sun, 30 Jul 2017 21:27:09 +0100 Subject: [PATCH 102/157] linkedlist: correct grammar in comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/14546 Reviewed-By: Vse Mozhet Byt Reviewed-By: Tobias Nießen Reviewed-By: Timothy Gu --- lib/internal/linkedlist.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/internal/linkedlist.js b/lib/internal/linkedlist.js index d2e868a2cfd5f8..55f7be233476a3 100644 --- a/lib/internal/linkedlist.js +++ b/lib/internal/linkedlist.js @@ -5,13 +5,13 @@ function init(list) { list._idlePrev = list; } -// show the most idle item +// Show the most idle item. function peek(list) { if (list._idlePrev === list) return null; return list._idlePrev; } -// remove a item from its list +// Remove an item from its list. function remove(item) { if (item._idleNext) { item._idleNext._idlePrev = item._idlePrev; @@ -25,18 +25,18 @@ function remove(item) { item._idlePrev = null; } -// remove a item from its list and place at the end. +// Remove an item from its list and place at the end. function append(list, item) { if (item._idleNext || item._idlePrev) { remove(item); } - // items are linked with _idleNext -> (older) and _idlePrev -> (newer) + // Items are linked with _idleNext -> (older) and _idlePrev -> (newer). // Note: This linkage (next being older) may seem counter-intuitive at first. item._idleNext = list._idleNext; item._idlePrev = list; - // the list _idleNext points to tail (newest) and _idlePrev to head (oldest) + // The list _idleNext points to tail (newest) and _idlePrev to head (oldest). list._idleNext._idlePrev = item; list._idleNext = item; } From fffd8f533541d842a4b1211be61201cd5d1fcd83 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Fri, 14 Jul 2017 10:26:45 -0400 Subject: [PATCH 103/157] doc: document napi_finalize() signature MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refs: https://github.com/nodejs/node/issues/14138 PR-URL: https://github.com/nodejs/node/pull/14230 Reviewed-By: Refael Ackermann Reviewed-By: Michael Dawson Reviewed-By: James M Snell Reviewed-By: Gibson Fahnestock Reviewed-By: Tobias Nießen --- doc/api/n-api.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/api/n-api.md b/doc/api/n-api.md index 724d0f91edf43a..b9c45088ba415e 100644 --- a/doc/api/n-api.md +++ b/doc/api/n-api.md @@ -181,6 +181,12 @@ must provide a function satisfying the following signature which would get called upon the object's collection. Currently, `napi_finalize` can be used for finding out when objects that have external data are collected. +```C +typedef void (*napi_finalize)(napi_env env, + void* finalize_data, + void* finalize_hint); +``` + #### napi_async_execute_callback Function pointer used with functions that support asynchronous From 37e55bf5590e40554569aff1bc5778f5ad34d58c Mon Sep 17 00:00:00 2001 From: Azard <330815461@qq.com> Date: Tue, 6 Jun 2017 20:22:22 +0800 Subject: [PATCH 104/157] readline: remove max limit of crlfDelay PR-URL: https://github.com/nodejs/node/pull/13497 Reviewed-By: Prince John Wesley Reviewed-By: James M Snell Reviewed-By: Anna Henningsen Reviewed-By: Refael Ackermann --- doc/api/readline.md | 4 +- lib/readline.js | 5 +- test/parallel/test-readline-interface.js | 71 ++++++++++++++++++++++-- 3 files changed, 70 insertions(+), 10 deletions(-) diff --git a/doc/api/readline.md b/doc/api/readline.md index 767f8ccefcd248..085ac885401c89 100644 --- a/doc/api/readline.md +++ b/doc/api/readline.md @@ -369,7 +369,9 @@ changes: * `crlfDelay` {number} If the delay between `\r` and `\n` exceeds `crlfDelay` milliseconds, both `\r` and `\n` will be treated as separate end-of-line input. Default to `100` milliseconds. - `crlfDelay` will be coerced to `[100, 2000]` range. + `crlfDelay` will be coerced to a number no less than `100`. It can be set to + `Infinity`, in which case `\r` followed by `\n` will always be considered a + single newline. * `removeHistoryDuplicates` {boolean} If `true`, when a new input line added to the history list duplicates an older one, this removes the older line from the list. Defaults to `false`. diff --git a/lib/readline.js b/lib/readline.js index f1cb6b8678f1b0..7b3b2f18732dc0 100644 --- a/lib/readline.js +++ b/lib/readline.js @@ -48,7 +48,6 @@ const { const kHistorySize = 30; const kMincrlfDelay = 100; -const kMaxcrlfDelay = 2000; // \r\n, \n, or \r followed by something other than \n const lineEnding = /\r?\n|\r(?!\n)/; @@ -120,8 +119,8 @@ function Interface(input, output, completer, terminal) { this.input = input; this.historySize = historySize; this.removeHistoryDuplicates = !!removeHistoryDuplicates; - this.crlfDelay = Math.max(kMincrlfDelay, - Math.min(kMaxcrlfDelay, crlfDelay >>> 0)); + this.crlfDelay = crlfDelay ? + Math.max(kMincrlfDelay, crlfDelay) : kMincrlfDelay; // Check arity, 2 - for async, 1 for sync if (typeof completer === 'function') { diff --git a/test/parallel/test-readline-interface.js b/test/parallel/test-readline-interface.js index e3ac79c233ec5f..c70eac4893340d 100644 --- a/test/parallel/test-readline-interface.js +++ b/test/parallel/test-readline-interface.js @@ -63,14 +63,26 @@ function isWarned(emitter) { } { - // Maximum crlfDelay is 2000ms + // set crlfDelay to float 100.5ms const fi = new FakeInput(); const rli = new readline.Interface({ input: fi, output: fi, - crlfDelay: 1 << 30 + crlfDelay: 100.5 }); - assert.strictEqual(rli.crlfDelay, 2000); + assert.strictEqual(rli.crlfDelay, 100.5); + rli.close(); +} + +{ + // set crlfDelay to 5000ms + const fi = new FakeInput(); + const rli = new readline.Interface({ + input: fi, + output: fi, + crlfDelay: 5000 + }); + assert.strictEqual(rli.crlfDelay, 5000); rli.close(); } @@ -248,7 +260,7 @@ function isWarned(emitter) { rli.close(); // Emit two line events when the delay - // between \r and \n exceeds crlfDelay + // between \r and \n exceeds crlfDelay { const fi = new FakeInput(); const delay = 200; @@ -270,8 +282,55 @@ function isWarned(emitter) { }), delay * 2); } + // Emit one line events when the delay between \r and \n is + // over the default crlfDelay but within the setting value + { + const fi = new FakeInput(); + const delay = 200; + const crlfDelay = 500; + const rli = new readline.Interface({ + input: fi, + output: fi, + terminal: terminal, + crlfDelay + }); + let callCount = 0; + rli.on('line', function(line) { + callCount++; + }); + fi.emit('data', '\r'); + setTimeout(common.mustCall(() => { + fi.emit('data', '\n'); + assert.strictEqual(callCount, 1); + rli.close(); + }), delay); + } + + // set crlfDelay to `Infinity` is allowed + { + const fi = new FakeInput(); + const delay = 200; + const crlfDelay = Infinity; + const rli = new readline.Interface({ + input: fi, + output: fi, + terminal: terminal, + crlfDelay + }); + let callCount = 0; + rli.on('line', function(line) { + callCount++; + }); + fi.emit('data', '\r'); + setTimeout(common.mustCall(() => { + fi.emit('data', '\n'); + assert.strictEqual(callCount, 1); + rli.close(); + }), delay); + } + // \t when there is no completer function should behave like an ordinary - // character + // character fi = new FakeInput(); rli = new readline.Interface({ input: fi, output: fi, terminal: true }); called = false; @@ -517,7 +576,7 @@ function isWarned(emitter) { assert.strictEqual(isWarned(process.stdout._events), false); } - //can create a new readline Interface with a null output arugument + // can create a new readline Interface with a null output arugument fi = new FakeInput(); rli = new readline.Interface({input: fi, output: null, terminal: terminal }); From 0cf1e224480e9a122bf44346405ee4ee3eac2678 Mon Sep 17 00:00:00 2001 From: Matthew Alsup Date: Thu, 27 Jul 2017 19:52:39 -0500 Subject: [PATCH 105/157] benchmark: remove unused parameters MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Functions completeConfig, completeRun, and updateProgress had unused parameters. These were removed. PR-URL: https://github.com/nodejs/node/pull/14526 Reviewed-By: Rich Trott Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: Timothy Gu Reviewed-By: Evan Lucas Reviewed-By: Tobias Nießen Reviewed-By: James M Snell --- benchmark/_benchmark_progress.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/benchmark/_benchmark_progress.js b/benchmark/_benchmark_progress.js index 0c5cc10bf8d536..ffb2dfdf6511a9 100644 --- a/benchmark/_benchmark_progress.js +++ b/benchmark/_benchmark_progress.js @@ -65,12 +65,12 @@ class BenchmarkProgress { this.updateProgress(); } - completeConfig(data) { + completeConfig() { this.completedConfig++; this.updateProgress(); } - completeRun(job) { + completeRun() { this.completedRuns++; this.updateProgress(); } @@ -108,7 +108,7 @@ class BenchmarkProgress { `${caption} `; } - updateProgress(finished) { + updateProgress() { if (!process.stderr.isTTY || process.stdout.isTTY) { return; } From cfed48e81c47bc9af5f8c2805eb70102f97e3d4d Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Sun, 30 Jul 2017 20:15:16 +0800 Subject: [PATCH 106/157] doc, url: add changelog metadata for url.format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/14543 Fixes: https://github.com/nodejs/node/issues/11103 Reviewed-By: Anna Henningsen Reviewed-By: Luigi Pinca Reviewed-By: Tobias Nießen Reviewed-By: Refael Ackermann Reviewed-By: Rich Trott Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- doc/api/url.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/api/url.md b/doc/api/url.md index adfe82aed7d553..cb2a3965f5eee4 100644 --- a/doc/api/url.md +++ b/doc/api/url.md @@ -953,6 +953,13 @@ forward-slash characters (`/`) are required following the colon in the ### url.format(urlObject) * `urlObject` {Object|string} A URL object (as returned by `url.parse()` or From 32259421ca83ccc482911d51fb91efea65aad16f Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Mon, 24 Jul 2017 11:52:53 +0800 Subject: [PATCH 107/157] url: update sort() behavior with no params MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/14185 Refs: https://github.com/whatwg/url/pull/336 Reviewed-By: Michaël Zasso Reviewed-By: Refael Ackermann Reviewed-By: James M Snell --- lib/internal/url.js | 9 ++++----- .../test-whatwg-url-searchparams-delete.js | 17 ++++++++++++++++- .../test-whatwg-url-searchparams-sort.js | 11 +++++++++-- 3 files changed, 29 insertions(+), 8 deletions(-) diff --git a/lib/internal/url.js b/lib/internal/url.js index 5bee7417782ac1..10df37d8c25d7b 100644 --- a/lib/internal/url.js +++ b/lib/internal/url.js @@ -1076,12 +1076,11 @@ defineIDLClass(URLSearchParams.prototype, 'URLSearchParams', { sort() { const a = this[searchParams]; const len = a.length; - if (len <= 2) { - return; - } - // arbitrary number found through testing - if (len < 100) { + if (len <= 2) { + // Nothing needs to be done. + } else if (len < 100) { + // 100 is found through testing. // Simple stable in-place insertion sort // Derived from v8/src/js/array.js for (var i = 2; i < len; i += 2) { diff --git a/test/parallel/test-whatwg-url-searchparams-delete.js b/test/parallel/test-whatwg-url-searchparams-delete.js index 6e733fd94466c4..2969f51a731c58 100644 --- a/test/parallel/test-whatwg-url-searchparams-delete.js +++ b/test/parallel/test-whatwg-url-searchparams-delete.js @@ -8,7 +8,7 @@ const { test, assert_equals, assert_true, assert_false } = /* The following tests are copied from WPT. Modifications to them should be upstreamed first. Refs: - https://github.com/w3c/web-platform-tests/blob/8791bed/url/urlsearchparams-delete.html + https://github.com/w3c/web-platform-tests/blob/70a0898763/url/urlsearchparams-delete.html License: http://www.w3.org/Consortium/Legal/2008/04-testsuite-copyright.html */ /* eslint-disable */ @@ -42,6 +42,21 @@ test(function() { params.delete('first'); assert_false(params.has('first'), 'Search params object has no "first" name'); }, 'Deleting appended multiple'); + +test(function() { + var url = new URL('http://example.com/?param1¶m2'); + url.searchParams.delete('param1'); + url.searchParams.delete('param2'); + assert_equals(url.href, 'http://example.com/', 'url.href does not have ?'); + assert_equals(url.search, '', 'url.search does not have ?'); +}, 'Deleting all params removes ? from URL'); + +test(function() { + var url = new URL('http://example.com/?'); + url.searchParams.delete('param1'); + assert_equals(url.href, 'http://example.com/', 'url.href does not have ?'); + assert_equals(url.search, '', 'url.search does not have ?'); +}, 'Removing non-existent param removes ? from URL'); /* eslint-enable */ // Tests below are not from WPT. diff --git a/test/parallel/test-whatwg-url-searchparams-sort.js b/test/parallel/test-whatwg-url-searchparams-sort.js index 712dbc5636d81b..2dbf5aa1fbd0e4 100644 --- a/test/parallel/test-whatwg-url-searchparams-sort.js +++ b/test/parallel/test-whatwg-url-searchparams-sort.js @@ -2,11 +2,11 @@ require('../common'); const { URL, URLSearchParams } = require('url'); -const { test, assert_array_equals } = require('../common/wpt'); +const { test, assert_equals, assert_array_equals } = require('../common/wpt'); /* The following tests are copied from WPT. Modifications to them should be upstreamed first. Refs: - https://github.com/w3c/web-platform-tests/blob/5903e00e77e85f8bcb21c73d1d7819fcd04763bd/url/urlsearchparams-sort.html + https://github.com/w3c/web-platform-tests/blob/70a0898763/url/urlsearchparams-sort.html License: http://www.w3.org/Consortium/Legal/2008/04-testsuite-copyright.html */ /* eslint-disable */ @@ -53,6 +53,13 @@ const { test, assert_array_equals } = require('../common/wpt'); } }, "URL parse and sort: " + val.input) }) + +test(function() { + const url = new URL("http://example.com/?") + url.searchParams.sort() + assert_equals(url.href, "http://example.com/") + assert_equals(url.search, "") +}, "Sorting non-existent params removes ? from URL") /* eslint-enable */ // Tests below are not from WPT. From f40b9062fcc59c41b8136c09acf480f9a264a52d Mon Sep 17 00:00:00 2001 From: Ezequiel Garcia Date: Tue, 27 Jun 2017 21:46:50 -0300 Subject: [PATCH 108/157] test: add check on an addon that does not register MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit calls require on a shared library that is not declared as a node module, and therefore does not register properly. PR-URL: https://github.com/nodejs/node/pull/13954 Signed-off-by: Ezequiel Garcia Reviewed-By: Ben Noordhuis Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Tobias Nießen Reviewed-By: Michael Dawson --- test/addons/not-a-binding/binding.gyp | 8 ++++++++ test/addons/not-a-binding/not_a_binding.c | 3 +++ test/addons/not-a-binding/test.js | 6 ++++++ 3 files changed, 17 insertions(+) create mode 100644 test/addons/not-a-binding/binding.gyp create mode 100644 test/addons/not-a-binding/not_a_binding.c create mode 100644 test/addons/not-a-binding/test.js diff --git a/test/addons/not-a-binding/binding.gyp b/test/addons/not-a-binding/binding.gyp new file mode 100644 index 00000000000000..7ddad59c1d1683 --- /dev/null +++ b/test/addons/not-a-binding/binding.gyp @@ -0,0 +1,8 @@ +{ + 'targets': [ + { + 'target_name': 'binding', + 'sources': [ 'not_a_binding.c' ] + } + ] +} diff --git a/test/addons/not-a-binding/not_a_binding.c b/test/addons/not-a-binding/not_a_binding.c new file mode 100644 index 00000000000000..af8791a1e3479c --- /dev/null +++ b/test/addons/not-a-binding/not_a_binding.c @@ -0,0 +1,3 @@ +int foo(void) { + return 0; +} diff --git a/test/addons/not-a-binding/test.js b/test/addons/not-a-binding/test.js new file mode 100644 index 00000000000000..a0ce2d0629ac1d --- /dev/null +++ b/test/addons/not-a-binding/test.js @@ -0,0 +1,6 @@ +'use strict'; +const common = require('../../common'); +const assert = require('assert'); + +const re = /^Error: Module did not self-register\.$/; +assert.throws(() => require(`./build/${common.buildType}/binding`), re); From 9f50db24504f6949b422ab10bd9a56ecf68a4ff7 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 29 Jul 2017 09:04:00 -0700 Subject: [PATCH 109/157] test: refactor test-vm-new-script-new-context * block scope test cases * clean up global leaks in individual test cases * enable global variable leak checking * remove console.error() statements PR-URL: https://github.com/nodejs/node/pull/14536 Reviewed-By: Refael Ackermann Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- .../test-vm-new-script-new-context.js | 123 ++++++++++-------- 1 file changed, 70 insertions(+), 53 deletions(-) diff --git a/test/parallel/test-vm-new-script-new-context.js b/test/parallel/test-vm-new-script-new-context.js index a345c3e54d661b..045c37ce335199 100644 --- a/test/parallel/test-vm-new-script-new-context.js +++ b/test/parallel/test-vm-new-script-new-context.js @@ -20,71 +20,88 @@ // USE OR OTHER DEALINGS IN THE SOFTWARE. 'use strict'; -const common = require('../common'); +require('../common'); + const assert = require('assert'); + const Script = require('vm').Script; -common.globalCheck = false; +{ + const script = new Script('\'passed\';'); + const result1 = script.runInNewContext(); + const result2 = script.runInNewContext(); + assert.strictEqual('passed', result1); + assert.strictEqual('passed', result2); +} -console.error('run a string'); -let script = new Script('\'passed\';'); -console.error('script created'); -const result1 = script.runInNewContext(); -const result2 = script.runInNewContext(); -assert.strictEqual('passed', result1); -assert.strictEqual('passed', result2); +{ + const script = new Script('throw new Error(\'test\');'); + assert.throws(function() { + script.runInNewContext(); + }, /^Error: test$/); +} -console.error('thrown error'); -script = new Script('throw new Error(\'test\');'); -assert.throws(function() { - script.runInNewContext(); -}, /^Error: test$/); +{ + const script = new Script('foo.bar = 5;'); + assert.throws(function() { + script.runInNewContext(); + }, /^ReferenceError: foo is not defined$/); +} - -console.error('undefined reference'); -script = new Script('foo.bar = 5;'); -assert.throws(function() { +{ + global.hello = 5; + const script = new Script('hello = 2'); script.runInNewContext(); -}, /^ReferenceError: foo is not defined$/); + assert.strictEqual(5, global.hello); + // cleanup + delete global.hello; +} -global.hello = 5; -script = new Script('hello = 2'); -script.runInNewContext(); -assert.strictEqual(5, global.hello); +{ + global.code = 'foo = 1;' + + 'bar = 2;' + + 'if (baz !== 3) throw new Error(\'test fail\');'; + global.foo = 2; + global.obj = { foo: 0, baz: 3 }; + const script = new Script(global.code); + /* eslint-disable no-unused-vars */ + const baz = script.runInNewContext(global.obj); + /* eslint-enable no-unused-vars */ + assert.strictEqual(1, global.obj.foo); + assert.strictEqual(2, global.obj.bar); + assert.strictEqual(2, global.foo); + //cleanup + delete global.code; + delete global.foo; + delete global.obj; +} -console.error('pass values in and out'); -global.code = 'foo = 1;' + - 'bar = 2;' + - 'if (baz !== 3) throw new Error(\'test fail\');'; -global.foo = 2; -global.obj = { foo: 0, baz: 3 }; -script = new Script(global.code); -/* eslint-disable no-unused-vars */ -const baz = script.runInNewContext(global.obj); -/* eslint-enable no-unused-vars */ -assert.strictEqual(1, global.obj.foo); -assert.strictEqual(2, global.obj.bar); -assert.strictEqual(2, global.foo); +{ + const script = new Script('f()'); + function changeFoo() { global.foo = 100; } + script.runInNewContext({ f: changeFoo }); + assert.strictEqual(global.foo, 100); -console.error('call a function by reference'); -script = new Script('f()'); -function changeFoo() { global.foo = 100; } -script.runInNewContext({ f: changeFoo }); -assert.strictEqual(global.foo, 100); + // cleanup + delete global.foo; +} -console.error('modify an object by reference'); -script = new Script('f.a = 2'); -const f = { a: 1 }; -script.runInNewContext({ f: f }); -assert.strictEqual(f.a, 2); +{ + const script = new Script('f.a = 2'); + const f = { a: 1 }; + script.runInNewContext({ f: f }); + assert.strictEqual(f.a, 2); -assert.throws(function() { - script.runInNewContext(); -}, /^ReferenceError: f is not defined$/); + assert.throws(function() { + script.runInNewContext(); + }, /^ReferenceError: f is not defined$/); +} -console.error('invalid this'); -assert.throws(function() { - script.runInNewContext.call('\'hello\';'); -}, /^TypeError: this\.runInContext is not a function$/); +{ + const script = new Script(''); + assert.throws(function() { + script.runInNewContext.call('\'hello\';'); + }, /^TypeError: this\.runInContext is not a function$/); +} From 7b9694425457d79d78543adfe01991d7473dc090 Mon Sep 17 00:00:00 2001 From: Jason Ginchereau Date: Sun, 30 Jul 2017 23:32:43 -0700 Subject: [PATCH 110/157] build,win: fix python detection script Handle spaces in the path to python.exe, in case it is installed under some directory like "C:\Program Files". PR-URL: https://github.com/nodejs/node/pull/14546 Reviewed-By: Timothy Gu Reviewed-By: Refael Ackermann Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Anna Henningsen --- tools/msvs/find_python.cmd | 2 +- vcbuild.bat | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/msvs/find_python.cmd b/tools/msvs/find_python.cmd index 9b67764c7563ff..f2a779290e8104 100644 --- a/tools/msvs/find_python.cmd +++ b/tools/msvs/find_python.cmd @@ -41,7 +41,7 @@ EXIT /B 1 :validate IF NOT EXIST "%p%python.exe" EXIT /B 1 :: Check if %p% is python2 -%p%python.exe -V 2>&1 | findstr /R "^Python.2.*" > NUL +"%p%python.exe" -V 2>&1 | findstr /R "^Python.2.*" > NUL IF ERRORLEVEL 1 EXIT /B %ERRORLEVEL% :: We can wrap it up ENDLOCAL & SET pt=%p%& SET need_path_ext=%need_path% diff --git a/vcbuild.bat b/vcbuild.bat index c320aa9723a436..3e41d45e8b95ff 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -528,7 +528,7 @@ goto exit :run-python call tools\msvs\find_python.cmd if errorlevel 1 echo Could not find python2 & goto :exit -set cmd1=%VCBUILD_PYTHON_LOCATION% %* +set cmd1="%VCBUILD_PYTHON_LOCATION%" %* echo %cmd1% %cmd1% exit /b %ERRORLEVEL% @@ -547,7 +547,7 @@ set TAG= set FULLVERSION= :: Call as subroutine for validation of python call :run-python tools\getnodeversion.py > nul -for /F "tokens=*" %%i in ('%VCBUILD_PYTHON_LOCATION% tools\getnodeversion.py') do set NODE_VERSION=%%i +for /F "tokens=*" %%i in ('"%VCBUILD_PYTHON_LOCATION%" tools\getnodeversion.py') do set NODE_VERSION=%%i if not defined NODE_VERSION ( echo Cannot determine current version of Node.js exit /b 1 From 106a23bd27683b220b9e91454c39bf554079008b Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Thu, 27 Jul 2017 16:34:40 +0200 Subject: [PATCH 111/157] src,dns: refactor cares_wrap to avoid global state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/14518 Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Tobias Nießen --- lib/dns.js | 25 +- src/async-wrap.h | 1 + src/cares_wrap.cc | 383 ++++++++++++-------- src/env-inl.h | 40 -- src/env.h | 24 +- test/parallel/test-async-wrap-getasyncid.js | 1 + 6 files changed, 253 insertions(+), 221 deletions(-) diff --git a/lib/dns.js b/lib/dns.js index c3678ecc6182e9..9cb38332583c02 100644 --- a/lib/dns.js +++ b/lib/dns.js @@ -28,11 +28,16 @@ const uv = process.binding('uv'); const internalNet = require('internal/net'); const { customPromisifyArgs } = require('internal/util'); -const GetAddrInfoReqWrap = cares.GetAddrInfoReqWrap; -const GetNameInfoReqWrap = cares.GetNameInfoReqWrap; -const QueryReqWrap = cares.QueryReqWrap; +const { + GetAddrInfoReqWrap, + GetNameInfoReqWrap, + QueryReqWrap, + ChannelWrap, + isIP +} = cares; + +const defaultChannel = new ChannelWrap(); -const isIP = cares.isIP; const isLegalPort = internalNet.isLegalPort; @@ -240,8 +245,6 @@ function onresolve(err, result, ttls) { function resolver(bindingName) { - var binding = cares[bindingName]; - return function query(name, /* options, */ callback) { var options; if (arguments.length > 2) { @@ -261,7 +264,7 @@ function resolver(bindingName) { req.hostname = name; req.oncomplete = onresolve; req.ttl = !!(options && options.ttl); - var err = binding(req, name); + var err = defaultChannel[bindingName](req, name); if (err) throw errnoException(err, bindingName); return req; }; @@ -303,7 +306,7 @@ function resolve(hostname, type_, callback_) { function getServers() { - const ret = cares.getServers(); + const ret = defaultChannel.getServers(); return ret.map((val) => { if (!val[1] || val[1] === IANA_DNS_PORT) return val[0]; @@ -316,7 +319,7 @@ function getServers() { function setServers(servers) { // cache the original servers because in the event of an error setting the // servers cares won't have any servers available for resolution - const orig = cares.getServers(); + const orig = defaultChannel.getServers(); const newSet = []; const IPv6RE = /\[(.*)\]/; const addrSplitRE = /(^.+?)(?::(\d+))?$/; @@ -348,11 +351,11 @@ function setServers(servers) { throw new Error(`IP address is not properly formatted: ${serv}`); }); - const errorNumber = cares.setServers(newSet); + const errorNumber = defaultChannel.setServers(newSet); if (errorNumber !== 0) { // reset the servers to the old servers, because ares probably unset them - cares.setServers(orig.join(',')); + defaultChannel.setServers(orig.join(',')); var err = cares.strerror(errorNumber); throw new Error(`c-ares failed to set servers: "${err}" [${servers}]`); diff --git a/src/async-wrap.h b/src/async-wrap.h index e775b99b60d48f..8b195a0f535e51 100644 --- a/src/async-wrap.h +++ b/src/async-wrap.h @@ -36,6 +36,7 @@ namespace node { #define NODE_ASYNC_NON_CRYPTO_PROVIDER_TYPES(V) \ V(NONE) \ + V(DNSCHANNEL) \ V(FSEVENTWRAP) \ V(FSREQWRAP) \ V(GETADDRINFOREQWRAP) \ diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc index 41a5633ee022f1..a75da1f410ae1d 100644 --- a/src/cares_wrap.cc +++ b/src/cares_wrap.cc @@ -36,6 +36,7 @@ #include #include #include +#include #if defined(__ANDROID__) || \ defined(__MINGW32__) || \ @@ -115,6 +116,72 @@ inline const char* ToErrorCodeString(int status) { return "UNKNOWN_ARES_ERROR"; } +class ChannelWrap; + +struct node_ares_task { + ChannelWrap* channel; + ares_socket_t sock; + uv_poll_t poll_watcher; + RB_ENTRY(node_ares_task) node; +}; + +RB_HEAD(node_ares_task_list, node_ares_task); + +class ChannelWrap : public AsyncWrap { + public: + ChannelWrap(Environment* env, Local object); + ~ChannelWrap(); + + static void New(const FunctionCallbackInfo& args); + + void Setup(); + void EnsureServers(); + + inline uv_timer_t* timer_handle() { return &timer_handle_; } + inline ares_channel cares_channel() { return channel_; } + inline bool query_last_ok() const { return query_last_ok_; } + inline void set_query_last_ok(bool ok) { query_last_ok_ = ok; } + inline bool is_servers_default() const { return is_servers_default_; } + inline void set_is_servers_default(bool is_default) { + is_servers_default_ = is_default; + } + inline node_ares_task_list* task_list() { return &task_list_; } + + size_t self_size() const override { return sizeof(this); } + + static void AresTimeout(uv_timer_t* handle); + + private: + uv_timer_t timer_handle_; + ares_channel channel_; + bool query_last_ok_; + bool is_servers_default_; + bool library_inited_; + node_ares_task_list task_list_; +}; + +ChannelWrap::ChannelWrap(Environment* env, + Local object) + : AsyncWrap(env, object, PROVIDER_DNSCHANNEL), + channel_(nullptr), + query_last_ok_(true), + is_servers_default_(true), + library_inited_(false) { + RB_INIT(&task_list_); + + MakeWeak(this); + + Setup(); +} + +void ChannelWrap::New(const FunctionCallbackInfo& args) { + CHECK(args.IsConstructCall()); + CHECK_EQ(args.Length(), 0); + + Environment* env = Environment::GetCurrent(args); + new ChannelWrap(env, args.This()); +} + class GetAddrInfoReqWrap : public ReqWrap { public: GetAddrInfoReqWrap(Environment* env, Local req_wrap_obj); @@ -168,29 +235,29 @@ RB_GENERATE_STATIC(node_ares_task_list, node_ares_task, node, cmp_ares_tasks) /* This is called once per second by loop->timer. It is used to constantly */ /* call back into c-ares for possibly processing timeouts. */ -void ares_timeout(uv_timer_t* handle) { - Environment* env = Environment::from_cares_timer_handle(handle); - CHECK_EQ(false, RB_EMPTY(env->cares_task_list())); - ares_process_fd(env->cares_channel(), ARES_SOCKET_BAD, ARES_SOCKET_BAD); +void ChannelWrap::AresTimeout(uv_timer_t* handle) { + ChannelWrap* channel = ContainerOf(&ChannelWrap::timer_handle_, handle); + CHECK_EQ(false, RB_EMPTY(channel->task_list())); + ares_process_fd(channel->cares_channel(), ARES_SOCKET_BAD, ARES_SOCKET_BAD); } void ares_poll_cb(uv_poll_t* watcher, int status, int events) { node_ares_task* task = ContainerOf(&node_ares_task::poll_watcher, watcher); - Environment* env = task->env; + ChannelWrap* channel = task->channel; /* Reset the idle timer */ - uv_timer_again(env->cares_timer_handle()); + uv_timer_again(channel->timer_handle()); if (status < 0) { /* An error happened. Just pretend that the socket is both readable and */ /* writable. */ - ares_process_fd(env->cares_channel(), task->sock, task->sock); + ares_process_fd(channel->cares_channel(), task->sock, task->sock); return; } /* Process DNS responses */ - ares_process_fd(env->cares_channel(), + ares_process_fd(channel->cares_channel(), events & UV_READABLE ? task->sock : ARES_SOCKET_BAD, events & UV_WRITABLE ? task->sock : ARES_SOCKET_BAD); } @@ -204,7 +271,7 @@ void ares_poll_close_cb(uv_handle_t* watcher) { /* Allocates and returns a new node_ares_task */ -node_ares_task* ares_task_create(Environment* env, ares_socket_t sock) { +node_ares_task* ares_task_create(ChannelWrap* channel, ares_socket_t sock) { auto task = node::UncheckedMalloc(1); if (task == nullptr) { @@ -212,10 +279,11 @@ node_ares_task* ares_task_create(Environment* env, ares_socket_t sock) { return nullptr; } - task->env = env; + task->channel = channel; task->sock = sock; - if (uv_poll_init_socket(env->event_loop(), &task->poll_watcher, sock) < 0) { + if (uv_poll_init_socket(channel->env()->event_loop(), + &task->poll_watcher, sock) < 0) { /* This should never happen. */ free(task); return nullptr; @@ -230,25 +298,25 @@ void ares_sockstate_cb(void* data, ares_socket_t sock, int read, int write) { - Environment* env = static_cast(data); + ChannelWrap* channel = static_cast(data); node_ares_task* task; node_ares_task lookup_task; lookup_task.sock = sock; - task = RB_FIND(node_ares_task_list, env->cares_task_list(), &lookup_task); + task = RB_FIND(node_ares_task_list, channel->task_list(), &lookup_task); if (read || write) { if (!task) { /* New socket */ /* If this is the first socket then start the timer. */ - uv_timer_t* timer_handle = env->cares_timer_handle(); + uv_timer_t* timer_handle = channel->timer_handle(); if (!uv_is_active(reinterpret_cast(timer_handle))) { - CHECK(RB_EMPTY(env->cares_task_list())); - uv_timer_start(timer_handle, ares_timeout, 1000, 1000); + CHECK(RB_EMPTY(channel->task_list())); + uv_timer_start(timer_handle, ChannelWrap::AresTimeout, 1000, 1000); } - task = ares_task_create(env, sock); + task = ares_task_create(channel, sock); if (task == nullptr) { /* This should never happen unless we're out of memory or something */ /* is seriously wrong. The socket won't be polled, but the query will */ @@ -256,7 +324,7 @@ void ares_sockstate_cb(void* data, return; } - RB_INSERT(node_ares_task_list, env->cares_task_list(), task); + RB_INSERT(node_ares_task_list, channel->task_list(), task); } /* This should never fail. If it fails anyway, the query will eventually */ @@ -272,12 +340,12 @@ void ares_sockstate_cb(void* data, CHECK(task && "When an ares socket is closed we should have a handle for it"); - RB_REMOVE(node_ares_task_list, env->cares_task_list(), task); + RB_REMOVE(node_ares_task_list, channel->task_list(), task); uv_close(reinterpret_cast(&task->poll_watcher), ares_poll_close_cb); - if (RB_EMPTY(env->cares_task_list())) { - uv_timer_stop(env->cares_timer_handle()); + if (RB_EMPTY(channel->task_list())) { + uv_timer_stop(channel->timer_handle()); } } } @@ -409,22 +477,53 @@ struct CaresAsyncData { uv_async_t async_handle; }; -void SetupCaresChannel(Environment* env) { +void ChannelWrap::Setup() { struct ares_options options; memset(&options, 0, sizeof(options)); options.flags = ARES_FLAG_NOCHECKRESP; options.sock_state_cb = ares_sockstate_cb; - options.sock_state_cb_data = env; + options.sock_state_cb_data = this; + + int r; + if (!library_inited_) { + r = ares_library_init(ARES_LIB_INIT_ALL); + if (r != ARES_SUCCESS) + return env()->ThrowError(ToErrorCodeString(r)); + } /* We do the call to ares_init_option for caller. */ - int r = ares_init_options(env->cares_channel_ptr(), - &options, - ARES_OPT_FLAGS | ARES_OPT_SOCK_STATE_CB); + r = ares_init_options(&channel_, + &options, + ARES_OPT_FLAGS | ARES_OPT_SOCK_STATE_CB); if (r != ARES_SUCCESS) { ares_library_cleanup(); - return env->ThrowError(ToErrorCodeString(r)); + return env()->ThrowError(ToErrorCodeString(r)); } + + library_inited_ = true; + + /* Initialize the timeout timer. The timer won't be started until the */ + /* first socket is opened. */ + uv_timer_init(env()->event_loop(), &timer_handle_); + env()->RegisterHandleCleanup( + reinterpret_cast(&timer_handle_), + [](Environment* env, uv_handle_t* handle, void* arg) { + uv_close(handle, [](uv_handle_t* handle) { + ChannelWrap* channel = ContainerOf( + &ChannelWrap::timer_handle_, + reinterpret_cast(handle)); + channel->env()->FinishHandleCleanup(handle); + }); + }, + nullptr); +} + + +ChannelWrap::~ChannelWrap() { + if (library_inited_) + ares_library_cleanup(); + ares_destroy(channel_); } @@ -435,22 +534,21 @@ void SetupCaresChannel(Environment* env) { * The fallback servers of cares is [ "127.0.0.1" ] with no user additional * setting. */ -void AresEnsureServers(Environment* env) { +void ChannelWrap::EnsureServers() { /* if last query is OK or servers are set by user self, do not check */ - if (env->cares_query_last_ok() || !env->cares_is_servers_default()) { + if (query_last_ok_ || !is_servers_default_) { return; } - ares_channel channel = env->cares_channel(); ares_addr_port_node* servers = nullptr; - ares_get_servers_ports(channel, &servers); + ares_get_servers_ports(channel_, &servers); /* if no server or multi-servers, ignore */ if (servers == nullptr) return; if (servers->next != nullptr) { ares_free_data(servers); - env->set_cares_is_servers_default(false); + is_servers_default_ = false; return; } @@ -460,7 +558,7 @@ void AresEnsureServers(Environment* env) { servers[0].tcp_port != 0 || servers[0].udp_port != 0) { ares_free_data(servers); - env->set_cares_is_servers_default(false); + is_servers_default_ = false; return; } @@ -468,19 +566,29 @@ void AresEnsureServers(Environment* env) { servers = nullptr; /* destroy channel and reset channel */ - ares_destroy(channel); + ares_destroy(channel_); - SetupCaresChannel(env); + Setup(); } class QueryWrap : public AsyncWrap { public: - QueryWrap(Environment* env, Local req_wrap_obj) - : AsyncWrap(env, req_wrap_obj, AsyncWrap::PROVIDER_QUERYWRAP) { - if (env->in_domain()) - req_wrap_obj->Set(env->domain_string(), env->domain_array()->Get(0)); + QueryWrap(ChannelWrap* channel, Local req_wrap_obj) + : AsyncWrap(channel->env(), req_wrap_obj, AsyncWrap::PROVIDER_QUERYWRAP), + channel_(channel) { + if (env()->in_domain()) { + req_wrap_obj->Set(env()->domain_string(), + env()->domain_array()->Get(env()->context(), 0) + .ToLocalChecked()); + } + Wrap(req_wrap_obj, this); + + // Make sure the channel object stays alive during the query lifetime. + req_wrap_obj->Set(env()->context(), + env()->channel_string(), + channel->object()).FromJust(); } ~QueryWrap() override { @@ -501,15 +609,12 @@ class QueryWrap : public AsyncWrap { } protected: - void* GetQueryArg() { - return static_cast(this); - } - - static void AresQuery(Environment* env, const char* name, - int dnsclass, int type, ares_callback callback, - void* arg) { - AresEnsureServers(env); - ares_query(env->cares_channel(), name, dnsclass, type, callback, arg); + void AresQuery(const char* name, + int dnsclass, + int type) { + channel_->EnsureServers(); + ares_query(channel_->cares_channel(), name, dnsclass, type, Callback, + static_cast(this)); } static void CaresAsyncClose(uv_handle_t* handle) { @@ -563,7 +668,7 @@ class QueryWrap : public AsyncWrap { async_handle, CaresAsyncCb)); - wrap->env()->set_cares_query_last_ok(status != ARES_ECONNREFUSED); + wrap->channel_->set_query_last_ok(status != ARES_ECONNREFUSED); async_handle->data = data; uv_async_send(async_handle); } @@ -589,7 +694,7 @@ class QueryWrap : public AsyncWrap { async_handle, CaresAsyncCb)); - wrap->env()->set_cares_query_last_ok(status != ARES_ECONNREFUSED); + wrap->channel_->set_query_last_ok(status != ARES_ECONNREFUSED); async_handle->data = data; uv_async_send(async_handle); } @@ -624,6 +729,8 @@ class QueryWrap : public AsyncWrap { virtual void Parse(struct hostent* host) { UNREACHABLE(); } + + ChannelWrap* channel_; }; @@ -1063,17 +1170,12 @@ int ParseSoaReply(Environment* env, class QueryAnyWrap: public QueryWrap { public: - QueryAnyWrap(Environment* env, Local req_wrap_obj) - : QueryWrap(env, req_wrap_obj) { + QueryAnyWrap(ChannelWrap* channel, Local req_wrap_obj) + : QueryWrap(channel, req_wrap_obj) { } int Send(const char* name) override { - ares_query(env()->cares_channel(), - name, - ns_c_in, - ns_t_any, - Callback, - GetQueryArg()); + AresQuery(name, ns_c_in, ns_t_any); return 0; } @@ -1235,12 +1337,12 @@ class QueryAnyWrap: public QueryWrap { class QueryAWrap: public QueryWrap { public: - QueryAWrap(Environment* env, Local req_wrap_obj) - : QueryWrap(env, req_wrap_obj) { + QueryAWrap(ChannelWrap* channel, Local req_wrap_obj) + : QueryWrap(channel, req_wrap_obj) { } int Send(const char* name) override { - AresQuery(env(), name, ns_c_in, ns_t_a, Callback, GetQueryArg()); + AresQuery(name, ns_c_in, ns_t_a); return 0; } @@ -1279,12 +1381,12 @@ class QueryAWrap: public QueryWrap { class QueryAaaaWrap: public QueryWrap { public: - QueryAaaaWrap(Environment* env, Local req_wrap_obj) - : QueryWrap(env, req_wrap_obj) { + QueryAaaaWrap(ChannelWrap* channel, Local req_wrap_obj) + : QueryWrap(channel, req_wrap_obj) { } int Send(const char* name) override { - AresQuery(env(), name, ns_c_in, ns_t_aaaa, Callback, GetQueryArg()); + AresQuery(name, ns_c_in, ns_t_aaaa); return 0; } @@ -1323,12 +1425,12 @@ class QueryAaaaWrap: public QueryWrap { class QueryCnameWrap: public QueryWrap { public: - QueryCnameWrap(Environment* env, Local req_wrap_obj) - : QueryWrap(env, req_wrap_obj) { + QueryCnameWrap(ChannelWrap* channel, Local req_wrap_obj) + : QueryWrap(channel, req_wrap_obj) { } int Send(const char* name) override { - AresQuery(env(), name, ns_c_in, ns_t_cname, Callback, GetQueryArg()); + AresQuery(name, ns_c_in, ns_t_cname); return 0; } @@ -1354,12 +1456,12 @@ class QueryCnameWrap: public QueryWrap { class QueryMxWrap: public QueryWrap { public: - QueryMxWrap(Environment* env, Local req_wrap_obj) - : QueryWrap(env, req_wrap_obj) { + QueryMxWrap(ChannelWrap* channel, Local req_wrap_obj) + : QueryWrap(channel, req_wrap_obj) { } int Send(const char* name) override { - AresQuery(env(), name, ns_c_in, ns_t_mx, Callback, GetQueryArg()); + AresQuery(name, ns_c_in, ns_t_mx); return 0; } @@ -1385,12 +1487,12 @@ class QueryMxWrap: public QueryWrap { class QueryNsWrap: public QueryWrap { public: - QueryNsWrap(Environment* env, Local req_wrap_obj) - : QueryWrap(env, req_wrap_obj) { + QueryNsWrap(ChannelWrap* channel, Local req_wrap_obj) + : QueryWrap(channel, req_wrap_obj) { } int Send(const char* name) override { - AresQuery(env(), name, ns_c_in, ns_t_ns, Callback, GetQueryArg()); + AresQuery(name, ns_c_in, ns_t_ns); return 0; } @@ -1416,12 +1518,12 @@ class QueryNsWrap: public QueryWrap { class QueryTxtWrap: public QueryWrap { public: - QueryTxtWrap(Environment* env, Local req_wrap_obj) - : QueryWrap(env, req_wrap_obj) { + QueryTxtWrap(ChannelWrap* channel, Local req_wrap_obj) + : QueryWrap(channel, req_wrap_obj) { } int Send(const char* name) override { - AresQuery(env(), name, ns_c_in, ns_t_txt, Callback, GetQueryArg()); + AresQuery(name, ns_c_in, ns_t_txt); return 0; } @@ -1446,12 +1548,12 @@ class QueryTxtWrap: public QueryWrap { class QuerySrvWrap: public QueryWrap { public: - explicit QuerySrvWrap(Environment* env, Local req_wrap_obj) - : QueryWrap(env, req_wrap_obj) { + explicit QuerySrvWrap(ChannelWrap* channel, Local req_wrap_obj) + : QueryWrap(channel, req_wrap_obj) { } int Send(const char* name) override { - AresQuery(env(), name, ns_c_in, ns_t_srv, Callback, GetQueryArg()); + AresQuery(name, ns_c_in, ns_t_srv); return 0; } @@ -1475,12 +1577,12 @@ class QuerySrvWrap: public QueryWrap { class QueryPtrWrap: public QueryWrap { public: - explicit QueryPtrWrap(Environment* env, Local req_wrap_obj) - : QueryWrap(env, req_wrap_obj) { + explicit QueryPtrWrap(ChannelWrap* channel, Local req_wrap_obj) + : QueryWrap(channel, req_wrap_obj) { } int Send(const char* name) override { - AresQuery(env(), name, ns_c_in, ns_t_ptr, Callback, GetQueryArg()); + AresQuery(name, ns_c_in, ns_t_ptr); return 0; } @@ -1506,12 +1608,12 @@ class QueryPtrWrap: public QueryWrap { class QueryNaptrWrap: public QueryWrap { public: - explicit QueryNaptrWrap(Environment* env, Local req_wrap_obj) - : QueryWrap(env, req_wrap_obj) { + explicit QueryNaptrWrap(ChannelWrap* channel, Local req_wrap_obj) + : QueryWrap(channel, req_wrap_obj) { } int Send(const char* name) override { - AresQuery(env(), name, ns_c_in, ns_t_naptr, Callback, GetQueryArg()); + AresQuery(name, ns_c_in, ns_t_naptr); return 0; } @@ -1536,12 +1638,12 @@ class QueryNaptrWrap: public QueryWrap { class QuerySoaWrap: public QueryWrap { public: - QuerySoaWrap(Environment* env, Local req_wrap_obj) - : QueryWrap(env, req_wrap_obj) { + QuerySoaWrap(ChannelWrap* channel, Local req_wrap_obj) + : QueryWrap(channel, req_wrap_obj) { } int Send(const char* name) override { - AresQuery(env(), name, ns_c_in, ns_t_soa, Callback, GetQueryArg()); + AresQuery(name, ns_c_in, ns_t_soa); return 0; } @@ -1597,8 +1699,8 @@ class QuerySoaWrap: public QueryWrap { class GetHostByAddrWrap: public QueryWrap { public: - explicit GetHostByAddrWrap(Environment* env, Local req_wrap_obj) - : QueryWrap(env, req_wrap_obj) { + explicit GetHostByAddrWrap(ChannelWrap* channel, Local req_wrap_obj) + : QueryWrap(channel, req_wrap_obj) { } int Send(const char* name) override { @@ -1615,12 +1717,12 @@ class GetHostByAddrWrap: public QueryWrap { return UV_EINVAL; // So errnoException() reports a proper error. } - ares_gethostbyaddr(env()->cares_channel(), + ares_gethostbyaddr(channel_->cares_channel(), address_buffer, length, family, Callback, - GetQueryArg()); + static_cast(static_cast(this))); return 0; } @@ -1637,16 +1739,16 @@ class GetHostByAddrWrap: public QueryWrap { class GetHostByNameWrap: public QueryWrap { public: - explicit GetHostByNameWrap(Environment* env, Local req_wrap_obj) - : QueryWrap(env, req_wrap_obj) { + explicit GetHostByNameWrap(ChannelWrap* channel, Local req_wrap_obj) + : QueryWrap(channel, req_wrap_obj) { } int Send(const char* name, int family) override { - ares_gethostbyname(env()->cares_channel(), + ares_gethostbyname(channel_->cares_channel(), name, family, Callback, - GetQueryArg()); + static_cast(static_cast(this))); return 0; } @@ -1665,6 +1767,8 @@ class GetHostByNameWrap: public QueryWrap { template static void Query(const FunctionCallbackInfo& args) { Environment* env = Environment::GetCurrent(args); + ChannelWrap* channel; + ASSIGN_OR_RETURN_UNWRAP(&channel, args.Holder()); CHECK_EQ(false, args.IsConstructCall()); CHECK(args[0]->IsObject()); @@ -1672,7 +1776,7 @@ static void Query(const FunctionCallbackInfo& args) { Local req_wrap_obj = args[0].As(); Local string = args[1].As(); - Wrap* wrap = new Wrap(env, req_wrap_obj); + Wrap* wrap = new Wrap(channel, req_wrap_obj); node::Utf8Value name(env->isolate(), string); int err = wrap->Send(*name); @@ -1923,12 +2027,14 @@ void GetNameInfo(const FunctionCallbackInfo& args) { void GetServers(const FunctionCallbackInfo& args) { Environment* env = Environment::GetCurrent(args); + ChannelWrap* channel; + ASSIGN_OR_RETURN_UNWRAP(&channel, args.Holder()); Local server_array = Array::New(env->isolate()); ares_addr_port_node* servers; - int r = ares_get_servers_ports(env->cares_channel(), &servers); + int r = ares_get_servers_ports(channel->cares_channel(), &servers); CHECK_EQ(r, ARES_SUCCESS); ares_addr_port_node* cur = servers; @@ -1955,6 +2061,8 @@ void GetServers(const FunctionCallbackInfo& args) { void SetServers(const FunctionCallbackInfo& args) { Environment* env = Environment::GetCurrent(args); + ChannelWrap* channel; + ASSIGN_OR_RETURN_UNWRAP(&channel, args.Holder()); CHECK(args[0]->IsArray()); @@ -1963,11 +2071,11 @@ void SetServers(const FunctionCallbackInfo& args) { uint32_t len = arr->Length(); if (len == 0) { - int rv = ares_set_servers(env->cares_channel(), nullptr); + int rv = ares_set_servers(channel->cares_channel(), nullptr); return args.GetReturnValue().Set(rv); } - ares_addr_port_node* servers = new ares_addr_port_node[len]; + std::vector servers(len); ares_addr_port_node* last = nullptr; int err; @@ -2013,14 +2121,12 @@ void SetServers(const FunctionCallbackInfo& args) { } if (err == 0) - err = ares_set_servers_ports(env->cares_channel(), &servers[0]); + err = ares_set_servers_ports(channel->cares_channel(), &servers[0]); else err = ARES_EBADSTR; - delete[] servers; - if (err == ARES_SUCCESS) - env->set_cares_is_servers_default(false); + channel->set_is_servers_default(false); args.GetReturnValue().Set(err); } @@ -2033,52 +2139,11 @@ void StrError(const FunctionCallbackInfo& args) { } -void CaresTimerCloseCb(uv_handle_t* handle) { - Environment* env = Environment::from_cares_timer_handle( - reinterpret_cast(handle)); - env->FinishHandleCleanup(handle); -} - - -void CaresTimerClose(Environment* env, - uv_handle_t* handle, - void* arg) { - uv_close(handle, CaresTimerCloseCb); -} - - void Initialize(Local target, Local unused, Local context) { Environment* env = Environment::GetCurrent(context); - int r = ares_library_init(ARES_LIB_INIT_ALL); - if (r != ARES_SUCCESS) - return env->ThrowError(ToErrorCodeString(r)); - - SetupCaresChannel(env); - - /* Initialize the timeout timer. The timer won't be started until the */ - /* first socket is opened. */ - uv_timer_init(env->event_loop(), env->cares_timer_handle()); - env->RegisterHandleCleanup( - reinterpret_cast(env->cares_timer_handle()), - CaresTimerClose, - nullptr); - - env->SetMethod(target, "queryAny", Query); - env->SetMethod(target, "queryA", Query); - env->SetMethod(target, "queryAaaa", Query); - env->SetMethod(target, "queryCname", Query); - env->SetMethod(target, "queryMx", Query); - env->SetMethod(target, "queryNs", Query); - env->SetMethod(target, "queryTxt", Query); - env->SetMethod(target, "querySrv", Query); - env->SetMethod(target, "queryPtr", Query); - env->SetMethod(target, "queryNaptr", Query); - env->SetMethod(target, "querySoa", Query); - env->SetMethod(target, "getHostByAddr", Query); - env->SetMethod(target, "getaddrinfo", GetAddrInfo); env->SetMethod(target, "getnameinfo", GetNameInfo); env->SetMethod(target, "isIP", IsIP); @@ -2086,8 +2151,6 @@ void Initialize(Local target, env->SetMethod(target, "isIPv6", IsIPv6); env->SetMethod(target, "strerror", StrError); - env->SetMethod(target, "getServers", GetServers); - env->SetMethod(target, "setServers", SetServers); target->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "AF_INET"), Integer::New(env->isolate(), AF_INET)); @@ -2131,6 +2194,32 @@ void Initialize(Local target, FIXED_ONE_BYTE_STRING(env->isolate(), "QueryReqWrap")); target->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "QueryReqWrap"), qrw->GetFunction()); + + Local channel_wrap = + env->NewFunctionTemplate(ChannelWrap::New); + channel_wrap->InstanceTemplate()->SetInternalFieldCount(1); + env->SetProtoMethod(channel_wrap, "getAsyncId", AsyncWrap::GetAsyncId); + + env->SetProtoMethod(channel_wrap, "queryAny", Query); + env->SetProtoMethod(channel_wrap, "queryA", Query); + env->SetProtoMethod(channel_wrap, "queryAaaa", Query); + env->SetProtoMethod(channel_wrap, "queryCname", Query); + env->SetProtoMethod(channel_wrap, "queryMx", Query); + env->SetProtoMethod(channel_wrap, "queryNs", Query); + env->SetProtoMethod(channel_wrap, "queryTxt", Query); + env->SetProtoMethod(channel_wrap, "querySrv", Query); + env->SetProtoMethod(channel_wrap, "queryPtr", Query); + env->SetProtoMethod(channel_wrap, "queryNaptr", Query); + env->SetProtoMethod(channel_wrap, "querySoa", Query); + env->SetProtoMethod(channel_wrap, "getHostByAddr", Query); + + env->SetProtoMethod(channel_wrap, "getServers", GetServers); + env->SetProtoMethod(channel_wrap, "setServers", SetServers); + + channel_wrap->SetClassName( + FIXED_ONE_BYTE_STRING(env->isolate(), "ChannelWrap")); + target->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "ChannelWrap"), + channel_wrap->GetFunction()); } } // anonymous namespace diff --git a/src/env-inl.h b/src/env-inl.h index e160fe27d8d5fc..6753979ef57bf5 100644 --- a/src/env-inl.h +++ b/src/env-inl.h @@ -292,8 +292,6 @@ inline Environment::Environment(IsolateData* isolate_data, isolate_data_(isolate_data), async_hooks_(context->GetIsolate()), timer_base_(uv_now(isolate_data->event_loop())), - cares_query_last_ok_(true), - cares_is_servers_default_(true), using_domains_(false), printed_error_(false), trace_sync_io_(false), @@ -313,7 +311,6 @@ inline Environment::Environment(IsolateData* isolate_data, set_binding_cache_object(v8::Object::New(isolate())); set_module_load_list_array(v8::Array::New(isolate())); - RB_INIT(&cares_task_list_); AssignToContext(context); destroy_ids_list_.reserve(512); @@ -490,43 +487,6 @@ inline void Environment::set_fs_stats_field_array(double* fields) { fs_stats_field_array_ = fields; } -inline Environment* Environment::from_cares_timer_handle(uv_timer_t* handle) { - return ContainerOf(&Environment::cares_timer_handle_, handle); -} - -inline uv_timer_t* Environment::cares_timer_handle() { - return &cares_timer_handle_; -} - -inline ares_channel Environment::cares_channel() { - return cares_channel_; -} - -// Only used in the call to ares_init_options(). -inline ares_channel* Environment::cares_channel_ptr() { - return &cares_channel_; -} - -inline bool Environment::cares_query_last_ok() { - return cares_query_last_ok_; -} - -inline void Environment::set_cares_query_last_ok(bool ok) { - cares_query_last_ok_ = ok; -} - -inline bool Environment::cares_is_servers_default() { - return cares_is_servers_default_; -} - -inline void Environment::set_cares_is_servers_default(bool is_default) { - cares_is_servers_default_ = is_default; -} - -inline node_ares_task_list* Environment::cares_task_list() { - return &cares_task_list_; -} - inline IsolateData* Environment::isolate_data() const { return isolate_data_; } diff --git a/src/env.h b/src/env.h index a0f4c30e8dd4b9..e1375080d17f07 100644 --- a/src/env.h +++ b/src/env.h @@ -97,6 +97,7 @@ namespace node { V(cached_data_rejected_string, "cachedDataRejected") \ V(callback_string, "callback") \ V(change_string, "change") \ + V(channel_string, "channel") \ V(oncertcb_string, "oncertcb") \ V(onclose_string, "_onclose") \ V(code_string, "code") \ @@ -298,20 +299,11 @@ namespace node { class Environment; -struct node_ares_task { - Environment* env; - ares_socket_t sock; - uv_poll_t poll_watcher; - RB_ENTRY(node_ares_task) node; -}; - struct node_async_ids { double async_id; double trigger_id; }; -RB_HEAD(node_ares_task_list, node_ares_task); - class IsolateData { public: inline IsolateData(v8::Isolate* isolate, uv_loop_t* event_loop, @@ -557,15 +549,6 @@ class Environment { inline TickInfo* tick_info(); inline uint64_t timer_base() const; - static inline Environment* from_cares_timer_handle(uv_timer_t* handle); - inline uv_timer_t* cares_timer_handle(); - inline ares_channel cares_channel(); - inline ares_channel* cares_channel_ptr(); - inline bool cares_query_last_ok(); - inline void set_cares_query_last_ok(bool ok); - inline bool cares_is_servers_default(); - inline void set_cares_is_servers_default(bool is_default); - inline node_ares_task_list* cares_task_list(); inline IsolateData* isolate_data() const; inline bool using_domains() const; @@ -685,11 +668,6 @@ class Environment { DomainFlag domain_flag_; TickInfo tick_info_; const uint64_t timer_base_; - uv_timer_t cares_timer_handle_; - ares_channel cares_channel_; - bool cares_query_last_ok_; - bool cares_is_servers_default_; - node_ares_task_list cares_task_list_; bool using_domains_; bool printed_error_; bool trace_sync_io_; diff --git a/test/parallel/test-async-wrap-getasyncid.js b/test/parallel/test-async-wrap-getasyncid.js index a693f94efbb9d1..57d6f86ebe5ca8 100644 --- a/test/parallel/test-async-wrap-getasyncid.js +++ b/test/parallel/test-async-wrap-getasyncid.js @@ -51,6 +51,7 @@ function testInitialized(req, ctor_name) { testInitialized(dns.lookup('www.google.com', () => {}), 'GetAddrInfoReqWrap'); testInitialized(dns.lookupService('::1', 22, () => {}), 'GetNameInfoReqWrap'); testInitialized(dns.resolve6('::1', () => {}), 'QueryReqWrap'); + testInitialized(new cares.ChannelWrap(), 'ChannelWrap'); } From 69e41dc5dac2fa23f1fde9ba289c9e4605b6f029 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Thu, 27 Jul 2017 18:54:20 +0200 Subject: [PATCH 112/157] dns: enable usage of independent cares resolvers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ref: https://github.com/nodejs/node/issues/7231 PR-URL: https://github.com/nodejs/node/pull/14518 Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Tobias Nießen --- doc/api/dns.md | 45 ++++++++++++++ lib/dns.js | 83 ++++++++++++++----------- test/parallel/test-dns-multi-channel.js | 53 ++++++++++++++++ 3 files changed, 145 insertions(+), 36 deletions(-) create mode 100644 test/parallel/test-dns-multi-channel.js diff --git a/doc/api/dns.md b/doc/api/dns.md index d0d3071cc8d203..e9de95c118c573 100644 --- a/doc/api/dns.md +++ b/doc/api/dns.md @@ -54,6 +54,47 @@ dns.resolve4('archive.org', (err, addresses) => { There are subtle consequences in choosing one over the other, please consult the [Implementation considerations section][] for more information. +## Class dns.Resolver + + +An independent resolver for DNS requests. + +Note that creating a new resolver uses the default server settings. Setting +the servers used for a resolver using +[`resolver.setServers()`][`dns.setServers()`] does not affect +other resolver: + +```js +const { Resolver } = require('dns'); +const resolver = new Resolver(); +resolver.setServers(['4.4.4.4']); + +// This request will use the server at 4.4.4.4, independent of global settings. +resolver.resolve4('example.org', (err, addresses) => { + // ... +}); +``` + +The following methods from the `dns` module are available: + +* [`resolver.getServers()`][`dns.getServers()`] +* [`resolver.setServers()`][`dns.setServers()`] +* [`resolver.resolve()`][`dns.resolve()`] +* [`resolver.resolve4()`][`dns.resolve4()`] +* [`resolver.resolve6()`][`dns.resolve6()`] +* [`resolver.resolveAny()`][`dns.resolveAny()`] +* [`resolver.resolveCname()`][`dns.resolveCname()`] +* [`resolver.resolveMx()`][`dns.resolveMx()`] +* [`resolver.resolveNaptr()`][`dns.resolveNaptr()`] +* [`resolver.resolveNs()`][`dns.resolveNs()`] +* [`resolver.resolvePtr()`][`dns.resolvePtr()`] +* [`resolver.resolveSoa()`][`dns.resolveSoa()`] +* [`resolver.resolveSrv()`][`dns.resolveSrv()`] +* [`resolver.resolveTxt()`][`dns.resolveTxt()`] +* [`resolver.reverse()`][`dns.reverse()`] + ## dns.getServers() + +Cancel all outstanding DNS queries made by this resolver. The corresponding +callbacks will be called with an error with code `ECANCELLED`. + ## dns.getServers() +```js +const Countdown = require('../common/countdown'); + +function doSomething() { + console.log('.'); +} + +const countdown = new Countdown(2, doSomething); +countdown.dec(); +countdown.dec(); +``` + +### new Countdown(limit, callback) + +* `limit` {number} +* `callback` {function} + +Creates a new `Countdown` instance. + +### Countdown.prototype.dec() + +Decrements the `Countdown` counter. + +### Coutndown.prototype.remaining + +Specifies the remaining number of times `Countdown.prototype.dec()` must be +called before the callback is invoked. + ## WPT Module The wpt.js module is a port of parts of diff --git a/test/common/countdown.js b/test/common/countdown.js new file mode 100644 index 00000000000000..6a22be0a07eb0b --- /dev/null +++ b/test/common/countdown.js @@ -0,0 +1,27 @@ +/* eslint-disable required-modules */ +'use strict'; + +const assert = require('assert'); +const kLimit = Symbol('limit'); +const kCallback = Symbol('callback'); + +class Countdown { + constructor(limit, cb) { + assert.strictEqual(typeof limit, 'number'); + assert.strictEqual(typeof cb, 'function'); + this[kLimit] = limit; + this[kCallback] = cb; + } + + dec() { + assert(this[kLimit] > 0, 'Countdown expired'); + if (--this[kLimit] === 0) + this[kCallback](); + } + + get remaining() { + return this[kLimit]; + } +} + +module.exports = Countdown; diff --git a/test/parallel/test-common-countdown.js b/test/parallel/test-common-countdown.js new file mode 100644 index 00000000000000..ec0543f36fec74 --- /dev/null +++ b/test/parallel/test-common-countdown.js @@ -0,0 +1,15 @@ +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const Countdown = require('../common/countdown'); + +let done = ''; + +const countdown = new Countdown(2, common.mustCall(() => done = true)); +assert.strictEqual(countdown.remaining, 2); +countdown.dec(); +assert.strictEqual(countdown.remaining, 1); +countdown.dec(); +assert.strictEqual(countdown.remaining, 0); +assert.strictEqual(done, true); diff --git a/test/parallel/test-http-abort-client.js b/test/parallel/test-http-abort-client.js index 644b73f2c9995d..eda08ced97c55c 100644 --- a/test/parallel/test-http-abort-client.js +++ b/test/parallel/test-http-abort-client.js @@ -24,42 +24,24 @@ const common = require('../common'); const http = require('http'); let serverRes; -const server = http.Server(function(req, res) { - console.log('Server accepted request.'); +const server = http.Server((req, res) => { serverRes = res; res.writeHead(200); res.write('Part of my res.'); }); -server.listen(0, common.mustCall(function() { +server.listen(0, common.mustCall(() => { http.get({ - port: this.address().port, + port: server.address().port, headers: { connection: 'keep-alive' } - }, common.mustCall(function(res) { + }, common.mustCall((res) => { server.close(); serverRes.destroy(); - console.log(`Got res: ${res.statusCode}`); - console.dir(res.headers); - - res.on('data', function(chunk) { - console.log(`Read ${chunk.length} bytes`); - console.log(' chunk=%j', chunk.toString()); - }); - - res.on('end', function() { - console.log('Response ended.'); - }); - - res.on('aborted', function() { - console.log('Response aborted.'); - }); - - res.socket.on('close', function() { - console.log('socket closed, but not res'); - }); - - // it would be nice if this worked: + res.resume(); + res.on('end', common.mustCall()); + res.on('aborted', common.mustCall()); res.on('close', common.mustCall()); + res.socket.on('close', common.mustCall()); })); })); diff --git a/test/parallel/test-http-abort-queued.js b/test/parallel/test-http-abort-queued.js index 788ec8c4f33ac8..224d0b606ea744 100644 --- a/test/parallel/test-http-abort-queued.js +++ b/test/parallel/test-http-abort-queued.js @@ -20,13 +20,13 @@ // USE OR OTHER DEALINGS IN THE SOFTWARE. 'use strict'; -require('../common'); +const common = require('../common'); const assert = require('assert'); const http = require('http'); let complete; -const server = http.createServer(function(req, res) { +const server = http.createServer((req, res) => { // We should not see the queued /thatotherone request within the server // as it should be aborted before it is sent. assert.strictEqual(req.url, '/'); @@ -40,10 +40,8 @@ const server = http.createServer(function(req, res) { }); -server.listen(0, function() { - console.log('listen', server.address().port); - - const agent = new http.Agent({maxSockets: 1}); +server.listen(0, () => { + const agent = new http.Agent({ maxSockets: 1 }); assert.strictEqual(Object.keys(agent.sockets).length, 0); const options = { @@ -55,7 +53,7 @@ server.listen(0, function() { }; const req1 = http.request(options); - req1.on('response', function(res1) { + req1.on('response', (res1) => { assert.strictEqual(Object.keys(agent.sockets).length, 1); assert.strictEqual(Object.keys(agent.requests).length, 0); @@ -69,7 +67,9 @@ server.listen(0, function() { assert.strictEqual(Object.keys(agent.sockets).length, 1); assert.strictEqual(Object.keys(agent.requests).length, 1); - req2.on('error', function(err) { + // TODO(jasnell): This event does not appear to currently be triggered. + // is this handler actually required? + req2.on('error', (err) => { // This is expected in response to our explicit abort call assert.strictEqual(err.code, 'ECONNRESET'); }); @@ -80,25 +80,16 @@ server.listen(0, function() { assert.strictEqual(Object.keys(agent.sockets).length, 1); assert.strictEqual(Object.keys(agent.requests).length, 1); - console.log(`Got res: ${res1.statusCode}`); - console.dir(res1.headers); - - res1.on('data', function(chunk) { - console.log(`Read ${chunk.length} bytes`); - console.log(' chunk=%j', chunk.toString()); - complete(); - }); + res1.on('data', (chunk) => complete()); - res1.on('end', function() { - console.log('Response ended.'); - - setTimeout(function() { + res1.on('end', common.mustCall(() => { + setTimeout(common.mustCall(() => { assert.strictEqual(Object.keys(agent.sockets).length, 0); assert.strictEqual(Object.keys(agent.requests).length, 0); server.close(); - }, 100); - }); + }), 100); + })); }); req1.end(); diff --git a/test/parallel/test-http-abort-stream-end.js b/test/parallel/test-http-abort-stream-end.js index 8f89aeffff2cd0..1610c5ae6d44ad 100644 --- a/test/parallel/test-http-abort-stream-end.js +++ b/test/parallel/test-http-abort-stream-end.js @@ -20,7 +20,7 @@ // USE OR OTHER DEALINGS IN THE SOFTWARE. 'use strict'; -require('../common'); +const common = require('../common'); const assert = require('assert'); const http = require('http'); @@ -28,20 +28,21 @@ const http = require('http'); const maxSize = 1024; let size = 0; -const s = http.createServer(function(req, res) { - this.close(); +const server = http.createServer(common.mustCall((req, res) => { + server.close(); res.writeHead(200, {'Content-Type': 'text/plain'}); for (let i = 0; i < maxSize; i++) { - res.write('x' + i); + res.write(`x${i}`); } res.end(); -}); +})); let aborted = false; -s.listen(0, function() { - const req = http.get('http://localhost:' + s.address().port, function(res) { - res.on('data', function(chunk) { +server.listen(0, () => { + + const res = common.mustCall((res) => { + res.on('data', (chunk) => { size += chunk.length; assert(!aborted, 'got data after abort'); if (size > maxSize) { @@ -50,11 +51,9 @@ s.listen(0, function() { size = maxSize; } }); + + req.on('abort', common.mustCall(() => assert.strictEqual(size, maxSize))); }); -}); -process.on('exit', function() { - assert(aborted); - assert.strictEqual(size, maxSize); - console.log('ok'); + const req = http.get(`http://localhost:${server.address().port}`, res); }); diff --git a/test/parallel/test-http-after-connect.js b/test/parallel/test-http-after-connect.js index d8a711c8d69a26..324186bab72324 100644 --- a/test/parallel/test-http-after-connect.js +++ b/test/parallel/test-http-after-connect.js @@ -23,61 +23,51 @@ const common = require('../common'); const assert = require('assert'); const http = require('http'); +const Countdown = require('../common/countdown'); -let clientResponses = 0; - -const server = http.createServer(common.mustCall(function(req, res) { - console.error('Server got GET request'); +const server = http.createServer(common.mustCall((req, res) => { req.resume(); res.writeHead(200); res.write(''); - setTimeout(function() { - res.end(req.url); - }, 50); + setTimeout(() => res.end(req.url), 50); }, 2)); -server.on('connect', common.mustCall(function(req, socket) { - console.error('Server got CONNECT request'); + +const countdown = new Countdown(2, common.mustCall(() => server.close())); + +server.on('connect', common.mustCall((req, socket) => { socket.write('HTTP/1.1 200 Connection established\r\n\r\n'); socket.resume(); - socket.on('end', function() { - socket.end(); - }); + socket.on('end', () => socket.end()); })); -server.listen(0, function() { + +server.listen(0, common.mustCall(() => { const req = http.request({ - port: this.address().port, + port: server.address().port, method: 'CONNECT', path: 'google.com:80' }); - req.on('connect', common.mustCall(function(res, socket) { - console.error('Client got CONNECT response'); + req.on('connect', common.mustCall((res, socket) => { socket.end(); - socket.on('end', function() { + socket.on('end', common.mustCall(() => { doRequest(0); doRequest(1); - }); + })); socket.resume(); })); req.end(); -}); +})); function doRequest(i) { http.get({ port: server.address().port, path: `/request${i}` - }, common.mustCall(function(res) { - console.error('Client got GET response'); + }, common.mustCall((res) => { let data = ''; res.setEncoding('utf8'); - res.on('data', function(chunk) { - data += chunk; - }); - res.on('end', function() { + res.on('data', (chunk) => data += chunk); + res.on('end', common.mustCall(() => { assert.strictEqual(data, `/request${i}`); - ++clientResponses; - if (clientResponses === 2) { - server.close(); - } - }); + countdown.dec(); + })); })); } diff --git a/test/parallel/test-http-agent-destroyed-socket.js b/test/parallel/test-http-agent-destroyed-socket.js index 322373e69cdd4e..7970ce8bae0fcb 100644 --- a/test/parallel/test-http-agent-destroyed-socket.js +++ b/test/parallel/test-http-agent-destroyed-socket.js @@ -23,35 +23,30 @@ const common = require('../common'); const assert = require('assert'); const http = require('http'); +const Countdown = require('../common/countdown'); -const server = http.createServer(function(req, res) { - res.writeHead(200, {'Content-Type': 'text/plain'}); +const server = http.createServer(common.mustCall((req, res) => { + res.writeHead(200, { 'Content-Type': 'text/plain' }); res.end('Hello World\n'); -}).listen(0, common.mustCall(function() { - const agent = new http.Agent({maxSockets: 1}); +}, 2)).listen(0, common.mustCall(() => { + const agent = new http.Agent({ maxSockets: 1 }); - agent.on('free', function(socket) { - console.log('freeing socket. destroyed? ', socket.destroyed); - }); + agent.on('free', common.mustCall(3)); const requestOptions = { agent: agent, host: 'localhost', - port: this.address().port, + port: server.address().port, path: '/' }; - const request1 = http.get(requestOptions, common.mustCall(function(response) { + const request1 = http.get(requestOptions, common.mustCall((response) => { // assert request2 is queued in the agent const key = agent.getName(requestOptions); assert.strictEqual(agent.requests[key].length, 1); - console.log('got response1'); - request1.socket.on('close', function() { - console.log('request1 socket closed'); - }); - response.pipe(process.stdout); - response.on('end', common.mustCall(function() { - console.log('response1 done'); + request1.socket.on('close', common.mustCall()); + response.resume(); + response.on('end', common.mustCall(() => { ///////////////////////////////// // // THE IMPORTANT PART @@ -65,43 +60,29 @@ const server = http.createServer(function(req, res) { // is triggered. request1.socket.destroy(); - response.once('close', function() { + // TODO(jasnell): This close event does not appear to be triggered. + // is it necessary? + response.once('close', () => { // assert request2 was removed from the queue assert(!agent.requests[key]); - console.log("waiting for request2.onSocket's nextTick"); - process.nextTick(common.mustCall(function() { + process.nextTick(() => { // assert that the same socket was not assigned to request2, // since it was destroyed. assert.notStrictEqual(request1.socket, request2.socket); assert(!request2.socket.destroyed, 'the socket is destroyed'); - })); + }); }); })); })); - const request2 = http.get(requestOptions, common.mustCall(function(response) { + const request2 = http.get(requestOptions, common.mustCall((response) => { assert(!request2.socket.destroyed); assert(request1.socket.destroyed); // assert not reusing the same socket, since it was destroyed. assert.notStrictEqual(request1.socket, request2.socket); - console.log('got response2'); - let gotClose = false; - let gotResponseEnd = false; - request2.socket.on('close', function() { - console.log('request2 socket closed'); - gotClose = true; - done(); - }); - response.pipe(process.stdout); - response.on('end', function() { - console.log('response2 done'); - gotResponseEnd = true; - done(); - }); - - function done() { - if (gotResponseEnd && gotClose) - server.close(); - } + const countdown = new Countdown(2, common.mustCall(() => server.close())); + request2.socket.on('close', common.mustCall(() => countdown.dec())); + response.on('end', common.mustCall(() => countdown.dec())); + response.resume(); })); })); diff --git a/test/parallel/test-http-agent-error-on-idle.js b/test/parallel/test-http-agent-error-on-idle.js index 2f270c0d30ca0b..fce5e8f0324f5c 100644 --- a/test/parallel/test-http-agent-error-on-idle.js +++ b/test/parallel/test-http-agent-error-on-idle.js @@ -1,32 +1,31 @@ 'use strict'; -require('../common'); + +const common = require('../common'); const assert = require('assert'); const http = require('http'); const Agent = http.Agent; -const server = http.createServer(function(req, res) { +const server = http.createServer(common.mustCall((req, res) => { res.end('hello world'); -}); +}, 2)); -server.listen(0, function() { - const agent = new Agent({ - keepAlive: true, - }); +server.listen(0, () => { + const agent = new Agent({ keepAlive: true }); const requestParams = { host: 'localhost', - port: this.address().port, + port: server.address().port, agent: agent, path: '/' }; const socketKey = agent.getName(requestParams); - get(function(res) { + http.get(requestParams, common.mustCall((res) => { assert.strictEqual(res.statusCode, 200); res.resume(); - res.on('end', function() { - process.nextTick(function() { + res.on('end', common.mustCall(() => { + process.nextTick(common.mustCall(() => { const freeSockets = agent.freeSockets[socketKey]; assert.strictEqual(freeSockets.length, 1, `expect a free socket on ${socketKey}`); @@ -35,14 +34,10 @@ server.listen(0, function() { const freeSocket = freeSockets[0]; freeSocket.emit('error', new Error('ECONNRESET: test')); - get(done); - }); - }); - }); - - function get(callback) { - return http.get(requestParams, callback); - } + http.get(requestParams, done); + })); + })); + })); function done() { assert.strictEqual(Object.keys(agent.freeSockets).length, 0, @@ -50,6 +45,5 @@ server.listen(0, function() { agent.destroy(); server.close(); - process.exit(0); } }); diff --git a/test/parallel/test-http-agent-false.js b/test/parallel/test-http-agent-false.js index 0e633c7c103b76..4d92d5e01e03e2 100644 --- a/test/parallel/test-http-agent-false.js +++ b/test/parallel/test-http-agent-false.js @@ -20,8 +20,7 @@ // USE OR OTHER DEALINGS IN THE SOFTWARE. 'use strict'; -require('../common'); -const assert = require('assert'); +const common = require('../common'); const http = require('http'); // sending `agent: false` when `port: null` is also passed in (i.e. the result @@ -35,20 +34,13 @@ const opts = { agent: false }; -let good = false; -process.on('exit', function() { - assert(good, 'expected either an "error" or "response" event'); -}); - // we just want an "error" (no local HTTP server on port 80) or "response" // to happen (user happens ot have HTTP server running on port 80). // As long as the process doesn't crash from a C++ assertion then we're good. const req = http.request(opts); -req.on('response', function(res) { - good = true; -}); -req.on('error', function(err) { - // an "error" event is ok, don't crash the process - good = true; -}); + +// Will be called by either the response event or error event, not both +const oneResponse = common.mustCall(); +req.on('response', oneResponse); +req.on('error', oneResponse); req.end(); diff --git a/test/parallel/test-http-agent-keepalive.js b/test/parallel/test-http-agent-keepalive.js index c695b55bfa5ee7..2c8b6c1cc98d2d 100644 --- a/test/parallel/test-http-agent-keepalive.js +++ b/test/parallel/test-http-agent-keepalive.js @@ -34,19 +34,17 @@ const agent = new Agent({ maxFreeSockets: 5 }); -const server = http.createServer(function(req, res) { +const server = http.createServer(common.mustCall((req, res) => { if (req.url === '/error') { res.destroy(); return; } else if (req.url === '/remote_close') { // cache the socket, close it after a short delay const socket = res.connection; - setImmediate(function() { - socket.end(); - }); + setImmediate(common.mustCall(() => socket.end())); } res.end('hello world'); -}); +}, 4)); function get(path, callback) { return http.get({ @@ -65,82 +63,75 @@ function checkDataAndSockets(body) { function second() { // request second, use the same socket - get('/second', function(res) { + get('/second', common.mustCall((res) => { assert.strictEqual(res.statusCode, 200); res.on('data', checkDataAndSockets); - res.on('end', function() { + res.on('end', common.mustCall(() => { assert.strictEqual(agent.sockets[name].length, 1); assert.strictEqual(agent.freeSockets[name], undefined); - process.nextTick(function() { + process.nextTick(common.mustCall(() => { assert.strictEqual(agent.sockets[name], undefined); assert.strictEqual(agent.freeSockets[name].length, 1); remoteClose(); - }); - }); - }); + })); + })); + })); } function remoteClose() { // mock remote server close the socket - get('/remote_close', function(res) { + get('/remote_close', common.mustCall((res) => { assert.deepStrictEqual(res.statusCode, 200); res.on('data', checkDataAndSockets); - res.on('end', function() { + res.on('end', common.mustCall(() => { assert.strictEqual(agent.sockets[name].length, 1); assert.strictEqual(agent.freeSockets[name], undefined); - process.nextTick(function() { + process.nextTick(common.mustCall(() => { assert.strictEqual(agent.sockets[name], undefined); assert.strictEqual(agent.freeSockets[name].length, 1); // waitting remote server close the socket - setTimeout(function() { + setTimeout(common.mustCall(() => { assert.strictEqual(agent.sockets[name], undefined); assert.strictEqual(agent.freeSockets[name], undefined, 'freeSockets is not empty'); remoteError(); - }, common.platformTimeout(200)); - }); - }); - }); + }), common.platformTimeout(200)); + })); + })); + })); } function remoteError() { // remove server will destroy ths socket - const req = get('/error', function(res) { - throw new Error('should not call this function'); - }); - req.on('error', function(err) { - assert.ok(err); + const req = get('/error', common.mustNotCall()); + req.on('error', common.mustCall((err) => { + assert(err); assert.strictEqual(err.message, 'socket hang up'); assert.strictEqual(agent.sockets[name].length, 1); assert.strictEqual(agent.freeSockets[name], undefined); // Wait socket 'close' event emit - setTimeout(function() { + setTimeout(common.mustCall(() => { assert.strictEqual(agent.sockets[name], undefined); assert.strictEqual(agent.freeSockets[name], undefined); - done(); - }, common.platformTimeout(1)); - }); -} - -function done() { - console.log('http keepalive agent test success.'); - process.exit(0); + server.close(); + }), common.platformTimeout(1)); + })); } -server.listen(0, function() { +server.listen(0, common.mustCall(() => { name = `localhost:${server.address().port}:`; // request first, and keep alive - get('/first', function(res) { + get('/first', common.mustCall((res) => { assert.strictEqual(res.statusCode, 200); res.on('data', checkDataAndSockets); - res.on('end', function() { + res.on('end', common.mustCall(() => { assert.strictEqual(agent.sockets[name].length, 1); assert.strictEqual(agent.freeSockets[name], undefined); - process.nextTick(function() { + process.nextTick(common.mustCall(() => { assert.strictEqual(agent.sockets[name], undefined); assert.strictEqual(agent.freeSockets[name].length, 1); second(); - }); - }); - }); -}); + })); + })); + })); +})); diff --git a/test/parallel/test-http-agent-maxsockets-regress-4050.js b/test/parallel/test-http-agent-maxsockets-regress-4050.js index fd3a8c33f3e39a..57a90e4b05c79f 100644 --- a/test/parallel/test-http-agent-maxsockets-regress-4050.js +++ b/test/parallel/test-http-agent-maxsockets-regress-4050.js @@ -1,7 +1,8 @@ 'use strict'; -require('../common'); +const common = require('../common'); const assert = require('assert'); const http = require('http'); +const Countdown = require('../common/countdown'); const MAX_SOCKETS = 2; @@ -12,9 +13,11 @@ const agent = new http.Agent({ maxFreeSockets: 2 }); -const server = http.createServer(function(req, res) { +const server = http.createServer(common.mustCall((req, res) => { res.end('hello world'); -}); +}, 6)); + +const countdown = new Countdown(6, common.mustCall(() => server.close())); function get(path, callback) { return http.get({ @@ -25,19 +28,14 @@ function get(path, callback) { }, callback); } -server.listen(0, function() { - let finished = 0; - const num_requests = 6; - for (let i = 0; i < num_requests; i++) { - const request = get('/1', function() { - }); - request.on('response', function() { +server.listen(0, common.mustCall(() => { + for (let i = 0; i < 6; i++) { + const request = get('/1', common.mustCall()); + request.on('response', common.mustCall(() => { request.abort(); const sockets = agent.sockets[Object.keys(agent.sockets)[0]]; assert(sockets.length <= MAX_SOCKETS); - if (++finished === num_requests) { - server.close(); - } - }); + countdown.dec(); + })); } -}); +})); diff --git a/test/parallel/test-http-agent-maxsockets.js b/test/parallel/test-http-agent-maxsockets.js index 513906160048d9..66fffba250513f 100644 --- a/test/parallel/test-http-agent-maxsockets.js +++ b/test/parallel/test-http-agent-maxsockets.js @@ -1,7 +1,8 @@ 'use strict'; -require('../common'); +const common = require('../common'); const assert = require('assert'); const http = require('http'); +const Countdown = require('../common/countdown'); const agent = new http.Agent({ keepAlive: true, @@ -10,9 +11,9 @@ const agent = new http.Agent({ maxFreeSockets: 2 }); -const server = http.createServer(function(req, res) { +const server = http.createServer(common.mustCall((req, res) => { res.end('hello world'); -}); +}, 2)); function get(path, callback) { return http.get({ @@ -23,32 +24,25 @@ function get(path, callback) { }, callback); } -let count = 0; -function done() { - if (++count !== 2) { - return; - } +const countdown = new Countdown(2, common.mustCall(() => { const freepool = agent.freeSockets[Object.keys(agent.freeSockets)[0]]; assert.strictEqual(freepool.length, 2, `expect keep 2 free sockets, but got ${freepool.length}`); agent.destroy(); server.close(); +})); + +function dec() { + process.nextTick(() => countdown.dec()); } -server.listen(0, function() { - get('/1', function(res) { - assert.strictEqual(res.statusCode, 200); - res.resume(); - res.on('end', function() { - process.nextTick(done); - }); - }); +function onGet(res) { + assert.strictEqual(res.statusCode, 200); + res.resume(); + res.on('end', common.mustCall(dec)); +} - get('/2', function(res) { - assert.strictEqual(res.statusCode, 200); - res.resume(); - res.on('end', function() { - process.nextTick(done); - }); - }); -}); +server.listen(0, common.mustCall(() => { + get('/1', common.mustCall(onGet)); + get('/2', common.mustCall(onGet)); +})); diff --git a/test/parallel/test-http-agent-no-protocol.js b/test/parallel/test-http-agent-no-protocol.js index 4630ef8ee6388d..b5a144abc93d9e 100644 --- a/test/parallel/test-http-agent-no-protocol.js +++ b/test/parallel/test-http-agent-no-protocol.js @@ -24,17 +24,17 @@ const common = require('../common'); const http = require('http'); const url = require('url'); -const server = http.createServer(common.mustCall(function(req, res) { +const server = http.createServer(common.mustCall((req, res) => { res.end(); -})).listen(0, '127.0.0.1', common.mustCall(function() { - const opts = url.parse(`http://127.0.0.1:${this.address().port}/`); +})).listen(0, '127.0.0.1', common.mustCall(() => { + const opts = url.parse(`http://127.0.0.1:${server.address().port}/`); // remove the `protocol` field… the `http` module should fall back // to "http:", as defined by the global, default `http.Agent` instance. opts.agent = new http.Agent(); opts.agent.protocol = null; - http.get(opts, common.mustCall(function(res) { + http.get(opts, common.mustCall((res) => { res.resume(); server.close(); })); diff --git a/test/parallel/test-http-agent-null.js b/test/parallel/test-http-agent-null.js index 784dc32211c807..0f87d098134b50 100644 --- a/test/parallel/test-http-agent-null.js +++ b/test/parallel/test-http-agent-null.js @@ -23,14 +23,14 @@ const common = require('../common'); const http = require('http'); -const server = http.createServer(common.mustCall(function(req, res) { +const server = http.createServer(common.mustCall((req, res) => { res.end(); -})).listen(0, common.mustCall(function() { +})).listen(0, common.mustCall(() => { const options = { agent: null, - port: this.address().port + port: server.address().port }; - http.get(options, common.mustCall(function(res) { + http.get(options, common.mustCall((res) => { res.resume(); server.close(); })); diff --git a/test/parallel/test-http-automatic-headers.js b/test/parallel/test-http-automatic-headers.js index 37a5c43901c33d..5a6a8e524c76ee 100644 --- a/test/parallel/test-http-automatic-headers.js +++ b/test/parallel/test-http-automatic-headers.js @@ -1,23 +1,23 @@ 'use strict'; -require('../common'); +const common = require('../common'); const assert = require('assert'); const http = require('http'); -const server = http.createServer(function(req, res) { +const server = http.createServer(common.mustCall((req, res) => { res.setHeader('X-Date', 'foo'); res.setHeader('X-Connection', 'bar'); res.setHeader('X-Content-Length', 'baz'); res.end(); -}); +})); server.listen(0); -server.on('listening', function() { - const agent = new http.Agent({ port: this.address().port, maxSockets: 1 }); +server.on('listening', common.mustCall(() => { + const agent = new http.Agent({ port: server.address().port, maxSockets: 1 }); http.get({ - port: this.address().port, + port: server.address().port, path: '/hello', agent: agent - }, function(res) { + }, common.mustCall((res) => { assert.strictEqual(res.statusCode, 200); assert.strictEqual(res.headers['x-date'], 'foo'); assert.strictEqual(res.headers['x-connection'], 'bar'); @@ -27,5 +27,5 @@ server.on('listening', function() { assert.strictEqual(res.headers['content-length'], '0'); server.close(); agent.destroy(); - }); -}); + })); +})); diff --git a/test/parallel/test-http-blank-header.js b/test/parallel/test-http-blank-header.js index 1659dc5ed5fd5d..ff86193a1bad4a 100644 --- a/test/parallel/test-http-blank-header.js +++ b/test/parallel/test-http-blank-header.js @@ -25,34 +25,29 @@ const assert = require('assert'); const http = require('http'); const net = require('net'); -const server = http.createServer(common.mustCall(function(req, res) { +const server = http.createServer(common.mustCall((req, res) => { assert.strictEqual('GET', req.method); assert.strictEqual('/blah', req.url); assert.deepStrictEqual({ - host: 'mapdevel.trolologames.ru:443', - origin: 'http://mapdevel.trolologames.ru', + host: 'example.org:443', + origin: 'http://example.org', cookie: '' }, req.headers); })); -server.listen(0, function() { - const c = net.createConnection(this.address().port); +server.listen(0, common.mustCall(() => { + const c = net.createConnection(server.address().port); - c.on('connect', function() { + c.on('connect', common.mustCall(() => { c.write('GET /blah HTTP/1.1\r\n' + - 'Host: mapdevel.trolologames.ru:443\r\n' + + 'Host: example.org:443\r\n' + 'Cookie:\r\n' + - 'Origin: http://mapdevel.trolologames.ru\r\n' + + 'Origin: http://example.org\r\n' + '\r\n\r\nhello world' ); - }); + })); - c.on('end', function() { - c.end(); - }); - - c.on('close', function() { - server.close(); - }); -}); + c.on('end', common.mustCall(() => c.end())); + c.on('close', common.mustCall(() => server.close())); +})); diff --git a/test/parallel/test-http-buffer-sanity.js b/test/parallel/test-http-buffer-sanity.js index a72d326d6f4107..8dfccf7d5c688d 100644 --- a/test/parallel/test-http-buffer-sanity.js +++ b/test/parallel/test-http-buffer-sanity.js @@ -32,16 +32,12 @@ for (let i = 0; i < buffer.length; i++) { buffer[i] = i % 256; } - -const web = http.Server(function(req, res) { - web.close(); - - console.log(req.headers); +const server = http.Server(function(req, res) { + server.close(); let i = 0; - req.on('data', function(d) { - process.stdout.write(','); + req.on('data', (d) => { measuredSize += d.length; for (let j = 0; j < d.length; j++) { assert.strictEqual(buffer[i], d[j]); @@ -49,39 +45,27 @@ const web = http.Server(function(req, res) { } }); - - req.on('end', function() { + req.on('end', common.mustCall(() => { + assert.strictEqual(bufferSize, measuredSize); res.writeHead(200); res.write('thanks'); res.end(); - console.log('response with \'thanks\''); - }); - - req.connection.on('error', function(e) { - console.log(`http server-side error: ${e.message}`); - process.exit(1); - }); + })); }); -web.listen(0, common.mustCall(function() { - console.log('Making request'); - +server.listen(0, common.mustCall(() => { const req = http.request({ - port: this.address().port, - method: 'GET', + port: server.address().port, + method: 'POST', path: '/', headers: { 'content-length': buffer.length } - }, common.mustCall(function(res) { - console.log('Got response'); + }, common.mustCall((res) => { res.setEncoding('utf8'); - res.on('data', common.mustCall(function(string) { - assert.strictEqual('thanks', string); + let data = ''; + res.on('data', (chunk) => data += chunk); + res.on('end', common.mustCall(() => { + assert.strictEqual('thanks', data); })); })); req.end(buffer); })); - - -process.on('exit', function() { - assert.strictEqual(bufferSize, measuredSize); -}); diff --git a/test/parallel/test-http-chunked.js b/test/parallel/test-http-chunked.js index 133c1d847792b1..9ae2932a5c4149 100644 --- a/test/parallel/test-http-chunked.js +++ b/test/parallel/test-http-chunked.js @@ -20,7 +20,7 @@ // USE OR OTHER DEALINGS IN THE SOFTWARE. 'use strict'; -require('../common'); +const common = require('../common'); const assert = require('assert'); const http = require('http'); @@ -34,31 +34,23 @@ const UTF8_STRING = '南越国是前203年至前111年存在于岭南地区的 '采用封建制和郡县制并存的制度,它的建立保证了秦末乱世岭南地区社会秩序的稳定,' + '有效的改善了岭南地区落后的政治、经济现状。'; -const server = http.createServer(function(req, res) { - res.writeHead(200, {'Content-Type': 'text/plain; charset=utf8'}); +const server = http.createServer(common.mustCall((req, res) => { + res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf8' }); res.end(UTF8_STRING, 'utf8'); -}); -server.listen(0, function() { +})); +server.listen(0, common.mustCall(() => { let data = ''; - const get = http.get({ + http.get({ path: '/', host: 'localhost', - port: this.address().port - }, function(x) { + port: server.address().port + }, common.mustCall((x) => { x.setEncoding('utf8'); - x.on('data', function(c) { data += c; }); - x.on('error', function(e) { - throw e; - }); - x.on('end', function() { + x.on('data', (c) => data += c); + x.on('end', common.mustCall(() => { assert.strictEqual('string', typeof data); - console.log('here is the response:'); assert.strictEqual(UTF8_STRING, data); - console.log(data); server.close(); - }); - }); - get.on('error', function(e) { throw e; }); - get.end(); - -}); + })); + })).end(); +})); diff --git a/test/parallel/test-http-client-abort.js b/test/parallel/test-http-client-abort.js index eaf4a05e6f49f1..71fd2ad64cabdd 100644 --- a/test/parallel/test-http-client-abort.js +++ b/test/parallel/test-http-client-abort.js @@ -20,57 +20,35 @@ // USE OR OTHER DEALINGS IN THE SOFTWARE. 'use strict'; -require('../common'); -const assert = require('assert'); +const common = require('../common'); const http = require('http'); +const Countdown = require('../common/countdown'); -let clientAborts = 0; +const N = 8; + +const countdown = new Countdown(N, common.mustCall(() => server.close())); -const server = http.Server(function(req, res) { - console.log('Got connection'); +const server = http.Server(common.mustCall((req, res) => { res.writeHead(200); res.write('Working on it...'); + req.on('aborted', common.mustCall(() => countdown.dec())); +}, N)); - // I would expect an error event from req or res that the client aborted - // before completing the HTTP request / response cycle, or maybe a new - // event like "aborted" or something. - req.on('aborted', function() { - clientAborts++; - console.log(`Got abort ${clientAborts}`); - if (clientAborts === N) { - console.log('All aborts detected, you win.'); - server.close(); - } - }); -}); +server.listen(0, common.mustCall(() => { -let responses = 0; -const N = 8; -const requests = []; + const requests = []; + const reqCountdown = new Countdown(N, common.mustCall(() => { + requests.forEach((req) => req.abort()); + })); -server.listen(0, function() { - console.log('Server listening.'); + const options = { port: server.address().port }; for (let i = 0; i < N; i++) { - console.log(`Making client ${i}`); - const options = { port: this.address().port, path: `/?id=${i}` }; - const req = http.get(options, function(res) { - console.log(`Client response code ${res.statusCode}`); - - res.resume(); - if (++responses === N) { - console.log('All clients connected, destroying.'); - requests.forEach(function(outReq) { - console.log('abort'); - outReq.abort(); - }); - } - }); - - requests.push(req); + options.path = `/?id=${i}`; + requests.push( + http.get(options, common.mustCall((res) => { + res.resume(); + reqCountdown.dec(); + }))); } -}); - -process.on('exit', function() { - assert.strictEqual(N, clientAborts); -}); +})); diff --git a/test/parallel/test-http-client-abort2.js b/test/parallel/test-http-client-abort2.js index 7d28df28997a78..bc4b0e40838b36 100644 --- a/test/parallel/test-http-client-abort2.js +++ b/test/parallel/test-http-client-abort2.js @@ -20,18 +20,19 @@ // USE OR OTHER DEALINGS IN THE SOFTWARE. 'use strict'; -require('../common'); +const common = require('../common'); const http = require('http'); -const server = http.createServer(function(req, res) { +const server = http.createServer(common.mustCall((req, res) => { res.end('Hello'); -}); +})); -server.listen(0, function() { - const req = http.get({port: this.address().port}, function(res) { - res.on('data', function(data) { +server.listen(0, common.mustCall(() => { + const options = { port: server.address().port }; + const req = http.get(options, common.mustCall((res) => { + res.on('data', (data) => { req.abort(); server.close(); }); - }); -}); + })); +})); diff --git a/test/parallel/test-http-client-agent.js b/test/parallel/test-http-client-agent.js index 1a3c099d4df897..f2d1b612b5af82 100644 --- a/test/parallel/test-http-client-agent.js +++ b/test/parallel/test-http-client-agent.js @@ -20,7 +20,7 @@ // USE OR OTHER DEALINGS IN THE SOFTWARE. 'use strict'; -require('../common'); +const common = require('../common'); const assert = require('assert'); const http = require('http'); @@ -28,23 +28,22 @@ let name; const max = 3; let count = 0; -const server = http.Server(function(req, res) { +const server = http.Server(common.mustCall((req, res) => { if (req.url === '/0') { - setTimeout(function() { + setTimeout(common.mustCall(() => { res.writeHead(200); res.end('Hello, World!'); - }, 100); + }), 100); } else { res.writeHead(200); res.end('Hello, World!'); } -}); -server.listen(0, function() { - name = http.globalAgent.getName({ port: this.address().port }); - for (let i = 0; i < max; ++i) { +}, max)); +server.listen(0, common.mustCall(() => { + name = http.globalAgent.getName({ port: server.address().port }); + for (let i = 0; i < max; ++i) request(i); - } -}); +})); function request(i) { const req = http.get({ @@ -52,7 +51,7 @@ function request(i) { path: `/${i}` }, function(res) { const socket = req.socket; - socket.on('close', function() { + socket.on('close', common.mustCall(() => { ++count; if (count < max) { assert.strictEqual(http.globalAgent.sockets[name].includes(socket), @@ -62,11 +61,7 @@ function request(i) { assert(!http.globalAgent.requests.hasOwnProperty(name)); server.close(); } - }); + })); res.resume(); }); } - -process.on('exit', function() { - assert.strictEqual(count, max); -}); diff --git a/test/parallel/test-http-client-check-http-token.js b/test/parallel/test-http-client-check-http-token.js index b28af938f9b9ef..4fa3a44802a5f0 100644 --- a/test/parallel/test-http-client-check-http-token.js +++ b/test/parallel/test-http-client-check-http-token.js @@ -2,39 +2,28 @@ const common = require('../common'); const assert = require('assert'); const http = require('http'); +const Countdown = require('../common/countdown'); const expectedSuccesses = [undefined, null, 'GET', 'post']; -let requestCount = 0; +const expectedFails = [-1, 1, 0, {}, true, false, [], Symbol()]; -const server = http.createServer((req, res) => { - requestCount++; - res.end(); +const countdown = + new Countdown(expectedSuccesses.length, + common.mustCall(() => server.close())); - if (expectedSuccesses.length === requestCount) { - server.close(); - } -}).listen(0, test); +const server = http.createServer(common.mustCall((req, res) => { + res.end(); + countdown.dec(); +}, expectedSuccesses.length)); -function test() { - function fail(input) { +server.listen(0, common.mustCall(() => { + expectedFails.forEach((method) => { assert.throws(() => { - http.request({ method: input, path: '/' }, common.mustNotCall()); + http.request({ method, path: '/' }, common.mustNotCall()); }, /^TypeError: Method must be a string$/); - } - - fail(-1); - fail(1); - fail(0); - fail({}); - fail(true); - fail(false); - fail([]); - - function ok(method) { - http.request({ method: method, port: server.address().port }).end(); - } + }); expectedSuccesses.forEach((method) => { - ok(method); + http.request({ method, port: server.address().port }).end(); }); -} +})); diff --git a/test/parallel/test-http-client-default-headers-exist.js b/test/parallel/test-http-client-default-headers-exist.js index 05dd509e19e6af..e0cf82e46220c4 100644 --- a/test/parallel/test-http-client-default-headers-exist.js +++ b/test/parallel/test-http-client-default-headers-exist.js @@ -20,9 +20,10 @@ // USE OR OTHER DEALINGS IN THE SOFTWARE. 'use strict'; -require('../common'); +const common = require('../common'); const assert = require('assert'); const http = require('http'); +const Countdown = require('../common/countdown'); const expectedHeaders = { 'DELETE': ['host', 'connection'], @@ -35,17 +36,18 @@ const expectedHeaders = { const expectedMethods = Object.keys(expectedHeaders); -let requestCount = 0; +const countdown = + new Countdown(expectedMethods.length, + common.mustCall(() => server.close())); -const server = http.createServer(function(req, res) { - requestCount++; +const server = http.createServer(common.mustCall((req, res) => { res.end(); assert(expectedHeaders.hasOwnProperty(req.method), `${req.method} was an unexpected method`); const requestHeaders = Object.keys(req.headers); - requestHeaders.forEach(function(header) { + requestHeaders.forEach((header) => { assert.strictEqual( expectedHeaders[req.method].includes(header.toLowerCase()), true, @@ -59,15 +61,14 @@ const server = http.createServer(function(req, res) { `some headers were missing for method: ${req.method}` ); - if (expectedMethods.length === requestCount) - server.close(); -}); + countdown.dec(); +}, expectedMethods.length)); -server.listen(0, function() { - expectedMethods.forEach(function(method) { +server.listen(0, common.mustCall(() => { + expectedMethods.forEach((method) => { http.request({ method: method, port: server.address().port }).end(); }); -}); +})); diff --git a/test/parallel/test-http-client-encoding.js b/test/parallel/test-http-client-encoding.js index 8e795481af7289..a4701cdbd0abb1 100644 --- a/test/parallel/test-http-client-encoding.js +++ b/test/parallel/test-http-client-encoding.js @@ -20,20 +20,20 @@ // USE OR OTHER DEALINGS IN THE SOFTWARE. 'use strict'; -require('../common'); - +const common = require('../common'); +const assert = require('assert'); const http = require('http'); -http.createServer(function(req, res) { - res.end('ok\n'); - this.close(); -}).listen(0, test); - -function test() { +const server = http.createServer((req, res) => { + res.end('ok'); + server.close(); +}).listen(0, common.mustCall(() => { http.request({ - port: this.address().port, + port: server.address().port, encoding: 'utf8' - }, function(res) { - res.pipe(process.stdout); - }).end(); -} + }, common.mustCall((res) => { + let data = ''; + res.on('data', (chunk) => data += chunk); + res.on('end', common.mustCall(() => assert.strictEqual(data, 'ok'))); + })).end(); +})); diff --git a/test/parallel/test-http-client-parse-error.js b/test/parallel/test-http-client-parse-error.js index 074f24063f5fe4..60f1ee45c8efc1 100644 --- a/test/parallel/test-http-client-parse-error.js +++ b/test/parallel/test-http-client-parse-error.js @@ -20,41 +20,33 @@ // USE OR OTHER DEALINGS IN THE SOFTWARE. 'use strict'; -require('../common'); -const assert = require('assert'); - +const common = require('../common'); const http = require('http'); const net = require('net'); +const Countdown = require('../common/countdown'); + +const countdown = new Countdown(2, common.mustCall(() => server.close())); -let connects = 0; -let parseErrors = 0; +const payloads = [ + 'HTTP/1.1 302 Object Moved\r\nContent-Length: 0\r\n\r\nhi world', + 'bad http = should trigger parse error' +]; // Create a TCP server -net.createServer(function(c) { - console.log('connection'); - if (++connects === 1) { - c.end('HTTP/1.1 302 Object Moved\r\nContent-Length: 0\r\n\r\nhi world'); - } else { - c.end('bad http - should trigger parse error\r\n'); - this.close(); - } -}).listen(0, '127.0.0.1', function() { +const server = + net.createServer(common.mustCall((c) => c.end(payloads.shift()), 2)); + +server.listen(0, common.mustCall(() => { for (let i = 0; i < 2; i++) { - http.request({ - host: '127.0.0.1', - port: this.address().port, - method: 'GET', + http.get({ + port: server.address().port, path: '/' - }).on('error', function(e) { - console.log('got error from client'); - assert.ok(e.message.includes('Parse Error')); - assert.strictEqual(e.code, 'HPE_INVALID_CONSTANT'); - parseErrors++; - }).end(); + }).on('error', common.mustCall((e) => { + common.expectsError({ + code: 'HPE_INVALID_CONSTANT', + message: 'Parse Error' + })(e); + countdown.dec(); + })); } -}); - -process.on('exit', function() { - assert.strictEqual(connects, 2); - assert.strictEqual(parseErrors, 2); -}); +})); From e529914e70b38fb0e7bd9721a34513b94a58d40b Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Fri, 28 Jul 2017 13:39:04 +0200 Subject: [PATCH 117/157] zlib: fix interaction of flushing and needDrain Backport-PR-URL: https://github.com/nodejs/node/pull/14571 Backport-Reviewed-By: James M Snell Fixes: https://github.com/nodejs/node/issues/14523 PR-URL: https://github.com/nodejs/node/pull/14527 Reviewed-By: Matteo Collina Reviewed-By: James M Snell Reviewed-By: Colin Ihrig --- lib/zlib.js | 30 +++++++++++++- .../test-zlib-flush-drain-longblock.js | 27 ++++++++++++ .../test-zlib-flush-multiple-scheduled.js | 41 +++++++++++++++++++ 3 files changed, 96 insertions(+), 2 deletions(-) create mode 100644 test/parallel/test-zlib-flush-drain-longblock.js create mode 100644 test/parallel/test-zlib-flush-multiple-scheduled.js diff --git a/lib/zlib.js b/lib/zlib.js index d620b6bee3470a..a32d774c65d2dd 100644 --- a/lib/zlib.js +++ b/lib/zlib.js @@ -188,6 +188,7 @@ function Zlib(opts, mode) { this._flushFlag = opts.flush || constants.Z_NO_FLUSH; this._finishFlushFlag = opts.finishFlush !== undefined ? opts.finishFlush : constants.Z_FINISH; + this._scheduledFlushFlag = constants.Z_NO_FLUSH; if (opts.chunkSize !== undefined) { if (opts.chunkSize < constants.Z_MIN_CHUNK) { @@ -300,6 +301,23 @@ Zlib.prototype._flush = function _flush(callback) { this._transform(Buffer.alloc(0), '', callback); }; +// If a flush is scheduled while another flush is still pending, a way to figure +// out which one is the "stronger" flush is needed. +// Roughly, the following holds: +// Z_NO_FLUSH (< Z_TREES) < Z_BLOCK < Z_PARTIAL_FLUSH < +// Z_SYNC_FLUSH < Z_FULL_FLUSH < Z_FINISH +const flushiness = []; +let i = 0; +for (const flushFlag of [constants.Z_NO_FLUSH, constants.Z_BLOCK, + constants.Z_PARTIAL_FLUSH, constants.Z_SYNC_FLUSH, + constants.Z_FULL_FLUSH, constants.Z_FINISH]) { + flushiness[flushFlag] = i++; +} + +function maxFlush(a, b) { + return flushiness[a] > flushiness[b] ? a : b; +} + Zlib.prototype.flush = function flush(kind, callback) { var ws = this._writableState; @@ -315,13 +333,21 @@ Zlib.prototype.flush = function flush(kind, callback) { if (callback) this.once('end', callback); } else if (ws.needDrain) { - if (callback) { - const drainHandler = () => this.flush(kind, callback); + const alreadyHadFlushScheduled = + this._scheduledFlushFlag !== constants.Z_NO_FLUSH; + this._scheduledFlushFlag = maxFlush(kind, this._scheduledFlushFlag); + + // If a callback was passed, always register a new `drain` + flush handler, + // mostly because that’s simpler and flush callbacks piling up is a rare + // thing anyway. + if (!alreadyHadFlushScheduled || callback) { + const drainHandler = () => this.flush(this._scheduledFlushFlag, callback); this.once('drain', drainHandler); } } else { this._flushFlag = kind; this.write(Buffer.alloc(0), '', callback); + this._scheduledFlushFlag = constants.Z_NO_FLUSH; } }; diff --git a/test/parallel/test-zlib-flush-drain-longblock.js b/test/parallel/test-zlib-flush-drain-longblock.js new file mode 100644 index 00000000000000..94d1d9d04d9369 --- /dev/null +++ b/test/parallel/test-zlib-flush-drain-longblock.js @@ -0,0 +1,27 @@ +'use strict'; + +// Regression test for https://github.com/nodejs/node/issues/14523. +// Checks that flushes interact properly with writableState.needDrain, +// even if no flush callback was passed. + +const common = require('../common'); +const assert = require('assert'); +const zlib = require('zlib'); + +const zipper = zlib.createGzip({ highWaterMark: 16384 }); +const unzipper = zlib.createGunzip(); +zipper.pipe(unzipper); + +zipper.write('A'.repeat(17000)); +zipper.flush(); + +let received = 0; +unzipper.on('data', common.mustCall((d) => { + received += d.length; +}, 2)); + +// Properly `.end()`ing the streams would interfere with checking that +// `.flush()` works. +process.on('exit', () => { + assert.strictEqual(received, 17000); +}); diff --git a/test/parallel/test-zlib-flush-multiple-scheduled.js b/test/parallel/test-zlib-flush-multiple-scheduled.js new file mode 100644 index 00000000000000..19548672389fde --- /dev/null +++ b/test/parallel/test-zlib-flush-multiple-scheduled.js @@ -0,0 +1,41 @@ +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const zlib = require('zlib'); + +const { + Z_PARTIAL_FLUSH, Z_SYNC_FLUSH, Z_FULL_FLUSH, Z_FINISH +} = zlib.constants; + +common.crashOnUnhandledRejection(); + +async function getOutput(...sequenceOfFlushes) { + const zipper = zlib.createGzip({ highWaterMark: 16384 }); + + zipper.write('A'.repeat(17000)); + for (const flush of sequenceOfFlushes) { + zipper.flush(flush); + } + + const data = []; + + return new Promise((resolve) => { + zipper.on('data', common.mustCall((d) => { + data.push(d); + if (data.length === 2) resolve(Buffer.concat(data)); + }, 2)); + }); +} + +(async function() { + assert.deepStrictEqual(await getOutput(Z_SYNC_FLUSH), + await getOutput(Z_SYNC_FLUSH, Z_PARTIAL_FLUSH)); + assert.deepStrictEqual(await getOutput(Z_SYNC_FLUSH), + await getOutput(Z_PARTIAL_FLUSH, Z_SYNC_FLUSH)); + + assert.deepStrictEqual(await getOutput(Z_FINISH), + await getOutput(Z_FULL_FLUSH, Z_FINISH)); + assert.deepStrictEqual(await getOutput(Z_FINISH), + await getOutput(Z_SYNC_FLUSH, Z_FINISH)); +})(); From f593960d353ab1e6ff30a0d22ade15b2b5c9b027 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Mon, 19 Jun 2017 13:17:29 -0700 Subject: [PATCH 118/157] util: refactor util module * refactor util exports * early capture of prototype methods * use template strings and args consistently Backport-PR-URL: https://github.com/nodejs/node/pull/14585 Backport-Reviewed-By: Anna Henningsen PR-URL: https://github.com/nodejs/node/pull/13803 Reviewed-By: Alexey Orlenko Reviewed-By: Colin Ihrig --- lib/util.js | 297 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 174 insertions(+), 123 deletions(-) diff --git a/lib/util.js b/lib/util.js index 99c7e5e9e056c5..897970d39b1829 100644 --- a/lib/util.js +++ b/lib/util.js @@ -21,13 +21,35 @@ 'use strict'; -const uv = process.binding('uv'); -const Buffer = require('buffer').Buffer; -const internalUtil = require('internal/util'); -const binding = process.binding('util'); const errors = require('internal/errors'); -const isError = internalUtil.isError; +const { errname } = process.binding('uv'); + +const { + getPromiseDetails, + getProxyDetails, + isAnyArrayBuffer, + isDataView, + isExternal, + isMap, + isMapIterator, + isPromise, + isSet, + isSetIterator, + isTypedArray, + isRegExp: _isRegExp, + isDate: _isDate, + kPending, + kRejected, +} = process.binding('util'); + +const { + customInspectSymbol, + deprecate, + getConstructorOf, + isError, + promisify +} = require('internal/util'); const inspectDefaultOptions = Object.seal({ showHidden: false, @@ -41,6 +63,12 @@ const inspectDefaultOptions = Object.seal({ const numbersOnlyRE = /^\d+$/; +const objectHasOwnProperty = Object.prototype.hasOwnProperty; +const propertyIsEnumerable = Object.prototype.propertyIsEnumerable; +const regExpToString = RegExp.prototype.toString; +const dateToISOString = Date.prototype.toISOString; +const errorToString = Error.prototype.toString; + var CIRCULAR_ERROR_MESSAGE; var Debug; @@ -62,7 +90,7 @@ function tryStringify(arg) { } } -exports.format = function(f) { +function format(f) { if (typeof f !== 'string') { const objects = new Array(arguments.length); for (var index = 0; index < arguments.length; index++) { @@ -132,26 +160,26 @@ exports.format = function(f) { while (a < arguments.length) { const x = arguments[a++]; if (x === null || (typeof x !== 'object' && typeof x !== 'symbol')) { - str += ' ' + x; + str += ` ${x}`; } else { - str += ' ' + inspect(x); + str += ` ${inspect(x)}`; } } return str; -}; - - -exports.deprecate = internalUtil.deprecate; +} var debugs = {}; var debugEnviron; -exports.debuglog = function(set) { - if (debugEnviron === undefined) - debugEnviron = process.env.NODE_DEBUG || ''; + +function debuglog(set) { + if (debugEnviron === undefined) { + debugEnviron = new Set( + (process.env.NODE_DEBUG || '').split(',').map((s) => s.toUpperCase())); + } set = set.toUpperCase(); if (!debugs[set]) { - if (new RegExp(`\\b${set}\\b`, 'i').test(debugEnviron)) { + if (debugEnviron.has(set)) { var pid = process.pid; debugs[set] = function() { var msg = exports.format.apply(exports, arguments); @@ -162,7 +190,7 @@ exports.debuglog = function(set) { } } return debugs[set]; -}; +} /** @@ -196,6 +224,7 @@ function inspect(obj, opts) { if (ctx.maxArrayLength === null) ctx.maxArrayLength = Infinity; return formatValue(ctx, obj, ctx.depth); } +inspect.custom = customInspectSymbol; Object.defineProperty(inspect, 'defaultOptions', { get: function() { @@ -241,11 +270,6 @@ inspect.styles = Object.assign(Object.create(null), { 'regexp': 'red' }); -const customInspectSymbol = internalUtil.customInspectSymbol; - -exports.inspect = inspect; -exports.inspect.custom = customInspectSymbol; - function stylizeWithColor(str, styleType) { var style = inspect.styles[styleType]; @@ -302,7 +326,7 @@ function formatValue(ctx, value, recurseTimes) { // Otherwise, it'll return an array. The first item // is the target, the second item is the handler. // We ignore (and do not return) the Proxy isRevoked property. - proxy = binding.getProxyDetails(value); + proxy = getProxyDetails(value); if (proxy) { // We know for a fact that this isn't a Proxy. // Mark it as having already been evaluated. @@ -320,7 +344,7 @@ function formatValue(ctx, value, recurseTimes) { proxyCache.set(value, proxy); } if (proxy) { - return 'Proxy ' + formatValue(ctx, proxy, recurseTimes); + return `Proxy ${formatValue(ctx, proxy, recurseTimes)}`; } } @@ -358,7 +382,7 @@ function formatValue(ctx, value, recurseTimes) { var visibleKeys = arrayToHash(keys); const symbolKeys = Object.getOwnPropertySymbols(value); const enumSymbolKeys = symbolKeys - .filter((key) => Object.prototype.propertyIsEnumerable.call(value, key)); + .filter((key) => propertyIsEnumerable.call(value, key)); keys = keys.concat(enumSymbolKeys); if (ctx.showHidden) { @@ -391,7 +415,7 @@ function formatValue(ctx, value, recurseTimes) { }); } - var constructor = internalUtil.getConstructorOf(value); + var constructor = getConstructorOf(value); // Some type of object without properties can be shortcutted. if (keys.length === 0) { @@ -401,13 +425,13 @@ function formatValue(ctx, value, recurseTimes) { `[${ctorName}${value.name ? `: ${value.name}` : ''}]`, 'special'); } if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + return ctx.stylize(regExpToString.call(value), 'regexp'); } if (isDate(value)) { if (Number.isNaN(value.getTime())) { return ctx.stylize(value.toString(), 'date'); } else { - return ctx.stylize(Date.prototype.toISOString.call(value), 'date'); + return ctx.stylize(dateToISOString.call(value), 'date'); } } if (isError(value)) { @@ -433,11 +457,11 @@ function formatValue(ctx, value, recurseTimes) { // Fast path for ArrayBuffer and SharedArrayBuffer. // Can't do the same for DataView because it has a non-primitive // .buffer property that we need to recurse for. - if (binding.isAnyArrayBuffer(value)) { + if (isAnyArrayBuffer(value)) { return `${constructor.name}` + ` { byteLength: ${formatNumber(ctx, value.byteLength)} }`; } - if (binding.isExternal(value)) { + if (isExternal(value)) { return ctx.stylize('[External]', 'special'); } } @@ -459,7 +483,7 @@ function formatValue(ctx, value, recurseTimes) { braces = ['[', ']']; empty = value.length === 0; formatter = formatArray; - } else if (binding.isSet(value)) { + } else if (isSet(value)) { braces = ['{', '}']; // With `showHidden`, `length` will display as a hidden property for // arrays. For consistency's sake, do the same for `size`, even though this @@ -468,25 +492,25 @@ function formatValue(ctx, value, recurseTimes) { keys.unshift('size'); empty = value.size === 0; formatter = formatSet; - } else if (binding.isMap(value)) { + } else if (isMap(value)) { braces = ['{', '}']; // Ditto. if (ctx.showHidden) keys.unshift('size'); empty = value.size === 0; formatter = formatMap; - } else if (binding.isAnyArrayBuffer(value)) { + } else if (isAnyArrayBuffer(value)) { braces = ['{', '}']; keys.unshift('byteLength'); visibleKeys.byteLength = true; - } else if (binding.isDataView(value)) { + } else if (isDataView(value)) { braces = ['{', '}']; // .buffer goes last, it's not a primitive like the others. keys.unshift('byteLength', 'byteOffset', 'buffer'); visibleKeys.byteLength = true; visibleKeys.byteOffset = true; visibleKeys.buffer = true; - } else if (binding.isTypedArray(value)) { + } else if (isTypedArray(value)) { braces = ['[', ']']; formatter = formatTypedArray; if (ctx.showHidden) { @@ -497,15 +521,15 @@ function formatValue(ctx, value, recurseTimes) { 'byteOffset', 'buffer'); } - } else if (binding.isPromise(value)) { + } else if (isPromise(value)) { braces = ['{', '}']; formatter = formatPromise; - } else if (binding.isMapIterator(value)) { + } else if (isMapIterator(value)) { constructor = { name: 'MapIterator' }; braces = ['{', '}']; empty = false; formatter = formatCollectionIterator; - } else if (binding.isSetIterator(value)) { + } else if (isSetIterator(value)) { constructor = { name: 'SetIterator' }; braces = ['{', '}']; empty = false; @@ -528,17 +552,17 @@ function formatValue(ctx, value, recurseTimes) { // Make RegExps say that they are RegExps if (isRegExp(value)) { - base = ' ' + RegExp.prototype.toString.call(value); + base = ` ${regExpToString.call(value)}`; } // Make dates with properties first say the date if (isDate(value)) { - base = ' ' + Date.prototype.toISOString.call(value); + base = ` ${dateToISOString.call(value)}`; } // Make error with message first say the error if (isError(value)) { - base = ' ' + formatError(value); + base = ` ${formatError(value)}`; } // Make boxed primitive Strings look like such @@ -564,12 +588,12 @@ function formatValue(ctx, value, recurseTimes) { braces[0] = `${constructor.name} ${braces[0]}`; if (empty === true) { - return braces[0] + base + braces[1]; + return `${braces[0]}${base}${braces[1]}`; } if (recurseTimes < 0) { if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + return ctx.stylize(regExpToString.call(value), 'regexp'); } else if (Array.isArray(value)) { return ctx.stylize('[Array]', 'special'); } else { @@ -591,7 +615,7 @@ function formatNumber(ctx, value) { // Format -0 as '-0'. Strict equality won't distinguish 0 from -0. if (Object.is(value, -0)) return ctx.stylize('-0', 'number'); - return ctx.stylize('' + value, 'number'); + return ctx.stylize(`${value}`, 'number'); } @@ -606,18 +630,16 @@ function formatPrimitive(ctx, value) { var type = typeof value; if (type === 'string') { - var simple = '\'' + - JSON.stringify(value) + var simple = JSON.stringify(value) .replace(/^"|"$/g, '') .replace(/'/g, "\\'") - .replace(/\\"/g, '"') + - '\''; - return ctx.stylize(simple, 'string'); + .replace(/\\"/g, '"'); + return ctx.stylize(`'${simple}'`, 'string'); } if (type === 'number') return formatNumber(ctx, value); if (type === 'boolean') - return ctx.stylize('' + value, 'boolean'); + return ctx.stylize(`${value}`, 'boolean'); // es6 symbol primitive if (type === 'symbol') return ctx.stylize(value.toString(), 'symbol'); @@ -634,7 +656,7 @@ function formatPrimitiveNoColor(ctx, value) { function formatError(value) { - return value.stack || `[${Error.prototype.toString.call(value)}]`; + return value.stack || `[${errorToString.call(value)}]`; } @@ -745,15 +767,15 @@ function formatCollectionIterator(ctx, value, recurseTimes, visibleKeys, keys) { function formatPromise(ctx, value, recurseTimes, visibleKeys, keys) { const output = []; - const [state, result] = binding.getPromiseDetails(value); + const [state, result] = getPromiseDetails(value); - if (state === binding.kPending) { + if (state === kPending) { output.push(''); } else { var nextRecurseTimes = recurseTimes === null ? null : recurseTimes - 1; var str = formatValue(ctx, result, nextRecurseTimes); - if (state === binding.kRejected) { - output.push(' ' + str); + if (state === kRejected) { + output.push(` ${str}`); } else { output.push(str); } @@ -809,7 +831,7 @@ function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { if (array && numbersOnlyRE.test(key)) { return str; } - name = JSON.stringify('' + key); + name = JSON.stringify(`${key}`); if (/^"[a-zA-Z_][a-zA-Z_0-9]*"$/.test(name)) { name = name.substr(1, name.length - 2); name = ctx.stylize(name, 'name'); @@ -836,85 +858,64 @@ function reduceToSingleString(output, base, braces, breakLength) { // If the opening "brace" is too large, like in the case of "Set {", // we need to force the first item to be on the next line or the // items will not line up correctly. - (base === '' && braces[0].length === 1 ? '' : base + '\n ') + + (base === '' && braces[0].length === 1 ? '' : `${base}\n `) + ` ${output.join(',\n ')} ${braces[1]}`; } return `${braces[0]}${base} ${output.join(', ')} ${braces[1]}`; } - -// NOTE: These type checking functions intentionally don't use `instanceof` -// because it is fragile and can be easily faked with `Object.create()`. -exports.isArray = Array.isArray; - function isBoolean(arg) { return typeof arg === 'boolean'; } -exports.isBoolean = isBoolean; function isNull(arg) { return arg === null; } -exports.isNull = isNull; function isNullOrUndefined(arg) { return arg === null || arg === undefined; } -exports.isNullOrUndefined = isNullOrUndefined; function isNumber(arg) { return typeof arg === 'number'; } -exports.isNumber = isNumber; function isString(arg) { return typeof arg === 'string'; } -exports.isString = isString; function isSymbol(arg) { return typeof arg === 'symbol'; } -exports.isSymbol = isSymbol; function isUndefined(arg) { return arg === undefined; } -exports.isUndefined = isUndefined; function isRegExp(re) { - return binding.isRegExp(re); + return _isRegExp(re); } -exports.isRegExp = isRegExp; function isObject(arg) { return arg !== null && typeof arg === 'object'; } -exports.isObject = isObject; function isDate(d) { - return binding.isDate(d); + return _isDate(d); } -exports.isDate = isDate; - -exports.isError = isError; function isFunction(arg) { return typeof arg === 'function'; } -exports.isFunction = isFunction; function isPrimitive(arg) { return arg === null || typeof arg !== 'object' && typeof arg !== 'function'; } -exports.isPrimitive = isPrimitive; - -exports.isBuffer = Buffer.isBuffer; function pad(n) { - return n < 10 ? '0' + n.toString(10) : n.toString(10); + return n < 10 ? `0${n.toString(10)}` : n.toString(10); } @@ -932,9 +933,9 @@ function timestamp() { // log is just a thin wrapper to console.log that prepends a timestamp -exports.log = function() { +function log() { console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); -}; +} /** @@ -952,7 +953,7 @@ exports.log = function() { * @throws {TypeError} Will error if either constructor is null, or if * the super constructor lacks a prototype. */ -exports.inherits = function(ctor, superCtor) { +function inherits(ctor, superCtor) { if (ctor === undefined || ctor === null) throw new TypeError('The constructor to "inherits" must not be ' + @@ -969,9 +970,9 @@ exports.inherits = function(ctor, superCtor) { ctor.super_ = superCtor; Object.setPrototypeOf(ctor.prototype, superCtor.prototype); -}; +} -exports._extend = function(target, source) { +function _extend(target, source) { // Don't do anything if source isn't an object if (source === null || typeof source !== 'object') return target; @@ -981,59 +982,55 @@ exports._extend = function(target, source) { target[keys[i]] = source[keys[i]]; } return target; -}; +} function hasOwnProperty(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); + return objectHasOwnProperty.call(obj, prop); } // Deprecated old stuff. -exports.print = internalUtil.deprecate(function() { - for (var i = 0, len = arguments.length; i < len; ++i) { - process.stdout.write(String(arguments[i])); +function print(...args) { + for (var i = 0, len = args.length; i < len; ++i) { + process.stdout.write(String(args[i])); } -}, 'util.print is deprecated. Use console.log instead.', 'DEP0026'); - +} -exports.puts = internalUtil.deprecate(function() { - for (var i = 0, len = arguments.length; i < len; ++i) { - process.stdout.write(arguments[i] + '\n'); +function puts(...args) { + for (var i = 0, len = args.length; i < len; ++i) { + process.stdout.write(`${args[i]}\n`); } -}, 'util.puts is deprecated. Use console.log instead.', 'DEP0027'); - +} -exports.debug = internalUtil.deprecate(function(x) { +function debug(x) { process.stderr.write(`DEBUG: ${x}\n`); -}, 'util.debug is deprecated. Use console.error instead.', 'DEP0028'); - +} -exports.error = internalUtil.deprecate(function(x) { - for (var i = 0, len = arguments.length; i < len; ++i) { - process.stderr.write(arguments[i] + '\n'); +function error(...args) { + for (var i = 0, len = args.length; i < len; ++i) { + process.stderr.write(`${args[i]}\n`); } -}, 'util.error is deprecated. Use console.error instead.', 'DEP0029'); - +} -exports._errnoException = function(err, syscall, original) { - var errname = uv.errname(err); - var message = `${syscall} ${errname}`; +function _errnoException(err, syscall, original) { + var name = errname(err); + var message = `${syscall} ${name}`; if (original) - message += ' ' + original; + message += ` ${original}`; var e = new Error(message); - e.code = errname; - e.errno = errname; + e.code = name; + e.errno = name; e.syscall = syscall; return e; -}; +} -exports._exceptionWithHostPort = function(err, - syscall, - address, - port, - additional) { +function _exceptionWithHostPort(err, + syscall, + address, + port, + additional) { var details; if (port && port > 0) { details = `${address}:${port}`; @@ -1050,14 +1047,12 @@ exports._exceptionWithHostPort = function(err, ex.port = port; } return ex; -}; +} // process.versions needs a custom function as some values are lazy-evaluated. -process.versions[exports.inspect.custom] = +process.versions[inspect.custom] = () => exports.format(JSON.parse(JSON.stringify(process.versions))); -exports.promisify = internalUtil.promisify; - function callbackifyOnRejected(reason, cb) { // `!reason` guard inspired by bluebird (Ref: https://goo.gl/t5IS6M). // Because `null` is a special error value in callbacks which means "no error @@ -1106,4 +1101,60 @@ function callbackify(original) { return callbackified; } -exports.callbackify = callbackify; +// Keep the `exports =` so that various functions can still be monkeypatched +module.exports = exports = { + _errnoException, + _exceptionWithHostPort, + _extend, + callbackify, + debuglog, + deprecate, + format, + inherits, + inspect, + isArray: Array.isArray, + isBoolean, + isNull, + isNullOrUndefined, + isNumber, + isString, + isSymbol, + isUndefined, + isRegExp, + isObject, + isDate, + isError, + isFunction, + isPrimitive, + log, + promisify, + + // Deprecated Old Stuff + debug: deprecate(debug, + 'util.debug is deprecated. Use console.error instead.', + 'DEP0028'), + error: deprecate(error, + 'util.error is deprecated. Use console.error instead.', + 'DEP0029'), + print: deprecate(print, + 'util.print is deprecated. Use console.log instead.', + 'DEP0026'), + puts: deprecate(puts, + 'util.puts is deprecated. Use console.log instead.', + 'DEP0027') +}; + +// Avoid a circular dependency +var isBuffer; +Object.defineProperty(exports, 'isBuffer', { + configurable: true, + enumerable: true, + get() { + if (!isBuffer) + isBuffer = require('buffer').Buffer.isBuffer; + return isBuffer; + }, + set(val) { + isBuffer = val; + } +}); From 9a3fc10dd4eab551fc0c5176698b5ddd591a4ae3 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Mon, 12 Jun 2017 08:25:53 -0700 Subject: [PATCH 119/157] util: implement WHATWG Encoding Standard API Provide an (initially experimental) implementation of the WHATWG Encoding Standard API (`TextDecoder` and `TextEncoder`). The is the same API implemented on the browser side. By default, with small-icu, only the UTF-8, UTF-16le and UTF-16be decoders are supported. With full-icu enabled, every encoding other than iso-8859-16 is supported. This provides a basic test, but does not include the full web platform tests. Note: many of the web platform tests for this would fail by default because we ship with small-icu by default. A process warning will be emitted on first use to indicate that the API is still experimental. No runtime flag is required to use the feature. Backport-PR-URL: https://github.com/nodejs/node/pull/14585 Backport-Reviewed-By: Anna Henningsen Refs: https://encoding.spec.whatwg.org/ PR-URL: https://github.com/nodejs/node/pull/13644 Reviewed-By: Timothy Gu Reviewed-By: Matteo Collina --- doc/api/buffer.md | 14 +- doc/api/util.md | 151 +++++++++ lib/internal/encoding.js | 458 ++++++++++++++++++++++++++ lib/internal/errors.js | 10 + lib/util.js | 3 + node.gyp | 1 + src/node_buffer.cc | 23 ++ src/node_i18n.cc | 155 +++++++++ src/node_i18n.h | 1 + src/node_util.cc | 1 + test/parallel/test-whatwg-encoding.js | 385 ++++++++++++++++++++++ tools/icu/icu-generic.gyp | 9 - 12 files changed, 1195 insertions(+), 16 deletions(-) create mode 100644 lib/internal/encoding.js create mode 100644 test/parallel/test-whatwg-encoding.js diff --git a/doc/api/buffer.md b/doc/api/buffer.md index d73af5fd162dca..f8681c6be8e28e 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -193,11 +193,12 @@ The character encodings currently supported by Node.js include: * `'hex'` - Encode each byte as two hexadecimal characters. -*Note*: Today's browsers follow the [WHATWG spec] which aliases both 'latin1' -and ISO-8859-1 to win-1252. This means that while doing something like -`http.get()`, if the returned charset is one of those listed in the WHATWG spec -it's possible that the server actually returned win-1252-encoded data, and -using `'latin1'` encoding may incorrectly decode the characters. +*Note*: Today's browsers follow the [WHATWG Encoding Standard][] which aliases +both 'latin1' and ISO-8859-1 to win-1252. This means that while doing something +like `http.get()`, if the returned charset is one of those listed in the WHATWG +specification it is possible that the server actually returned +win-1252-encoded data, and using `'latin1'` encoding may incorrectly decode the +characters. ## Buffers and TypedArray + +> Stability: 1 - Experimental + +An implementation of the [WHATWG Encoding Standard][] `TextDecoder` API. + +```js +const decoder = new TextDecoder('shift_jis'); +let string = ''; +let buffer; +while (buffer = getNextChunkSomehow()) { + string += decoder.decode(buffer, { stream: true }); +} +string += decoder.decode(); // end-of-stream +``` + +#### WHATWG Supported Encodings + +Per the [WHATWG Encoding Standard][], the encodings supported by the +`TextDecoder` API are outlined in the tables below. For each encoding, +one or more aliases may be used. Support for some encodings is enabled +only when Node.js is using the full ICU data. + +##### Encodings Supported By Default + +| Encoding | Aliases | +| ----------- | --------------------------------- | +| `'utf8'` | `'unicode-1-1-utf-8'`, `'utf-8'` | +| `'utf-16be'`| | +| `'utf-16le'`| `'utf-16'` | + +##### Encodings Requiring Full-ICU + +| Encoding | Aliases | +| ----------------- | -------------------------------- | +| `'ibm866'` | `'866'`, `'cp866'`, `'csibm866'` | +| `'iso-8859-2'` | `'csisolatin2'`, `'iso-ir-101'`, `'iso8859-2'`, `'iso88592'`, `'iso_8859-2'`, `'iso_8859-2:1987'`, `'l2'`, `'latin2'` | +| `'iso-8859-3'` | `'csisolatin3'`, `'iso-ir-109'`, `'iso8859-3'`, `'iso88593'`, `'iso_8859-3'`, `'iso_8859-3:1988'`, `'l3'`, `'latin3'` | +| `'iso-8859-4'` | `'csisolatin4'`, `'iso-ir-110'`, `'iso8859-4'`, `'iso88594'`, `'iso_8859-4'`, `'iso_8859-4:1988'`, `'l4'`, `'latin4'` | +| `'iso-8859-5'` | `'csisolatincyrillic'`, `'cyrillic'`, `'iso-ir-144'`, `'iso8859-5'`, `'iso88595'`, `'iso_8859-5'`, `'iso_8859-5:1988'`| +| `'iso-8859-6'` | `'arabic'`, `'asmo-708'`, `'csiso88596e'`, `'csiso88596i'`, `'csisolatinarabic'`, `'ecma-114'`, `'iso-8859-6-e'`, `'iso-8859-6-i'`, `'iso-ir-127'`, `'iso8859-6'`, `'iso88596'`, `'iso_8859-6'`, `'iso_8859-6:1987'` | +| `'iso-8859-7'` | `'csisolatingreek'`, `'ecma-118'`, `'elot_928'`, `'greek'`, `'greek8'`, `'iso-ir-126'`, `'iso8859-7'`, `'iso88597'`, `'iso_8859-7'`, `'iso_8859-7:1987'`, `'sun_eu_greek'` | +| `'iso-8859-8'` | `'csiso88598e'`, `'csisolatinhebrew'`, `'hebrew'`, `'iso-8859-8-e'`, `'iso-ir-138'`, `'iso8859-8'`, `'iso88598'`, `'iso_8859-8'`, `'iso_8859-8:1988'`, `'visual'` | +| `'iso-8859-8-i'` | `'csiso88598i'`, `'logical'` | +| `'iso-8859-10'` | `'csisolatin6'`, `'iso-ir-157'`, `'iso8859-10'`, `'iso885910'`, `'l6'`, `'latin6'` | +| `'iso-8859-13'` | `'iso8859-13'`, `'iso885913'` | +| `'iso-8859-14'` | `'iso8859-14'`, `'iso885914'` | +| `'iso-8859-15'` | `'csisolatin9'`, `'iso8859-15'`, `'iso885915'`, `'iso_8859-15'`, `'l9'` | +| `'koi8-r'` | `'cskoi8r'`, `'koi'`, `'koi8'`, `'koi8_r'` | +| `'koi8-u'` | `'koi8-ru'` | +| `'macintosh'` | `'csmacintosh'`, `'mac'`, `'x-mac-roman'` | +| `'windows-874'` | `'dos-874'`, `'iso-8859-11'`, `'iso8859-11'`, `'iso885911'`, `'tis-620'` | +| `'windows-1250'` | `'cp1250'`, `'x-cp1250'` | +| `'windows-1251'` | `'cp1251'`, `'x-cp1251'` | +| `'windows-1252'` | `'ansi_x3.4-1968'`, `'ascii'`, `'cp1252'`, `'cp819'`, `'csisolatin1'`, `'ibm819'`, `'iso-8859-1'`, `'iso-ir-100'`, `'iso8859-1'`, `'iso88591'`, `'iso_8859-1'`, `'iso_8859-1:1987'`, `'l1'`, `'latin1'`, `'us-ascii'`, `'x-cp1252'` | +| `'windows-1253'` | `'cp1253'`, `'x-cp1253'` | +| `'windows-1254'` | `'cp1254'`, `'csisolatin5'`, `'iso-8859-9'`, `'iso-ir-148'`, `'iso8859-9'`, `'iso88599'`, `'iso_8859-9'`, `'iso_8859-9:1989'`, `'l5'`, `'latin5'`, `'x-cp1254'` | +| `'windows-1255'` | `'cp1255'`, `'x-cp1255'` | +| `'windows-1256'` | `'cp1256'`, `'x-cp1256'` | +| `'windows-1257'` | `'cp1257'`, `'x-cp1257'` | +| `'windows-1258'` | `'cp1258'`, `'x-cp1258'` | +| `'x-mac-cyrillic'`| `'x-mac-ukrainian'` | +| `'gbk'` | `'chinese'`, `'csgb2312'`, `'csiso58gb231280'`, `'gb2312'`, `'gb_2312'`, `'gb_2312-80'`, `'iso-ir-58'`, `'x-gbk'` | +| `'gb18030'` | | +| `'big5'` | `'big5-hkscs'`, `'cn-big5'`, `'csbig5'`, `'x-x-big5'` | +| `'euc-jp'` | `'cseucpkdfmtjapanese'`, `'x-euc-jp'` | +| `'iso-2022-jp'` | `'csiso2022jp'` | +| `'shift_jis'` | `'csshiftjis'`, `'ms932'`, `'ms_kanji'`, `'shift-jis'`, `'sjis'`, `'windows-31j'`, `'x-sjis'` | +| `'euc-kr'` | `'cseuckr'`, `'csksc56011987'`, `'iso-ir-149'`, `'korean'`, `'ks_c_5601-1987'`, `'ks_c_5601-1989'`, `'ksc5601'`, `'ksc_5601'`, `'windows-949'` | + +*Note*: The `'iso-8859-16'` encoding listed in the [WHATWG Encoding Standard][] +is not supported. + +#### new TextDecoder([encoding[, options]]) + +* `encoding` {string} Identifies the `encoding` that this `TextDecoder` instance + supports. Defaults to `'utf-8'`. +* `options` {Object} + * `fatal` {boolean} `true` if decoding failures are fatal. Defaults to + `false`. + * `ignoreBOM` {boolean} When `true`, the `TextDecoder` will include the byte + order mark in the decoded result. When `false`, the byte order mark will + be removed from the output. This option is only used when `encoding` is + `'utf-8'`, `'utf-16be'` or `'utf-16le'`. Defaults to `false`. + +Creates an new `TextDecoder` instance. The `encoding` may specify one of the +supported encodings or an alias. + +#### textDecoder.decode([input[, options]]) + +* `input` {ArrayBuffer|DataView|TypedArray} An `ArrayBuffer`, `DataView` or + Typed Array instance containing the encoded data. +* `options` {Object} + * `stream` {boolean} `true` if additional chunks of data are expected. + Defaults to `false`. +* Returns: {string} + +Decodes the `input` and returns a string. If `options.stream` is `true`, any +incomplete byte sequences occuring at the end of the `input` are buffered +internally and emitted after the next call to `textDecoder.decode()`. + +If `textDecoder.fatal` is `true`, decoding errors that occur will result in a +`TypeError` being thrown. + +#### textDecoder.encoding + +* Value: {string} + +The encoding supported by the `TextDecoder` instance. + +#### textDecoder.fatal + +* Value: {boolean} + +The value will be `true` if decoding errors result in a `TypeError` being +thrown. + +#### textDecoder.ignoreBOM + +* Value: {boolean} + +The value will be `true` if the decoding result will include the byte order +mark. + +### Class: util.TextEncoder + + +> Stability: 1 - Experimental + +An implementation of the [WHATWG Encoding Standard][] `TextEncoder` API. All +instances of `TextEncoder` only support `UTF-8` encoding. + +```js +const encoder = new TextEncoder(); +const uint8array = encoder.encode('this is some data'); +``` + +#### textEncoder.encode([input]) + +* `input` {string} The text to encode. Defaults to an empty string. +* Returns: {Uint8Array} + +UTF-8 Encodes the `input` string and returns a `Uint8Array` containing the +encoded bytes. + ## Deprecated APIs The following APIs have been deprecated and should no longer be used. Existing @@ -1022,3 +1172,4 @@ Deprecated predecessor of `console.log`. [Custom promisified functions]: #util_custom_promisified_functions [constructor]: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/constructor [semantically incompatible]: https://github.com/nodejs/node/issues/4179 +[WHATWG Encoding Standard]: https://encoding.spec.whatwg.org/ diff --git a/lib/internal/encoding.js b/lib/internal/encoding.js new file mode 100644 index 00000000000000..22ae5c6c0db1ab --- /dev/null +++ b/lib/internal/encoding.js @@ -0,0 +1,458 @@ +'use strict'; + +// An implementation of the WHATWG Encoding Standard +// https://encoding.spec.whatwg.org + +const errors = require('internal/errors'); +const kHandle = Symbol('handle'); +const kFlags = Symbol('flags'); +const kEncoding = Symbol('encoding'); +const kDecoder = Symbol('decoder'); +const kEncoder = Symbol('encoder'); + +let warned = false; +const experimental = + 'The WHATWG Encoding Standard implementation is an experimental API. It ' + + 'should not yet be used in production applications.'; + +const { + getConstructorOf, + customInspectSymbol: inspect +} = require('internal/util'); + +const { + isArrayBuffer +} = process.binding('util'); + +const { + encodeUtf8String +} = process.binding('buffer'); + +const { + decode: _decode, + getConverter, + hasConverter +} = process.binding('icu'); + +const CONVERTER_FLAGS_FLUSH = 0x1; +const CONVERTER_FLAGS_FATAL = 0x2; +const CONVERTER_FLAGS_IGNORE_BOM = 0x4; + +const empty = new Uint8Array(0); + +const encodings = new Map([ + ['unicode-1-1-utf-8', 'utf-8'], + ['utf8', 'utf-8'], + ['utf-8', 'utf-8'], + ['866', 'ibm866'], + ['cp866', 'ibm866'], + ['csibm866', 'ibm866'], + ['ibm866', 'ibm866'], + ['csisolatin2', 'iso-8859-2'], + ['iso-8859-2', 'iso-8859-2'], + ['iso-ir-101', 'iso-8859-2'], + ['iso8859-2', 'iso-8859-2'], + ['iso88592', 'iso-8859-2'], + ['iso_8859-2', 'iso-8859-2'], + ['iso_8859-2:1987', 'iso-8859-2'], + ['l2', 'iso-8859-2'], + ['latin2', 'iso-8859-2'], + ['csisolatin3', 'iso-8859-3'], + ['iso-8859-3', 'iso-8859-3'], + ['iso-ir-109', 'iso-8859-3'], + ['iso8859-3', 'iso-8859-3'], + ['iso88593', 'iso-8859-3'], + ['iso_8859-3', 'iso-8859-3'], + ['iso_8859-3:1988', 'iso-8859-3'], + ['l3', 'iso-8859-3'], + ['latin3', 'iso-8859-3'], + ['csisolatin4', 'iso-8859-4'], + ['iso-8859-4', 'iso-8859-4'], + ['iso-ir-110', 'iso-8859-4'], + ['iso8859-4', 'iso-8859-4'], + ['iso88594', 'iso-8859-4'], + ['iso_8859-4', 'iso-8859-4'], + ['iso_8859-4:1988', 'iso-8859-4'], + ['l4', 'iso-8859-4'], + ['latin4', 'iso-8859-4'], + ['csisolatincyrillic', 'iso-8859-5'], + ['cyrillic', 'iso-8859-5'], + ['iso-8859-5', 'iso-8859-5'], + ['iso-ir-144', 'iso-8859-5'], + ['iso8859-5', 'iso-8859-5'], + ['iso88595', 'iso-8859-5'], + ['iso_8859-5', 'iso-8859-5'], + ['iso_8859-5:1988', 'iso-8859-5'], + ['arabic', 'iso-8859-6'], + ['asmo-708', 'iso-8859-6'], + ['csiso88596e', 'iso-8859-6'], + ['csiso88596i', 'iso-8859-6'], + ['csisolatinarabic', 'iso-8859-6'], + ['ecma-114', 'iso-8859-6'], + ['iso-8859-6', 'iso-8859-6'], + ['iso-8859-6-e', 'iso-8859-6'], + ['iso-8859-6-i', 'iso-8859-6'], + ['iso-ir-127', 'iso-8859-6'], + ['iso8859-6', 'iso-8859-6'], + ['iso88596', 'iso-8859-6'], + ['iso_8859-6', 'iso-8859-6'], + ['iso_8859-6:1987', 'iso-8859-6'], + ['csisolatingreek', 'iso-8859-7'], + ['ecma-118', 'iso-8859-7'], + ['elot_928', 'iso-8859-7'], + ['greek', 'iso-8859-7'], + ['greek8', 'iso-8859-7'], + ['iso-8859-7', 'iso-8859-7'], + ['iso-ir-126', 'iso-8859-7'], + ['iso8859-7', 'iso-8859-7'], + ['iso88597', 'iso-8859-7'], + ['iso_8859-7', 'iso-8859-7'], + ['iso_8859-7:1987', 'iso-8859-7'], + ['sun_eu_greek', 'iso-8859-7'], + ['csiso88598e', 'iso-8859-8'], + ['csisolatinhebrew', 'iso-8859-8'], + ['hebrew', 'iso-8859-8'], + ['iso-8859-8', 'iso-8859-8'], + ['iso-8859-8-e', 'iso-8859-8'], + ['iso-ir-138', 'iso-8859-8'], + ['iso8859-8', 'iso-8859-8'], + ['iso88598', 'iso-8859-8'], + ['iso_8859-8', 'iso-8859-8'], + ['iso_8859-8:1988', 'iso-8859-8'], + ['visual', 'iso-8859-8'], + ['csiso88598i', 'iso-8859-8-i'], + ['iso-8859-8-i', 'iso-8859-8-i'], + ['logical', 'iso-8859-8-i'], + ['csisolatin6', 'iso-8859-10'], + ['iso-8859-10', 'iso-8859-10'], + ['iso-ir-157', 'iso-8859-10'], + ['iso8859-10', 'iso-8859-10'], + ['iso885910', 'iso-8859-10'], + ['l6', 'iso-8859-10'], + ['latin6', 'iso-8859-10'], + ['iso-8859-13', 'iso-8859-13'], + ['iso8859-13', 'iso-8859-13'], + ['iso885913', 'iso-8859-13'], + ['iso-8859-14', 'iso-8859-14'], + ['iso8859-14', 'iso-8859-14'], + ['iso885914', 'iso-8859-14'], + ['csisolatin9', 'iso-8859-15'], + ['iso-8859-15', 'iso-8859-15'], + ['iso8859-15', 'iso-8859-15'], + ['iso885915', 'iso-8859-15'], + ['iso_8859-15', 'iso-8859-15'], + ['l9', 'iso-8859-15'], + ['cskoi8r', 'koi8-r'], + ['koi', 'koi8-r'], + ['koi8', 'koi8-r'], + ['koi8-r', 'koi8-r'], + ['koi8_r', 'koi8-r'], + ['koi8-ru', 'koi8-u'], + ['koi8-u', 'koi8-u'], + ['csmacintosh', 'macintosh'], + ['mac', 'macintosh'], + ['macintosh', 'macintosh'], + ['x-mac-roman', 'macintosh'], + ['dos-874', 'windows-874'], + ['iso-8859-11', 'windows-874'], + ['iso8859-11', 'windows-874'], + ['iso885911', 'windows-874'], + ['tis-620', 'windows-874'], + ['windows-874', 'windows-874'], + ['cp1250', 'windows-1250'], + ['windows-1250', 'windows-1250'], + ['x-cp1250', 'windows-1250'], + ['cp1251', 'windows-1251'], + ['windows-1251', 'windows-1251'], + ['x-cp1251', 'windows-1251'], + ['ansi_x3.4-1968', 'windows-1252'], + ['ascii', 'windows-1252'], + ['cp1252', 'windows-1252'], + ['cp819', 'windows-1252'], + ['csisolatin1', 'windows-1252'], + ['ibm819', 'windows-1252'], + ['iso-8859-1', 'windows-1252'], + ['iso-ir-100', 'windows-1252'], + ['iso8859-1', 'windows-1252'], + ['iso88591', 'windows-1252'], + ['iso_8859-1', 'windows-1252'], + ['iso_8859-1:1987', 'windows-1252'], + ['l1', 'windows-1252'], + ['latin1', 'windows-1252'], + ['us-ascii', 'windows-1252'], + ['windows-1252', 'windows-1252'], + ['x-cp1252', 'windows-1252'], + ['cp1253', 'windows-1253'], + ['windows-1253', 'windows-1253'], + ['x-cp1253', 'windows-1253'], + ['cp1254', 'windows-1254'], + ['csisolatin5', 'windows-1254'], + ['iso-8859-9', 'windows-1254'], + ['iso-ir-148', 'windows-1254'], + ['iso8859-9', 'windows-1254'], + ['iso88599', 'windows-1254'], + ['iso_8859-9', 'windows-1254'], + ['iso_8859-9:1989', 'windows-1254'], + ['l5', 'windows-1254'], + ['latin5', 'windows-1254'], + ['windows-1254', 'windows-1254'], + ['x-cp1254', 'windows-1254'], + ['cp1255', 'windows-1255'], + ['windows-1255', 'windows-1255'], + ['x-cp1255', 'windows-1255'], + ['cp1256', 'windows-1256'], + ['windows-1256', 'windows-1256'], + ['x-cp1256', 'windows-1256'], + ['cp1257', 'windows-1257'], + ['windows-1257', 'windows-1257'], + ['x-cp1257', 'windows-1257'], + ['cp1258', 'windows-1258'], + ['windows-1258', 'windows-1258'], + ['x-cp1258', 'windows-1258'], + ['x-mac-cyrillic', 'x-mac-cyrillic'], + ['x-mac-ukrainian', 'x-mac-cyrillic'], + ['chinese', 'gbk'], + ['csgb2312', 'gbk'], + ['csiso58gb231280', 'gbk'], + ['gb2312', 'gbk'], + ['gb_2312', 'gbk'], + ['gb_2312-80', 'gbk'], + ['gbk', 'gbk'], + ['iso-ir-58', 'gbk'], + ['x-gbk', 'gbk'], + ['gb18030', 'gb18030'], + ['big5', 'big5'], + ['big5-hkscs', 'big5'], + ['cn-big5', 'big5'], + ['csbig5', 'big5'], + ['x-x-big5', 'big5'], + ['cseucpkdfmtjapanese', 'euc-jp'], + ['euc-jp', 'euc-jp'], + ['x-euc-jp', 'euc-jp'], + ['csiso2022jp', 'iso-2022-jp'], + ['iso-2022-jp', 'iso-2022-jp'], + ['csshiftjis', 'shift_jis'], + ['ms932', 'shift_jis'], + ['ms_kanji', 'shift_jis'], + ['shift-jis', 'shift_jis'], + ['shift_jis', 'shift_jis'], + ['sjis', 'shift_jis'], + ['windows-31j', 'shift_jis'], + ['x-sjis', 'shift_jis'], + ['cseuckr', 'euc-kr'], + ['csksc56011987', 'euc-kr'], + ['euc-kr', 'euc-kr'], + ['iso-ir-149', 'euc-kr'], + ['korean', 'euc-kr'], + ['ks_c_5601-1987', 'euc-kr'], + ['ks_c_5601-1989', 'euc-kr'], + ['ksc5601', 'euc-kr'], + ['ksc_5601', 'euc-kr'], + ['windows-949', 'euc-kr'], + ['utf-16be', 'utf-16be'], + ['utf-16le', 'utf-16le'], + ['utf-16', 'utf-16le'] +]); + +// Unfortunately, String.prototype.trim also removes non-ascii whitespace, +// so we have to do this manually +function trimAsciiWhitespace(label) { + var s = 0; + var e = label.length; + while (s < e && ( + label[s] === '\u0009' || + label[s] === '\u000a' || + label[s] === '\u000c' || + label[s] === '\u000d' || + label[s] === '\u0020')) { + s++; + } + while (e > s && ( + label[e - 1] === '\u0009' || + label[e - 1] === '\u000a' || + label[e - 1] === '\u000c' || + label[e - 1] === '\u000d' || + label[e - 1] === '\u0020')) { + e--; + } + return label.slice(s, e); +} + +function getEncodingFromLabel(label) { + const enc = encodings.get(label); + if (enc !== undefined) return enc; + return encodings.get(trimAsciiWhitespace(label.toLowerCase())); +} + +function hasTextDecoder(encoding = 'utf-8') { + if (typeof encoding !== 'string') + throw new errors.Error('ERR_INVALID_ARG_TYPE', 'encoding', 'string'); + return hasConverter(getEncodingFromLabel(encoding)); +} + +var Buffer; +function lazyBuffer() { + if (Buffer === undefined) + Buffer = require('buffer').Buffer; + return Buffer; +} + +class TextDecoder { + constructor(encoding = 'utf-8', options = {}) { + if (!warned) { + warned = true; + process.emitWarning(experimental, 'ExperimentalWarning'); + } + + encoding = `${encoding}`; + if (typeof options !== 'object') + throw new errors.Error('ERR_INVALID_ARG_TYPE', 'options', 'object'); + + const enc = getEncodingFromLabel(encoding); + if (enc === undefined) + throw new errors.RangeError('ERR_ENCODING_NOT_SUPPORTED', encoding); + + var flags = 0; + if (options !== null) { + flags |= options.fatal ? CONVERTER_FLAGS_FATAL : 0; + flags |= options.ignoreBOM ? CONVERTER_FLAGS_IGNORE_BOM : 0; + } + + const handle = getConverter(enc, flags); + if (handle === undefined) + throw new errors.Error('ERR_ENCODING_NOT_SUPPORTED', encoding); + + this[kHandle] = handle; + this[kFlags] = flags; + this[kEncoding] = enc; + } + + get encoding() { + if (this == null || this[kDecoder] !== true) + throw new errors.TypeError('ERR_INVALID_THIS', 'TextDecoder'); + return this[kEncoding]; + } + + get fatal() { + if (this == null || this[kDecoder] !== true) + throw new errors.TypeError('ERR_INVALID_THIS', 'TextDecoder'); + return (this[kFlags] & CONVERTER_FLAGS_FATAL) === CONVERTER_FLAGS_FATAL; + } + + get ignoreBOM() { + if (this == null || this[kDecoder] !== true) + throw new errors.TypeError('ERR_INVALID_THIS', 'TextDecoder'); + return (this[kFlags] & CONVERTER_FLAGS_IGNORE_BOM) === + CONVERTER_FLAGS_IGNORE_BOM; + } + + decode(input = empty, options = {}) { + if (this == null || this[kDecoder] !== true) + throw new errors.TypeError('ERR_INVALID_THIS', 'TextDecoder'); + if (isArrayBuffer(input)) { + input = lazyBuffer().from(input); + } else if (!ArrayBuffer.isView(input)) { + throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'input', + ['ArrayBuffer', 'ArrayBufferView']); + } + if (typeof options !== 'object') { + throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'options', 'object'); + } + + var flags = 0; + if (options !== null) + flags |= options.stream ? 0 : CONVERTER_FLAGS_FLUSH; + + const ret = _decode(this[kHandle], input, flags); + if (typeof ret === 'number') { + const err = new errors.TypeError('ERR_ENCODING_INVALID_ENCODED_DATA', + this.encoding); + err.errno = ret; + throw err; + } + return ret.toString('ucs2'); + } + + [inspect](depth, opts) { + if (this == null || this[kDecoder] !== true) + throw new errors.TypeError('ERR_INVALID_THIS', 'TextDecoder'); + if (typeof depth === 'number' && depth < 0) + return opts.stylize('[Object]', 'special'); + var ctor = getConstructorOf(this); + var obj = Object.create({ + constructor: ctor === null ? TextDecoder : ctor + }); + obj.encoding = this.encoding; + obj.fatal = this.fatal; + obj.ignoreBOM = this.ignoreBOM; + if (opts.showHidden) { + obj[kFlags] = this[kFlags]; + obj[kHandle] = this[kHandle]; + } + // Lazy to avoid circular dependency + return require('util').inspect(obj, opts); + } +} + +class TextEncoder { + constructor() { + if (!warned) { + warned = true; + process.emitWarning(experimental, 'ExperimentalWarning'); + } + } + + get encoding() { + if (this == null || this[kEncoder] !== true) + throw new errors.TypeError('ERR_INVALID_THIS', 'TextEncoder'); + return 'utf-8'; + } + + encode(input = '') { + if (this == null || this[kEncoder] !== true) + throw new errors.TypeError('ERR_INVALID_THIS', 'TextEncoder'); + return encodeUtf8String(`${input}`); + } + + [inspect](depth, opts) { + if (this == null || this[kEncoder] !== true) + throw new errors.TypeError('ERR_INVALID_THIS', 'TextEncoder'); + if (typeof depth === 'number' && depth < 0) + return opts.stylize('[Object]', 'special'); + var ctor = getConstructorOf(this); + var obj = Object.create({ + constructor: ctor === null ? TextEncoder : ctor + }); + obj.encoding = this.encoding; + // Lazy to avoid circular dependency + return require('util').inspect(obj, opts); + } +} + +Object.defineProperties( + TextDecoder.prototype, { + [kDecoder]: { enumerable: false, value: true, configurable: false }, + 'decode': { enumerable: true }, + 'encoding': { enumerable: true }, + 'fatal': { enumerable: true }, + 'ignoreBOM': { enumerable: true }, + [Symbol.toStringTag]: { + configurable: true, + value: 'TextDecoder' + } }); +Object.defineProperties( + TextEncoder.prototype, { + [kEncoder]: { enumerable: false, value: true, configurable: false }, + 'encode': { enumerable: true }, + 'encoding': { enumerable: true }, + [Symbol.toStringTag]: { + configurable: true, + value: 'TextEncoder' + } }); + +module.exports = { + getEncodingFromLabel, + hasTextDecoder, + TextDecoder, + TextEncoder +}; diff --git a/lib/internal/errors.js b/lib/internal/errors.js index f519397be252b1..3ee34cf428939a 100644 --- a/lib/internal/errors.js +++ b/lib/internal/errors.js @@ -109,7 +109,17 @@ module.exports = exports = { // Note: Please try to keep these in alphabetical order E('ERR_ARG_NOT_ITERABLE', '%s must be iterable'); E('ERR_ASSERTION', (msg) => msg); +E('ERR_ENCODING_INVALID_ENCODED_DATA', + (enc) => `The encoded data was not valid for encoding ${enc}`); +E('ERR_ENCODING_NOT_SUPPORTED', + (enc) => `The "${enc}" encoding is not supported`); E('ERR_FALSY_VALUE_REJECTION', 'Promise was rejected with falsy value'); +E('ERR_HTTP_HEADERS_SENT', + 'Cannot render headers after they are sent to the client'); +E('ERR_HTTP_INVALID_STATUS_CODE', 'Invalid status code: %s'); +E('ERR_HTTP_TRAILER_INVALID', + 'Trailers are invalid with this transfer encoding'); +E('ERR_INDEX_OUT_OF_RANGE', 'Index out of range'); E('ERR_INVALID_ARG_TYPE', invalidArgType); E('ERR_INVALID_CALLBACK', 'callback must be a function'); E('ERR_INVALID_FD', (fd) => `"fd" must be a positive integer: ${fd}`); diff --git a/lib/util.js b/lib/util.js index 897970d39b1829..9db58e5458d8db 100644 --- a/lib/util.js +++ b/lib/util.js @@ -22,6 +22,7 @@ 'use strict'; const errors = require('internal/errors'); +const { TextDecoder, TextEncoder } = require('internal/encoding'); const { errname } = process.binding('uv'); @@ -1128,6 +1129,8 @@ module.exports = exports = { isPrimitive, log, promisify, + TextDecoder, + TextEncoder, // Deprecated Old Stuff debug: deprecate(debug, diff --git a/node.gyp b/node.gyp index 7879ef2524d01f..1650f1598bf02a 100644 --- a/node.gyp +++ b/node.gyp @@ -82,6 +82,7 @@ 'lib/internal/cluster/shared_handle.js', 'lib/internal/cluster/utils.js', 'lib/internal/cluster/worker.js', + 'lib/internal/encoding.js', 'lib/internal/errors.js', 'lib/internal/freelist.js', 'lib/internal/fs.js', diff --git a/src/node_buffer.cc b/src/node_buffer.cc index a88d0e86732252..d6e4aa9da072db 100644 --- a/src/node_buffer.cc +++ b/src/node_buffer.cc @@ -1200,6 +1200,27 @@ void Swap64(const FunctionCallbackInfo& args) { } +// Encode a single string to a UTF-8 Uint8Array (not Buffer). +// Used in TextEncoder.prototype.encode. +static void EncodeUtf8String(const FunctionCallbackInfo& args) { + Environment* env = Environment::GetCurrent(args); + CHECK_GE(args.Length(), 1); + CHECK(args[0]->IsString()); + + Local str = args[0].As(); + size_t length = str->Utf8Length(); + char* data = node::UncheckedMalloc(length); + str->WriteUtf8(data, + -1, // We are certain that `data` is sufficiently large + NULL, + String::NO_NULL_TERMINATION | String::REPLACE_INVALID_UTF8); + auto array_buf = ArrayBuffer::New(env->isolate(), data, length, + ArrayBufferCreationMode::kInternalized); + auto array = Uint8Array::New(array_buf, 0, length); + args.GetReturnValue().Set(array); +} + + // pass Buffer object to load prototype methods void SetupBufferJS(const FunctionCallbackInfo& args) { Environment* env = Environment::GetCurrent(args); @@ -1266,6 +1287,8 @@ void Initialize(Local target, env->SetMethod(target, "swap32", Swap32); env->SetMethod(target, "swap64", Swap64); + env->SetMethod(target, "encodeUtf8String", EncodeUtf8String); + target->Set(env->context(), FIXED_ONE_BYTE_STRING(env->isolate(), "kMaxLength"), Integer::NewFromUnsigned(env->isolate(), kMaxLength)).FromJust(); diff --git a/src/node_i18n.cc b/src/node_i18n.cc index 3b337449495f4c..2e1aeaa4cb07c5 100644 --- a/src/node_i18n.cc +++ b/src/node_i18n.cc @@ -50,6 +50,8 @@ #include "env-inl.h" #include "util.h" #include "util-inl.h" +#include "base-object.h" +#include "base-object-inl.h" #include "v8.h" #include @@ -86,10 +88,12 @@ namespace node { using v8::Context; using v8::FunctionCallbackInfo; +using v8::HandleScope; using v8::Isolate; using v8::Local; using v8::MaybeLocal; using v8::Object; +using v8::ObjectTemplate; using v8::String; using v8::Value; @@ -123,6 +127,15 @@ struct Converter { } } + explicit Converter(UConverter* converter, + const char* sub = NULL) : conv(converter) { + CHECK_NE(conv, nullptr); + UErrorCode status = U_ZERO_ERROR; + if (sub != NULL) { + ucnv_setSubstChars(conv, sub, strlen(sub), &status); + } + } + ~Converter() { ucnv_close(conv); } @@ -130,6 +143,143 @@ struct Converter { UConverter* conv; }; +class ConverterObject : public BaseObject, Converter { + public: + enum ConverterFlags { + CONVERTER_FLAGS_FLUSH = 0x1, + CONVERTER_FLAGS_FATAL = 0x2, + CONVERTER_FLAGS_IGNORE_BOM = 0x4 + }; + + ~ConverterObject() override {} + + static void Has(const FunctionCallbackInfo& args) { + Environment* env = Environment::GetCurrent(args); + HandleScope scope(env->isolate()); + + CHECK_GE(args.Length(), 1); + Utf8Value label(env->isolate(), args[0]); + + UErrorCode status = U_ZERO_ERROR; + UConverter* conv = ucnv_open(*label, &status); + args.GetReturnValue().Set(!!U_SUCCESS(status)); + ucnv_close(conv); + } + + static void Create(const FunctionCallbackInfo& args) { + Environment* env = Environment::GetCurrent(args); + HandleScope scope(env->isolate()); + + CHECK_GE(args.Length(), 2); + Utf8Value label(env->isolate(), args[0]); + int flags = args[1]->Uint32Value(env->context()).ToChecked(); + bool fatal = + (flags & CONVERTER_FLAGS_FATAL) == CONVERTER_FLAGS_FATAL; + bool ignoreBOM = + (flags & CONVERTER_FLAGS_IGNORE_BOM) == CONVERTER_FLAGS_IGNORE_BOM; + + UErrorCode status = U_ZERO_ERROR; + UConverter* conv = ucnv_open(*label, &status); + if (U_FAILURE(status)) + return; + + if (fatal) { + status = U_ZERO_ERROR; + ucnv_setToUCallBack(conv, UCNV_TO_U_CALLBACK_STOP, + nullptr, nullptr, nullptr, &status); + } + + Local t = ObjectTemplate::New(env->isolate()); + t->SetInternalFieldCount(1); + Local obj = t->NewInstance(env->context()).ToLocalChecked(); + new ConverterObject(env, obj, conv, ignoreBOM); + args.GetReturnValue().Set(obj); + } + + static void Decode(const FunctionCallbackInfo& args) { + Environment* env = Environment::GetCurrent(args); + + CHECK_GE(args.Length(), 3); // Converter, Buffer, Flags + + Converter utf8("utf8"); + ConverterObject* converter; + ASSIGN_OR_RETURN_UNWRAP(&converter, args[0].As()); + SPREAD_BUFFER_ARG(args[1], input_obj); + int flags = args[2]->Uint32Value(env->context()).ToChecked(); + + UErrorCode status = U_ZERO_ERROR; + MaybeStackBuffer result; + MaybeLocal ret; + size_t limit = ucnv_getMinCharSize(converter->conv) * + input_obj_length; + if (limit > 0) + result.AllocateSufficientStorage(limit); + + UBool flush = (flags & CONVERTER_FLAGS_FLUSH) == CONVERTER_FLAGS_FLUSH; + + const char* source = input_obj_data; + size_t source_length = input_obj_length; + + if (converter->unicode_ && !converter->ignoreBOM_ && !converter->bomSeen_) { + int32_t bomOffset = 0; + ucnv_detectUnicodeSignature(source, source_length, &bomOffset, &status); + source += bomOffset; + source_length -= bomOffset; + converter->bomSeen_ = true; + } + + UChar* target = *result; + ucnv_toUnicode(converter->conv, + &target, target + (limit * sizeof(UChar)), + &source, source + source_length, + NULL, flush, &status); + + if (U_SUCCESS(status)) { + if (limit > 0) + result.SetLength(target - &result[0]); + ret = ToBufferEndian(env, &result); + args.GetReturnValue().Set(ret.ToLocalChecked()); + goto reset; + } + + args.GetReturnValue().Set(status); + + reset: + if (flush) { + // Reset the converter state + converter->bomSeen_ = false; + ucnv_reset(converter->conv); + } + } + + protected: + ConverterObject(Environment* env, + v8::Local wrap, + UConverter* converter, + bool ignoreBOM, + const char* sub = NULL) : + BaseObject(env, wrap), + Converter(converter, sub), + ignoreBOM_(ignoreBOM) { + MakeWeak(this); + + switch (ucnv_getType(converter)) { + case UCNV_UTF8: + case UCNV_UTF16_BigEndian: + case UCNV_UTF16_LittleEndian: + unicode_ = true; + break; + default: + unicode_ = false; + } + } + + private: + bool unicode_ = false; // True if this is a Unicode converter + bool ignoreBOM_ = false; // True if the BOM should be ignored on Unicode + bool bomSeen_ = false; // True if the BOM has been seen +}; + // One-Shot Converters void CopySourceBuffer(MaybeStackBuffer* dest, @@ -717,6 +867,11 @@ void Init(Local target, // One-shot converters env->SetMethod(target, "icuErrName", ICUErrorName); env->SetMethod(target, "transcode", Transcode); + + // ConverterObject + env->SetMethod(target, "getConverter", ConverterObject::Create); + env->SetMethod(target, "decode", ConverterObject::Decode); + env->SetMethod(target, "hasConverter", ConverterObject::Has); } } // namespace i18n diff --git a/src/node_i18n.h b/src/node_i18n.h index adf9feb414df5c..f7801ce6668468 100644 --- a/src/node_i18n.h +++ b/src/node_i18n.h @@ -25,6 +25,7 @@ #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS #include "node.h" +#include #include #if defined(NODE_HAVE_I18N_SUPPORT) diff --git a/src/node_util.cc b/src/node_util.cc index 50de94bfb2bf3a..c1dff77386d927 100644 --- a/src/node_util.cc +++ b/src/node_util.cc @@ -21,6 +21,7 @@ using v8::Value; #define VALUE_METHOD_MAP(V) \ + V(isArrayBuffer, IsArrayBuffer) \ V(isAsyncFunction, IsAsyncFunction) \ V(isDataView, IsDataView) \ V(isDate, IsDate) \ diff --git a/test/parallel/test-whatwg-encoding.js b/test/parallel/test-whatwg-encoding.js new file mode 100644 index 00000000000000..c181df860ca149 --- /dev/null +++ b/test/parallel/test-whatwg-encoding.js @@ -0,0 +1,385 @@ +// Flags: --expose-internals +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const { TextEncoder, TextDecoder } = require('util'); +const { customInspectSymbol: inspect } = require('internal/util'); +const { getEncodingFromLabel } = require('internal/encoding'); + +const encoded = Buffer.from([0xef, 0xbb, 0xbf, 0x74, 0x65, + 0x73, 0x74, 0xe2, 0x82, 0xac]); + +if (!common.hasIntl) { + common.skip('WHATWG Encoding tests because ICU is not present.'); +} + +// Make Sure TextDecoder and TextEncoder exist +assert(TextDecoder); +assert(TextEncoder); + +// Test TextEncoder +const enc = new TextEncoder(); +assert(enc); +const buf = enc.encode('\ufefftest€'); + +assert.strictEqual(Buffer.compare(buf, encoded), 0); + + +// Test TextDecoder, UTF-8, fatal: false, ignoreBOM: false +{ + ['unicode-1-1-utf-8', 'utf8', 'utf-8'].forEach((i) => { + const dec = new TextDecoder(i); + const res = dec.decode(buf); + assert.strictEqual(res, 'test€'); + }); + + ['unicode-1-1-utf-8', 'utf8', 'utf-8'].forEach((i) => { + const dec = new TextDecoder(i); + let res = ''; + res += dec.decode(buf.slice(0, 8), { stream: true }); + res += dec.decode(buf.slice(8)); + assert.strictEqual(res, 'test€'); + }); +} + +// Test TextDecoder, UTF-8, fatal: false, ignoreBOM: true +{ + ['unicode-1-1-utf-8', 'utf8', 'utf-8'].forEach((i) => { + const dec = new TextDecoder(i, { ignoreBOM: true }); + const res = dec.decode(buf); + assert.strictEqual(res, '\ufefftest€'); + }); + + ['unicode-1-1-utf-8', 'utf8', 'utf-8'].forEach((i) => { + const dec = new TextDecoder(i, { ignoreBOM: true }); + let res = ''; + res += dec.decode(buf.slice(0, 8), { stream: true }); + res += dec.decode(buf.slice(8)); + assert.strictEqual(res, '\ufefftest€'); + }); +} + +// Test TextDecoder, UTF-8, fatal: true, ignoreBOM: false +{ + ['unicode-1-1-utf-8', 'utf8', 'utf-8'].forEach((i) => { + const dec = new TextDecoder(i, { fatal: true }); + assert.throws(() => dec.decode(buf.slice(0, 8)), + common.expectsError({ + code: 'ERR_ENCODING_INVALID_ENCODED_DATA', + type: TypeError, + message: + /^The encoded data was not valid for encoding utf-8$/ + })); + }); + + ['unicode-1-1-utf-8', 'utf8', 'utf-8'].forEach((i) => { + const dec = new TextDecoder(i, { fatal: true }); + assert.doesNotThrow(() => dec.decode(buf.slice(0, 8), { stream: true })); + assert.doesNotThrow(() => dec.decode(buf.slice(8))); + }); +} + +// Test TextDecoder, UTF-16le +{ + const dec = new TextDecoder('utf-16le'); + const res = dec.decode(Buffer.from('test€', 'utf-16le')); + assert.strictEqual(res, 'test€'); +} + +// Test TextDecoder, UTF-16be +{ + const dec = new TextDecoder('utf-16be'); + const res = dec.decode(Buffer.from([0x00, 0x74, 0x00, 0x65, 0x00, + 0x73, 0x00, 0x74, 0x20, 0xac])); + assert.strictEqual(res, 'test€'); +} + +{ + const fn = TextDecoder.prototype[inspect]; + fn.call(new TextDecoder(), Infinity, {}); + + [{}, [], true, 1, '', new TextEncoder()].forEach((i) => { + assert.throws(() => fn.call(i, Infinity, {}), + common.expectsError({ + code: 'ERR_INVALID_THIS', + message: 'Value of "this" must be of type TextDecoder' + })); + }); +} + +{ + const fn = TextEncoder.prototype[inspect]; + fn.call(new TextEncoder(), Infinity, {}); + + [{}, [], true, 1, '', new TextDecoder()].forEach((i) => { + assert.throws(() => fn.call(i, Infinity, {}), + common.expectsError({ + code: 'ERR_INVALID_THIS', + message: 'Value of "this" must be of type TextEncoder' + })); + }); +} + +// Test Encoding Mappings +{ + + const mappings = { + 'utf-8': [ + 'unicode-1-1-utf-8', + 'utf8' + ], + 'utf-16be': [], + 'utf-16le': [ + 'utf-16' + ], + 'ibm866': [ + '866', + 'cp866', + 'csibm866' + ], + 'iso-8859-2': [ + 'csisolatin2', + 'iso-ir-101', + 'iso8859-2', + 'iso88592', + 'iso_8859-2', + 'iso_8859-2:1987', + 'l2', + 'latin2' + ], + 'iso-8859-3': [ + 'csisolatin3', + 'iso-ir-109', + 'iso8859-3', + 'iso88593', + 'iso_8859-3', + 'iso_8859-3:1988', + 'l3', + 'latin3' + ], + 'iso-8859-4': [ + 'csisolatin4', + 'iso-ir-110', + 'iso8859-4', + 'iso88594', + 'iso_8859-4', + 'iso_8859-4:1988', + 'l4', + 'latin4' + ], + 'iso-8859-5': [ + 'csisolatincyrillic', + 'cyrillic', + 'iso-ir-144', + 'iso8859-5', + 'iso88595', + 'iso_8859-5', + 'iso_8859-5:1988' + ], + 'iso-8859-6': [ + 'arabic', + 'asmo-708', + 'csiso88596e', + 'csiso88596i', + 'csisolatinarabic', + 'ecma-114', + 'iso-8859-6-e', + 'iso-8859-6-i', + 'iso-ir-127', + 'iso8859-6', + 'iso88596', + 'iso_8859-6', + 'iso_8859-6:1987' + ], + 'iso-8859-7': [ + 'csisolatingreek', + 'ecma-118', + 'elot_928', + 'greek', + 'greek8', + 'iso-ir-126', + 'iso8859-7', + 'iso88597', + 'iso_8859-7', + 'iso_8859-7:1987', + 'sun_eu_greek' + ], + 'iso-8859-8': [ + 'csiso88598e', + 'csisolatinhebrew', + 'hebrew', + 'iso-8859-8-e', + 'iso-ir-138', + 'iso8859-8', + 'iso88598', + 'iso_8859-8', + 'iso_8859-8:1988', + 'visual' + ], + 'iso-8859-8-i': [ + 'csiso88598i', + 'logical' + ], + 'iso-8859-10': [ + 'csisolatin6', + 'iso-ir-157', + 'iso8859-10', + 'iso885910', + 'l6', + 'latin6' + ], + 'iso-8859-13': [ + 'iso8859-13', + 'iso885913' + ], + 'iso-8859-14': [ + 'iso8859-14', + 'iso885914' + ], + 'iso-8859-15': [ + 'csisolatin9', + 'iso8859-15', + 'iso885915', + 'iso_8859-15', + 'l9' + ], + 'koi8-r': [ + 'cskoi8r', + 'koi', + 'koi8', + 'koi8_r' + ], + 'koi8-u': [ + 'koi8-ru' + ], + 'macintosh': [ + 'csmacintosh', + 'mac', + 'x-mac-roman' + ], + 'windows-874': [ + 'dos-874', + 'iso-8859-11', + 'iso8859-11', + 'iso885911', + 'tis-620' + ], + 'windows-1250': [ + 'cp1250', + 'x-cp1250' + ], + 'windows-1251': [ + 'cp1251', + 'x-cp1251' + ], + 'windows-1252': [ + 'ansi_x3.4-1968', + 'ascii', + 'cp1252', + 'cp819', + 'csisolatin1', + 'ibm819', + 'iso-8859-1', + 'iso-ir-100', + 'iso8859-1', + 'iso88591', + 'iso_8859-1', + 'iso_8859-1:1987', + 'l1', + 'latin1', + 'us-ascii', + 'x-cp1252' + ], + 'windows-1253': [ + 'cp1253', + 'x-cp1253' + ], + 'windows-1254': [ + 'cp1254', + 'csisolatin5', + 'iso-8859-9', + 'iso-ir-148', + 'iso8859-9', + 'iso88599', + 'iso_8859-9', + 'iso_8859-9:1989', + 'l5', + 'latin5', + 'x-cp1254' + ], + 'windows-1255': [ + 'cp1255', + 'x-cp1255' + ], + 'windows-1256': [ + 'cp1256', + 'x-cp1256' + ], + 'windows-1257': [ + 'cp1257', + 'x-cp1257' + ], + 'windows-1258': [ + 'cp1258', + 'x-cp1258' + ], + 'x-mac-cyrillic': [ + 'x-mac-ukrainian' + ], + 'gbk': [ + 'chinese', + 'csgb2312', + 'csiso58gb231280', + 'gb2312', + 'gb_2312', + 'gb_2312-80', + 'iso-ir-58', + 'x-gbk' + ], + 'gb18030': [ ], + 'big5': [ + 'big5-hkscs', + 'cn-big5', + 'csbig5', + 'x-x-big5' + ], + 'euc-jp': [ + 'cseucpkdfmtjapanese', + 'x-euc-jp' + ], + 'iso-2022-jp': [ + 'csiso2022jp' + ], + 'shift_jis': [ + 'csshiftjis', + 'ms932', + 'ms_kanji', + 'shift-jis', + 'sjis', + 'windows-31j', + 'x-sjis' + ], + 'euc-kr': [ + ' euc-kr \t', + 'EUC-kr \n', + 'cseuckr', + 'csksc56011987', + 'iso-ir-149', + 'korean', + 'ks_c_5601-1987', + 'ks_c_5601-1989', + 'ksc5601', + 'ksc_5601', + 'windows-949' + ] + }; + Object.entries(mappings).forEach((i) => { + const enc = i[0]; + const labels = i[1]; + assert.strictEqual(getEncodingFromLabel(enc), enc); + labels.forEach((l) => assert.strictEqual(getEncodingFromLabel(l), enc)); + }); + + assert.strictEqual(getEncodingFromLabel('made-up'), undefined); +} diff --git a/tools/icu/icu-generic.gyp b/tools/icu/icu-generic.gyp index 4c2125a0435b02..93d7cd5f6d9f39 100644 --- a/tools/icu/icu-generic.gyp +++ b/tools/icu/icu-generic.gyp @@ -30,15 +30,6 @@ 'type': 'none', 'toolsets': [ 'host', 'target' ], 'direct_dependent_settings': { - 'conditions': [ - [ 'icu_endianness == "l"', { - 'defines': [ - # ICU cannot swap the initial data without this. - # http://bugs.icu-project.org/trac/ticket/11046 - 'UCONFIG_NO_LEGACY_CONVERSION=1' - ], - }], - ], 'defines': [ 'UCONFIG_NO_SERVICE=1', 'UCONFIG_NO_REGULAR_EXPRESSIONS=1', From b6bd3cf00fd153b915512c0ed3301e2553bc29c0 Mon Sep 17 00:00:00 2001 From: Vse Mozhet Byt Date: Wed, 26 Jul 2017 00:02:37 +0300 Subject: [PATCH 120/157] doc: cross-link util.TextDecoder and intl.md Also, note about builds without ICU and ASCII-sort some bottom references. PR-URL: https://github.com/nodejs/node/pull/14486 Reviewed-By: Luigi Pinca Reviewed-By: James M Snell --- doc/api/intl.md | 23 +++++++++++++---------- doc/api/util.md | 10 ++++++---- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/doc/api/intl.md b/doc/api/intl.md index c0d6b82289264f..753932c91c25f7 100644 --- a/doc/api/intl.md +++ b/doc/api/intl.md @@ -16,6 +16,7 @@ programs. Some of them are: - The [WHATWG URL parser][]'s [internationalized domain names][] (IDNs) support - [`require('buffer').transcode()`][] - More accurate [REPL][] line editing +- [`require('util').TextDecoder`][] Node.js (and its underlying V8 engine) uses [ICU][] to implement these features in native C/C++ code. However, some of them require a very large ICU data file @@ -51,6 +52,7 @@ option: | [WHATWG URL Parser][] | partial (no IDN support) | full | full | full | [`require('buffer').transcode()`][] | none (function does not exist) | full | full | full | [REPL][] | partial (inaccurate line editing) | full | full | full +| [`require('util').TextDecoder`][] | none (class does not exist) | partial/full (depends on OS) | partial (Unicode-only) | full *Note*: The "(not locale-aware)" designation denotes that the function carries out its operation just like the non-`Locale` version of the function, if one @@ -184,26 +186,27 @@ to be helpful: - [Test262][]: ECMAScript's official conformance test suite includes a section dedicated to ECMA-402. -[btest402]: https://github.com/srl295/btest402 -[BUILDING.md]: https://github.com/nodejs/node/blob/master/BUILDING.md -[BUILDING.md#full-icu]: https://github.com/nodejs/node/blob/master/BUILDING.md#build-with-full-icu-support-all-locales-supported-by-icu -[`Date.prototype.toLocaleString()`]: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString -[ECMA-262]: https://tc39.github.io/ecma262/ -[ECMA-402]: https://tc39.github.io/ecma402/ -[full-icu]: https://www.npmjs.com/package/full-icu -[ICU]: http://icu-project.org/ ["ICU Data"]: http://userguide.icu-project.org/icudata [`--icu-data-dir`]: cli.html#cli_icu_data_dir_file -[internationalized domain names]: https://en.wikipedia.org/wiki/Internationalized_domain_name +[`Date.prototype.toLocaleString()`]: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString [`Intl`]: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Intl [`Intl.DateTimeFormat`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat [`NODE_ICU_DATA`]: cli.html#cli_node_icu_data_file [`Number.prototype.toLocaleString()`]: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString -[REPL]: repl.html#repl_repl [`require('buffer').transcode()`]: buffer.html#buffer_buffer_transcode_source_fromenc_toenc +[`require('util').TextDecoder`]: util.html#util_class_util_textdecoder [`String.prototype.localeCompare()`]: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare [`String.prototype.normalize()`]: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/String/normalize [`String.prototype.toLowerCase()`]: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/String/toLowerCase [`String.prototype.toUpperCase()`]: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase +[BUILDING.md]: https://github.com/nodejs/node/blob/master/BUILDING.md +[BUILDING.md#full-icu]: https://github.com/nodejs/node/blob/master/BUILDING.md#build-with-full-icu-support-all-locales-supported-by-icu +[ECMA-262]: https://tc39.github.io/ecma262/ +[ECMA-402]: https://tc39.github.io/ecma402/ +[ICU]: http://icu-project.org/ +[REPL]: repl.html#repl_repl [Test262]: https://github.com/tc39/test262/tree/master/test/intl402 [WHATWG URL parser]: url.html#url_the_whatwg_url_api +[btest402]: https://github.com/srl295/btest402 +[full-icu]: https://www.npmjs.com/package/full-icu +[internationalized domain names]: https://en.wikipedia.org/wiki/Internationalized_domain_name diff --git a/doc/api/util.md b/doc/api/util.md index ab26ed9c28a514..27bf540915cecb 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -560,7 +560,8 @@ string += decoder.decode(); // end-of-stream Per the [WHATWG Encoding Standard][], the encodings supported by the `TextDecoder` API are outlined in the tables below. For each encoding, one or more aliases may be used. Support for some encodings is enabled -only when Node.js is using the full ICU data. +only when Node.js is using the full ICU data (see [Internationalization][]). +`util.TextDecoder` is `undefined` when ICU is not enabled during build. ##### Encodings Supported By Default @@ -1158,18 +1159,19 @@ deprecated: v0.11.3 Deprecated predecessor of `console.log`. +[`'uncaughtException'`]: process.html#process_event_uncaughtexception [`Array.isArray`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray [`Buffer.isBuffer()`]: buffer.html#buffer_class_method_buffer_isbuffer_obj [`Error`]: errors.html#errors_class_error [`Object.assign()`]: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign [`console.error()`]: console.html#console_console_error_data_args [`console.log()`]: console.html#console_console_log_data_args -[`'uncaughtException'`]: process.html#process_event_uncaughtexception [`util.inspect()`]: #util_util_inspect_object_options [`util.promisify()`]: #util_util_promisify_original [Custom inspection functions on Objects]: #util_custom_inspection_functions_on_objects -[Customizing `util.inspect` colors]: #util_customizing_util_inspect_colors [Custom promisified functions]: #util_custom_promisified_functions +[Customizing `util.inspect` colors]: #util_customizing_util_inspect_colors +[Internationalization]: intl.html +[WHATWG Encoding Standard]: https://encoding.spec.whatwg.org/ [constructor]: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/constructor [semantically incompatible]: https://github.com/nodejs/node/issues/4179 -[WHATWG Encoding Standard]: https://encoding.spec.whatwg.org/ From 87e108059b15ee05ae65d65ad37f97a47983629a Mon Sep 17 00:00:00 2001 From: Jimmy Thomson Date: Fri, 28 Jul 2017 14:47:52 -0700 Subject: [PATCH 121/157] build: fix build without icu When building without ICU (`vcbuild.bat intl-none`) the unicode/ucnv.h header is not available, which causes compilation errors. PR-URL: https://github.com/nodejs/node/pull/14533 Reviewed-By: Timothy Gu Reviewed-By: Refael Ackermann Reviewed-By: James M Snell --- src/node_i18n.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/node_i18n.h b/src/node_i18n.h index f7801ce6668468..adf9feb414df5c 100644 --- a/src/node_i18n.h +++ b/src/node_i18n.h @@ -25,7 +25,6 @@ #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS #include "node.h" -#include #include #if defined(NODE_HAVE_I18N_SUPPORT) From 51c1afafa665f8e88dde61794596a8e24b06cb63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Sun, 30 Jul 2017 22:36:29 +0200 Subject: [PATCH 122/157] crypto: change segmentation faults to CHECKs PR-URL: https://github.com/nodejs/node/pull/14548 Fixes: https://github.com/nodejs/node/issues/14519 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Reviewed-By: Timothy Gu Reviewed-By: Colin Ihrig --- src/node_crypto.cc | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index d03d8ad2f2ce8d..9f4ab846cb8b15 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -5424,8 +5424,13 @@ void PBKDF2(const FunctionCallbackInfo& args) { if (args[5]->IsFunction()) { obj->Set(env->ondone_string(), args[5]); - if (env->in_domain()) - obj->Set(env->domain_string(), env->domain_array()->Get(0)); + if (env->in_domain()) { + obj->Set(env->context(), + env->domain_string(), + env->domain_array()->Get(env->context(), 0).ToLocalChecked()) + .FromJust(); + } + uv_queue_work(env->event_loop(), req->work_req(), PBKDF2Request::Work, @@ -5627,8 +5632,13 @@ void RandomBytes(const FunctionCallbackInfo& args) { if (args[1]->IsFunction()) { obj->Set(env->ondone_string(), args[1]); - if (env->in_domain()) - obj->Set(env->domain_string(), env->domain_array()->Get(0)); + if (env->in_domain()) { + obj->Set(env->context(), + env->domain_string(), + env->domain_array()->Get(env->context(), 0).ToLocalChecked()) + .FromJust(); + } + uv_queue_work(env->event_loop(), req->work_req(), RandomBytesWork, @@ -5673,7 +5683,8 @@ void RandomBytesBuffer(const FunctionCallbackInfo& args) { if (env->in_domain()) { obj->Set(env->context(), env->domain_string(), - env->domain_array()->Get(0)).FromJust(); + env->domain_array()->Get(env->context(), 0).ToLocalChecked()) + .FromJust(); } uv_queue_work(env->event_loop(), From fa3aa2e1f7eb1337984741bf3c5f72fb07dfc1bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Mon, 31 Jul 2017 02:05:20 +0200 Subject: [PATCH 123/157] src: return MaybeLocal in AsyncWrap::MakeCallback PR-URL: https://github.com/nodejs/node/pull/14549 Reviewed-By: Ben Noordhuis Reviewed-By: James M Snell Reviewed-By: Anna Henningsen Reviewed-By: Timothy Gu Reviewed-By: Colin Ihrig --- src/async-wrap-inl.h | 4 ++-- src/async-wrap.cc | 19 +++++++++---------- src/async-wrap.h | 20 ++++++++++---------- src/js_stream.cc | 21 +++++++++++++-------- src/node_http_parser.cc | 15 ++++++++++----- 5 files changed, 44 insertions(+), 35 deletions(-) diff --git a/src/async-wrap-inl.h b/src/async-wrap-inl.h index 75306a3b0ddfc1..4f8b7c3f8dd914 100644 --- a/src/async-wrap-inl.h +++ b/src/async-wrap-inl.h @@ -51,7 +51,7 @@ inline double AsyncWrap::get_trigger_id() const { } -inline v8::Local AsyncWrap::MakeCallback( +inline v8::MaybeLocal AsyncWrap::MakeCallback( const v8::Local symbol, int argc, v8::Local* argv) { @@ -61,7 +61,7 @@ inline v8::Local AsyncWrap::MakeCallback( } -inline v8::Local AsyncWrap::MakeCallback( +inline v8::MaybeLocal AsyncWrap::MakeCallback( uint32_t index, int argc, v8::Local* argv) { diff --git a/src/async-wrap.cc b/src/async-wrap.cc index 3c42fa736e8380..f336a49307557c 100644 --- a/src/async-wrap.cc +++ b/src/async-wrap.cc @@ -674,9 +674,9 @@ void AsyncWrap::EmitAsyncInit(Environment* env, } -Local AsyncWrap::MakeCallback(const Local cb, - int argc, - Local* argv) { +MaybeLocal AsyncWrap::MakeCallback(const Local cb, + int argc, + Local* argv) { CHECK(env()->context() == env()->isolate()->GetCurrentContext()); Environment::AsyncCallbackScope callback_scope(env()); @@ -686,15 +686,14 @@ Local AsyncWrap::MakeCallback(const Local cb, get_trigger_id()); if (!PreCallbackExecution(this, true)) { - return Local(); + return MaybeLocal(); } // Finally... Get to running the user's callback. MaybeLocal ret = cb->Call(env()->context(), object(), argc, argv); - Local ret_v; - if (!ret.ToLocal(&ret_v)) { - return Local(); + if (ret.IsEmpty()) { + return ret; } if (!PostCallbackExecution(this, true)) { @@ -704,7 +703,7 @@ Local AsyncWrap::MakeCallback(const Local cb, exec_scope.Dispose(); if (callback_scope.in_makecallback()) { - return ret_v; + return ret; } Environment::TickInfo* tick_info = env()->tick_info(); @@ -722,7 +721,7 @@ Local AsyncWrap::MakeCallback(const Local cb, if (tick_info->length() == 0) { tick_info->set_index(0); - return ret_v; + return ret; } MaybeLocal rcheck = @@ -735,7 +734,7 @@ Local AsyncWrap::MakeCallback(const Local cb, CHECK_EQ(env()->current_async_id(), 0); CHECK_EQ(env()->trigger_id(), 0); - return rcheck.IsEmpty() ? Local() : ret_v; + return rcheck.IsEmpty() ? MaybeLocal() : ret; } diff --git a/src/async-wrap.h b/src/async-wrap.h index 8b195a0f535e51..a123ae06e8e936 100644 --- a/src/async-wrap.h +++ b/src/async-wrap.h @@ -122,16 +122,16 @@ class AsyncWrap : public BaseObject { void AsyncReset(bool silent = false); // Only call these within a valid HandleScope. - // TODO(trevnorris): These should return a MaybeLocal. - v8::Local MakeCallback(const v8::Local cb, - int argc, - v8::Local* argv); - inline v8::Local MakeCallback(const v8::Local symbol, - int argc, - v8::Local* argv); - inline v8::Local MakeCallback(uint32_t index, - int argc, - v8::Local* argv); + v8::MaybeLocal MakeCallback(const v8::Local cb, + int argc, + v8::Local* argv); + inline v8::MaybeLocal MakeCallback( + const v8::Local symbol, + int argc, + v8::Local* argv); + inline v8::MaybeLocal MakeCallback(uint32_t index, + int argc, + v8::Local* argv); virtual size_t self_size() const = 0; diff --git a/src/js_stream.cc b/src/js_stream.cc index 2644a6a451a00f..d88cc853c800cc 100644 --- a/src/js_stream.cc +++ b/src/js_stream.cc @@ -16,6 +16,7 @@ using v8::FunctionCallbackInfo; using v8::FunctionTemplate; using v8::HandleScope; using v8::Local; +using v8::MaybeLocal; using v8::Object; using v8::Value; @@ -46,22 +47,26 @@ bool JSStream::IsAlive() { v8::Local fn = object()->Get(env()->isalive_string()); if (!fn->IsFunction()) return false; - return MakeCallback(fn.As(), 0, nullptr)->IsTrue(); + return MakeCallback(fn.As(), 0, nullptr) + .ToLocalChecked()->IsTrue(); } bool JSStream::IsClosing() { - return MakeCallback(env()->isclosing_string(), 0, nullptr)->IsTrue(); + return MakeCallback(env()->isclosing_string(), 0, nullptr) + .ToLocalChecked()->IsTrue(); } int JSStream::ReadStart() { - return MakeCallback(env()->onreadstart_string(), 0, nullptr)->Int32Value(); + return MakeCallback(env()->onreadstart_string(), 0, nullptr) + .ToLocalChecked()->Int32Value(); } int JSStream::ReadStop() { - return MakeCallback(env()->onreadstop_string(), 0, nullptr)->Int32Value(); + return MakeCallback(env()->onreadstop_string(), 0, nullptr) + .ToLocalChecked()->Int32Value(); } @@ -73,10 +78,10 @@ int JSStream::DoShutdown(ShutdownWrap* req_wrap) { }; req_wrap->Dispatched(); - Local res = + MaybeLocal res = MakeCallback(env()->onshutdown_string(), arraysize(argv), argv); - return res->Int32Value(); + return res.ToLocalChecked()->Int32Value(); } @@ -101,10 +106,10 @@ int JSStream::DoWrite(WriteWrap* w, }; w->Dispatched(); - Local res = + MaybeLocal res = MakeCallback(env()->onwrite_string(), arraysize(argv), argv); - return res->Int32Value(); + return res.ToLocalChecked()->Int32Value(); } diff --git a/src/node_http_parser.cc b/src/node_http_parser.cc index 90fc3b41b525f7..c897a771a5225b 100644 --- a/src/node_http_parser.cc +++ b/src/node_http_parser.cc @@ -62,6 +62,7 @@ using v8::FunctionTemplate; using v8::HandleScope; using v8::Integer; using v8::Local; +using v8::MaybeLocal; using v8::Object; using v8::String; using v8::Uint32; @@ -308,7 +309,7 @@ class Parser : public AsyncWrap { Environment::AsyncCallbackScope callback_scope(env()); - Local head_response = + MaybeLocal head_response = MakeCallback(cb.As(), arraysize(argv), argv); if (head_response.IsEmpty()) { @@ -316,7 +317,7 @@ class Parser : public AsyncWrap { return -1; } - return head_response->IntegerValue(); + return head_response.ToLocalChecked()->IntegerValue(); } @@ -344,7 +345,9 @@ class Parser : public AsyncWrap { Integer::NewFromUnsigned(env()->isolate(), length) }; - Local r = MakeCallback(cb.As(), arraysize(argv), argv); + MaybeLocal r = MakeCallback(cb.As(), + arraysize(argv), + argv); if (r.IsEmpty()) { got_exception_ = true; @@ -369,7 +372,7 @@ class Parser : public AsyncWrap { Environment::AsyncCallbackScope callback_scope(env()); - Local r = MakeCallback(cb.As(), 0, nullptr); + MaybeLocal r = MakeCallback(cb.As(), 0, nullptr); if (r.IsEmpty()) { got_exception_ = true; @@ -702,7 +705,9 @@ class Parser : public AsyncWrap { url_.ToString(env()) }; - Local r = MakeCallback(cb.As(), arraysize(argv), argv); + MaybeLocal r = MakeCallback(cb.As(), + arraysize(argv), + argv); if (r.IsEmpty()) got_exception_ = true; From 44ad55d493bea1003dff5133e3784225cd62e95a Mon Sep 17 00:00:00 2001 From: Myles Borins Date: Tue, 1 Aug 2017 13:27:04 -0500 Subject: [PATCH 124/157] deps: update V8 to 6.0.286.52 PR-URL: https://github.com/nodejs/node/pull/14574 Reviewed-By: Anna Henningsen Reviewed-By: Refael Ackermann --- deps/v8/.gitignore | 48 +- deps/v8/AUTHORS | 4 +- deps/v8/BUILD.gn | 654 ++- deps/v8/ChangeLog | 2635 ++++++++++ deps/v8/DEPS | 45 +- deps/v8/Makefile | 7 - deps/v8/OWNERS | 1 - deps/v8/PRESUBMIT.py | 42 +- .../trace_event/common/trace_event_common.h | 6 + deps/v8/codereview.settings | 6 +- deps/v8/gni/isolate.gni | 7 - deps/v8/gni/v8.gni | 6 +- deps/v8/gypfiles/all.gyp | 13 +- deps/v8/gypfiles/coverage_wrapper.py | 2 + deps/v8/gypfiles/features.gypi | 11 +- deps/v8/gypfiles/isolate.gypi | 1 - deps/v8/gypfiles/standalone.gypi | 34 +- deps/v8/gypfiles/toolchain.gypi | 5 +- deps/v8/include/libplatform/libplatform.h | 27 +- deps/v8/include/v8-platform.h | 8 + deps/v8/include/v8-value-serializer-version.h | 24 + deps/v8/include/v8-version.h | 8 +- deps/v8/include/v8.h | 510 +- deps/v8/include/v8config.h | 2 +- deps/v8/infra/config/cq.cfg | 4 +- deps/v8/infra/mb/mb_config.pyl | 98 +- deps/v8/src/DEPS | 5 + deps/v8/src/OWNERS | 5 +- deps/v8/src/accessors.cc | 24 +- deps/v8/src/accessors.h | 2 - deps/v8/src/api-arguments.h | 5 +- deps/v8/src/api-natives.cc | 95 +- deps/v8/src/api.cc | 957 ++-- deps/v8/src/api.h | 30 +- deps/v8/src/arm/assembler-arm-inl.h | 185 +- deps/v8/src/arm/assembler-arm.cc | 995 ++-- deps/v8/src/arm/assembler-arm.h | 543 ++- deps/v8/src/arm/code-stubs-arm.cc | 418 +- deps/v8/src/arm/code-stubs-arm.h | 4 +- deps/v8/src/arm/codegen-arm.cc | 16 +- deps/v8/src/arm/constants-arm.h | 19 +- deps/v8/src/arm/deoptimizer-arm.cc | 71 +- deps/v8/src/arm/disasm-arm.cc | 321 +- deps/v8/src/arm/frames-arm.cc | 8 +- deps/v8/src/arm/frames-arm.h | 16 +- deps/v8/src/arm/interface-descriptors-arm.cc | 65 +- deps/v8/src/arm/macro-assembler-arm.cc | 503 +- deps/v8/src/arm/macro-assembler-arm.h | 129 +- deps/v8/src/arm/simulator-arm.cc | 1385 +++--- deps/v8/src/arm/simulator-arm.h | 25 +- deps/v8/src/arm64/assembler-arm64-inl.h | 69 +- deps/v8/src/arm64/assembler-arm64.cc | 72 +- deps/v8/src/arm64/assembler-arm64.h | 185 +- deps/v8/src/arm64/code-stubs-arm64.cc | 528 +- deps/v8/src/arm64/code-stubs-arm64.h | 40 +- deps/v8/src/arm64/codegen-arm64.cc | 2 + deps/v8/src/arm64/constants-arm64.h | 11 +- deps/v8/src/arm64/deoptimizer-arm64.cc | 78 +- deps/v8/src/arm64/disasm-arm64.cc | 11 +- deps/v8/src/arm64/eh-frame-arm64.cc | 1 + deps/v8/src/arm64/instructions-arm64.cc | 21 +- deps/v8/src/arm64/instructions-arm64.h | 10 +- deps/v8/src/arm64/instrument-arm64.cc | 60 +- .../src/arm64/interface-descriptors-arm64.cc | 64 +- deps/v8/src/arm64/macro-assembler-arm64-inl.h | 27 +- deps/v8/src/arm64/macro-assembler-arm64.cc | 289 +- deps/v8/src/arm64/macro-assembler-arm64.h | 111 +- deps/v8/src/arm64/simulator-arm64.cc | 383 +- deps/v8/src/arm64/simulator-arm64.h | 102 +- deps/v8/src/asmjs/OWNERS | 3 - deps/v8/src/asmjs/asm-js.cc | 509 +- deps/v8/src/asmjs/asm-js.h | 20 +- deps/v8/src/asmjs/asm-names.h | 111 + deps/v8/src/asmjs/asm-parser.cc | 2460 ++++++++++ deps/v8/src/asmjs/asm-parser.h | 341 ++ deps/v8/src/asmjs/asm-scanner.cc | 432 ++ deps/v8/src/asmjs/asm-scanner.h | 176 + deps/v8/src/asmjs/asm-typer.cc | 2963 ------------ deps/v8/src/asmjs/asm-typer.h | 420 -- deps/v8/src/asmjs/asm-types.h | 6 +- deps/v8/src/asmjs/asm-wasm-builder.cc | 2017 -------- deps/v8/src/asmjs/asm-wasm-builder.h | 45 - deps/v8/src/asmjs/switch-logic.h | 7 +- deps/v8/src/assembler.cc | 176 +- deps/v8/src/assembler.h | 93 +- deps/v8/src/ast/ast-expression-rewriter.cc | 11 +- deps/v8/src/ast/ast-numbering.cc | 78 +- deps/v8/src/ast/ast-numbering.h | 30 +- deps/v8/src/ast/ast-traversal-visitor.h | 9 +- deps/v8/src/ast/ast-types.cc | 12 +- deps/v8/src/ast/ast-value-factory.cc | 96 +- deps/v8/src/ast/ast-value-factory.h | 232 +- deps/v8/src/ast/ast.cc | 172 +- deps/v8/src/ast/ast.h | 373 +- deps/v8/src/ast/compile-time-value.cc | 20 +- deps/v8/src/ast/compile-time-value.h | 15 +- deps/v8/src/ast/context-slot-cache.h | 2 +- deps/v8/src/ast/modules.h | 3 +- deps/v8/src/ast/prettyprinter.cc | 73 +- deps/v8/src/ast/scopes.cc | 344 +- deps/v8/src/ast/scopes.h | 97 +- deps/v8/src/ast/variables.cc | 1 + deps/v8/src/ast/variables.h | 57 +- deps/v8/src/background-parsing-task.cc | 12 +- deps/v8/src/bailout-reason.h | 12 +- deps/v8/src/base/bits.cc | 36 +- deps/v8/src/base/bits.h | 12 +- deps/v8/src/base/build_config.h | 6 +- deps/v8/src/base/cpu.cc | 3 + deps/v8/src/base/cpu.h | 2 + deps/v8/src/base/debug/stack_trace.h | 2 +- deps/v8/src/base/debug/stack_trace_win.cc | 4 +- deps/v8/src/base/export-template.h | 163 + deps/v8/src/base/iterator.h | 7 +- deps/v8/src/base/logging.cc | 16 +- deps/v8/src/base/logging.h | 15 +- deps/v8/src/base/platform/mutex.cc | 2 +- deps/v8/src/base/platform/platform-aix.cc | 20 +- deps/v8/src/base/platform/platform-cygwin.cc | 21 +- deps/v8/src/base/platform/platform-freebsd.cc | 30 +- deps/v8/src/base/platform/platform-linux.cc | 23 +- deps/v8/src/base/platform/platform-macos.cc | 30 +- deps/v8/src/base/platform/platform-openbsd.cc | 30 +- deps/v8/src/base/platform/platform-posix.cc | 59 +- deps/v8/src/base/platform/platform-posix.h | 31 + deps/v8/src/base/platform/platform-qnx.cc | 30 +- deps/v8/src/base/platform/platform-solaris.cc | 22 +- deps/v8/src/base/platform/platform-win32.cc | 97 +- deps/v8/src/base/platform/platform.h | 26 +- deps/v8/src/base/timezone-cache.h | 38 + deps/v8/src/bootstrapper.cc | 893 ++-- deps/v8/src/bootstrapper.h | 35 +- deps/v8/src/builtins/arm/builtins-arm.cc | 776 +-- deps/v8/src/builtins/arm64/builtins-arm64.cc | 743 +-- deps/v8/src/builtins/builtins-api.cc | 9 +- ...arguments.cc => builtins-arguments-gen.cc} | 47 +- ...s-arguments.h => builtins-arguments-gen.h} | 0 deps/v8/src/builtins/builtins-array-gen.cc | 2454 ++++++++++ deps/v8/src/builtins/builtins-array.cc | 1625 +------ deps/v8/src/builtins/builtins-arraybuffer.cc | 261 +- ...tion.cc => builtins-async-function-gen.cc} | 47 +- ...uiltins-async.cc => builtins-async-gen.cc} | 69 +- ...{builtins-async.h => builtins-async-gen.h} | 12 +- .../builtins/builtins-async-generator-gen.cc | 511 ++ ...ator.cc => builtins-async-iterator-gen.cc} | 134 +- deps/v8/src/builtins/builtins-boolean-gen.cc | 37 + deps/v8/src/builtins/builtins-boolean.cc | 30 - deps/v8/src/builtins/builtins-call-gen.cc | 94 + deps/v8/src/builtins/builtins-call.cc | 83 +- deps/v8/src/builtins/builtins-callsite.cc | 1 + deps/v8/src/builtins/builtins-console-gen.cc | 38 + deps/v8/src/builtins/builtins-console.cc | 59 + ...tructor.cc => builtins-constructor-gen.cc} | 435 +- .../src/builtins/builtins-constructor-gen.h | 49 + deps/v8/src/builtins/builtins-constructor.h | 59 +- .../src/builtins/builtins-conversion-gen.cc | 371 ++ deps/v8/src/builtins/builtins-conversion.cc | 507 -- deps/v8/src/builtins/builtins-dataview.cc | 4 +- deps/v8/src/builtins/builtins-date-gen.cc | 258 + deps/v8/src/builtins/builtins-date.cc | 276 -- deps/v8/src/builtins/builtins-definitions.h | 1066 +++++ deps/v8/src/builtins/builtins-descriptors.h | 52 + deps/v8/src/builtins/builtins-forin-gen.cc | 206 + deps/v8/src/builtins/builtins-forin-gen.h | 34 + deps/v8/src/builtins/builtins-function-gen.cc | 180 + deps/v8/src/builtins/builtins-function.cc | 213 +- ...generator.cc => builtins-generator-gen.cc} | 47 +- deps/v8/src/builtins/builtins-global-gen.cc | 108 + deps/v8/src/builtins/builtins-global.cc | 108 - ...ins-handler.cc => builtins-handler-gen.cc} | 122 +- .../{builtins-ic.cc => builtins-ic-gen.cc} | 13 +- deps/v8/src/builtins/builtins-internal-gen.cc | 289 ++ deps/v8/src/builtins/builtins-internal.cc | 273 -- .../src/builtins/builtins-interpreter-gen.cc | 77 + deps/v8/src/builtins/builtins-interpreter.cc | 84 +- deps/v8/src/builtins/builtins-intl-gen.cc | 124 + deps/v8/src/builtins/builtins-intl.cc | 101 + deps/v8/src/builtins/builtins-math-gen.cc | 538 +++ deps/v8/src/builtins/builtins-math.cc | 437 -- deps/v8/src/builtins/builtins-number-gen.cc | 1452 ++++++ deps/v8/src/builtins/builtins-number.cc | 1405 +----- deps/v8/src/builtins/builtins-object-gen.cc | 558 +++ deps/v8/src/builtins/builtins-object.cc | 502 +- deps/v8/src/builtins/builtins-object.h | 26 - ...ins-promise.cc => builtins-promise-gen.cc} | 449 +- ...ltins-promise.h => builtins-promise-gen.h} | 4 +- deps/v8/src/builtins/builtins-regexp-gen.cc | 2949 ++++++++++++ ...uiltins-regexp.h => builtins-regexp-gen.h} | 41 +- deps/v8/src/builtins/builtins-regexp.cc | 2698 +---------- .../builtins-sharedarraybuffer-gen.cc | 508 ++ .../builtins/builtins-sharedarraybuffer.cc | 369 +- deps/v8/src/builtins/builtins-string-gen.cc | 1827 +++++++ deps/v8/src/builtins/builtins-string-gen.h | 95 + deps/v8/src/builtins/builtins-string.cc | 1623 +------ deps/v8/src/builtins/builtins-symbol-gen.cc | 47 + deps/v8/src/builtins/builtins-symbol.cc | 46 - .../src/builtins/builtins-typedarray-gen.cc | 746 +++ deps/v8/src/builtins/builtins-typedarray.cc | 352 +- deps/v8/src/builtins/builtins-utils-gen.h | 57 + deps/v8/src/builtins/builtins-utils.h | 29 - ...{builtins-wasm.cc => builtins-wasm-gen.cc} | 2 +- deps/v8/src/builtins/builtins.cc | 254 +- deps/v8/src/builtins/builtins.h | 895 +--- deps/v8/src/builtins/ia32/builtins-ia32.cc | 765 +-- deps/v8/src/builtins/mips/OWNERS | 7 +- deps/v8/src/builtins/mips/builtins-mips.cc | 781 ++- deps/v8/src/builtins/mips64/OWNERS | 7 +- .../v8/src/builtins/mips64/builtins-mips64.cc | 1127 ++--- deps/v8/src/builtins/ppc/builtins-ppc.cc | 776 +-- deps/v8/src/builtins/s390/builtins-s390.cc | 762 +-- .../src/builtins/setup-builtins-internal.cc | 202 + deps/v8/src/builtins/x64/builtins-x64.cc | 692 +-- deps/v8/src/builtins/x87/builtins-x87.cc | 237 +- deps/v8/src/callable.h | 33 + deps/v8/src/char-predicates.cc | 12 +- deps/v8/src/code-events.h | 10 +- deps/v8/src/code-factory.cc | 138 +- deps/v8/src/code-factory.h | 55 +- deps/v8/src/code-stub-assembler.cc | 3297 ++++++++----- deps/v8/src/code-stub-assembler.h | 341 +- deps/v8/src/code-stubs-hydrogen.cc | 1 + deps/v8/src/code-stubs-utils.h | 49 + deps/v8/src/code-stubs.cc | 1935 ++------ deps/v8/src/code-stubs.h | 197 +- deps/v8/src/codegen.cc | 12 +- deps/v8/src/compilation-cache.cc | 23 +- deps/v8/src/compilation-cache.h | 8 +- deps/v8/src/compilation-dependencies.cc | 2 +- deps/v8/src/compilation-dependencies.h | 3 +- deps/v8/src/compilation-info.cc | 7 +- deps/v8/src/compilation-info.h | 2 +- .../compiler-dispatcher-job.cc | 130 +- .../compiler-dispatcher-job.h | 26 +- .../compiler-dispatcher.cc | 355 +- .../compiler-dispatcher/compiler-dispatcher.h | 46 +- .../optimizing-compile-dispatcher.cc | 2 +- deps/v8/src/compiler.cc | 499 +- deps/v8/src/compiler.h | 16 +- deps/v8/src/compiler/OWNERS | 9 +- deps/v8/src/compiler/access-builder.cc | 61 +- deps/v8/src/compiler/access-builder.h | 20 +- deps/v8/src/compiler/access-info.cc | 178 +- deps/v8/src/compiler/access-info.h | 43 +- .../v8/src/compiler/arm/code-generator-arm.cc | 1001 +++- .../src/compiler/arm/instruction-codes-arm.h | 235 +- .../compiler/arm/instruction-scheduler-arm.cc | 235 +- .../compiler/arm/instruction-selector-arm.cc | 755 ++- .../compiler/arm64/code-generator-arm64.cc | 242 +- .../arm64/instruction-selector-arm64.cc | 166 +- .../arm64/unwinding-info-writer-arm64.cc | 2 + deps/v8/src/compiler/ast-graph-builder.cc | 90 +- deps/v8/src/compiler/ast-graph-builder.h | 9 +- .../compiler/ast-loop-assignment-analyzer.cc | 8 +- deps/v8/src/compiler/branch-elimination.cc | 3 +- deps/v8/src/compiler/branch-elimination.h | 2 +- deps/v8/src/compiler/bytecode-analysis.cc | 13 +- deps/v8/src/compiler/bytecode-analysis.h | 6 + .../v8/src/compiler/bytecode-graph-builder.cc | 879 +++- deps/v8/src/compiler/bytecode-graph-builder.h | 85 +- deps/v8/src/compiler/c-linkage.cc | 4 +- deps/v8/src/compiler/code-assembler.cc | 236 +- deps/v8/src/compiler/code-assembler.h | 95 +- deps/v8/src/compiler/code-generator-impl.h | 9 - deps/v8/src/compiler/code-generator.cc | 119 +- deps/v8/src/compiler/code-generator.h | 39 +- deps/v8/src/compiler/common-operator.cc | 53 +- deps/v8/src/compiler/common-operator.h | 14 +- deps/v8/src/compiler/control-equivalence.cc | 16 +- deps/v8/src/compiler/control-equivalence.h | 46 +- .../src/compiler/effect-control-linearizer.cc | 298 +- .../src/compiler/effect-control-linearizer.h | 7 +- .../src/compiler/escape-analysis-reducer.cc | 136 + .../v8/src/compiler/escape-analysis-reducer.h | 4 + deps/v8/src/compiler/escape-analysis.cc | 171 +- deps/v8/src/compiler/escape-analysis.h | 4 +- deps/v8/src/compiler/frame.h | 13 +- deps/v8/src/compiler/gap-resolver.cc | 7 +- deps/v8/src/compiler/graph-assembler.cc | 8 +- deps/v8/src/compiler/graph-assembler.h | 3 + deps/v8/src/compiler/graph-reducer.cc | 8 +- deps/v8/src/compiler/graph-reducer.h | 2 +- deps/v8/src/compiler/graph-replay.cc | 92 - deps/v8/src/compiler/graph-replay.h | 40 - deps/v8/src/compiler/graph.h | 42 - .../src/compiler/ia32/code-generator-ia32.cc | 190 +- .../compiler/ia32/instruction-codes-ia32.h | 10 +- .../ia32/instruction-scheduler-ia32.cc | 12 +- .../ia32/instruction-selector-ia32.cc | 234 +- deps/v8/src/compiler/instruction-codes.h | 35 + deps/v8/src/compiler/instruction-scheduler.cc | 37 + deps/v8/src/compiler/instruction-selector.cc | 922 ++-- deps/v8/src/compiler/instruction-selector.h | 5 +- deps/v8/src/compiler/instruction.h | 76 +- deps/v8/src/compiler/int64-lowering.cc | 61 +- deps/v8/src/compiler/int64-lowering.h | 6 +- deps/v8/src/compiler/js-builtin-reducer.cc | 189 +- deps/v8/src/compiler/js-builtin-reducer.h | 2 + deps/v8/src/compiler/js-call-reducer.cc | 459 +- deps/v8/src/compiler/js-call-reducer.h | 28 +- .../src/compiler/js-context-specialization.cc | 70 +- .../src/compiler/js-context-specialization.h | 27 +- deps/v8/src/compiler/js-create-lowering.cc | 294 +- deps/v8/src/compiler/js-create-lowering.h | 7 + .../src/compiler/js-frame-specialization.cc | 9 - .../v8/src/compiler/js-frame-specialization.h | 1 - deps/v8/src/compiler/js-generic-lowering.cc | 264 +- deps/v8/src/compiler/js-graph.cc | 8 + deps/v8/src/compiler/js-graph.h | 5 + deps/v8/src/compiler/js-inlining-heuristic.cc | 96 +- deps/v8/src/compiler/js-inlining-heuristic.h | 9 +- deps/v8/src/compiler/js-inlining.cc | 208 +- deps/v8/src/compiler/js-intrinsic-lowering.cc | 91 +- deps/v8/src/compiler/js-intrinsic-lowering.h | 6 + .../js-native-context-specialization.cc | 590 ++- .../js-native-context-specialization.h | 49 +- deps/v8/src/compiler/js-operator.cc | 165 +- deps/v8/src/compiler/js-operator.h | 200 +- deps/v8/src/compiler/js-type-hint-lowering.cc | 215 +- deps/v8/src/compiler/js-type-hint-lowering.h | 56 +- deps/v8/src/compiler/js-typed-lowering.cc | 573 +-- deps/v8/src/compiler/js-typed-lowering.h | 12 +- deps/v8/src/compiler/linkage.cc | 10 +- deps/v8/src/compiler/load-elimination.cc | 110 +- deps/v8/src/compiler/load-elimination.h | 26 +- .../src/compiler/loop-variable-optimizer.cc | 5 +- .../v8/src/compiler/machine-graph-verifier.cc | 50 +- deps/v8/src/compiler/machine-operator.cc | 696 +-- deps/v8/src/compiler/machine-operator.h | 370 +- deps/v8/src/compiler/mips/OWNERS | 7 +- .../src/compiler/mips/code-generator-mips.cc | 555 ++- .../compiler/mips/instruction-codes-mips.h | 76 +- .../mips/instruction-selector-mips.cc | 370 +- deps/v8/src/compiler/mips64/OWNERS | 7 +- .../compiler/mips64/code-generator-mips64.cc | 644 ++- .../mips64/instruction-codes-mips64.h | 76 +- .../mips64/instruction-selector-mips64.cc | 377 +- deps/v8/src/compiler/node-matchers.h | 3 + deps/v8/src/compiler/node-properties.cc | 57 +- deps/v8/src/compiler/node-properties.h | 15 +- deps/v8/src/compiler/opcodes.h | 391 +- deps/v8/src/compiler/operation-typer.cc | 44 +- deps/v8/src/compiler/operation-typer.h | 7 +- deps/v8/src/compiler/operator-properties.cc | 7 +- deps/v8/src/compiler/operator.cc | 6 +- deps/v8/src/compiler/osr.cc | 26 +- deps/v8/src/compiler/pipeline.cc | 200 +- .../v8/src/compiler/ppc/code-generator-ppc.cc | 82 +- .../compiler/ppc/instruction-selector-ppc.cc | 68 + deps/v8/src/compiler/raw-machine-assembler.cc | 85 +- deps/v8/src/compiler/raw-machine-assembler.h | 61 +- deps/v8/src/compiler/register-allocator.cc | 7 +- deps/v8/src/compiler/representation-change.cc | 120 +- deps/v8/src/compiler/representation-change.h | 84 +- .../src/compiler/s390/code-generator-s390.cc | 962 ++-- .../compiler/s390/instruction-codes-s390.h | 2 + .../s390/instruction-scheduler-s390.cc | 2 + .../s390/instruction-selector-s390.cc | 1470 +++--- deps/v8/src/compiler/schedule.cc | 44 +- deps/v8/src/compiler/schedule.h | 18 +- deps/v8/src/compiler/scheduler.cc | 64 +- deps/v8/src/compiler/scheduler.h | 10 +- deps/v8/src/compiler/simd-scalar-lowering.cc | 1065 ++++- deps/v8/src/compiler/simd-scalar-lowering.h | 80 +- deps/v8/src/compiler/simplified-lowering.cc | 359 +- deps/v8/src/compiler/simplified-operator.cc | 207 +- deps/v8/src/compiler/simplified-operator.h | 44 +- .../v8/src/compiler/tail-call-optimization.cc | 90 +- deps/v8/src/compiler/typed-optimization.cc | 29 +- deps/v8/src/compiler/typed-optimization.h | 2 + deps/v8/src/compiler/typer.cc | 164 +- deps/v8/src/compiler/types.cc | 17 +- deps/v8/src/compiler/types.h | 11 +- deps/v8/src/compiler/verifier.cc | 139 +- deps/v8/src/compiler/wasm-compiler.cc | 1514 +++--- deps/v8/src/compiler/wasm-compiler.h | 86 +- deps/v8/src/compiler/wasm-linkage.cc | 2 +- .../v8/src/compiler/x64/code-generator-x64.cc | 496 +- .../src/compiler/x64/instruction-codes-x64.h | 66 +- .../compiler/x64/instruction-scheduler-x64.cc | 68 +- .../compiler/x64/instruction-selector-x64.cc | 355 +- .../v8/src/compiler/x87/code-generator-x87.cc | 1 + .../compiler/x87/instruction-selector-x87.cc | 16 + deps/v8/src/compiler/zone-stats.cc | 6 +- deps/v8/src/compiler/zone-stats.h | 6 +- deps/v8/src/context-measure.cc | 78 - deps/v8/src/context-measure.h | 49 - deps/v8/src/contexts-inl.h | 5 +- deps/v8/src/contexts.cc | 46 +- deps/v8/src/contexts.h | 137 +- deps/v8/src/counters.cc | 242 +- deps/v8/src/counters.h | 233 +- deps/v8/src/crankshaft/arm/lithium-arm.cc | 11 +- deps/v8/src/crankshaft/arm/lithium-arm.h | 5 +- .../src/crankshaft/arm/lithium-codegen-arm.cc | 24 +- .../src/crankshaft/arm/lithium-codegen-arm.h | 9 +- .../arm/lithium-gap-resolver-arm.cc | 4 +- .../crankshaft/arm64/delayed-masm-arm64-inl.h | 17 + .../crankshaft/arm64/delayed-masm-arm64.cc | 2 + .../src/crankshaft/arm64/delayed-masm-arm64.h | 19 +- deps/v8/src/crankshaft/arm64/lithium-arm64.cc | 17 +- deps/v8/src/crankshaft/arm64/lithium-arm64.h | 5 +- .../crankshaft/arm64/lithium-codegen-arm64.cc | 15 +- .../arm64/lithium-gap-resolver-arm64.cc | 14 +- .../arm64/lithium-gap-resolver-arm64.h | 12 +- .../src/crankshaft/hydrogen-alias-analysis.h | 2 +- .../hydrogen-environment-liveness.cc | 2 +- deps/v8/src/crankshaft/hydrogen-gvn.cc | 28 +- .../src/crankshaft/hydrogen-instructions.cc | 2 - .../v8/src/crankshaft/hydrogen-instructions.h | 10 +- deps/v8/src/crankshaft/hydrogen.cc | 690 +-- deps/v8/src/crankshaft/hydrogen.h | 33 +- .../crankshaft/ia32/lithium-codegen-ia32.cc | 23 +- .../crankshaft/ia32/lithium-codegen-ia32.h | 9 +- deps/v8/src/crankshaft/ia32/lithium-ia32.cc | 13 +- deps/v8/src/crankshaft/ia32/lithium-ia32.h | 4 +- deps/v8/src/crankshaft/lithium-codegen.cc | 4 +- deps/v8/src/crankshaft/mips/OWNERS | 7 +- .../crankshaft/mips/lithium-codegen-mips.cc | 70 +- .../crankshaft/mips/lithium-codegen-mips.h | 9 +- .../mips/lithium-gap-resolver-mips.cc | 13 +- deps/v8/src/crankshaft/mips/lithium-mips.cc | 12 +- deps/v8/src/crankshaft/mips/lithium-mips.h | 4 +- deps/v8/src/crankshaft/mips64/OWNERS | 7 +- .../mips64/lithium-codegen-mips64.cc | 299 +- .../mips64/lithium-codegen-mips64.h | 9 +- .../mips64/lithium-gap-resolver-mips64.cc | 47 +- .../src/crankshaft/mips64/lithium-mips64.cc | 12 +- .../v8/src/crankshaft/mips64/lithium-mips64.h | 4 +- .../src/crankshaft/ppc/lithium-codegen-ppc.cc | 10 +- deps/v8/src/crankshaft/ppc/lithium-ppc.cc | 2 - deps/v8/src/crankshaft/ppc/lithium-ppc.h | 1 - .../crankshaft/s390/lithium-codegen-s390.cc | 35 +- deps/v8/src/crankshaft/typing.cc | 7 +- .../src/crankshaft/x64/lithium-codegen-x64.cc | 22 +- .../src/crankshaft/x64/lithium-codegen-x64.h | 9 +- deps/v8/src/crankshaft/x64/lithium-x64.cc | 14 +- deps/v8/src/crankshaft/x64/lithium-x64.h | 4 +- .../src/crankshaft/x87/lithium-codegen-x87.cc | 23 +- .../src/crankshaft/x87/lithium-codegen-x87.h | 9 +- deps/v8/src/crankshaft/x87/lithium-x87.cc | 13 +- deps/v8/src/crankshaft/x87/lithium-x87.h | 4 +- deps/v8/src/d8-console.cc | 111 + deps/v8/src/d8-console.h | 34 + deps/v8/src/d8.cc | 474 +- deps/v8/src/d8.gyp | 2 + deps/v8/src/d8.h | 29 +- deps/v8/src/date.cc | 20 +- deps/v8/src/date.h | 24 +- deps/v8/src/debug/arm/debug-arm.cc | 32 +- deps/v8/src/debug/arm64/debug-arm64.cc | 7 +- deps/v8/src/debug/debug-coverage.cc | 178 +- deps/v8/src/debug/debug-coverage.h | 24 +- deps/v8/src/debug/debug-evaluate.cc | 269 +- deps/v8/src/debug/debug-evaluate.h | 1 + deps/v8/src/debug/debug-interface.h | 87 +- deps/v8/src/debug/debug-scopes.cc | 5 +- deps/v8/src/debug/debug.cc | 293 +- deps/v8/src/debug/debug.h | 30 +- deps/v8/src/debug/interface-types.h | 67 +- deps/v8/src/debug/liveedit.cc | 2 - deps/v8/src/debug/mips/OWNERS | 7 +- deps/v8/src/debug/mips/debug-mips.cc | 8 + deps/v8/src/debug/mips64/OWNERS | 7 +- deps/v8/src/debug/mips64/debug-mips64.cc | 6 +- deps/v8/src/debug/mirrors.js | 15 +- deps/v8/src/deoptimizer.cc | 488 +- deps/v8/src/deoptimizer.h | 42 +- deps/v8/src/disassembler.cc | 12 +- deps/v8/src/elements-kind.h | 7 +- deps/v8/src/elements.cc | 868 +++- deps/v8/src/elements.h | 30 +- deps/v8/src/execution.cc | 8 +- deps/v8/src/execution.h | 3 +- .../v8/src/extensions/statistics-extension.cc | 8 +- deps/v8/src/external-reference-table.cc | 66 +- deps/v8/src/external-reference-table.h | 13 +- deps/v8/src/factory.cc | 210 +- deps/v8/src/factory.h | 59 +- deps/v8/src/feedback-vector-inl.h | 26 +- deps/v8/src/feedback-vector.cc | 420 +- deps/v8/src/feedback-vector.h | 142 +- deps/v8/src/ffi/ffi-compiler.cc | 6 +- deps/v8/src/field-index-inl.h | 3 +- deps/v8/src/field-type.h | 1 + deps/v8/src/find-and-replace-pattern.h | 4 +- deps/v8/src/flag-definitions.h | 227 +- deps/v8/src/flags.cc | 25 +- deps/v8/src/flags.h | 2 +- deps/v8/src/frames.cc | 106 +- deps/v8/src/frames.h | 53 +- .../src/full-codegen/arm/full-codegen-arm.cc | 72 +- .../full-codegen/arm64/full-codegen-arm64.cc | 32 +- deps/v8/src/full-codegen/full-codegen.cc | 44 +- deps/v8/src/full-codegen/full-codegen.h | 3 +- .../full-codegen/ia32/full-codegen-ia32.cc | 31 +- deps/v8/src/full-codegen/mips/OWNERS | 7 +- .../full-codegen/mips/full-codegen-mips.cc | 31 +- deps/v8/src/full-codegen/mips64/OWNERS | 7 +- .../mips64/full-codegen-mips64.cc | 229 +- .../src/full-codegen/ppc/full-codegen-ppc.cc | 31 +- .../full-codegen/s390/full-codegen-s390.cc | 32 +- .../src/full-codegen/x64/full-codegen-x64.cc | 31 +- .../src/full-codegen/x87/full-codegen-x87.cc | 31 +- deps/v8/src/global-handles.cc | 187 +- deps/v8/src/global-handles.h | 85 +- deps/v8/src/globals.h | 152 +- deps/v8/src/handles-inl.h | 3 +- deps/v8/src/handles.cc | 3 + deps/v8/src/handles.h | 50 +- deps/v8/src/heap-symbols.h | 9 +- deps/v8/src/heap/array-buffer-tracker.cc | 24 +- deps/v8/src/heap/array-buffer-tracker.h | 15 +- deps/v8/src/heap/concurrent-marking-deque.h | 175 + deps/v8/src/heap/concurrent-marking.cc | 289 ++ deps/v8/src/heap/concurrent-marking.h | 44 + deps/v8/src/heap/gc-tracer.cc | 82 +- deps/v8/src/heap/gc-tracer.h | 144 +- deps/v8/src/heap/heap-inl.h | 56 +- deps/v8/src/heap/heap.cc | 719 ++- deps/v8/src/heap/heap.h | 348 +- deps/v8/src/heap/incremental-marking-job.cc | 5 + deps/v8/src/heap/incremental-marking.cc | 344 +- deps/v8/src/heap/incremental-marking.h | 123 +- deps/v8/src/heap/item-parallel-job.h | 178 + deps/v8/src/heap/mark-compact-inl.h | 63 +- deps/v8/src/heap/mark-compact.cc | 2715 +++++++---- deps/v8/src/heap/mark-compact.h | 580 +-- deps/v8/src/heap/marking.h | 191 +- deps/v8/src/heap/memory-reducer.cc | 3 +- deps/v8/src/heap/object-stats.cc | 17 +- deps/v8/src/heap/objects-visiting-inl.h | 172 +- deps/v8/src/heap/objects-visiting.cc | 31 +- deps/v8/src/heap/objects-visiting.h | 233 +- deps/v8/src/heap/page-parallel-job.h | 31 +- deps/v8/src/heap/remembered-set.h | 132 +- deps/v8/src/heap/scavenger.cc | 53 +- deps/v8/src/heap/scavenger.h | 9 +- deps/v8/src/heap/sequential-marking-deque.cc | 98 + deps/v8/src/heap/sequential-marking-deque.h | 172 + deps/v8/src/heap/spaces-inl.h | 46 +- deps/v8/src/heap/spaces.cc | 366 +- deps/v8/src/heap/spaces.h | 295 +- deps/v8/src/heap/store-buffer.cc | 2 +- deps/v8/src/heap/workstealing-marking-deque.h | 167 + deps/v8/src/ia32/assembler-ia32-inl.h | 75 +- deps/v8/src/ia32/assembler-ia32.cc | 252 +- deps/v8/src/ia32/assembler-ia32.h | 223 +- deps/v8/src/ia32/code-stubs-ia32.cc | 432 +- deps/v8/src/ia32/codegen-ia32.cc | 4 +- deps/v8/src/ia32/deoptimizer-ia32.cc | 60 +- deps/v8/src/ia32/disasm-ia32.cc | 270 +- .../v8/src/ia32/interface-descriptors-ia32.cc | 53 +- deps/v8/src/ia32/macro-assembler-ia32.cc | 271 +- deps/v8/src/ia32/macro-assembler-ia32.h | 60 +- deps/v8/src/ia32/sse-instr.h | 57 + deps/v8/src/ic/access-compiler.cc | 29 +- deps/v8/src/ic/access-compiler.h | 11 +- deps/v8/src/ic/accessor-assembler.cc | 1308 +++-- deps/v8/src/ic/accessor-assembler.h | 45 +- deps/v8/src/ic/arm/access-compiler-arm.cc | 2 + deps/v8/src/ic/arm/handler-compiler-arm.cc | 195 +- deps/v8/src/ic/arm/ic-arm.cc | 2 + deps/v8/src/ic/arm64/access-compiler-arm64.cc | 1 + .../v8/src/ic/arm64/handler-compiler-arm64.cc | 188 +- deps/v8/src/ic/arm64/ic-arm64.cc | 4 +- deps/v8/src/ic/binary-op-assembler.cc | 827 ++++ deps/v8/src/ic/binary-op-assembler.h | 45 + deps/v8/src/ic/handler-compiler.cc | 289 +- deps/v8/src/ic/handler-compiler.h | 92 +- deps/v8/src/ic/handler-configuration-inl.h | 123 +- deps/v8/src/ic/handler-configuration.h | 134 +- deps/v8/src/ic/ia32/handler-compiler-ia32.cc | 197 +- deps/v8/src/ic/ic-inl.h | 36 +- deps/v8/src/ic/ic.cc | 1313 +++-- deps/v8/src/ic/ic.h | 96 +- deps/v8/src/ic/keyed-store-generic.cc | 238 +- deps/v8/src/ic/keyed-store-generic.h | 6 + deps/v8/src/ic/mips/OWNERS | 7 +- deps/v8/src/ic/mips/handler-compiler-mips.cc | 192 +- deps/v8/src/ic/mips64/OWNERS | 7 +- .../src/ic/mips64/handler-compiler-mips64.cc | 235 +- deps/v8/src/ic/ppc/handler-compiler-ppc.cc | 192 +- deps/v8/src/ic/s390/handler-compiler-s390.cc | 186 +- deps/v8/src/ic/stub-cache.cc | 44 +- deps/v8/src/ic/stub-cache.h | 3 - deps/v8/src/ic/x64/handler-compiler-x64.cc | 205 +- deps/v8/src/ic/x87/handler-compiler-x87.cc | 193 +- deps/v8/src/icu_util.cc | 8 +- deps/v8/src/identity-map.cc | 16 +- deps/v8/src/identity-map.h | 8 +- deps/v8/src/inspector/DEPS | 1 + deps/v8/src/inspector/debugger-script.js | 7 +- .../src/inspector/debugger_script_externs.js | 3 + .../src/inspector/injected-script-source.js | 324 +- deps/v8/src/inspector/injected-script.cc | 9 +- .../src/inspector/injected_script_externs.js | 38 + deps/v8/src/inspector/inspected-context.cc | 53 +- deps/v8/src/inspector/inspected-context.h | 1 - deps/v8/src/inspector/inspector.gyp | 32 +- .../inspector/inspector_protocol_config.json | 1 + deps/v8/src/inspector/js_protocol.json | 53 +- deps/v8/src/inspector/string-util.cc | 12 + deps/v8/src/inspector/string-util.h | 1 + deps/v8/src/inspector/test-interface.cc | 8 +- deps/v8/src/inspector/test-interface.h | 1 + deps/v8/src/inspector/v8-console-message.cc | 50 +- deps/v8/src/inspector/v8-console-message.h | 19 +- deps/v8/src/inspector/v8-console.cc | 638 +-- deps/v8/src/inspector/v8-console.h | 123 +- .../src/inspector/v8-debugger-agent-impl.cc | 329 +- .../v8/src/inspector/v8-debugger-agent-impl.h | 29 +- deps/v8/src/inspector/v8-debugger-script.cc | 106 +- deps/v8/src/inspector/v8-debugger-script.h | 16 +- deps/v8/src/inspector/v8-debugger.cc | 487 +- deps/v8/src/inspector/v8-debugger.h | 93 +- deps/v8/src/inspector/v8-function-call.cc | 2 + .../src/inspector/v8-injected-script-host.cc | 57 +- .../src/inspector/v8-injected-script-host.h | 1 + deps/v8/src/inspector/v8-inspector-impl.cc | 60 +- deps/v8/src/inspector/v8-inspector-impl.h | 20 +- .../src/inspector/v8-profiler-agent-impl.cc | 46 +- .../v8/src/inspector/v8-profiler-agent-impl.h | 3 +- deps/v8/src/inspector/v8-regex.cc | 1 + .../v8/src/inspector/v8-runtime-agent-impl.cc | 29 +- deps/v8/src/inspector/v8-stack-trace-impl.cc | 479 +- deps/v8/src/inspector/v8-stack-trace-impl.h | 162 +- deps/v8/src/inspector/wasm-translation.cc | 16 +- deps/v8/src/interface-descriptors.cc | 26 +- deps/v8/src/interface-descriptors.h | 387 +- .../interpreter/bytecode-array-accessor.cc | 99 +- .../src/interpreter/bytecode-array-accessor.h | 59 +- .../src/interpreter/bytecode-array-builder.cc | 480 +- .../src/interpreter/bytecode-array-builder.h | 143 +- .../src/interpreter/bytecode-array-writer.cc | 122 +- .../src/interpreter/bytecode-array-writer.h | 38 +- .../bytecode-dead-code-optimizer.cc | 77 - .../bytecode-dead-code-optimizer.h | 44 - deps/v8/src/interpreter/bytecode-decoder.cc | 3 +- deps/v8/src/interpreter/bytecode-flags.cc | 62 +- deps/v8/src/interpreter/bytecode-flags.h | 55 +- deps/v8/src/interpreter/bytecode-generator.cc | 897 ++-- deps/v8/src/interpreter/bytecode-generator.h | 42 +- deps/v8/src/interpreter/bytecode-jump-table.h | 88 + ...{bytecode-pipeline.cc => bytecode-node.cc} | 12 +- .../{bytecode-pipeline.h => bytecode-node.h} | 207 +- .../bytecode-peephole-optimizer.cc | 342 -- .../interpreter/bytecode-peephole-optimizer.h | 65 - .../src/interpreter/bytecode-peephole-table.h | 72 - .../bytecode-register-optimizer.cc | 62 +- .../interpreter/bytecode-register-optimizer.h | 61 +- .../src/interpreter/bytecode-source-info.cc | 24 + .../v8/src/interpreter/bytecode-source-info.h | 98 + deps/v8/src/interpreter/bytecodes.cc | 9 +- deps/v8/src/interpreter/bytecodes.h | 167 +- .../src/interpreter/constant-array-builder.cc | 39 +- .../src/interpreter/constant-array-builder.h | 29 +- .../src/interpreter/control-flow-builders.cc | 47 +- .../src/interpreter/control-flow-builders.h | 39 +- .../src/interpreter/interpreter-assembler.cc | 258 +- .../src/interpreter/interpreter-assembler.h | 43 +- .../src/interpreter/interpreter-generator.cc | 3450 ++++++++++++++ .../src/interpreter/interpreter-generator.h | 22 + .../interpreter-intrinsics-generator.cc | 472 ++ .../interpreter-intrinsics-generator.h | 29 + .../src/interpreter/interpreter-intrinsics.cc | 296 +- .../src/interpreter/interpreter-intrinsics.h | 92 +- deps/v8/src/interpreter/interpreter.cc | 3113 +----------- deps/v8/src/interpreter/interpreter.h | 110 +- deps/v8/src/interpreter/mkpeephole.cc | 381 -- .../interpreter/setup-interpreter-internal.cc | 91 + deps/v8/src/interpreter/setup-interpreter.h | 37 + deps/v8/src/intl.cc | 403 ++ deps/v8/src/intl.h | 69 + deps/v8/src/isolate.cc | 778 +-- deps/v8/src/isolate.h | 101 +- deps/v8/src/js/array.js | 275 +- deps/v8/src/js/arraybuffer.js | 81 - deps/v8/src/js/harmony-atomics.js | 160 - deps/v8/src/js/harmony-string-padding.js | 73 - deps/v8/src/js/{i18n.js => intl.js} | 319 +- deps/v8/src/js/macros.py | 15 +- deps/v8/src/js/max-min.js | 28 + deps/v8/src/js/prologue.js | 117 +- deps/v8/src/js/runtime.js | 104 - deps/v8/src/js/string.js | 116 +- deps/v8/src/js/typedarray.js | 549 +-- deps/v8/src/js/v8natives.js | 57 +- deps/v8/src/json-parser.cc | 92 +- deps/v8/src/json-stringifier.cc | 21 +- deps/v8/src/keys.cc | 51 +- deps/v8/src/libplatform/default-platform.cc | 85 +- deps/v8/src/libplatform/default-platform.h | 15 +- deps/v8/src/libplatform/task-queue.h | 2 +- deps/v8/src/libsampler/sampler.h | 4 +- deps/v8/src/list-inl.h | 42 - deps/v8/src/list.h | 11 - deps/v8/src/log.cc | 103 +- deps/v8/src/log.h | 19 +- deps/v8/src/lookup.cc | 12 +- deps/v8/src/lookup.h | 14 +- deps/v8/src/macro-assembler-inl.h | 14 + deps/v8/src/macro-assembler.h | 22 +- deps/v8/src/managed.h | 6 +- deps/v8/src/map-updater.cc | 78 +- deps/v8/src/map-updater.h | 23 +- deps/v8/src/messages.cc | 47 +- deps/v8/src/messages.h | 36 +- deps/v8/src/mips/OWNERS | 7 +- deps/v8/src/mips/assembler-mips-inl.h | 85 +- deps/v8/src/mips/assembler-mips.cc | 755 ++- deps/v8/src/mips/assembler-mips.h | 934 +++- deps/v8/src/mips/code-stubs-mips.cc | 443 +- deps/v8/src/mips/codegen-mips.cc | 4 +- deps/v8/src/mips/constants-mips.cc | 38 + deps/v8/src/mips/constants-mips.h | 488 +- deps/v8/src/mips/deoptimizer-mips.cc | 108 +- deps/v8/src/mips/disasm-mips.cc | 924 +++- .../v8/src/mips/interface-descriptors-mips.cc | 53 +- deps/v8/src/mips/macro-assembler-mips.cc | 464 +- deps/v8/src/mips/macro-assembler-mips.h | 82 +- deps/v8/src/mips/simulator-mips.cc | 27 +- deps/v8/src/mips/simulator-mips.h | 18 +- deps/v8/src/mips64/OWNERS | 7 +- deps/v8/src/mips64/assembler-mips64-inl.h | 68 +- deps/v8/src/mips64/assembler-mips64.cc | 846 +++- deps/v8/src/mips64/assembler-mips64.h | 921 +++- deps/v8/src/mips64/code-stubs-mips64.cc | 695 +-- deps/v8/src/mips64/codegen-mips64.cc | 184 +- deps/v8/src/mips64/constants-mips64.cc | 40 + deps/v8/src/mips64/constants-mips64.h | 492 +- deps/v8/src/mips64/deoptimizer-mips64.cc | 155 +- deps/v8/src/mips64/disasm-mips64.cc | 1020 +++- .../mips64/interface-descriptors-mips64.cc | 53 +- deps/v8/src/mips64/macro-assembler-mips64.cc | 754 +-- deps/v8/src/mips64/macro-assembler-mips64.h | 119 +- deps/v8/src/mips64/simulator-mips64.cc | 143 +- deps/v8/src/mips64/simulator-mips64.h | 14 +- deps/v8/src/objects-body-descriptors-inl.h | 182 +- deps/v8/src/objects-body-descriptors.h | 21 +- deps/v8/src/objects-debug.cc | 165 +- deps/v8/src/objects-inl.h | 780 ++- deps/v8/src/objects-printer.cc | 152 +- deps/v8/src/objects.cc | 2107 ++++---- deps/v8/src/objects.h | 4226 ++++------------- deps/v8/src/objects/code-cache-inl.h | 28 + deps/v8/src/objects/code-cache.h | 58 + deps/v8/src/objects/compilation-cache-inl.h | 28 + deps/v8/src/objects/compilation-cache.h | 107 + deps/v8/src/objects/descriptor-array.h | 206 + deps/v8/src/objects/dictionary.h | 374 ++ deps/v8/src/objects/frame-array-inl.h | 57 + deps/v8/src/objects/frame-array.h | 108 + deps/v8/src/objects/hash-table.h | 689 +++ .../src/{i18n.cc => objects/intl-objects.cc} | 433 +- .../v8/src/{i18n.h => objects/intl-objects.h} | 44 +- deps/v8/src/objects/literal-objects.h | 11 +- deps/v8/src/objects/map-inl.h | 68 + deps/v8/src/objects/map.h | 829 ++++ deps/v8/src/objects/object-macros-undef.h | 1 + deps/v8/src/objects/object-macros.h | 10 + deps/v8/src/objects/string-table.h | 99 + deps/v8/src/parsing/duplicate-finder.cc | 88 - deps/v8/src/parsing/duplicate-finder.h | 40 +- deps/v8/src/parsing/func-name-inferrer.cc | 37 +- deps/v8/src/parsing/func-name-inferrer.h | 8 +- deps/v8/src/parsing/parse-info.cc | 66 +- deps/v8/src/parsing/parse-info.h | 51 +- deps/v8/src/parsing/parser-base.h | 494 +- deps/v8/src/parsing/parser.cc | 832 ++-- deps/v8/src/parsing/parser.h | 117 +- deps/v8/src/parsing/parsing.cc | 12 +- deps/v8/src/parsing/parsing.h | 9 +- deps/v8/src/parsing/pattern-rewriter.cc | 3 +- deps/v8/src/parsing/preparse-data-format.h | 2 +- deps/v8/src/parsing/preparse-data.cc | 36 +- deps/v8/src/parsing/preparse-data.h | 65 +- deps/v8/src/parsing/preparsed-scope-data.cc | 378 +- deps/v8/src/parsing/preparsed-scope-data.h | 115 +- deps/v8/src/parsing/preparser.cc | 115 +- deps/v8/src/parsing/preparser.h | 171 +- deps/v8/src/parsing/rewriter.cc | 60 +- deps/v8/src/parsing/rewriter.h | 3 +- .../src/parsing/scanner-character-streams.cc | 14 +- .../src/parsing/scanner-character-streams.h | 3 +- deps/v8/src/parsing/scanner.cc | 236 +- deps/v8/src/parsing/scanner.h | 158 +- deps/v8/src/parsing/token.cc | 26 +- deps/v8/src/parsing/token.h | 33 +- deps/v8/src/perf-jit.cc | 21 +- deps/v8/src/perf-jit.h | 8 + deps/v8/src/ppc/assembler-ppc-inl.h | 80 +- deps/v8/src/ppc/assembler-ppc.cc | 514 +- deps/v8/src/ppc/assembler-ppc.h | 365 +- deps/v8/src/ppc/code-stubs-ppc.cc | 422 +- deps/v8/src/ppc/codegen-ppc.cc | 3 +- deps/v8/src/ppc/constants-ppc.h | 495 +- deps/v8/src/ppc/deoptimizer-ppc.cc | 60 +- deps/v8/src/ppc/disasm-ppc.cc | 31 + deps/v8/src/ppc/interface-descriptors-ppc.cc | 53 +- deps/v8/src/ppc/macro-assembler-ppc.cc | 168 +- deps/v8/src/ppc/macro-assembler-ppc.h | 31 +- deps/v8/src/ppc/simulator-ppc.cc | 1722 ++++--- deps/v8/src/ppc/simulator-ppc.h | 105 +- deps/v8/src/profiler/allocation-tracker.cc | 3 +- .../src/profiler/heap-snapshot-generator.cc | 76 +- .../v8/src/profiler/heap-snapshot-generator.h | 2 + deps/v8/src/profiler/profiler-listener.cc | 2 +- deps/v8/src/profiler/profiler-listener.h | 3 +- deps/v8/src/profiler/tick-sample.cc | 7 +- deps/v8/src/property-details.h | 2 + deps/v8/src/property.cc | 2 +- .../regexp/arm/regexp-macro-assembler-arm.cc | 29 +- .../regexp/arm/regexp-macro-assembler-arm.h | 3 +- .../arm64/regexp-macro-assembler-arm64.cc | 32 +- .../arm64/regexp-macro-assembler-arm64.h | 3 +- .../ia32/regexp-macro-assembler-ia32.cc | 9 +- deps/v8/src/regexp/interpreter-irregexp.cc | 4 +- deps/v8/src/regexp/jsregexp-inl.h | 1 - deps/v8/src/regexp/jsregexp.cc | 153 +- deps/v8/src/regexp/mips/OWNERS | 7 +- .../mips/regexp-macro-assembler-mips.cc | 24 +- .../regexp/mips/regexp-macro-assembler-mips.h | 3 +- deps/v8/src/regexp/mips64/OWNERS | 7 +- .../mips64/regexp-macro-assembler-mips64.cc | 187 +- .../mips64/regexp-macro-assembler-mips64.h | 3 +- .../regexp/ppc/regexp-macro-assembler-ppc.cc | 18 +- .../regexp/ppc/regexp-macro-assembler-ppc.h | 3 +- deps/v8/src/regexp/regexp-ast.h | 27 +- deps/v8/src/regexp/regexp-macro-assembler.cc | 25 +- deps/v8/src/regexp/regexp-parser.cc | 219 +- deps/v8/src/regexp/regexp-parser.h | 10 +- .../s390/regexp-macro-assembler-s390.cc | 18 +- .../regexp/s390/regexp-macro-assembler-s390.h | 3 +- .../regexp/x64/regexp-macro-assembler-x64.cc | 9 +- .../regexp/x87/regexp-macro-assembler-x87.cc | 9 +- deps/v8/src/register-configuration.cc | 19 +- deps/v8/src/register-configuration.h | 3 + deps/v8/src/runtime-profiler.cc | 102 +- deps/v8/src/runtime/runtime-array.cc | 52 +- deps/v8/src/runtime/runtime-atomics.cc | 216 +- deps/v8/src/runtime/runtime-classes.cc | 16 +- deps/v8/src/runtime/runtime-collections.cc | 43 + deps/v8/src/runtime/runtime-compiler.cc | 58 +- deps/v8/src/runtime/runtime-debug.cc | 34 +- deps/v8/src/runtime/runtime-forin.cc | 2 +- deps/v8/src/runtime/runtime-function.cc | 8 +- deps/v8/src/runtime/runtime-futex.cc | 38 - deps/v8/src/runtime/runtime-generator.cc | 41 + deps/v8/src/runtime/runtime-internal.cc | 90 +- deps/v8/src/runtime/runtime-interpreter.cc | 15 +- .../{runtime-i18n.cc => runtime-intl.cc} | 458 +- deps/v8/src/runtime/runtime-literals.cc | 116 +- deps/v8/src/runtime/runtime-liveedit.cc | 2 +- deps/v8/src/runtime/runtime-maths.cc | 16 +- deps/v8/src/runtime/runtime-module.cc | 33 +- deps/v8/src/runtime/runtime-numbers.cc | 7 - deps/v8/src/runtime/runtime-object.cc | 198 +- deps/v8/src/runtime/runtime-regexp.cc | 608 ++- deps/v8/src/runtime/runtime-strings.cc | 30 +- deps/v8/src/runtime/runtime-test.cc | 228 +- deps/v8/src/runtime/runtime-typedarray.cc | 269 +- deps/v8/src/runtime/runtime-wasm.cc | 83 +- deps/v8/src/runtime/runtime.h | 253 +- deps/v8/src/s390/assembler-s390-inl.h | 76 +- deps/v8/src/s390/assembler-s390.cc | 116 +- deps/v8/src/s390/assembler-s390.h | 119 +- deps/v8/src/s390/code-stubs-s390.cc | 454 +- deps/v8/src/s390/codegen-s390.cc | 3 +- deps/v8/src/s390/constants-s390.h | 6 +- deps/v8/src/s390/deoptimizer-s390.cc | 60 +- deps/v8/src/s390/disasm-s390.cc | 31 +- .../v8/src/s390/interface-descriptors-s390.cc | 48 +- deps/v8/src/s390/macro-assembler-s390.cc | 534 ++- deps/v8/src/s390/macro-assembler-s390.h | 131 +- deps/v8/src/s390/simulator-s390.cc | 3587 ++------------ deps/v8/src/s390/simulator-s390.h | 30 +- deps/v8/src/safepoint-table.cc | 67 +- deps/v8/src/safepoint-table.h | 7 +- deps/v8/src/setup-isolate-deserialize.cc | 27 + deps/v8/src/setup-isolate-full.cc | 34 + deps/v8/src/setup-isolate.h | 45 + deps/v8/src/signature.h | 12 + deps/v8/src/snapshot/code-serializer.cc | 24 +- deps/v8/src/snapshot/code-serializer.h | 39 +- deps/v8/src/snapshot/deserializer.cc | 131 +- deps/v8/src/snapshot/deserializer.h | 17 +- deps/v8/src/snapshot/mksnapshot.cc | 101 +- deps/v8/src/snapshot/natives-common.cc | 44 +- deps/v8/src/snapshot/natives-external.cc | 4 - deps/v8/src/snapshot/natives.h | 38 +- deps/v8/src/snapshot/partial-serializer.cc | 46 +- deps/v8/src/snapshot/partial-serializer.h | 8 +- deps/v8/src/snapshot/serializer-common.cc | 4 +- deps/v8/src/snapshot/serializer-common.h | 46 +- deps/v8/src/snapshot/serializer.cc | 170 +- deps/v8/src/snapshot/serializer.h | 37 +- deps/v8/src/snapshot/snapshot-common.cc | 8 +- deps/v8/src/snapshot/snapshot.h | 16 +- deps/v8/src/snapshot/startup-serializer.cc | 13 +- deps/v8/src/snapshot/startup-serializer.h | 2 +- deps/v8/src/source-position-table.cc | 17 +- deps/v8/src/source-position-table.h | 15 +- deps/v8/src/string-hasher-inl.h | 147 + deps/v8/src/string-hasher.h | 90 + deps/v8/src/string-search.h | 13 + deps/v8/src/string-stream.cc | 20 +- deps/v8/src/tracing/trace-event.h | 2 - deps/v8/src/transitions.h | 3 +- deps/v8/src/trap-handler/DEPS | 17 + deps/v8/src/trap-handler/OWNERS | 10 + deps/v8/src/trap-handler/handler-inside.cc | 170 + deps/v8/src/trap-handler/handler-outside.cc | 191 + deps/v8/src/trap-handler/handler-shared.cc | 52 + .../src/trap-handler/trap-handler-internal.h | 67 + deps/v8/src/trap-handler/trap-handler.h | 70 + deps/v8/src/type-info.cc | 53 +- deps/v8/src/type-info.h | 12 - deps/v8/src/unicode.cc | 6 +- deps/v8/src/utils.h | 24 +- deps/v8/src/v8.cc | 2 + deps/v8/src/v8.gyp | 400 +- deps/v8/src/v8threads.cc | 6 +- deps/v8/src/v8threads.h | 10 +- deps/v8/src/value-serializer.cc | 114 +- deps/v8/src/value-serializer.h | 7 + deps/v8/src/vector.h | 37 +- deps/v8/src/visitors.cc | 22 + deps/v8/src/visitors.h | 79 + deps/v8/src/wasm/OWNERS | 2 + deps/v8/src/wasm/decoder.h | 465 +- deps/v8/src/wasm/function-body-decoder-impl.h | 176 +- deps/v8/src/wasm/function-body-decoder.cc | 425 +- deps/v8/src/wasm/function-body-decoder.h | 14 +- deps/v8/src/wasm/leb-helper.h | 8 +- deps/v8/src/wasm/local-decl-encoder.cc | 51 + deps/v8/src/wasm/local-decl-encoder.h | 50 + deps/v8/src/wasm/module-decoder.cc | 1395 +++--- deps/v8/src/wasm/module-decoder.h | 35 +- deps/v8/src/wasm/streaming-decoder.cc | 379 ++ deps/v8/src/wasm/streaming-decoder.h | 152 + deps/v8/src/wasm/wasm-code-specialization.cc | 92 +- deps/v8/src/wasm/wasm-debug.cc | 399 +- deps/v8/src/wasm/wasm-external-refs.cc | 60 +- deps/v8/src/wasm/wasm-interpreter.cc | 1819 ++++--- deps/v8/src/wasm/wasm-interpreter.h | 172 +- deps/v8/src/wasm/wasm-js.cc | 337 +- deps/v8/src/wasm/wasm-limits.h | 49 +- deps/v8/src/wasm/wasm-module-builder.cc | 308 +- deps/v8/src/wasm/wasm-module-builder.h | 131 +- deps/v8/src/wasm/wasm-module.cc | 2311 ++++++--- deps/v8/src/wasm/wasm-module.h | 145 +- deps/v8/src/wasm/wasm-objects.cc | 561 ++- deps/v8/src/wasm/wasm-objects.h | 316 +- deps/v8/src/wasm/wasm-opcodes.cc | 92 +- deps/v8/src/wasm/wasm-opcodes.h | 253 +- deps/v8/src/wasm/wasm-result.cc | 141 +- deps/v8/src/wasm/wasm-result.h | 166 +- deps/v8/src/wasm/wasm-text.cc | 35 +- deps/v8/src/x64/assembler-x64-inl.h | 81 +- deps/v8/src/x64/assembler-x64.cc | 77 +- deps/v8/src/x64/assembler-x64.h | 85 +- deps/v8/src/x64/code-stubs-x64.cc | 436 +- deps/v8/src/x64/codegen-x64.cc | 2 +- deps/v8/src/x64/deoptimizer-x64.cc | 61 +- deps/v8/src/x64/disasm-x64.cc | 33 +- deps/v8/src/x64/interface-descriptors-x64.cc | 55 +- deps/v8/src/x64/macro-assembler-x64.cc | 324 +- deps/v8/src/x64/macro-assembler-x64.h | 124 +- deps/v8/src/x64/sse-instr.h | 4 + deps/v8/src/x87/assembler-x87-inl.h | 75 +- deps/v8/src/x87/assembler-x87.cc | 16 +- deps/v8/src/x87/assembler-x87.h | 6 +- deps/v8/src/x87/code-stubs-x87.cc | 415 -- deps/v8/src/x87/codegen-x87.cc | 4 +- deps/v8/src/x87/deoptimizer-x87.cc | 35 +- deps/v8/src/x87/interface-descriptors-x87.cc | 44 +- deps/v8/src/x87/macro-assembler-x87.cc | 191 +- deps/v8/src/x87/macro-assembler-x87.h | 58 +- deps/v8/src/zone/accounting-allocator.h | 2 +- deps/v8/src/zone/zone-allocator.h | 107 +- deps/v8/src/zone/zone-containers.h | 38 +- deps/v8/test/BUILD.gn | 31 +- deps/v8/test/benchmarks/testcfg.py | 2 +- deps/v8/test/bot_default.gyp | 9 +- deps/v8/test/bot_default.isolate | 2 + deps/v8/test/cctest/BUILD.gn | 25 +- deps/v8/test/cctest/OWNERS | 7 +- deps/v8/test/cctest/asmjs/OWNERS | 11 - deps/v8/test/cctest/asmjs/test-asm-typer.cc | 2089 -------- deps/v8/test/cctest/cctest.cc | 37 +- deps/v8/test/cctest/cctest.gyp | 21 +- deps/v8/test/cctest/cctest.h | 4 + deps/v8/test/cctest/cctest.status | 95 +- deps/v8/test/cctest/compiler/call-tester.h | 194 +- .../test/cctest/compiler/function-tester.cc | 19 +- .../v8/test/cctest/compiler/function-tester.h | 1 + .../test-js-context-specialization.cc | 22 +- .../cctest/compiler/test-js-typed-lowering.cc | 11 - deps/v8/test/cctest/compiler/test-linkage.cc | 9 +- .../compiler/test-loop-assignment-analysis.cc | 10 +- .../compiler/test-representation-change.cc | 12 +- .../test-run-bytecode-graph-builder.cc | 46 +- .../test/cctest/compiler/test-run-machops.cc | 115 + .../cctest/compiler/test-run-wasm-machops.cc | 7 +- .../cctest/heap/test-array-buffer-tracker.cc | 8 +- deps/v8/test/cctest/heap/test-compaction.cc | 10 +- .../cctest/heap/test-concurrent-marking.cc | 30 + deps/v8/test/cctest/heap/test-heap.cc | 455 +- deps/v8/test/cctest/heap/test-mark-compact.cc | 17 +- .../test/cctest/heap/test-page-promotion.cc | 46 +- deps/v8/test/cctest/heap/test-spaces.cc | 74 +- .../bytecode-expectations-printer.cc | 2 +- .../ArrayLiterals.golden | 46 +- .../ArrayLiteralsWide.golden | 4 +- .../AssignmentsInBinaryExpression.golden | 55 +- .../BasicBlockToBoolean.golden | 6 +- .../bytecode_expectations/BasicLoops.golden | 156 +- .../BreakableBlocks.golden | 24 +- .../CallAndSpread.golden | 32 +- .../bytecode_expectations/CallGlobal.golden | 26 +- .../CallLookupSlot.golden | 34 +- .../bytecode_expectations/CallNew.golden | 12 +- .../bytecode_expectations/CallRuntime.golden | 4 +- .../ClassAndSuperClass.golden | 51 +- .../ClassDeclarations.golden | 219 +- .../bytecode_expectations/CompareNil.golden | 289 ++ .../CompareTypeOf.golden | 97 + .../CompoundExpressions.golden | 52 +- .../bytecode_expectations/Conditional.golden | 2 +- .../ConstVariable.golden | 12 +- .../ConstVariableContextSlot.golden | 8 +- .../ContextParameters.golden | 8 +- .../ContextVariables.golden | 28 +- .../CountOperators.golden | 80 +- .../CreateArguments.golden | 4 +- .../CreateRestParameter.golden | 34 +- .../DeclareGlobals.golden | 10 +- .../bytecode_expectations/Delete.golden | 16 +- .../bytecode_expectations/DoExpression.golden | 2 +- .../bytecode_expectations/Eval.golden | 26 +- .../bytecode_expectations/ForAwaitOf.golden | 2196 ++++----- .../bytecode_expectations/ForIn.golden | 55 +- .../bytecode_expectations/ForOf.golden | 488 +- .../bytecode_expectations/ForOfLoop.golden | 1860 ++++++++ .../FunctionLiterals.golden | 24 +- .../GenerateTestUndetectable.golden | 52 +- .../bytecode_expectations/Generators.golden | 695 ++- .../GlobalCompoundExpressions.golden | 22 +- .../GlobalCountOperators.golden | 32 +- .../bytecode_expectations/GlobalDelete.golden | 12 +- .../bytecode_expectations/IfConditions.golden | 552 ++- .../JumpsRequiringConstantWideOperands.golden | 8 +- .../bytecode_expectations/LetVariable.golden | 15 +- .../LetVariableContextSlot.golden | 8 +- .../bytecode_expectations/LoadGlobal.golden | 264 +- .../LogicalExpressions.golden | 8 +- .../bytecode_expectations/LookupSlot.golden | 136 +- .../LookupSlotInEval.golden | 4 +- .../LookupSlotWideInEval.golden | 4 +- .../bytecode_expectations/Modules.golden | 1003 ++-- .../bytecode_expectations/NewAndSpread.golden | 131 +- .../ObjectLiterals.golden | 94 +- .../ObjectLiteralsWide.golden | 2 +- .../OuterContextVariables.golden | 2 +- .../PrimitiveExpressions.golden | 286 +- .../bytecode_expectations/PropertyCall.golden | 306 +- .../PropertyLoads.golden | 528 +- .../PropertyStores.golden | 1048 ++-- .../RegExpLiterals.golden | 10 +- .../RegExpLiteralsWide.golden | 2 +- .../RemoveRedundantLdar.golden | 10 +- .../StandardForLoop.golden | 1070 +++++ .../bytecode_expectations/StoreGlobal.golden | 524 +- .../SuperCallAndSpread.golden | 70 +- .../bytecode_expectations/Switch.golden | 59 +- .../TopLevelObjectLiterals.golden | 6 +- .../bytecode_expectations/TryCatch.golden | 46 +- .../bytecode_expectations/TryFinally.golden | 89 +- .../bytecode_expectations/Typeof.golden | 2 +- .../UnaryOperators.golden | 41 +- .../WideRegisters.golden | 16 +- .../WithStatement.golden | 10 +- .../interpreter/source-position-matcher.cc | 4 +- .../interpreter/test-bytecode-generator.cc | 199 + .../test-interpreter-intrinsics.cc | 2 +- .../cctest/interpreter/test-interpreter.cc | 288 +- .../interpreter/test-source-positions.cc | 23 +- deps/v8/test/cctest/parsing/test-preparser.cc | 351 +- .../cctest/parsing/test-scanner-streams.cc | 64 +- deps/v8/test/cctest/parsing/test-scanner.cc | 38 +- deps/v8/test/cctest/scope-test-helper.h | 88 +- .../v8/test/cctest/setup-isolate-for-tests.cc | 27 + deps/v8/test/cctest/setup-isolate-for-tests.h | 22 + .../v8/test/cctest/test-accessor-assembler.cc | 11 +- deps/v8/test/cctest/test-accessors.cc | 2 +- deps/v8/test/cctest/test-api-interceptors.cc | 39 +- deps/v8/test/cctest/test-api.cc | 605 ++- deps/v8/test/cctest/test-assembler-arm.cc | 339 +- deps/v8/test/cctest/test-assembler-arm64.cc | 94 +- deps/v8/test/cctest/test-assembler-mips.cc | 450 +- deps/v8/test/cctest/test-assembler-mips64.cc | 1039 ++-- deps/v8/test/cctest/test-ast.cc | 2 +- deps/v8/test/cctest/test-code-cache.cc | 10 +- .../test/cctest/test-code-stub-assembler.cc | 267 +- deps/v8/test/cctest/test-code-stubs-arm.cc | 5 +- deps/v8/test/cctest/test-code-stubs-arm64.cc | 1 + deps/v8/test/cctest/test-code-stubs-mips.cc | 6 +- deps/v8/test/cctest/test-code-stubs-mips64.cc | 8 +- deps/v8/test/cctest/test-compiler.cc | 121 +- deps/v8/test/cctest/test-cpu-profiler.cc | 14 +- deps/v8/test/cctest/test-date.cc | 4 +- deps/v8/test/cctest/test-debug.cc | 126 +- deps/v8/test/cctest/test-deoptimization.cc | 10 +- deps/v8/test/cctest/test-dictionary.cc | 12 + deps/v8/test/cctest/test-disasm-arm.cc | 94 +- deps/v8/test/cctest/test-disasm-arm64.cc | 14 + deps/v8/test/cctest/test-disasm-ia32.cc | 112 +- deps/v8/test/cctest/test-disasm-mips.cc | 692 +++ deps/v8/test/cctest/test-disasm-mips64.cc | 741 ++- deps/v8/test/cctest/test-disasm-x64.cc | 6 + deps/v8/test/cctest/test-extra.js | 22 +- deps/v8/test/cctest/test-feedback-vector.cc | 31 +- .../test/cctest/test-field-type-tracking.cc | 129 +- deps/v8/test/cctest/test-flags.cc | 2 +- deps/v8/test/cctest/test-hashing.cc | 5 +- deps/v8/test/cctest/test-heap-profiler.cc | 12 +- deps/v8/test/cctest/test-identity-map.cc | 123 +- .../cctest/test-inobject-slack-tracking.cc | 3 + deps/v8/test/cctest/test-log.cc | 8 +- .../test/cctest/test-macro-assembler-arm.cc | 159 +- .../test/cctest/test-macro-assembler-mips.cc | 16 +- .../cctest/test-macro-assembler-mips64.cc | 62 +- deps/v8/test/cctest/test-mementos.cc | 5 +- deps/v8/test/cctest/test-modules.cc | 120 +- deps/v8/test/cctest/test-parsing.cc | 601 ++- deps/v8/test/cctest/test-profile-generator.cc | 5 +- deps/v8/test/cctest/test-regexp.cc | 3 + .../cctest/test-run-wasm-relocation-arm.cc | 4 +- .../cctest/test-run-wasm-relocation-arm64.cc | 7 +- .../cctest/test-run-wasm-relocation-ia32.cc | 4 +- .../cctest/test-run-wasm-relocation-x64.cc | 4 +- deps/v8/test/cctest/test-serialize.cc | 183 +- deps/v8/test/cctest/test-simulator-arm.cc | 8 +- deps/v8/test/cctest/test-simulator-arm64.cc | 384 ++ deps/v8/test/cctest/test-strings.cc | 26 +- deps/v8/test/cctest/test-symbols.cc | 2 +- deps/v8/test/cctest/test-types.cc | 5 +- deps/v8/test/cctest/test-unboxed-doubles.cc | 16 +- deps/v8/test/cctest/test-utils-arm64.cc | 3 +- deps/v8/test/cctest/test-utils.cc | 9 - deps/v8/test/cctest/test-weakmaps.cc | 10 +- deps/v8/test/cctest/test-weaksets.cc | 8 +- deps/v8/test/cctest/wasm/test-run-wasm-64.cc | 68 +- .../test/cctest/wasm/test-run-wasm-asmjs.cc | 3 +- .../cctest/wasm/test-run-wasm-interpreter.cc | 64 +- deps/v8/test/cctest/wasm/test-run-wasm-js.cc | 2 +- .../test/cctest/wasm/test-run-wasm-module.cc | 241 +- .../cctest/wasm/test-run-wasm-relocation.cc | 72 +- .../wasm/test-run-wasm-simd-lowering.cc | 296 -- .../v8/test/cctest/wasm/test-run-wasm-simd.cc | 1521 +++++- deps/v8/test/cctest/wasm/test-run-wasm.cc | 234 +- .../test/cctest/wasm/test-wasm-breakpoints.cc | 154 +- .../wasm/test-wasm-interpreter-entry.cc | 39 +- deps/v8/test/cctest/wasm/test-wasm-stack.cc | 2 +- .../cctest/wasm/test-wasm-trap-position.cc | 3 +- deps/v8/test/cctest/wasm/wasm-run-utils.h | 136 +- .../common}/wasm/wasm-macro-gen.h | 185 +- .../v8/test/common/wasm/wasm-module-runner.cc | 23 +- deps/v8/test/common/wasm/wasm-module-runner.h | 2 +- .../debugger/debug/debug-compile-optimized.js | 2 +- .../debug/debug-evaluate-nested-let.js | 2 +- .../debug-evaluate-no-side-effect-builtins.js | 70 +- .../debug-evaluate-no-side-effect-control.js | 2 +- .../debug/debug-evaluate-no-side-effect.js | 18 +- deps/v8/test/debugger/debug/debug-optimize.js | 2 +- .../debug-scopes-suspended-generators.js | 2 +- deps/v8/test/debugger/debug/debug-scopes.js | 4 +- deps/v8/test/debugger/debug/debug-script.js | 2 +- deps/v8/test/debugger/debug/debug-step.js | 2 + .../debugger/debug/debug-stepin-accessor.js | 3 +- .../debug-stepin-property-function-call.js | 2 +- .../debugger/debug/es6/debug-blockscopes.js | 2 +- .../debug/es6/debug-stepin-microtasks.js | 4 +- .../debug/harmony/modules-debug-scopes1.js | 4 +- .../debug/ignition/debug-break-mixed-stack.js | 51 - .../debug/ignition/debug-step-mixed-stack.js | 52 - .../debug/regress/regress-crbug-465298.js | 2 +- .../debug/regress/regress-crbug-517592.js | 2 - .../debug/regress/regress-crbug-633999.js | 2 +- .../regress-prepare-break-while-recompile.js | 1 - deps/v8/test/debugger/debug/wasm/asm-debug.js | 23 +- deps/v8/test/debugger/debugger.isolate | 14 +- deps/v8/test/debugger/debugger.status | 31 +- deps/v8/test/default.gyp | 9 +- deps/v8/test/default.isolate | 2 + deps/v8/test/fuzzer/fuzzer-support.cc | 2 +- deps/v8/test/fuzzer/fuzzer-support.h | 2 +- deps/v8/test/fuzzer/fuzzer.gyp | 34 +- deps/v8/test/fuzzer/parser.cc | 48 +- deps/v8/test/fuzzer/testcfg.py | 3 + deps/v8/test/fuzzer/wasm-call.cc | 249 +- deps/v8/test/fuzzer/wasm-code.cc | 174 +- deps/v8/test/fuzzer/wasm-compile.cc | 180 +- deps/v8/test/fuzzer/wasm-data-section.cc | 6 +- .../test/fuzzer/wasm-function-sigs-section.cc | 7 +- deps/v8/test/fuzzer/wasm-fuzzer-common.cc | 194 + deps/v8/test/fuzzer/wasm-fuzzer-common.h | 40 + deps/v8/test/fuzzer/wasm-globals-section.cc | 6 +- deps/v8/test/fuzzer/wasm-imports-section.cc | 6 +- deps/v8/test/fuzzer/wasm-memory-section.cc | 6 +- deps/v8/test/fuzzer/wasm-names-section.cc | 6 +- deps/v8/test/fuzzer/wasm-section-fuzzers.cc | 64 - deps/v8/test/fuzzer/wasm-section-fuzzers.h | 16 - deps/v8/test/fuzzer/wasm-types-section.cc | 6 +- deps/v8/test/fuzzer/wasm.tar.gz.sha1 | 1 - deps/v8/test/fuzzer/wasm/foo | 0 deps/v8/test/fuzzer/wasm_asmjs.tar.gz.sha1 | 1 - deps/v8/test/fuzzer/wasm_asmjs/foo | 0 .../test/fuzzer/wasm_asmjs_corpus.tar.gz.sha1 | 1 + deps/v8/test/fuzzer/wasm_corpus.tar.gz.sha1 | 1 + deps/v8/test/inspector/BUILD.gn | 48 +- .../destroy-context-during-log-expected.txt | 1 + .../console/destroy-context-during-log.js | 10 +- .../console/let-const-with-api-expected.txt | 3 +- .../inspector/console/let-const-with-api.js | 2 + .../memory-setter-in-strict-mode-expected.txt | 9 - .../console/memory-setter-in-strict-mode.js | 13 - ...ofile-end-parameterless-crash-expected.txt | 2 +- ...console-profile-end-parameterless-crash.js | 4 +- .../cpu-profiler/console-profile-expected.txt | 2 +- .../inspector/cpu-profiler/console-profile.js | 4 +- .../cpu-profiler/coverage-expected.txt | 693 ++- .../test/inspector/cpu-profiler/coverage.js | 197 +- .../cpu-profiler/enable-disable-expected.txt | 2 +- .../inspector/cpu-profiler/enable-disable.js | 28 +- .../record-cpu-profile-expected.txt | 2 +- .../cpu-profiler/record-cpu-profile.js | 28 +- ...stop-without-preceeding-start-expected.txt | 2 +- .../stop-without-preceeding-start.js | 18 +- .../access-obsolete-frame-expected.txt | 3 +- .../debugger/access-obsolete-frame.js | 4 +- .../debugger/asm-js-breakpoint-before-exec.js | 4 +- .../debugger/asm-js-breakpoint-during-exec.js | 4 +- .../debugger/asm-js-stack-expected.txt | 1 + .../test/inspector/debugger/asm-js-stack.js | 4 +- .../async-console-count-doesnt-crash.js | 4 +- ...nc-for-await-of-promise-stack-expected.txt | 58 + .../async-for-await-of-promise-stack.js | 164 + .../async-instrumentation-expected.txt | 4 +- .../debugger/async-instrumentation.js | 10 +- .../async-promise-late-then-expected.txt | 6 +- .../debugger/async-promise-late-then.js | 10 +- .../inspector/debugger/async-set-timeout.js | 10 +- .../debugger/async-stack-await-expected.txt | 15 +- .../inspector/debugger/async-stack-await.js | 10 +- .../async-stack-created-frame-expected.txt | 57 +- .../debugger/async-stack-created-frame.js | 11 +- .../async-stack-for-promise-expected.txt | 129 +- .../debugger/async-stack-for-promise.js | 10 +- .../debugger/async-stacks-limit-expected.txt | 140 - .../inspector/debugger/async-stacks-limit.js | 164 - .../debugger/break-on-exception-expected.txt | 2 +- .../inspector/debugger/break-on-exception.js | 4 +- .../call-frame-function-location-expected.txt | 1 + .../debugger/call-frame-function-location.js | 4 +- ...n-from-framework-inside-async-expected.txt | 4 + ...t-exception-from-framework-inside-async.js | 38 + .../debugger/caught-uncaught-exceptions.js | 4 +- .../collect-obsolete-async-tasks-expected.txt | 37 + .../debugger/collect-obsolete-async-tasks.js | 35 + ...collect-old-async-call-chains-expected.txt | 211 + .../debugger/collect-old-async-call-chains.js | 171 + ...-line-api-with-bound-function-expected.txt | 2 +- .../command-line-api-with-bound-function.js | 4 +- .../continue-to-location-expected.txt | 2 +- ...o-location-target-call-frames-expected.txt | 81 + ...continue-to-location-target-call-frames.js | 139 + .../debugger/continue-to-location.js | 4 +- .../destory-in-break-program-expected.txt | 1 + .../debugger/destory-in-break-program.js | 13 + ...snt-step-into-injected-script-expected.txt | 32 +- .../doesnt-step-into-injected-script.js | 45 +- .../es6-module-script-parsed-expected.txt | 3 + .../debugger/es6-module-script-parsed.js | 12 +- .../debugger/es6-module-set-script-source.js | 8 +- .../debugger/eval-scopes-expected.txt | 3 +- .../v8/test/inspector/debugger/eval-scopes.js | 4 +- .../debugger/framework-break-expected.txt | 4 +- .../inspector/debugger/framework-break.js | 18 +- ...mework-nested-scheduled-break-expected.txt | 18 +- .../framework-nested-scheduled-break.js | 20 +- .../debugger/framework-precise-ranges.js | 10 +- .../debugger/framework-stepping-expected.txt | 10 +- .../inspector/debugger/framework-stepping.js | 18 +- ...ble-breakpoints-array-literal-expected.txt | 3 + .../get-possible-breakpoints-array-literal.js | 4 +- ...ssible-breakpoints-lazy-error-expected.txt | 26 + .../get-possible-breakpoints-lazy-error.js | 28 + ...t-possible-breakpoints-master-expected.txt | 270 ++ .../get-possible-breakpoints-master.js | 43 + ...akpoints-restrict-to-function-expected.txt | 497 ++ ...ssible-breakpoints-restrict-to-function.js | 120 + .../debugger/get-possible-breakpoints.js | 4 +- .../debugger/inspector-break-api-expected.txt | 2 +- .../inspector/debugger/inspector-break-api.js | 18 +- .../max-async-call-chain-depth-expected.txt | 91 + .../debugger/max-async-call-chain-depth.js | 162 + .../object-preview-internal-properties.js | 2 +- .../inspector/debugger/pause-expected.txt | 40 + .../test/inspector/debugger/pause-on-oom.js | 6 +- deps/v8/test/inspector/debugger/pause.js | 101 + .../promise-chain-when-limit-hit-expected.txt | 235 + .../debugger/promise-chain-when-limit-hit.js | 54 + ...tocol-string-to-double-locale-expected.txt | 8 + .../protocol-string-to-double-locale.js | 24 + .../debugger/resources/break-locations.js | 269 ++ .../debugger/restore-breakpoint-expected.txt | 76 + .../inspector/debugger/restore-breakpoint.js | 69 + .../return-break-locations-expected.txt | 11 + .../debugger/return-break-locations.js | 26 + .../schedule-step-into-async-expected.txt | 191 + ...e-step-into-async-set-timeout-expected.txt | 45 + .../schedule-step-into-async-set-timeout.js | 75 + .../debugger/schedule-step-into-async.js | 159 + ...kip-variables-with-empty-name-expected.txt | 3 +- .../scope-skip-variables-with-empty-name.js | 4 +- .../debugger/script-end-location-expected.txt | 91 + .../inspector/debugger/script-end-location.js | 48 + .../script-on-after-compile-expected.txt | 168 +- .../debugger/script-on-after-compile.js | 24 +- ...t-parsed-for-runtime-evaluate-expected.txt | 161 +- .../script-parsed-for-runtime-evaluate.js | 32 +- .../debugger/script-parsed-hash-expected.txt | 3 +- .../inspector/debugger/script-parsed-hash.js | 2 + .../script-with-negative-offset-expected.txt | 19 + .../debugger/script-with-negative-offset.js | 31 + .../set-async-call-stack-depth-expected.txt | 37 + .../debugger/set-async-call-stack-depth.js | 79 + .../set-blackbox-patterns-expected.txt | 1 + .../debugger/set-blackbox-patterns.js | 10 +- ...et-breakpoint-before-enabling-expected.txt | 1 + .../set-breakpoint-before-enabling.js | 2 + .../debugger/set-script-source-exception.js | 4 +- .../debugger/set-script-source-expected.txt | 2 +- .../inspector/debugger/set-script-source.js | 4 +- ...de-effect-free-debug-evaluate-expected.txt | 1 + .../side-effect-free-debug-evaluate.js | 5 +- .../inspector/debugger/step-into-expected.txt | 1099 +++++ .../debugger/step-into-nested-arrow.js | 8 +- .../step-into-next-script-expected.txt | 18 +- .../debugger/step-into-next-script.js | 16 +- deps/v8/test/inspector/debugger/step-into.js | 34 + .../step-out-async-await-expected.txt | 67 + .../debugger/step-out-async-await.js | 72 + ...ep-over-another-context-group-expected.txt | 7 + .../step-over-another-context-group.js | 36 + .../step-over-caught-exception-expected.txt | 3 +- .../debugger/step-over-caught-exception.js | 4 +- .../debugger/step-snapshot-expected.txt | 35 + .../test/inspector/debugger/step-snapshot.js | 31 + ...fter-get-possible-breakpoints-expected.txt | 2 +- ...stepping-after-get-possible-breakpoints.js | 4 +- ...tepping-and-break-program-api-expected.txt | 19 + .../stepping-and-break-program-api.js | 34 + ...pping-ignores-injected-script-expected.txt | 2 + .../stepping-ignores-injected-script.js | 21 + .../debugger/stepping-tail-call-expected.txt | 177 + .../inspector/debugger/stepping-tail-call.js | 81 + ...epping-with-blackboxed-ranges-expected.txt | 2 + .../stepping-with-blackboxed-ranges.js | 8 +- ...-with-exposed-injected-script-expected.txt | 2 + .../stepping-with-exposed-injected-script.js | 22 + ...g-with-natives-and-frameworks-expected.txt | 310 ++ .../stepping-with-natives-and-frameworks.js | 300 ++ .../suspended-generator-scopes-expected.txt | 2 + .../debugger/suspended-generator-scopes.js | 5 +- .../update-call-frame-scopes-expected.txt | 2 +- .../debugger/update-call-frame-scopes.js | 4 +- .../wasm-get-breakable-locations-expected.txt | 49 +- .../debugger/wasm-get-breakable-locations.js | 6 +- .../debugger/wasm-imports-expected.txt | 25 + .../test/inspector/debugger/wasm-imports.js | 110 + .../debugger/wasm-scripts-expected.txt | 9 +- .../test/inspector/debugger/wasm-scripts.js | 11 +- .../debugger/wasm-source-expected.txt | 1 + .../v8/test/inspector/debugger/wasm-source.js | 10 +- .../debugger/wasm-stack-expected.txt | 1 + deps/v8/test/inspector/debugger/wasm-stack.js | 8 +- .../debugger/wasm-stepping-expected.txt | 353 +- .../test/inspector/debugger/wasm-stepping.js | 53 +- .../take-heap-snapshot-on-pause.js | 6 +- deps/v8/test/inspector/inspector-impl.cc | 249 +- deps/v8/test/inspector/inspector-impl.h | 85 +- deps/v8/test/inspector/inspector-test.cc | 844 ++-- deps/v8/test/inspector/inspector.gyp | 10 + deps/v8/test/inspector/inspector.isolate | 35 +- deps/v8/test/inspector/inspector.status | 26 +- deps/v8/test/inspector/isolate-data.cc | 95 + deps/v8/test/inspector/isolate-data.h | 67 + .../v8/test/inspector/json-parse-expected.txt | 1 + deps/v8/test/inspector/json-parse.js | 6 +- deps/v8/test/inspector/protocol-test.js | 394 +- .../test/inspector/runtime/await-promise.js | 4 +- .../call-function-on-async-expected.txt | 6 +- .../runtime/call-function-on-async.js | 2 +- .../clear-of-command-line-api-expected.txt | 2 +- .../runtime/clear-of-command-line-api.js | 4 +- .../client-console-api-message-expected.txt | 8 + .../runtime/client-console-api-message.js | 28 + .../runtime/command-line-api-expected.txt | 612 +++ .../inspector/runtime/command-line-api.js | 175 + .../runtime/compile-script-expected.txt | 3 +- .../test/inspector/runtime/compile-script.js | 2 + ...nsole-api-repeated-in-console-expected.txt | 1 - .../console-api-repeated-in-console.js | 2 +- .../test/inspector/runtime/console-assert.js | 4 +- .../console-deprecated-methods-expected.txt | 1 - .../runtime/console-deprecated-methods.js | 2 +- .../console-line-and-column-expected.txt | 3 +- .../runtime/console-line-and-column.js | 2 + ...ole-log-doesnt-run-microtasks-expected.txt | 1 - .../console-log-doesnt-run-microtasks.js | 4 +- .../runtime/console-memory-expected.txt | 45 + .../test/inspector/runtime/console-memory.js | 32 + .../runtime/console-messages-limits.js | 4 +- .../test/inspector/runtime/console-methods.js | 4 +- .../runtime/console-spec-expected.txt | 30 + .../v8/test/inspector/runtime/console-spec.js | 60 + .../runtime/console-time-end-format.js | 6 +- .../runtime/console-timestamp-expected.txt | 2 +- .../inspector/runtime/console-timestamp.js | 2 + .../runtime/create-context-expected.txt | 56 + .../test/inspector/runtime/create-context.js | 51 + .../inspector/runtime/es6-module-expected.txt | 10 +- deps/v8/test/inspector/runtime/es6-module.js | 16 +- .../runtime/evaluate-async-expected.txt | 4 - .../runtime/evaluate-async-with-wrap-error.js | 4 +- .../test/inspector/runtime/evaluate-async.js | 4 +- .../inspector/runtime/evaluate-empty-stack.js | 4 +- ...te-with-context-id-equal-zero-expected.txt | 1 - .../evaluate-with-context-id-equal-zero.js | 2 +- ...valuate-with-generate-preview-expected.txt | 736 +++ .../runtime/evaluate-with-generate-preview.js | 75 +- .../runtime/exception-thrown-expected.txt | 4 - .../inspector/runtime/exception-thrown.js | 4 +- .../runtime/get-properties-expected.txt | 23 +- .../get-properties-on-proxy-expected.txt | 2 +- .../runtime/get-properties-on-proxy.js | 4 +- .../get-properties-preview-expected.txt | 2 +- .../runtime/get-properties-preview.js | 4 + .../test/inspector/runtime/get-properties.js | 251 +- .../runtime/internal-properties-entries.js | 2 +- .../inspector/runtime/internal-properties.js | 4 +- .../length-or-size-description-expected.txt | 4 + .../runtime/length-or-size-description.js | 9 +- .../property-on-console-proto-expected.txt | 1 - .../runtime/property-on-console-proto.js | 4 +- ...l-works-with-different-locale-expected.txt | 1 + .../protocol-works-with-different-locale.js | 16 +- .../runtime/run-script-async-expected.txt | 6 +- .../inspector/runtime/run-script-async.js | 2 +- ...e-evaluate-with-dirty-context-expected.txt | 35 + .../runtime-evaluate-with-dirty-context.js | 11 + .../runtime/runtime-restore-expected.txt | 115 + .../test/inspector/runtime/runtime-restore.js | 77 + .../inspector/runtime/set-or-map-entries.js | 6 +- deps/v8/test/inspector/task-runner.cc | 160 +- deps/v8/test/inspector/task-runner.h | 84 +- deps/v8/test/inspector/testcfg.py | 10 +- .../intl/date-format/date-format-to-parts.js | 2 - deps/v8/test/intl/general/case-mapping.js | 2 + deps/v8/test/intl/intl.status | 10 - deps/v8/test/js-perf-test/Array/filter.js | 92 + deps/v8/test/js-perf-test/Array/map.js | 88 + deps/v8/test/js-perf-test/Array/run.js | 30 + .../js-perf-test/BytecodeHandlers/compare.js | 157 + .../test/js-perf-test/BytecodeHandlers/run.js | 29 + .../v8/test/js-perf-test/ForLoops/for_loop.js | 42 + deps/v8/test/js-perf-test/ForLoops/run.js | 25 + deps/v8/test/js-perf-test/JSTests.json | 153 +- .../test/js-perf-test/Modules/basic-export.js | 7 + .../test/js-perf-test/Modules/basic-import.js | 8 + .../js-perf-test/Modules/basic-namespace.js | 8 + deps/v8/test/js-perf-test/Modules/run.js | 63 + deps/v8/test/js-perf-test/Modules/value.js | 6 + .../PropertyQueries/property-queries.js | 3 + .../test/js-perf-test/RestParameters/rest.js | 66 + deps/v8/test/js-perf-test/SixSpeed.json | 141 + .../js-perf-test/SixSpeed/classes/babel.js | 51 + .../test/js-perf-test/SixSpeed/classes/es5.js | 20 + .../test/js-perf-test/SixSpeed/classes/es6.js | 21 + .../js-perf-test/SixSpeed/map_set_add/es5.js | 21 + .../js-perf-test/SixSpeed/map_set_add/es6.js | 22 + .../SixSpeed/map_set_lookup/es5.js | 32 + .../SixSpeed/map_set_lookup/es6.js | 30 + .../SixSpeed/map_set_object/es5.js | 24 + .../SixSpeed/map_set_object/es6.js | 22 + .../js-perf-test/SixSpeed/map_string/es5.js | 26 + .../js-perf-test/SixSpeed/map_string/es6.js | 26 + .../test/js-perf-test/SixSpeed/super/babel.js | 135 + .../test/js-perf-test/SixSpeed/super/es5.js | 34 + .../test/js-perf-test/SixSpeed/super/es6.js | 34 + .../TypedArrays/construct-all-typedarrays.js | 40 + .../TypedArrays/construct-same-typedarray.js | 17 + .../TypedArrays/construct-typedarray.js | 17 + deps/v8/test/message/README.md | 25 + deps/v8/test/message/arrow-invalid-rest-2.out | 6 +- deps/v8/test/message/arrow-invalid-rest.out | 6 +- .../test/message/asm-assignment-undeclared.js | 16 + .../message/asm-assignment-undeclared.out | 5 + .../test/message/asm-function-mismatch-def.js | 19 + .../message/asm-function-mismatch-def.out | 5 + .../test/message/asm-function-mismatch-use.js | 19 + .../message/asm-function-mismatch-use.out | 5 + .../v8/test/message/asm-function-redefined.js | 15 + .../test/message/asm-function-redefined.out | 5 + .../v8/test/message/asm-function-undefined.js | 14 + .../test/message/asm-function-undefined.out | 5 + .../asm-function-variable-collision.js | 15 + .../asm-function-variable-collision.out | 5 + .../message/asm-import-wrong-annotation.js | 11 + .../message/asm-import-wrong-annotation.out | 5 + .../test/message/asm-import-wrong-object.js | 11 + .../test/message/asm-import-wrong-object.out | 5 + .../v8/test/message/asm-linking-bogus-heap.js | 15 + .../test/message/asm-linking-bogus-heap.out | 5 + .../test/message/asm-linking-bogus-stdlib.js | 15 + .../test/message/asm-linking-bogus-stdlib.out | 5 + .../test/message/asm-linking-missing-heap.js | 15 + .../test/message/asm-linking-missing-heap.out | 5 + .../asm-missing-parameter-annotation.js | 16 + .../asm-missing-parameter-annotation.out | 5 + .../message/asm-missing-return-annotation.js | 17 + .../message/asm-missing-return-annotation.out | 5 + .../v8/test/message/asm-table-mismatch-def.js | 22 + .../test/message/asm-table-mismatch-def.out | 5 + .../v8/test/message/asm-table-mismatch-use.js | 24 + .../test/message/asm-table-mismatch-use.out | 5 + deps/v8/test/message/asm-table-redefined.js | 20 + deps/v8/test/message/asm-table-redefined.out | 5 + deps/v8/test/message/asm-table-undefined.js | 15 + deps/v8/test/message/asm-table-undefined.out | 5 + .../message/asm-table-variable-collision.js | 14 + .../message/asm-table-variable-collision.out | 5 + .../message/async-arrow-invalid-rest-2.js | 8 + .../message/async-arrow-invalid-rest-2.out | 4 + .../test/message/async-arrow-invalid-rest.js | 8 + .../test/message/async-arrow-invalid-rest.out | 4 + .../message/async-arrow-param-after-rest.js | 7 + .../message/async-arrow-param-after-rest.out | 5 + deps/v8/test/message/class-spread-property.js | 5 + .../v8/test/message/class-spread-property.out | 4 + deps/v8/test/message/console.js | 25 + deps/v8/test/message/console.out | 15 + .../test/message/function-param-after-rest.js | 7 + .../message/function-param-after-rest.out | 5 + deps/v8/test/message/get-iterator1.js | 7 + deps/v8/test/message/get-iterator1.out | 5 + .../v8/test/message/let-asi-await-nonasync.js | 9 + .../test/message/let-asi-await-nonasync.out | 4 + .../message/let-asi-yield-nongenerator.js | 9 + .../message/let-asi-yield-nongenerator.out | 4 + deps/v8/test/message/modules-cycle5.js | 8 + deps/v8/test/message/modules-cycle5.out | 5 + deps/v8/test/message/modules-cycle6.js | 8 + deps/v8/test/message/modules-cycle6.out | 5 + deps/v8/test/message/modules-skip-cycle5.js | 5 + deps/v8/test/message/modules-skip-cycle6.js | 5 + .../message/regress/regress-crbug-691194.js | 5 + .../message/regress/regress-crbug-691194.out | 10 + deps/v8/test/message/testcfg.py | 1 + deps/v8/test/mjsunit/allocation-site-info.js | 12 +- deps/v8/test/mjsunit/arguments-deopt.js | 153 +- deps/v8/test/mjsunit/arguments.js | 81 + .../mjsunit/array-constructor-feedback.js | 11 +- deps/v8/test/mjsunit/array-feedback.js | 2 +- .../v8/test/mjsunit/array-literal-feedback.js | 2 +- .../test/mjsunit/array-literal-transitions.js | 2 +- deps/v8/test/mjsunit/array-push5.js | 2 +- deps/v8/test/mjsunit/array-reduce.js | 6 + deps/v8/test/mjsunit/array-shift4.js | 2 +- deps/v8/test/mjsunit/array-slice.js | 35 +- deps/v8/test/mjsunit/array-store-and-grow.js | 2 +- deps/v8/test/mjsunit/asm/asm-memory.js | 55 + deps/v8/test/mjsunit/asm/asm-stdlib.js | 46 + deps/v8/test/mjsunit/asm/asm-validation.js | 41 +- deps/v8/test/mjsunit/asm/call-annotation.js | 179 + deps/v8/test/mjsunit/asm/call-collisions.js | 67 + deps/v8/test/mjsunit/asm/call-stdlib.js | 85 + deps/v8/test/mjsunit/asm/global-imports.js | 74 + deps/v8/test/mjsunit/asm/immutable.js | 48 + deps/v8/test/mjsunit/asm/int32-mul.js | 4 +- deps/v8/test/mjsunit/asm/regress-674089.js | 2 +- deps/v8/test/mjsunit/asm/regress-718745.js | 13 + deps/v8/test/mjsunit/asm/return-types.js | 123 + deps/v8/test/mjsunit/basic-promise.js | 42 + deps/v8/test/mjsunit/code-coverage-ad-hoc.js | 10 +- .../mjsunit/compiler/array-constructor.js | 89 + ...-no-harmony-restrict-constructor-return.js | 12 + .../mjsunit/compiler/constructor-inlining.js | 128 + .../compiler/deopt-inlined-from-call.js | 2 +- .../compiler/deopt-numberoroddball-binop.js | 8 +- .../compiler/deopt-string-outofbounds.js | 2 +- .../mjsunit/compiler/escape-analysis-13.js | 17 + .../mjsunit/compiler/escape-analysis-16.js | 18 + .../mjsunit/compiler/escape-analysis-17.js | 27 + .../compiler/escape-analysis-phi-type-2.js | 41 + .../compiler/escape-analysis-phi-type.js | 24 + .../escape-analysis-representation.js | 2 +- .../compiler/increment-typefeedback.js | 2 +- .../test/mjsunit/compiler/inline-accessors.js | 2 +- .../test/mjsunit/compiler/inline-arguments.js | 2 +- .../mjsunit/compiler/inlined-array-pop-opt.js | 2 +- deps/v8/test/mjsunit/compiler/inlined-call.js | 2 +- deps/v8/test/mjsunit/compiler/instanceof.js | 12 + .../mjsunit/compiler/integral32-add-sub.js | 8 +- .../compiler/manual-concurrent-recompile.js | 7 +- .../mjsunit/compiler/object-getprototypeof.js | 15 + .../mjsunit/compiler/opt-next-call-turbo.js | 2 +- .../v8/test/mjsunit/compiler/opt-next-call.js | 2 +- .../compiler/optimized-float32array-length.js | 2 +- .../compiler/optimized-float64array-length.js | 2 +- .../compiler/optimized-int32array-length.js | 2 +- .../compiler/optimized-uint32array-length.js | 2 +- .../compiler/reflect-getprototypeof.js | 15 + deps/v8/test/mjsunit/compiler/regress-5320.js | 5 +- .../test/mjsunit/compiler/regress-693425.js | 11 + .../test/mjsunit/compiler/regress-694088.js | 46 + .../test/mjsunit/compiler/regress-700883.js | 23 + .../test/mjsunit/compiler/regress-713367.js | 30 + .../test/mjsunit/compiler/regress-714483.js | 26 + .../test/mjsunit/compiler/regress-715204.js | 13 + .../test/mjsunit/compiler/regress-715651.js | 38 + .../compiler/regress-compare-negate.js | 2 +- .../regress-strict-equals-mixed-feedback.js | 23 - .../compiler/regress-string-to-number-add.js | 2 +- .../test/mjsunit/compiler/regress-v8-6077.js | 69 + .../test/mjsunit/compiler/rest-parameters.js | 54 + .../mjsunit/compiler/turbo-number-feedback.js | 2 +- .../mjsunit/compiler/uint8-clamped-array.js | 2 +- deps/v8/test/mjsunit/const-field-tracking.js | 2 +- deps/v8/test/mjsunit/constant-folding-2.js | 2 +- deps/v8/test/mjsunit/debugPrint.js | 28 +- deps/v8/test/mjsunit/deopt-minus-zero.js | 2 +- .../mjsunit/deopt-recursive-eager-once.js | 34 + .../test/mjsunit/deopt-recursive-lazy-once.js | 34 + .../test/mjsunit/deopt-recursive-soft-once.js | 36 + deps/v8/test/mjsunit/deopt-unlinked.js | 32 + deps/v8/test/mjsunit/deopt-with-fp-regs.js | 2 +- .../mjsunit/deserialize-optimize-inner.js | 3 +- deps/v8/test/mjsunit/dictionary-properties.js | 2 + deps/v8/test/mjsunit/div-mul-minus-one.js | 2 +- deps/v8/test/mjsunit/duplicate-parameters.js | 179 + deps/v8/test/mjsunit/element-read-only.js | 47 +- .../mjsunit/elements-transition-hoisting.js | 2 +- .../mjsunit/ensure-growing-store-learns.js | 6 +- .../test/mjsunit/es6/array-iterator-turbo.js | 39 +- .../es6/block-let-crankshaft-sloppy.js | 2 +- .../test/mjsunit/es6/block-let-crankshaft.js | 2 +- .../test/mjsunit/es6/block-scoping-sloppy.js | 2 +- deps/v8/test/mjsunit/es6/block-scoping.js | 2 +- deps/v8/test/mjsunit/es6/classes.js | 2 +- deps/v8/test/mjsunit/es6/completion.js | 10 + .../mjsunit/es6/destructuring-assignment.js | 90 + deps/v8/test/mjsunit/es6/generator-let-asi.js | 14 + .../v8/test/mjsunit/es6/global-proto-proxy.js | 41 + .../test/mjsunit/es6/regress/regress-6098.js | 14 + .../test/mjsunit/es6/regress/regress-6322.js | 6 + .../mjsunit/es6/rest-params-lazy-parsing.js | 2 - deps/v8/test/mjsunit/es6/string-replace.js | 6 +- deps/v8/test/mjsunit/es6/string-split.js | 5 +- ...t-by-array-like-prototype-element-added.js | 32 + .../es6/typedarray-construct-by-array-like.js | 279 ++ ...typedarray-construct-by-buffer-ordering.js | 81 + .../typedarray-construct-offset-not-smi.js | 37 + .../test/mjsunit/es6/typedarray-copywithin.js | 4 +- deps/v8/test/mjsunit/es6/typedarray-every.js | 19 + deps/v8/test/mjsunit/es6/typedarray-fill.js | 102 +- deps/v8/test/mjsunit/es6/typedarray-find.js | 15 + .../test/mjsunit/es6/typedarray-findindex.js | 13 + .../v8/test/mjsunit/es6/typedarray-foreach.js | 5 + .../test/mjsunit/es6/typedarray-indexing.js | 41 + .../test/mjsunit/es6/typedarray-iteration.js | 17 + deps/v8/test/mjsunit/es6/typedarray-map.js | 49 + deps/v8/test/mjsunit/es6/typedarray-reduce.js | 16 + .../v8/test/mjsunit/es6/typedarray-reverse.js | 9 + deps/v8/test/mjsunit/es6/typedarray-slice.js | 85 +- deps/v8/test/mjsunit/es6/typedarray-sort.js | 7 + .../test/mjsunit/es6/typedarray-tostring.js | 9 + deps/v8/test/mjsunit/es6/typedarray.js | 58 + deps/v8/test/mjsunit/es7/regexp-ui-word.js | 42 + deps/v8/test/mjsunit/es8/async-let-asi.js | 22 + .../es8/constructor-returning-primitive.js | 318 ++ deps/v8/test/mjsunit/fast-prototype.js | 2 +- deps/v8/test/mjsunit/field-type-tracking.js | 2 +- .../fixed-context-shapes-when-recompiling.js | 2 +- .../mjsunit/function-arguments-duplicate.js | 4 + deps/v8/test/mjsunit/getters-on-elements.js | 45 +- deps/v8/test/mjsunit/global-accessors.js | 2 + .../harmony/async-from-sync-iterator.js | 92 + .../mjsunit/harmony/async-generators-basic.js | 1730 +++++++ .../mjsunit/harmony/atomics-value-check.js | 44 + deps/v8/test/mjsunit/harmony/atomics.js | 39 +- .../v8/test/mjsunit/harmony/do-expressions.js | 2 +- deps/v8/test/mjsunit/harmony/futex.js | 8 + .../global-accessors-strict.js} | 30 +- .../test/mjsunit/harmony/modules-import-1.js | 12 + .../test/mjsunit/harmony/modules-import-10.js | 15 + .../test/mjsunit/harmony/modules-import-11.js | 22 + .../test/mjsunit/harmony/modules-import-12.js | 19 + .../test/mjsunit/harmony/modules-import-13.js | 39 + .../test/mjsunit/harmony/modules-import-14.js | 26 + .../test/mjsunit/harmony/modules-import-15.js | 56 + .../test/mjsunit/harmony/modules-import-2.js | 18 + .../test/mjsunit/harmony/modules-import-3.js | 22 + .../test/mjsunit/harmony/modules-import-4.js | 13 + .../test/mjsunit/harmony/modules-import-5.js | 13 + .../test/mjsunit/harmony/modules-import-6.js | 29 + .../test/mjsunit/harmony/modules-import-7.js | 24 + .../test/mjsunit/harmony/modules-import-8.js | 91 + .../test/mjsunit/harmony/modules-import-9.js | 22 + .../v8/test/mjsunit/harmony/modules-skip-1.js | 5 + .../v8/test/mjsunit/harmony/modules-skip-2.js | 5 + .../v8/test/mjsunit/harmony/modules-skip-3.js | 5 + .../v8/test/mjsunit/harmony/modules-skip-4.js | 6 + .../v8/test/mjsunit/harmony/modules-skip-5.js | 15 + .../v8/test/mjsunit/harmony/modules-skip-6.js | 11 + .../v8/test/mjsunit/harmony/modules-skip-7.js | 14 + .../v8/test/mjsunit/harmony/modules-skip-8.js | 5 + .../v8/test/mjsunit/harmony/modules-skip-9.js | 5 + .../mjsunit/harmony/modules-skip-empty.js | 3 + .../mjsunit/harmony/regexp-dotall-disabled.js | 71 + deps/v8/test/mjsunit/harmony/regexp-dotall.js | 135 + .../test/mjsunit/harmony/regexp-lookbehind.js | 1 + .../mjsunit/harmony/regexp-named-captures.js | 375 +- .../mjsunit/harmony/regexp-property-binary.js | 162 +- .../harmony/regexp-property-special.js | 22 + .../mjsunit/harmony/regress/regress-6100.js | 1738 +++++++ .../test/mjsunit/harmony/sharedarraybuffer.js | 17 +- .../test/mjsunit/harmony/template-escapes.js | 87 + deps/v8/test/mjsunit/heapObjectVerify.js | 53 + deps/v8/test/mjsunit/icu-date-lord-howe.js | 14 + deps/v8/test/mjsunit/icu-date-to-string.js | 14 + .../ignition/ignition-statistics-extension.js | 2 +- deps/v8/test/mjsunit/ignition/regress-5768.js | 16 - deps/v8/test/mjsunit/indexed-accessors.js | 2 +- deps/v8/test/mjsunit/json-errors.js | 30 + deps/v8/test/mjsunit/json.js | 1 + .../mjsunit/keyed-load-hole-to-undefined.js | 2 +- .../mjsunit/keyed-load-with-string-key.js | 2 +- .../mjsunit/keyed-load-with-symbol-key.js | 2 +- deps/v8/test/mjsunit/keyed-store-generic.js | 22 + .../mjsunit/math-floor-of-div-minus-zero.js | 2 +- deps/v8/test/mjsunit/math-imul.js | 2 +- deps/v8/test/mjsunit/messages.js | 46 +- deps/v8/test/mjsunit/minmax-simple.js | 27 - deps/v8/test/mjsunit/mjsunit.js | 95 +- deps/v8/test/mjsunit/mjsunit.status | 107 +- deps/v8/test/mjsunit/modules-cycle.js | 8 + deps/v8/test/mjsunit/modules-skip-cycle.js | 5 + deps/v8/test/mjsunit/modules-turbo1.js | 2 +- deps/v8/test/mjsunit/never-baseline.js | 24 + deps/v8/test/mjsunit/never-optimize.js | 2 +- deps/v8/test/mjsunit/number-isnan-opt.js | 55 + deps/v8/test/mjsunit/object-keys.js | 34 + deps/v8/test/mjsunit/object-literal.js | 1399 +++++- deps/v8/test/mjsunit/object-seal.js | 2 +- deps/v8/test/mjsunit/osr-elements-kind.js | 2 +- deps/v8/test/mjsunit/parse-tasks.js | 55 + deps/v8/test/mjsunit/polymorph-arrays.js | 2 +- .../proto-elements-add-during-foreach.js | 2 - deps/v8/test/mjsunit/regexp.js | 44 + deps/v8/test/mjsunit/regress-6223.js | 20 + deps/v8/test/mjsunit/regress-707410.js | 10 + deps/v8/test/mjsunit/regress/regress-105.js | 4 +- deps/v8/test/mjsunit/regress/regress-1119.js | 2 - .../v8/test/mjsunit/regress/regress-115452.js | 2 - deps/v8/test/mjsunit/regress/regress-1240.js | 4 +- .../test/mjsunit/regress/regress-1493017.js | 2 +- deps/v8/test/mjsunit/regress/regress-2132.js | 2 +- deps/v8/test/mjsunit/regress/regress-2250.js | 2 +- deps/v8/test/mjsunit/regress/regress-2315.js | 2 +- deps/v8/test/mjsunit/regress/regress-2339.js | 2 +- deps/v8/test/mjsunit/regress/regress-2451.js | 2 +- .../v8/test/mjsunit/regress/regress-252797.js | 3 +- deps/v8/test/mjsunit/regress/regress-2618.js | 2 +- deps/v8/test/mjsunit/regress/regress-3176.js | 2 +- .../v8/test/mjsunit/regress/regress-330046.js | 2 +- .../test/mjsunit/regress/regress-3408144.js | 2 - .../v8/test/mjsunit/regress/regress-347914.js | 2 +- .../v8/test/mjsunit/regress/regress-353004.js | 16 +- .../v8/test/mjsunit/regress/regress-3650-3.js | 2 +- deps/v8/test/mjsunit/regress/regress-3709.js | 2 +- .../v8/test/mjsunit/regress/regress-385565.js | 2 +- .../v8/test/mjsunit/regress/regress-410912.js | 2 +- deps/v8/test/mjsunit/regress/regress-4380.js | 2 +- deps/v8/test/mjsunit/regress/regress-4665.js | 10 +- .../v8/test/mjsunit/regress/regress-475705.js | 2 +- deps/v8/test/mjsunit/regress/regress-4825.js | 16 + deps/v8/test/mjsunit/regress/regress-5380.js | 17 - deps/v8/test/mjsunit/regress/regress-5404.js | 2 +- deps/v8/test/mjsunit/regress/regress-5790.js | 2 +- deps/v8/test/mjsunit/regress/regress-5802.js | 6 +- .../v8/test/mjsunit/regress/regress-599719.js | 2 +- deps/v8/test/mjsunit/regress/regress-6082.js | 11 + deps/v8/test/mjsunit/regress/regress-6142.js | 27 + deps/v8/test/mjsunit/regress/regress-6186.js | 5 + .../v8/test/mjsunit/regress/regress-618608.js | 2 +- deps/v8/test/mjsunit/regress/regress-6196.js | 31 + deps/v8/test/mjsunit/regress/regress-6203.js | 20 + deps/v8/test/mjsunit/regress/regress-6248.js | 24 + deps/v8/test/mjsunit/regress/regress-6280.js | 22 + deps/v8/test/mjsunit/regress/regress-6288.js | 13 + deps/v8/test/mjsunit/regress/regress-6298.js | 16 + deps/v8/test/mjsunit/regress/regress-6337.js | 5 + .../v8/test/mjsunit/regress/regress-639270.js | 2 +- .../v8/test/mjsunit/regress/regress-641091.js | 15 + .../v8/test/mjsunit/regress/regress-645680.js | 16 +- .../v8/test/mjsunit/regress/regress-677685.js | 2 +- .../v8/test/mjsunit/regress/regress-696332.js | 12 + .../v8/test/mjsunit/regress/regress-698790.js | 18 + .../v8/test/mjsunit/regress/regress-705934.js | 15 + .../v8/test/mjsunit/regress/regress-707066.js | 25 + .../v8/test/mjsunit/regress/regress-707187.js | 12 + .../v8/test/mjsunit/regress/regress-707675.js | 8 + .../v8/test/mjsunit/regress/regress-708598.js | 10 + .../v8/test/mjsunit/regress/regress-709029.js | 38 + .../v8/test/mjsunit/regress/regress-709782.js | 14 + .../v8/test/mjsunit/regress/regress-711165.js | 9 + .../v8/test/mjsunit/regress/regress-715582.js | 9 + .../v8/test/mjsunit/regress/regress-716044.js | 25 + .../v8/test/mjsunit/regress/regress-718285.js | 46 + .../v8/test/mjsunit/regress/regress-718891.js | 68 + .../v8/test/mjsunit/regress/regress-719380.js | 7 + .../v8/test/mjsunit/regress/regress-722978.js | 15 + .../v8/test/mjsunit/regress/regress-725858.js | 11 + .../v8/test/mjsunit/regress/regress-726636.js | 14 + .../v8/test/mjsunit/regress/regress-727218.js | 12 + .../regress/regress-conditional-position.js | 2 +- .../mjsunit/regress/regress-crbug-157019.js | 2 +- .../mjsunit/regress/regress-crbug-157520.js | 2 +- .../mjsunit/regress/regress-crbug-244461.js | 2 +- .../mjsunit/regress/regress-crbug-504787.js | 2 - .../mjsunit/regress/regress-crbug-506443.js | 2 +- .../mjsunit/regress/regress-crbug-513507.js | 2 +- .../mjsunit/regress/regress-crbug-554831.js | 2 +- .../mjsunit/regress/regress-crbug-587068.js | 2 +- .../mjsunit/regress/regress-crbug-594183.js | 2 +- .../mjsunit/regress/regress-crbug-638551.js | 2 +- .../mjsunit/regress/regress-crbug-644111.js | 2 +- .../mjsunit/regress/regress-crbug-645103.js | 2 +- .../mjsunit/regress/regress-crbug-645888.js | 2 +- .../mjsunit/regress/regress-crbug-647217.js | 2 +- .../regress/regress-crbug-651403-global.js | 2 +- .../mjsunit/regress/regress-crbug-651403.js | 2 +- .../mjsunit/regress/regress-crbug-688567.js | 36 + .../mjsunit/regress/regress-crbug-688734.js | 16 + .../mjsunit/regress/regress-crbug-691687.js | 10 + .../mjsunit/regress/regress-crbug-696622.js | 14 + .../mjsunit/regress/regress-crbug-697017.js | 8 + .../mjsunit/regress/regress-crbug-698607.js | 22 + .../mjsunit/regress/regress-crbug-699282.js | 11 + .../mjsunit/regress/regress-crbug-700678.js | 20 + .../mjsunit/regress/regress-crbug-700733.js | 66 + .../mjsunit/regress/regress-crbug-702793.js | 19 + .../mjsunit/regress/regress-crbug-702798.js | 8 + .../mjsunit/regress/regress-crbug-703610.js | 16 + .../mjsunit/regress/regress-crbug-707580.js | 10 + .../mjsunit/regress/regress-crbug-708050-1.js | 17 + .../mjsunit/regress/regress-crbug-708050-2.js | 17 + .../mjsunit/regress/regress-crbug-709537.js | 14 + .../mjsunit/regress/regress-crbug-709753.js | 13 + .../mjsunit/regress/regress-crbug-711166.js | 22 + .../mjsunit/regress/regress-crbug-712802.js | 12 + .../mjsunit/regress/regress-crbug-714696.js | 10 + .../mjsunit/regress/regress-crbug-714872.js | 8 + .../mjsunit/regress/regress-crbug-714971.js | 19 + .../mjsunit/regress/regress-crbug-714981.js | 32 + .../mjsunit/regress/regress-crbug-715151.js | 15 + .../mjsunit/regress/regress-crbug-715404.js | 11 + .../mjsunit/regress/regress-crbug-715455.js | 25 + .../mjsunit/regress/regress-crbug-715862.js | 17 + .../mjsunit/regress/regress-crbug-716520.js | 21 + .../mjsunit/regress/regress-crbug-716804.js | 13 + .../mjsunit/regress/regress-crbug-716912.js | 23 + .../mjsunit/regress/regress-crbug-718779.js | 21 + .../mjsunit/regress/regress-crbug-719479.js | 24 + .../mjsunit/regress/regress-crbug-721835.js | 31 + .../mjsunit/regress/regress-crbug-722756.js | 40 + .../mjsunit/regress/regress-crbug-723132.js | 16 + .../mjsunit/regress/regress-crbug-723455.js | 18 + .../mjsunit/regress/regress-crbug-736451.js | 13 + .../mjsunit/regress/regress-crbug-736575.js | 14 + .../mjsunit/regress/regress-crbug-738763.js | 25 + .../mjsunit/regress/regress-crbug-740803.js | 19 + .../mjsunit/regress/regress-crbug-747979.js | 32 + .../mjsunit/regress/regress-crbug-748539.js | 22 + .../regress/regress-embedded-cons-string.js | 3 +- .../regress/regress-map-invalidation-2.js | 2 +- .../regress/regress-param-local-type.js | 2 +- .../regress-put-prototype-transition.js | 6 +- deps/v8/test/mjsunit/regress/regress-r4998.js | 2 - .../regress/regress-store-uncacheable.js | 2 +- .../regress-unlink-closures-on-deopt.js | 37 + .../test/mjsunit/regress/regress-v8-5697.js | 2 +- .../mjsunit/regress/wasm/regress-709684.js | 78 + .../mjsunit/regress/wasm/regress-712569.js | 20 + .../mjsunit/regress/wasm/regression-02256.js | 2 +- .../mjsunit/regress/wasm/regression-02256b.js | 2 +- .../mjsunit/regress/wasm/regression-6164.js | 19 + .../mjsunit/regress/wasm/regression-647649.js | 5 +- .../mjsunit/regress/wasm/regression-670683.js | 23 +- .../mjsunit/regress/wasm/regression-684858.js | 2 +- .../mjsunit/regress/wasm/regression-699485.js | 2 +- .../mjsunit/regress/wasm/regression-702460.js | 47 + .../mjsunit/regress/wasm/regression-702839.js | 11 + .../mjsunit/regress/wasm/regression-703568.js | 15 + .../mjsunit/regress/wasm/regression-708714.js | 23 + .../mjsunit/regress/wasm/regression-710844.js | 23 + .../mjsunit/regress/wasm/regression-711203.js | 30 + .../regress/wasm/regression-715216-a.js | 12 + .../regress/wasm/regression-715216-b.js | 13 + .../mjsunit/regress/wasm/regression-717056.js | 16 + .../mjsunit/regress/wasm/regression-717194.js | 30 + .../mjsunit/regress/wasm/regression-719175.js | 16 + .../mjsunit/regress/wasm/regression-722445.js | 16 + .../mjsunit/regress/wasm/regression-731351.js | 23 + .../mjsunit/regress/wasm/regression-734108.js | 16 + .../mjsunit/regress/wasm/regression-737069.js | 35 + deps/v8/test/mjsunit/setters-on-elements.js | 6 +- .../shared-function-tier-up-default.js | 33 - .../mjsunit/shared-function-tier-up-turbo.js | 3 +- deps/v8/test/mjsunit/shift-for-integer-div.js | 2 +- deps/v8/test/mjsunit/shifts.js | 2 - deps/v8/test/mjsunit/sin-cos.js | 2 +- .../test/mjsunit/skipping-inner-functions.js | 37 + deps/v8/test/mjsunit/smi-mul-const.js | 2 +- deps/v8/test/mjsunit/smi-mul.js | 2 +- deps/v8/test/mjsunit/stack-traces.js | 2 +- deps/v8/test/mjsunit/string-case.js | 5 +- deps/v8/test/mjsunit/string-externalize.js | 12 +- deps/v8/test/mjsunit/string-split.js | 4 +- .../v8/test/mjsunit/strong-rooted-literals.js | 2 +- deps/v8/test/mjsunit/testcfg.py | 7 + deps/v8/test/mjsunit/tools/profile.js | 10 +- .../tools/tickprocessor-test-func-info.log | 6 +- .../mjsunit/tools/tickprocessor-test.default | 2 +- .../tools/tickprocessor-test.func-info | 12 +- .../mjsunit/tools/tickprocessor-test.gc-state | 2 +- .../tools/tickprocessor-test.ignore-unknown | 2 +- .../test/mjsunit/tools/tickprocessor-test.log | 12 +- .../tools/tickprocessor-test.separate-ic | 2 +- deps/v8/test/mjsunit/tools/tickprocessor.js | 62 +- .../type-profile/collect-type-profile.js | 90 + .../mjsunit/type-profile/regress-707223.js | 8 + deps/v8/test/mjsunit/unary-minus-deopt.js | 2 +- .../wasm/asm-wasm-exception-in-tonumber.js | 58 +- deps/v8/test/mjsunit/wasm/asm-wasm-expr.js | 10 +- .../v8/test/mjsunit/wasm/asm-wasm-literals.js | 67 +- deps/v8/test/mjsunit/wasm/asm-wasm-stack.js | 29 +- deps/v8/test/mjsunit/wasm/asm-wasm.js | 23 +- .../v8/test/mjsunit/wasm/asm-with-wasm-off.js | 4 +- deps/v8/test/mjsunit/wasm/async-compile.js | 72 + .../mjsunit/wasm/compilation-limits-asm.js | 22 + .../test/mjsunit/wasm/compilation-limits.js | 109 + .../wasm/compiled-module-serialization.js | 154 +- deps/v8/test/mjsunit/wasm/errors.js | 24 +- deps/v8/test/mjsunit/wasm/ffi-error.js | 26 + deps/v8/test/mjsunit/wasm/function-names.js | 10 +- deps/v8/test/mjsunit/wasm/gc-buffer.js | 2 +- deps/v8/test/mjsunit/wasm/gc-stress.js | 2 +- deps/v8/test/mjsunit/wasm/huge-memory.js | 76 + deps/v8/test/mjsunit/wasm/indirect-calls.js | 2 +- deps/v8/test/mjsunit/wasm/indirect-tables.js | 31 + .../mjsunit/wasm/instantiate-module-basic.js | 189 +- .../mjsunit/wasm/instantiate-run-basic.js | 20 +- .../v8/test/mjsunit/wasm/interpreter-mixed.js | 78 + deps/v8/test/mjsunit/wasm/interpreter.js | 400 ++ deps/v8/test/mjsunit/wasm/js-api.js | 594 ++- deps/v8/test/mjsunit/wasm/jsapi-harness.js | 45 +- deps/v8/test/mjsunit/wasm/stack.js | 25 +- deps/v8/test/mjsunit/wasm/start-function.js | 10 +- .../wasm/test-wasm-compilation-control.js | 118 - .../wasm/trap-location-with-trap-if.js | 81 - .../test/mjsunit/wasm/wasm-api-overloading.js | 53 + deps/v8/test/mjsunit/wasm/wasm-constants.js | 57 +- .../test/mjsunit/wasm/wasm-module-builder.js | 51 +- deps/v8/test/mjsunit/whitespaces.js | 1 - deps/v8/test/mkgrokdump/BUILD.gn | 27 + deps/v8/test/mkgrokdump/DEPS | 3 + deps/v8/test/mkgrokdump/README | 3 + deps/v8/test/mkgrokdump/mkgrokdump.cc | 133 + deps/v8/test/mkgrokdump/mkgrokdump.gyp | 46 + deps/v8/test/mkgrokdump/mkgrokdump.isolate | 17 + deps/v8/test/mkgrokdump/mkgrokdump.status | 10 + deps/v8/test/mkgrokdump/testcfg.py | 49 + deps/v8/test/mozilla/mozilla.status | 20 +- deps/v8/test/test262/archive.py | 1 - deps/v8/test/test262/detachArrayBuffer.js | 2 +- deps/v8/test/test262/harness-adapt.js | 8 +- deps/v8/test/test262/harness-agent.js | 4 +- deps/v8/test/test262/list.py | 8 +- .../typedarray-arg-src-byteoffset-internal.js | 45 + ...pedarray-arg-target-byteoffset-internal.js | 44 + ...line-html-close-comment-before-function.js | 16 + ...l-close-comment-newline-before-function.js | 15 + deps/v8/test/test262/test262.isolate | 1 + deps/v8/test/test262/test262.status | 211 +- deps/v8/test/test262/testcfg.py | 41 +- deps/v8/test/test262/upstream-local-tests.sh | 2 +- deps/v8/test/unittests/BUILD.gn | 31 +- .../unittests/api/interceptor-unittest.cc | 32 + .../unittests/api/remote-object-unittest.cc | 21 + .../unittests/asmjs/asm-scanner-unittest.cc | 311 ++ .../{wasm => asmjs}/asm-types-unittest.cc | 30 +- .../{wasm => asmjs}/switch-logic-unittest.cc | 0 deps/v8/test/unittests/base/bits-unittest.cc | 22 +- .../test/unittests/base/iterator-unittest.cc | 2 +- .../test/unittests/base/logging-unittest.cc | 15 +- .../base/platform/platform-unittest.cc | 103 + .../unittests/char-predicates-unittest.cc | 7 +- .../compiler-dispatcher-helper.cc | 28 - .../compiler-dispatcher-helper.h | 23 - .../compiler-dispatcher-job-unittest.cc | 133 +- .../compiler-dispatcher-unittest.cc | 364 +- .../optimizing-compile-dispatcher-unittest.cc | 9 +- .../arm/instruction-selector-arm-unittest.cc | 2 + .../instruction-selector-arm64-unittest.cc | 1 + .../compiler/bytecode-analysis-unittest.cc | 82 +- .../compiler/common-operator-unittest.cc | 2 +- .../effect-control-linearizer-unittest.cc | 121 - .../compiler/escape-analysis-unittest.cc | 4 +- .../instruction-selector-ia32-unittest.cc | 78 +- .../compiler/int64-lowering-unittest.cc | 14 +- .../compiler/js-builtin-reducer-unittest.cc | 2 +- .../js-intrinsic-lowering-unittest.cc | 17 + .../compiler/load-elimination-unittest.cc | 4 +- deps/v8/test/unittests/compiler/mips/OWNERS | 7 +- deps/v8/test/unittests/compiler/mips64/OWNERS | 7 +- .../unittests/compiler/node-test-utils.cc | 21 +- .../test/unittests/compiler/node-test-utils.h | 3 +- .../regalloc/register-allocator-unittest.cc | 1 + .../simplified-operator-reducer-unittest.cc | 64 +- .../tail-call-optimization-unittest.cc | 16 +- .../test/unittests/compiler/typer-unittest.cc | 339 +- .../x64/instruction-selector-x64-unittest.cc | 152 +- .../heap/concurrent-marking-deque-unittest.cc | 57 + .../heap/item-parallel-job-unittest.cc | 211 + .../test/unittests/heap/marking-unittest.cc | 54 +- .../v8/test/unittests/heap/spaces-unittest.cc | 56 + .../workstealing-marking-deque-unittest.cc | 33 + .../bytecode-array-builder-unittest.cc | 379 +- .../bytecode-array-writer-unittest.cc | 157 +- .../bytecode-dead-code-optimizer-unittest.cc | 150 - .../interpreter/bytecode-decoder-unittest.cc | 4 +- ...-unittest.cc => bytecode-node-unittest.cc} | 40 +- .../bytecode-peephole-optimizer-unittest.cc | 428 -- .../bytecode-register-optimizer-unittest.cc | 121 +- .../bytecode-source-info-unittest.cc | 52 + .../interpreter-assembler-unittest.cc | 40 +- .../libplatform/default-platform-unittest.cc | 3 +- deps/v8/test/unittests/object-unittest.cc | 76 +- .../unittests/parser/preparser-unittest.cc | 41 + deps/v8/test/unittests/run-all-unittests.cc | 3 +- deps/v8/test/unittests/test-helpers.cc | 60 + deps/v8/test/unittests/test-helpers.h | 66 + deps/v8/test/unittests/test-utils.cc | 16 + deps/v8/test/unittests/test-utils.h | 12 + deps/v8/test/unittests/unittests.gyp | 56 +- deps/v8/test/unittests/unittests.status | 8 - .../unittests/value-serializer-unittest.cc | 366 +- .../wasm/control-transfer-unittest.cc | 213 +- .../test/unittests/wasm/decoder-unittest.cc | 88 +- .../wasm/function-body-decoder-unittest.cc | 123 +- .../unittests/wasm/leb-helper-unittest.cc | 4 +- .../wasm/loop-assignment-analysis-unittest.cc | 10 +- .../unittests/wasm/module-decoder-unittest.cc | 95 +- .../wasm/streaming-decoder-unittest.cc | 498 ++ .../unittests/wasm/wasm-macro-gen-unittest.cc | 3 +- .../unittests/zone/zone-allocator-unittest.cc | 76 + deps/v8/test/wasm-spec-tests/OWNERS | 4 + deps/v8/test/wasm-spec-tests/testcfg.py | 35 + .../v8/test/wasm-spec-tests/tests.tar.gz.sha1 | 1 + .../test/wasm-spec-tests/wasm-spec-tests.gyp | 26 + .../wasm-spec-tests/wasm-spec-tests.isolate | 15 + .../wasm-spec-tests/wasm-spec-tests.status | 37 + deps/v8/test/webkit/ToNumber-expected.txt | 6 +- .../class-constructor-return-expected.txt | 6 +- .../webkit/class-syntax-extends-expected.txt | 2 +- deps/v8/test/webkit/class-syntax-extends.js | 2 +- .../webkit/class-syntax-super-expected.txt | 8 +- deps/v8/test/webkit/class-syntax-super.js | 4 +- .../fast/js/basic-strict-mode-expected.txt | 4 +- ...s-continue-break-restrictions-expected.txt | 20 +- deps/v8/test/webkit/parseFloat-expected.txt | 2 +- deps/v8/test/webkit/webkit.status | 9 +- .../lib/Parser_cpp.template | 10 +- deps/v8/tools/callstats.html | 161 +- deps/v8/tools/callstats.py | 9 +- deps/v8/tools/codemap.js | 36 +- deps/v8/tools/dev/gen-tags.py | 89 + deps/v8/tools/dev/gm.py | 51 +- deps/v8/tools/disasm.py | 6 +- deps/v8/tools/eval_gc_time.sh | 1 - .../tools/foozzie/testdata/failure_output.txt | 14 +- deps/v8/tools/foozzie/testdata/fuzz-123.js | 1 + deps/v8/tools/foozzie/v8_foozzie.py | 55 +- deps/v8/tools/foozzie/v8_foozzie_test.py | 11 +- deps/v8/tools/foozzie/v8_mock.js | 38 +- deps/v8/tools/foozzie/v8_suppressions.js | 17 +- deps/v8/tools/foozzie/v8_suppressions.py | 87 +- deps/v8/tools/gcmole/gcmole.lua | 2 +- deps/v8/tools/gcmole/run-gcmole.py | 16 +- deps/v8/tools/gdbinit | 25 + deps/v8/tools/gen-postmortem-metadata.py | 60 +- deps/v8/tools/grokdump.py | 877 +++- deps/v8/tools/ic-explorer.html | 367 +- deps/v8/tools/ic-processor.js | 33 +- deps/v8/tools/ignition/linux_perf_report.py | 4 +- .../tools/link_clicker.extension/README.txt | 12 + .../link_clicker.extension/background.js | 74 + .../tools/link_clicker.extension/content.js | 66 + deps/v8/tools/link_clicker.extension/icon.png | Bin 0 -> 230 bytes .../link_clicker.extension/manifest.json | 21 + .../tools/link_clicker.extension/popup.html | 50 + deps/v8/tools/link_clicker.extension/popup.js | 53 + deps/v8/tools/lldbinit | 3 + deps/v8/tools/logreader.js | 2 +- deps/v8/tools/luci-go/linux64/isolate.sha1 | 2 +- deps/v8/tools/luci-go/mac64/isolate.sha1 | 2 +- deps/v8/tools/luci-go/win64/isolate.exe.sha1 | 2 +- deps/v8/tools/mac-nm | 3 +- deps/v8/tools/memory/lsan/suppressions.txt | 3 - deps/v8/tools/objdump-v8 | 7 +- deps/v8/tools/parser-shell.cc | 6 +- deps/v8/tools/perf-compare.py | 484 ++ deps/v8/tools/perf_tests/chromium_revision | 1 - deps/v8/tools/plot-timer-events | 4 +- deps/v8/tools/presubmit.py | 16 +- deps/v8/tools/profile.js | 201 +- deps/v8/tools/profview/index.html | 115 + deps/v8/tools/profview/profile-utils.js | 594 +++ deps/v8/tools/profview/profview.css | 62 + deps/v8/tools/profview/profview.js | 1240 +++++ deps/v8/tools/release/auto_roll.py | 2 +- deps/v8/tools/release/common_includes.py | 6 +- deps/v8/tools/release/git_recipes.py | 16 +- deps/v8/tools/release/merge_to_branch.py | 12 - deps/v8/tools/release/mergeinfo.py | 32 +- deps/v8/tools/release/script_test.py | 1 - deps/v8/tools/release/test_mergeinfo.py | 45 +- deps/v8/tools/release/test_scripts.py | 36 +- deps/v8/tools/run-tests.py | 39 +- deps/v8/tools/run_perf.py | 35 +- deps/v8/tools/testrunner/local/commands.py | 7 +- deps/v8/tools/testrunner/local/execution.py | 20 +- deps/v8/tools/testrunner/local/progress.py | 52 + deps/v8/tools/testrunner/local/testsuite.py | 2 +- deps/v8/tools/testrunner/local/variants.py | 34 +- deps/v8/tools/testrunner/objects/testcase.py | 5 +- deps/v8/tools/testrunner/testrunner.isolate | 2 +- deps/v8/tools/tick-processor.html | 2 +- deps/v8/tools/tickprocessor-driver.js | 6 +- deps/v8/tools/tickprocessor.js | 111 +- deps/v8/tools/try_perf.py | 2 +- deps/v8/tools/turbolizer/code-view.js | 14 +- deps/v8/tools/turbolizer/disassembly-view.js | 2 +- deps/v8/tools/v8-info.sh | 161 - deps/v8/tools/v8heapconst.py | 618 ++- deps/v8/tools/v8heapconst.py.tmpl | 30 - deps/v8/tools/verify_source_deps.py | 7 + .../tools/{ => wasm}/update-wasm-fuzzers.sh | 36 +- deps/v8/tools/wasm/update-wasm-spec-tests.sh | 30 + deps/v8/tools/whitespace.txt | 3 +- 2174 files changed, 162516 insertions(+), 97981 deletions(-) create mode 100644 deps/v8/include/v8-value-serializer-version.h create mode 100644 deps/v8/src/asmjs/asm-names.h create mode 100644 deps/v8/src/asmjs/asm-parser.cc create mode 100644 deps/v8/src/asmjs/asm-parser.h create mode 100644 deps/v8/src/asmjs/asm-scanner.cc create mode 100644 deps/v8/src/asmjs/asm-scanner.h delete mode 100644 deps/v8/src/asmjs/asm-typer.cc delete mode 100644 deps/v8/src/asmjs/asm-typer.h delete mode 100644 deps/v8/src/asmjs/asm-wasm-builder.cc delete mode 100644 deps/v8/src/asmjs/asm-wasm-builder.h create mode 100644 deps/v8/src/base/export-template.h create mode 100644 deps/v8/src/base/platform/platform-posix.h create mode 100644 deps/v8/src/base/timezone-cache.h rename deps/v8/src/builtins/{builtins-arguments.cc => builtins-arguments-gen.cc} (94%) rename deps/v8/src/builtins/{builtins-arguments.h => builtins-arguments-gen.h} (100%) create mode 100644 deps/v8/src/builtins/builtins-array-gen.cc rename deps/v8/src/builtins/{builtins-async-function.cc => builtins-async-function-gen.cc} (84%) rename deps/v8/src/builtins/{builtins-async.cc => builtins-async-gen.cc} (58%) rename deps/v8/src/builtins/{builtins-async.h => builtins-async-gen.h} (72%) create mode 100644 deps/v8/src/builtins/builtins-async-generator-gen.cc rename deps/v8/src/builtins/{builtins-async-iterator.cc => builtins-async-iterator-gen.cc} (72%) create mode 100644 deps/v8/src/builtins/builtins-boolean-gen.cc create mode 100644 deps/v8/src/builtins/builtins-call-gen.cc create mode 100644 deps/v8/src/builtins/builtins-console-gen.cc create mode 100644 deps/v8/src/builtins/builtins-console.cc rename deps/v8/src/builtins/{builtins-constructor.cc => builtins-constructor-gen.cc} (65%) create mode 100644 deps/v8/src/builtins/builtins-constructor-gen.h create mode 100644 deps/v8/src/builtins/builtins-conversion-gen.cc delete mode 100644 deps/v8/src/builtins/builtins-conversion.cc create mode 100644 deps/v8/src/builtins/builtins-date-gen.cc create mode 100644 deps/v8/src/builtins/builtins-definitions.h create mode 100644 deps/v8/src/builtins/builtins-descriptors.h create mode 100644 deps/v8/src/builtins/builtins-forin-gen.cc create mode 100644 deps/v8/src/builtins/builtins-forin-gen.h create mode 100644 deps/v8/src/builtins/builtins-function-gen.cc rename deps/v8/src/builtins/{builtins-generator.cc => builtins-generator-gen.cc} (68%) create mode 100644 deps/v8/src/builtins/builtins-global-gen.cc rename deps/v8/src/builtins/{builtins-handler.cc => builtins-handler-gen.cc} (61%) rename deps/v8/src/builtins/{builtins-ic.cc => builtins-ic-gen.cc} (86%) create mode 100644 deps/v8/src/builtins/builtins-internal-gen.cc create mode 100644 deps/v8/src/builtins/builtins-interpreter-gen.cc create mode 100644 deps/v8/src/builtins/builtins-intl-gen.cc create mode 100644 deps/v8/src/builtins/builtins-intl.cc create mode 100644 deps/v8/src/builtins/builtins-math-gen.cc create mode 100644 deps/v8/src/builtins/builtins-number-gen.cc create mode 100644 deps/v8/src/builtins/builtins-object-gen.cc delete mode 100644 deps/v8/src/builtins/builtins-object.h rename deps/v8/src/builtins/{builtins-promise.cc => builtins-promise-gen.cc} (85%) rename deps/v8/src/builtins/{builtins-promise.h => builtins-promise-gen.h} (97%) create mode 100644 deps/v8/src/builtins/builtins-regexp-gen.cc rename deps/v8/src/builtins/{builtins-regexp.h => builtins-regexp-gen.h} (70%) create mode 100644 deps/v8/src/builtins/builtins-sharedarraybuffer-gen.cc create mode 100644 deps/v8/src/builtins/builtins-string-gen.cc create mode 100644 deps/v8/src/builtins/builtins-string-gen.h create mode 100644 deps/v8/src/builtins/builtins-symbol-gen.cc create mode 100644 deps/v8/src/builtins/builtins-typedarray-gen.cc create mode 100644 deps/v8/src/builtins/builtins-utils-gen.h rename deps/v8/src/builtins/{builtins-wasm.cc => builtins-wasm-gen.cc} (95%) create mode 100644 deps/v8/src/builtins/setup-builtins-internal.cc create mode 100644 deps/v8/src/callable.h create mode 100644 deps/v8/src/code-stubs-utils.h delete mode 100644 deps/v8/src/compiler/graph-replay.cc delete mode 100644 deps/v8/src/compiler/graph-replay.h delete mode 100644 deps/v8/src/context-measure.cc delete mode 100644 deps/v8/src/context-measure.h create mode 100644 deps/v8/src/d8-console.cc create mode 100644 deps/v8/src/d8-console.h create mode 100644 deps/v8/src/heap/concurrent-marking-deque.h create mode 100644 deps/v8/src/heap/concurrent-marking.cc create mode 100644 deps/v8/src/heap/concurrent-marking.h create mode 100644 deps/v8/src/heap/item-parallel-job.h create mode 100644 deps/v8/src/heap/sequential-marking-deque.cc create mode 100644 deps/v8/src/heap/sequential-marking-deque.h create mode 100644 deps/v8/src/heap/workstealing-marking-deque.h create mode 100644 deps/v8/src/ia32/sse-instr.h create mode 100644 deps/v8/src/ic/binary-op-assembler.cc create mode 100644 deps/v8/src/ic/binary-op-assembler.h delete mode 100644 deps/v8/src/interpreter/bytecode-dead-code-optimizer.cc delete mode 100644 deps/v8/src/interpreter/bytecode-dead-code-optimizer.h create mode 100644 deps/v8/src/interpreter/bytecode-jump-table.h rename deps/v8/src/interpreter/{bytecode-pipeline.cc => bytecode-node.cc} (78%) rename deps/v8/src/interpreter/{bytecode-pipeline.h => bytecode-node.h} (61%) delete mode 100644 deps/v8/src/interpreter/bytecode-peephole-optimizer.cc delete mode 100644 deps/v8/src/interpreter/bytecode-peephole-optimizer.h delete mode 100644 deps/v8/src/interpreter/bytecode-peephole-table.h create mode 100644 deps/v8/src/interpreter/bytecode-source-info.cc create mode 100644 deps/v8/src/interpreter/bytecode-source-info.h create mode 100644 deps/v8/src/interpreter/interpreter-generator.cc create mode 100644 deps/v8/src/interpreter/interpreter-generator.h create mode 100644 deps/v8/src/interpreter/interpreter-intrinsics-generator.cc create mode 100644 deps/v8/src/interpreter/interpreter-intrinsics-generator.h delete mode 100644 deps/v8/src/interpreter/mkpeephole.cc create mode 100644 deps/v8/src/interpreter/setup-interpreter-internal.cc create mode 100644 deps/v8/src/interpreter/setup-interpreter.h create mode 100644 deps/v8/src/intl.cc create mode 100644 deps/v8/src/intl.h delete mode 100644 deps/v8/src/js/arraybuffer.js delete mode 100644 deps/v8/src/js/harmony-atomics.js delete mode 100644 deps/v8/src/js/harmony-string-padding.js rename deps/v8/src/js/{i18n.js => intl.js} (89%) create mode 100644 deps/v8/src/js/max-min.js delete mode 100644 deps/v8/src/js/runtime.js create mode 100644 deps/v8/src/macro-assembler-inl.h create mode 100644 deps/v8/src/objects/code-cache-inl.h create mode 100644 deps/v8/src/objects/code-cache.h create mode 100644 deps/v8/src/objects/compilation-cache-inl.h create mode 100644 deps/v8/src/objects/compilation-cache.h create mode 100644 deps/v8/src/objects/descriptor-array.h create mode 100644 deps/v8/src/objects/dictionary.h create mode 100644 deps/v8/src/objects/frame-array-inl.h create mode 100644 deps/v8/src/objects/frame-array.h create mode 100644 deps/v8/src/objects/hash-table.h rename deps/v8/src/{i18n.cc => objects/intl-objects.cc} (70%) rename deps/v8/src/{i18n.h => objects/intl-objects.h} (75%) create mode 100644 deps/v8/src/objects/map-inl.h create mode 100644 deps/v8/src/objects/map.h create mode 100644 deps/v8/src/objects/string-table.h delete mode 100644 deps/v8/src/parsing/duplicate-finder.cc rename deps/v8/src/runtime/{runtime-i18n.cc => runtime-intl.cc} (64%) create mode 100644 deps/v8/src/setup-isolate-deserialize.cc create mode 100644 deps/v8/src/setup-isolate-full.cc create mode 100644 deps/v8/src/setup-isolate.h create mode 100644 deps/v8/src/string-hasher-inl.h create mode 100644 deps/v8/src/string-hasher.h create mode 100644 deps/v8/src/trap-handler/DEPS create mode 100644 deps/v8/src/trap-handler/OWNERS create mode 100644 deps/v8/src/trap-handler/handler-inside.cc create mode 100644 deps/v8/src/trap-handler/handler-outside.cc create mode 100644 deps/v8/src/trap-handler/handler-shared.cc create mode 100644 deps/v8/src/trap-handler/trap-handler-internal.h create mode 100644 deps/v8/src/visitors.cc create mode 100644 deps/v8/src/visitors.h create mode 100644 deps/v8/src/wasm/local-decl-encoder.cc create mode 100644 deps/v8/src/wasm/local-decl-encoder.h create mode 100644 deps/v8/src/wasm/streaming-decoder.cc create mode 100644 deps/v8/src/wasm/streaming-decoder.h delete mode 100644 deps/v8/test/cctest/asmjs/OWNERS delete mode 100644 deps/v8/test/cctest/asmjs/test-asm-typer.cc create mode 100644 deps/v8/test/cctest/heap/test-concurrent-marking.cc create mode 100644 deps/v8/test/cctest/interpreter/bytecode_expectations/CompareNil.golden create mode 100644 deps/v8/test/cctest/interpreter/bytecode_expectations/CompareTypeOf.golden create mode 100644 deps/v8/test/cctest/interpreter/bytecode_expectations/ForOfLoop.golden create mode 100644 deps/v8/test/cctest/interpreter/bytecode_expectations/StandardForLoop.golden create mode 100644 deps/v8/test/cctest/setup-isolate-for-tests.cc create mode 100644 deps/v8/test/cctest/setup-isolate-for-tests.h create mode 100644 deps/v8/test/cctest/test-simulator-arm64.cc delete mode 100644 deps/v8/test/cctest/wasm/test-run-wasm-simd-lowering.cc rename deps/v8/{src => test/common}/wasm/wasm-macro-gen.h (83%) delete mode 100644 deps/v8/test/debugger/debug/ignition/debug-break-mixed-stack.js delete mode 100644 deps/v8/test/debugger/debug/ignition/debug-step-mixed-stack.js create mode 100644 deps/v8/test/fuzzer/wasm-fuzzer-common.cc create mode 100644 deps/v8/test/fuzzer/wasm-fuzzer-common.h delete mode 100644 deps/v8/test/fuzzer/wasm-section-fuzzers.cc delete mode 100644 deps/v8/test/fuzzer/wasm-section-fuzzers.h delete mode 100644 deps/v8/test/fuzzer/wasm.tar.gz.sha1 create mode 100644 deps/v8/test/fuzzer/wasm/foo delete mode 100644 deps/v8/test/fuzzer/wasm_asmjs.tar.gz.sha1 create mode 100644 deps/v8/test/fuzzer/wasm_asmjs/foo create mode 100644 deps/v8/test/fuzzer/wasm_asmjs_corpus.tar.gz.sha1 create mode 100644 deps/v8/test/fuzzer/wasm_corpus.tar.gz.sha1 delete mode 100644 deps/v8/test/inspector/console/memory-setter-in-strict-mode-expected.txt delete mode 100644 deps/v8/test/inspector/console/memory-setter-in-strict-mode.js create mode 100644 deps/v8/test/inspector/debugger/async-for-await-of-promise-stack-expected.txt create mode 100644 deps/v8/test/inspector/debugger/async-for-await-of-promise-stack.js delete mode 100644 deps/v8/test/inspector/debugger/async-stacks-limit-expected.txt delete mode 100644 deps/v8/test/inspector/debugger/async-stacks-limit.js create mode 100644 deps/v8/test/inspector/debugger/caught-exception-from-framework-inside-async-expected.txt create mode 100644 deps/v8/test/inspector/debugger/caught-exception-from-framework-inside-async.js create mode 100644 deps/v8/test/inspector/debugger/collect-obsolete-async-tasks-expected.txt create mode 100644 deps/v8/test/inspector/debugger/collect-obsolete-async-tasks.js create mode 100644 deps/v8/test/inspector/debugger/collect-old-async-call-chains-expected.txt create mode 100644 deps/v8/test/inspector/debugger/collect-old-async-call-chains.js create mode 100644 deps/v8/test/inspector/debugger/continue-to-location-target-call-frames-expected.txt create mode 100644 deps/v8/test/inspector/debugger/continue-to-location-target-call-frames.js create mode 100644 deps/v8/test/inspector/debugger/destory-in-break-program-expected.txt create mode 100644 deps/v8/test/inspector/debugger/destory-in-break-program.js create mode 100644 deps/v8/test/inspector/debugger/get-possible-breakpoints-lazy-error-expected.txt create mode 100644 deps/v8/test/inspector/debugger/get-possible-breakpoints-lazy-error.js create mode 100644 deps/v8/test/inspector/debugger/get-possible-breakpoints-master-expected.txt create mode 100644 deps/v8/test/inspector/debugger/get-possible-breakpoints-master.js create mode 100644 deps/v8/test/inspector/debugger/get-possible-breakpoints-restrict-to-function-expected.txt create mode 100644 deps/v8/test/inspector/debugger/get-possible-breakpoints-restrict-to-function.js create mode 100644 deps/v8/test/inspector/debugger/max-async-call-chain-depth-expected.txt create mode 100644 deps/v8/test/inspector/debugger/max-async-call-chain-depth.js create mode 100644 deps/v8/test/inspector/debugger/pause-expected.txt create mode 100644 deps/v8/test/inspector/debugger/pause.js create mode 100644 deps/v8/test/inspector/debugger/promise-chain-when-limit-hit-expected.txt create mode 100644 deps/v8/test/inspector/debugger/promise-chain-when-limit-hit.js create mode 100644 deps/v8/test/inspector/debugger/protocol-string-to-double-locale-expected.txt create mode 100644 deps/v8/test/inspector/debugger/protocol-string-to-double-locale.js create mode 100644 deps/v8/test/inspector/debugger/resources/break-locations.js create mode 100644 deps/v8/test/inspector/debugger/restore-breakpoint-expected.txt create mode 100644 deps/v8/test/inspector/debugger/restore-breakpoint.js create mode 100644 deps/v8/test/inspector/debugger/return-break-locations-expected.txt create mode 100644 deps/v8/test/inspector/debugger/return-break-locations.js create mode 100644 deps/v8/test/inspector/debugger/schedule-step-into-async-expected.txt create mode 100644 deps/v8/test/inspector/debugger/schedule-step-into-async-set-timeout-expected.txt create mode 100644 deps/v8/test/inspector/debugger/schedule-step-into-async-set-timeout.js create mode 100644 deps/v8/test/inspector/debugger/schedule-step-into-async.js create mode 100644 deps/v8/test/inspector/debugger/script-end-location-expected.txt create mode 100644 deps/v8/test/inspector/debugger/script-end-location.js create mode 100644 deps/v8/test/inspector/debugger/script-with-negative-offset-expected.txt create mode 100644 deps/v8/test/inspector/debugger/script-with-negative-offset.js create mode 100644 deps/v8/test/inspector/debugger/set-async-call-stack-depth-expected.txt create mode 100644 deps/v8/test/inspector/debugger/set-async-call-stack-depth.js create mode 100644 deps/v8/test/inspector/debugger/step-into-expected.txt create mode 100644 deps/v8/test/inspector/debugger/step-into.js create mode 100644 deps/v8/test/inspector/debugger/step-out-async-await-expected.txt create mode 100644 deps/v8/test/inspector/debugger/step-out-async-await.js create mode 100644 deps/v8/test/inspector/debugger/step-over-another-context-group-expected.txt create mode 100644 deps/v8/test/inspector/debugger/step-over-another-context-group.js create mode 100644 deps/v8/test/inspector/debugger/step-snapshot-expected.txt create mode 100644 deps/v8/test/inspector/debugger/step-snapshot.js create mode 100644 deps/v8/test/inspector/debugger/stepping-and-break-program-api-expected.txt create mode 100644 deps/v8/test/inspector/debugger/stepping-and-break-program-api.js create mode 100644 deps/v8/test/inspector/debugger/stepping-ignores-injected-script-expected.txt create mode 100644 deps/v8/test/inspector/debugger/stepping-ignores-injected-script.js create mode 100644 deps/v8/test/inspector/debugger/stepping-tail-call-expected.txt create mode 100644 deps/v8/test/inspector/debugger/stepping-tail-call.js create mode 100644 deps/v8/test/inspector/debugger/stepping-with-exposed-injected-script-expected.txt create mode 100644 deps/v8/test/inspector/debugger/stepping-with-exposed-injected-script.js create mode 100644 deps/v8/test/inspector/debugger/stepping-with-natives-and-frameworks-expected.txt create mode 100644 deps/v8/test/inspector/debugger/stepping-with-natives-and-frameworks.js create mode 100644 deps/v8/test/inspector/debugger/wasm-imports-expected.txt create mode 100644 deps/v8/test/inspector/debugger/wasm-imports.js create mode 100644 deps/v8/test/inspector/isolate-data.cc create mode 100644 deps/v8/test/inspector/isolate-data.h create mode 100644 deps/v8/test/inspector/runtime/client-console-api-message-expected.txt create mode 100644 deps/v8/test/inspector/runtime/client-console-api-message.js create mode 100644 deps/v8/test/inspector/runtime/command-line-api-expected.txt create mode 100644 deps/v8/test/inspector/runtime/command-line-api.js create mode 100644 deps/v8/test/inspector/runtime/console-memory-expected.txt create mode 100644 deps/v8/test/inspector/runtime/console-memory.js create mode 100644 deps/v8/test/inspector/runtime/console-spec-expected.txt create mode 100644 deps/v8/test/inspector/runtime/console-spec.js create mode 100644 deps/v8/test/inspector/runtime/create-context-expected.txt create mode 100644 deps/v8/test/inspector/runtime/create-context.js create mode 100644 deps/v8/test/inspector/runtime/runtime-evaluate-with-dirty-context-expected.txt create mode 100644 deps/v8/test/inspector/runtime/runtime-evaluate-with-dirty-context.js create mode 100644 deps/v8/test/inspector/runtime/runtime-restore-expected.txt create mode 100644 deps/v8/test/inspector/runtime/runtime-restore.js create mode 100644 deps/v8/test/js-perf-test/Array/filter.js create mode 100644 deps/v8/test/js-perf-test/Array/map.js create mode 100644 deps/v8/test/js-perf-test/Array/run.js create mode 100644 deps/v8/test/js-perf-test/BytecodeHandlers/compare.js create mode 100644 deps/v8/test/js-perf-test/BytecodeHandlers/run.js create mode 100644 deps/v8/test/js-perf-test/ForLoops/for_loop.js create mode 100644 deps/v8/test/js-perf-test/ForLoops/run.js create mode 100644 deps/v8/test/js-perf-test/Modules/basic-export.js create mode 100644 deps/v8/test/js-perf-test/Modules/basic-import.js create mode 100644 deps/v8/test/js-perf-test/Modules/basic-namespace.js create mode 100644 deps/v8/test/js-perf-test/Modules/run.js create mode 100644 deps/v8/test/js-perf-test/Modules/value.js create mode 100644 deps/v8/test/js-perf-test/SixSpeed/classes/babel.js create mode 100644 deps/v8/test/js-perf-test/SixSpeed/classes/es5.js create mode 100644 deps/v8/test/js-perf-test/SixSpeed/classes/es6.js create mode 100644 deps/v8/test/js-perf-test/SixSpeed/map_set_add/es5.js create mode 100644 deps/v8/test/js-perf-test/SixSpeed/map_set_add/es6.js create mode 100644 deps/v8/test/js-perf-test/SixSpeed/map_set_lookup/es5.js create mode 100644 deps/v8/test/js-perf-test/SixSpeed/map_set_lookup/es6.js create mode 100644 deps/v8/test/js-perf-test/SixSpeed/map_set_object/es5.js create mode 100644 deps/v8/test/js-perf-test/SixSpeed/map_set_object/es6.js create mode 100644 deps/v8/test/js-perf-test/SixSpeed/map_string/es5.js create mode 100644 deps/v8/test/js-perf-test/SixSpeed/map_string/es6.js create mode 100644 deps/v8/test/js-perf-test/SixSpeed/super/babel.js create mode 100644 deps/v8/test/js-perf-test/SixSpeed/super/es5.js create mode 100644 deps/v8/test/js-perf-test/SixSpeed/super/es6.js create mode 100644 deps/v8/test/js-perf-test/TypedArrays/construct-all-typedarrays.js create mode 100644 deps/v8/test/js-perf-test/TypedArrays/construct-same-typedarray.js create mode 100644 deps/v8/test/js-perf-test/TypedArrays/construct-typedarray.js create mode 100644 deps/v8/test/message/README.md create mode 100644 deps/v8/test/message/asm-assignment-undeclared.js create mode 100644 deps/v8/test/message/asm-assignment-undeclared.out create mode 100644 deps/v8/test/message/asm-function-mismatch-def.js create mode 100644 deps/v8/test/message/asm-function-mismatch-def.out create mode 100644 deps/v8/test/message/asm-function-mismatch-use.js create mode 100644 deps/v8/test/message/asm-function-mismatch-use.out create mode 100644 deps/v8/test/message/asm-function-redefined.js create mode 100644 deps/v8/test/message/asm-function-redefined.out create mode 100644 deps/v8/test/message/asm-function-undefined.js create mode 100644 deps/v8/test/message/asm-function-undefined.out create mode 100644 deps/v8/test/message/asm-function-variable-collision.js create mode 100644 deps/v8/test/message/asm-function-variable-collision.out create mode 100644 deps/v8/test/message/asm-import-wrong-annotation.js create mode 100644 deps/v8/test/message/asm-import-wrong-annotation.out create mode 100644 deps/v8/test/message/asm-import-wrong-object.js create mode 100644 deps/v8/test/message/asm-import-wrong-object.out create mode 100644 deps/v8/test/message/asm-linking-bogus-heap.js create mode 100644 deps/v8/test/message/asm-linking-bogus-heap.out create mode 100644 deps/v8/test/message/asm-linking-bogus-stdlib.js create mode 100644 deps/v8/test/message/asm-linking-bogus-stdlib.out create mode 100644 deps/v8/test/message/asm-linking-missing-heap.js create mode 100644 deps/v8/test/message/asm-linking-missing-heap.out create mode 100644 deps/v8/test/message/asm-missing-parameter-annotation.js create mode 100644 deps/v8/test/message/asm-missing-parameter-annotation.out create mode 100644 deps/v8/test/message/asm-missing-return-annotation.js create mode 100644 deps/v8/test/message/asm-missing-return-annotation.out create mode 100644 deps/v8/test/message/asm-table-mismatch-def.js create mode 100644 deps/v8/test/message/asm-table-mismatch-def.out create mode 100644 deps/v8/test/message/asm-table-mismatch-use.js create mode 100644 deps/v8/test/message/asm-table-mismatch-use.out create mode 100644 deps/v8/test/message/asm-table-redefined.js create mode 100644 deps/v8/test/message/asm-table-redefined.out create mode 100644 deps/v8/test/message/asm-table-undefined.js create mode 100644 deps/v8/test/message/asm-table-undefined.out create mode 100644 deps/v8/test/message/asm-table-variable-collision.js create mode 100644 deps/v8/test/message/asm-table-variable-collision.out create mode 100644 deps/v8/test/message/async-arrow-invalid-rest-2.js create mode 100644 deps/v8/test/message/async-arrow-invalid-rest-2.out create mode 100644 deps/v8/test/message/async-arrow-invalid-rest.js create mode 100644 deps/v8/test/message/async-arrow-invalid-rest.out create mode 100644 deps/v8/test/message/async-arrow-param-after-rest.js create mode 100644 deps/v8/test/message/async-arrow-param-after-rest.out create mode 100644 deps/v8/test/message/class-spread-property.js create mode 100644 deps/v8/test/message/class-spread-property.out create mode 100644 deps/v8/test/message/console.js create mode 100644 deps/v8/test/message/console.out create mode 100644 deps/v8/test/message/function-param-after-rest.js create mode 100644 deps/v8/test/message/function-param-after-rest.out create mode 100644 deps/v8/test/message/get-iterator1.js create mode 100644 deps/v8/test/message/get-iterator1.out create mode 100644 deps/v8/test/message/let-asi-await-nonasync.js create mode 100644 deps/v8/test/message/let-asi-await-nonasync.out create mode 100644 deps/v8/test/message/let-asi-yield-nongenerator.js create mode 100644 deps/v8/test/message/let-asi-yield-nongenerator.out create mode 100644 deps/v8/test/message/modules-cycle5.js create mode 100644 deps/v8/test/message/modules-cycle5.out create mode 100644 deps/v8/test/message/modules-cycle6.js create mode 100644 deps/v8/test/message/modules-cycle6.out create mode 100644 deps/v8/test/message/modules-skip-cycle5.js create mode 100644 deps/v8/test/message/modules-skip-cycle6.js create mode 100644 deps/v8/test/message/regress/regress-crbug-691194.js create mode 100644 deps/v8/test/message/regress/regress-crbug-691194.out create mode 100644 deps/v8/test/mjsunit/asm/asm-memory.js create mode 100644 deps/v8/test/mjsunit/asm/asm-stdlib.js create mode 100644 deps/v8/test/mjsunit/asm/call-annotation.js create mode 100644 deps/v8/test/mjsunit/asm/call-collisions.js create mode 100644 deps/v8/test/mjsunit/asm/call-stdlib.js create mode 100644 deps/v8/test/mjsunit/asm/global-imports.js create mode 100644 deps/v8/test/mjsunit/asm/immutable.js create mode 100644 deps/v8/test/mjsunit/asm/regress-718745.js create mode 100644 deps/v8/test/mjsunit/asm/return-types.js create mode 100644 deps/v8/test/mjsunit/basic-promise.js create mode 100644 deps/v8/test/mjsunit/compiler/array-constructor.js create mode 100644 deps/v8/test/mjsunit/compiler/constructor-inlining-no-harmony-restrict-constructor-return.js create mode 100644 deps/v8/test/mjsunit/compiler/constructor-inlining.js create mode 100644 deps/v8/test/mjsunit/compiler/escape-analysis-13.js create mode 100644 deps/v8/test/mjsunit/compiler/escape-analysis-16.js create mode 100644 deps/v8/test/mjsunit/compiler/escape-analysis-17.js create mode 100644 deps/v8/test/mjsunit/compiler/escape-analysis-phi-type-2.js create mode 100644 deps/v8/test/mjsunit/compiler/escape-analysis-phi-type.js create mode 100644 deps/v8/test/mjsunit/compiler/object-getprototypeof.js create mode 100644 deps/v8/test/mjsunit/compiler/reflect-getprototypeof.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-693425.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-694088.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-700883.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-713367.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-714483.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-715204.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-715651.js delete mode 100644 deps/v8/test/mjsunit/compiler/regress-strict-equals-mixed-feedback.js create mode 100644 deps/v8/test/mjsunit/compiler/regress-v8-6077.js create mode 100644 deps/v8/test/mjsunit/compiler/rest-parameters.js create mode 100644 deps/v8/test/mjsunit/deopt-recursive-eager-once.js create mode 100644 deps/v8/test/mjsunit/deopt-recursive-lazy-once.js create mode 100644 deps/v8/test/mjsunit/deopt-recursive-soft-once.js create mode 100644 deps/v8/test/mjsunit/deopt-unlinked.js create mode 100644 deps/v8/test/mjsunit/duplicate-parameters.js create mode 100644 deps/v8/test/mjsunit/es6/generator-let-asi.js create mode 100644 deps/v8/test/mjsunit/es6/global-proto-proxy.js create mode 100644 deps/v8/test/mjsunit/es6/regress/regress-6098.js create mode 100644 deps/v8/test/mjsunit/es6/regress/regress-6322.js create mode 100644 deps/v8/test/mjsunit/es6/typedarray-construct-by-array-like-prototype-element-added.js create mode 100644 deps/v8/test/mjsunit/es6/typedarray-construct-by-array-like.js create mode 100644 deps/v8/test/mjsunit/es6/typedarray-construct-by-buffer-ordering.js create mode 100644 deps/v8/test/mjsunit/es6/typedarray-construct-offset-not-smi.js create mode 100644 deps/v8/test/mjsunit/es6/typedarray-map.js create mode 100644 deps/v8/test/mjsunit/es7/regexp-ui-word.js create mode 100644 deps/v8/test/mjsunit/es8/async-let-asi.js create mode 100644 deps/v8/test/mjsunit/es8/constructor-returning-primitive.js create mode 100644 deps/v8/test/mjsunit/harmony/async-generators-basic.js create mode 100644 deps/v8/test/mjsunit/harmony/atomics-value-check.js rename deps/v8/test/mjsunit/{regress/regress-319120.js => harmony/global-accessors-strict.js} (73%) create mode 100644 deps/v8/test/mjsunit/harmony/modules-import-1.js create mode 100644 deps/v8/test/mjsunit/harmony/modules-import-10.js create mode 100644 deps/v8/test/mjsunit/harmony/modules-import-11.js create mode 100644 deps/v8/test/mjsunit/harmony/modules-import-12.js create mode 100644 deps/v8/test/mjsunit/harmony/modules-import-13.js create mode 100644 deps/v8/test/mjsunit/harmony/modules-import-14.js create mode 100644 deps/v8/test/mjsunit/harmony/modules-import-15.js create mode 100644 deps/v8/test/mjsunit/harmony/modules-import-2.js create mode 100644 deps/v8/test/mjsunit/harmony/modules-import-3.js create mode 100644 deps/v8/test/mjsunit/harmony/modules-import-4.js create mode 100644 deps/v8/test/mjsunit/harmony/modules-import-5.js create mode 100644 deps/v8/test/mjsunit/harmony/modules-import-6.js create mode 100644 deps/v8/test/mjsunit/harmony/modules-import-7.js create mode 100644 deps/v8/test/mjsunit/harmony/modules-import-8.js create mode 100644 deps/v8/test/mjsunit/harmony/modules-import-9.js create mode 100644 deps/v8/test/mjsunit/harmony/modules-skip-1.js create mode 100644 deps/v8/test/mjsunit/harmony/modules-skip-2.js create mode 100644 deps/v8/test/mjsunit/harmony/modules-skip-3.js create mode 100644 deps/v8/test/mjsunit/harmony/modules-skip-4.js create mode 100644 deps/v8/test/mjsunit/harmony/modules-skip-5.js create mode 100644 deps/v8/test/mjsunit/harmony/modules-skip-6.js create mode 100644 deps/v8/test/mjsunit/harmony/modules-skip-7.js create mode 100644 deps/v8/test/mjsunit/harmony/modules-skip-8.js create mode 100644 deps/v8/test/mjsunit/harmony/modules-skip-9.js create mode 100644 deps/v8/test/mjsunit/harmony/modules-skip-empty.js create mode 100644 deps/v8/test/mjsunit/harmony/regexp-dotall-disabled.js create mode 100644 deps/v8/test/mjsunit/harmony/regexp-dotall.js create mode 100644 deps/v8/test/mjsunit/harmony/regress/regress-6100.js create mode 100644 deps/v8/test/mjsunit/heapObjectVerify.js create mode 100644 deps/v8/test/mjsunit/icu-date-lord-howe.js create mode 100644 deps/v8/test/mjsunit/icu-date-to-string.js delete mode 100644 deps/v8/test/mjsunit/ignition/regress-5768.js create mode 100644 deps/v8/test/mjsunit/json-errors.js create mode 100644 deps/v8/test/mjsunit/keyed-store-generic.js delete mode 100644 deps/v8/test/mjsunit/minmax-simple.js create mode 100644 deps/v8/test/mjsunit/modules-cycle.js create mode 100644 deps/v8/test/mjsunit/modules-skip-cycle.js create mode 100644 deps/v8/test/mjsunit/never-baseline.js create mode 100644 deps/v8/test/mjsunit/number-isnan-opt.js create mode 100644 deps/v8/test/mjsunit/object-keys.js create mode 100644 deps/v8/test/mjsunit/parse-tasks.js create mode 100644 deps/v8/test/mjsunit/regress-6223.js create mode 100644 deps/v8/test/mjsunit/regress-707410.js delete mode 100644 deps/v8/test/mjsunit/regress/regress-5380.js create mode 100644 deps/v8/test/mjsunit/regress/regress-6082.js create mode 100644 deps/v8/test/mjsunit/regress/regress-6142.js create mode 100644 deps/v8/test/mjsunit/regress/regress-6186.js create mode 100644 deps/v8/test/mjsunit/regress/regress-6196.js create mode 100644 deps/v8/test/mjsunit/regress/regress-6203.js create mode 100644 deps/v8/test/mjsunit/regress/regress-6248.js create mode 100644 deps/v8/test/mjsunit/regress/regress-6280.js create mode 100644 deps/v8/test/mjsunit/regress/regress-6288.js create mode 100644 deps/v8/test/mjsunit/regress/regress-6298.js create mode 100644 deps/v8/test/mjsunit/regress/regress-6337.js create mode 100644 deps/v8/test/mjsunit/regress/regress-641091.js create mode 100644 deps/v8/test/mjsunit/regress/regress-696332.js create mode 100644 deps/v8/test/mjsunit/regress/regress-698790.js create mode 100644 deps/v8/test/mjsunit/regress/regress-705934.js create mode 100644 deps/v8/test/mjsunit/regress/regress-707066.js create mode 100644 deps/v8/test/mjsunit/regress/regress-707187.js create mode 100644 deps/v8/test/mjsunit/regress/regress-707675.js create mode 100644 deps/v8/test/mjsunit/regress/regress-708598.js create mode 100644 deps/v8/test/mjsunit/regress/regress-709029.js create mode 100644 deps/v8/test/mjsunit/regress/regress-709782.js create mode 100644 deps/v8/test/mjsunit/regress/regress-711165.js create mode 100644 deps/v8/test/mjsunit/regress/regress-715582.js create mode 100644 deps/v8/test/mjsunit/regress/regress-716044.js create mode 100644 deps/v8/test/mjsunit/regress/regress-718285.js create mode 100644 deps/v8/test/mjsunit/regress/regress-718891.js create mode 100644 deps/v8/test/mjsunit/regress/regress-719380.js create mode 100644 deps/v8/test/mjsunit/regress/regress-722978.js create mode 100644 deps/v8/test/mjsunit/regress/regress-725858.js create mode 100644 deps/v8/test/mjsunit/regress/regress-726636.js create mode 100644 deps/v8/test/mjsunit/regress/regress-727218.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-688567.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-688734.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-691687.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-696622.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-697017.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-698607.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-699282.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-700678.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-700733.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-702793.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-702798.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-703610.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-707580.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-708050-1.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-708050-2.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-709537.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-709753.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-711166.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-712802.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-714696.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-714872.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-714971.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-714981.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-715151.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-715404.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-715455.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-715862.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-716520.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-716804.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-716912.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-718779.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-719479.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-721835.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-722756.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-723132.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-723455.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-736451.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-736575.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-738763.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-740803.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-747979.js create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-748539.js create mode 100644 deps/v8/test/mjsunit/regress/regress-unlink-closures-on-deopt.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-709684.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regress-712569.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regression-6164.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regression-702460.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regression-702839.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regression-703568.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regression-708714.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regression-710844.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regression-711203.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regression-715216-a.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regression-715216-b.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regression-717056.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regression-717194.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regression-719175.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regression-722445.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regression-731351.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regression-734108.js create mode 100644 deps/v8/test/mjsunit/regress/wasm/regression-737069.js delete mode 100644 deps/v8/test/mjsunit/shared-function-tier-up-default.js create mode 100644 deps/v8/test/mjsunit/skipping-inner-functions.js create mode 100644 deps/v8/test/mjsunit/type-profile/collect-type-profile.js create mode 100644 deps/v8/test/mjsunit/type-profile/regress-707223.js create mode 100644 deps/v8/test/mjsunit/wasm/async-compile.js create mode 100644 deps/v8/test/mjsunit/wasm/compilation-limits-asm.js create mode 100644 deps/v8/test/mjsunit/wasm/compilation-limits.js create mode 100644 deps/v8/test/mjsunit/wasm/huge-memory.js create mode 100644 deps/v8/test/mjsunit/wasm/interpreter-mixed.js create mode 100644 deps/v8/test/mjsunit/wasm/interpreter.js delete mode 100644 deps/v8/test/mjsunit/wasm/test-wasm-compilation-control.js delete mode 100644 deps/v8/test/mjsunit/wasm/trap-location-with-trap-if.js create mode 100644 deps/v8/test/mjsunit/wasm/wasm-api-overloading.js create mode 100644 deps/v8/test/mkgrokdump/BUILD.gn create mode 100644 deps/v8/test/mkgrokdump/DEPS create mode 100644 deps/v8/test/mkgrokdump/README create mode 100644 deps/v8/test/mkgrokdump/mkgrokdump.cc create mode 100644 deps/v8/test/mkgrokdump/mkgrokdump.gyp create mode 100644 deps/v8/test/mkgrokdump/mkgrokdump.isolate create mode 100644 deps/v8/test/mkgrokdump/mkgrokdump.status create mode 100644 deps/v8/test/mkgrokdump/testcfg.py create mode 100644 deps/v8/test/test262/local-tests/test/built-ins/TypedArray/prototype/set/typedarray-arg-src-byteoffset-internal.js create mode 100644 deps/v8/test/test262/local-tests/test/built-ins/TypedArray/prototype/set/typedarray-arg-target-byteoffset-internal.js create mode 100644 deps/v8/test/test262/local-tests/test/language/module-code/comment-single-line-html-close-comment-before-function.js create mode 100644 deps/v8/test/test262/local-tests/test/language/module-code/comment-single-line-html-close-comment-newline-before-function.js create mode 100644 deps/v8/test/unittests/api/interceptor-unittest.cc create mode 100644 deps/v8/test/unittests/asmjs/asm-scanner-unittest.cc rename deps/v8/test/unittests/{wasm => asmjs}/asm-types-unittest.cc (97%) rename deps/v8/test/unittests/{wasm => asmjs}/switch-logic-unittest.cc (100%) delete mode 100644 deps/v8/test/unittests/compiler-dispatcher/compiler-dispatcher-helper.cc delete mode 100644 deps/v8/test/unittests/compiler-dispatcher/compiler-dispatcher-helper.h create mode 100644 deps/v8/test/unittests/heap/concurrent-marking-deque-unittest.cc create mode 100644 deps/v8/test/unittests/heap/item-parallel-job-unittest.cc create mode 100644 deps/v8/test/unittests/heap/spaces-unittest.cc create mode 100644 deps/v8/test/unittests/heap/workstealing-marking-deque-unittest.cc delete mode 100644 deps/v8/test/unittests/interpreter/bytecode-dead-code-optimizer-unittest.cc rename deps/v8/test/unittests/interpreter/{bytecode-pipeline-unittest.cc => bytecode-node-unittest.cc} (78%) delete mode 100644 deps/v8/test/unittests/interpreter/bytecode-peephole-optimizer-unittest.cc create mode 100644 deps/v8/test/unittests/interpreter/bytecode-source-info-unittest.cc create mode 100644 deps/v8/test/unittests/parser/preparser-unittest.cc create mode 100644 deps/v8/test/unittests/test-helpers.cc create mode 100644 deps/v8/test/unittests/test-helpers.h create mode 100644 deps/v8/test/unittests/wasm/streaming-decoder-unittest.cc create mode 100644 deps/v8/test/unittests/zone/zone-allocator-unittest.cc create mode 100644 deps/v8/test/wasm-spec-tests/OWNERS create mode 100644 deps/v8/test/wasm-spec-tests/testcfg.py create mode 100644 deps/v8/test/wasm-spec-tests/tests.tar.gz.sha1 create mode 100644 deps/v8/test/wasm-spec-tests/wasm-spec-tests.gyp create mode 100644 deps/v8/test/wasm-spec-tests/wasm-spec-tests.isolate create mode 100644 deps/v8/test/wasm-spec-tests/wasm-spec-tests.status create mode 100755 deps/v8/tools/dev/gen-tags.py create mode 100644 deps/v8/tools/link_clicker.extension/README.txt create mode 100644 deps/v8/tools/link_clicker.extension/background.js create mode 100644 deps/v8/tools/link_clicker.extension/content.js create mode 100644 deps/v8/tools/link_clicker.extension/icon.png create mode 100644 deps/v8/tools/link_clicker.extension/manifest.json create mode 100644 deps/v8/tools/link_clicker.extension/popup.html create mode 100644 deps/v8/tools/link_clicker.extension/popup.js mode change 100644 => 100755 deps/v8/tools/lldbinit create mode 100755 deps/v8/tools/perf-compare.py delete mode 100644 deps/v8/tools/perf_tests/chromium_revision create mode 100644 deps/v8/tools/profview/index.html create mode 100644 deps/v8/tools/profview/profile-utils.js create mode 100644 deps/v8/tools/profview/profview.css create mode 100644 deps/v8/tools/profview/profview.js mode change 100644 => 100755 deps/v8/tools/release/test_scripts.py delete mode 100755 deps/v8/tools/v8-info.sh delete mode 100644 deps/v8/tools/v8heapconst.py.tmpl rename deps/v8/tools/{ => wasm}/update-wasm-fuzzers.sh (59%) create mode 100755 deps/v8/tools/wasm/update-wasm-spec-tests.sh diff --git a/deps/v8/.gitignore b/deps/v8/.gitignore index 8088214daa951b..bcec3768f398dc 100644 --- a/deps/v8/.gitignore +++ b/deps/v8/.gitignore @@ -1,3 +1,5 @@ +#*# +*.Makefile *.a *.exe *.idb @@ -18,9 +20,9 @@ *.vcxproj *.vcxproj.filters *.xcodeproj -#*# *~ .#* +.*.sw? .cpplint-cache .cproject .d8_history @@ -30,26 +32,23 @@ .project .pydevproject .settings -.*.sw? -bsuite -compile_commands.json -d8 -d8_g -gccauses -gcsuspects -shell -shell_g /_* /build -/gypfiles/win_toolchain.json /buildtools +/gypfiles/win_toolchain.json /hydrogen.cfg /obj /out /out.gn /perf.data /perf.data.old +/src/inspector/build/closure-compiler +/src/inspector/build/closure-compiler.tar.gz /test/benchmarks/data +/test/fuzzer/wasm_corpus +/test/fuzzer/wasm_corpus.tar.gz +/test/fuzzer/wasm_asmjs_corpus +/test/fuzzer/wasm_asmjs_corpus.tar.gz /test/mozilla/data /test/promises-aplus/promises-tests /test/promises-aplus/promises-tests.tar.gz @@ -57,6 +56,9 @@ shell_g /test/test262/data /test/test262/data.tar /test/test262/harness +/test/wasm-js +/test/wasm-spec-tests/tests +/test/wasm-spec-tests/tests.tar.gz /testing/gmock /testing/gtest/* !/testing/gtest/include @@ -81,26 +83,26 @@ shell_g /tools/swarming_client /tools/visual_studio/Debug /tools/visual_studio/Release -/test/fuzzer/wasm -/test/fuzzer/wasm_asmjs /v8.log.ll /xcodebuild -TAGS -*.Makefile -GTAGS +GPATH GRTAGS GSYMS -GPATH -tags +GTAGS +TAGS +bsuite +compile_commands.json +d8 +d8_g +gccauses +gcsuspects gtags.files +shell +shell_g +tags turbo*.cfg turbo*.dot turbo*.json v8.ignition_dispatches_table.json -/test/fuzzer/wasm.tar.gz -/test/fuzzer/wasm_asmjs.tar.gz -/src/inspector/build/closure-compiler.tar.gz -/src/inspector/build/closure-compiler -/test/wasm-js !/third_party/jinja2 !/third_party/markupsafe diff --git a/deps/v8/AUTHORS b/deps/v8/AUTHORS index 756d1dc985e6ad..07cf31914431e0 100644 --- a/deps/v8/AUTHORS +++ b/deps/v8/AUTHORS @@ -1,4 +1,4 @@ -# Below is a list of people and organizations that have contributed +# Below is a list of people and organizations that have contributed # to the V8 project. Names should be added to the list like so: # # Name/Organization @@ -70,6 +70,7 @@ Hirofumi Mako Honggyu Kim Ioseb Dzmanashvili Isiah Meadows +Jaime Bernardo Jan de Mooij Jay Freeman James Pike @@ -82,6 +83,7 @@ JunHo Seo Kang-Hao (Kenny) Lu Karl Skomski Kevin Gibbons +Loo Rong Jie Luis Reis Luke Zarko Maciej Małecki diff --git a/deps/v8/BUILD.gn b/deps/v8/BUILD.gn index 6f656f69582762..80d6f3413302c4 100644 --- a/deps/v8/BUILD.gn +++ b/deps/v8/BUILD.gn @@ -5,6 +5,7 @@ import("//build/config/android/config.gni") import("//build/config/arm.gni") import("//build/config/dcheck_always_on.gni") +import("//build/config/host_byteorder.gni") import("//build/config/mips.gni") import("//build/config/sanitizers/sanitizers.gni") @@ -20,6 +21,12 @@ declare_args() { # Print to stdout on Android. v8_android_log_stdout = false + # Sets -DV8_ENABLE_FUTURE. + v8_enable_future = false + + # Sets -DV8_DISABLE_TURBO. + v8_disable_turbo = false + # Sets -DVERIFY_HEAP. v8_enable_verify_heap = "" @@ -63,12 +70,18 @@ declare_args() { # Sets -dOBJECT_PRINT. v8_enable_object_print = "" - # Sets -dTRACE_MAPS. + # Sets -dV8_TRACE_MAPS. v8_enable_trace_maps = "" # Sets -dV8_ENABLE_CHECKS. v8_enable_v8_checks = "" + # Sets -dV8_TRACE_IGNITION. + v8_enable_trace_ignition = false + + # Sets -dV8_CONCURRENT_MARKING + v8_enable_concurrent_marking = false + # With post mortem support enabled, metadata is embedded into libv8 that # describes various parameters of the VM for use by debuggers. See # tools/gen-postmortem-metadata.py for details. @@ -125,7 +138,6 @@ if (v8_enable_v8_checks == "") { # snapshots. is_target_simulator = target_cpu != v8_target_cpu -v8_generated_peephole_source = "$target_gen_dir/bytecode-peephole-table.cc" v8_random_seed = "314159265" v8_toolset_for_shell = "host" @@ -178,10 +190,10 @@ config("external_config") { if (is_component_build) { defines = [ "USING_V8_SHARED" ] } - include_dirs = [ "include" ] - if (v8_enable_inspector) { - include_dirs += [ "$target_gen_dir/include" ] - } + include_dirs = [ + "include", + "$target_gen_dir/include", + ] } # This config should only be applied to code that needs to be explicitly @@ -204,6 +216,12 @@ config("features") { defines += [ "V8_PROMISE_INTERNAL_FIELD_COUNT=${v8_promise_internal_field_count}" ] } + if (v8_enable_future) { + defines += [ "V8_ENABLE_FUTURE" ] + } + if (v8_disable_turbo) { + defines += [ "V8_DISABLE_TURBO" ] + } if (v8_enable_gdbjit) { defines += [ "ENABLE_GDB_JIT_INTERFACE" ] } @@ -220,7 +238,10 @@ config("features") { defines += [ "VERIFY_PREDICTABLE" ] } if (v8_enable_trace_maps) { - defines += [ "TRACE_MAPS" ] + defines += [ "V8_TRACE_MAPS" ] + } + if (v8_enable_trace_ignition) { + defines += [ "V8_TRACE_IGNITION" ] } if (v8_enable_v8_checks) { defines += [ "V8_ENABLE_CHECKS" ] @@ -235,14 +256,20 @@ config("features") { defines += [ "V8_IMMINENT_DEPRECATION_WARNINGS" ] } if (v8_enable_i18n_support) { - defines += [ "V8_I18N_SUPPORT" ] + defines += [ "V8_INTL_SUPPORT" ] } if (v8_enable_handle_zapping) { defines += [ "ENABLE_HANDLE_ZAPPING" ] } + if (v8_use_snapshot) { + defines += [ "V8_USE_SNAPSHOT" ] + } if (v8_use_external_startup_data) { defines += [ "V8_USE_EXTERNAL_STARTUP_DATA" ] } + if (v8_enable_concurrent_marking) { + defines += [ "V8_CONCURRENT_MARKING" ] + } } config("toolchain") { @@ -356,10 +383,34 @@ config("toolchain") { if (v8_current_cpu == "s390x") { defines += [ "V8_TARGET_ARCH_S390X" ] } - if (host_cpu == "x64" || host_cpu == "x86") { + if (host_byteorder == "little") { defines += [ "V8_TARGET_ARCH_S390_LE_SIM" ] + } else { + cflags += [ "-march=z196" ] } } + if (v8_current_cpu == "ppc" || v8_current_cpu == "ppc64") { + defines += [ "V8_TARGET_ARCH_PPC" ] + if (v8_current_cpu == "ppc64") { + defines += [ "V8_TARGET_ARCH_PPC64" ] + } + if (host_byteorder == "little") { + defines += [ "V8_TARGET_ARCH_PPC_LE" ] + } else if (host_byteorder == "big") { + defines += [ "V8_TARGET_ARCH_PPC_BE" ] + if (current_os == "aix") { + cflags += [ + # Work around AIX ceil, trunc and round oddities. + "-mcpu=power5+", + "-mfprnd", + + # Work around AIX assembler popcntb bug. + "-mno-popcntb", + ] + } + } + } + if (v8_current_cpu == "x86") { defines += [ "V8_TARGET_ARCH_IA32" ] if (is_win) { @@ -414,10 +465,34 @@ config("toolchain") { # TODO(hans): Remove once http://crbug.com/428099 is resolved. "-Winconsistent-missing-override", ] - #if (v8_current_cpu == "x64" || v8_current_cpu == "arm64" || - # v8_current_cpu == "mips64el") { - # cflags += [ "-Wshorten-64-to-32" ] - #} + if (v8_current_cpu == "x64" || v8_current_cpu == "arm64" || + v8_current_cpu == "mips64el") { + cflags += [ "-Wshorten-64-to-32" ] + } + } + + if (is_win) { + cflags += [ + "/wd4245", # Conversion with signed/unsigned mismatch. + "/wd4267", # Conversion with possible loss of data. + "/wd4324", # Padding structure due to alignment. + "/wd4701", # Potentially uninitialized local variable. + "/wd4702", # Unreachable code. + "/wd4703", # Potentially uninitialized local pointer variable. + "/wd4709", # Comma operator within array index expr (bugged). + "/wd4714", # Function marked forceinline not inlined. + "/wd4718", # Recursive call has no side-effect. + "/wd4800", # Forcing value to bool. + ] + } + + if (!is_clang && !is_win) { + cflags += [ + # Disable gcc warnings for optimizations based on the assumption that + # signed overflow does not occur. Generates false positives (see + # http://crbug.com/v8/6341). + "-Wno-strict-overflow", + ] } } @@ -441,11 +516,10 @@ action("js2c") { "src/js/macros.py", "src/messages.h", "src/js/prologue.js", - "src/js/runtime.js", + "src/js/max-min.js", "src/js/v8natives.js", "src/js/array.js", "src/js/string.js", - "src/js/arraybuffer.js", "src/js/typedarray.js", "src/js/collection.js", "src/js/weak-collection.js", @@ -455,7 +529,6 @@ action("js2c") { "src/js/templates.js", "src/js/spread.js", "src/js/proxy.js", - "src/js/harmony-string-padding.js", "src/debug/mirrors.js", "src/debug/debug.js", "src/debug/liveedit.js", @@ -466,7 +539,7 @@ action("js2c") { ] if (v8_enable_i18n_support) { - sources += [ "src/js/i18n.js" ] + sources += [ "src/js/intl.js" ] } args = [ @@ -483,43 +556,6 @@ action("js2c") { } } -action("js2c_experimental") { - visibility = [ ":*" ] # Only targets in this file can depend on this. - - script = "tools/js2c.py" - - # The script depends on this other script, this rule causes a rebuild if it - # changes. - inputs = [ - "tools/jsmin.py", - ] - - # NOSORT - sources = [ - "src/js/macros.py", - "src/messages.h", - "src/js/harmony-atomics.js", - ] - - outputs = [ - "$target_gen_dir/experimental-libraries.cc", - ] - - args = [ - rebase_path("$target_gen_dir/experimental-libraries.cc", - root_build_dir), - "EXPERIMENTAL", - ] + rebase_path(sources, root_build_dir) - - if (v8_use_external_startup_data) { - outputs += [ "$target_gen_dir/libraries_experimental.bin" ] - args += [ - "--startup_blob", - rebase_path("$target_gen_dir/libraries_experimental.bin", root_build_dir), - ] - } -} - action("js2c_extras") { visibility = [ ":*" ] # Only targets in this file can depend on this. @@ -630,7 +666,6 @@ if (v8_use_external_startup_data) { deps = [ ":js2c", - ":js2c_experimental", ":js2c_experimental_extras", ":js2c_extras", ] @@ -638,7 +673,6 @@ if (v8_use_external_startup_data) { # NOSORT sources = [ "$target_gen_dir/libraries.bin", - "$target_gen_dir/libraries_experimental.bin", "$target_gen_dir/libraries_extras.bin", "$target_gen_dir/libraries_experimental_extras.bin", ] @@ -667,6 +701,8 @@ action("postmortem-metadata") { sources = [ "src/objects.h", "src/objects-inl.h", + "src/objects/map.h", + "src/objects/map-inl.h", ] outputs = [ @@ -728,29 +764,6 @@ action("run_mksnapshot") { } } -action("run_mkpeephole") { - visibility = [ ":*" ] # Only targets in this file can depend on this. - - deps = [ - ":mkpeephole($v8_snapshot_toolchain)", - ] - - outputs = [ - v8_generated_peephole_source, - ] - - sources = [] - - script = "tools/run.py" - - args = [ - "./" + rebase_path(get_label_info(":mkpeephole($v8_snapshot_toolchain)", - "root_out_dir") + "/mkpeephole", - root_build_dir), - rebase_path(v8_generated_peephole_source, root_build_dir), - ] -} - action("v8_dump_build_config") { script = "tools/testrunner/utils/dump_build_config.py" outputs = [ @@ -769,7 +782,6 @@ action("v8_dump_build_config") { "target_cpu=\"$target_cpu\"", "v8_current_cpu=\"$v8_current_cpu\"", "v8_enable_i18n_support=$v8_enable_i18n_support", - "v8_enable_inspector=$v8_enable_inspector", "v8_target_cpu=\"$v8_target_cpu\"", "v8_use_snapshot=$v8_use_snapshot", ] @@ -791,6 +803,7 @@ source_set("v8_maybe_snapshot") { } else { # Ignore v8_use_external_startup_data setting if no snapshot is used. public_deps = [ + ":v8_builtins_setup", ":v8_nosnapshot", ] } @@ -801,7 +814,6 @@ v8_source_set("v8_nosnapshot") { deps = [ ":js2c", - ":js2c_experimental", ":js2c_experimental_extras", ":js2c_extras", ":v8_base", @@ -809,7 +821,6 @@ v8_source_set("v8_nosnapshot") { sources = [ "$target_gen_dir/experimental-extras-libraries.cc", - "$target_gen_dir/experimental-libraries.cc", "$target_gen_dir/extras-libraries.cc", "$target_gen_dir/libraries.cc", "src/snapshot/snapshot-empty.cc", @@ -828,7 +839,6 @@ v8_source_set("v8_snapshot") { deps = [ ":js2c", - ":js2c_experimental", ":js2c_experimental_extras", ":js2c_extras", ":v8_base", @@ -841,10 +851,10 @@ v8_source_set("v8_snapshot") { sources = [ "$target_gen_dir/experimental-extras-libraries.cc", - "$target_gen_dir/experimental-libraries.cc", "$target_gen_dir/extras-libraries.cc", "$target_gen_dir/libraries.cc", "$target_gen_dir/snapshot.cc", + "src/setup-isolate-deserialize.cc", ] configs = [ ":internal_config" ] @@ -856,7 +866,6 @@ if (v8_use_external_startup_data) { deps = [ ":js2c", - ":js2c_experimental", ":js2c_experimental_extras", ":js2c_extras", ":v8_base", @@ -867,6 +876,7 @@ if (v8_use_external_startup_data) { ] sources = [ + "src/setup-isolate-deserialize.cc", "src/snapshot/natives-external.cc", "src/snapshot/snapshot-external.cc", ] @@ -875,17 +885,171 @@ if (v8_use_external_startup_data) { } } +v8_source_set("v8_builtins_generators") { + visibility = [ + ":*", + "test/cctest:*", + ] + + deps = [ + ":v8_base", + ] + + sources = [ + ### gcmole(all) ### + "src/builtins/builtins-arguments-gen.cc", + "src/builtins/builtins-arguments-gen.h", + "src/builtins/builtins-array-gen.cc", + "src/builtins/builtins-async-function-gen.cc", + "src/builtins/builtins-async-gen.cc", + "src/builtins/builtins-async-gen.h", + "src/builtins/builtins-async-generator-gen.cc", + "src/builtins/builtins-async-iterator-gen.cc", + "src/builtins/builtins-boolean-gen.cc", + "src/builtins/builtins-call-gen.cc", + "src/builtins/builtins-console-gen.cc", + "src/builtins/builtins-constructor-gen.cc", + "src/builtins/builtins-constructor-gen.h", + "src/builtins/builtins-constructor.h", + "src/builtins/builtins-conversion-gen.cc", + "src/builtins/builtins-date-gen.cc", + "src/builtins/builtins-forin-gen.cc", + "src/builtins/builtins-forin-gen.h", + "src/builtins/builtins-function-gen.cc", + "src/builtins/builtins-generator-gen.cc", + "src/builtins/builtins-global-gen.cc", + "src/builtins/builtins-handler-gen.cc", + "src/builtins/builtins-ic-gen.cc", + "src/builtins/builtins-internal-gen.cc", + "src/builtins/builtins-interpreter-gen.cc", + "src/builtins/builtins-intl-gen.cc", + "src/builtins/builtins-math-gen.cc", + "src/builtins/builtins-number-gen.cc", + "src/builtins/builtins-object-gen.cc", + "src/builtins/builtins-promise-gen.cc", + "src/builtins/builtins-promise-gen.h", + "src/builtins/builtins-regexp-gen.cc", + "src/builtins/builtins-regexp-gen.h", + "src/builtins/builtins-sharedarraybuffer-gen.cc", + "src/builtins/builtins-string-gen.cc", + "src/builtins/builtins-string-gen.h", + "src/builtins/builtins-symbol-gen.cc", + "src/builtins/builtins-typedarray-gen.cc", + "src/builtins/builtins-utils-gen.h", + "src/builtins/builtins-wasm-gen.cc", + "src/builtins/setup-builtins-internal.cc", + "src/ic/accessor-assembler.cc", + "src/ic/accessor-assembler.h", + "src/ic/binary-op-assembler.cc", + "src/ic/binary-op-assembler.h", + "src/ic/keyed-store-generic.cc", + "src/ic/keyed-store-generic.h", + "src/interpreter/interpreter-assembler.cc", + "src/interpreter/interpreter-assembler.h", + "src/interpreter/interpreter-generator.cc", + "src/interpreter/interpreter-generator.h", + "src/interpreter/interpreter-intrinsics-generator.cc", + "src/interpreter/interpreter-intrinsics-generator.h", + "src/interpreter/setup-interpreter-internal.cc", + "src/interpreter/setup-interpreter.h", + ] + + if (v8_current_cpu == "x86") { + sources += [ + ### gcmole(arch:ia32) ### + "src/builtins/ia32/builtins-ia32.cc", + ] + } else if (v8_current_cpu == "x64") { + sources += [ + ### gcmole(arch:x64) ### + "src/builtins/x64/builtins-x64.cc", + ] + } else if (v8_current_cpu == "arm") { + sources += [ + ### gcmole(arch:arm) ### + "src/builtins/arm/builtins-arm.cc", + ] + } else if (v8_current_cpu == "arm64") { + sources += [ + ### gcmole(arch:arm64) ### + "src/builtins/arm64/builtins-arm64.cc", + ] + } else if (v8_current_cpu == "mips" || v8_current_cpu == "mipsel") { + sources += [ + ### gcmole(arch:mipsel) ### + "src/builtins/mips/builtins-mips.cc", + ] + } else if (v8_current_cpu == "mips64" || v8_current_cpu == "mips64el") { + sources += [ + ### gcmole(arch:mips64el) ### + "src/builtins/mips64/builtins-mips64.cc", + ] + } else if (v8_current_cpu == "ppc" || v8_current_cpu == "ppc64") { + sources += [ + ### gcmole(arch:ppc) ### + "src/builtins/ppc/builtins-ppc.cc", + ] + } else if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") { + sources += [ + ### gcmole(arch:s390) ### + "src/builtins/s390/builtins-s390.cc", + ] + } else if (v8_current_cpu == "x87") { + sources += [ + ### gcmole(arch:x87) ### + "src/builtins/x87/builtins-x87.cc", + ] + } + + if (!v8_enable_i18n_support) { + sources -= [ "src/builtins/builtins-intl-gen.cc" ] + } + + configs = [ ":internal_config" ] +} + +v8_source_set("v8_builtins_setup") { + visibility = [ ":*" ] # Only targets in this file can depend on this. + + deps = [ + ":v8_builtins_generators", + ] + + sources = [ + ### gcmole(all) ### + "src/setup-isolate-full.cc", + ] + + configs = [ ":internal_config" ] +} + # This is split out to be a non-code containing target that the Chromium browser # DLL can depend upon to get only a version string. v8_header_set("v8_version") { configs = [ ":internal_config" ] sources = [ + "include/v8-value-serializer-version.h", "include/v8-version-string.h", "include/v8-version.h", ] } +# This is split out to be a non-code containing target that the Chromium browser +# can depend upon to get basic v8 types. +v8_header_set("v8_headers") { + configs = [ ":internal_config" ] + + sources = [ + "include/v8.h", + "include/v8config.h", + ] + + deps = [ + ":v8_version", + ] +} + v8_source_set("v8_base") { visibility = [ ":*" ] # Only targets in this file can depend on this. @@ -894,6 +1058,8 @@ v8_source_set("v8_base") { ### gcmole(all) ### "include/v8-debug.h", + "include/v8-inspector-protocol.h", + "include/v8-inspector.h", "include/v8-platform.h", "include/v8-profiler.h", "include/v8-testing.h", @@ -919,12 +1085,13 @@ v8_source_set("v8_base") { "src/arguments.h", "src/asmjs/asm-js.cc", "src/asmjs/asm-js.h", - "src/asmjs/asm-typer.cc", - "src/asmjs/asm-typer.h", + "src/asmjs/asm-names.h", + "src/asmjs/asm-parser.cc", + "src/asmjs/asm-parser.h", + "src/asmjs/asm-scanner.cc", + "src/asmjs/asm-scanner.h", "src/asmjs/asm-types.cc", "src/asmjs/asm-types.h", - "src/asmjs/asm-wasm-builder.cc", - "src/asmjs/asm-wasm-builder.h", "src/asmjs/switch-logic.cc", "src/asmjs/switch-logic.h", "src/assembler-inl.h", @@ -973,52 +1140,41 @@ v8_source_set("v8_base") { "src/bootstrapper.cc", "src/bootstrapper.h", "src/builtins/builtins-api.cc", - "src/builtins/builtins-arguments.cc", - "src/builtins/builtins-arguments.h", "src/builtins/builtins-array.cc", "src/builtins/builtins-arraybuffer.cc", - "src/builtins/builtins-async-function.cc", - "src/builtins/builtins-async-iterator.cc", - "src/builtins/builtins-async.cc", - "src/builtins/builtins-async.h", "src/builtins/builtins-boolean.cc", "src/builtins/builtins-call.cc", "src/builtins/builtins-callsite.cc", - "src/builtins/builtins-constructor.cc", + "src/builtins/builtins-console.cc", "src/builtins/builtins-constructor.h", - "src/builtins/builtins-conversion.cc", "src/builtins/builtins-dataview.cc", "src/builtins/builtins-date.cc", "src/builtins/builtins-debug.cc", + "src/builtins/builtins-definitions.h", + "src/builtins/builtins-descriptors.h", "src/builtins/builtins-error.cc", "src/builtins/builtins-function.cc", - "src/builtins/builtins-generator.cc", "src/builtins/builtins-global.cc", - "src/builtins/builtins-handler.cc", - "src/builtins/builtins-ic.cc", "src/builtins/builtins-internal.cc", "src/builtins/builtins-interpreter.cc", + "src/builtins/builtins-intl.cc", "src/builtins/builtins-json.cc", "src/builtins/builtins-math.cc", "src/builtins/builtins-number.cc", "src/builtins/builtins-object.cc", - "src/builtins/builtins-object.h", - "src/builtins/builtins-promise.cc", - "src/builtins/builtins-promise.h", "src/builtins/builtins-proxy.cc", "src/builtins/builtins-reflect.cc", "src/builtins/builtins-regexp.cc", - "src/builtins/builtins-regexp.h", "src/builtins/builtins-sharedarraybuffer.cc", "src/builtins/builtins-string.cc", "src/builtins/builtins-symbol.cc", "src/builtins/builtins-typedarray.cc", "src/builtins/builtins-utils.h", - "src/builtins/builtins-wasm.cc", "src/builtins/builtins.cc", "src/builtins/builtins.h", "src/cached-powers.cc", "src/cached-powers.h", + "src/callable.h", "src/cancelable-task.cc", "src/cancelable-task.h", "src/char-predicates-inl.h", @@ -1031,6 +1187,7 @@ v8_source_set("v8_base") { "src/code-stub-assembler.cc", "src/code-stub-assembler.h", "src/code-stubs-hydrogen.cc", + "src/code-stubs-utils.h", "src/code-stubs.cc", "src/code-stubs.h", "src/codegen.cc", @@ -1117,8 +1274,6 @@ v8_source_set("v8_base") { "src/compiler/graph-assembler.h", "src/compiler/graph-reducer.cc", "src/compiler/graph-reducer.h", - "src/compiler/graph-replay.cc", - "src/compiler/graph-replay.h", "src/compiler/graph-trimmer.cc", "src/compiler/graph-trimmer.h", "src/compiler/graph-visualizer.cc", @@ -1262,8 +1417,6 @@ v8_source_set("v8_base") { "src/compiler/wasm-linkage.cc", "src/compiler/zone-stats.cc", "src/compiler/zone-stats.h", - "src/context-measure.cc", - "src/context-measure.h", "src/contexts-inl.h", "src/contexts.cc", "src/contexts.h", @@ -1428,6 +1581,9 @@ v8_source_set("v8_base") { "src/heap/array-buffer-tracker.h", "src/heap/code-stats.cc", "src/heap/code-stats.h", + "src/heap/concurrent-marking-deque.h", + "src/heap/concurrent-marking.cc", + "src/heap/concurrent-marking.h", "src/heap/embedder-tracing.cc", "src/heap/embedder-tracing.h", "src/heap/gc-idle-time-handler.cc", @@ -1442,6 +1598,7 @@ v8_source_set("v8_base") { "src/heap/incremental-marking-job.h", "src/heap/incremental-marking.cc", "src/heap/incremental-marking.h", + "src/heap/item-parallel-job.h", "src/heap/mark-compact-inl.h", "src/heap/mark-compact.cc", "src/heap/mark-compact.h", @@ -1460,19 +1617,18 @@ v8_source_set("v8_base") { "src/heap/scavenger-inl.h", "src/heap/scavenger.cc", "src/heap/scavenger.h", + "src/heap/sequential-marking-deque.cc", + "src/heap/sequential-marking-deque.h", "src/heap/slot-set.h", "src/heap/spaces-inl.h", "src/heap/spaces.cc", "src/heap/spaces.h", "src/heap/store-buffer.cc", "src/heap/store-buffer.h", - "src/i18n.cc", - "src/i18n.h", + "src/heap/workstealing-marking-deque.h", "src/ic/access-compiler-data.h", "src/ic/access-compiler.cc", "src/ic/access-compiler.h", - "src/ic/accessor-assembler.cc", - "src/ic/accessor-assembler.h", "src/ic/call-optimization.cc", "src/ic/call-optimization.h", "src/ic/handler-compiler.cc", @@ -1486,8 +1642,6 @@ v8_source_set("v8_base") { "src/ic/ic-stats.h", "src/ic/ic.cc", "src/ic/ic.h", - "src/ic/keyed-store-generic.cc", - "src/ic/keyed-store-generic.h", "src/ic/stub-cache.cc", "src/ic/stub-cache.h", "src/icu_util.cc", @@ -1506,28 +1660,26 @@ v8_source_set("v8_base") { "src/interpreter/bytecode-array-random-iterator.h", "src/interpreter/bytecode-array-writer.cc", "src/interpreter/bytecode-array-writer.h", - "src/interpreter/bytecode-dead-code-optimizer.cc", - "src/interpreter/bytecode-dead-code-optimizer.h", "src/interpreter/bytecode-decoder.cc", "src/interpreter/bytecode-decoder.h", "src/interpreter/bytecode-flags.cc", "src/interpreter/bytecode-flags.h", "src/interpreter/bytecode-generator.cc", "src/interpreter/bytecode-generator.h", + "src/interpreter/bytecode-jump-table.h", "src/interpreter/bytecode-label.cc", "src/interpreter/bytecode-label.h", + "src/interpreter/bytecode-node.cc", + "src/interpreter/bytecode-node.h", "src/interpreter/bytecode-operands.cc", "src/interpreter/bytecode-operands.h", - "src/interpreter/bytecode-peephole-optimizer.cc", - "src/interpreter/bytecode-peephole-optimizer.h", - "src/interpreter/bytecode-peephole-table.h", - "src/interpreter/bytecode-pipeline.cc", - "src/interpreter/bytecode-pipeline.h", "src/interpreter/bytecode-register-allocator.h", "src/interpreter/bytecode-register-optimizer.cc", "src/interpreter/bytecode-register-optimizer.h", "src/interpreter/bytecode-register.cc", "src/interpreter/bytecode-register.h", + "src/interpreter/bytecode-source-info.cc", + "src/interpreter/bytecode-source-info.h", "src/interpreter/bytecode-traits.h", "src/interpreter/bytecodes.cc", "src/interpreter/bytecodes.h", @@ -1537,12 +1689,13 @@ v8_source_set("v8_base") { "src/interpreter/control-flow-builders.h", "src/interpreter/handler-table-builder.cc", "src/interpreter/handler-table-builder.h", - "src/interpreter/interpreter-assembler.cc", - "src/interpreter/interpreter-assembler.h", + "src/interpreter/interpreter-generator.h", "src/interpreter/interpreter-intrinsics.cc", "src/interpreter/interpreter-intrinsics.h", "src/interpreter/interpreter.cc", "src/interpreter/interpreter.h", + "src/intl.cc", + "src/intl.h", "src/isolate-inl.h", "src/isolate.cc", "src/isolate.h", @@ -1572,6 +1725,7 @@ v8_source_set("v8_base") { "src/lookup.h", "src/machine-type.cc", "src/machine-type.h", + "src/macro-assembler-inl.h", "src/macro-assembler.h", "src/managed.h", "src/map-updater.cc", @@ -1586,17 +1740,30 @@ v8_source_set("v8_base") { "src/objects-printer.cc", "src/objects.cc", "src/objects.h", + "src/objects/code-cache-inl.h", + "src/objects/code-cache.h", + "src/objects/compilation-cache-inl.h", + "src/objects/compilation-cache.h", + "src/objects/descriptor-array.h", + "src/objects/dictionary.h", + "src/objects/frame-array-inl.h", + "src/objects/frame-array.h", + "src/objects/hash-table.h", + "src/objects/intl-objects.cc", + "src/objects/intl-objects.h", "src/objects/literal-objects.cc", "src/objects/literal-objects.h", + "src/objects/map-inl.h", + "src/objects/map.h", "src/objects/module-info.h", "src/objects/object-macros-undef.h", "src/objects/object-macros.h", "src/objects/regexp-match-info.h", "src/objects/scope-info.cc", "src/objects/scope-info.h", + "src/objects/string-table.h", "src/ostreams.cc", "src/ostreams.h", - "src/parsing/duplicate-finder.cc", "src/parsing/duplicate-finder.h", "src/parsing/expression-classifier.h", "src/parsing/func-name-inferrer.cc", @@ -1700,9 +1867,9 @@ v8_source_set("v8_base") { "src/runtime/runtime-function.cc", "src/runtime/runtime-futex.cc", "src/runtime/runtime-generator.cc", - "src/runtime/runtime-i18n.cc", "src/runtime/runtime-internal.cc", "src/runtime/runtime-interpreter.cc", + "src/runtime/runtime-intl.cc", "src/runtime/runtime-literals.cc", "src/runtime/runtime-liveedit.cc", "src/runtime/runtime-maths.cc", @@ -1724,6 +1891,7 @@ v8_source_set("v8_base") { "src/runtime/runtime.h", "src/safepoint-table.cc", "src/safepoint-table.h", + "src/setup-isolate.h", "src/signature.h", "src/simulator.h", "src/small-pointer-list.h", @@ -1757,6 +1925,8 @@ v8_source_set("v8_base") { "src/string-builder.h", "src/string-case.cc", "src/string-case.h", + "src/string-hasher-inl.h", + "src/string-hasher.h", "src/string-search.h", "src/string-stream.cc", "src/string-stream.h", @@ -1771,6 +1941,9 @@ v8_source_set("v8_base") { "src/transitions-inl.h", "src/transitions.cc", "src/transitions.h", + "src/trap-handler/handler-outside.cc", + "src/trap-handler/handler-shared.cc", + "src/trap-handler/trap-handler-internal.h", "src/trap-handler/trap-handler.h", "src/type-hints.cc", "src/type-hints.h", @@ -1798,6 +1971,8 @@ v8_source_set("v8_base") { "src/vector.h", "src/version.cc", "src/version.h", + "src/visitors.cc", + "src/visitors.h", "src/vm-state-inl.h", "src/vm-state.h", "src/wasm/decoder.h", @@ -1805,10 +1980,14 @@ v8_source_set("v8_base") { "src/wasm/function-body-decoder.cc", "src/wasm/function-body-decoder.h", "src/wasm/leb-helper.h", + "src/wasm/local-decl-encoder.cc", + "src/wasm/local-decl-encoder.h", "src/wasm/module-decoder.cc", "src/wasm/module-decoder.h", "src/wasm/signature-map.cc", "src/wasm/signature-map.h", + "src/wasm/streaming-decoder.cc", + "src/wasm/streaming-decoder.h", "src/wasm/wasm-code-specialization.cc", "src/wasm/wasm-code-specialization.h", "src/wasm/wasm-debug.cc", @@ -1819,7 +1998,6 @@ v8_source_set("v8_base") { "src/wasm/wasm-js.cc", "src/wasm/wasm-js.h", "src/wasm/wasm-limits.h", - "src/wasm/wasm-macro-gen.h", "src/wasm/wasm-module-builder.cc", "src/wasm/wasm-module-builder.h", "src/wasm/wasm-module.cc", @@ -1847,7 +2025,6 @@ v8_source_set("v8_base") { if (v8_current_cpu == "x86") { sources += [ ### gcmole(arch:ia32) ### - "src/builtins/ia32/builtins-ia32.cc", "src/compiler/ia32/code-generator-ia32.cc", "src/compiler/ia32/instruction-codes-ia32.h", "src/compiler/ia32/instruction-scheduler-ia32.cc", @@ -1877,6 +2054,7 @@ v8_source_set("v8_base") { "src/ia32/macro-assembler-ia32.h", "src/ia32/simulator-ia32.cc", "src/ia32/simulator-ia32.h", + "src/ia32/sse-instr.h", "src/ic/ia32/access-compiler-ia32.cc", "src/ic/ia32/handler-compiler-ia32.cc", "src/ic/ia32/ic-ia32.cc", @@ -1885,7 +2063,6 @@ v8_source_set("v8_base") { ] } else if (v8_current_cpu == "x64") { sources += [ ### gcmole(arch:x64) ### - "src/builtins/x64/builtins-x64.cc", "src/compiler/x64/code-generator-x64.cc", "src/compiler/x64/instruction-codes-x64.h", "src/compiler/x64/instruction-scheduler-x64.cc", @@ -1926,6 +2103,9 @@ v8_source_set("v8_base") { "src/x64/simulator-x64.h", "src/x64/sse-instr.h", ] + if (is_linux) { + sources += [ "src/trap-handler/handler-inside.cc" ] + } } else if (v8_current_cpu == "arm") { sources += [ ### gcmole(arch:arm) ### "src/arm/assembler-arm-inl.h", @@ -1949,7 +2129,6 @@ v8_source_set("v8_base") { "src/arm/macro-assembler-arm.h", "src/arm/simulator-arm.cc", "src/arm/simulator-arm.h", - "src/builtins/arm/builtins-arm.cc", "src/compiler/arm/code-generator-arm.cc", "src/compiler/arm/instruction-codes-arm.h", "src/compiler/arm/instruction-scheduler-arm.cc", @@ -2003,7 +2182,6 @@ v8_source_set("v8_base") { "src/arm64/simulator-arm64.h", "src/arm64/utils-arm64.cc", "src/arm64/utils-arm64.h", - "src/builtins/arm64/builtins-arm64.cc", "src/compiler/arm64/code-generator-arm64.cc", "src/compiler/arm64/instruction-codes-arm64.h", "src/compiler/arm64/instruction-scheduler-arm64.cc", @@ -2029,7 +2207,6 @@ v8_source_set("v8_base") { ] } else if (v8_current_cpu == "mips" || v8_current_cpu == "mipsel") { sources += [ ### gcmole(arch:mipsel) ### - "src/builtins/mips/builtins-mips.cc", "src/compiler/mips/code-generator-mips.cc", "src/compiler/mips/instruction-codes-mips.h", "src/compiler/mips/instruction-scheduler-mips.cc", @@ -2069,7 +2246,6 @@ v8_source_set("v8_base") { ] } else if (v8_current_cpu == "mips64" || v8_current_cpu == "mips64el") { sources += [ ### gcmole(arch:mips64el) ### - "src/builtins/mips64/builtins-mips64.cc", "src/compiler/mips64/code-generator-mips64.cc", "src/compiler/mips64/instruction-codes-mips64.h", "src/compiler/mips64/instruction-scheduler-mips64.cc", @@ -2109,7 +2285,6 @@ v8_source_set("v8_base") { ] } else if (v8_current_cpu == "ppc" || v8_current_cpu == "ppc64") { sources += [ ### gcmole(arch:ppc) ### - "src/builtins/ppc/builtins-ppc.cc", "src/compiler/ppc/code-generator-ppc.cc", "src/compiler/ppc/instruction-codes-ppc.h", "src/compiler/ppc/instruction-scheduler-ppc.cc", @@ -2149,7 +2324,6 @@ v8_source_set("v8_base") { ] } else if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") { sources += [ ### gcmole(arch:s390) ### - "src/builtins/s390/builtins-s390.cc", "src/compiler/s390/code-generator-s390.cc", "src/compiler/s390/instruction-codes-s390.h", "src/compiler/s390/instruction-scheduler-s390.cc", @@ -2189,7 +2363,6 @@ v8_source_set("v8_base") { ] } else if (v8_current_cpu == "x87") { sources += [ ### gcmole(arch:x87) ### - "src/builtins/x87/builtins-x87.cc", "src/compiler/x87/code-generator-x87.cc", "src/compiler/x87/instruction-codes-x87.h", "src/compiler/x87/instruction-scheduler-x87.cc", @@ -2231,28 +2404,27 @@ v8_source_set("v8_base") { defines = [] deps = [ + ":v8_headers", ":v8_libbase", ":v8_libsampler", - ":v8_version", + "src/inspector:inspector", ] - sources += [ v8_generated_peephole_source ] - deps += [ ":run_mkpeephole" ] - - if (is_win) { - # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. - cflags = [ "/wd4267" ] - } - if (v8_enable_i18n_support) { - deps += [ "//third_party/icu" ] + public_deps = [ + "//third_party/icu", + ] if (is_win) { deps += [ "//third_party/icu:icudata" ] } } else { sources -= [ - "src/i18n.cc", - "src/i18n.h", + "src/builtins/builtins-intl.cc", + "src/intl.cc", + "src/intl.h", + "src/objects/intl-objects.cc", + "src/objects/intl-objects.h", + "src/runtime/runtime-intl.cc", ] } @@ -2260,10 +2432,6 @@ v8_source_set("v8_base") { sources += [ "$target_gen_dir/debug-support.cc" ] deps += [ ":postmortem-metadata" ] } - - if (v8_enable_inspector) { - deps += [ "src/inspector:inspector" ] - } } v8_component("v8_libbase") { @@ -2285,6 +2453,7 @@ v8_component("v8_libbase") { "src/base/debug/stack_trace.h", "src/base/division-by-constant.cc", "src/base/division-by-constant.h", + "src/base/export-template.h", "src/base/file-utils.cc", "src/base/file-utils.h", "src/base/flags.h", @@ -2320,6 +2489,7 @@ v8_component("v8_libbase") { "src/base/safe_math_impl.h", "src/base/sys-info.cc", "src/base/sys-info.h", + "src/base/timezone-cache.h", "src/base/utils/random-number-generator.cc", "src/base/utils/random-number-generator.h", ] @@ -2335,7 +2505,10 @@ v8_component("v8_libbase") { } if (is_posix) { - sources += [ "src/base/platform/platform-posix.cc" ] + sources += [ + "src/base/platform/platform-posix.cc", + "src/base/platform/platform-posix.h", + ] } if (is_linux) { @@ -2344,6 +2517,16 @@ v8_component("v8_libbase") { "src/base/platform/platform-linux.cc", ] + libs = [ + "dl", + "rt", + ] + } else if (current_os == "aix") { + sources += [ + "src/base/debug/stack_trace_posix.cc", + "src/base/platform/platform-aix.cc", + ] + libs = [ "dl", "rt", @@ -2464,10 +2647,6 @@ v8_source_set("fuzzer_support") { ":v8_libbase", ":v8_libplatform", ] - - if (v8_enable_i18n_support) { - deps += [ "//third_party/icu" ] - } } ############################################################################### @@ -2486,43 +2665,16 @@ if (current_toolchain == v8_snapshot_toolchain) { deps = [ ":v8_base", + ":v8_builtins_setup", ":v8_libbase", ":v8_libplatform", ":v8_nosnapshot", - "//build/config/sanitizers:deps", + "//build/config:exe_and_shlib_deps", "//build/win:default_exe_manifest", ] } } -v8_executable("mkpeephole") { - # mkpeephole needs to be built for the build host so the peephole lookup - # table can built during build. The table depends on the properties of - # bytecodes that are described in bytecodes.{cc,h}. - visibility = [ ":*" ] # Only targets in this file can depend on this. - - sources = [ - "src/interpreter/bytecode-operands.cc", - "src/interpreter/bytecode-operands.h", - "src/interpreter/bytecode-peephole-optimizer.h", - "src/interpreter/bytecode-traits.h", - "src/interpreter/bytecodes.cc", - "src/interpreter/bytecodes.h", - "src/interpreter/mkpeephole.cc", - ] - - configs = [ - ":external_config", - ":internal_config", - ] - - deps = [ - ":v8_libbase", - "//build/config/sanitizers:deps", - "//build/win:default_exe_manifest", - ] -} - ############################################################################### # Public targets # @@ -2570,6 +2722,12 @@ group("v8_clusterfuzz") { } } +group("v8_archive") { + deps = [ + ":d8", + ] +} + group("v8_fuzzers") { testonly = true deps = [ @@ -2579,6 +2737,7 @@ group("v8_fuzzers") { ":v8_simple_wasm_asmjs_fuzzer", ":v8_simple_wasm_call_fuzzer", ":v8_simple_wasm_code_fuzzer", + ":v8_simple_wasm_compile_fuzzer", ":v8_simple_wasm_data_section_fuzzer", ":v8_simple_wasm_function_sigs_section_fuzzer", ":v8_simple_wasm_fuzzer", @@ -2609,6 +2768,31 @@ if (is_component_build) { public_configs = [ ":external_config" ] } + + v8_component("v8_for_testing") { + testonly = true + + sources = [ + "src/v8dll-main.cc", + ] + + deps = [ + ":v8_dump_build_config", + ] + + public_deps = [ + ":v8_base", + ":v8_maybe_snapshot", + ] + + if (v8_use_snapshot) { + public_deps += [ ":v8_builtins_generators" ] + } + + configs = [ ":internal_config" ] + + public_configs = [ ":external_config" ] + } } else { group("v8") { deps = [ @@ -2622,11 +2806,32 @@ if (is_component_build) { public_configs = [ ":external_config" ] } + + group("v8_for_testing") { + testonly = true + + deps = [ + ":v8_dump_build_config", + ] + + public_deps = [ + ":v8_base", + ":v8_maybe_snapshot", + ] + + if (v8_use_snapshot) { + public_deps += [ ":v8_builtins_generators" ] + } + + public_configs = [ ":external_config" ] + } } v8_executable("d8") { sources = [ "$target_gen_dir/d8-js.cc", + "src/d8-console.cc", + "src/d8-console.h", "src/d8.cc", "src/d8.h", ] @@ -2643,7 +2848,7 @@ v8_executable("d8") { ":v8", ":v8_libbase", ":v8_libplatform", - "//build/config/sanitizers:deps", + "//build/config:exe_and_shlib_deps", "//build/win:default_exe_manifest", ] @@ -2653,18 +2858,11 @@ v8_executable("d8") { sources += [ "src/d8-windows.cc" ] } - if (v8_enable_i18n_support) { - deps += [ "//third_party/icu" ] - } - if (v8_correctness_fuzzer) { deps += [ "tools/foozzie:v8_correctness_fuzzer_resources" ] } defines = [] - if (v8_enable_inspector) { - defines += [ "V8_INSPECTOR_ENABLED" ] - } if (v8_enable_vtunejit) { deps += [ "//src/third_party/vtune:v8_vtune" ] @@ -2695,13 +2893,9 @@ v8_executable("v8_hello_world") { ":v8", ":v8_libbase", ":v8_libplatform", - "//build/config/sanitizers:deps", + "//build/config:exe_and_shlib_deps", "//build/win:default_exe_manifest", ] - - if (v8_enable_i18n_support) { - deps += [ "//third_party/icu" ] - } } v8_executable("v8_sample_process") { @@ -2720,13 +2914,9 @@ v8_executable("v8_sample_process") { ":v8", ":v8_libbase", ":v8_libplatform", - "//build/config/sanitizers:deps", + "//build/config:exe_and_shlib_deps", "//build/win:default_exe_manifest", ] - - if (v8_enable_i18n_support) { - deps += [ "//third_party/icu" ] - } } v8_executable("v8_parser_shell") { @@ -2744,13 +2934,9 @@ v8_executable("v8_parser_shell") { ":v8", ":v8_libbase", ":v8_libplatform", - "//build/config/sanitizers:deps", + "//build/config:exe_and_shlib_deps", "//build/win:default_exe_manifest", ] - - if (v8_enable_i18n_support) { - deps += [ "//third_party/icu" ] - } } if (want_v8_shell) { @@ -2770,13 +2956,9 @@ if (want_v8_shell) { ":v8", ":v8_libbase", ":v8_libplatform", - "//build/config/sanitizers:deps", + "//build/config:exe_and_shlib_deps", "//build/win:default_exe_manifest", ] - - if (v8_enable_i18n_support) { - deps += [ "//third_party/icu" ] - } } } @@ -2786,7 +2968,7 @@ template("v8_fuzzer") { v8_executable("v8_simple_" + name) { deps = [ ":" + name, - "//build/config/sanitizers:deps", + "//build/config:exe_and_shlib_deps", "//build/win:default_exe_manifest", ] @@ -2864,17 +3046,6 @@ v8_source_set("wasm_module_runner") { ] } -v8_source_set("wasm_test_signatures") { - sources = [ - "test/common/wasm/test-signatures.h", - ] - - configs = [ - ":external_config", - ":internal_config_base", - ] -} - v8_source_set("wasm_fuzzer") { sources = [ "test/fuzzer/wasm.cc", @@ -2882,6 +3053,7 @@ v8_source_set("wasm_fuzzer") { deps = [ ":fuzzer_support", + ":lib_wasm_fuzzer_common", ":wasm_module_runner", ] @@ -2901,6 +3073,7 @@ v8_source_set("wasm_asmjs_fuzzer") { deps = [ ":fuzzer_support", + ":lib_wasm_fuzzer_common", ":wasm_module_runner", ] @@ -2915,13 +3088,14 @@ v8_fuzzer("wasm_asmjs_fuzzer") { v8_source_set("wasm_code_fuzzer") { sources = [ + "test/common/wasm/test-signatures.h", "test/fuzzer/wasm-code.cc", ] deps = [ ":fuzzer_support", + ":lib_wasm_fuzzer_common", ":wasm_module_runner", - ":wasm_test_signatures", ] configs = [ @@ -2935,13 +3109,14 @@ v8_fuzzer("wasm_code_fuzzer") { v8_source_set("wasm_call_fuzzer") { sources = [ + "test/common/wasm/test-signatures.h", "test/fuzzer/wasm-call.cc", ] deps = [ ":fuzzer_support", + ":lib_wasm_fuzzer_common", ":wasm_module_runner", - ":wasm_test_signatures", ] configs = [ @@ -2953,10 +3128,10 @@ v8_source_set("wasm_call_fuzzer") { v8_fuzzer("wasm_call_fuzzer") { } -v8_source_set("lib_wasm_section_fuzzer") { +v8_source_set("lib_wasm_fuzzer_common") { sources = [ - "test/fuzzer/wasm-section-fuzzers.cc", - "test/fuzzer/wasm-section-fuzzers.h", + "test/fuzzer/wasm-fuzzer-common.cc", + "test/fuzzer/wasm-fuzzer-common.h", ] configs = [ @@ -2972,7 +3147,7 @@ v8_source_set("wasm_types_section_fuzzer") { deps = [ ":fuzzer_support", - ":lib_wasm_section_fuzzer", + ":lib_wasm_fuzzer_common", ":wasm_module_runner", ] @@ -2992,7 +3167,7 @@ v8_source_set("wasm_names_section_fuzzer") { deps = [ ":fuzzer_support", - ":lib_wasm_section_fuzzer", + ":lib_wasm_fuzzer_common", ":wasm_module_runner", ] @@ -3012,7 +3187,7 @@ v8_source_set("wasm_globals_section_fuzzer") { deps = [ ":fuzzer_support", - ":lib_wasm_section_fuzzer", + ":lib_wasm_fuzzer_common", ":wasm_module_runner", ] @@ -3032,7 +3207,7 @@ v8_source_set("wasm_imports_section_fuzzer") { deps = [ ":fuzzer_support", - ":lib_wasm_section_fuzzer", + ":lib_wasm_fuzzer_common", ":wasm_module_runner", ] @@ -3052,7 +3227,7 @@ v8_source_set("wasm_function_sigs_section_fuzzer") { deps = [ ":fuzzer_support", - ":lib_wasm_section_fuzzer", + ":lib_wasm_fuzzer_common", ":wasm_module_runner", ] @@ -3072,7 +3247,7 @@ v8_source_set("wasm_memory_section_fuzzer") { deps = [ ":fuzzer_support", - ":lib_wasm_section_fuzzer", + ":lib_wasm_fuzzer_common", ":wasm_module_runner", ] @@ -3092,7 +3267,7 @@ v8_source_set("wasm_data_section_fuzzer") { deps = [ ":fuzzer_support", - ":lib_wasm_section_fuzzer", + ":lib_wasm_fuzzer_common", ":wasm_module_runner", ] @@ -3107,13 +3282,14 @@ v8_fuzzer("wasm_data_section_fuzzer") { v8_source_set("wasm_compile_fuzzer") { sources = [ + "test/common/wasm/test-signatures.h", "test/fuzzer/wasm-compile.cc", ] deps = [ ":fuzzer_support", + ":lib_wasm_fuzzer_common", ":wasm_module_runner", - ":wasm_test_signatures", ] configs = [ diff --git a/deps/v8/ChangeLog b/deps/v8/ChangeLog index f3cd421bca11ac..7ee1b37e798c5c 100644 --- a/deps/v8/ChangeLog +++ b/deps/v8/ChangeLog @@ -1,3 +1,2638 @@ +2017-05-20: Version 6.0.286 + + Performance and stability improvements on all platforms. + + +2017-05-19: Version 6.0.285 + + Performance and stability improvements on all platforms. + + +2017-05-19: Version 6.0.284 + + Performance and stability improvements on all platforms. + + +2017-05-19: Version 6.0.283 + + Performance and stability improvements on all platforms. + + +2017-05-19: Version 6.0.282 + + Performance and stability improvements on all platforms. + + +2017-05-19: Version 6.0.281 + + Performance and stability improvements on all platforms. + + +2017-05-19: Version 6.0.280 + + Performance and stability improvements on all platforms. + + +2017-05-19: Version 6.0.279 + + Performance and stability improvements on all platforms. + + +2017-05-19: Version 6.0.278 + + Performance and stability improvements on all platforms. + + +2017-05-19: Version 6.0.277 + + Performance and stability improvements on all platforms. + + +2017-05-19: Version 6.0.276 + + Performance and stability improvements on all platforms. + + +2017-05-19: Version 6.0.275 + + Performance and stability improvements on all platforms. + + +2017-05-19: Version 6.0.274 + + Performance and stability improvements on all platforms. + + +2017-05-19: Version 6.0.273 + + Performance and stability improvements on all platforms. + + +2017-05-19: Version 6.0.272 + + Performance and stability improvements on all platforms. + + +2017-05-19: Version 6.0.271 + + Performance and stability improvements on all platforms. + + +2017-05-18: Version 6.0.270 + + Performance and stability improvements on all platforms. + + +2017-05-18: Version 6.0.269 + + Performance and stability improvements on all platforms. + + +2017-05-18: Version 6.0.268 + + Performance and stability improvements on all platforms. + + +2017-05-18: Version 6.0.267 + + Performance and stability improvements on all platforms. + + +2017-05-18: Version 6.0.266 + + Performance and stability improvements on all platforms. + + +2017-05-18: Version 6.0.265 + + Performance and stability improvements on all platforms. + + +2017-05-18: Version 6.0.264 + + Performance and stability improvements on all platforms. + + +2017-05-18: Version 6.0.263 + + Performance and stability improvements on all platforms. + + +2017-05-18: Version 6.0.262 + + Performance and stability improvements on all platforms. + + +2017-05-18: Version 6.0.261 + + Performance and stability improvements on all platforms. + + +2017-05-18: Version 6.0.260 + + Performance and stability improvements on all platforms. + + +2017-05-18: Version 6.0.259 + + Performance and stability improvements on all platforms. + + +2017-05-18: Version 6.0.258 + + Performance and stability improvements on all platforms. + + +2017-05-18: Version 6.0.257 + + Performance and stability improvements on all platforms. + + +2017-05-18: Version 6.0.256 + + Performance and stability improvements on all platforms. + + +2017-05-18: Version 6.0.255 + + Performance and stability improvements on all platforms. + + +2017-05-18: Version 6.0.254 + + Performance and stability improvements on all platforms. + + +2017-05-17: Version 6.0.253 + + Performance and stability improvements on all platforms. + + +2017-05-17: Version 6.0.252 + + Performance and stability improvements on all platforms. + + +2017-05-17: Version 6.0.251 + + Performance and stability improvements on all platforms. + + +2017-05-17: Version 6.0.250 + + Performance and stability improvements on all platforms. + + +2017-05-17: Version 6.0.249 + + Performance and stability improvements on all platforms. + + +2017-05-17: Version 6.0.248 + + Performance and stability improvements on all platforms. + + +2017-05-17: Version 6.0.247 + + Performance and stability improvements on all platforms. + + +2017-05-17: Version 6.0.246 + + Performance and stability improvements on all platforms. + + +2017-05-17: Version 6.0.245 + + Performance and stability improvements on all platforms. + + +2017-05-17: Version 6.0.244 + + Performance and stability improvements on all platforms. + + +2017-05-17: Version 6.0.243 + + Performance and stability improvements on all platforms. + + +2017-05-17: Version 6.0.242 + + Performance and stability improvements on all platforms. + + +2017-05-17: Version 6.0.241 + + Performance and stability improvements on all platforms. + + +2017-05-17: Version 6.0.240 + + Performance and stability improvements on all platforms. + + +2017-05-16: Version 6.0.239 + + Performance and stability improvements on all platforms. + + +2017-05-16: Version 6.0.238 + + Performance and stability improvements on all platforms. + + +2017-05-16: Version 6.0.237 + + Performance and stability improvements on all platforms. + + +2017-05-16: Version 6.0.236 + + Performance and stability improvements on all platforms. + + +2017-05-16: Version 6.0.235 + + Performance and stability improvements on all platforms. + + +2017-05-16: Version 6.0.234 + + Performance and stability improvements on all platforms. + + +2017-05-16: Version 6.0.233 + + Performance and stability improvements on all platforms. + + +2017-05-16: Version 6.0.232 + + Performance and stability improvements on all platforms. + + +2017-05-16: Version 6.0.231 + + Performance and stability improvements on all platforms. + + +2017-05-16: Version 6.0.230 + + Performance and stability improvements on all platforms. + + +2017-05-16: Version 6.0.229 + + Performance and stability improvements on all platforms. + + +2017-05-16: Version 6.0.228 + + Performance and stability improvements on all platforms. + + +2017-05-16: Version 6.0.227 + + Performance and stability improvements on all platforms. + + +2017-05-15: Version 6.0.226 + + Performance and stability improvements on all platforms. + + +2017-05-15: Version 6.0.225 + + Performance and stability improvements on all platforms. + + +2017-05-15: Version 6.0.224 + + Performance and stability improvements on all platforms. + + +2017-05-15: Version 6.0.223 + + Performance and stability improvements on all platforms. + + +2017-05-15: Version 6.0.222 + + Performance and stability improvements on all platforms. + + +2017-05-15: Version 6.0.221 + + Performance and stability improvements on all platforms. + + +2017-05-15: Version 6.0.220 + + Performance and stability improvements on all platforms. + + +2017-05-15: Version 6.0.219 + + Performance and stability improvements on all platforms. + + +2017-05-15: Version 6.0.218 + + Performance and stability improvements on all platforms. + + +2017-05-15: Version 6.0.217 + + Performance and stability improvements on all platforms. + + +2017-05-15: Version 6.0.216 + + Performance and stability improvements on all platforms. + + +2017-05-15: Version 6.0.215 + + Performance and stability improvements on all platforms. + + +2017-05-15: Version 6.0.214 + + Performance and stability improvements on all platforms. + + +2017-05-15: Version 6.0.213 + + Performance and stability improvements on all platforms. + + +2017-05-15: Version 6.0.212 + + Performance and stability improvements on all platforms. + + +2017-05-15: Version 6.0.211 + + Performance and stability improvements on all platforms. + + +2017-05-15: Version 6.0.210 + + Performance and stability improvements on all platforms. + + +2017-05-15: Version 6.0.209 + + Performance and stability improvements on all platforms. + + +2017-05-15: Version 6.0.208 + + Performance and stability improvements on all platforms. + + +2017-05-15: Version 6.0.207 + + Performance and stability improvements on all platforms. + + +2017-05-14: Version 6.0.206 + + Performance and stability improvements on all platforms. + + +2017-05-13: Version 6.0.205 + + Performance and stability improvements on all platforms. + + +2017-05-12: Version 6.0.204 + + Performance and stability improvements on all platforms. + + +2017-05-12: Version 6.0.203 + + Performance and stability improvements on all platforms. + + +2017-05-12: Version 6.0.202 + + Performance and stability improvements on all platforms. + + +2017-05-12: Version 6.0.201 + + Performance and stability improvements on all platforms. + + +2017-05-12: Version 6.0.200 + + Performance and stability improvements on all platforms. + + +2017-05-12: Version 6.0.199 + + Performance and stability improvements on all platforms. + + +2017-05-12: Version 6.0.198 + + Performance and stability improvements on all platforms. + + +2017-05-11: Version 6.0.197 + + Performance and stability improvements on all platforms. + + +2017-05-11: Version 6.0.196 + + Performance and stability improvements on all platforms. + + +2017-05-11: Version 6.0.195 + + Performance and stability improvements on all platforms. + + +2017-05-11: Version 6.0.194 + + Performance and stability improvements on all platforms. + + +2017-05-11: Version 6.0.193 + + Performance and stability improvements on all platforms. + + +2017-05-10: Version 6.0.192 + + Performance and stability improvements on all platforms. + + +2017-05-10: Version 6.0.191 + + Performance and stability improvements on all platforms. + + +2017-05-10: Version 6.0.190 + + Performance and stability improvements on all platforms. + + +2017-05-10: Version 6.0.189 + + Performance and stability improvements on all platforms. + + +2017-05-10: Version 6.0.188 + + Performance and stability improvements on all platforms. + + +2017-05-09: Version 6.0.187 + + Performance and stability improvements on all platforms. + + +2017-05-08: Version 6.0.186 + + Performance and stability improvements on all platforms. + + +2017-05-08: Version 6.0.185 + + Performance and stability improvements on all platforms. + + +2017-05-08: Version 6.0.184 + + Performance and stability improvements on all platforms. + + +2017-05-08: Version 6.0.183 + + Performance and stability improvements on all platforms. + + +2017-05-08: Version 6.0.182 + + Performance and stability improvements on all platforms. + + +2017-05-08: Version 6.0.181 + + Performance and stability improvements on all platforms. + + +2017-05-08: Version 6.0.180 + + Performance and stability improvements on all platforms. + + +2017-05-08: Version 6.0.179 + + Performance and stability improvements on all platforms. + + +2017-05-08: Version 6.0.178 + + Performance and stability improvements on all platforms. + + +2017-05-06: Version 6.0.177 + + Performance and stability improvements on all platforms. + + +2017-05-06: Version 6.0.176 + + Performance and stability improvements on all platforms. + + +2017-05-06: Version 6.0.175 + + Performance and stability improvements on all platforms. + + +2017-05-05: Version 6.0.174 + + Performance and stability improvements on all platforms. + + +2017-05-05: Version 6.0.173 + + Performance and stability improvements on all platforms. + + +2017-05-05: Version 6.0.172 + + Performance and stability improvements on all platforms. + + +2017-05-05: Version 6.0.171 + + Performance and stability improvements on all platforms. + + +2017-05-05: Version 6.0.170 + + Performance and stability improvements on all platforms. + + +2017-05-05: Version 6.0.169 + + Performance and stability improvements on all platforms. + + +2017-05-05: Version 6.0.168 + + Performance and stability improvements on all platforms. + + +2017-05-05: Version 6.0.167 + + Performance and stability improvements on all platforms. + + +2017-05-05: Version 6.0.166 + + Performance and stability improvements on all platforms. + + +2017-05-05: Version 6.0.165 + + Performance and stability improvements on all platforms. + + +2017-05-05: Version 6.0.164 + + Performance and stability improvements on all platforms. + + +2017-05-05: Version 6.0.163 + + Performance and stability improvements on all platforms. + + +2017-05-05: Version 6.0.162 + + Performance and stability improvements on all platforms. + + +2017-05-05: Version 6.0.161 + + Performance and stability improvements on all platforms. + + +2017-05-05: Version 6.0.160 + + Performance and stability improvements on all platforms. + + +2017-05-05: Version 6.0.159 + + Performance and stability improvements on all platforms. + + +2017-05-05: Version 6.0.158 + + Performance and stability improvements on all platforms. + + +2017-05-05: Version 6.0.157 + + Performance and stability improvements on all platforms. + + +2017-05-04: Version 6.0.156 + + Performance and stability improvements on all platforms. + + +2017-05-04: Version 6.0.155 + + Performance and stability improvements on all platforms. + + +2017-05-04: Version 6.0.154 + + Performance and stability improvements on all platforms. + + +2017-05-04: Version 6.0.153 + + Performance and stability improvements on all platforms. + + +2017-05-04: Version 6.0.152 + + Performance and stability improvements on all platforms. + + +2017-05-04: Version 6.0.151 + + Performance and stability improvements on all platforms. + + +2017-05-03: Version 6.0.150 + + Performance and stability improvements on all platforms. + + +2017-05-03: Version 6.0.149 + + Performance and stability improvements on all platforms. + + +2017-05-03: Version 6.0.148 + + Performance and stability improvements on all platforms. + + +2017-05-03: Version 6.0.147 + + Performance and stability improvements on all platforms. + + +2017-05-03: Version 6.0.146 + + Performance and stability improvements on all platforms. + + +2017-05-03: Version 6.0.145 + + Performance and stability improvements on all platforms. + + +2017-05-03: Version 6.0.144 + + Performance and stability improvements on all platforms. + + +2017-05-03: Version 6.0.143 + + Performance and stability improvements on all platforms. + + +2017-05-03: Version 6.0.142 + + Performance and stability improvements on all platforms. + + +2017-05-02: Version 6.0.141 + + Performance and stability improvements on all platforms. + + +2017-05-02: Version 6.0.140 + + Performance and stability improvements on all platforms. + + +2017-05-02: Version 6.0.139 + + Performance and stability improvements on all platforms. + + +2017-05-02: Version 6.0.138 + + Performance and stability improvements on all platforms. + + +2017-05-02: Version 6.0.137 + + Performance and stability improvements on all platforms. + + +2017-05-02: Version 6.0.136 + + Performance and stability improvements on all platforms. + + +2017-05-02: Version 6.0.135 + + Performance and stability improvements on all platforms. + + +2017-05-02: Version 6.0.134 + + Performance and stability improvements on all platforms. + + +2017-05-02: Version 6.0.133 + + Performance and stability improvements on all platforms. + + +2017-05-02: Version 6.0.132 + + Performance and stability improvements on all platforms. + + +2017-05-02: Version 6.0.131 + + Performance and stability improvements on all platforms. + + +2017-05-02: Version 6.0.130 + + Performance and stability improvements on all platforms. + + +2017-05-01: Version 6.0.129 + + Performance and stability improvements on all platforms. + + +2017-05-01: Version 6.0.128 + + Performance and stability improvements on all platforms. + + +2017-05-01: Version 6.0.127 + + Performance and stability improvements on all platforms. + + +2017-05-01: Version 6.0.126 + + Performance and stability improvements on all platforms. + + +2017-04-30: Version 6.0.125 + + Performance and stability improvements on all platforms. + + +2017-04-30: Version 6.0.124 + + Performance and stability improvements on all platforms. + + +2017-04-29: Version 6.0.123 + + Performance and stability improvements on all platforms. + + +2017-04-29: Version 6.0.122 + + Performance and stability improvements on all platforms. + + +2017-04-29: Version 6.0.121 + + Performance and stability improvements on all platforms. + + +2017-04-29: Version 6.0.120 + + Performance and stability improvements on all platforms. + + +2017-04-29: Version 6.0.119 + + Performance and stability improvements on all platforms. + + +2017-04-28: Version 6.0.118 + + Performance and stability improvements on all platforms. + + +2017-04-28: Version 6.0.117 + + Performance and stability improvements on all platforms. + + +2017-04-28: Version 6.0.116 + + Performance and stability improvements on all platforms. + + +2017-04-28: Version 6.0.115 + + Performance and stability improvements on all platforms. + + +2017-04-28: Version 6.0.114 + + Performance and stability improvements on all platforms. + + +2017-04-28: Version 6.0.113 + + Performance and stability improvements on all platforms. + + +2017-04-28: Version 6.0.112 + + Performance and stability improvements on all platforms. + + +2017-04-28: Version 6.0.111 + + Performance and stability improvements on all platforms. + + +2017-04-28: Version 6.0.110 + + Performance and stability improvements on all platforms. + + +2017-04-28: Version 6.0.109 + + Performance and stability improvements on all platforms. + + +2017-04-28: Version 6.0.108 + + Performance and stability improvements on all platforms. + + +2017-04-27: Version 6.0.107 + + Performance and stability improvements on all platforms. + + +2017-04-27: Version 6.0.106 + + Performance and stability improvements on all platforms. + + +2017-04-27: Version 6.0.105 + + Performance and stability improvements on all platforms. + + +2017-04-27: Version 6.0.104 + + Performance and stability improvements on all platforms. + + +2017-04-27: Version 6.0.103 + + Performance and stability improvements on all platforms. + + +2017-04-27: Version 6.0.102 + + Performance and stability improvements on all platforms. + + +2017-04-27: Version 6.0.101 + + Performance and stability improvements on all platforms. + + +2017-04-27: Version 6.0.100 + + Performance and stability improvements on all platforms. + + +2017-04-27: Version 6.0.99 + + Performance and stability improvements on all platforms. + + +2017-04-27: Version 6.0.98 + + Performance and stability improvements on all platforms. + + +2017-04-27: Version 6.0.97 + + Performance and stability improvements on all platforms. + + +2017-04-27: Version 6.0.96 + + Performance and stability improvements on all platforms. + + +2017-04-27: Version 6.0.95 + + Performance and stability improvements on all platforms. + + +2017-04-27: Version 6.0.94 + + Performance and stability improvements on all platforms. + + +2017-04-27: Version 6.0.93 + + Performance and stability improvements on all platforms. + + +2017-04-27: Version 6.0.92 + + Performance and stability improvements on all platforms. + + +2017-04-27: Version 6.0.91 + + Performance and stability improvements on all platforms. + + +2017-04-26: Version 6.0.90 + + Performance and stability improvements on all platforms. + + +2017-04-26: Version 6.0.89 + + Performance and stability improvements on all platforms. + + +2017-04-26: Version 6.0.88 + + Performance and stability improvements on all platforms. + + +2017-04-26: Version 6.0.87 + + Performance and stability improvements on all platforms. + + +2017-04-26: Version 6.0.86 + + Performance and stability improvements on all platforms. + + +2017-04-25: Version 6.0.85 + + Performance and stability improvements on all platforms. + + +2017-04-25: Version 6.0.84 + + Performance and stability improvements on all platforms. + + +2017-04-25: Version 6.0.83 + + Performance and stability improvements on all platforms. + + +2017-04-25: Version 6.0.82 + + Performance and stability improvements on all platforms. + + +2017-04-25: Version 6.0.81 + + Performance and stability improvements on all platforms. + + +2017-04-25: Version 6.0.80 + + Performance and stability improvements on all platforms. + + +2017-04-24: Version 6.0.79 + + Performance and stability improvements on all platforms. + + +2017-04-24: Version 6.0.78 + + Performance and stability improvements on all platforms. + + +2017-04-24: Version 6.0.77 + + Performance and stability improvements on all platforms. + + +2017-04-24: Version 6.0.76 + + Performance and stability improvements on all platforms. + + +2017-04-24: Version 6.0.75 + + Performance and stability improvements on all platforms. + + +2017-04-24: Version 6.0.74 + + Performance and stability improvements on all platforms. + + +2017-04-24: Version 6.0.73 + + Performance and stability improvements on all platforms. + + +2017-04-24: Version 6.0.72 + + Performance and stability improvements on all platforms. + + +2017-04-24: Version 6.0.71 + + Performance and stability improvements on all platforms. + + +2017-04-24: Version 6.0.70 + + Performance and stability improvements on all platforms. + + +2017-04-24: Version 6.0.69 + + Performance and stability improvements on all platforms. + + +2017-04-24: Version 6.0.68 + + Performance and stability improvements on all platforms. + + +2017-04-24: Version 6.0.67 + + Performance and stability improvements on all platforms. + + +2017-04-24: Version 6.0.66 + + Performance and stability improvements on all platforms. + + +2017-04-24: Version 6.0.65 + + Performance and stability improvements on all platforms. + + +2017-04-24: Version 6.0.64 + + Performance and stability improvements on all platforms. + + +2017-04-24: Version 6.0.63 + + Performance and stability improvements on all platforms. + + +2017-04-24: Version 6.0.62 + + Performance and stability improvements on all platforms. + + +2017-04-22: Version 6.0.61 + + Performance and stability improvements on all platforms. + + +2017-04-21: Version 6.0.60 + + Performance and stability improvements on all platforms. + + +2017-04-21: Version 6.0.59 + + Performance and stability improvements on all platforms. + + +2017-04-21: Version 6.0.58 + + Performance and stability improvements on all platforms. + + +2017-04-21: Version 6.0.57 + + Performance and stability improvements on all platforms. + + +2017-04-21: Version 6.0.56 + + Performance and stability improvements on all platforms. + + +2017-04-21: Version 6.0.55 + + Performance and stability improvements on all platforms. + + +2017-04-21: Version 6.0.54 + + Performance and stability improvements on all platforms. + + +2017-04-21: Version 6.0.53 + + Performance and stability improvements on all platforms. + + +2017-04-21: Version 6.0.52 + + Performance and stability improvements on all platforms. + + +2017-04-20: Version 6.0.51 + + Performance and stability improvements on all platforms. + + +2017-04-20: Version 6.0.50 + + Performance and stability improvements on all platforms. + + +2017-04-20: Version 6.0.49 + + Performance and stability improvements on all platforms. + + +2017-04-20: Version 6.0.48 + + Performance and stability improvements on all platforms. + + +2017-04-20: Version 6.0.47 + + Performance and stability improvements on all platforms. + + +2017-04-20: Version 6.0.46 + + Performance and stability improvements on all platforms. + + +2017-04-20: Version 6.0.45 + + Performance and stability improvements on all platforms. + + +2017-04-20: Version 6.0.44 + + Performance and stability improvements on all platforms. + + +2017-04-20: Version 6.0.43 + + Performance and stability improvements on all platforms. + + +2017-04-20: Version 6.0.42 + + Performance and stability improvements on all platforms. + + +2017-04-19: Version 6.0.41 + + Performance and stability improvements on all platforms. + + +2017-04-19: Version 6.0.40 + + Performance and stability improvements on all platforms. + + +2017-04-19: Version 6.0.39 + + Performance and stability improvements on all platforms. + + +2017-04-19: Version 6.0.38 + + Performance and stability improvements on all platforms. + + +2017-04-19: Version 6.0.37 + + Performance and stability improvements on all platforms. + + +2017-04-19: Version 6.0.36 + + Performance and stability improvements on all platforms. + + +2017-04-19: Version 6.0.35 + + Performance and stability improvements on all platforms. + + +2017-04-19: Version 6.0.34 + + Performance and stability improvements on all platforms. + + +2017-04-19: Version 6.0.33 + + Performance and stability improvements on all platforms. + + +2017-04-19: Version 6.0.32 + + Performance and stability improvements on all platforms. + + +2017-04-19: Version 6.0.31 + + Performance and stability improvements on all platforms. + + +2017-04-19: Version 6.0.30 + + Performance and stability improvements on all platforms. + + +2017-04-19: Version 6.0.29 + + Performance and stability improvements on all platforms. + + +2017-04-19: Version 6.0.28 + + Performance and stability improvements on all platforms. + + +2017-04-19: Version 6.0.27 + + Performance and stability improvements on all platforms. + + +2017-04-19: Version 6.0.26 + + Performance and stability improvements on all platforms. + + +2017-04-19: Version 6.0.25 + + Performance and stability improvements on all platforms. + + +2017-04-19: Version 6.0.24 + + Performance and stability improvements on all platforms. + + +2017-04-18: Version 6.0.23 + + Performance and stability improvements on all platforms. + + +2017-04-18: Version 6.0.22 + + Performance and stability improvements on all platforms. + + +2017-04-18: Version 6.0.21 + + Performance and stability improvements on all platforms. + + +2017-04-18: Version 6.0.20 + + Performance and stability improvements on all platforms. + + +2017-04-18: Version 6.0.19 + + Performance and stability improvements on all platforms. + + +2017-04-18: Version 6.0.18 + + Performance and stability improvements on all platforms. + + +2017-04-18: Version 6.0.17 + + Performance and stability improvements on all platforms. + + +2017-04-18: Version 6.0.16 + + Performance and stability improvements on all platforms. + + +2017-04-18: Version 6.0.15 + + Performance and stability improvements on all platforms. + + +2017-04-18: Version 6.0.14 + + Performance and stability improvements on all platforms. + + +2017-04-18: Version 6.0.13 + + Performance and stability improvements on all platforms. + + +2017-04-18: Version 6.0.12 + + Performance and stability improvements on all platforms. + + +2017-04-18: Version 6.0.11 + + Performance and stability improvements on all platforms. + + +2017-04-17: Version 6.0.10 + + Performance and stability improvements on all platforms. + + +2017-04-17: Version 6.0.9 + + Performance and stability improvements on all platforms. + + +2017-04-17: Version 6.0.8 + + Performance and stability improvements on all platforms. + + +2017-04-17: Version 6.0.7 + + Performance and stability improvements on all platforms. + + +2017-04-17: Version 6.0.6 + + Performance and stability improvements on all platforms. + + +2017-04-17: Version 6.0.5 + + Performance and stability improvements on all platforms. + + +2017-04-16: Version 6.0.4 + + Performance and stability improvements on all platforms. + + +2017-04-15: Version 6.0.3 + + Performance and stability improvements on all platforms. + + +2017-04-15: Version 6.0.2 + + Performance and stability improvements on all platforms. + + +2017-04-14: Version 6.0.1 + + Performance and stability improvements on all platforms. + + +2017-04-13: Version 5.9.223 + + Performance and stability improvements on all platforms. + + +2017-04-13: Version 5.9.222 + + Performance and stability improvements on all platforms. + + +2017-04-13: Version 5.9.221 + + Performance and stability improvements on all platforms. + + +2017-04-12: Version 5.9.220 + + Performance and stability improvements on all platforms. + + +2017-04-12: Version 5.9.219 + + Performance and stability improvements on all platforms. + + +2017-04-12: Version 5.9.218 + + Performance and stability improvements on all platforms. + + +2017-04-12: Version 5.9.217 + + Performance and stability improvements on all platforms. + + +2017-04-12: Version 5.9.216 + + Performance and stability improvements on all platforms. + + +2017-04-12: Version 5.9.215 + + Performance and stability improvements on all platforms. + + +2017-04-12: Version 5.9.214 + + Performance and stability improvements on all platforms. + + +2017-04-12: Version 5.9.213 + + Performance and stability improvements on all platforms. + + +2017-04-11: Version 5.9.212 + + Performance and stability improvements on all platforms. + + +2017-04-11: Version 5.9.211 + + Performance and stability improvements on all platforms. + + +2017-04-11: Version 5.9.210 + + Performance and stability improvements on all platforms. + + +2017-04-11: Version 5.9.209 + + Performance and stability improvements on all platforms. + + +2017-04-11: Version 5.9.208 + + Performance and stability improvements on all platforms. + + +2017-04-11: Version 5.9.207 + + Performance and stability improvements on all platforms. + + +2017-04-11: Version 5.9.206 + + Performance and stability improvements on all platforms. + + +2017-04-11: Version 5.9.205 + + Performance and stability improvements on all platforms. + + +2017-04-11: Version 5.9.204 + + Performance and stability improvements on all platforms. + + +2017-04-11: Version 5.9.203 + + Performance and stability improvements on all platforms. + + +2017-04-10: Version 5.9.202 + + Performance and stability improvements on all platforms. + + +2017-04-10: Version 5.9.201 + + Performance and stability improvements on all platforms. + + +2017-04-10: Version 5.9.200 + + Performance and stability improvements on all platforms. + + +2017-04-10: Version 5.9.199 + + Performance and stability improvements on all platforms. + + +2017-04-10: Version 5.9.198 + + Performance and stability improvements on all platforms. + + +2017-04-10: Version 5.9.197 + + Performance and stability improvements on all platforms. + + +2017-04-09: Version 5.9.196 + + Performance and stability improvements on all platforms. + + +2017-04-08: Version 5.9.195 + + Performance and stability improvements on all platforms. + + +2017-04-07: Version 5.9.194 + + Performance and stability improvements on all platforms. + + +2017-04-07: Version 5.9.193 + + Performance and stability improvements on all platforms. + + +2017-04-07: Version 5.9.192 + + Performance and stability improvements on all platforms. + + +2017-04-07: Version 5.9.191 + + Performance and stability improvements on all platforms. + + +2017-04-07: Version 5.9.190 + + Performance and stability improvements on all platforms. + + +2017-04-07: Version 5.9.189 + + Performance and stability improvements on all platforms. + + +2017-04-07: Version 5.9.188 + + Performance and stability improvements on all platforms. + + +2017-04-06: Version 5.9.187 + + Performance and stability improvements on all platforms. + + +2017-04-06: Version 5.9.186 + + Performance and stability improvements on all platforms. + + +2017-04-06: Version 5.9.185 + + Performance and stability improvements on all platforms. + + +2017-04-06: Version 5.9.184 + + Performance and stability improvements on all platforms. + + +2017-04-06: Version 5.9.183 + + Performance and stability improvements on all platforms. + + +2017-04-06: Version 5.9.182 + + Performance and stability improvements on all platforms. + + +2017-04-06: Version 5.9.181 + + Performance and stability improvements on all platforms. + + +2017-04-06: Version 5.9.180 + + Performance and stability improvements on all platforms. + + +2017-04-06: Version 5.9.179 + + Performance and stability improvements on all platforms. + + +2017-04-06: Version 5.9.178 + + Performance and stability improvements on all platforms. + + +2017-04-06: Version 5.9.177 + + Performance and stability improvements on all platforms. + + +2017-04-05: Version 5.9.176 + + Performance and stability improvements on all platforms. + + +2017-04-06: Version 5.9.175 + + Performance and stability improvements on all platforms. + + +2017-04-05: Version 5.9.174 + + Performance and stability improvements on all platforms. + + +2017-04-05: Version 5.9.173 + + Performance and stability improvements on all platforms. + + +2017-04-05: Version 5.9.172 + + Performance and stability improvements on all platforms. + + +2017-04-05: Version 5.9.171 + + Performance and stability improvements on all platforms. + + +2017-04-05: Version 5.9.170 + + Performance and stability improvements on all platforms. + + +2017-04-05: Version 5.9.169 + + Performance and stability improvements on all platforms. + + +2017-04-05: Version 5.9.168 + + Performance and stability improvements on all platforms. + + +2017-04-05: Version 5.9.167 + + Performance and stability improvements on all platforms. + + +2017-04-05: Version 5.9.166 + + Performance and stability improvements on all platforms. + + +2017-04-04: Version 5.9.165 + + Performance and stability improvements on all platforms. + + +2017-04-04: Version 5.9.164 + + Performance and stability improvements on all platforms. + + +2017-04-04: Version 5.9.163 + + Performance and stability improvements on all platforms. + + +2017-04-04: Version 5.9.162 + + Performance and stability improvements on all platforms. + + +2017-04-04: Version 5.9.161 + + Performance and stability improvements on all platforms. + + +2017-04-03: Version 5.9.160 + + Performance and stability improvements on all platforms. + + +2017-04-03: Version 5.9.159 + + Performance and stability improvements on all platforms. + + +2017-04-03: Version 5.9.158 + + Performance and stability improvements on all platforms. + + +2017-04-03: Version 5.9.157 + + Performance and stability improvements on all platforms. + + +2017-04-03: Version 5.9.156 + + Performance and stability improvements on all platforms. + + +2017-04-03: Version 5.9.155 + + Performance and stability improvements on all platforms. + + +2017-04-01: Version 5.9.154 + + Performance and stability improvements on all platforms. + + +2017-03-31: Version 5.9.153 + + Performance and stability improvements on all platforms. + + +2017-03-31: Version 5.9.152 + + Performance and stability improvements on all platforms. + + +2017-03-31: Version 5.9.151 + + Performance and stability improvements on all platforms. + + +2017-03-31: Version 5.9.150 + + Performance and stability improvements on all platforms. + + +2017-03-31: Version 5.9.149 + + Performance and stability improvements on all platforms. + + +2017-03-31: Version 5.9.148 + + Performance and stability improvements on all platforms. + + +2017-03-31: Version 5.9.147 + + Performance and stability improvements on all platforms. + + +2017-03-31: Version 5.9.146 + + Performance and stability improvements on all platforms. + + +2017-03-31: Version 5.9.145 + + Performance and stability improvements on all platforms. + + +2017-03-31: Version 5.9.144 + + Performance and stability improvements on all platforms. + + +2017-03-31: Version 5.9.143 + + Performance and stability improvements on all platforms. + + +2017-03-30: Version 5.9.142 + + Performance and stability improvements on all platforms. + + +2017-03-30: Version 5.9.141 + + Performance and stability improvements on all platforms. + + +2017-03-30: Version 5.9.140 + + Performance and stability improvements on all platforms. + + +2017-03-30: Version 5.9.139 + + Performance and stability improvements on all platforms. + + +2017-03-29: Version 5.9.138 + + Performance and stability improvements on all platforms. + + +2017-03-29: Version 5.9.137 + + Performance and stability improvements on all platforms. + + +2017-03-29: Version 5.9.136 + + Performance and stability improvements on all platforms. + + +2017-03-29: Version 5.9.135 + + Performance and stability improvements on all platforms. + + +2017-03-29: Version 5.9.134 + + Performance and stability improvements on all platforms. + + +2017-03-29: Version 5.9.133 + + Performance and stability improvements on all platforms. + + +2017-03-29: Version 5.9.132 + + Performance and stability improvements on all platforms. + + +2017-03-29: Version 5.9.131 + + Performance and stability improvements on all platforms. + + +2017-03-29: Version 5.9.130 + + Performance and stability improvements on all platforms. + + +2017-03-29: Version 5.9.129 + + Performance and stability improvements on all platforms. + + +2017-03-29: Version 5.9.128 + + Performance and stability improvements on all platforms. + + +2017-03-28: Version 5.9.127 + + Performance and stability improvements on all platforms. + + +2017-03-28: Version 5.9.126 + + Performance and stability improvements on all platforms. + + +2017-03-28: Version 5.9.125 + + Performance and stability improvements on all platforms. + + +2017-03-28: Version 5.9.124 + + Performance and stability improvements on all platforms. + + +2017-03-28: Version 5.9.123 + + Performance and stability improvements on all platforms. + + +2017-03-28: Version 5.9.122 + + Performance and stability improvements on all platforms. + + +2017-03-28: Version 5.9.121 + + Performance and stability improvements on all platforms. + + +2017-03-28: Version 5.9.120 + + Performance and stability improvements on all platforms. + + +2017-03-28: Version 5.9.119 + + Performance and stability improvements on all platforms. + + +2017-03-28: Version 5.9.118 + + Performance and stability improvements on all platforms. + + +2017-03-28: Version 5.9.117 + + Performance and stability improvements on all platforms. + + +2017-03-28: Version 5.9.116 + + Performance and stability improvements on all platforms. + + +2017-03-28: Version 5.9.115 + + Performance and stability improvements on all platforms. + + +2017-03-28: Version 5.9.114 + + Performance and stability improvements on all platforms. + + +2017-03-28: Version 5.9.113 + + Performance and stability improvements on all platforms. + + +2017-03-28: Version 5.9.112 + + Performance and stability improvements on all platforms. + + +2017-03-28: Version 5.9.111 + + Performance and stability improvements on all platforms. + + +2017-03-28: Version 5.9.110 + + Performance and stability improvements on all platforms. + + +2017-03-27: Version 5.9.109 + + Performance and stability improvements on all platforms. + + +2017-03-27: Version 5.9.108 + + Performance and stability improvements on all platforms. + + +2017-03-27: Version 5.9.107 + + Performance and stability improvements on all platforms. + + +2017-03-27: Version 5.9.106 + + Performance and stability improvements on all platforms. + + +2017-03-27: Version 5.9.105 + + Performance and stability improvements on all platforms. + + +2017-03-27: Version 5.9.104 + + Performance and stability improvements on all platforms. + + +2017-03-27: Version 5.9.103 + + Performance and stability improvements on all platforms. + + +2017-03-27: Version 5.9.102 + + Performance and stability improvements on all platforms. + + +2017-03-27: Version 5.9.101 + + Performance and stability improvements on all platforms. + + +2017-03-27: Version 5.9.100 + + Performance and stability improvements on all platforms. + + +2017-03-27: Version 5.9.99 + + Performance and stability improvements on all platforms. + + +2017-03-26: Version 5.9.98 + + Performance and stability improvements on all platforms. + + +2017-03-24: Version 5.9.97 + + Performance and stability improvements on all platforms. + + +2017-03-24: Version 5.9.96 + + Performance and stability improvements on all platforms. + + +2017-03-24: Version 5.9.95 + + Performance and stability improvements on all platforms. + + +2017-03-24: Version 5.9.94 + + Performance and stability improvements on all platforms. + + +2017-03-24: Version 5.9.93 + + Performance and stability improvements on all platforms. + + +2017-03-24: Version 5.9.92 + + Performance and stability improvements on all platforms. + + +2017-03-24: Version 5.9.91 + + Performance and stability improvements on all platforms. + + +2017-03-23: Version 5.9.90 + + Performance and stability improvements on all platforms. + + +2017-03-23: Version 5.9.89 + + Performance and stability improvements on all platforms. + + +2017-03-23: Version 5.9.88 + + Performance and stability improvements on all platforms. + + +2017-03-23: Version 5.9.87 + + Performance and stability improvements on all platforms. + + +2017-03-23: Version 5.9.86 + + Performance and stability improvements on all platforms. + + +2017-03-23: Version 5.9.85 + + Performance and stability improvements on all platforms. + + +2017-03-23: Version 5.9.84 + + Performance and stability improvements on all platforms. + + +2017-03-23: Version 5.9.83 + + Performance and stability improvements on all platforms. + + +2017-03-23: Version 5.9.82 + + Performance and stability improvements on all platforms. + + +2017-03-23: Version 5.9.81 + + Performance and stability improvements on all platforms. + + +2017-03-22: Version 5.9.80 + + Performance and stability improvements on all platforms. + + +2017-03-22: Version 5.9.79 + + Performance and stability improvements on all platforms. + + +2017-03-22: Version 5.9.78 + + Performance and stability improvements on all platforms. + + +2017-03-22: Version 5.9.77 + + Performance and stability improvements on all platforms. + + +2017-03-22: Version 5.9.76 + + Performance and stability improvements on all platforms. + + +2017-03-22: Version 5.9.75 + + Performance and stability improvements on all platforms. + + +2017-03-22: Version 5.9.74 + + Performance and stability improvements on all platforms. + + +2017-03-22: Version 5.9.73 + + Performance and stability improvements on all platforms. + + +2017-03-22: Version 5.9.72 + + Performance and stability improvements on all platforms. + + +2017-03-22: Version 5.9.71 + + Performance and stability improvements on all platforms. + + +2017-03-22: Version 5.9.70 + + Performance and stability improvements on all platforms. + + +2017-03-22: Version 5.9.69 + + Performance and stability improvements on all platforms. + + +2017-03-22: Version 5.9.68 + + Performance and stability improvements on all platforms. + + +2017-03-21: Version 5.9.67 + + Performance and stability improvements on all platforms. + + +2017-03-21: Version 5.9.66 + + Performance and stability improvements on all platforms. + + +2017-03-21: Version 5.9.65 + + Performance and stability improvements on all platforms. + + +2017-03-21: Version 5.9.64 + + Performance and stability improvements on all platforms. + + +2017-03-21: Version 5.9.63 + + Performance and stability improvements on all platforms. + + +2017-03-21: Version 5.9.62 + + Performance and stability improvements on all platforms. + + +2017-03-20: Version 5.9.61 + + Performance and stability improvements on all platforms. + + +2017-03-20: Version 5.9.60 + + Performance and stability improvements on all platforms. + + +2017-03-20: Version 5.9.59 + + Performance and stability improvements on all platforms. + + +2017-03-20: Version 5.9.58 + + Performance and stability improvements on all platforms. + + +2017-03-17: Version 5.9.57 + + Performance and stability improvements on all platforms. + + +2017-03-17: Version 5.9.56 + + Performance and stability improvements on all platforms. + + +2017-03-17: Version 5.9.55 + + Performance and stability improvements on all platforms. + + +2017-03-17: Version 5.9.54 + + Performance and stability improvements on all platforms. + + +2017-03-17: Version 5.9.53 + + Performance and stability improvements on all platforms. + + +2017-03-17: Version 5.9.52 + + Performance and stability improvements on all platforms. + + +2017-03-16: Version 5.9.51 + + Performance and stability improvements on all platforms. + + +2017-03-14: Version 5.9.50 + + Performance and stability improvements on all platforms. + + +2017-03-14: Version 5.9.49 + + Performance and stability improvements on all platforms. + + +2017-03-14: Version 5.9.48 + + Performance and stability improvements on all platforms. + + +2017-03-14: Version 5.9.47 + + Performance and stability improvements on all platforms. + + +2017-03-14: Version 5.9.46 + + Performance and stability improvements on all platforms. + + +2017-03-14: Version 5.9.45 + + Performance and stability improvements on all platforms. + + +2017-03-14: Version 5.9.44 + + Performance and stability improvements on all platforms. + + +2017-03-14: Version 5.9.43 + + Performance and stability improvements on all platforms. + + +2017-03-14: Version 5.9.42 + + Performance and stability improvements on all platforms. + + +2017-03-14: Version 5.9.41 + + Performance and stability improvements on all platforms. + + +2017-03-14: Version 5.9.40 + + Performance and stability improvements on all platforms. + + +2017-03-13: Version 5.9.39 + + Performance and stability improvements on all platforms. + + +2017-03-13: Version 5.9.38 + + Performance and stability improvements on all platforms. + + +2017-03-13: Version 5.9.37 + + Performance and stability improvements on all platforms. + + +2017-03-13: Version 5.9.36 + + Performance and stability improvements on all platforms. + + +2017-03-10: Version 5.9.35 + + Performance and stability improvements on all platforms. + + +2017-03-08: Version 5.9.34 + + Performance and stability improvements on all platforms. + + +2017-03-08: Version 5.9.33 + + Performance and stability improvements on all platforms. + + +2017-03-08: Version 5.9.32 + + Performance and stability improvements on all platforms. + + +2017-03-08: Version 5.9.31 + + Performance and stability improvements on all platforms. + + +2017-03-08: Version 5.9.30 + + Performance and stability improvements on all platforms. + + +2017-03-08: Version 5.9.29 + + Performance and stability improvements on all platforms. + + +2017-03-08: Version 5.9.28 + + Performance and stability improvements on all platforms. + + +2017-03-07: Version 5.9.27 + + Performance and stability improvements on all platforms. + + +2017-03-07: Version 5.9.26 + + Performance and stability improvements on all platforms. + + +2017-03-07: Version 5.9.25 + + Performance and stability improvements on all platforms. + + +2017-03-07: Version 5.9.24 + + Performance and stability improvements on all platforms. + + +2017-03-07: Version 5.9.23 + + Performance and stability improvements on all platforms. + + +2017-03-07: Version 5.9.22 + + Performance and stability improvements on all platforms. + + +2017-03-07: Version 5.9.21 + + Performance and stability improvements on all platforms. + + +2017-03-07: Version 5.9.20 + + Performance and stability improvements on all platforms. + + +2017-03-07: Version 5.9.19 + + Performance and stability improvements on all platforms. + + +2017-03-07: Version 5.9.18 + + Performance and stability improvements on all platforms. + + +2017-03-07: Version 5.9.17 + + Performance and stability improvements on all platforms. + + +2017-03-07: Version 5.9.16 + + Performance and stability improvements on all platforms. + + +2017-03-07: Version 5.9.15 + + Performance and stability improvements on all platforms. + + +2017-03-07: Version 5.9.14 + + Performance and stability improvements on all platforms. + + +2017-03-07: Version 5.9.13 + + Performance and stability improvements on all platforms. + + +2017-03-06: Version 5.9.12 + + Performance and stability improvements on all platforms. + + +2017-03-06: Version 5.9.11 + + Performance and stability improvements on all platforms. + + +2017-03-06: Version 5.9.10 + + Performance and stability improvements on all platforms. + + +2017-03-06: Version 5.9.9 + + Performance and stability improvements on all platforms. + + +2017-03-06: Version 5.9.8 + + Performance and stability improvements on all platforms. + + +2017-03-06: Version 5.9.7 + + Performance and stability improvements on all platforms. + + +2017-03-06: Version 5.9.6 + + Performance and stability improvements on all platforms. + + +2017-03-05: Version 5.9.5 + + Performance and stability improvements on all platforms. + + +2017-03-05: Version 5.9.4 + + Performance and stability improvements on all platforms. + + +2017-03-04: Version 5.9.3 + + Performance and stability improvements on all platforms. + + +2017-03-04: Version 5.9.2 + + Performance and stability improvements on all platforms. + + +2017-03-03: Version 5.9.1 + + Performance and stability improvements on all platforms. + + +2017-03-01: Version 5.8.301 + + Performance and stability improvements on all platforms. + + +2017-03-01: Version 5.8.300 + + Performance and stability improvements on all platforms. + + +2017-03-01: Version 5.8.299 + + Performance and stability improvements on all platforms. + + +2017-03-01: Version 5.8.298 + + Performance and stability improvements on all platforms. + + +2017-02-28: Version 5.8.297 + + Performance and stability improvements on all platforms. + + +2017-02-28: Version 5.8.296 + + Performance and stability improvements on all platforms. + + +2017-02-28: Version 5.8.295 + + Performance and stability improvements on all platforms. + + +2017-02-28: Version 5.8.294 + + Performance and stability improvements on all platforms. + + +2017-02-27: Version 5.8.293 + + Performance and stability improvements on all platforms. + + +2017-02-27: Version 5.8.292 + + Performance and stability improvements on all platforms. + + +2017-02-27: Version 5.8.291 + + Performance and stability improvements on all platforms. + + +2017-02-27: Version 5.8.290 + + Performance and stability improvements on all platforms. + + +2017-02-27: Version 5.8.289 + + Performance and stability improvements on all platforms. + + +2017-02-27: Version 5.8.288 + + Performance and stability improvements on all platforms. + + +2017-02-27: Version 5.8.287 + + Performance and stability improvements on all platforms. + + +2017-02-27: Version 5.8.286 + + Performance and stability improvements on all platforms. + + +2017-02-27: Version 5.8.285 + + Performance and stability improvements on all platforms. + + +2017-02-26: Version 5.8.284 + + Performance and stability improvements on all platforms. + + 2017-02-25: Version 5.8.283 Performance and stability improvements on all platforms. diff --git a/deps/v8/DEPS b/deps/v8/DEPS index f8e00855d4f3bd..1a55e663c6b17a 100644 --- a/deps/v8/DEPS +++ b/deps/v8/DEPS @@ -8,23 +8,23 @@ vars = { deps = { "v8/build": - Var("chromium_url") + "/chromium/src/build.git" + "@" + "c7c2db69cd571523ce728c4d3dceedbd1896b519", + Var("chromium_url") + "/chromium/src/build.git" + "@" + "1caf3a69f3b0379c9fef2493aa1b3cda96e17d7b", "v8/tools/gyp": - Var("chromium_url") + "/external/gyp.git" + "@" + "e7079f0e0e14108ab0dba58728ff219637458563", + Var("chromium_url") + "/external/gyp.git" + "@" + "eb296f67da078ec01f5e3a9ea9cdc6d26d680161", "v8/third_party/icu": - Var("chromium_url") + "/chromium/deps/icu.git" + "@" + "450be73c9ee8ae29d43d4fdc82febb2a5f62bfb5", + Var("chromium_url") + "/chromium/deps/icu.git" + "@" + "c844075aa0f1758d04f9192825f1b1e7e607992e", "v8/third_party/instrumented_libraries": - Var("chromium_url") + "/chromium/src/third_party/instrumented_libraries.git" + "@" + "5b6f777da671be977f56f0e8fc3469a3ccbb4474", + Var("chromium_url") + "/chromium/src/third_party/instrumented_libraries.git" + "@" + "644afd349826cb68204226a16c38bde13abe9c3c", "v8/buildtools": - Var("chromium_url") + "/chromium/buildtools.git" + "@" + "94cdccbebc7a634c27145a3d84089e85fbb42e69", + Var("chromium_url") + "/chromium/buildtools.git" + "@" + "98f00fa10dbad2cdbb2e297a66c3d6d5bc3994f3", "v8/base/trace_event/common": - Var("chromium_url") + "/chromium/src/base/trace_event/common.git" + "@" + "06294c8a4a6f744ef284cd63cfe54dbf61eea290", + Var("chromium_url") + "/chromium/src/base/trace_event/common.git" + "@" + "39a3450531fc73432e963db8668695d2e8f13053", "v8/third_party/jinja2": Var("chromium_url") + "/chromium/src/third_party/jinja2.git" + "@" + "d34383206fa42d52faa10bb9931d6d538f3a57e0", "v8/third_party/markupsafe": Var("chromium_url") + "/chromium/src/third_party/markupsafe.git" + "@" + "8f45f5cfa0009d2a70589bcda0349b8cb2b72783", "v8/tools/swarming_client": - Var('chromium_url') + '/external/swarming.client.git' + '@' + "11e31afa5d330756ff87aa12064bb5d032896cb5", + Var('chromium_url') + '/external/swarming.client.git' + '@' + "a941a089ff1000403078b74cb628eb430f07d271", "v8/testing/gtest": Var("chromium_url") + "/external/github.com/google/googletest.git" + "@" + "6f8a66431cb592dad629028a50b3dd418a408c87", "v8/testing/gmock": @@ -34,26 +34,22 @@ deps = { "v8/test/mozilla/data": Var("chromium_url") + "/v8/deps/third_party/mozilla-tests.git" + "@" + "f6c578a10ea707b1a8ab0b88943fe5115ce2b9be", "v8/test/test262/data": - Var("chromium_url") + "/external/github.com/tc39/test262.git" + "@" + "a72ee6d91275aa6524e84a9b7070103411ef2689", + Var("chromium_url") + "/external/github.com/tc39/test262.git" + "@" + "230f9fc5688ce76bfaa99aba5f680a159eaac9e2", "v8/test/test262/harness": Var("chromium_url") + "/external/github.com/test262-utils/test262-harness-py.git" + "@" + "0f2acdd882c84cff43b9d60df7574a1901e2cdcd", "v8/tools/clang": - Var("chromium_url") + "/chromium/src/tools/clang.git" + "@" + "9913fb19b687b0c858f697efd7bd2468d789a3d5", + Var("chromium_url") + "/chromium/src/tools/clang.git" + "@" + "05f306039aa5029fa88768690e5c512097419f9d", "v8/test/wasm-js": - Var("chromium_url") + "/external/github.com/WebAssembly/spec.git" + "@" + "b8b919e4a0d52db4d3d762e731e615bc3a38b3b2", + Var("chromium_url") + "/external/github.com/WebAssembly/spec.git" + "@" + "07fd6430f879d36928d179a62d9bdeed82286065", } deps_os = { "android": { "v8/third_party/android_tools": - Var("chromium_url") + "/android_tools.git" + "@" + "b43a6a289a7588b1769814f04dd6c7d7176974cc", + Var("chromium_url") + "/android_tools.git" + "@" + "cb6bc21107001e2f2eeee2707b482b2b755baf51", "v8/third_party/catapult": - Var('chromium_url') + "/external/github.com/catapult-project/catapult.git" + "@" + "246a39a82c2213d913a96fff020a263838dc76e6", + Var('chromium_url') + "/external/github.com/catapult-project/catapult.git" + "@" + "08a6e0ac161db7309d8f9cad0ccd38e0b1fd41e0", }, - "win": { - "v8/third_party/cygwin": - Var("chromium_url") + "/chromium/deps/cygwin.git" + "@" + "c89e446b273697fadf3a10ff1007a97c0b7de6df", - } } recursedeps = [ @@ -206,25 +202,14 @@ hooks = [ ], }, { - "name": "wasm_fuzzer", + "name": "wasm_spec_tests", "pattern": ".", "action": [ "download_from_google_storage", "--no_resume", "--no_auth", "-u", - "--bucket", "v8-wasm-fuzzer", - "-s", "v8/test/fuzzer/wasm.tar.gz.sha1", - ], - }, - { - "name": "wasm_asmjs_fuzzer", - "pattern": ".", - "action": [ "download_from_google_storage", - "--no_resume", - "--no_auth", - "-u", - "--bucket", "v8-wasm-asmjs-fuzzer", - "-s", "v8/test/fuzzer/wasm_asmjs.tar.gz.sha1", + "--bucket", "v8-wasm-spec-tests", + "-s", "v8/test/wasm-spec-tests/tests.tar.gz.sha1", ], }, { diff --git a/deps/v8/Makefile b/deps/v8/Makefile index 299d4aa09c97ac..ed5b3a7fabc325 100644 --- a/deps/v8/Makefile +++ b/deps/v8/Makefile @@ -240,7 +240,6 @@ ifdef android_ndk_root endif # ----------------- available targets: -------------------- -# - "grokdump": rebuilds heap constants lists used by grokdump # - any arch listed in ARCHES (see below) # - any mode listed in MODES # - every combination ., e.g. "ia32.release" @@ -467,12 +466,6 @@ $(ENVFILE).new: $(eval CXX_TARGET_ARCH:=$(subst x86_64,x64,$(CXX_TARGET_ARCH))) @mkdir -p $(OUTDIR); echo "GYPFLAGS=$(GYPFLAGS) -Dtarget_arch=$(CXX_TARGET_ARCH)" > $(ENVFILE).new; -# Heap constants for grokdump. -DUMP_FILE = tools/v8heapconst.py -grokdump: ia32.release - @cat $(DUMP_FILE).tmpl > $(DUMP_FILE) - @$(OUTDIR)/ia32.release/d8 --dump-heap-constants >> $(DUMP_FILE) - # Support for the GNU GLOBAL Source Code Tag System. gtags.files: $(GYPFILES) $(ENVFILE) @find include src test -name '*.h' -o -name '*.cc' -o -name '*.c' > $@ diff --git a/deps/v8/OWNERS b/deps/v8/OWNERS index e375fa65b73326..4a2dcdf74cddb6 100644 --- a/deps/v8/OWNERS +++ b/deps/v8/OWNERS @@ -7,7 +7,6 @@ bradnelson@chromium.org cbruni@chromium.org clemensh@chromium.org danno@chromium.org -epertoso@chromium.org franzih@chromium.org gsathya@chromium.org hablich@chromium.org diff --git a/deps/v8/PRESUBMIT.py b/deps/v8/PRESUBMIT.py index 4cacf811336530..7d7faec69614be 100644 --- a/deps/v8/PRESUBMIT.py +++ b/deps/v8/PRESUBMIT.py @@ -31,6 +31,7 @@ for more details about the presubmit API built into gcl. """ +import re import sys @@ -42,6 +43,12 @@ ) +# Regular expression that matches code which should not be run through cpplint. +_NO_LINT_PATHS = ( + r'src[\\\/]base[\\\/]export-template\.h', +) + + # Regular expression that matches code only used for test binaries # (best effort). _TEST_CODE_EXCLUDED_PATHS = ( @@ -69,9 +76,15 @@ def _V8PresubmitChecks(input_api, output_api): from presubmit import SourceProcessor from presubmit import StatusFilesProcessor + def FilterFile(affected_file): + return input_api.FilterSourceFile( + affected_file, + white_list=None, + black_list=_NO_LINT_PATHS) + results = [] if not CppLintProcessor().RunOnFiles( - input_api.AffectedFiles(include_deletes=False)): + input_api.AffectedFiles(file_filter=FilterFile, include_deletes=False)): results.append(output_api.PresubmitError("C++ lint check failed")) if not SourceProcessor().RunOnFiles( input_api.AffectedFiles(include_deletes=False)): @@ -250,6 +263,7 @@ def _CheckMissingFiles(input_api, output_api): def _CommonChecks(input_api, output_api): """Checks common to both upload and commit.""" results = [] + results.extend(_CheckCommitMessageBugEntry(input_api, output_api)) results.extend(input_api.canned_checks.CheckOwners( input_api, output_api, source_file_filter=None)) results.extend(input_api.canned_checks.CheckPatchFormatted( @@ -276,6 +290,32 @@ def _SkipTreeCheck(input_api, output_api): return input_api.environ.get('PRESUBMIT_TREE_CHECK') == 'skip' +def _CheckCommitMessageBugEntry(input_api, output_api): + """Check that bug entries are well-formed in commit message.""" + bogus_bug_msg = ( + 'Bogus BUG entry: %s. Please specify the issue tracker prefix and the ' + 'issue number, separated by a colon, e.g. v8:123 or chromium:12345.') + results = [] + for bug in (input_api.change.BUG or '').split(','): + bug = bug.strip() + if 'none'.startswith(bug.lower()): + continue + if ':' not in bug: + try: + if int(bug) > 100000: + # Rough indicator for current chromium bugs. + prefix_guess = 'chromium' + else: + prefix_guess = 'v8' + results.append('BUG entry requires issue tracker prefix, e.g. %s:%s' % + (prefix_guess, bug)) + except ValueError: + results.append(bogus_bug_msg % bug) + elif not re.match(r'\w+:\d+', bug): + results.append(bogus_bug_msg % bug) + return [output_api.PresubmitError(r) for r in results] + + def CheckChangeOnUpload(input_api, output_api): results = [] results.extend(_CommonChecks(input_api, output_api)) diff --git a/deps/v8/base/trace_event/common/trace_event_common.h b/deps/v8/base/trace_event/common/trace_event_common.h index e87665b8cdb12b..76d3039250ed89 100644 --- a/deps/v8/base/trace_event/common/trace_event_common.h +++ b/deps/v8/base/trace_event/common/trace_event_common.h @@ -258,6 +258,12 @@ TRACE_EVENT_PHASE_INSTANT, category_group, name, timestamp, \ TRACE_EVENT_FLAG_NONE | scope) +#define TRACE_EVENT_INSTANT_WITH_TIMESTAMP1(category_group, name, scope, \ + timestamp, arg_name, arg_val) \ + INTERNAL_TRACE_EVENT_ADD_WITH_TIMESTAMP( \ + TRACE_EVENT_PHASE_INSTANT, category_group, name, timestamp, \ + TRACE_EVENT_FLAG_NONE | scope, arg_name, arg_val) + // Records a single BEGIN event called "name" immediately, with 0, 1 or 2 // associated arguments. If the category is not enabled, then this // does nothing. diff --git a/deps/v8/codereview.settings b/deps/v8/codereview.settings index 532e4b4d7b0c07..bff4e38ba51885 100644 --- a/deps/v8/codereview.settings +++ b/deps/v8/codereview.settings @@ -1,8 +1,6 @@ +PROJECT: v8 +GERRIT_HOST: True CODE_REVIEW_SERVER: https://codereview.chromium.org CC_LIST: v8-reviews@googlegroups.com VIEW_VC: https://chromium.googlesource.com/v8/v8/+/ STATUS: http://v8-status.appspot.com/status -TRY_ON_UPLOAD: False -TRYSERVER_SVN_URL: svn://svn.chromium.org/chrome-try-v8 -PROJECT: v8 -PENDING_REF_PREFIX: refs/pending/ diff --git a/deps/v8/gni/isolate.gni b/deps/v8/gni/isolate.gni index a347eeaa24e1ba..90bc8c5d7fa4b9 100644 --- a/deps/v8/gni/isolate.gni +++ b/deps/v8/gni/isolate.gni @@ -101,11 +101,6 @@ template("v8_isolate_run") { } else { icu_use_data_file_flag = "0" } - if (v8_enable_inspector) { - enable_inspector = "1" - } else { - enable_inspector = "0" - } if (v8_use_external_startup_data) { use_external_startup_data = "1" } else { @@ -177,8 +172,6 @@ template("v8_isolate_run") { "--config-variable", "target_arch=$target_arch", "--config-variable", - "v8_enable_inspector=$enable_inspector", - "--config-variable", "v8_use_external_startup_data=$use_external_startup_data", "--config-variable", "v8_use_snapshot=$use_snapshot", diff --git a/deps/v8/gni/v8.gni b/deps/v8/gni/v8.gni index ea628e00007c87..33f85f989b73e6 100644 --- a/deps/v8/gni/v8.gni +++ b/deps/v8/gni/v8.gni @@ -37,9 +37,6 @@ declare_args() { # add a dependency on the ICU library. v8_enable_i18n_support = true - # Enable inspector. See include/v8-inspector.h. - v8_enable_inspector = true - # Use static libraries instead of source_sets. v8_static_library = false } @@ -66,9 +63,8 @@ v8_inspector_js_protocol = v8_path_prefix + "/src/inspector/js_protocol.json" # # Common configs to remove or add in all v8 targets. -v8_remove_configs = [ "//build/config/compiler:chromium_code" ] +v8_remove_configs = [] v8_add_configs = [ - "//build/config/compiler:no_chromium_code", v8_path_prefix + ":features", v8_path_prefix + ":toolchain", ] diff --git a/deps/v8/gypfiles/all.gyp b/deps/v8/gypfiles/all.gyp index d3e275e10fa552..bc9d9650eb5958 100644 --- a/deps/v8/gypfiles/all.gyp +++ b/deps/v8/gypfiles/all.gyp @@ -9,6 +9,8 @@ 'type': 'none', 'dependencies': [ '../src/d8.gyp:d8', + '../test/inspector/inspector.gyp:*', + '../test/mkgrokdump/mkgrokdump.gyp:*', ], 'conditions': [ ['component!="shared_library"', { @@ -25,20 +27,11 @@ '../test/unittests/unittests.gyp:*', ], }], - ['v8_enable_inspector==1', { - 'dependencies': [ - '../test/inspector/inspector.gyp:*', - ], - }], - ['v8_enable_inspector==1 and test_isolation_mode != "noop"', { - 'dependencies': [ - '../test/debugger/debugger.gyp:*', - ], - }], ['test_isolation_mode != "noop"', { 'dependencies': [ '../test/bot_default.gyp:*', '../test/benchmarks/benchmarks.gyp:*', + '../test/debugger/debugger.gyp:*', '../test/default.gyp:*', '../test/intl/intl.gyp:*', '../test/message/message.gyp:*', diff --git a/deps/v8/gypfiles/coverage_wrapper.py b/deps/v8/gypfiles/coverage_wrapper.py index 5b365d8e63d911..d5fdee43cfb761 100755 --- a/deps/v8/gypfiles/coverage_wrapper.py +++ b/deps/v8/gypfiles/coverage_wrapper.py @@ -31,6 +31,8 @@ def remove_if_exists(string_list, item): remove_if_exists(args, '-fsanitize-coverage=func') remove_if_exists(args, '-fsanitize-coverage=bb') remove_if_exists(args, '-fsanitize-coverage=edge') + remove_if_exists(args, '-fsanitize-coverage=trace-pc-guard') + remove_if_exists(args, '-fsanitize-coverage=bb,trace-pc-guard') break sys.exit(subprocess.check_call(args)) diff --git a/deps/v8/gypfiles/features.gypi b/deps/v8/gypfiles/features.gypi index bd5cd7cd108f1c..b38735e162ec8e 100644 --- a/deps/v8/gypfiles/features.gypi +++ b/deps/v8/gypfiles/features.gypi @@ -95,7 +95,7 @@ 'defines': ['VERIFY_HEAP',], }], ['v8_trace_maps==1', { - 'defines': ['TRACE_MAPS',], + 'defines': ['V8_TRACE_MAPS',], }], ['v8_enable_verify_predictable==1', { 'defines': ['VERIFY_PREDICTABLE',], @@ -110,7 +110,7 @@ 'defines': ['V8_IMMINENT_DEPRECATION_WARNINGS',], }], ['v8_enable_i18n_support==1', { - 'defines': ['V8_I18N_SUPPORT',], + 'defines': ['V8_INTL_SUPPORT',], }], ['v8_use_snapshot=="true" and v8_use_external_startup_data==1', { 'defines': ['V8_USE_EXTERNAL_STARTUP_DATA',], @@ -123,7 +123,7 @@ 'DebugBaseCommon': { 'abstract': 1, 'variables': { - 'v8_enable_handle_zapping%': 1, + 'v8_enable_handle_zapping%': 0, }, 'conditions': [ ['v8_enable_handle_zapping==1', { @@ -133,7 +133,7 @@ }, # Debug 'Release': { 'variables': { - 'v8_enable_handle_zapping%': 0, + 'v8_enable_handle_zapping%': 1, }, 'conditions': [ ['v8_enable_handle_zapping==1', { @@ -142,5 +142,8 @@ ], # conditions }, # Release }, # configurations + 'defines': [ + 'V8_GYP_BUILD', + ], # defines }, # target_defaults } diff --git a/deps/v8/gypfiles/isolate.gypi b/deps/v8/gypfiles/isolate.gypi index c55f3ca782516a..af3b3ae5c8926e 100644 --- a/deps/v8/gypfiles/isolate.gypi +++ b/deps/v8/gypfiles/isolate.gypi @@ -82,7 +82,6 @@ '--config-variable', 'sanitizer_coverage=<(sanitizer_coverage)', '--config-variable', 'component=<(component)', '--config-variable', 'target_arch=<(target_arch)', - '--config-variable', 'v8_enable_inspector=<(v8_enable_inspector)', '--config-variable', 'v8_use_external_startup_data=<(v8_use_external_startup_data)', '--config-variable', 'v8_use_snapshot=<(v8_use_snapshot)', ], diff --git a/deps/v8/gypfiles/standalone.gypi b/deps/v8/gypfiles/standalone.gypi index 862f94fb5c3c0d..4c805bf6432ff3 100644 --- a/deps/v8/gypfiles/standalone.gypi +++ b/deps/v8/gypfiles/standalone.gypi @@ -46,7 +46,6 @@ 'msvs_multi_core_compile%': '1', 'mac_deployment_target%': '10.7', 'release_extra_cflags%': '', - 'v8_enable_inspector%': 0, 'variables': { 'variables': { 'variables': { @@ -93,16 +92,16 @@ ['OS=="linux" and use_sysroot==1', { 'conditions': [ ['target_arch=="arm"', { - 'sysroot%': ' + +namespace v8 { + +constexpr uint32_t CurrentValueSerializerFormatVersion() { return 13; } + +} // namespace v8 + +#endif // INCLUDE_V8_VALUE_SERIALIZER_VERSION_H_ diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index 70e1a84d09e949..0889459ca778da 100644 --- a/deps/v8/include/v8-version.h +++ b/deps/v8/include/v8-version.h @@ -8,10 +8,10 @@ // These macros define the version number for the current version. // NOTE these macros are used by some of the tool scripts and the build // system so their names cannot be changed without changing the scripts. -#define V8_MAJOR_VERSION 5 -#define V8_MINOR_VERSION 8 -#define V8_BUILD_NUMBER 283 -#define V8_PATCH_LEVEL 41 +#define V8_MAJOR_VERSION 6 +#define V8_MINOR_VERSION 0 +#define V8_BUILD_NUMBER 286 +#define V8_PATCH_LEVEL 52 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) diff --git a/deps/v8/include/v8.h b/deps/v8/include/v8.h index 95023ae1c910bc..da3cdfdcbd7db5 100644 --- a/deps/v8/include/v8.h +++ b/deps/v8/include/v8.h @@ -128,7 +128,6 @@ template class PersistentValueVector; template class WeakCallbackObject; class FunctionTemplate; class ObjectTemplate; -class Data; template class FunctionCallbackInfo; template class PropertyCallbackInfo; class StackTrace; @@ -151,6 +150,9 @@ class FunctionCallbackArguments; class GlobalHandles; } // namespace internal +namespace debug { +class ConsoleCallArguments; +} // namespace debug // --- Handles --- @@ -159,7 +161,6 @@ class GlobalHandles; *(static_cast(0)) = static_cast(0); \ } - /** * An object reference managed by the v8 garbage collector. * @@ -173,10 +174,16 @@ class GlobalHandles; * allocated on the heap. * * There are two types of handles: local and persistent handles. + * * Local handles are light-weight and transient and typically used in - * local operations. They are managed by HandleScopes. Persistent - * handles can be used when storing objects across several independent - * operations and have to be explicitly deallocated when they're no + * local operations. They are managed by HandleScopes. That means that a + * HandleScope must exist on the stack when they are created and that they are + * only valid inside of the HandleScope active during their creation. + * For passing a local handle to an outer HandleScope, an EscapableHandleScope + * and its Escape() method must be used. + * + * Persistent handles can be used when storing objects across several + * independent operations and have to be explicitly deallocated when they're no * longer used. * * It is safe to extract the object stored in the handle by @@ -254,6 +261,11 @@ class Local { return !operator==(that); } + /** + * Cast a handle to a subclass, e.g. Local to Local. + * This is only valid if the handle actually refers to a value of the + * target type. + */ template V8_INLINE static Local Cast(Local that) { #ifdef V8_ENABLE_CHECKS // If we're going to perform the type check then we have to check @@ -263,6 +275,11 @@ class Local { return Local(T::Cast(*that)); } + /** + * Calling this is equivalent to Local::Cast(). + * In particular, this is only valid if the handle actually refers to a value + * of the target type. + */ template V8_INLINE Local As() const { return Local::Cast(*this); @@ -339,15 +356,26 @@ class MaybeLocal { V8_INLINE bool IsEmpty() const { return val_ == nullptr; } + /** + * Converts this MaybeLocal<> to a Local<>. If this MaybeLocal<> is empty, + * |false| is returned and |out| is left untouched. + */ template V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local* out) const { out->val_ = IsEmpty() ? nullptr : this->val_; return !IsEmpty(); } - // Will crash if the MaybeLocal<> is empty. + /** + * Converts this MaybeLocal<> to a Local<>. If this MaybeLocal<> is empty, + * V8 will crash the process. + */ V8_INLINE Local ToLocalChecked(); + /** + * Converts this MaybeLocal<> to a Local<>, using a default value if this + * MaybeLocal<> is empty. + */ template V8_INLINE Local FromMaybe(Local default_value) const { return IsEmpty() ? default_value : Local(val_); @@ -357,8 +385,10 @@ class MaybeLocal { T* val_; }; - -// Eternal handles are set-once handles that live for the life of the isolate. +/** + * Eternal handles are set-once handles that live for the lifetime of the + * isolate. + */ template class Eternal { public: V8_INLINE Eternal() : val_(nullptr) {} @@ -377,7 +407,7 @@ template class Eternal { static const int kInternalFieldsInWeakCallback = 2; - +static const int kEmbedderFieldsInWeakCallback = 2; template class WeakCallbackInfo { @@ -385,11 +415,11 @@ class WeakCallbackInfo { typedef void (*Callback)(const WeakCallbackInfo& data); WeakCallbackInfo(Isolate* isolate, T* parameter, - void* internal_fields[kInternalFieldsInWeakCallback], + void* embedder_fields[kEmbedderFieldsInWeakCallback], Callback* callback) : isolate_(isolate), parameter_(parameter), callback_(callback) { - for (int i = 0; i < kInternalFieldsInWeakCallback; ++i) { - internal_fields_[i] = internal_fields[i]; + for (int i = 0; i < kEmbedderFieldsInWeakCallback; ++i) { + embedder_fields_[i] = embedder_fields[i]; } } @@ -399,11 +429,11 @@ class WeakCallbackInfo { V8_INLINE V8_DEPRECATED("use indexed version", void* GetInternalField1() const) { - return internal_fields_[0]; + return embedder_fields_[0]; } V8_INLINE V8_DEPRECATED("use indexed version", void* GetInternalField2() const) { - return internal_fields_[1]; + return embedder_fields_[1]; } V8_DEPRECATED("Not realiable once SetSecondPassCallback() was used.", @@ -423,7 +453,7 @@ class WeakCallbackInfo { Isolate* isolate_; T* parameter_; Callback* callback_; - void* internal_fields_[kInternalFieldsInWeakCallback]; + void* embedder_fields_[kEmbedderFieldsInWeakCallback]; }; @@ -438,10 +468,10 @@ enum class WeakCallbackType { kParameter, kInternalFields, kFinalizer }; * An object reference that is independent of any handle scope. Where * a Local handle only lives as long as the HandleScope in which it was * allocated, a PersistentBase handle remains valid until it is explicitly - * disposed. + * disposed using Reset(). * * A persistent handle contains a reference to a storage cell within - * the v8 engine which holds an object value and which is updated by + * the V8 engine which holds an object value and which is updated by * the garbage collector whenever the object is moved. A new storage * cell can be created using the constructor or PersistentBase::Reset and * existing handles can be disposed using PersistentBase::Reset. @@ -899,6 +929,11 @@ class V8_EXPORT EscapableHandleScope : public HandleScope { internal::Object** escape_slot_; }; +/** + * A SealHandleScope acts like a handle scope in which no handle allocations + * are allowed. It can be useful for debugging handle leaks. + * Handles can be allocated within inner normal HandleScopes. + */ class V8_EXPORT SealHandleScope { public: SealHandleScope(Isolate* isolate); @@ -1060,19 +1095,41 @@ class V8_EXPORT Module { /** * ModuleDeclarationInstantiation * - * Returns false if an exception occurred during instantiation. + * Returns false if an exception occurred during instantiation. (In the case + * where the callback throws an exception, that exception is propagated.) */ V8_WARN_UNUSED_RESULT bool Instantiate(Local context, ResolveCallback callback); /** * ModuleEvaluation + * + * Returns the completion value. */ V8_WARN_UNUSED_RESULT MaybeLocal Evaluate(Local context); }; -// Node.js-specific: This will be implemented by a later V8 upgrade! -class DynamicImportResult; +/** + * This is an unfinished experimental feature, and is only exposed + * here for internal testing purposes. DO NOT USE. + * + * A compiled JavaScript module. + */ +class V8_EXPORT DynamicImportResult { + public: + /** + * Resolves the promise with the namespace object of the given + * module. + */ + V8_WARN_UNUSED_RESULT bool FinishDynamicImportSuccess(Local context, + Local module); + + /** + * Rejects the promise with the given exception. + */ + V8_WARN_UNUSED_RESULT bool FinishDynamicImportFailure(Local context, + Local exception); +}; /** * A compiled JavaScript script, tied to a Context which was active when the @@ -1364,7 +1421,7 @@ class V8_EXPORT ScriptCompiler { * CachedData instance is still valid; the tag has no other meaing. * * Background: The data carried by CachedData may depend on the exact - * V8 version number or currently compiler flags. This means when + * V8 version number or current compiler flags. This means that when * persisting CachedData, the embedder must take care to not pass in * data from another V8 version, or the same version with different * features enabled. @@ -1615,6 +1672,11 @@ class V8_EXPORT StackFrame { * constructor via "new". */ bool IsConstructor() const; + + /** + * Returns whether or not the associated functions is defined in wasm. + */ + bool IsWasm() const; }; @@ -1684,21 +1746,21 @@ class V8_EXPORT ValueSerializer { public: virtual ~Delegate() {} - /* + /** * Handles the case where a DataCloneError would be thrown in the structured * clone spec. Other V8 embedders may throw some other appropriate exception * type. */ virtual void ThrowDataCloneError(Local message) = 0; - /* + /** * The embedder overrides this method to write some kind of host object, if * possible. If not, a suitable exception should be thrown and * Nothing() returned. */ virtual Maybe WriteHostObject(Isolate* isolate, Local object); - /* + /** * Called when the ValueSerializer is going to serialize a * SharedArrayBuffer object. The embedder must return an ID for the * object, using the same ID if this SharedArrayBuffer has already been @@ -1713,7 +1775,7 @@ class V8_EXPORT ValueSerializer { virtual Maybe GetWasmModuleTransferId( Isolate* isolate, Local module); - /* + /** * Allocates memory for the buffer of at least the size provided. The actual * size (which may be greater or equal) is written to |actual_size|. If no * buffer has been allocated yet, nullptr will be provided. @@ -1725,7 +1787,7 @@ class V8_EXPORT ValueSerializer { virtual void* ReallocateBufferMemory(void* old_buffer, size_t size, size_t* actual_size); - /* + /** * Frees a buffer allocated with |ReallocateBufferMemory|. */ virtual void FreeBufferMemory(void* buffer); @@ -1735,24 +1797,24 @@ class V8_EXPORT ValueSerializer { ValueSerializer(Isolate* isolate, Delegate* delegate); ~ValueSerializer(); - /* + /** * Writes out a header, which includes the format version. */ void WriteHeader(); - /* + /** * Serializes a JavaScript value into the buffer. */ V8_WARN_UNUSED_RESULT Maybe WriteValue(Local context, Local value); - /* + /** * Returns the stored data. This serializer should not be used once the buffer * is released. The contents are undefined if a previous write has failed. */ V8_DEPRECATE_SOON("Use Release()", std::vector ReleaseBuffer()); - /* + /** * Returns the stored data (allocated using the delegate's * AllocateBufferMemory) and its size. This serializer should not be used once * the buffer is released. The contents are undefined if a previous write has @@ -1760,7 +1822,7 @@ class V8_EXPORT ValueSerializer { */ V8_WARN_UNUSED_RESULT std::pair Release(); - /* + /** * Marks an ArrayBuffer as havings its contents transferred out of band. * Pass the corresponding ArrayBuffer in the deserializing context to * ValueDeserializer::TransferArrayBuffer. @@ -1768,7 +1830,7 @@ class V8_EXPORT ValueSerializer { void TransferArrayBuffer(uint32_t transfer_id, Local array_buffer); - /* + /** * Similar to TransferArrayBuffer, but for SharedArrayBuffer. */ V8_DEPRECATE_SOON("Use Delegate::GetSharedArrayBufferId", @@ -1776,7 +1838,7 @@ class V8_EXPORT ValueSerializer { uint32_t transfer_id, Local shared_array_buffer)); - /* + /** * Indicate whether to treat ArrayBufferView objects as host objects, * i.e. pass them to Delegate::WriteHostObject. This should not be * called when no Delegate was passed. @@ -1785,7 +1847,7 @@ class V8_EXPORT ValueSerializer { */ void SetTreatArrayBufferViewsAsHostObjects(bool mode); - /* + /** * Write raw data in various common formats to the buffer. * Note that integer types are written in base-128 varint format, not with a * binary copy. For use during an override of Delegate::WriteHostObject. @@ -1817,14 +1879,14 @@ class V8_EXPORT ValueDeserializer { public: virtual ~Delegate() {} - /* + /** * The embedder overrides this method to read some kind of host object, if * possible. If not, a suitable exception should be thrown and * MaybeLocal() returned. */ virtual MaybeLocal ReadHostObject(Isolate* isolate); - /* + /** * Get a WasmCompiledModule given a transfer_id previously provided * by ValueSerializer::GetWasmModuleTransferId */ @@ -1837,25 +1899,25 @@ class V8_EXPORT ValueDeserializer { Delegate* delegate); ~ValueDeserializer(); - /* + /** * Reads and validates a header (including the format version). * May, for example, reject an invalid or unsupported wire format. */ V8_WARN_UNUSED_RESULT Maybe ReadHeader(Local context); - /* + /** * Deserializes a JavaScript value from the buffer. */ V8_WARN_UNUSED_RESULT MaybeLocal ReadValue(Local context); - /* + /** * Accepts the array buffer corresponding to the one passed previously to * ValueSerializer::TransferArrayBuffer. */ void TransferArrayBuffer(uint32_t transfer_id, Local array_buffer); - /* + /** * Similar to TransferArrayBuffer, but for SharedArrayBuffer. * The id is not necessarily in the same namespace as unshared ArrayBuffer * objects. @@ -1863,7 +1925,7 @@ class V8_EXPORT ValueDeserializer { void TransferSharedArrayBuffer(uint32_t id, Local shared_array_buffer); - /* + /** * Must be called before ReadHeader to enable support for reading the legacy * wire format (i.e., which predates this being shipped). * @@ -1872,14 +1934,19 @@ class V8_EXPORT ValueDeserializer { */ void SetSupportsLegacyWireFormat(bool supports_legacy_wire_format); - /* + /** + * Expect inline wasm in the data stream (rather than in-memory transfer) + */ + void SetExpectInlineWasm(bool allow_inline_wasm); + + /** * Reads the underlying wire format version. Likely mostly to be useful to * legacy code reading old wire format versions. Must be called after * ReadHeader. */ uint32_t GetWireFormatVersion() const; - /* + /** * Reads raw data in various common formats to the buffer. * Note that integer types are read in base-128 varint format, not with a * binary copy. For use during an override of Delegate::ReadHostObject. @@ -1906,7 +1973,7 @@ class V8_EXPORT NativeWeakMap : public Data { public: static Local New(Isolate* isolate); void Set(Local key, Local value); - Local Get(Local key); + Local Get(Local key) const; bool Has(Local key); bool Delete(Local key); }; @@ -2252,6 +2319,8 @@ class V8_EXPORT Value : public Data { Local TypeOf(Isolate*); + Maybe InstanceOf(Local context, Local object); + private: V8_INLINE bool QuickIsUndefined() const; V8_INLINE bool QuickIsNull() const; @@ -2304,9 +2373,25 @@ class V8_EXPORT Name : public Primitive { static void CheckCast(Value* obj); }; +/** + * A flag describing different modes of string creation. + * + * Aside from performance implications there are no differences between the two + * creation modes. + */ +enum class NewStringType { + /** + * Create a new string, always allocating new storage memory. + */ + kNormal, -enum class NewStringType { kNormal, kInternalized }; - + /** + * Acts as a hint that the string should be created in the + * old generation heap space and be deduplicated if an identical string + * already exists. + */ + kInternalized +}; /** * A JavaScript string value (ECMA-262, 4.3.17). @@ -2321,7 +2406,7 @@ class V8_EXPORT String : public Name { ONE_BYTE_ENCODING = 0x8 }; /** - * Returns the number of characters in this string. + * Returns the number of characters (UTF-16 code units) in this string. */ int Length() const; @@ -2332,14 +2417,16 @@ class V8_EXPORT String : public Name { int Utf8Length() const; /** - * Returns whether this string is known to contain only one byte data. + * Returns whether this string is known to contain only one byte data, + * i.e. ISO-8859-1 code points. * Does not read the string. * False negatives are possible. */ bool IsOneByte() const; /** - * Returns whether this string contain only one byte data. + * Returns whether this string contain only one byte data, + * i.e. ISO-8859-1 code points. * Will read the entire string in some cases. */ bool ContainsOnlyOneByte() const; @@ -2646,7 +2733,7 @@ class V8_EXPORT String : public Name { }; /** - * Converts an object to a two-byte string. + * Converts an object to a two-byte (UTF-16-encoded) string. * If conversion to a string fails (eg. due to an exception in the toString() * method of the object) then the length() method returns 0 and the * operator * returns NULL. @@ -2681,30 +2768,43 @@ class V8_EXPORT String : public Name { */ class V8_EXPORT Symbol : public Name { public: - // Returns the print name string of the symbol, or undefined if none. + /** + * Returns the print name string of the symbol, or undefined if none. + */ Local Name() const; - // Create a symbol. If name is not empty, it will be used as the description. + /** + * Create a symbol. If name is not empty, it will be used as the description. + */ static Local New(Isolate* isolate, Local name = Local()); - // Access global symbol registry. - // Note that symbols created this way are never collected, so - // they should only be used for statically fixed properties. - // Also, there is only one global name space for the names used as keys. - // To minimize the potential for clashes, use qualified names as keys. + /** + * Access global symbol registry. + * Note that symbols created this way are never collected, so + * they should only be used for statically fixed properties. + * Also, there is only one global name space for the names used as keys. + * To minimize the potential for clashes, use qualified names as keys. + */ static Local For(Isolate *isolate, Local name); - // Retrieve a global symbol. Similar to |For|, but using a separate - // registry that is not accessible by (and cannot clash with) JavaScript code. + /** + * Retrieve a global symbol. Similar to |For|, but using a separate + * registry that is not accessible by (and cannot clash with) JavaScript code. + */ static Local ForApi(Isolate *isolate, Local name); // Well-known symbols + static Local GetHasInstance(Isolate* isolate); + static Local GetIsConcatSpreadable(Isolate* isolate); static Local GetIterator(Isolate* isolate); - static Local GetUnscopables(Isolate* isolate); + static Local GetMatch(Isolate* isolate); + static Local GetReplace(Isolate* isolate); + static Local GetSearch(Isolate* isolate); + static Local GetSplit(Isolate* isolate); static Local GetToPrimitive(Isolate* isolate); static Local GetToStringTag(Isolate* isolate); - static Local GetIsConcatSpreadable(Isolate* isolate); + static Local GetUnscopables(Isolate* isolate); V8_INLINE static Symbol* Cast(Value* obj); @@ -2721,20 +2821,26 @@ class V8_EXPORT Symbol : public Name { */ class V8_EXPORT Private : public Data { public: - // Returns the print name string of the private symbol, or undefined if none. + /** + * Returns the print name string of the private symbol, or undefined if none. + */ Local Name() const; - // Create a private symbol. If name is not empty, it will be the description. + /** + * Create a private symbol. If name is not empty, it will be the description. + */ static Local New(Isolate* isolate, Local name = Local()); - // Retrieve a global private symbol. If a symbol with this name has not - // been retrieved in the same isolate before, it is created. - // Note that private symbols created this way are never collected, so - // they should only be used for statically fixed properties. - // Also, there is only one global name space for the names used as keys. - // To minimize the potential for clashes, use qualified names as keys, - // e.g., "Class#property". + /** + * Retrieve a global private symbol. If a symbol with this name has not + * been retrieved in the same isolate before, it is created. + * Note that private symbols created this way are never collected, so + * they should only be used for statically fixed properties. + * Also, there is only one global name space for the names used as keys. + * To minimize the potential for clashes, use qualified names as keys, + * e.g., "Class#property". + */ static Local ForApi(Isolate* isolate, Local name); private: @@ -3000,15 +3106,16 @@ class V8_EXPORT Object : public Value { Local key); V8_DEPRECATE_SOON("Use maybe version", bool Delete(Local key)); - // TODO(dcarney): mark V8_WARN_UNUSED_RESULT - Maybe Delete(Local context, Local key); + V8_WARN_UNUSED_RESULT Maybe Delete(Local context, + Local key); V8_DEPRECATED("Use maybe version", bool Has(uint32_t index)); - V8_WARN_UNUSED_RESULT Maybe Has(Local context, uint32_t index); + V8_WARN_UNUSED_RESULT Maybe Has(Local context, + uint32_t index); V8_DEPRECATED("Use maybe version", bool Delete(uint32_t index)); - // TODO(dcarney): mark V8_WARN_UNUSED_RESULT - Maybe Delete(Local context, uint32_t index); + V8_WARN_UNUSED_RESULT Maybe Delete(Local context, + uint32_t index); V8_DEPRECATED("Use maybe version", bool SetAccessor(Local name, @@ -3024,8 +3131,8 @@ class V8_EXPORT Object : public Value { Local data = Local(), AccessControl settings = DEFAULT, PropertyAttribute attribute = None)); - // TODO(dcarney): mark V8_WARN_UNUSED_RESULT - Maybe SetAccessor(Local context, Local name, + V8_WARN_UNUSED_RESULT Maybe SetAccessor(Local context, + Local name, AccessorNameGetterCallback getter, AccessorNameSetterCallback setter = 0, MaybeLocal data = MaybeLocal(), @@ -3037,6 +3144,16 @@ class V8_EXPORT Object : public Value { PropertyAttribute attribute = None, AccessControl settings = DEFAULT); + /** + * Sets a native data property like Template::SetNativeDataProperty, but + * this method sets on this object directly. + */ + V8_WARN_UNUSED_RESULT Maybe SetNativeDataProperty( + Local context, Local name, + AccessorNameGetterCallback getter, + AccessorNameSetterCallback setter = nullptr, + Local data = Local(), PropertyAttribute attributes = None); + /** * Functionality for private properties. * This is an experimental feature, use at your own risk. @@ -3515,6 +3632,7 @@ class FunctionCallbackInfo { protected: friend class internal::FunctionCallbackArguments; friend class internal::CustomArguments; + friend class debug::ConsoleCallArguments; static const int kHolderIndex = 0; static const int kIsolateIndex = 1; static const int kReturnValueDefaultValueIndex = 2; @@ -3779,12 +3897,12 @@ class V8_EXPORT Promise : public Object { * Ignored if the promise is no longer pending. */ V8_DEPRECATE_SOON("Use maybe version", void Resolve(Local value)); - // TODO(dcarney): mark V8_WARN_UNUSED_RESULT - Maybe Resolve(Local context, Local value); + V8_WARN_UNUSED_RESULT Maybe Resolve(Local context, + Local value); V8_DEPRECATE_SOON("Use maybe version", void Reject(Local value)); - // TODO(dcarney): mark V8_WARN_UNUSED_RESULT - Maybe Reject(Local context, Local value); + V8_WARN_UNUSED_RESULT Maybe Reject(Local context, + Local value); V8_INLINE static Resolver* Cast(Value* obj); @@ -3933,11 +4051,44 @@ class V8_EXPORT Proxy : public Object { static void CheckCast(Value* obj); }; +// TODO(mtrofin): rename WasmCompiledModule to WasmModuleObject, for +// consistency with internal APIs. class V8_EXPORT WasmCompiledModule : public Object { public: typedef std::pair, size_t> SerializedModule; // A buffer that is owned by the caller. typedef std::pair CallerOwnedBuffer; + + // An opaque, native heap object for transferring wasm modules. It + // supports move semantics, and does not support copy semantics. + class TransferrableModule final { + public: + TransferrableModule(TransferrableModule&& src) = default; + TransferrableModule(const TransferrableModule& src) = delete; + + TransferrableModule& operator=(TransferrableModule&& src) = default; + TransferrableModule& operator=(const TransferrableModule& src) = delete; + + private: + typedef std::pair, size_t> OwnedBuffer; + friend class WasmCompiledModule; + TransferrableModule(OwnedBuffer&& code, OwnedBuffer&& bytes) + : compiled_code(std::move(code)), wire_bytes(std::move(bytes)) {} + + OwnedBuffer compiled_code = {nullptr, 0}; + OwnedBuffer wire_bytes = {nullptr, 0}; + }; + + // Get an in-memory, non-persistable, and context-independent (meaning, + // suitable for transfer to another Isolate and Context) representation + // of this wasm compiled module. + TransferrableModule GetTransferrableModule(); + + // Efficiently re-create a WasmCompiledModule, without recompiling, from + // a TransferrableModule. + static MaybeLocal FromTransferrableModule( + Isolate* isolate, const TransferrableModule&); + // Get the wasm-encoded bytes that were used to compile this module. Local GetWasmWireBytes(); @@ -3953,16 +4104,49 @@ class V8_EXPORT WasmCompiledModule : public Object { V8_INLINE static WasmCompiledModule* Cast(Value* obj); private: + // TODO(ahaas): please remove the friend once streamed compilation is + // implemented + friend class WasmModuleObjectBuilder; + static MaybeLocal Deserialize( Isolate* isolate, const CallerOwnedBuffer& serialized_module, const CallerOwnedBuffer& wire_bytes); static MaybeLocal Compile(Isolate* isolate, const uint8_t* start, size_t length); + static CallerOwnedBuffer AsCallerOwned( + const TransferrableModule::OwnedBuffer& buff) { + return {buff.first.get(), buff.second}; + } + WasmCompiledModule(); static void CheckCast(Value* obj); }; +class V8_EXPORT WasmModuleObjectBuilder final { + public: + WasmModuleObjectBuilder(Isolate* isolate) : isolate_(isolate) {} + // The buffer passed into OnBytesReceived is owned by the caller. + void OnBytesReceived(const uint8_t*, size_t size); + MaybeLocal Finish(); + + private: + Isolate* isolate_ = nullptr; + // TODO(ahaas): We probably need none of this below here once streamed + // compilation is implemented. + typedef std::pair, size_t> Buffer; + + // Disable copy semantics *in this implementation*. We can choose to + // relax this, albeit it's not clear why. + WasmModuleObjectBuilder(const WasmModuleObjectBuilder&) = delete; + WasmModuleObjectBuilder(WasmModuleObjectBuilder&&) = default; + WasmModuleObjectBuilder& operator=(const WasmModuleObjectBuilder&) = delete; + WasmModuleObjectBuilder& operator=(WasmModuleObjectBuilder&&) = default; + + std::vector received_buffers_; + size_t total_size_ = 0; +}; + #ifndef V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT // The number of required internal fields can be defined by embedder. #define V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT 2 @@ -4008,6 +4192,11 @@ class V8_EXPORT ArrayBuffer : public Object { */ virtual void* AllocateUninitialized(size_t length) = 0; + /** + * Reserved |length| bytes, but do not commit the memory. Must call + * |SetProtection| to make memory accessible. + */ + // TODO(eholk): make this pure virtual once blink implements this. virtual void* Reserve(size_t length); /** @@ -4017,15 +4206,33 @@ class V8_EXPORT ArrayBuffer : public Object { virtual void Free(void* data, size_t length) = 0; enum class AllocationMode { kNormal, kReservation }; + + /** + * Free the memory block of size |length|, pointed to by |data|. + * That memory is guaranteed to be previously allocated by |Allocate| or + * |Reserve|, depending on |mode|. + */ + // TODO(eholk): make this pure virtual once blink implements this. virtual void Free(void* data, size_t length, AllocationMode mode); + enum class Protection { kNoAccess, kReadWrite }; + + /** + * Change the protection on a region of memory. + * + * On platforms that make a distinction between reserving and committing + * memory, changing the protection to kReadWrite must also ensure the memory + * is committed. + */ + // TODO(eholk): make this pure virtual once blink implements this. virtual void SetProtection(void* data, size_t length, Protection protection); /** * malloc/free based convenience allocator. * - * Caller takes ownership. + * Caller takes ownership, i.e. the returned object needs to be freed using + * |delete allocator| once it is no longer in use. */ static Allocator* NewDefaultAllocator(); }; @@ -4069,8 +4276,11 @@ class V8_EXPORT ArrayBuffer : public Object { /** * Create a new ArrayBuffer over an existing memory block. * The created array buffer is by default immediately in externalized state. - * The memory block will not be reclaimed when a created ArrayBuffer - * is garbage-collected. + * In externalized state, the memory block will not be reclaimed when a + * created ArrayBuffer is garbage-collected. + * In internalized state, the memory block will be released using + * |Allocator::Free| once all ArrayBuffers referencing it are collected by + * the garbage collector. */ static Local New( Isolate* isolate, void* data, size_t byte_length, @@ -4121,6 +4331,7 @@ class V8_EXPORT ArrayBuffer : public Object { V8_INLINE static ArrayBuffer* Cast(Value* obj); static const int kInternalFieldCount = V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT; + static const int kEmbedderFieldCount = V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT; private: ArrayBuffer(); @@ -4174,6 +4385,8 @@ class V8_EXPORT ArrayBufferView : public Object { static const int kInternalFieldCount = V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT; + static const int kEmbedderFieldCount = + V8_ARRAY_BUFFER_VIEW_INTERNAL_FIELD_COUNT; private: ArrayBufferView(); @@ -4583,11 +4796,12 @@ class V8_EXPORT RegExp : public Object { */ enum Flags { kNone = 0, - kGlobal = 1, - kIgnoreCase = 2, - kMultiline = 4, - kSticky = 8, - kUnicode = 16 + kGlobal = 1 << 0, + kIgnoreCase = 1 << 1, + kMultiline = 1 << 2, + kSticky = 1 << 3, + kUnicode = 1 << 4, + kDotAll = 1 << 5, }; /** @@ -4642,7 +4856,8 @@ class V8_EXPORT External : public Value { F(ArrayProto_entries, array_entries_iterator) \ F(ArrayProto_forEach, array_for_each_iterator) \ F(ArrayProto_keys, array_keys_iterator) \ - F(ArrayProto_values, array_values_iterator) + F(ArrayProto_values, array_values_iterator) \ + F(IteratorPrototype, initial_iterator_prototype) enum Intrinsic { #define V8_DECL_INTRINSIC(name, iname) k##name, @@ -5980,19 +6195,7 @@ typedef void (*FailedAccessCheckCallback)(Local target, typedef bool (*AllowCodeGenerationFromStringsCallback)(Local context); // --- WASM compilation callbacks --- - -/** - * Callback to check if a buffer source may be compiled to WASM, given - * the compilation is attempted as a promise or not. - */ - -typedef bool (*AllowWasmCompileCallback)(Isolate* isolate, Local source, - bool as_promise); - -typedef bool (*AllowWasmInstantiateCallback)(Isolate* isolate, - Local module_or_bytes, - MaybeLocal ffi, - bool as_promise); +typedef bool (*ExtensionCallback)(const FunctionCallbackInfo&); // --- Garbage Collection Callbacks --- @@ -6058,6 +6261,11 @@ class V8_EXPORT HeapStatistics { size_t heap_size_limit() { return heap_size_limit_; } size_t malloced_memory() { return malloced_memory_; } size_t peak_malloced_memory() { return peak_malloced_memory_; } + + /** + * Returns a 0/1 boolean, which signifies whether the V8 overwrite heap + * garbage with a bit pattern. + */ size_t does_zap_garbage() { return does_zap_garbage_; } private: @@ -6306,7 +6514,7 @@ class V8_EXPORT EmbedderHeapTracer { * wrappers from them when called through |AdvanceTracing|. */ virtual void RegisterV8References( - const std::vector >& internal_fields) = 0; + const std::vector >& embedder_fields) = 0; /** * Called at the beginning of a GC cycle. @@ -6369,6 +6577,9 @@ struct SerializeInternalFieldsCallback { CallbackFunction callback; void* data; }; +// Note that these fields are called "internal fields" in the API and called +// "embedder fields" within V8. +typedef SerializeInternalFieldsCallback SerializeEmbedderFieldsCallback; /** * Callback and supporting data used to implement embedder logic to deserialize @@ -6384,6 +6595,7 @@ struct DeserializeInternalFieldsCallback { void* data); void* data; }; +typedef DeserializeInternalFieldsCallback DeserializeEmbedderFieldsCallback; /** * Isolate represents an isolated instance of the V8 engine. V8 isolates have @@ -6415,8 +6627,9 @@ class V8_EXPORT Isolate { * The optional entry_hook allows the host application to provide the * address of a function that's invoked on entry to every V8-generated * function. Note that entry_hook is invoked at the very start of each - * generated function. Furthermore, if an entry_hook is given, V8 will - * not use a snapshot, including custom snapshots. + * generated function. + * An entry_hook can only be provided in no-snapshot builds; in snapshot + * builds it must be nullptr. */ FunctionEntryHook entry_hook; @@ -6468,7 +6681,7 @@ class V8_EXPORT Isolate { /** * Whether calling Atomics.wait (a function that may block) is allowed in - * this isolate. + * this isolate. This can also be configured via SetAllowAtomicsWait. */ bool allow_atomics_wait; @@ -6706,6 +6919,12 @@ class V8_EXPORT Isolate { */ void Dispose(); + /** + * Dumps activated low-level V8 internal stats. This can be used instead + * of performing a full isolate disposal. + */ + void DumpAndResetStats(); + /** * Discards all V8 thread-specific data for the Isolate. Should be used * if a thread is terminating and it has used an Isolate that will outlive @@ -7230,6 +7449,14 @@ class V8_EXPORT Isolate { void SetAllowCodeGenerationFromStringsCallback( AllowCodeGenerationFromStringsCallback callback); + /** + * Embedder over{ride|load} injection points for wasm APIs. + */ + void SetWasmModuleCallback(ExtensionCallback callback); + void SetWasmCompileCallback(ExtensionCallback callback); + void SetWasmInstanceCallback(ExtensionCallback callback); + void SetWasmInstantiateCallback(ExtensionCallback callback); + /** * Check if V8 is dead and therefore unusable. This is the case after * fatal errors such as out-of-memory situations. @@ -7314,6 +7541,13 @@ class V8_EXPORT Isolate { */ bool IsInUse(); + /** + * Set whether calling Atomics.wait (a function that may block) is allowed in + * this isolate. This can also be configured via + * CreateParams::allow_atomics_wait. + */ + void SetAllowAtomicsWait(bool allow); + Isolate() = delete; ~Isolate() = delete; Isolate(const Isolate&) = delete; @@ -7685,6 +7919,35 @@ class V8_EXPORT V8 { */ static void ShutdownPlatform(); +#if V8_OS_LINUX && V8_TARGET_ARCH_X64 && !V8_OS_ANDROID + /** + * Give the V8 signal handler a chance to handle a fault. + * + * This function determines whether a memory access violation can be recovered + * by V8. If so, it will return true and modify context to return to a code + * fragment that can recover from the fault. Otherwise, TryHandleSignal will + * return false. + * + * The parameters to this function correspond to those passed to a Linux + * signal handler. + * + * \param signal_number The signal number. + * + * \param info A pointer to the siginfo_t structure provided to the signal + * handler. + * + * \param context The third argument passed to the Linux signal handler, which + * points to a ucontext_t structure. + */ + static bool TryHandleSignal(int signal_number, void* info, void* context); +#endif // V8_OS_LINUX + + /** + * Enable the default signal handler rather than using one provided by the + * embedder. + */ + static bool RegisterDefaultSignalHandler(); + private: V8(); @@ -7811,20 +8074,33 @@ class Maybe { V8_INLINE bool IsNothing() const { return !has_value_; } V8_INLINE bool IsJust() const { return has_value_; } - // Will crash if the Maybe<> is nothing. + /** + * An alias for |FromJust|. Will crash if the Maybe<> is nothing. + */ V8_INLINE T ToChecked() const { return FromJust(); } + /** + * Converts this Maybe<> to a value of type T. If this Maybe<> is + * nothing (empty), |false| is returned and |out| is left untouched. + */ V8_WARN_UNUSED_RESULT V8_INLINE bool To(T* out) const { if (V8_LIKELY(IsJust())) *out = value_; return IsJust(); } - // Will crash if the Maybe<> is nothing. + /** + * Converts this Maybe<> to a value of type T. If this Maybe<> is + * nothing (empty), V8 will crash the process. + */ V8_INLINE T FromJust() const { if (V8_UNLIKELY(!IsJust())) V8::FromJustIsNothing(); return value_; } + /** + * Converts this Maybe<> to a value of type T, using a default value if this + * Maybe<> is nothing (empty). + */ V8_INLINE T FromMaybe(const T& default_value) const { return has_value_ ? value_ : default_value; } @@ -8103,7 +8379,7 @@ class V8_EXPORT Context { * \param context_snapshot_index The index of the context snapshot to * deserialize from. Use v8::Context::New for the default snapshot. * - * \param internal_fields_deserializer Optional callback to deserialize + * \param embedder_fields_deserializer Optional callback to deserialize * internal fields. It should match the SerializeInternalFieldCallback used * to serialize. * @@ -8114,7 +8390,7 @@ class V8_EXPORT Context { static MaybeLocal FromSnapshot( Isolate* isolate, size_t context_snapshot_index, - DeserializeInternalFieldsCallback internal_fields_deserializer = + DeserializeInternalFieldsCallback embedder_fields_deserializer = DeserializeInternalFieldsCallback(), ExtensionConfiguration* extensions = nullptr, MaybeLocal global_object = MaybeLocal()); @@ -8170,16 +8446,14 @@ class V8_EXPORT Context { Isolate* GetIsolate(); /** - * The field at kDebugIdIndex is reserved for V8 debugger implementation. - * The value is propagated to the scripts compiled in given Context and - * can be used for filtering scripts. + * The field at kDebugIdIndex used to be reserved for the inspector. + * It now serves no purpose. */ enum EmbedderDataFields { kDebugIdIndex = 0 }; /** * Gets the embedder data with the given index, which must have been set by a - * previous call to SetEmbedderData with the same index. Note that index 0 - * currently has a special meaning for Chrome's debugger. + * previous call to SetEmbedderData with the same index. */ V8_INLINE Local GetEmbedderData(int index); @@ -8695,11 +8969,11 @@ Local MaybeLocal::ToLocalChecked() { template void* WeakCallbackInfo::GetInternalField(int index) const { #ifdef V8_ENABLE_CHECKS - if (index < 0 || index >= kInternalFieldsInWeakCallback) { + if (index < 0 || index >= kEmbedderFieldsInWeakCallback) { V8::InternalFieldOutOfBounds(index); } #endif - return internal_fields_[index]; + return embedder_fields_[index]; } diff --git a/deps/v8/include/v8config.h b/deps/v8/include/v8config.h index c34cb69a89112e..964949c24c3293 100644 --- a/deps/v8/include/v8config.h +++ b/deps/v8/include/v8config.h @@ -316,7 +316,7 @@ // V8_NORETURN void MyAbort() { abort(); } #if V8_HAS_ATTRIBUTE_NORETURN # define V8_NORETURN __attribute__((noreturn)) -#elif HAS_DECLSPEC_NORETURN +#elif V8_HAS_DECLSPEC_NORETURN # define V8_NORETURN __declspec(noreturn) #else # define V8_NORETURN /* NOT SUPPORTED */ diff --git a/deps/v8/infra/config/cq.cfg b/deps/v8/infra/config/cq.cfg index 72381ee38801c8..dcf8e5c0b726e1 100644 --- a/deps/v8/infra/config/cq.cfg +++ b/deps/v8/infra/config/cq.cfg @@ -32,6 +32,7 @@ verifiers { buckets { name: "master.tryserver.v8" builders { name: "v8_android_arm_compile_rel" } + builders { name: "v8_node_linux64_rel" } builders { name: "v8_linux64_asan_rel_ng" } builders { name: "v8_linux64_asan_rel_ng_triggered" @@ -42,6 +43,7 @@ verifiers { name: "v8_linux64_avx2_rel_ng_triggered" triggered_by: "v8_linux64_avx2_rel_ng" } + builders { name: "v8_linux64_gcc_compile_dbg" } builders { name: "v8_linux64_gyp_rel_ng" } builders { name: "v8_linux64_gyp_rel_ng_triggered" @@ -119,7 +121,7 @@ verifiers { } builders { name: "v8_linux64_sanitizer_coverage_rel" - experiment_percentage: 20 + experiment_percentage: 100 } } buckets { diff --git a/deps/v8/infra/mb/mb_config.pyl b/deps/v8/infra/mb/mb_config.pyl index 2a78d8627f52c0..1a8247fc2b71af 100644 --- a/deps/v8/infra/mb/mb_config.pyl +++ b/deps/v8/infra/mb/mb_config.pyl @@ -24,6 +24,18 @@ 'mips64el.debug': 'default_debug_mips64el', 'mips64el.optdebug': 'default_optdebug_mips64el', 'mips64el.release': 'default_release_mips64el', + 'ppc.debug': 'default_debug_ppc', + 'ppc.optdebug': 'default_optdebug_ppc', + 'ppc.release': 'default_release_ppc', + 'ppc64.debug': 'default_debug_ppc64', + 'ppc64.optdebug': 'default_optdebug_ppc64', + 'ppc64.release': 'default_release_ppc64', + 's390.debug': 'default_debug_s390', + 's390.optdebug': 'default_optdebug_s390', + 's390.release': 'default_release_s390', + 's390x.debug': 'default_debug_s390x', + 's390x.optdebug': 'default_optdebug_s390x', + 's390x.release': 'default_release_s390x', 'x64.debug': 'default_debug_x64', 'x64.optdebug': 'default_optdebug_x64', 'x64.release': 'default_release_x64', @@ -72,6 +84,8 @@ # Sanitizers. 'V8 Linux64 ASAN': 'gn_release_x64_asan', 'V8 Linux64 TSAN': 'gn_release_x64_tsan', + 'V8 Linux64 TSAN - concurrent marking': + 'gn_release_x64_tsan_concurrent_marking', 'V8 Linux - arm64 - sim - MSAN': 'gn_release_simulate_arm64_msan', # Clusterfuzz. 'V8 Linux64 - release builder': 'gn_release_x64_correctness_fuzzer', @@ -86,17 +100,18 @@ 'gn_debug_simulate_mipsel_asan_edge', # Misc. 'V8 Linux gcc 4.8': 'gn_release_x86_gcc', + 'V8 Linux64 gcc 4.8 - debug': 'gn_debug_x64_gcc', # FYI. 'V8 Linux - swarming staging': 'gn_release_x64', # TODO(machenbach): Figure out if symbolized is still needed. The # original config also specified -O1, which we dropped because chromium # doesn't have it (anymore). 'V8 Linux64 - cfi': 'gyp_release_x64_cfi_symbolized', - 'V8 Linux - vtunejit': 'gyp_debug_x86_vtunejit', + 'V8 Linux - vtunejit': 'gn_debug_x86_vtunejit', 'V8 Linux64 - gcov coverage': 'gyp_release_x64_gcc_coverage', - 'V8 Linux - predictable': 'gyp_release_x86_predictable', + 'V8 Linux - predictable': 'gn_release_x86_predictable', 'V8 Linux - full debug': 'gyp_full_debug_x86', - 'V8 Linux - interpreted regexp': 'gyp_release_x86_interpreted_regexp', + 'V8 Linux - interpreted regexp': 'gn_release_x86_interpreted_regexp', 'V8 Random Deopt Fuzzer - debug': 'gyp_debug_x86', }, @@ -165,6 +180,7 @@ 'v8_linux_nosnap_dbg': 'gn_debug_x86_no_snap_trybot', 'v8_linux_gcc_compile_rel': 'gn_release_x86_gcc_minimal_symbols', 'v8_linux_gcc_rel': 'gn_release_x86_gcc_minimal_symbols', + 'v8_linux64_gcc_compile_dbg': 'gn_debug_x64_gcc', 'v8_linux64_rel_ng': 'gn_release_x64_valgrind_trybot', 'v8_linux64_verify_csa_rel_ng': 'gn_release_x64_verify_csa', 'v8_linux64_gyp_rel_ng': 'gyp_release_x64', @@ -175,6 +191,8 @@ 'v8_linux64_sanitizer_coverage_rel': 'gyp_release_x64_asan_minimal_symbols_coverage', 'v8_linux64_tsan_rel': 'gn_release_x64_tsan_minimal_symbols', + 'v8_linux64_tsan_concurrent_marking_rel_ng': + 'gn_release_x64_tsan_concurrent_marking_minimal_symbols', 'v8_win_dbg': 'gn_debug_x86_trybot', 'v8_win_compile_dbg': 'gn_debug_x86_trybot', 'v8_win_rel_ng': 'gn_release_x86_trybot', @@ -234,6 +252,34 @@ 'gn', 'debug', 'simulate_mips64el', 'v8_enable_slow_dchecks'], 'default_release_mips64el': [ 'gn', 'release', 'simulate_mips64el'], + 'default_debug_ppc': [ + 'gn', 'debug', 'simulate_ppc', 'v8_enable_slow_dchecks', + 'v8_full_debug'], + 'default_optdebug_ppc': [ + 'gn', 'debug', 'simulate_ppc', 'v8_enable_slow_dchecks'], + 'default_release_ppc': [ + 'gn', 'release', 'simulate_ppc'], + 'default_debug_ppc64': [ + 'gn', 'debug', 'simulate_ppc64', 'v8_enable_slow_dchecks', + 'v8_full_debug'], + 'default_optdebug_ppc64': [ + 'gn', 'debug', 'simulate_ppc64', 'v8_enable_slow_dchecks'], + 'default_release_ppc64': [ + 'gn', 'release', 'simulate_ppc64'], + 'default_debug_s390': [ + 'gn', 'debug', 'simulate_s390', 'v8_enable_slow_dchecks', + 'v8_full_debug'], + 'default_optdebug_s390': [ + 'gn', 'debug', 'simulate_s390', 'v8_enable_slow_dchecks'], + 'default_release_s390': [ + 'gn', 'release', 'simulate_s390'], + 'default_debug_s390x': [ + 'gn', 'debug', 'simulate_s390x', 'v8_enable_slow_dchecks', + 'v8_full_debug'], + 'default_optdebug_s390x': [ + 'gn', 'debug', 'simulate_s390x', 'v8_enable_slow_dchecks'], + 'default_release_s390x': [ + 'gn', 'release', 'simulate_s390x'], 'default_debug_x64': [ 'gn', 'debug', 'x64', 'v8_enable_slow_dchecks', 'v8_full_debug'], 'default_optdebug_x64': [ @@ -258,7 +304,8 @@ 'gn_debug_simulate_arm64_asan_edge': [ 'gn', 'debug_bot', 'simulate_arm64', 'asan', 'lsan', 'edge'], 'gn_debug_simulate_arm64_no_snap': [ - 'gn', 'debug_bot', 'simulate_arm64', 'swarming', 'v8_snapshot_none'], + 'gn', 'debug', 'simulate_arm64', 'shared', 'goma', + 'v8_optimized_debug', 'swarming', 'v8_snapshot_none'], 'gn_debug_simulate_mipsel_asan_edge': [ 'gn', 'debug_bot', 'simulate_mipsel', 'asan', 'edge'], @@ -320,6 +367,12 @@ 'gn', 'release_trybot', 'x64', 'swarming'], 'gn_release_x64_tsan': [ 'gn', 'release_bot', 'x64', 'tsan', 'swarming'], + 'gn_release_x64_tsan_concurrent_marking': [ + 'gn', 'release_bot', 'x64', 'v8_enable_concurrent_marking', 'tsan', + 'swarming'], + 'gn_release_x64_tsan_concurrent_marking_minimal_symbols': [ + 'gn', 'release_bot', 'x64', 'v8_enable_concurrent_marking', 'tsan', + 'minimal_symbols', 'swarming'], 'gn_release_x64_tsan_minimal_symbols': [ 'gn', 'release_bot', 'x64', 'tsan', 'minimal_symbols', 'swarming'], 'gn_release_x64_valgrind': [ @@ -337,6 +390,8 @@ 'gn', 'debug_bot', 'x64', 'asan', 'lsan', 'edge'], 'gn_debug_x64_custom': [ 'gn', 'debug_bot', 'x64', 'swarming', 'v8_snapshot_custom'], + 'gn_debug_x64_gcc': [ + 'gn', 'debug_bot', 'x64', 'gcc'], 'gn_debug_x64_minimal_symbols': [ 'gn', 'debug_bot', 'x64', 'minimal_symbols', 'swarming'], 'gn_debug_x64_trybot': [ @@ -350,14 +405,15 @@ 'gn_debug_x86_minimal_symbols': [ 'gn', 'debug_bot', 'x86', 'minimal_symbols', 'swarming'], 'gn_debug_x86_no_i18n': [ - 'gn', 'debug_bot', 'x86', 'swarming', 'v8_disable_inspector', - 'v8_no_i18n'], + 'gn', 'debug_bot', 'x86', 'swarming', 'v8_no_i18n'], 'gn_debug_x86_no_snap': [ 'gn', 'debug_bot', 'x86', 'swarming', 'v8_snapshot_none'], 'gn_debug_x86_no_snap_trybot': [ 'gn', 'debug_trybot', 'x86', 'swarming', 'v8_snapshot_none'], 'gn_debug_x86_trybot': [ 'gn', 'debug_trybot', 'x86', 'swarming'], + 'gn_debug_x86_vtunejit': [ + 'gn', 'debug_bot', 'x86', 'v8_enable_vtunejit'], # GN release configs for x86. 'gn_release_x86': [ @@ -370,11 +426,12 @@ 'gn', 'release_bot', 'x86', 'gcmole', 'swarming'], 'gn_release_x86_gcmole_trybot': [ 'gn', 'release_trybot', 'x86', 'gcmole', 'swarming'], + 'gn_release_x86_interpreted_regexp': [ + 'gn', 'release_bot', 'x86', 'v8_interpreted_regexp'], 'gn_release_x86_minimal_symbols': [ 'gn', 'release_bot', 'x86', 'minimal_symbols', 'swarming'], 'gn_release_x86_no_i18n_trybot': [ - 'gn', 'release_trybot', 'x86', 'swarming', 'v8_disable_inspector', - 'v8_no_i18n'], + 'gn', 'release_trybot', 'x86', 'swarming', 'v8_no_i18n'], 'gn_release_x86_no_snap': [ 'gn', 'release_bot', 'x86', 'swarming', 'v8_snapshot_none'], 'gn_release_x86_no_snap_shared_minimal_symbols': [ @@ -382,6 +439,8 @@ 'v8_snapshot_none'], 'gn_release_x86_no_snap_trybot': [ 'gn', 'release_trybot', 'x86', 'swarming', 'v8_snapshot_none'], + 'gn_release_x86_predictable': [ + 'gn', 'release_bot', 'x86', 'v8_enable_verify_predictable'], 'gn_release_x86_shared_verify_heap': [ 'gn', 'release', 'x86', 'goma', 'shared', 'swarming', 'v8_verify_heap'], 'gn_release_x86_trybot': [ @@ -397,8 +456,6 @@ # Gyp debug configs for x86. 'gyp_debug_x86': [ 'gyp', 'debug_bot', 'x86', 'swarming'], - 'gyp_debug_x86_vtunejit': [ - 'gyp', 'debug_bot', 'x86', 'v8_enable_vtunejit'], 'gyp_full_debug_x86': [ 'gyp', 'debug', 'x86', 'goma', 'static', 'v8_enable_slow_dchecks', 'v8_full_debug'], @@ -432,10 +489,6 @@ # Gyp release configs for x86. 'gyp_release_x86_disassembler': [ 'gyp', 'release_bot', 'x86', 'v8_enable_disassembler'], - 'gyp_release_x86_interpreted_regexp': [ - 'gyp', 'release_bot', 'x86', 'v8_interpreted_regexp'], - 'gyp_release_x86_predictable': [ - 'gyp', 'release_bot', 'x86', 'v8_enable_verify_predictable'], }, 'mixins': { @@ -460,8 +513,8 @@ }, 'bb': { - 'gn_args': 'sanitizer_coverage_flags="bb"', - 'gyp_defines': 'sanitizer_coverage=bb', + 'gn_args': 'sanitizer_coverage_flags="bb,trace-pc-guard"', + 'gyp_defines': 'sanitizer_coverage=bb,trace-pc-guard', }, 'cfi': { @@ -510,8 +563,8 @@ }, 'edge': { - 'gn_args': 'sanitizer_coverage_flags="edge"', - 'gyp_defines': 'sanitizer_coverage=edge', + 'gn_args': 'sanitizer_coverage_flags="trace-pc-guard"', + 'gyp_defines': 'sanitizer_coverage=trace-pc-guard', }, 'gcc': { @@ -657,13 +710,12 @@ 'gyp_defines': 'v8_enable_i18n_support=0 icu_use_data_file_flag=0', }, - 'v8_correctness_fuzzer': { - 'gn_args': 'v8_correctness_fuzzer=true v8_multi_arch_build=true', + 'v8_enable_concurrent_marking': { + 'gn_args': 'v8_enable_concurrent_marking=true', }, - 'v8_disable_inspector': { - 'gn_args': 'v8_enable_inspector=false', - 'gyp_defines': 'v8_enable_inspector=0 ', + 'v8_correctness_fuzzer': { + 'gn_args': 'v8_correctness_fuzzer=true v8_multi_arch_build=true', }, 'v8_enable_disassembler': { diff --git a/deps/v8/src/DEPS b/deps/v8/src/DEPS index e9026b130d6bf3..bbf47e61071faf 100644 --- a/deps/v8/src/DEPS +++ b/deps/v8/src/DEPS @@ -1,6 +1,8 @@ include_rules = [ "+base/trace_event/common/trace_event_common.h", "+src", + "-src/asmjs", + "+src/asmjs/asm-js.h", "-src/compiler", "+src/compiler/pipeline.h", "+src/compiler/code-assembler.h", @@ -18,6 +20,9 @@ include_rules = [ "+src/interpreter/bytecode-register.h", "+src/interpreter/bytecodes.h", "+src/interpreter/interpreter.h", + "+src/interpreter/setup-interpreter.h", + "-src/trap-handler", + "+src/trap-handler/trap-handler.h", "+testing/gtest/include/gtest/gtest_prod.h", "-src/libplatform", "-include/libplatform" diff --git a/deps/v8/src/OWNERS b/deps/v8/src/OWNERS index 94b7fbb32e7b9a..8bbbab6ecb7287 100644 --- a/deps/v8/src/OWNERS +++ b/deps/v8/src/OWNERS @@ -1,4 +1,5 @@ -per-file i18n.*=cira@chromium.org -per-file i18n.*=mnita@google.com +per-file intl.*=cira@chromium.org +per-file intl.*=mnita@google.com +per-file intl.*=jshin@chromium.org per-file typing-asm.*=aseemgarg@chromium.org per-file typing-asm.*=bradnelson@chromium.org diff --git a/deps/v8/src/accessors.cc b/deps/v8/src/accessors.cc index 1f2ce97240f5d1..98f780d5895dbd 100644 --- a/deps/v8/src/accessors.cc +++ b/deps/v8/src/accessors.cc @@ -681,23 +681,6 @@ static Handle GetFunctionPrototype(Isolate* isolate, return Handle(function->prototype(), isolate); } - -MUST_USE_RESULT static MaybeHandle SetFunctionPrototype( - Isolate* isolate, Handle function, Handle value) { - JSFunction::SetPrototype(function, value); - DCHECK(function->prototype() == *value); - return function; -} - - -MaybeHandle Accessors::FunctionSetPrototype(Handle function, - Handle prototype) { - DCHECK(function->IsConstructor()); - Isolate* isolate = function->GetIsolate(); - return SetFunctionPrototype(isolate, function, prototype); -} - - void Accessors::FunctionPrototypeGetter( v8::Local name, const v8::PropertyCallbackInfo& info) { @@ -719,11 +702,8 @@ void Accessors::FunctionPrototypeSetter( Handle value = Utils::OpenHandle(*val); Handle object = Handle::cast(Utils::OpenHandle(*info.Holder())); - if (SetFunctionPrototype(isolate, object, value).is_null()) { - isolate->OptionalRescheduleException(false); - } else { - info.GetReturnValue().Set(true); - } + JSFunction::SetPrototype(object, value); + info.GetReturnValue().Set(true); } diff --git a/deps/v8/src/accessors.h b/deps/v8/src/accessors.h index a4d51fd18abfc4..52420d91de347d 100644 --- a/deps/v8/src/accessors.h +++ b/deps/v8/src/accessors.h @@ -90,8 +90,6 @@ class Accessors : public AllStatic { }; // Accessor functions called directly from the runtime system. - MUST_USE_RESULT static MaybeHandle FunctionSetPrototype( - Handle object, Handle value); static Handle FunctionGetArguments(Handle object); // Returns true for properties that are accessors to object fields. diff --git a/deps/v8/src/api-arguments.h b/deps/v8/src/api-arguments.h index 6c9ad7ad6b93f2..ca7b4833e9947e 100644 --- a/deps/v8/src/api-arguments.h +++ b/deps/v8/src/api-arguments.h @@ -7,6 +7,7 @@ #include "src/api.h" #include "src/isolate.h" +#include "src/visitors.h" namespace v8 { namespace internal { @@ -17,8 +18,8 @@ namespace internal { template class CustomArgumentsBase : public Relocatable { public: - virtual inline void IterateInstance(ObjectVisitor* v) { - v->VisitPointers(values_, values_ + kArrayLength); + virtual inline void IterateInstance(RootVisitor* v) { + v->VisitRootPointers(Root::kRelocatable, values_, values_ + kArrayLength); } protected: diff --git a/deps/v8/src/api-natives.cc b/deps/v8/src/api-natives.cc index 045ff470ab232e..ef51f950a5ecb8 100644 --- a/deps/v8/src/api-natives.cc +++ b/deps/v8/src/api-natives.cc @@ -36,7 +36,8 @@ class InvokeScope { MaybeHandle InstantiateObject(Isolate* isolate, Handle data, Handle new_target, - bool is_hidden_prototype); + bool is_hidden_prototype, + bool is_prototype); MaybeHandle InstantiateFunction(Isolate* isolate, Handle data, @@ -49,7 +50,7 @@ MaybeHandle Instantiate(Isolate* isolate, Handle data, Handle::cast(data), name); } else if (data->IsObjectTemplateInfo()) { return InstantiateObject(isolate, Handle::cast(data), - Handle(), false); + Handle(), false, false); } else { return data; } @@ -260,14 +261,25 @@ MaybeHandle ConfigureInstance(Isolate* isolate, Handle obj, return obj; } +// Whether or not to cache every instance: when we materialize a getter or +// setter from an lazy AccessorPair, we rely on this cache to be able to always +// return the same getter or setter. However, objects will be cloned anyways, +// so it's not observable if we didn't cache an instance. Furthermore, a badly +// behaved embedder might create an unlimited number of objects, so we limit +// the cache for those cases. +enum class CachingMode { kLimited, kUnlimited }; + MaybeHandle ProbeInstantiationsCache(Isolate* isolate, - int serial_number) { + int serial_number, + CachingMode caching_mode) { DCHECK_LE(1, serial_number); if (serial_number <= TemplateInfo::kFastTemplateInstantiationsCacheSize) { Handle fast_cache = isolate->fast_template_instantiations_cache(); return fast_cache->GetValue(isolate, serial_number - 1); - } else { + } else if (caching_mode == CachingMode::kUnlimited || + (serial_number <= + TemplateInfo::kSlowTemplateInstantiationsCacheSize)) { Handle slow_cache = isolate->slow_template_instantiations_cache(); int entry = slow_cache->FindEntry(serial_number); @@ -275,10 +287,13 @@ MaybeHandle ProbeInstantiationsCache(Isolate* isolate, return MaybeHandle(); } return handle(JSObject::cast(slow_cache->ValueAt(entry)), isolate); + } else { + return MaybeHandle(); } } void CacheTemplateInstantiation(Isolate* isolate, int serial_number, + CachingMode caching_mode, Handle object) { DCHECK_LE(1, serial_number); if (serial_number <= TemplateInfo::kFastTemplateInstantiationsCacheSize) { @@ -290,7 +305,9 @@ void CacheTemplateInstantiation(Isolate* isolate, int serial_number, isolate->native_context()->set_fast_template_instantiations_cache( *new_cache); } - } else { + } else if (caching_mode == CachingMode::kUnlimited || + (serial_number <= + TemplateInfo::kSlowTemplateInstantiationsCacheSize)) { Handle cache = isolate->slow_template_instantiations_cache(); auto new_cache = @@ -302,14 +319,17 @@ void CacheTemplateInstantiation(Isolate* isolate, int serial_number, } } -void UncacheTemplateInstantiation(Isolate* isolate, int serial_number) { +void UncacheTemplateInstantiation(Isolate* isolate, int serial_number, + CachingMode caching_mode) { DCHECK_LE(1, serial_number); if (serial_number <= TemplateInfo::kFastTemplateInstantiationsCacheSize) { Handle fast_cache = isolate->fast_template_instantiations_cache(); DCHECK(!fast_cache->get(serial_number - 1)->IsUndefined(isolate)); fast_cache->set_undefined(serial_number - 1); - } else { + } else if (caching_mode == CachingMode::kUnlimited || + (serial_number <= + TemplateInfo::kSlowTemplateInstantiationsCacheSize)) { Handle cache = isolate->slow_template_instantiations_cache(); int entry = cache->FindEntry(serial_number); @@ -338,7 +358,8 @@ bool IsSimpleInstantiation(Isolate* isolate, ObjectTemplateInfo* info, MaybeHandle InstantiateObject(Isolate* isolate, Handle info, Handle new_target, - bool is_hidden_prototype) { + bool is_hidden_prototype, + bool is_prototype) { Handle constructor; int serial_number = Smi::cast(info->serial_number())->value(); if (!new_target.is_null()) { @@ -352,7 +373,8 @@ MaybeHandle InstantiateObject(Isolate* isolate, // Fast path. Handle result; if (serial_number) { - if (ProbeInstantiationsCache(isolate, serial_number).ToHandle(&result)) { + if (ProbeInstantiationsCache(isolate, serial_number, CachingMode::kLimited) + .ToHandle(&result)) { return isolate->factory()->CopyJSObject(result); } } @@ -379,19 +401,27 @@ MaybeHandle InstantiateObject(Isolate* isolate, Handle object; ASSIGN_RETURN_ON_EXCEPTION(isolate, object, JSObject::New(constructor, new_target), JSObject); + + if (is_prototype) JSObject::OptimizeAsPrototype(object, FAST_PROTOTYPE); + ASSIGN_RETURN_ON_EXCEPTION( isolate, result, ConfigureInstance(isolate, object, info, is_hidden_prototype), JSObject); if (info->immutable_proto()) { JSObject::SetImmutableProto(object); } - // TODO(dcarney): is this necessary? - JSObject::MigrateSlowToFast(result, 0, "ApiNatives::InstantiateObject"); - - if (serial_number) { - CacheTemplateInstantiation(isolate, serial_number, result); - result = isolate->factory()->CopyJSObject(result); + if (!is_prototype) { + // Keep prototypes in slow-mode. Let them be lazily turned fast later on. + // TODO(dcarney): is this necessary? + JSObject::MigrateSlowToFast(result, 0, "ApiNatives::InstantiateObject"); + // Don't cache prototypes. + if (serial_number) { + CacheTemplateInstantiation(isolate, serial_number, CachingMode::kLimited, + result); + result = isolate->factory()->CopyJSObject(result); + } } + return result; } @@ -424,7 +454,9 @@ MaybeHandle InstantiateFunction(Isolate* isolate, int serial_number = Smi::cast(data->serial_number())->value(); if (serial_number) { Handle result; - if (ProbeInstantiationsCache(isolate, serial_number).ToHandle(&result)) { + if (ProbeInstantiationsCache(isolate, serial_number, + CachingMode::kUnlimited) + .ToHandle(&result)) { return Handle::cast(result); } } @@ -446,7 +478,7 @@ MaybeHandle InstantiateFunction(Isolate* isolate, InstantiateObject( isolate, handle(ObjectTemplateInfo::cast(prototype_templ), isolate), - Handle(), data->hidden_prototype()), + Handle(), data->hidden_prototype(), true), JSFunction); } Object* parent = data->parent_template(); @@ -466,14 +498,16 @@ MaybeHandle InstantiateFunction(Isolate* isolate, } if (serial_number) { // Cache the function. - CacheTemplateInstantiation(isolate, serial_number, function); + CacheTemplateInstantiation(isolate, serial_number, CachingMode::kUnlimited, + function); } MaybeHandle result = ConfigureInstance(isolate, function, data, data->hidden_prototype()); if (result.is_null()) { // Uncache on error. if (serial_number) { - UncacheTemplateInstantiation(isolate, serial_number); + UncacheTemplateInstantiation(isolate, serial_number, + CachingMode::kUnlimited); } return MaybeHandle(); } @@ -514,7 +548,8 @@ MaybeHandle ApiNatives::InstantiateObject( Handle data, Handle new_target) { Isolate* isolate = data->GetIsolate(); InvokeScope invoke_scope(isolate); - return ::v8::internal::InstantiateObject(isolate, data, new_target, false); + return ::v8::internal::InstantiateObject(isolate, data, new_target, false, + false); } MaybeHandle ApiNatives::InstantiateRemoteObject( @@ -524,22 +559,14 @@ MaybeHandle ApiNatives::InstantiateRemoteObject( Handle constructor( FunctionTemplateInfo::cast(data->constructor())); - Handle shared = - FunctionTemplateInfo::GetOrCreateSharedFunctionInfo(isolate, constructor); - Handle initial_map = isolate->factory()->CreateSloppyFunctionMap( - FUNCTION_WITH_WRITEABLE_PROTOTYPE); - Handle object_function = - isolate->factory()->NewFunctionFromSharedFunctionInfo( - initial_map, shared, isolate->factory()->undefined_value()); Handle object_map = isolate->factory()->NewMap( JS_SPECIAL_API_OBJECT_TYPE, - JSObject::kHeaderSize + data->internal_field_count() * kPointerSize, + JSObject::kHeaderSize + data->embedder_field_count() * kPointerSize, FAST_HOLEY_SMI_ELEMENTS); - JSFunction::SetInitialMap(object_function, object_map, - isolate->factory()->null_value()); + object_map->SetConstructor(*constructor); object_map->set_is_access_check_needed(true); - Handle object = isolate->factory()->NewJSObject(object_function); + Handle object = isolate->factory()->NewJSObjectFromMap(object_map); JSObject::ForceSetPrototype(object, isolate->factory()->null_value()); return object; @@ -629,18 +656,18 @@ Handle ApiNatives::CreateApiFunction( DONT_ENUM); } - int internal_field_count = 0; + int embedder_field_count = 0; bool immutable_proto = false; if (!obj->instance_template()->IsUndefined(isolate)) { Handle instance_template = Handle( ObjectTemplateInfo::cast(obj->instance_template())); - internal_field_count = instance_template->internal_field_count(); + embedder_field_count = instance_template->embedder_field_count(); immutable_proto = instance_template->immutable_proto(); } // TODO(svenpanne) Kill ApiInstanceType and refactor things by generalizing // JSObject::GetHeaderSize. - int instance_size = kPointerSize * internal_field_count; + int instance_size = kPointerSize * embedder_field_count; InstanceType type; switch (instance_type) { case JavaScriptObjectType: diff --git a/deps/v8/src/api.cc b/deps/v8/src/api.cc index 2610dc17104822..7699bc87ec8490 100644 --- a/deps/v8/src/api.cc +++ b/deps/v8/src/api.cc @@ -25,11 +25,11 @@ #include "src/base/safe_conversions.h" #include "src/base/utils/random-number-generator.h" #include "src/bootstrapper.h" +#include "src/builtins/builtins-utils.h" #include "src/char-predicates-inl.h" #include "src/code-stubs.h" #include "src/compiler-dispatcher/compiler-dispatcher.h" #include "src/compiler.h" -#include "src/context-measure.h" #include "src/contexts.h" #include "src/conversions-inl.h" #include "src/counters.h" @@ -67,6 +67,7 @@ #include "src/snapshot/snapshot.h" #include "src/startup-data-util.h" #include "src/tracing/trace-event.h" +#include "src/trap-handler/trap-handler.h" #include "src/unicode-inl.h" #include "src/v8.h" #include "src/v8threads.h" @@ -84,7 +85,7 @@ namespace v8 { isolate, &i::RuntimeCallStats::API_##class_name##_##function_name); \ LOG(isolate, ApiEntryCall("v8::" #class_name "::" #function_name)) -#define ENTER_V8(isolate) i::VMState __state__((isolate)) +#define ENTER_V8_DO_NOT_USE(isolate) i::VMState __state__((isolate)) #define PREPARE_FOR_EXECUTION_GENERIC(isolate, context, class_name, \ function_name, bailout_value, \ @@ -95,7 +96,7 @@ namespace v8 { HandleScopeClass handle_scope(isolate); \ CallDepthScope call_depth_scope(isolate, context); \ LOG_API(isolate, class_name, function_name); \ - ENTER_V8(isolate); \ + ENTER_V8_DO_NOT_USE(isolate); \ bool has_pending_exception = false #define PREPARE_FOR_DEBUG_INTERFACE_EXECUTION_WITH_ISOLATE(isolate, T) \ @@ -104,7 +105,7 @@ namespace v8 { } \ InternalEscapableScope handle_scope(isolate); \ CallDepthScope call_depth_scope(isolate, v8::Local()); \ - ENTER_V8(isolate); \ + ENTER_V8_DO_NOT_USE(isolate); \ bool has_pending_exception = false #define PREPARE_FOR_EXECUTION_WITH_CONTEXT(context, class_name, function_name, \ @@ -231,17 +232,20 @@ class CallDepthScope { i::Handle env = Utils::OpenHandle(*context); i::HandleScopeImplementer* impl = isolate->handle_scope_implementer(); if (isolate->context() != nullptr && - isolate->context()->native_context() == env->native_context() && - impl->LastEnteredContextWas(env)) { + isolate->context()->native_context() == env->native_context()) { context_ = Local(); } else { - context_->Enter(); + impl->SaveContext(isolate->context()); + isolate->set_context(*env); } } if (do_callback) isolate_->FireBeforeCallEnteredCallback(); } ~CallDepthScope() { - if (!context_.IsEmpty()) context_->Exit(); + if (!context_.IsEmpty()) { + i::HandleScopeImplementer* impl = isolate_->handle_scope_implementer(); + isolate_->set_context(impl->RestoreContext()); + } if (!escaped_) isolate_->handle_scope_implementer()->DecrementCallDepth(); if (do_callback) isolate_->FireCallCompletedCallback(); #ifdef DEBUG @@ -437,14 +441,20 @@ void V8::SetSnapshotDataBlob(StartupData* snapshot_blob) { i::V8::SetSnapshotBlob(snapshot_blob); } -void* v8::ArrayBuffer::Allocator::Reserve(size_t length) { - UNIMPLEMENTED(); - return nullptr; -} +void* v8::ArrayBuffer::Allocator::Reserve(size_t length) { UNIMPLEMENTED(); } void v8::ArrayBuffer::Allocator::Free(void* data, size_t length, AllocationMode mode) { - UNIMPLEMENTED(); + switch (mode) { + case AllocationMode::kNormal: { + Free(data, length); + return; + } + case AllocationMode::kReservation: { + UNIMPLEMENTED(); + return; + } + } } void v8::ArrayBuffer::Allocator::SetProtection( @@ -463,6 +473,39 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { } virtual void* AllocateUninitialized(size_t length) { return malloc(length); } virtual void Free(void* data, size_t) { free(data); } + + virtual void* Reserve(size_t length) { + return base::VirtualMemory::ReserveRegion(length); + } + + virtual void Free(void* data, size_t length, + v8::ArrayBuffer::Allocator::AllocationMode mode) { + switch (mode) { + case v8::ArrayBuffer::Allocator::AllocationMode::kNormal: { + return Free(data, length); + } + case v8::ArrayBuffer::Allocator::AllocationMode::kReservation: { + base::VirtualMemory::ReleaseRegion(data, length); + return; + } + } + } + + virtual void SetProtection( + void* data, size_t length, + v8::ArrayBuffer::Allocator::Protection protection) { + switch (protection) { + case v8::ArrayBuffer::Allocator::Protection::kNoAccess: { + base::VirtualMemory::UncommitRegion(data, length); + return; + } + case v8::ArrayBuffer::Allocator::Protection::kReadWrite: { + const bool is_executable = false; + base::VirtualMemory::CommitRegion(data, length, is_executable); + return; + } + } + } }; bool RunExtraCode(Isolate* isolate, Local context, @@ -510,7 +553,7 @@ struct SnapshotCreatorData { Persistent default_context_; PersistentValueVector contexts_; PersistentValueVector