Libraryless. Click here for Pure Java version (8392L/59K).
1 | static new ThreadLocal<Long> evalJava_myProgramID_main_time; |
2 | |
3 | // set this to not null to get reference to main class |
4 | static new ThreadLocal<O> evalJava_myProgramID_main_mainClass; |
5 | |
6 | static O evalJava_myProgramID_main(S main, O... args) { |
7 | //veryQuickJava_transpiled.set(""); |
8 | O obj = veryQuickJava(main); |
9 | //S src = getAndClearThreadLocal(veryQuickJava_transpiled); |
10 | //saveProgramTextFile("debug.java", src); |
11 | //print("getOpt sane: " + getOpt_cache.get(Class.class)); |
12 | //print("programID: " + getOpt(obj, "programID") + ", my=" + programID() + ", fields: " + fieldNames(obj)); |
13 | //print("programIDXXX: " + getOpt((Class) obj, "programID")); |
14 | //print("field: " + setOpt_findStaticField(obj, "programID")); |
15 | setOpt(obj, "programID", programID()); |
16 | makeDependent(obj); |
17 | if (evalJava_myProgramID_main_mainClass! != null) |
18 | evalJava_myProgramID_main_mainClass.set(obj); |
19 | ret evalJava_myProgramID_main_2(obj, args); |
20 | } |
21 | |
22 | static O evalJava_myProgramID_main_2(O obj, O... args) { |
23 | //print("programID: " + getOpt(obj, "programID")); |
24 | long time = sysNow(); |
25 | try { |
26 | ret callCalc(obj, args); |
27 | } finally { |
28 | evalJava_myProgramID_main_time.set(sysNow()-time); |
29 | } |
30 | } |
Began life as a copy of #1011860
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1012085 |
Snippet name: | evalJava_myProgramID_main |
Eternal ID of this version: | #1012085/19 |
Text MD5: | da1da4563779d55b895ac50daf868773 |
Transpilation MD5: | 3ee56e2d2f01310a2c6f51b8e0c0d3ba |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-11-16 15:53:14 |
Source code size: | 1199 bytes / 30 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 510 / 647 |
Version history: | 18 change(s) |
Referenced in: | [show references] |