Skip to content
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

bug unhandle VariableDeclaration if left is Array #418

Open
areuu opened this issue Feb 18, 2024 · 1 comment
Open

bug unhandle VariableDeclaration if left is Array #418

areuu opened this issue Feb 18, 2024 · 1 comment

Comments

@areuu
Copy link

areuu commented Feb 18, 2024

js

const [a0, a1] = fun0(t);
fun1(a0); 
fun2(a1);

il
v0 <- LoadNamedVariable 't'
v1 <- LoadNamedVariable 'fun0'
v2 <- CallFunction v1, [v0]
v3 <- LoadNamedVariable 'a0'
v4 <- LoadNamedVariable 'fun1'
v5 <- CallFunction v4, [v3]
v6 <- LoadNamedVariable 'a1'
v7 <- LoadNamedVariable 'fun2'
v8 <- CallFunction v7, [v6]

lifted js
fun0(t);
fun1(a0);
fun2(a1);

@areuu
Copy link
Author

areuu commented Feb 21, 2024

new example

    const { prop1 } = obj.func();
    prop1.length;

il
v0 <- LoadNamedVariable 'obj'
v1 <- CallMethod v0, 'func', []
v2 <- LoadNamedVariable 'prop1'
v3 <- GetProperty v2, 'length'

lifted js
obj.func();
prop1.length;

there are still can resolved, but if you can add new op code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant