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

Unboxed structure slots #1448

Open
Bike opened this issue Apr 1, 2023 · 0 comments
Open

Unboxed structure slots #1448

Bike opened this issue Apr 1, 2023 · 0 comments

Comments

@Bike
Copy link
Member

Bike commented Apr 1, 2023

Currently structure objects use the same underlying representation as standard objects, the Instance_O with a Rack_O. This is essentially just a vector of boxed objects. It would be nice if structures (and, more exotically, standard objects) could have custom layouts with unboxed objects when :type specifications on lots make this possible.

To do this, work on the runtime and on the compiler is needed.

The compiler work is already mostly done as the compiler can handle unboxed values and send them around without boxing (though this does need improvement). With that in place it's possible to uses unboxed slots efficiently.

The runtime work has not really been started. It must be possible to register new object layouts and make them known to the garbage collector, so that the GC knows not to treat doubles as pointers, knows where the actual pointers in structure objects are, and knows how large thee custom structure objects are.

Additionally, the library definition of defstruct will need to integrate with said runtime facility. But that's easier, probably.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant