curiosity-ai / h5

🚀 The next generation C# to JavaScript compiler
https://github.com/curiosity-ai/h5
Apache License 2.0
211 stars 30 forks source link

[Feature-Request] Get rid of Mono.Cecil in favour of Roslyn #9

Closed vladimir-angelov-1337 closed 4 years ago

vladimir-angelov-1337 commented 4 years ago

Which would in turn get rid of the need for Preconvert() and boost performance somewhat.

theolivenbaum commented 4 years ago

Problem is the Rewriter is needed for converting the C# code into the subset of the C# language that is supported by the transpiler. But with https://github.com/theolivenbaum/h5/blob/9163e7dab492c1d1662f212225aa8b92278184dd/H5/Compiler/Translator/Utils/Roslyn/SharpSixRewriter.cs, we've added support for caching the rewritten code, so it only needs to happen once and will re-use it if the file didnt change. I'll also try to add soon the same thing but for the emitter (i.e. cache the generated Javascript)

vladimir-angelov-1337 commented 4 years ago

Enhancing the transpiler to support the wider C# is not feasible I assume?

theolivenbaum commented 4 years ago

That is for sure feasible! Want to do some cleanup first to refactor it to a more understandable state first, but it should be possible to add the most needed C# 8.0 features

On Fri, May 15, 2020, 9:37 PM Tri-Edge AI notifications@github.com wrote:

Enhancing the transpiler to support the wider C# is not feasible I assume?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/theolivenbaum/h5/issues/9#issuecomment-629435988, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACDCOAZ4XCDCAZ34TRX23N3RRWKY5ANCNFSM4NBRHPQA .