b9org / b9

An educational JS virtual machine based on Eclipse OMR
http://www.base9.xyz
Apache License 2.0
45 stars 24 forks source link

Add array objects to base9 #127

Open rwy7 opened 6 years ago

rwy7 commented 6 years ago

Array objects can be implemented as regular objects. We can reserve an id for a slot, which will point to an ArrayBuffer of indexed slots. The trouble is that the array buffer will need to be scanned (they are treated as leaf objects). It's possible that we can add CoreType typing to ArrayBuffer objects.