Open
Conversation
…to bss rather than text section which avoids the need to call mprotect(), rename things
… be wrapped with PROGRAM / END, also removes automatic bye token that was generated by END
…time.seedsource, so that we can run textual forth code without the tests or the banner
… writes to stderr, fix self-hosted tokenizer termination issue (was debugged with eemit)
…ng the nonstandard words on top of gForth's standard words, produces redefinition warnings
…seedForth-i386.pre containing some compiler words so we can do special handling for DTC
…sticated tracing and symbolic debug (via annotated trace) system used to debug the 65C02 port, the trace is also available for the Z80 port and can be used for comparison
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since initially coming to preForth, the
executeword has bothered me a bit. It takes on the stack an integer token number, then executes the equivalent ofh@to read the corresponding address from the headers table, and then "calls" the defined word at that address (by a tail call). I have wanted to remove theh@for efficiency reasons, i.e. simply pop an address and execute it.This required me to undertake an analysis of all calls to
hp,h@,h,andtokento understand where the integer tokens originate and make sure they are all replaced with addresses. This PR contains the corresponding changes, in summary:tokeninserth@everywhere.h@everywhere, and recode theexecuteword accordingly.compile,then becomes a synonym for,so replace that everywhere as well, and move another token down into the spot previously occupied bycompile,.newandcreateleave an address rather than a token on the stack, by replacinghp @ here h,withhere dup h,.It works. I think this is more efficient and simpler code. Also, it opens the door to some further improvements that would aim to use the headers table only for communication with the tokenizer, maybe even reclaiming that memory once
*.seedis running.