Skip to content

expressions involving timeof(label) and offsetof(label) evaluate at runtime #50

Description

@ExpHP
// original
+6:
label:
sprite(sprite0 + timeof(label) + 3);

// decompiled
+6:
I0 = 0 + 6;
I0 = I0 + 3;
sprite(I0);

The fact that this evaluates at runtime might come as a surprise to users. However, evaluating timeof/offsetof as const would be challenging to support...

Perhaps it should just generate an error for now to use timeof/offsetof with operators...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions