diff --git a/quickjs.c b/quickjs.c index 402f8f0..cf49ffa 100644 --- a/quickjs.c +++ b/quickjs.c @@ -34950,7 +34950,7 @@ static int js_obj_to_desc(JSContext *ctx, JSPropertyDescriptor *d, } if ((flags & (JS_PROP_HAS_SET | JS_PROP_HAS_GET)) && (flags & (JS_PROP_HAS_VALUE | JS_PROP_HAS_WRITABLE))) { - JS_ThrowTypeError(ctx, "cannot have setter/getter and value or writable"); + JS_ThrowTypeError(ctx, "Invalid property descriptor. Cannot both specify accessors and a value or writable attribute"); goto fail; } d->flags = flags; diff --git a/v8.js b/v8.js index 3da78ea..34ab65b 100644 --- a/v8.js +++ b/v8.js @@ -15,11 +15,22 @@ const exclude = [ "disallow-codegen-from-strings.js", // --disallow-code-generation-from-strings "cyclic-array-to-string.js", // unstable output due to stack overflow "error-tostring.js", // unstable output due to stack overflow + "invalid-lhs.js", // v8 expects ReferenceError but ECMA says SyntaxError "regexp.js", // invalid, legitimate early SyntaxError "regexp-capture-3.js", // slow + "regexp-cache-replace.js", // deprecated RegExp.$1 etc. "regexp-indexof.js", // deprecated RegExp.lastMatch etc. "regexp-static.js", // deprecated RegExp static properties. + "regexp-modifiers-autogenerated-i18n.js", // invalid group + "regexp-modifiers-autogenerated.js", // invalid group + "regexp-modifiers-dotall.js", // invalid group + "regexp-modifiers-i18n.js", // invalid group + "regexp-modifiers.js", // invalid group + "regexp-override-symbol-match-all.js", // missing g flag + "serialize-embedded-error.js", // parseInt() = 0; "string-replace.js", // unstable output + "string-match.js", // deprecated RegExp.$1 etc. + "string-slices-regexp.js", // deprecated RegExp.$1 etc. "omit-default-ctors-array-iterator.js", "mjsunit.js", diff --git a/v8.sh b/v8.sh index c3b1127..5a7f724 100755 --- a/v8.sh +++ b/v8.sh @@ -1,6 +1,10 @@ #!/bin/sh set -e : ${QJS:=build/qjs} -"$QJS" v8.js $* 2>&1 | tee v8.txt$$ -diff -uw v8.txt v8.txt$$ || exit 1 -rm v8.txt$$ +if [ "x" = "x$1" ] ; then + "$QJS" v8.js $* 2>&1 | tee v8.txt$$ + diff -uw v8.txt v8.txt$$ || exit 1 + rm v8.txt$$ +else + "$QJS" v8.js $* 2>&1 +fi diff --git a/v8.txt b/v8.txt index 178ad6e..9a7c801 100644 --- a/v8.txt +++ b/v8.txt @@ -395,39 +395,6 @@ found: === integer-to-string.js === intl-numberformat-formattoparts.js === intl-pluralrules-select.js -=== invalid-lhs.js -Object is not an instance of but of -Object is not an instance of but of -Object is not an instance of but of -Object is not an instance of but of -threw an exception: invalid assignment left-hand side -Object is not an instance of but of -Object is not an instance of but of -Object is not an instance of but of -Object is not an instance of but of -Object is not an instance of but of -Object is not an instance of but of -Object is not an instance of but of -Object is not an instance of but of -Object is not an instance of but of -Object is not an instance of but of -threw an exception: invalid increment/decrement operand -threw an exception: invalid increment/decrement operand -Object is not an instance of but of -threw an exception: invalid for in/of left hand-side -Object is not an instance of but of -Object is not an instance of but of -Object is not an instance of but of -threw an exception: invalid assignment left-hand side -Object is not an instance of but of -Object is not an instance of but of -Object is not an instance of but of -Object is not an instance of but of -Object is not an instance of but of -Object is not an instance of but of -Object is not an instance of but of -Object is not an instance of but of -Object is not an instance of but of === invalid-source-element.js === json-errors.js Failure: @@ -508,8 +475,6 @@ Failure: expected found === numops-fuzz-part4.js === obj-construct.js === object-create.js -Failure: expected found -Failure: expected found === object-define-properties.js Failure: expected found <1> === object-freeze-global.js @@ -543,10 +508,6 @@ Failure (printErr should be defined): expected <"function"> found <"undefined"> === readonly-accessor.js === receiver-in-with-calls.js === regexp-UC16.js -=== regexp-cache-replace.js -Failure: expected <"o"> found -Failure: expected <"x"> found -Failure: expected <"o"> found === regexp-call-as-function.js === regexp-capture.js Failure: expected <["",undefined,""]> found <["","undefined",""]> @@ -564,35 +525,10 @@ SyntaxError: too many captures === regexp-loop-capture.js Failure: expected <["abc",undefined,undefined,"c"]> found <["abc","a","b","c"]> Failure: expected <["ab",undefined]> found <["ab","a"]> -=== regexp-modifiers-autogenerated-i18n.js -SyntaxError: invalid group - at regexp-modifiers-autogenerated-i18n.js:12:1 - -=== regexp-modifiers-autogenerated.js -SyntaxError: invalid group - at regexp-modifiers-autogenerated.js:10:1 - -=== regexp-modifiers-dotall.js -SyntaxError: invalid group - at regexp-modifiers-dotall.js:9:1 - -=== regexp-modifiers-i18n.js -SyntaxError: invalid group - at regexp-modifiers-i18n.js:9:1 - -=== regexp-modifiers.js -SyntaxError: invalid group - at regexp-modifiers.js:7:1 - === regexp-multiline.js Failure: expected found Failure: expected found === regexp-override-exec.js -=== regexp-override-symbol-match-all.js -TypeError: regexp must have the 'g' flag - at matchAll (native) - at (regexp-override-symbol-match-all.js:9:23) - === regexp-override-symbol-match.js === regexp-override-symbol-replace.js === regexp-override-symbol-search.js @@ -610,10 +546,6 @@ TypeError: regexp must have the 'g' flag === scope-calls-eval.js === search-string-multiple.js === serialize-after-execute.js -=== serialize-embedded-error.js -SyntaxError: invalid assignment left-hand side - at serialize-embedded-error.js:9:1 - === serialize-ic.js === shifts.js === short-circuit-boolean.js @@ -867,214 +799,12 @@ TypeError: cannot read property 'value' of undefined === string-indexof-2.js === string-lastindexof.js === string-localecompare.js -=== string-match.js -Failure (Nonglobal-$&): expected <"A"> found -Failure (Nonglobal-lastMatch): expected <"A"> found -Failure (Nonglobal-nocapture-1): expected <""> found -Failure (Nonglobal-nocapture-2): expected <""> found -Failure (Nonglobal-nocapture-3): expected <""> found -Failure (Nonglobal-nocapture-4): expected <""> found -Failure (Nonglobal-nocapture-5): expected <""> found -Failure (Nonglobal-nocapture-6): expected <""> found -Failure (Nonglobal-nocapture-7): expected <""> found -Failure (Nonglobal-nocapture-8): expected <""> found -Failure (Nonglobal-nocapture-9): expected <""> found -Failure (Nonglobal-input): expected <"A man, a plan, a canal: Panama"> found -Failure (Nonglobal-$_): expected <"A man, a plan, a canal: Panama"> found -Failure (Nonglobal-$`): expected <""> found -Failure (Nonglobal-leftContex): expected <""> found -Failure (Nonglobal-$'): expected <" man, a plan, a canal: Panama"> found -Failure (Nonglobal-rightContex): expected <" man, a plan, a canal: Panama"> found -Failure (Nonglobal-$+): expected <""> found -Failure (Nonglobal-lastParen): expected <""> found -Failure (Nonglobal-ignore-lastIndex-$&): expected <"A"> found -Failure (Nonglobal-ignore-lastIndex-lastMatch): expected <"A"> found -Failure (Nonglobal-ignore-lastIndex-nocapture-1): expected <""> found -Failure (Nonglobal-ignore-lastIndex-nocapture-2): expected <""> found -Failure (Nonglobal-ignore-lastIndex-nocapture-3): expected <""> found -Failure (Nonglobal-ignore-lastIndex-nocapture-4): expected <""> found -Failure (Nonglobal-ignore-lastIndex-nocapture-5): expected <""> found -Failure (Nonglobal-ignore-lastIndex-nocapture-6): expected <""> found -Failure (Nonglobal-ignore-lastIndex-nocapture-7): expected <""> found -Failure (Nonglobal-ignore-lastIndex-nocapture-8): expected <""> found -Failure (Nonglobal-ignore-lastIndex-nocapture-9): expected <""> found -Failure (Nonglobal-ignore-lastIndex-input): expected <"A man, a plan, a canal: Panama"> found -Failure (Nonglobal-ignore-lastIndex-$_): expected <"A man, a plan, a canal: Panama"> found -Failure (Nonglobal-ignore-lastIndex-$`): expected <""> found -Failure (Nonglobal-ignore-lastIndex-leftContex): expected <""> found -Failure (Nonglobal-ignore-lastIndex-$'): expected <" man, a plan, a canal: Panama"> found -Failure (Nonglobal-ignore-lastIndex-rightContex): expected <" man, a plan, a canal: Panama"> found -Failure (Nonglobal-ignore-lastIndex-$+): expected <""> found -Failure (Nonglobal-ignore-lastIndex-lastParen): expected <""> found -Failure (Capture-Nonglobal-$&): expected <"abcdefghij"> found -Failure (Capture-Nonglobal-lastMatch): expected <"abcdefghij"> found -Failure (Capture-Nonglobal-capture-1): expected <"a"> found -Failure (Capture-Nonglobal-capture-2): expected <"b"> found -Failure (Capture-Nonglobal-capture-3): expected <"c"> found -Failure (Capture-Nonglobal-capture-4): expected <"d"> found -Failure (Capture-Nonglobal-capture-5): expected <"e"> found -Failure (Capture-Nonglobal-capture-6): expected <"f"> found -Failure (Capture-Nonglobal-capture-7): expected <"g"> found -Failure (Capture-Nonglobal-capture-8): expected <"h"> found -Failure (Capture-Nonglobal-capture-9): expected <"i"> found -Failure (Capture-Nonglobal-input): expected <"abcdefghijxxxxxxxxxx"> found -Failure (Capture-Nonglobal-$_): expected <"abcdefghijxxxxxxxxxx"> found -Failure (Capture-Nonglobal-$`): expected <""> found -Failure (Capture-Nonglobal-leftContex): expected <""> found -Failure (Capture-Nonglobal-$'): expected <"xxxxxxxxxx"> found -Failure (Capture-Nonglobal-rightContex): expected <"xxxxxxxxxx"> found -Failure (Capture-Nonglobal-$+): expected <"j"> found -Failure (Capture-Nonglobal-lastParen): expected <"j"> found -Failure (Global-$&): expected <"glyf"> found -Failure (Global-lastMatch): expected <"glyf"> found -Failure (Global-nocapture-1): expected <""> found -Failure (Global-nocapture-2): expected <""> found -Failure (Global-nocapture-3): expected <""> found -Failure (Global-nocapture-4): expected <""> found -Failure (Global-nocapture-5): expected <""> found -Failure (Global-nocapture-6): expected <""> found -Failure (Global-nocapture-7): expected <""> found -Failure (Global-nocapture-8): expected <""> found -Failure (Global-nocapture-9): expected <""> found -Failure (Global-input): expected <"Argle bargle glop glyf!"> found -Failure (Global-$_): expected <"Argle bargle glop glyf!"> found -Failure (Global-$`): expected <"Argle bargle glop "> found -Failure (Global-leftContex): expected <"Argle bargle glop "> found -Failure (Global-$'): expected <"!"> found -Failure (Global-rightContex): expected <"!"> found -Failure (Global-$+): expected <""> found -Failure (Global-lastParen): expected <""> found -Failure (Global-ignore-lastIndex-$&): expected <"glyf"> found -Failure (Global-ignore-lastIndex-lastMatch): expected <"glyf"> found -Failure (Global-ignore-lastIndex-nocapture-1): expected <""> found -Failure (Global-ignore-lastIndex-nocapture-2): expected <""> found -Failure (Global-ignore-lastIndex-nocapture-3): expected <""> found -Failure (Global-ignore-lastIndex-nocapture-4): expected <""> found -Failure (Global-ignore-lastIndex-nocapture-5): expected <""> found -Failure (Global-ignore-lastIndex-nocapture-6): expected <""> found -Failure (Global-ignore-lastIndex-nocapture-7): expected <""> found -Failure (Global-ignore-lastIndex-nocapture-8): expected <""> found -Failure (Global-ignore-lastIndex-nocapture-9): expected <""> found -Failure (Global-ignore-lastIndex-input): expected <"Argle bargle glop glyf!"> found -Failure (Global-ignore-lastIndex-$_): expected <"Argle bargle glop glyf!"> found -Failure (Global-ignore-lastIndex-$`): expected <"Argle bargle glop "> found -Failure (Global-ignore-lastIndex-leftContex): expected <"Argle bargle glop "> found -Failure (Global-ignore-lastIndex-$'): expected <"!"> found -Failure (Global-ignore-lastIndex-rightContex): expected <"!"> found -Failure (Global-ignore-lastIndex-$+): expected <""> found -Failure (Global-ignore-lastIndex-lastParen): expected <""> found -Failure (Capture-Global-$&): expected <"Panama"> found -Failure (Capture-Global-lastMatch): expected <"Panama"> found -Failure (Capture-Global-capture-1): expected <"anama"> found -Failure (Capture-Global-nocapture-2): expected <""> found - === string-normalize.js === string-oom-concat.js === string-pad.js === string-replace-gc.js === string-replace-one-char.js === string-search.js -=== string-slices-regexp.js -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found -Failure (RegExp.$1): expected <"regexp"> found - === string-split-cache.js === string-trim.js === string-wrapper.js