| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This protects us from reading null arrays, but not null structs.
It also doesn't protect us from writes to address 0 itself.
It is also incredibly unsafe. According to https://wiki.osdev.org/Memory_Map_(x86),
address 0 contains the real-mode IVT. Am I sure it'll never ever get used
after I switch to protected mode? I really need a page table, something
minimal to protect the first 4KB of physical memory or something.
I wonder what other languages/OSs do to protect against really large struct
definitions.
|
|
|
|
|
|
|
| |
I keep running into one hole in Mu's memory-safety since dropping the Linux
dependency: null pointers no longer error when dereferenced. Here the problem
manifests as aliasing: lots of gap buffers share the same exact data near
address 0, because it was never initialized.
|
| |
|
|
|
|
|
| |
Once I came up with the right approach, this worked on the first try once
I got the types and registers to line up!
|
| |
|
|
|
|
|
| |
I was forgetting that callers sometimes reuse outputs between successive
tokens.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
We're calling them streams since they support appending.
|
| |
|
| |
|
|
|
|
| |
Known issue: circles of radius 9 crash. (Multiples of 9 overflow the trace.)
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
It's also no longer contiguous with code.
|
| |
|
|
|
|
| |
We'll save tab for inserting graphemes.
|
|
|
|
| |
Show all builtins now that we have more space.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
It requires more than 1GB to fill the screen with a chessboard pattern
using the definition in shell/iterative-definitions.limg.
I also speed up the chessboard program by clearing the screen up front
and then only rendering the white pixels.
|
| |
|
|
|
|
| |
Get rid of my experiment adding Game of Life to the shell.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Thanks Maxwell Bernstein for pointing this out 🤦♂️
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It took me _way_ too long to realize that I'm not checking for errors within
the loop, and that will cause it to manifest as an infinite loop as inner
evaluations fail to run.
Debugging notes, for posterity:
printing one row of a chessboard pattern over fake screen (chessboard screen 4 0 0 15) gets stuck in an infinite loop halfway through
debug pattern during infinite loop: VWEX. It's still in the loop but it's not executing the body
raw (fill_rect screen 16 0 20 4 15) works fine
same number of calls to fill_rect work fine
replacing calls to fill_rect with pixel inside chessboard2 works fine
at the point of the infinite loop it's repeatedly going through the hline loop
-- BUT it never executes the check of the loop (< lo hi) with lo=20, hi=20. Something is returning 1, but it's not inside <
stream optimization is not implicated
simple test case with a single loop
(
(globals . (
(foo . (fn () (screen i n)
(while (< i n)
(pixel screen 4 4 i)
(pixel screen 5 4 i)
(pixel screen 6 4 i)
(pixel screen 7 4 i)
(set i (+ i 1)))))
))
(sandbox . (foo screen 0 100))
)
simpler (if you reset cursor position before every print):
(
(globals . (
(foo . (fn () (screen i n)
(while (< i n)
(print screen i)
(set i (+ i 1)))))
))
(sandbox . (foo screen 0 210))
)
I now believe it has nothing to do with the check. The check always works.
Sometimes no body is evaluated. And so the set has no effect.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
'def' creates new bindings (only in globals)
'set' only modifies existing bindings (either in env or globals)
|