Skip to content

fix: support chained loop getters and optimize primitive loop rendering - #236

Merged
paganotoni merged 1 commit into
gobuffalo:mainfrom
Mido-sys:fix/chained-loop-getters-primitive-rendering
Oct 23, 2026
Merged

paganotoni merged 1 commit into
gobuffalo:mainfrom
Mido-sys:fix/chained-loop-getters-primitive-rendering

Conversation

@Mido-sys

Copy link
Copy Markdown
Collaborator

Fixes issues in #235

@paganotoni

Copy link
Copy Markdown
Member

Great work on this fix and optimization. I reviewed the parser/compiler/VM changes and approved ✅

I especially like the depth of test coverage added here:

  • chained getter loop parity tests (including interpreter/VM/bytecode paths),
  • primitive loop type coverage (including numeric edge values and special floats),
  • budget behavior checks,
  • zero-arg method fast-path behavior and cache/concurrency checks.
  • This gives strong confidence that both correctness and fast-path behavior are preserved.

Optional follow-ups (non-blocking):

  • Add an integration test for chained iterable expressions that become non-iterable mid-chain (clear error parity between interpreter and VM).
  • Add a render-level concurrency test on the same compiled chained-loop template to further validate cache safety under parallel renders.
  • Add a couple of UTF-8/non-ASCII string cases in primitive fast-loop parity tests.

Approved from my side — nice improvement!

@paganotoni
paganotoni merged commit a3aaac6 into gobuffalo:main Oct 23, 2026
7 checks passed
@Mido-sys

Copy link
Copy Markdown
Collaborator Author

@paganotoni , Thank you :)

I have implemented those extra tests #237 and fixed the incorrect message to match the interpreter

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