Libraryless. Click here for Pure Java version (13217L/84K).
srecord noeq DMEvalJava(S expression) { O mod = dm_current_generic(); O[] args; // probably not a thing anymore bool makeDependent = true; S preppedCode; O obj; O get() { prepCode(); obj = veryQuickJava(preppedCode); setVars(obj); makeDependent(obj); dm_pointSubmoduleToMe(obj, mod); ret callIt(); } O callIt() { ret evalJava_myProgramID_main_2(obj, args); } swappable void prepCode() { preppedCode = evalJava_prep(expression) + postlude(); } swappable O veryQuickJava(S mainJava) { ret main veryQuickJava(mainJava); } swappable void setVars(O obj) { setOpt(obj, programID := programID()); setOpt(obj, creator_class := newWeakReference(dm_os())); } S postlude() { ret [[ static new InheritableThreadLocal<WeakReference> dm_currentModule_value; sO dm_current_mandatory_generic_value; sO dm_current_mandatory_generic() { ret dm_current_mandatory_generic_value; } sO dm_current_generic() { ret dm_current_mandatory_generic(); } ]]; } }
Began life as a copy of #1019381
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1033178 |
Snippet name: | DMEvalJava - successor of dm_evalJava_withModule |
Eternal ID of this version: | #1033178/3 |
Text MD5: | a289bb133e3ac17639e0235582b39fa4 |
Transpilation MD5: | e7844a30ef8ac67fa1be239080b0b2b0 |
Author: | stefan |
Category: | javax / stefan's os |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-10-15 23:23:54 |
Source code size: | 1119 bytes / 45 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 135 / 234 |
Version history: | 2 change(s) |
Referenced in: | [show references] |