Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #48929
| From | Rod Pemberton <NoHaveNotOne@bcczxcfrze.cam> |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: Ahead-of-time compilation (as well as tree-shaking, etc.) for Forth |
| Date | 2016-07-07 19:48 -0400 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <20160707194828.29a584fd@_> (permalink) |
| References | <8e8eff0c-b586-474b-ab17-09f5ab2c9124@googlegroups.com> |
On Thu, 7 Jul 2016 12:48:58 -0700 (PDT) Alex Dowad <alexinbeijing@gmail.com> wrote: > I'm sure there is a wealth of information on this topic out there on > the web, but my Google power may not be strong enough. If anyone > could be so kind as to give me a few links to quality material, that > would be appreciated. I'm probably not going to be able to help you that much. However, I have questions the answers to which may help others to help you. > I've built a Forth implementation and am interested in getting it to > compile Forth programs to standalone binaries. Are these binaries to have a built-in ITC or DTC interpreter, or are they without an interpreter as STC? (answered below) > Better yet is if only the word definitions which are actually needed > go into the output. So, you're wanting to specify a Forth word to use as a stand-alone program, have that word's code traced all the way down to primitives, and have the correct sequence of primitives emitted as binary code? > Better still is if the output is fully relocatable and thus can be > linked freely with libraries (which might be written in a different > language). It turns out this is non-trivial to do, unless you make > some undesirable compromises: So, you're not wanting a built-in Forth address interpreter for ITC/DTC code, but you're actually wanting compiled code like a C compiler produces? (This would be STC in Forth parlance.) You might consider going the Forth-to-C translation method and then compile the C code. There are a couple of standalone programs which do this. Isn't there a Forth word like SEE to trace words? Can't you redefine : colon and ; semicol to emit info, binary code, or C code? And, can you add a bit, like for immediacy, to indicate a word trace instead of interpretation or compilation? Rod Pemberton
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Ahead-of-time compilation (as well as tree-shaking, etc.) for Forth Alex Dowad <alexinbeijing@gmail.com> - 2016-07-07 12:48 -0700
Re: Ahead-of-time compilation (as well as tree-shaking, etc.) for Forth Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2016-07-07 21:26 +0100
Re: Ahead-of-time compilation (as well as tree-shaking, etc.) for Forth Alex Dowad <alexinbeijing@gmail.com> - 2016-07-07 13:48 -0700
Re: Ahead-of-time compilation (as well as tree-shaking, etc.) for Forth Rod Pemberton <NoHaveNotOne@bcczxcfrze.cam> - 2016-07-07 19:48 -0400
Re: Ahead-of-time compilation (as well as tree-shaking, etc.) for Forth Alex Dowad <alexinbeijing@gmail.com> - 2016-07-07 21:02 -0700
Re: Ahead-of-time compilation (as well as tree-shaking, etc.) for Forth Paul Rubin <no.email@nospam.invalid> - 2016-07-08 00:05 -0700
Re: Ahead-of-time compilation (as well as tree-shaking, etc.) for Forth Alex Dowad <alexinbeijing@gmail.com> - 2016-07-08 00:42 -0700
Re: Ahead-of-time compilation (as well as tree-shaking, etc.) for Forth Lars Brinkhoff <lars.spam@nocrew.org> - 2016-07-08 09:57 +0200
Re: Ahead-of-time compilation (as well as tree-shaking, etc.) for Forth "Elizabeth D. Rather" <erather@forth.com> - 2016-07-07 14:57 -1000
Re: Ahead-of-time compilation (as well as tree-shaking, etc.) for Forth Cecil Bayona <cbayona@cbayona.com> - 2016-07-07 20:09 -0500
Re: Ahead-of-time compilation (as well as tree-shaking, etc.) for Forth "Elizabeth D. Rather" <erather@forth.com> - 2016-07-07 16:35 -1000
Re: Ahead-of-time compilation (as well as tree-shaking, etc.) for Forth Richard Owlett <rowlett@cloud85.net> - 2016-07-08 09:31 -0500
Re: Ahead-of-time compilation (as well as tree-shaking, etc.) for Forth Lars Brinkhoff <lars.spam@nocrew.org> - 2016-07-08 08:03 +0200
Re: Ahead-of-time compilation (as well as tree-shaking, etc.) for Forth Chris Curl <ccurl609@gmail.com> - 2016-07-08 05:49 -0700
Re: Ahead-of-time compilation (as well as tree-shaking, etc.) for Forth Chris Curl <ccurl609@gmail.com> - 2016-07-08 05:58 -0700
Re: Ahead-of-time compilation (as well as tree-shaking, etc.) for Forth Alex Dowad <alexinbeijing@gmail.com> - 2016-07-08 06:53 -0700
Re: Ahead-of-time compilation (as well as tree-shaking, etc.) for Forth hughaguilar96@gmail.com - 2016-07-08 07:11 -0700
Re: Ahead-of-time compilation (as well as tree-shaking, etc.) for Forth Alex Dowad <alexinbeijing@gmail.com> - 2016-07-08 07:50 -0700
Re: Ahead-of-time compilation (as well as tree-shaking, etc.) for Forth Cecil Bayona <cbayona@cbayona.com> - 2016-07-08 10:17 -0500
Re: Ahead-of-time compilation (as well as tree-shaking, etc.) for Forth Chris Curl <ccurl609@gmail.com> - 2016-07-08 08:34 -0700
csiph-web