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
morphic
morphicOP16mo ago
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.
MGpai
MGpai16mo ago
what will we see without optimizations? what is the difference
morphic
morphicOP16mo ago
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 ... evaluation
MGpai
MGpai16mo ago
ah 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
morphic
morphicOP16mo ago
It is just a stage of SigmaCompiler, so no, cannot agree
MGpai
MGpai16mo ago
makes sense

Did you find this page helpful?