-
Notifications
You must be signed in to change notification settings - Fork 383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugs/issues after the big destructuring PR #305
Comments
…or spread elements in call arguments. Fixed various issues related to destructuring assignments. See #305.
Thanks for reporting these. I think I have fixed most of them, except for the patterns in catch, shall have a look later. |
Thanks very much for the extremely fast fixes 🙇 I did rerun my tests and apart from the try/catch stuff all seems to now work. Additionally, I now noticed that tests such as language/eval-code/direct/func-decl-a-following-parameter-is-named-arguments-declare-arguments-and-assign.js are now failing due to not throwing SyntaxError where it's expected instead of the previous error ("arguments is a reserved word in strict mode") that shows me, that we(k6) probably shouldn't run this test in k6 as it's While I would think this particular (or all the other tests failing around this) aren't really practical in themself this seems to be some kind of evaluation ordering bug(?) 🤔 so it seems interesting from that perspective. |
I believe all issues mentioned here are now fixed. If anything else crops up please open separate issues. |
* Avoid calling iterator's return method again when it throws * Fixed dynamic variable resolution when a parent lexical binding exists * Support dereferencing in ExportTo(). Closes dop251#300 * Removed the mention of the es6 branch, updated the section about new features development. * Destructuring assignments, rest and spread properties, default function parameters (dop251#303) * Fixed argument variable reference resolution in stashless functions * Fixed binding order for global function declarations when there are duplicate names. Fixes dop251#344. * Make sure variables dynamically bound in parameter scope conflict with parameter bindings. See dop251#305. * Fixed setting the stack pointer in enterFuncBody. Fixes dop251#309 * Support for assignment patterns in for-in and for-of loops. Support for spread elements in call arguments. Fixed various issues related to destructuring assignments. See dop251#305.
…formats, ... (#47) * Fixed typed arrays' defineProperty and indexing. Fixes dop251#308. * Fix Proxy creation panicing on target not callable * Do not modify sb for variadic calls as it breaks local variables resolution. Instead place a marker on stack and use it to count the number of args. Fixes dop251#311. * Support patterns in catch clause. See dop251#305 * Fixed the handling of Symbol properties in destructuring assignments. Fixes dop251#312. * Ensure ToPropertyKey happens earlier when assigning computed keys. Fixes dop251#312. * Aligned detached buffer semantics with the latest specs. Fixes dop251#315. * More typed arrays fixes * Fixed accessor and property key function names. Fixes dop251#314. * Fixed possible panic when sorting non-standard arrays. * Added nil-safety checks for values returned by get*() methods * Fixed panics in parser on some invalid inputs. Fixes dop251#318. * Arrow function (dop251#319) * Implemented arrow functions. See dop251#304. * Define the name property for anonymous functions (including arrow functions) * Treat "arguments" as a lexical binding to match the latest specification * Allow arrow functions to contain 'use strict' for simple parameter lists. Fixes dop251#323. * Fixed argument variable reference resolution in stashless functions * Treat date-only formats as UTC and date-time as local timezone. Added support for additional datetime formats. Fixes dop251#281, fixes dop251#292. * Use correct createArgsRest variant when arguments are not in stash. Fixes dop251#327 * Fixed formatting for go 1.17 * Report 'length' as own property for Go slices. Fixes dop251#328.
First great job on implementing all of that functionality 👏 🙇 🎉 and thank you very much.
As I have previously mentioned k6 runs the majority (no async/await, promise stuff) of the tc39 testsuite including tests that fail (for various reasons) to test the goja+babel setup we have and its problems. As such we have some new tests that are now failing without disabling plugins (and even more that are now passing 👏 , unfortunately, I am here to only tell you about the failing ones, sorry :( ):
({}) = 1;
should be a syntax errorDuplicate declaration n
runtime error: invalid memory address or nil pointer dereference
as well as it's ...lex-open.js test and the same two tests forfor-in
Then of course I started disabling babel plugins of now implemented stuff ;).
Disabling the
transform-es2015-destructuring
andtransform-es2015-computed-properties
plugins of babel also shows that:for-of
destructuring break as in this one with "Line 55:1 Invalid left-hand side in for-in or for-of" I would expect that ... most of those are the same issue so I am not listing all of them.try
in this test with "Line 36:10 Unexpected token [" which seems more like a case of destructuring not being support in the catch parameter.Disabling
transform-es2015-parameters
breaks a lot of tests and I didn't want to go into it as I was pretty sure I did something wrong on my side, but it seems to not be me 😢 😭 (edit: opened #309). The same goes fortransform-es2015-spread
which also makes the tests take forever, probably because of all the failures. On the other hand ... it really shouldn't so I will keep digging in those two babel plugins to see what is going on and report back when I figure what is going on.The text was updated successfully, but these errors were encountered: