Commit Graph

2 Commits

Author SHA1 Message Date
Bob Nystrom
9c663aa13c feat: implement NaN tagging for Value union and hoist bytecode/IP into locals in interpret loop
Switch Value from a struct with type/num/obj fields to a NaN-tagged uint64_t/double union, enabling faster type checks and unboxed numbers. Refactor all macros and accessors (IS_OBJ, AS_OBJ, AS_NUM, etc.) to work with the new representation. Hoist CallFrame pointer, instruction pointer, and bytecode array into local variables inside the interpret loop, updating them on frame push/pop. Enable NAN_TAGGING define and DEBUG_GC_STRESS in common.h. Update Xcode project to use c99 standard, pedantic warnings, and treat warnings as errors. Add benchmark/fib.txt with timing comparisons showing fib benchmark within 25% of Lua.
2013-11-17 22:20:15 +00:00
Bob Nystrom
a59289a0af refactor: extract value type definitions and helpers from vm.h into new value.h/c files 2013-11-17 01:51:30 +00:00