-
Notifications
You must be signed in to change notification settings - Fork 0
VM Table Scoping
duangsuse edited this page Jan 9, 2018
·
2 revisions
https://github.com/minized-lang/MVM/wiki/OpCodes#global-table-scoping
Opcode scope and scopeDel and scopeEnd is used to enter/save an Object to destory/leave a scope.
🌚 MinVM uses a Hashtable<Integer, Object> (in Java) to store Objects
but Integer.MAX_VALUE is 2147483647 (in OpenJDK 64-Bit Server VM build 25.151-b12) but in fact EMMC will bind every variable to an index, even it's scoped...
Just for fun. 🌝
MinVM uses a Hashtable<Integer, Object> (in Java) to store Objects
🌚 That's it
es: Scope Stack <Array<Scope>>
Like this
scope
loadInt 8
put 0
scopeDel 0
scopeEnd
;resid 0 is not a valid key to global table now