Improve column number tracking

- simplify column number tracking using a pointer to the beginning of line
  instead of `eol` + `mark`.
- add `js_parse_error_pos` to report syntax errors with exact source position
  for token parsing errors. This makes the syntax error reports much more precise.
  eg: exact position of UTF-8 encoding error, invalid escape sequence, etc.
- add `JSSourcePos` type to use single opaque object for token source position
- add `emit_pos` to set the precise source position in code generation
- change `emit_op` to no longer emit source positions from `s->last_line_num` and `s->last_col_num`.
- remove `last_line_num` and `last_col_num` `JSParserState` members
- runtime errors on calls report the column number of calling function or method name.
- runtime errors on `new` expressions report the column number of the `neẁ` keyword.
- do not show source position in backtrace if debug information is missing
- fix spurious parsing bugs when `js_parse_skip_parens_token` could not reparse
  the current token because of stack overflow detection.
- `js_parse_save_pos` now saves the current token and `js_parse_seek_back` always
  restores the token, hence never fails, while `js_parse_seek_token` reparses the
  saved token. This is needed to handle the weird semantics of `"\1"; "use strict";`
- simplify html comment detection
- update **tests/test_builtin,js** with more informative messages
- improve `assert()` and **tests/test_language.js** tests
- update **v8.txt** for updated column numbers in remaining errors
This commit is contained in:
Charlie Gordon 2024-05-15 07:43:16 +02:00
parent 3eaea6c4cf
commit 59462214cb
8 changed files with 1930 additions and 1722 deletions

View file

@ -2,9 +2,9 @@
#include "quickjs-libc.h"
const uint32_t qjsc_function_source_size = 384;
const uint32_t qjsc_function_source_size = 404;
const uint8_t qjsc_function_source[384] = {
const uint8_t qjsc_function_source[404] = {
0x0c, 0x06, 0x0c, 0x61, 0x63, 0x74, 0x75, 0x61,
0x6c, 0x02, 0x66, 0x30, 0x74, 0x65, 0x73, 0x74,
0x73, 0x2f, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69,
@ -23,7 +23,7 @@ const uint8_t qjsc_function_source[384] = {
0xe0, 0x01, 0x00, 0x01, 0x00, 0x0c, 0x43, 0xfa,
0x01, 0xb4, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0x03, 0x00, 0xbb, 0x2a, 0x28, 0xb6, 0x03,
0x03, 0x01, 0x04, 0x02, 0x1e, 0x0c, 0x0e, 0x1a,
0x03, 0x01, 0x04, 0x02, 0x2c, 0x0c, 0x0d, 0x1a,
0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x20, 0x66, 0x28, 0x29, 0x20, 0x7b, 0x20, 0x72,
0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x34, 0x32,
@ -47,12 +47,15 @@ const uint8_t qjsc_function_source[384] = {
0x38, 0xdc, 0x00, 0x00, 0x00, 0xaf, 0xe9, 0x0b,
0x38, 0x92, 0x00, 0x00, 0x00, 0x62, 0x03, 0x00,
0xee, 0x2f, 0x68, 0x03, 0x00, 0x68, 0x02, 0x00,
0xc4, 0x28, 0xb6, 0x03, 0x01, 0x01, 0x28, 0x60,
0x01, 0x49, 0x02, 0x21, 0x1a, 0x1b, 0x04, 0x1e,
0x1d, 0x12, 0x26, 0x49, 0x1d, 0x0c, 0x06, 0x11,
0x18, 0x2a, 0x1c, 0x37, 0x41, 0x21, 0x1c, 0x34,
0x18, 0x1b, 0x04, 0x26, 0x11, 0x3f, 0x1d, 0x0c,
0x06, 0x11, 0x18, 0x2a, 0x1c, 0x53, 0x41, 0x00,
0xc4, 0x28, 0xb6, 0x03, 0x01, 0x01, 0x3c, 0xc6,
0x1e, 0x1b, 0x03, 0x00, 0x08, 0x08, 0x0c, 0x1b,
0x04, 0x2a, 0x07, 0x12, 0x11, 0x11, 0x16, 0x1b,
0x07, 0x11, 0x24, 0x1b, 0x0c, 0x11, 0x0b, 0x07,
0x0b, 0x00, 0x07, 0x08, 0x19, 0x1b, 0x0a, 0x1b,
0x12, 0x1b, 0x03, 0x07, 0x17, 0x1b, 0x03, 0x08,
0x0e, 0x11, 0x04, 0x2a, 0x07, 0x12, 0x11, 0x11,
0x16, 0x1b, 0x07, 0x11, 0x24, 0x1b, 0x0c, 0x11,
0x0b, 0x07, 0x0b, 0x00,
};
static JSContext *JS_NewCustomContext(JSRuntime *rt)

View file

@ -2,9 +2,9 @@
#include "quickjs-libc.h"
const uint32_t qjsc_hello_size = 89;
const uint32_t qjsc_hello_size = 95;
const uint8_t qjsc_hello[89] = {
const uint8_t qjsc_hello[95] = {
0x0c, 0x04, 0x0e, 0x63, 0x6f, 0x6e, 0x73, 0x6f,
0x6c, 0x65, 0x06, 0x6c, 0x6f, 0x67, 0x16, 0x48,
0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x57, 0x6f, 0x72,
@ -15,8 +15,8 @@ const uint8_t qjsc_hello[89] = {
0x14, 0x01, 0xa0, 0x01, 0x00, 0x00, 0x00, 0x38,
0xd9, 0x00, 0x00, 0x00, 0x42, 0xda, 0x00, 0x00,
0x00, 0x04, 0xdb, 0x00, 0x00, 0x00, 0x24, 0x01,
0x00, 0xcc, 0x28, 0xb8, 0x03, 0x01, 0x01, 0x00,
0x00,
0x00, 0xcc, 0x28, 0xb8, 0x03, 0x01, 0x01, 0x06,
0x1b, 0x10, 0x1b, 0x08, 0x1b, 0x07, 0x00,
};
static JSContext *JS_NewCustomContext(JSRuntime *rt)

View file

@ -2,9 +2,9 @@
#include "quickjs-libc.h"
const uint32_t qjsc_fib_module_size = 310;
const uint32_t qjsc_fib_module_size = 316;
const uint8_t qjsc_fib_module[310] = {
const uint8_t qjsc_fib_module[316] = {
0x0c, 0x03, 0x2c, 0x65, 0x78, 0x61, 0x6d, 0x70,
0x6c, 0x65, 0x73, 0x2f, 0x66, 0x69, 0x62, 0x5f,
0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x6a,
@ -19,36 +19,37 @@ const uint8_t qjsc_fib_module[310] = {
0xb3, 0x28, 0xd0, 0xb4, 0xac, 0xe9, 0x03, 0xb4,
0x28, 0xdc, 0xd0, 0xb4, 0x9e, 0xee, 0xdc, 0xd0,
0xb5, 0x9e, 0xee, 0x9d, 0x28, 0xb2, 0x03, 0x02,
0x08, 0x20, 0x04, 0x00, 0x07, 0x06, 0x07, 0x06,
0x12, 0x09, 0x08, 0x07, 0x07, 0x10, 0x07, 0x06,
0x07, 0x06, 0x12, 0x13, 0x08, 0x07, 0x08, 0x16,
0x0c, 0x0c, 0x07, 0x04, 0x0c, 0x0a, 0x0c, 0x0c,
0x07, 0x04, 0x8d, 0x01, 0x66, 0x75, 0x6e, 0x63,
0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x69, 0x62,
0x28, 0x6e, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20,
0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x6e, 0x20,
0x3c, 0x3d, 0x20, 0x30, 0x29, 0x0a, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65,
0x74, 0x75, 0x72, 0x6e, 0x20, 0x30, 0x3b, 0x0a,
0x20, 0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65,
0x20, 0x69, 0x66, 0x20, 0x28, 0x6e, 0x20, 0x3d,
0x3d, 0x20, 0x31, 0x29, 0x0a, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74,
0x75, 0x72, 0x6e, 0x20, 0x31, 0x3b, 0x0a, 0x20,
0x20, 0x20, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x0a,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66,
0x69, 0x62, 0x28, 0x6e, 0x20, 0x2d, 0x20, 0x31,
0x29, 0x20, 0x2b, 0x20, 0x66, 0x69, 0x62, 0x28,
0x6e, 0x20, 0x2d, 0x20, 0x32, 0x29, 0x3b, 0x0a,
0x7d, 0x08, 0xe9, 0x05, 0xbe, 0x00, 0xe0, 0x29,
0x06, 0x2e, 0xb2, 0x03, 0x01, 0x01, 0x06, 0x01,
0x01, 0x00, 0x07, 0x14, 0x02, 0x00,
0x08, 0x2c, 0x04, 0x02, 0x07, 0x0a, 0x07, 0x05,
0x12, 0x0a, 0x07, 0x0d, 0x08, 0x0a, 0x07, 0x0a,
0x07, 0x05, 0x12, 0x00, 0x07, 0x0d, 0x09, 0x0e,
0x07, 0x08, 0x07, 0x08, 0x07, 0x03, 0x07, 0x0b,
0x07, 0x1a, 0x07, 0x08, 0x07, 0x08, 0x07, 0x03,
0x07, 0x0b, 0x07, 0x03, 0x07, 0x23, 0x8d, 0x01,
0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x20, 0x66, 0x69, 0x62, 0x28, 0x6e, 0x29, 0x0a,
0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66,
0x20, 0x28, 0x6e, 0x20, 0x3c, 0x3d, 0x20, 0x30,
0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e,
0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20,
0x65, 0x6c, 0x73, 0x65, 0x20, 0x69, 0x66, 0x20,
0x28, 0x6e, 0x20, 0x3d, 0x3d, 0x20, 0x31, 0x29,
0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20,
0x31, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65,
0x6c, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75,
0x72, 0x6e, 0x20, 0x66, 0x69, 0x62, 0x28, 0x6e,
0x20, 0x2d, 0x20, 0x31, 0x29, 0x20, 0x2b, 0x20,
0x66, 0x69, 0x62, 0x28, 0x6e, 0x20, 0x2d, 0x20,
0x32, 0x29, 0x3b, 0x0a, 0x7d, 0x08, 0xe9, 0x05,
0xbe, 0x00, 0xe0, 0x29, 0x06, 0x2e, 0xb2, 0x03,
0x01, 0x01, 0x00, 0x00,
};
const uint32_t qjsc_hello_module_size = 177;
const uint32_t qjsc_hello_module_size = 191;
const uint8_t qjsc_hello_module[177] = {
const uint8_t qjsc_hello_module[191] = {
0x0c, 0x07, 0x30, 0x65, 0x78, 0x61, 0x6d, 0x70,
0x6c, 0x65, 0x73, 0x2f, 0x68, 0x65, 0x6c, 0x6c,
0x6f, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65,
@ -69,9 +70,10 @@ const uint8_t qjsc_hello_module[177] = {
0x00, 0x00, 0x00, 0x42, 0xdd, 0x00, 0x00, 0x00,
0x04, 0xdf, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00,
0xbb, 0x0a, 0xee, 0x24, 0x02, 0x00, 0x0e, 0x06,
0x2e, 0xb2, 0x03, 0x01, 0x01, 0x0a, 0x01, 0x01,
0x00, 0x04, 0x0a, 0x02, 0x62, 0x00, 0x4d, 0x30,
0x00,
0x2e, 0xb2, 0x03, 0x01, 0x01, 0x18, 0x00, 0x04,
0x08, 0x00, 0x1b, 0x10, 0x1b, 0x08, 0x1b, 0x07,
0x17, 0x0f, 0x1b, 0x10, 0x1b, 0x08, 0x1b, 0x18,
0x11, 0x08, 0x0c, 0x07, 0x07, 0x1f, 0x00,
};
static JSContext *JS_NewCustomContext(JSRuntime *rt)

2815
gen/repl.c

File diff suppressed because it is too large Load diff

View file

@ -2,9 +2,9 @@
#include "quickjs-libc.h"
const uint32_t qjsc_test_fib_size = 166;
const uint32_t qjsc_test_fib_size = 180;
const uint8_t qjsc_test_fib[166] = {
const uint8_t qjsc_test_fib[180] = {
0x0c, 0x07, 0x28, 0x65, 0x78, 0x61, 0x6d, 0x70,
0x6c, 0x65, 0x73, 0x2f, 0x74, 0x65, 0x73, 0x74,
0x5f, 0x66, 0x69, 0x62, 0x2e, 0x6a, 0x73, 0x10,
@ -24,8 +24,10 @@ const uint8_t qjsc_test_fib[166] = {
0x42, 0xdd, 0x00, 0x00, 0x00, 0x04, 0xdf, 0x00,
0x00, 0x00, 0x65, 0x00, 0x00, 0xbb, 0x0a, 0xee,
0x24, 0x02, 0x00, 0x0e, 0x06, 0x2e, 0xb2, 0x03,
0x01, 0x01, 0x0a, 0x01, 0x01, 0x00, 0x04, 0x0a,
0x02, 0x62, 0x00, 0x4d, 0x30, 0x00,
0x01, 0x01, 0x18, 0x00, 0x04, 0x08, 0x00, 0x1b,
0x10, 0x1b, 0x08, 0x1b, 0x07, 0x17, 0x0f, 0x1b,
0x10, 0x1b, 0x08, 0x1b, 0x18, 0x11, 0x08, 0x0c,
0x07, 0x07, 0x1f, 0x00,
};
static JSContext *JS_NewCustomContext(JSRuntime *rt)

513
quickjs.c

File diff suppressed because it is too large Load diff

View file

@ -6,12 +6,12 @@ function test_exception_source_pos()
var e;
try {
throw new Error(""); // line 9, column 19
throw new Error(""); // line 9, column 15, token 'new'
} catch(_e) {
e = _e;
}
assert(e.stack.includes("test_builtin.js:9:19"));
// XXX: Should be the position of the `new` keyword or the `Error` constructor name ?
assert(e.stack.includes("test_builtin.js:9:15"), true, "expected test_builtin.js:9:15, got\n" + e.stack);
}
// Keep this at the top; it tests source positions.
@ -19,9 +19,9 @@ function test_function_source_pos() // line 18, column 1
{
function inner() {} // line 20, column 5
var f = eval("function f() {} f");
assert(`${test_function_source_pos.lineNumber}:${test_function_source_pos.columnNumber}`, "18:1");
assert(`${inner.lineNumber}:${inner.columnNumber}`, "20:5");
assert(`${f.lineNumber}:${f.columnNumber}`, "1:1");
assert(`${test_function_source_pos.lineNumber}:${test_function_source_pos.columnNumber}`, "18:1", "invalid test_function_source_pos function position");
assert(`${inner.lineNumber}:${inner.columnNumber}`, "20:5", "invalid inner function position");
assert(`${f.lineNumber}:${f.columnNumber}`, "1:1", "invalid f function position");
}
// Keep this at the top; it tests source positions.
@ -35,18 +35,18 @@ function test_exception_prepare_stack()
};
try {
throw new Error(""); // line 38, column 19
throw new Error(""); // line 38, column 15, token 'new'
} catch(_e) {
e = _e;
}
assert(e.stack.length === 2);
assert(e.stack.length, 2, "e.stack.length");
const f = e.stack[0];
assert(f.getFunctionName() === 'test_exception_prepare_stack');
assert(f.getFileName() === 'tests/test_builtin.js');
assert(f.getLineNumber() === 38);
assert(f.getColumnNumber() === 19);
assert(!f.isNative());
assert(f.getFunctionName(), 'test_exception_prepare_stack', 'f.getFunctionName()');
assert(f.getFileName(), 'tests/test_builtin.js', 'f.getFileName()');
assert(f.getLineNumber(), 38, 'f.getLineNumber()');
assert(f.getColumnNumber(), 15, 'f.getColumnNumber()');
assert(f.isNative(), false, 'f.isNative()');
Error.prepareStackTrace = undefined;
}
@ -63,27 +63,36 @@ function test_exception_stack_size_limit()
};
try {
throw new Error(""); // line 66, column 19
throw new Error(""); // line 66, column 15, token 'new'
} catch(_e) {
e = _e;
}
assert(e.stack.length === 1);
assert(e.stack.length, 1, 'e.stack.length');
const f = e.stack[0];
assert(f.getFunctionName() === 'test_exception_stack_size_limit');
assert(f.getFileName() === 'tests/test_builtin.js');
assert(f.getLineNumber() === 66);
assert(f.getColumnNumber() === 19);
assert(!f.isNative());
assert(f.getFunctionName(), 'test_exception_stack_size_limit', 'f.getFunctionName()');
assert(f.getFileName(), 'tests/test_builtin.js', 'f.getFileName()');
assert(f.getLineNumber(), 66, 'f.getLineNumber()');
assert(f.getColumnNumber(), 15, 'f.getColumnNumber()');
assert(f.isNative(), false, 'f.isNative()');
Error.stackTraceLimit = 10;
Error.prepareStackTrace = undefined;
}
function value_string(o) {
if (typeof o === 'object' && o !== null)
return o.toString();
else
return "" + o;
}
function assert(actual, expected, message) {
if (arguments.length == 1)
expected = true;
message = (arguments.length >= 3) ? " (" + message + ")" : "";
if (typeof actual === typeof expected) {
if (actual === expected) {
if (actual !== 0 || (1 / actual) === (1 / expected))
@ -100,9 +109,9 @@ function assert(actual, expected, message) {
return;
}
}
throw Error("assertion failed: got |" + actual + "|" +
", expected |" + expected + "|" +
(message ? " (" + message + ")" : ""));
throw Error("assertion failed: " +
"got |" + value_string(actual) + "|, " +
"expected |" + value_string(expected) + "|" + message);
}
function assert_throws(expected_error, func)
@ -160,16 +169,16 @@ function test_function()
}));
r = new Function("a", "b", "return a + b;");
assert(r(2,3), 5, "function");
assert(r(2,3), 5, 'r(2,3)');
g = f.bind(1, 2);
assert(g.length, 1);
assert(g.name, "bound f");
assert(g(3), [1,2,3]);
assert(g.length, 1, 'g.length');
assert(g.name, "bound f", 'g.name');
assert(g(3), [1,2,3], 'g(3)');
g = constructor1.bind(null, 1);
r = new g();
assert(r.x, 1);
assert(r.x, 1, 'r.x');
}
function test()

152
v8.txt
View file

@ -105,7 +105,7 @@ async function two(x) {
=== compare-table-sne.js
=== console.js
TypeError: not a function
at <eval> (console.js:5:1)
at <eval> (console.js:5:9)
=== constant-folding.js
=== context-variable-assignments.js
@ -186,10 +186,10 @@ TypeError: not a function
=== external-backing-store-gc.js
=== extra-arguments.js
TypeError: cannot read property 'length' of undefined
at g (extra-arguments.js:35:23)
at g (extra-arguments.js:35:29)
at f (extra-arguments.js:29:10)
at apply (native)
at <eval> (extra-arguments.js:51:40)
at <eval> (extra-arguments.js:51:28)
=== extra-commas.js
=== for-in-delete.js
@ -399,6 +399,26 @@ found:
=== json-errors.js
Failure:
expected:
"Unexpected end of JSON input"
found:
"Unterminated string in JSON at position 7 (line 1 column 8)"
Failure:
expected:
"Unexpected end of JSON input"
found:
"Unterminated string in JSON at position 8 (line 1 column 9)"
Failure:
expected:
"Unexpected end of JSON input"
found:
"Unterminated string in JSON at position 5 (line 1 column 6)"
Failure:
expected:
"Unexpected end of JSON input"
found:
"Unterminated string in JSON at position 6 (line 1 column 7)"
Failure:
expected:
"Unexpected token \n in JSON at position 3"
found:
"Bad control character in string literal in JSON at position 3 (line 1 column 4)"
@ -518,7 +538,7 @@ Failure: expected <["bbaa","a","","a"]> found <["abba","bba","b","a"]>
=== regexp-global.js
SyntaxError: too many captures
at RegExp (native)
at <eval> (regexp-global.js:169:36)
at <eval> (regexp-global.js:169:14)
=== regexp-lastIndex.js
=== regexp-lookahead.js
@ -567,7 +587,7 @@ Failure:
expected:
"bar"
found:
" at <anonymous> (stack-traces-custom-lazy.js:47:46)\n at testPrepareStackTrace (stack-traces-custom-lazy.js:31:5)\n at <eval> (stack-traces-custom-lazy.js:47:60)\n"
" at <anonymous> (stack-traces-custom-lazy.js:47:42)\n at testPrepareStackTrace (stack-traces-custom-lazy.js:31:5)\n at <eval> (stack-traces-custom-lazy.js:47:1)\n"
Failure:
expected:
"bar"
@ -575,7 +595,7 @@ found:
" at f (stack-traces-custom-lazy.js:48:38)\n at f (stack-traces-custom-lazy.js:48:38)\n at f (stack-traces-custom-lazy.js:48:38)\n at f (stack-traces-custom-lazy.js:48:38)\n at f (stack-traces-custom-lazy.js:48:38)\n at f (stack-traces-custom-lazy.js
=== stack-traces-custom.js
TypeError: not a function
at <eval> (stack-traces-custom.js:20:21)
at <eval> (stack-traces-custom.js:20:31)
=== stack-traces-overflow.js
Failure: expected <true> found <false>
@ -584,120 +604,120 @@ Failure: expected <undefined> found <"">
=== stack-traces.js
Failure (testArrayNative doesn't contain expected[0] stack = at <anonymous> (stack-traces.js:48:31)
at map (native)
at testArrayNative (stack-traces.js:48:37)
at testArrayNative (stack-traces.js:48:13)
at testTrace (stack-traces.js:162:5)
at <eval> (stack-traces.js:267:47)
at <eval> (stack-traces.js:267:1)
): expected <true> found <false>
Failure (testMethodNameInference doesn't contain expected[0] stack = at <anonymous> (stack-traces.js:30:37)
at testMethodNameInference (stack-traces.js:31:8)
at testMethodNameInference (stack-traces.js:31:13)
at testTrace (stack-traces.js:162:5)
at <eval> (stack-traces.js:269:63)
at <eval> (stack-traces.js:269:1)
): expected <true> found <false>
Failure (testImplicitConversion doesn't contain expected[0] stack = at <anonymous> (stack-traces.js:53:42)
at testImplicitConversion (stack-traces.js:54:19)
at testImplicitConversion (stack-traces.js:54:12)
at testTrace (stack-traces.js:162:5)
at <eval> (stack-traces.js:270:61)
at <eval> (stack-traces.js:270:1)
): expected <true> found <false>
Failure (testEval doesn't contain expected[0] stack = at Doo (<input>:1:17)
at <eval> (<input>:1:26)
Failure (testEval doesn't contain expected[0] stack = at Doo (<input>:1:18)
at <eval> (<input>:1:27)
at testEval (stack-traces.js:58:3)
at testTrace (stack-traces.js:162:5)
at <eval> (stack-traces.js:271:33)
at <eval> (stack-traces.js:271:1)
): expected <true> found <false>
Failure (testNestedEval doesn't contain expected[0] stack = at <eval> (<input>:1:1)
at Inner (<input>:1:19)
at Outer (<input>:1:58)
at <eval> (<input>:1:70)
at Inner (<input>:1:20)
at Outer (<input>:1:59)
at <eval> (<input>:1:71)
at testNestedEval (stack-traces.js:63:3)
at testTrace (stack-traces.js:162:5)
at <eval> (stack-traces.js:272:45)
at <eval> (stack-traces.js:272:1)
):
Failure (testEvalWithSourceURL doesn't contain expected[0] stack = at Doo (<input>:1:17)
at <eval> (<input>:1:26)
Failure (testEvalWithSourceURL doesn't contain expected[0] stack = at Doo (<input>:1:18)
at <eval> (<input>:1:27)
at testEvalWithSourceURL (stack-traces.js:67:3)
at testTrace (stack-traces.js:162:5)
at <eval> (stack-traces.js:274:34)
at <eval> (stack-traces.js:273:1)
): expected <true> found <false>
Failure (testNestedEvalWithSourceURL doesn't contain expected[0] stack = at <eval> (<input>:1:1)
at Inner (<input>:1:19)
at Outer (<input>:1:36)
at <eval> (<input>:1:48)
at Inner (<input>:1:20)
at Outer (<input>:1:37)
at <eval> (<input>:1:49)
at testNestedEvalWithSourceURL (stack-traces.js:73:3)
at testTrace (stack-traces.js:162:5)
at <eval> (
Failure (testNestedEvalWithSourceURL doesn't contain expected[1] stack = at <eval> (<input>:1:1)
at Inner (<input>:1:19)
at Outer (<input>:1:36)
at <eval> (<input>:1:48)
at Inner (<input>:1:20)
at Outer (<input>:1:37)
at <eval> (<input>:1:49)
at testNestedEvalWithSourceURL (stack-traces.js:73:3)
at testTrace (stack-traces.js:162:5)
at <eval> (
Failure (testValue doesn't contain expected[0] stack = at <anonymous> (stack-traces.js:77:47)
at testValue (stack-traces.js:78:3)
at testValue (stack-traces.js:78:7)
at testTrace (stack-traces.js:162:5)
at <eval> (stack-traces.js:278:35)
at <eval> (stack-traces.js:278:1)
): expected <true> found <false>
Failure (testConstructor doesn't contain expected[0] stack = at Plonk (stack-traces.js:82:22)
at testConstructor (stack-traces.js:83:7)
at testConstructor (stack-traces.js:83:3)
at testTrace (stack-traces.js:162:5)
at <eval> (stack-traces.js:279:47)
at <eval> (stack-traces.js:279:1)
): expected <true> found <false>
Failure (testRenamedMethod doesn't contain expected[0] stack = at a$b$c$d (stack-traces.js:87:31)
at testRenamedMethod (stack-traces.js:90:8)
at testRenamedMethod (stack-traces.js:90:16)
at testTrace (stack-traces.js:162:5)
at <eval> (stack-traces.js:280:51)
at <eval> (stack-traces.js:280:1)
): expected <true> found <false>
Failure (testAnonymousMethod doesn't contain expected[0] stack = at <anonymous> (stack-traces.js:94:18)
at call (native)
at testAnonymousMethod (stack-traces.js:94:38)
at testAnonymousMethod (stack-traces.js:94:26)
at testTrace (stack-traces.js:162:5)
at <eval> (stack-traces.js:281:55)
at <eval> (stack-traces.js:281:1)
): expected <true> found <false>
Failure (testFunctionName doesn't contain expected[2] stack = at foo_0 (stack-traces.js:101:9)
at foo_1 (stack-traces.js:103:27)
at <anonymous> (stack-traces.js:103:27)
at boo_3 (stack-traces.js:103:27)
at <anonymous> (stack-traces.js:103:27)
at foo_1 (stack-traces.js:103:29)
at <anonymous> (stack-traces.js:103:29)
at boo_3 (stack-traces.js:103:29)
at <anonymous> (stack-traces.js:103:29)
at testFunctionName (stack-traces
Failure (testFunctionName doesn't contain expected[4] stack = at foo_0 (stack-traces.js:101:9)
at foo_1 (stack-traces.js:103:27)
at <anonymous> (stack-traces.js:103:27)
at boo_3 (stack-traces.js:103:27)
at <anonymous> (stack-traces.js:103:27)
at foo_1 (stack-traces.js:103:29)
at <anonymous> (stack-traces.js:103:29)
at boo_3 (stack-traces.js:103:29)
at <anonymous> (stack-traces.js:103:29)
at testFunctionName (stack-traces
Failure (testDefaultCustomError doesn't contain expected[0] stack = at CustomError (stack-traces.js:130:33)
at testDefaultCustomError (stack-traces.js:138:36)
Failure (testDefaultCustomError doesn't contain expected[0] stack = at CustomError (stack-traces.js:130:9)
at testDefaultCustomError (stack-traces.js:138:9)
at testTrace (stack-traces.js:162:5)
at <eval> (stack-traces.js:287:5)
at <eval> (stack-traces.js:285:1)
): expected <true> found <false>
Failure (testDefaultCustomError doesn't contain expected[1] stack = at CustomError (stack-traces.js:130:33)
at testDefaultCustomError (stack-traces.js:138:36)
Failure (testDefaultCustomError doesn't contain expected[1] stack = at CustomError (stack-traces.js:130:9)
at testDefaultCustomError (stack-traces.js:138:9)
at testTrace (stack-traces.js:162:5)
at <eval> (stack-traces.js:287:5)
at <eval> (stack-traces.js:285:1)
): expected <true> found <false>
Failure (testStrippedCustomError doesn't contain expected[0] stack = at CustomError (stack-traces.js:130:33)
at testStrippedCustomError (stack-traces.js:142:36)
Failure (testStrippedCustomError doesn't contain expected[0] stack = at CustomError (stack-traces.js:130:9)
at testStrippedCustomError (stack-traces.js:142:9)
at testTrace (stack-traces.js:162:5)
at <eval> (stack-traces.js:289:25)
at <eval> (stack-traces.js:288:1)
): expected <true> found <false>
Failure (testClassNames doesn't contain expected[0] stack = at MyObj (stack-traces.js:145:22)
at <anonymous> (stack-traces.js:150:14)
at testClassNames (stack-traces.js:154:8)
at <anonymous> (stack-traces.js:150:10)
at testClassNames (stack-traces.js:154:22)
at testTrace (stack-traces.js:162:5)
at <eval> (stack-traces.js:291:49)
at <eval> (stack-traces.js:290:1)
): expected <true> found <false>
Failure (testClassNames doesn't contain expected[1] stack = at MyObj (stack-traces.js:145:22)
at <anonymous> (stack-traces.js:150:14)
at testClassNames (stack-traces.js:154:8)
at <anonymous> (stack-traces.js:150:10)
at testClassNames (stack-traces.js:154:22)
at testTrace (stack-traces.js:162:5)
at <eval> (stack-traces.js:291:49)
at <eval> (stack-traces.js:290:1)
): expected <true> found <false>
Failure (UnintendedCallerCensorship didn't contain new ReferenceError): expected <true> found <false>
Failure: expected <"abc"> found <undefined>
Failure: expected <"abc"> found <" at <eval> (stack-traces.js:371:13)\n">
Failure: expected <undefined> found <" at <eval> (stack-traces.js:375:13)\n">
Failure: expected <"abc"> found <" at <eval> (stack-traces.js:371:9)\n">
Failure: expected <undefined> found <" at <eval> (stack-traces.js:375:9)\n">
TypeError: not a function
at <eval> (stack-traces.js:381:1)
at <eval> (stack-traces.js:381:7)
=== str-to-num.js
Failure: expected <7.922816251426436e+28> found <7.922816251426434e+28>
@ -726,15 +746,15 @@ Failure: expected <null> found <undefined>
Failure: expected <null> found <undefined>
Failure: expected <null> found <undefined>
TypeError: cannot read property 'value' of undefined
at <anonymous> (strict-mode.js:1213:58)
at <anonymous> (strict-mode.js:1213:68)
at recurse (strict-mode.js:1207:14)
at non_strict (strict-mode.js:1214:5)
at non_strict (strict-mode.js:1212:12)
at strict (strict-mode.js:1199:15)
at <anonymous> (strict-mode.js:1218:43)
at recurse (strict-mode.js:1207:14)
at test (strict-mode.js:1218:54)
at test (strict-mode.js:1218:12)
at TestNonStrictFunctionCallerDescriptorPill (strict-mode.js:1222:22)
at <eval> (strict-mode.js:1224:1)
at <eval> (strict-mode.js:1195:1)
=== string-add.js
=== string-charat.js