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

As3 vector literal parsing fix #177

Merged

Conversation

EnricoZeilmaker
Copy link

@EnricoZeilmaker EnricoZeilmaker commented Jul 27, 2023

Fixes AS3 vector literals giving broken AVM2 instructions when they have elements.
This changes the AVM2 instructions for vector literal to be in line with what mxmlc produces

and removing some junk files and updating .gitignore

@jindrapetrik
Copy link
Owner

Could you explain more how it "breaks AVM2 instructions when they have elements"?

It looks like the previous version emmits findproperty and then getproperty, which should be the same as getlex.
(some compilers prefer getlex, other use the two instructions)

Or is there another problem?

@EnricoZeilmaker
Copy link
Author

If it does the same as getlex, I am not exactly sure what the problem is.

When I run this file using the current way, it doesn't work, but when I run this same file but using getlex it runs fine

@RealPuzzlecube
Copy link

this appears to be what a debug projector shows the error to be in the getproperty variant

image

@RealPuzzlecube
Copy link

ah, the issue was the use of a Multiname as opposed to a QName, not getproperty itself. Here is the fixed getproperty variant

@jindrapetrik
Copy link
Owner

The problem here is that the Multiname does not have "AS3.vec" in its namespace set. Adding that namespace in the namespace set will be hard at this point in the InitVectorAVM2Item class, so I decided to integrate your solution with the getlex,
I merge this...

@jindrapetrik jindrapetrik merged commit 37bd987 into jindrapetrik:dev Sep 6, 2023
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

Successfully merging this pull request may close these issues.

3 participants