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

WASM GC backend #355

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

eliotmoss
Copy link
Contributor

Fix batch of changes being submitted for comment. Work ends essentially just after the point where mtables are processed to obtain function table information.

Copy link
Owner

@titzer titzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First comments.

@@ -0,0 +1,230 @@
// Copyright 2016 Google Inc. All rights reserved.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copyright notice.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to add: Eliot Moss 2024-2025. If I should be using something different, let me know ...

@@ -40,6 +41,7 @@ class IrClass extends IrItem {
}
return m;
}
def accept<E, R>(v: IrVisitor<E, R>, env: E) -> R { return v.visitIrClass(this, env); }
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'd prefer not introducing visitors for this; a match on the type is locally more compact and usually keeps the logic in one place.

_ => return this.tag;
}
}
def equals(other: WasmValueType) -> bool {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC there shouldn't be a need for an equals method; variants get a == that is a deep structural comparison. As long as every case is OK with that (looking at the RefNull case).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The RefNull case requires equality on WasmHeapTypes, and they are classes, not ADTs. So I left this for now.

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.

2 participants