slash-lang/slash — pull request #23 by charliesome (2013-09-29 06:11:15+00:00)
Title: Make the VM store an array

The VM store (where extensions can shove arbitrary data that they need to access globally within a VM) is currently a hash table keyed on addresses of static variables (this ensures uniqueness of keys).

This pull request replaces the current hashtable based VM store with an array. Extensions can register VM store slots when Slash statically initializes with `sl_vm_store_register_slot()`. This function returns an index into the VM store array that extensions can use to access the VM store when running in a VM.