Closed patricksurry closed 3 months ago
This looks pretty reasonable. Exposing a compile-nt, word into the forth wordlist might not be a terrible idea, but I'm not sure how much it would get used from forth. The search words like FIND return XTs, and getting the NT from an XT already takes another trip through the dictionary again. The assembly level optimization looks good, though.
ok, let's leave it as is for now (not exposed in forth)
compile,
callsint>name ( xt -- nt )
it to get status flags, but that's slow since it searches the dictionary.Since all the current callers of
compile,
are doingname>int ( nt -- xt )
beforehand we can save a bunch of cycles (amounting to about 5% of the full test suite) by providing a new entrypoint that acts on thent
instead.Could even expose as a word like
compile-nt,
if you think that makes sense?