Skip to content

RuntimeObjects  #4

@Skinz3

Description

@Skinz3

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] 

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions