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

26
LINES

< > BotCompany Repo | #1019381 - dm_evalJava_withModule

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

Libraryless. Click here for Pure Java version (9191L/64K).

sO dm_evalJava_veryQuickJava;

static O dm_evalJava_withModule(S expression, O... args) {
  O m = dm_current_generic(); // dm_current_mandatory_generic();
  S code = evalJava_prep(expression) + [[
    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(); }
  ]];
  O obj;
  ifdef dm_evalJava_withModule_debug
    printVars_str("dm_evalJava_withModule: ", +dm_evalJava_veryQuickJava);
  endifdef
  if (dm_evalJava_veryQuickJava != null)
    obj = callF(dm_evalJava_veryQuickJava, code);
  else
    obj = veryQuickJava(code);
  setOpt(obj, programID := programID());
  makeDependent(obj);
  setOpt(obj, creator_class := newWeakReference(dm_os()));
  dm_pointSubmoduleToMe(obj, m);
  ret evalJava_myProgramID_main_2(obj, args);
}

Author comment

Began life as a copy of #1017136

download  show line numbers  debug dex   

Travelled to 13 computer(s): bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, whxojlpjdney, xrpafgyirdlv

No comments. add comment

Snippet ID: #1019381
Snippet name: dm_evalJava_withModule
Eternal ID of this version: #1019381/11
Text MD5: 27e77adb9cb4c203770885808f0bdc26
Transpilation MD5: ccb8c37b0e82af3ac3c31fe83f27254a
Author: stefan
Category: javax / stefan's os
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-12-02 23:15:25
Source code size: 971 bytes / 26 lines
Pitched / IR pitched: No / No
Views / Downloads: 216 / 266
Version history: 10 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1019381 & http://1019381.tinybrain.de