| Age | Commit message (Collapse) | Author |
|
still needs character visualization
also implement ndup ndrop and some similar stuff
Force-Push: yes
Change-Id: I8f0ccdc9643afcd5b9a216b835b74c2c729d1d12
|
|
heresy etc etc
Force-Push: yes
Change-Id: I3ba75447d9a5f67c8739bed82826ac04e5d952ad
|
|
I'm reimplementing it, instead of hooking into the early implementation, because it's just SO much easier to read in the real syntax. also it's not really needed during bootstrapping, so probably that one can eventually be removed.
Force-Push: yes
Change-Id: If3d25eba1b280e14ee418d86d5098efcc069a529
|
|
this ensures we don't accidentally use it going forward
Force-Push: yes
Change-Id: Id2ae7248d25f4090540a7ca795f13e0523f24c74
|
|
Force-Push: yes
Change-Id: I170967f44d9256c49716866afd39e0ab3b6d992a
|
|
yay!
Force-Push: yes
Change-Id: I07aaeb486bf448ed736bd86ea5e495731a1da732
|
|
yay. that went faster than "if" did.
Force-Push: yes
Change-Id: Iba1c2867eed48f483928eafe9a5f90f547715bde
|
|
we decided to do flow control in a fun suffix-y way. so we introduced words { and } which track code blocks while compiling them, and the new word "if" uses memmove to slide that block around to insert a branch before it.
memmove is also new, implemented in flatassembler
also "if" relies on "'" which itself wants to be able to quote the word "lit", so the flatassembler word "literal" is introduced to break the cycle
Force-Push: yes
Change-Id: Iff17a15a1e748fe536e73ad05b1d4b06725a9f78
|
|
this is a real milestone, wow.
this required changing a few things in "interpret".
first and simplest, it wasn't properly dropping the word string when processing a number in compile mode.
second, "word" wasn't properly skipping whitespace - it was still becoming part of the word, which resulted in lookup failures.
third and most interesting, "interpret" no longer loops, it relies on "quit" to do that. that means that instead of cold_start handing off to "interpret" as it previously did, cold_start now hands off to a trampoline it creates that calls "interpret" just enough times to create and invoke "quit".
Force-Push: yes
Change-Id: Iff826c6ef7e58c1e014688ae7508ab13e89c3c28
|
|
these are the idiomatic Forth words [, ], :, and ;. also, comma already existed.
an example of defining and calling a word at runtime is in the boot source
Force-Push: yes!!!!!
Change-Id: I5e5f66649616d9928600482fb7e504cd8bfe0d48
|
|
heh, ironic and stuff
Force-Push: yes
Change-Id: I607ac3b158c4ac6d3475727b278a4570e4570220
|
|
yeahhhhhhh the strings tried to grow downwards in memory. strings don't do that.
on the plus side, the new implementation feels way more elegant.
Force-Push: yes
Change-Id: I836e1348273035299afbd3a793a77327180666f0
|
|
it's not used yet; this uncovered a problem with the stack string buffers, which needs to be fixed first. they grow in the wrong direction.
Force-Push: yes
Change-Id: I208897f9008d956996493b28fff831e04a67a366
|
|
this was done with early_describe_all, as before. both word addresses and string addresses were checked.
there were a couple fixes needed to make that run properly; they have been applied
Force-Push: yes
Change-Id: Idb89d04ab0deb42ef14220b2ef0e958657d75c63
|
|
oops :)
so the no-such-word error condition can happen now, which is good
Force-Push: yes
Change-Id: If0095253c0c247ea7ff13a9b6b49a5698ef8243f
|
|
only decimal tho
Force-Push: yes
Change-Id: I79cfbdee7beb927855e1b32869ac760754af062d
|
|
Force-Push: yes
Change-Id: I2c7eb0c842c930be17bdff2d0e270c53fb996f86
|
|
well, sort of. no literals yet.
Force-Push: yessssssss!!!
Change-Id: I91156554934659ea285cf18def5ed66ce09a1171
|
|
sweeeeeeeet
nearly there now
also, fetch8 (aka 8@) and the 16- and 32-bit equivalents never actually returned their results. oops. fixed.
Force-Push: yes
Change-Id: I35e48036951e829625cc37ce99d789e97d98100b
|
|
by putting this directly on the heap, we allow it to work in the easy, obvious ways, at the cost of extreme verbosity.
the core abstractions here are "buffer", "input buffer", and "buffer metadata". the metadata struct is distinct from the backing store, though there is a convenience word to allocate them together. for communication purposes, the buffer "is" the metadata struct, and the "backing store" is where things are actually read from. all input buffers are buffers but someday not all buffers will be input buffers; note carefully how the various word names make this distinction.
Force-Push: yes
Change-Id: Ib85a74af046b42c8959c6edf93b83e2ad7f21be4
|
|
wow!!!!!
the next step is implementing the Forth lexer. wow!
Force-Push: yes
Change-Id: If847c1d7b3949f7d449279e0783021484f96e6a8
|
|
the words that needed fixes were unroll, stringlen, 0branch, and sys-exit
this is now everything that's expected to agree, we're pretty sure
the disassemblies of litpack* contain absolute addresses of the corresponding pack* words, so those are expected to be different, and the differences look correct at the byte level
similarly, the implementation of docol is significantly different structurally and that's also expected
Force-Push: yes
Change-Id: I0028fb00b4ce51a7f7c608a3153323cf4a2e5a25
|
|
it somehow messed up the call to mov_indirect_reg64_reg64. probably a copy-paste error.
Force-Push: yes
Change-Id: Iaaf70b4d135d101114d07fd7efa7de3736522aa8
|
|
this one didn't have any invocations that were themselves incorrect
and it's really nice to be confident of THAT, too
Force-Push: yes
Change-Id: Ia3fcb373653971bc10d31b2622765d9e16f89845
|
|
it was backwards compared to sub.qreg.qreg, and the mistake had been missed because frankly that's kind of confusing and most of the invocations of it were themselves backwards, cancelling it out
Force-Push: yes
Change-Id: I54bfa242428fcbe54edc9bc1de8199ec9e821ef7
|
|
this matches the behavior the Forth implementation has, and also the behavior of the other flatassembler moves. those versions were written later; it became obvious over the course of development that transparently remapping one variant of an instruction into another was a bad idea and would cause confusion. this change is happening now because, indeed, it caused confusion.
the offending variant was used exactly once, in the pushcontrol macro. it has been changed to the disp8 version, which is already what was being output. we've carefully verified that this produces no unexpected binary changes either to the ELF or to the heap.
it's kinda cool knowing for sure that the debugging process actually catches this sort of weirdness.
Force-Push: yes
Change-Id: I355fc0070bb95beeb94c7d14d46fa2cc50f3a30d
|
|
there's still pending disagreements with words implemented in assembly, which will be dealt with in another CL
"forthcoming" :D
Force-Push: yes
Change-Id: I5420f79365bb1de4ff8e30d79212788251f871cf
|
|
there had been trailing spaces in the output; now there aren't.
happily, since this was just rearranging existing code snippets, there was no need to recalculate those fiddly branch offsets.
Force-Push: yes
Change-Id: Ifde20e2f8e405da3d74175fd029d589eb0a1ecc0
|
|
the hard part was figuring out the generic test for docol. it doesn't really test for docol, it tests for self-codewords and treats everything else as if it uses docol... not ideal, but good enough for now
this also involved hardcoding the name "0branch" as an alternative to "zbranch". again, not a long-term strategy, but the long-term strategy is to remove flatassembler entirely, at which point the old names will go away because we'll be using our own lexer.
there were also a couple small code-validity things that either broke the "describe" output, or became evident because of it, which are now fixed as well.
Force-Push: yes
Change-Id: If6641bb27f4fb0308f6fd4a2f4885215187ec8d9
|
|
there were a few places where this was inadvertently happening, mostly due to using the wrong name for things
this should be all of them, based on searching the debug output for references to the wrong memory area
Force-Push: yes
Change-Id: I2023e3986f6ab15ff394cca759af3cb98c8ee923
|
|
also there was some missing string termination in the previous ones
Force-Push: yes
Change-Id: I8aebc8569a99a7534ffa3e457020327c3e124ddd
|
|
Force-Push: yes
Change-Id: I15fcae09a0bd0f722c339ed2df41764c8fd9fa7e
|
|
Force-Push: yes
Change-Id: I7cd521188642c63820f3b71c8bd1faf532b6962d
|
|
Force-Push: yes
Change-Id: I9f39c4ea6b46f349cc79dcd9fbc96ed7d546bc8d
|
|
Force-Push: yes
Change-Id: I8a3362131086291f60f5f68369e819c1c030babb
|
|
Force-Push: yes
Change-Id: Icdb3f7f27c7ce0a615efbbef3317bb44cecb5caa
|
|
and define the ones related to Forth assembly
Force-Push: yes
Change-Id: Iae63e3e4875d6c66222f903f904bd46c00dfd40a
|
|
also, they're topologically sorted now, and the map is up to date
these are Forth words, so their binary forms aren't checked
Force-Push: yes
Change-Id: I4738ae562d0ceb327396298a29598988453a0756
|
|
Force-Push: yes
Change-Id: I10a098e9f6660ebec6a0beea6eda0a318c5e7f53
|
|
also add Forth words for a couple missing assembly instructions
the map is kept carefully up-to-date through this, and the binary output of the new implementations was checked against the binary output of the original implementations using the new dictionary-debugging feature
Force-Push: yes
Change-Id: Icc8666dc0da9697ccab5d235b714efaa9bdba113
|
|
Force-Push: yes
Change-Id: I5afdff11ce6003deaeae5a9a0844596a593bd393
|
|
Change-Id: Ieba5e3fb7eca5be769cbf798eac0b91e31a1fe75
Force-Push: yes
|
|
a lot of small utilities got added or reorganized as part of writing the debug code. the map now reflects the current state both of what's been implemented in flatassembler, and what has a copy-to-heap implementation
Force-Push: yes
Change-Id: I749cd1814e4b9e5360b68a77461849b345b16559
|
|
this had been an outstanding TODO
Force-Push: yes
Change-Id: Ib3e4a654f3a4323175e2bbf37a6403a8b84ffc8d
|
|
Force-Push: yes
Change-Id: I5516f0ba9a5fe954a1651dbf36df468a8d420f52
|
|
if it were Mr. Mxyzptlk, it would now be vanquished
Force-Push: yes
Change-Id: I7af53bc2a2f5ab69850d9b8bee152c27d1878dc4
|
|
Force-Push: yes
Change-Id: Idba4d4bc1f77a6dc34196673d7760461f9f99bb8
|
|
under the new names dothex and dotbase
Change-Id: I783ad04c6eda1d607cef794788f7e09586650984
Force-Push: yes
|
|
Force-Push: yes
Change-Id: Ic084e13b4fe715bc08ac9ceb0e97f75d2fe7fedd
|
|
Force-Push: yes
Change-Id: I3e282f1d850dac1ee31fc8ee55ba6edecdacbfca
|