Skip to content

Commit

Permalink
Relaxing Next() for optional execution
Browse files Browse the repository at this point in the history
  • Loading branch information
kelnishi committed Dec 3, 2024
1 parent 58c2eaa commit fce7cc4
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions Wacs.Core/Runtime/WasmRuntimeExecution.cs
Original file line number Diff line number Diff line change
Expand Up @@ -406,12 +406,8 @@ public async Task ProcessThreadWithOptions(InvokerOptions options)
long highwatermark = 0;
long gasLimit = options.GasLimit > 0 ? options.GasLimit : long.MaxValue;

InstructionBase inst;
//Manually inline Next()
// while (Context.Next() is { } inst)
while (++Context._sequenceIndex < Context._sequenceCount)
while (Context.Next() is { } inst)
{
inst = Context._sequenceInstructions[Context._sequenceIndex];
//Trace execution
if (options.LogInstructionExecution != InstructionLogging.None)
{
Expand Down

0 comments on commit fce7cc4

Please sign in to comment.