-
Notifications
You must be signed in to change notification settings - Fork 401
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
[WIP] Interrealm take 2 #4028
base: master
Are you sure you want to change the base?
[WIP] Interrealm take 2 #4028
Conversation
🛠 PR Checks SummaryAll Automated Checks passed. ✅ Manual Checks (for Reviewers):
Read More🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers. ✅ Automated Checks (for Contributors):No automated checks match this pull request. ☑️ Contributor Actions:
☑️ Reviewer Actions:
📚 Resources:Debug
|
Codecov ReportAttention: Patch coverage is 📢 Thoughts on this report? Let us know! |
@@ -1970,15 +1970,44 @@ func (m *Machine) PushForPointer(lx Expr) { | |||
} | |||
|
|||
func (m *Machine) PopAsPointer(lx Expr) PointerValue { |
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.
Comment should say, pop a pointer for writing. All calls to this will end up writing to it.
@@ -152,17 +159,13 @@ func (m *Machine) doOpStar() { | |||
tv.SetUint8(dbv.GetByte()) | |||
m.PushValue(tv) | |||
} else { | |||
if pv.TV.IsUndefined() && bt.Elt.Kind() != InterfaceKind { |
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.
this is vestigial; unless interface value, TV is never undefined, it at least has the concrete value set by defaultValue().
lvu := lv.IsUndefined() | ||
rvu := rv.IsUndefined() | ||
lvu := lv.IsUndefined2() | ||
rvu := rv.IsUndefined2() |
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.
after this in separate PR will convert all IsDefined() to IsDefined2().
if xvdt, ok := xv.T.(*DeclaredType); ok && | ||
xvdt.PkgPath == m.Realm.Path { | ||
// Except allow if xv.T is m.Realm. | ||
// XXX do we need/want this? |
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.
What could go wrong?
This replaces the previous interrealm spec.
Docs coming and this README will improve after more impl.
(TODO improve)
This PR is for 1,2 above.
For 3,4 see #4037.
5 implementation will come later, probably after launch.