Projects using native methods

81 views
Skip to first unread message

Robert Dyer

unread,
Jul 16, 2015, 5:23:28 PM7/16/15
to boa-...@googlegroups.com
Curious which projects declare native methods?  Quite a few!


# find use of native modifier in each project
NativePerProject: output sum[string] of int;


visit
(input, visitor {
   
# only look at the latest snapshot
   
before n: CodeRepository -> {
        snapshot
:= getsnapshot(n);
       
foreach (i: int; def(snapshot[i]))
            visit
(snapshot[i]);
        stop
;
   
}
    before m
: Modifier ->
       
if (m.kind == ModifierKind.OTHER && m.other == "native")
           
NativePerProject[input.id] << 1;
});

Reply all
Reply to author
Forward
0 new messages