Skip to content

feat: Assembly report#671

Open
iglosiggio wants to merge 6 commits intomainfrom
assembly-report
Open

feat: Assembly report#671
iglosiggio wants to merge 6 commits intomainfrom
assembly-report

Conversation

@iglosiggio
Copy link
Copy Markdown
Member

@iglosiggio iglosiggio commented Mar 9, 2026

Proposed Changes

  • Add the --output-assembly-report flag (default: True)
  • Modify the assembly process so it returns a list of instruction offsets for usage by the assembly report mechanism
  • Removed the source map output from O0 and O2 tests

This would close #642.

@engineering-ci
Copy link
Copy Markdown

engineering-ci bot commented Mar 9, 2026

Checking stubs for changes and corresponding version bump in origin/assembly-report

Last puyapy release: v5.7.1
This branch stubs version: 3.5.0
Last released stubs version: 3.4.0
Main stubs version: 3.5.0

💡 Stub version change: 3.4.0 -> 3.5.0
✅ Stub files unchanged
✅ Stub check passed!

@engineering-ci
Copy link
Copy Markdown

engineering-ci bot commented Mar 9, 2026

Name Status O0 bytes O1 bytes O2 bytes O0 ops O1 ops O2 ops

@iglosiggio
Copy link
Copy Markdown
Member Author

The artifacts are on their own commit so reviewers can diff review the relevant part by selecting a smaller commit-range.

@engineering-ci
Copy link
Copy Markdown

engineering-ci bot commented Mar 9, 2026

Coverage

Tests Skipped Failures Errors Time
1556 3 💤 0 ❌ 0 🔥 11m 47s ⏱️

@iglosiggio iglosiggio marked this pull request as ready for review March 11, 2026 21:49
@iglosiggio iglosiggio changed the title Assembly report feat: Assembly report Mar 11, 2026
@iglosiggio
Copy link
Copy Markdown
Member Author

I had some changes that I forgot to push 🤦 sorry for the delay.

@@ -56,6 +56,7 @@ def puyapy(
] = None,
log_level: Annotated[LogLevel, cyclopts.Parameter(group=_outputs_group)] = LogLevel.info,
output_teal: _OutputToggle = True,
output_assembly_report: _OutputToggle = True,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Are we sure we want to output this by default? The source map is output by default since it's consumed by debugging, but this report is probably going to be used only in more specific circumstances?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Discussed it w/@Argimirodelpozo and you are right. Better to leave it false by default :)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Suggested change
output_assembly_report: _OutputToggle = True,
output_assembly_report: _OutputToggle = False,

if op_loc is None:
op_loc_str = ""
elif op_loc.line != op_loc.end_line:
op_loc_str = repr(op_loc)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Multi-line locations source is not outputted? And it doesn't change last_location either?

Comment on lines +95 to +96
src = None
last_location_indent = 0
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

So these are initialise once, applying across block boundaries, but last_location is reset per block?

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.

[Enhancement]: Add a --disassembly-report flag

3 participants