Achieve 100% Core Extensions compliance, 261 tests
Implement 25+ Core Extension words: - VALUE/TO, DEFER/IS/ACTION-OF, :NONAME - CASE/OF/ENDOF/ENDCASE, ?DO, AGAIN - PARSE, PARSE-NAME, S\", C", HOLDS, BUFFER: - 2>R, 2R>, 2R@, U>, .R, U.R, PAD, ERASE, UNUSED - REFILL, SOURCE-ID, MARKER (stub) Fix panic on invalid memory access (bounds check in FIND). Rewrite FIND/WORD host functions for inline operation. Add BeginAgain IR variant and codegen. Three word sets at 100%: Core, Core Extensions, Exception.
This commit is contained in:
@@ -193,6 +193,14 @@ impl Dictionary {
|
||||
self.latest
|
||||
}
|
||||
|
||||
/// Read the link field (previous word address) at a word entry.
|
||||
pub fn read_link(&self, word_addr: u32) -> u32 {
|
||||
if (word_addr + 4) as usize > self.memory.len() {
|
||||
return 0;
|
||||
}
|
||||
self.read_u32_unchecked(word_addr)
|
||||
}
|
||||
|
||||
/// Allocate n bytes at HERE (like Forth's ALLOT).
|
||||
pub fn allot(&mut self, n: u32) -> WaferResult<u32> {
|
||||
let new_here = self
|
||||
|
||||
Reference in New Issue
Block a user