feat: move primitive class definitions from C into core.wren library source

Move the definitions of Bool, Fiber, Fn, Null, and Num classes from hardcoded C code in wren_core.c into the core.wren library source, allowing them to be parsed and created during library initialization. Simplify defineClass to always use wrenNewSingleClass, remove redundant root pushing in wrenNewClass, and adjust the class creation in the interpreter to use a Value instead of ObjClass*.
This commit is contained in:
Bob Nystrom
2015-04-03 15:00:55 +00:00
parent 17c6f277b2
commit b6e2229b58
4 changed files with 26 additions and 27 deletions
+6
View File
@@ -1,3 +1,9 @@
class Bool {}
class Fiber {}
class Fn {}
class Null {}
class Num {}
class Sequence {
all(f) {
var result = true