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

20
LINES

< > BotCompany Repo | #1011462 // web_intern - intern all strings in web & compact lists; also optimize for space

JavaX fragment (include)

static Web web_intern(Web web) {
  if (web == null) null;
  for (WebNode n : web_nodesAndRelations(web))
    web_setLabels_forced(n, map_lisp_intern(n.labels()));
  web.source = intern(web.source);
  web.title = intern(web.title);
  trimToSize(web.nodes);
  for (WebNode n : web.nodes)
    if (n.labels instanceof L) trimToSize((L) n.labels);
  ifdef WebWithRelationsMap
  web.relations = null;
  endifdef
  ifdef WebWithIndex
  web.index = null;
  endifdef
  //web.globalID = intern(web.globalID);
  if (web.globalID instanceof S)
    web.globalID = GlobalID((S) web.globalID);
  ret web;
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1011462
Snippet name: web_intern - intern all strings in web & compact lists; also optimize for space
Eternal ID of this version: #1011462/15
Text MD5: 7c86fa7d8a0a22ec39f88513ad48aa5b
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-11-27 22:42:02
Source code size: 610 bytes / 20 lines
Pitched / IR pitched: No / No
Views / Downloads: 369 / 398
Version history: 14 change(s)
Referenced in: [show references]