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)

1  
static Web web_intern(Web web) {
2  
  if (web == null) null;
3  
  for (WebNode n : web_nodesAndRelations(web))
4  
    web_setLabels_forced(n, map_lisp_intern(n.labels()));
5  
  web.source = intern(web.source);
6  
  web.title = intern(web.title);
7  
  trimToSize(web.nodes);
8  
  for (WebNode n : web.nodes)
9  
    if (n.labels instanceof L) trimToSize((L) n.labels);
10  
  ifdef WebWithRelationsMap
11  
  web.relations = null;
12  
  endifdef
13  
  ifdef WebWithIndex
14  
  web.index = null;
15  
  endifdef
16  
  //web.globalID = intern(web.globalID);
17  
  if (web.globalID instanceof S)
18  
    web.globalID = GlobalID((S) web.globalID);
19  
  ret web;
20  
}

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: 452 / 483
Version history: 14 change(s)
Referenced in: [show references]