-
Notifications
You must be signed in to change notification settings - Fork 0
Description
RuntimeStruct.cpp should be RuntimeClass.cpp and Classes and Structs should have the same runtime behavior.
ByteFields shouldnt have static values and class should have RuntimeClass singleton. (More flexibilité)
Our virtual machine is abstracting too much runtime objects in this case.
This will also help us to represent functional data objects.
ByteClass should have a RuntimeClass member that can point to NULL_PTR if the container type is struct. (No singleton value)
It will also make reflection and variable accessors easier to implement during compilation process.
But ! Considering static classes as RuntimeClass will cost more memory and more performances ... ( 2 instructions to Access a static field : PushCurrent + GetMember ). We should create a spécial instruction that directly get a field from current struct !
I Guess its python LOAD_GLOBAL op code
case LoadStatic:
RuntimeElement* value = Classes[i].Instance.Fields[i]