Skip to content

Value layout improvements #501

@egranata

Description

@egranata

I may want to do this in time for Aria 1.0 since it's a rather big VM internal change. Right now, the RuntimeValue layout is .. all over the place. I would like to simplify into: a RuntimeValue is a Rc of three things, two optional:

  • an inner value (e.g. an integer, a string, ...);
  • an ObjectBox for attribute storage;
  • a type tag of some kind

So, Integer would boil down to Rc<(InternalValue<i64>, ObjectBox, BuiltinType::Integer)>, an Object probably to Rc<(None, ObjectBox, Struct)> and so on and so forth

If something needs internal mutability, well, it's their problem. Then, for all things, you can say - if I want attribute X, first I look in the ObjectBox, and if not I go ask the type to look in its ObjectBox if it has one, and then I do whatever bound-method work I need to do

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions