Frames, heap and code pointers

LSL ByteCode uses a lot of pointers, both to memory (static frames, local/global, heap) as well as JUMP pointers.

Some of these pointers exist during load, for example argument types, static data, jump positions, etc. While others are allocated and created dynamically during run-time. What they all have in common is that they point to a position in the 16k LSO ByteCode file.

For memory pointers I’m planning to use a dictionary (or possibly an array), where key will be position and data the actual datastructure.

For JUMP positions I will need to scan the code first for JUMP’s, then create MSIL labels in the code at these positions. This might require a two-pass run on the ByteCode.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: