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

20
LINES

< > BotCompany Repo | #1031284 // transpileAndCompileForHotwiring

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (10713L/67K).

// output variable, set even when compilation fails
static new ThreadLocal<S> transpileAndCompileForHotwiring_src;

static File transpileAndCompileForHotwiring(S src, LS libs default null) {
  transpileAndCompileForHotwiring_src.set(null);
  
  // taken from veryQuickJava3
  if (libs == null) libs = new L;
  src = transpileRaw(src); // transpiled, with lib references
  transpileAndCompileForHotwiring_src.set(src);
  
  // taken from veryQuickJava_finish
  src = findTranslators2(src, libs);
  S dehlibs = join(" ", libs);
  File bytecode = javaCompile_overInternalBot(src, dehlibs);
  print(+bytecode);
  print("Files: " + listZip(bytecode));
    
  ret bytecode;
}

Author comment

Began life as a copy of #1031279

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1031284
Snippet name: transpileAndCompileForHotwiring
Eternal ID of this version: #1031284/6
Text MD5: 58d1fddd5ad1098a3807b326b2702c11
Transpilation MD5: d8125cf271cb767b3cca5caa7188719e
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-07-14 16:33:04
Source code size: 690 bytes / 20 lines
Pitched / IR pitched: No / No
Views / Downloads: 135 / 202
Version history: 5 change(s)
Referenced in: [show references]