Skip to content

Commit

Permalink
chore: Adjust signatures validations
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelaban committed May 29, 2024
1 parent 2efc563 commit c5435cb
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/Uno.Wasm.Tuner/IcallTableGenerator.net5.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,18 @@ public IcallTableGenerator(string? runtimeIcallTableFile, Func<string, string> f
Log = log;
_fixupSymbolName = fixupSymbolName;
if (runtimeIcallTableFile != null && !runtimeIcallTableFile.Equals("__static_icalls__"))
{
ReadTable(runtimeIcallTableFile);

// validate that the _signatures are in the _staticSignatures table
foreach (var sig in _signatures)
{
if (!_staticSignatures.Contains(sig))
{
throw new Exception($"Icall signature '{sig}' is not in the static icall signatures table");
}
}
}
else
{
Log.LogMessage(MessageImportance.Low, $"Using static signatures");
Expand Down Expand Up @@ -118,15 +129,6 @@ public IEnumerable<string> Generate(string? outputPath)

Log.LogMessage(MessageImportance.Low, $"Icalls signatures: " + string.Join(",", _signatures));

// validate that the _signatures are in the _staticSignatures table
foreach (var sig in _signatures)
{
if (!_staticSignatures.Contains(sig))
{
throw new Exception($"Icall signature '{sig}' is not in the static icall signatures table");
}
}

return _signatures;
}

Expand Down

0 comments on commit c5435cb

Please sign in to comment.