Skip to content

State functions #3

@Y-Less

Description

@Y-Less

I don't think (from looking at the code, I've not tested this) that this code won't work with state functions like:

MyFunc() <my_state:a>
{
}

MyFunc() <my_state:b>
{
}

main()
{
    state my_state:b;
    MyFunc();
}

They are implemented as a call to a function stub near the start of the code block, which consists soley of a switch and jumps to individual complete functions. The stub has no PROC, but any CALLs will point to it, not to the separate implementations. I can provide better disassembly if you would like.

I like the idea though (does it detect its own recursion)?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions