mirror of
https://tangled.org/emmeline.girlkisser.top/puppy
synced 2026-02-12 09:36:44 +00:00
No description
| benchmark | ||
| doc | ||
| include | ||
| sample | ||
| scripts | ||
| src | ||
| std | ||
| test | ||
| .gitattributes | ||
| .gitignore | ||
| readme | ||
| run.sh | ||
puppy
=====
A minimalistic scripting language for embedding.
greet(whom: str) =
print("Hello, ", whom.name, "!");
main = {
let names = ["Gandalf", "Bilbo", "Frodo"];
for name in names {
greet(name);
}
}
todo
----
. Change VM/framestacks to hold variables in a single hash
table instead of many small hash tables. In theory, this
should provide a substantial performance improvement to
variable lookups.
x Improve syntax+thrown errors and completely change how
errors are handled in the C API. exit() should be seldom
used.
. Document API and clean up source
. Optimise memory layout to keep memory more contiguous.
I'm thinking that I could allocate a large arena at the
start of the program and allocate anything that'll stick
around inside that. Dynamic objects like the stack might be
more tedious since they're likely to move around in memory
as the program runs for longer periods of time. Maybe I
could make the "main" part of the stack live in the arena
and then separate out the "extra" (less commonly accessed)
part elsewhere in memory as needed. Basically a "chunked
dynamic list" of some kind. Resizing hash tables would be
more tedious, but I'm sure there's an optimization I could
implement.