Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expr compiler #24

Merged
merged 26 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
ee5e2c1
Expressions WIP moving towards strong typed ops
kelnishi Nov 21, 2024
35f2bf4
Expressions converting I32BinOp
kelnishi Nov 21, 2024
db4e55f
Expressions reporting gas usage from compute
kelnishi Nov 21, 2024
a684607
Expressions converting Conversions
kelnishi Nov 21, 2024
61bbcc1
Optimizing conversion
kelnishi Nov 21, 2024
0e81e4a
Adding version sync to Unity publish
kelnishi Nov 21, 2024
1c613a9
Expressions more operations
kelnishi Nov 21, 2024
53b6230
Expressions more operations
kelnishi Nov 21, 2024
4b5c7ff
Expressions even more operations
kelnishi Nov 21, 2024
f9e1873
Expressions more more operations
kelnishi Nov 22, 2024
4206779
Expression profiling pass
kelnishi Nov 22, 2024
a07f5bc
Optimizing stack access
kelnishi Nov 22, 2024
b606005
Optimizing fields for properties
kelnishi Nov 22, 2024
ce1d7ee
Optimizing memory write
kelnishi Nov 22, 2024
f104f16
Standing up in-memory transpiler
kelnishi Nov 23, 2024
27d25fe
Optimizer will descend blocks
kelnishi Nov 23, 2024
daeb335
Fixing optimizer bugs
kelnishi Nov 23, 2024
771ae30
Transpiling local.tee, improving stats measurement
kelnishi Nov 23, 2024
67b3452
Fixing stats calculation
kelnishi Nov 23, 2024
dfa8f85
Adding ns/i per instruction type
kelnishi Nov 23, 2024
6757709
Fixing dot printer
kelnishi Nov 23, 2024
8efcac8
Using integer math in Clock.cs
kelnishi Nov 24, 2024
d9a25e3
Expressions Memory instructions
kelnishi Nov 24, 2024
600f1c7
Adding option to transpile modules for spec test
kelnishi Nov 24, 2024
35298d9
Adding a Transpiler explainer
kelnishi Nov 24, 2024
521b140
Expressions adding F32, F64, I64 optimizers
kelnishi Nov 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .run/Package Unity.run.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Package Unity" type="CompoundRunConfigurationType">
<toRun name="Sync Versions" type="ShConfigurationType" />
<toRun name="Wacs.Core Publish Wacs.Core.dll" type="ShConfigurationType" />
<toRun name="Wacs.Core Publish Wacs.WASIp1.dll" type="ShConfigurationType" />
<method v="2" />
Expand Down
1 change: 1 addition & 0 deletions Spec.Test/WastTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public void RunWast(WastJson.WastJson file)

//Make multiple memories fail validation
ModuleValidator.ValidateMultipleMemories = false;
runtime.TranspileModules = true;

Module? module = null;
foreach (var command in file.Commands)
Expand Down
3 changes: 3 additions & 0 deletions Wacs.Console/CommandLineOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ public class CommandLineOptions

[Option('i', "invoke", HelpText = "Call a specific function.")]
public string InvokeFunction { get; set; } = "";

[Option('t', "transpiler", HelpText = "Invoke the transpiler on instantiated module")]
public bool Transpile { get; set; }

// This will capture all values that aren't tied to an option
[Value(0, Required = true, MetaName = "WasmModule", HelpText = "Path to the executable")]
Expand Down
4 changes: 3 additions & 1 deletion Wacs.Console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,9 @@ static int RunWithOptions(CommandLineOptions opts)
//Validation normally happens after instantiation, but you can skip it if you did it after parsing, or you're like super confident.
var modInst = runtime.InstantiateModule(module, new RuntimeOptions { SkipModuleValidation = true});
runtime.RegisterModule(moduleName, modInst);


if (opts.Transpile)
runtime.TranspileModule(modInst);

var callOptions = new InvokerOptions {
LogGas = opts.LogGas,
Expand Down
Loading
Loading