-
Notifications
You must be signed in to change notification settings - Fork 83
Enable processing for all abstracts. #291
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
base: experimental
Are you sure you want to change the base?
Conversation
My initial theory is that these are all enum abstracts, and in the compiled code these values get inline replaced, so we'd have to make a separate implementation to handle them. |
031118e to
c49099f
Compare
|
The pull request from @lemz1 plus a few additional changes from me have resolved more issues. You can now access static functions of abstracts, as well as enum values of abstracts. The only thing you can't really do right now is access instance functions of abstracts, but I'd like to work on that at a future date. |
You can still call instance functions like this, although it is a bit hacky var color = FlxColor.RED;
var rgb = FlxColor.get_rgb(color);when trying to call instance functions you do it as if it were a static function, the only thing that you have to do additionally is to parse the instance in the first parameter so a function like this: function print():Void {
trace(this);
}turns into: static function print(this1):Void {
trace(this1);
} |
…exception and crashing if an abstract can't be resolved.
31993ce to
0472b9a
Compare
AbnormalPoof
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AbnormalPoof
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Importing most abstract enums seems to work now! I'm still wondering about the compiler hanging at 100%... what could it possibly be doing there?
|
Hmm for me the compiler hangs, then its memory usage balloons until it's killed by the system. I can only guess it's something akin to what happened in #226. Then, perhaps the metadata is also getting populated with too much data and thus, generating code that's too "spaghettified" for some compilers to handle? |

Work in progress to enable processing on every abstract instead of just FlxColor.
Draft because whenever I try to build with this, I get the
(unknown position) Type Not Found: Terror, which implies it's trying to process a generic type somewhere, but since I don't know what type it's trying to process, I can't resolve the issue.TODO: Try restricting by package, and see if I can narrow down the culprit that way?