Skip to content

Patch CFA>#7

Merged
jburgy merged 3 commits into
mainfrom
patch-cfa>
Nov 13, 2025
Merged

Patch CFA>#7
jburgy merged 3 commits into
mainfrom
patch-cfa>

Conversation

@jburgy

@jburgy jburgy commented Nov 12, 2025

Copy link
Copy Markdown
Contributor

jonesforth.f relies on the fact that word addresses increase monotonically. Zig and emscripten do not guarantee that invariant. Safer to work around it

This issue shows up, for example, when entering SEE /⏎. The reply should be : / /MOD SWAP DROP ; but ends up being : / LIT LIT LIT ; because the address of LIT is somehow lower than that of DROP.

: ADDR WORD FIND . CR ;
ADDR DROP
69752 
ADDR LIT
68372

@jburgy jburgy requested review from Afirium and jedisct1 November 12, 2025 21:43
@jburgy jburgy self-assigned this Nov 12, 2025
Afirium
Afirium previously approved these changes Nov 13, 2025
@jburgy

jburgy commented Nov 13, 2025

Copy link
Copy Markdown
Contributor Author

Thank you for approving the initial version, @Afirium . It took reflecting on this question to realize a simpler fix. Please re-approve

@Afirium Afirium removed the request for review from jedisct1 November 13, 2025 13:07
Afirium
Afirium previously approved these changes Nov 13, 2025
@jburgy

jburgy commented Nov 13, 2025

Copy link
Copy Markdown
Contributor Author

@Afirium I invalidated your approval once again because I realized this invariant warrants a test. Mind clicking the button for a 3rd time?

@jburgy jburgy merged commit ed3c876 into main Nov 13, 2025
2 checks passed
@jburgy jburgy deleted the patch-cfa> branch November 13, 2025 19:14
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