Libraryless. Click here for Pure Java version (10027L/56K).
sclass RunTranspiler { settable S transpilerID = #759; O transpiler; settable S sourceInput; S sourceOutput; settable S mainSnippetID; settable int coresToUse = numberOfCores(); // transpilation options bool asFragment, asInclude; event preparingTranspiler(O transpiler); void loadTranspiler() { transpiler = hotwire(transpilerID); } void prepareTranspiler { setOpt(transpiler, localStuffOnly := asFragment); setOpt(transpiler, +asInclude); sourceInput = dropTranslators(sourceInput); set(transpiler, mainJava := sourceInput); set(transpiler, +print_byThread()); setOpt(transpiler, +mainSnippetID); setOpt(transpiler, numberOfCores_value := coresToUse); preparingTranspiler(transpiler); } void runTranspiler { callMain(transpiler); sourceOutput = (S) _get(transpiler, "mainJava"); } S get(S sourceInput) { if (transpiler == null) loadTranspiler(); sourceInput(sourceInput); prepareTranspiler(); runTranspiler(); ret sourceOutput; } }
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1034498 |
Snippet name: | RunTranspiler |
Eternal ID of this version: | #1034498/10 |
Text MD5: | 571eb24c50218f0c2525d45e4b6aabd6 |
Transpilation MD5: | 9419db9b16b578c9002e82a539c359c4 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-06-11 00:48:55 |
Source code size: | 1095 bytes / 42 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 195 / 364 |
Version history: | 9 change(s) |
Referenced in: | [show references] |