book
book copied to clipboard
Writing Interpreters in Rust: a Guide
Hi, thanks for the book It is very helpful. I don't get the rationale for having a custom allocator though, shouldn't it be explained at the start? Wouldn't default rust...
The book text switches inconsistently between a future and present tense. Pick one style and apply it consistently.
See `interpreter/src/bytecode.rs:293` - multiple dereferences required to fetch a single opcode. Ideal state: an instruction pointer that is a pointer to the next opcode. Realistically: that might not be sensible,...
Originally, Array didn't have runtime-borrow capability and I made the (hasty) decision to base the `Array` struct on using `Cell`. It is clear that it makes far more sense to...
This seems wrong. Since these types are just storing word-sized pointers and the behavior we want _is_ to be able to copy them optimally, there should be no other reason...
Instead of the `enum TypeList` in `interpreter/src/headers.rs`, we should explore better type identifier means. For example, can we generate a compile-time const for each object type that can be used...
1. Is `FatPtr` (`interpreter/src/taggedptr.rs`) necessary? Can it be eliminated? 2. `Value` (`interpreter/src/taggedptr.rs`) and `TaggedScopedPtr` (`interpreter/src/safeptr.rs`) appear to be near-identical, can we merge them? Edit book chapter `booksrc/interp-tagged-symbols.md` to reflect changes.
Currently, the allocator only allows objects up to 32k (the Immix block size) - large objects are not supported. The code path in `stickyimmix/heap.rs:114` that raises an error should implement...
The `TaggedPtr` type allows for `size_of::() * 8 - 2` bits of integer to be stored in a pointer. Support for numbers needs to be implemented: 1. in the parser...