ErgoScript compiler without optimization...
BTW, I recently implemented an alternative "direct" compiler, passes all the LanguageSpecification tests https://github.com/ScorexFoundation/sigmastate-interpreter/pull/1022
GitHub
ErgoScript compiler without optimizations by aslesarenko · Pull Req...
In this PR a new DirectCompiler implemented which takes typed AST (after SigmaTyper) and generates ErgoTree expression bypassing GraphBuilding.
6 Replies
This work is towards what @c8 and @arobsn requested to simplify debugging. The interface of SigmaCompiler will be the same, and by default it will be backwards compatible. There will be
enableOptimizations flag in the settings. When disables, will produce ErgoTree without optimizations. Under isDebug evaluation settings the interpreter will emit name:value pairs for each named variable and/or "debug" functions. At least that is the plan.what will we see without optimizations?
what is the difference
The ErgoTree will be close to the original code. And can give the interpreter a callback to be called on every
val x = ... at runtime with name = x and value = result of ... evaluationah very nice
I think making a standalone repo for this "simple" compiler could be beneficial towards actually understanding how it works
making parsing the files less overwhelming
It is just a stage of SigmaCompiler, so no, cannot agree
makes sense