First step towards making FnObjs smarter about size.
Currently, they have a hardcoded number of constants and bytecodes. That wastes memory in most cases and fails catastrophically when there is too much bytecode. To fix this, we should use growable buffers for both during compilation and then only create the FnObj when done compiling. This moves a bunch of stuff around and gets it to the point where functions are created at the end of compilation. It doesn't yet size functions appropriately, but all tests are passing, so this is a good checkpoint.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#ifndef wren_common_h
|
||||
#define wren_common_h
|
||||
|
||||
// TODO: Would be good to use "const" on pointer params when possible.
|
||||
|
||||
// This header contains macros and defines used across the entire Wren
|
||||
// implementation. In particular, it contains "configuration" defines that
|
||||
// control how Wren works. Some of these are only used while hacking on
|
||||
|
||||
Reference in New Issue
Block a user