Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeObjects #4

Open
Skinz3 opened this issue Oct 21, 2020 · 0 comments
Open

RuntimeObjects #4

Skinz3 opened this issue Oct 21, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@Skinz3
Copy link
Owner

Skinz3 commented Oct 21, 2020

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] 

@Skinz3 Skinz3 added the enhancement New feature or request label Oct 21, 2020
@Skinz3 Skinz3 changed the title RuntimeClass RuntimeObjects Oct 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant