WasmSequencer#5386
Conversation
|
Documenting the host environment assumptions:
Math functions (use libm implementation, trap if undefined behavior or out of domain)
|
|
String formatting in events should be done one of two ways.
|
| // Implementations for internal state machine actions | ||
| // ---------------------------------------------------------------------- | ||
|
|
||
| void WasmSequencer ::Svc_WasmSequencer_SequencerStateMachine_action_signalEntered( |
There was a problem hiding this comment.
if you want to follow the idioms of the fpy sequencer, you could split all the sm guard/action impls out into a separate file. just helps to keep the length of any one file down
| @ 3. INVOKE "" "main" | ||
| @ 4. CONTINUE | ||
| @ | ||
| @ If $block == Svc.BlockState.BLOCK this command will wait for complemention. |
| ) | ||
|
|
||
| @ Wait for the interpreter to finish and return it's result as a CmdResponse | ||
| async command WAIT() |
There was a problem hiding this comment.
consider more descriptive name? WAIT_FOR_SEQUENCE?
| ) | ||
|
|
||
| @ Invoke a function from a loaded module | ||
| async command INVOKE( |
There was a problem hiding this comment.
this is a very interesting capability and i wonder if we can make use of it more
| signal interpreterTrap: TrapReason | ||
|
|
||
| @ No more fuel (ran to instruction bound) | ||
| signal interpreterOutOfFuel |
There was a problem hiding this comment.
do we need a fuel param or arg?
There was a problem hiding this comment.
Good idea, I was going to make it a config but parameter makes more sense.
There was a problem hiding this comment.
That parameter essentially controls how responsive the interpreter is to PAUSE if it's doing computationally heavy tasks.
| } | ||
|
|
||
| @ sequencer is spinning the interpreter loop | ||
| state SPINNING { |
There was a problem hiding this comment.
briefly, would it be more clear if you called it "RUNNING"? spin is a bit jargony
|
Some non substantive review. I think I will wait to deeply review this component until you can go over it with me together. |
Change Description
This component is still under active development. I'm creating a draft PR to work in tandem with @zimri-leisher Fpy development and capture review items.
Rationale
Testing/Review Recommendations
Future Work
AI Usage (see policy)