-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Add raw_ptr
type
#2828
Add raw_ptr
type
#2828
Conversation
test/src/e2e_vm_tests/test_programs/should_fail/raw_ptr/vec_ret/src/main.sw
Outdated
Show resolved
Hide resolved
test/src/e2e_vm_tests/test_programs/should_fail/raw_ptr/raw_ptr_ret/src/main.sw
Show resolved
Hide resolved
All is reasonable! I resolved all the comments that have been addressed and left a few open that are related to testing (and the API name thing) but I'm okay with those being addressed later. Once the conflicts are resolved, I will approve ✅ |
I've addressed all the issues, but it looks like some tests are failing. (Merge issues?) Trying to fix those now. |
I think the contract IDs in scripts need to be updated? |
Actually added |
send_message is no longer being tested.
@jc - in this commit, I:
This should be good to go. Once the SDK supports |
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 great, thanks!
Following up on this: #2828 (comment) > However, the changes you had to send_message seemed a bit buggy. send_message is only tested in token_ops currently so no surprise that Ci was passing. Regardless, I reverted the implementation of send_message to how it was, for the most part. We can iterate on that in the future. @mohammadfawaz, it seems like `raw_ptr::read()` didn't behave like I assumed it would. Still made use of `::add()` and `::write()` to pack `alloc()`s together and get rid of one `__addr_of()`, but the other one stayed. Co-authored-by: Joshua Batty <joshpbatty@gmail.com>
This PR:
raw_ptr
type.ptr
field fromu64
toraw_ptr
.raw_ptr
s (and aggregate types that contain it) from being returned frommain()
fns.Note to @sezna:
On our meeting we discussed
checks.rs
, which led me to this implementation: 090a4d1That didn't work because
raw_ptr
s are converted tosway_ir::irtype::Type::Uint(64)
s so there wasn't a way to differentiate them. I've reverted that and went with this instead: fc6bf34