SamCoVT / TaliForth2

A Subroutine Threaded Code (STC) ANSI-like Forth for the 65c02
Other
29 stars 7 forks source link

Clean up CREATE and add dynamic NN detection #110

Closed patricksurry closed 5 months ago

patricksurry commented 5 months ago

Adds a create_common entrypoint so that callers don't have to modify the default CREATE behavior.
This simplifies various calling words, saving about 100 bytes plus tiny speedup. HC is now set correctly (fix #105)

SamCoVT commented 5 months ago

I think this is a pretty clean way to get ready to try NN tracking during compiling. It's looking good so far, and I like the way you are handling the CFA words now. Let me know once you think this is stable and ready to merge.

patricksurry commented 5 months ago

This is fine to merge now if you like.

I'll try a small test with the NN tracking which i'm hoping is fairly simple now, and will add that if it's succesful.

patricksurry commented 5 months ago

SImply routing all the cmpl_jump_xxx routines thru a shared path which flags as never-native seems to do the job. Slightly surprised there isn't some other runtime that has hard-wired jmp but maybe earlier refactoring and loop work caught those?

I needed to modify one test to explicitly force the word to never-native since it now compiles as allow-native by default.

Nice to see benchmark result for sieve drop to 0 across the board now 😄