Meta Changes from #321 #325

Merged
sb10q merged 3 commits from meta-changes-from-issue-301 into master 2023-09-28 23:01:37 +08:00
Collaborator

Various changes that are made during the debugging process for #323 but is not relevant to the fix.

  • Fixed passing strings into C-interop functions
  • Added newline parameter to output_* functions
  • Make whole-module optimizer respect optimization flags

The previous pull request was deleted by accident.

Various changes that are made during the debugging process for #323 but is not relevant to the fix. - Fixed passing strings into C-interop functions - Added newline parameter to output_* functions - Make whole-module optimizer respect optimization flags The previous pull request was deleted by accident.
derppening self-assigned this 2023-09-25 11:53:05 +08:00
derppening added 3 commits 2023-09-25 11:53:06 +08:00
b8e9af2e2b core: Fix passing structure arguments to extern functions
All parameters with a structure type in extern functions are marked as
`byref` instead of `byval`, as most ABIs require the first several
arguments to be passed in registers before spilling into the stack.

`byval` breaks this contract by explicitly requiring all arguments to be
 passed in the stack, breaking interop with libraries written in other
 languages.
c86c9988a9 standalone: Update demos
- Add `newline` parameter to all output_* functions
- Add `output_str` for printing a string
- Add demo_test.py to test interop
derppening added a new dependency 2023-09-25 11:53:13 +08:00
derppening requested review from sb10q 2023-09-25 11:53:34 +08:00

All the newline stuff is pretty awkward. What are you trying to do anyway?

All the newline stuff is pretty awkward. What are you trying to do anyway?
Poster
Collaborator

All the newline stuff is pretty awkward. What are you trying to do anyway?

I am trying to add a way to output a string with variables interleaved in the string. It's not exactly necessary though, and I can revert those changes if you want.

> All the newline stuff is pretty awkward. What are you trying to do anyway? I am trying to add a way to output a string with variables interleaved in the string. It's not exactly necessary though, and I can revert those changes if you want.

Yes please remove from this PR.

Yes please remove from this PR.
derppening added 2 commits 2023-09-28 14:09:05 +08:00
4abcb22183 standalone: Update demos
- Add `output_str` for printing a string
- Add demo_test.py to test interop
derppening force-pushed meta-changes-from-issue-301 from a09ba115d6 to a37c1c2cd9 2023-09-28 15:02:06 +08:00 Compare
derppening force-pushed meta-changes-from-issue-301 from a37c1c2cd9 to 059b02f920 2023-09-28 15:02:41 +08:00 Compare
Poster
Collaborator

v2, v3: Removed all newline changes from PR, rebased against master

v2, v3: Removed all newline changes from PR, rebased against master
sb10q reviewed 2023-09-28 16:41:39 +08:00
@ -48,6 +48,12 @@ def patch(module):
else:
sys.stdout.write(" .,-:;i+hHM$*#@ "[x])
def output(x, newline: bool=True):

This does not match demo.rs, remove.

This does not match demo.rs, remove.
derppening force-pushed meta-changes-from-issue-301 from 059b02f920 to 2a38d5160e 2023-09-28 19:59:01 +08:00 Compare
Poster
Collaborator

v4: Removed output function in interpret_demo.py

v4: Removed output function in `interpret_demo.py`
sb10q merged commit 2a38d5160e into master 2023-09-28 23:01:37 +08:00
sb10q deleted branch meta-changes-from-issue-301 2023-09-28 23:01:38 +08:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: M-Labs/nac3#325
There is no content yet.