Skip to content

Identifiers should not be on the stack #2152

@tsholmes

Description

@tsholmes

Right now we push identifiers with various prefixes and suffixes onto the stack to signal that they are identifiers. These should be stored in the opcodes in a way that is clear they are identifiers.

push $identifier

changes to

pusheval identifier // pushes the value referred to by identifier onto the stack

push $identifier
push 1
storelocal

changes to

push 1
storelocal identifier

push $identifier
push suffix
getmember

changes to

pusheval identifier
getmember suffix

and similarly for the rest of the opcodes that reference identifiers.
This will allow us to know the types of the values on the stack at all times, and eventually restrict them to only be Structure types that the script can directly interact with

Metadata

Metadata

Assignees

Labels

OptimizationSpeed or memory footprint improvement that shouldn't change end resultdiscussionNot necessarily a problem - Using a Github issue to have a public discussionenhancementSomething new (not a bug fix) is being requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions