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

31
LINES

< > BotCompany Repo | #1003839 // Test Temp Program

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (1506L/11K/36K).

!759

p {
  S mainJava = [[ static S calc() { ret "Hello " + "World"; } ]];
  print(mainJava);
  
  for (int i = 1; i <= 4; i++) { time {
    print("\nRun " + i);
    
    // transpile
    transpileRaw_silent = true;
    S java;
    time { java = transpileRaw(mainJava); }
    //print(java);
    
    // compile
    File classesDir = javaCompile(java);
    int num = numFiles_noDirs(classesDir);
    long size = directorySize(classesDir);
    print("Compiled to " + classesDir.getAbsolutePath() + " (" + n(num, "file") + ", " + n(size, "byte") + ")");
    
    // hotwire
    Class main = hotwireCore(fileToURL(classesDir));
    
    // call
    print("Hotwired! Now calling.");
    S s = cast call(main, "calc");
    print("Called! Result: " + quote(s));
    assertEquals("Hello World", s);
  }}
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1003839
Snippet name: Test Temp Program
Eternal ID of this version: #1003839/1
Text MD5: 44c9e36269725b570b926cf4be8b00d2
Transpilation MD5: 10169770cee09ff21e9c3081a31f0328
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-07-28 16:36:12
Source code size: 828 bytes / 31 lines
Pitched / IR pitched: No / No
Views / Downloads: 509 / 545
Referenced in: [show references]