-
Notifications
You must be signed in to change notification settings - Fork 472
Separation into classes? #194
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
Comments
On |
FWIW in v8-native, we avoid having a heavyweight class-per-structure and On Wed, Nov 25, 2015 at 12:59 AM, Dan Gohman [email protected]
|
FWIW, the nature of the else operand to The arguments to In general, I'd argue that the factorisation of operators as described by AstSemantics is oriented more towards reflecting the concrete binary format and certain decoding considerations than what you'd likely represent with an actual AST. So it would seem natural to structure things somewhat differently in a real-world AST-based implementation. |
Thanks for the feedback, everyone. Ok, it sounds like there isn't really a "right" way to do this from the spec's perspective, and specific implementations might make different decisions. Not sure yet what I'll do in binaryen, but I lean towards optimizing the AST for code size. |
I am having a hard time deciding how to represent WebAssembly in a C++ class hierarchy in binaryen, and would appreciate advice. Right now I have a separate class for
call
andcall_import
, for example, although I have just oneif
whoseelse
might be null, instead of two classes, and that feels inconsistent, but I'm not sure which way to refactor it.I also see that we have
br
andbr_if
which have an optional value argument. That seems to be more consistent with having oneif
class with an optional argument. Is that intended?The text was updated successfully, but these errors were encountered: