Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

22
LINES

< > BotCompany Repo | #1003866 // veryQuickJava2 - transpile, compile, load a short code snippet - adding lib support

JavaX fragment (include)

1  
static bool veryQuickJava_silent = true;
2  
static bool veryQuickJava_useCompilerBot;
3  
4  
// mainJava is a complete program, but without the !752/!759 at the top
5  
// returns link to main class
6  
static Class veryQuickJava2(S mainJava) {
7  
  transpileRaw_silent = veryQuickJava_silent;
8  
  S src = transpileRaw(mainJava); // transpiled, with lib references
9  
  new L<S> libs;
10  
  src = findTranslators2(src, libs);
11  
  //print("Libs found: " + struct(libs));
12  
  
13  
  S dehlibs = join(" ", libs);
14  
  File bytecode = null;
15  
  if (veryQuickJava_useCompilerBot) pcall {
16  
    bytecode = javaCompile_overBot(src, dehlibs);
17  
  }
18  
  if (bytecode == null)
19  
    bytecode = javaCompile(src, dehlibs);
20  
  
21  
  ret hotwireCore(concatLists(ll(bytecode), loadLibraries(libs)));
22  
}

Author comment

Began life as a copy of #1003849

download  show line numbers  debug dex  old transpilations   

Travelled to 16 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, jtubtzbbkimh, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1003866
Snippet name: veryQuickJava2 - transpile, compile, load a short code snippet - adding lib support
Eternal ID of this version: #1003866/1
Text MD5: 76c2536eefe6bfe37d61a75881dd526f
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-11-19 13:12:32
Source code size: 753 bytes / 22 lines
Pitched / IR pitched: No / No
Views / Downloads: 657 / 632
Referenced in: [show references]