File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,10 +62,10 @@ struct Metrics
6262 walkTable (&module ->table );
6363 walkMemory (&module ->memory );
6464
65- // add imports
65+ // add imports / funcs / globals/ exports
6666 counts[" [imports]" ] = imports.getNumImports ();
67- // add functions
6867 counts[" [funcs]" ] = imports.getNumDefinedFunctions ();
68+ counts[" [globals]" ] = imports.getNumDefinedGlobals ();
6969 counts[" [exports]" ] = module ->exports .size ();
7070 // add memory and table
7171 if (module ->memory .exists ) {
Original file line number Diff line number Diff line change 11total
22 [exports] : 1
33 [funcs] : 1
4+ [globals] : 0
45 [imports] : 10
56 [memory-data] : 0
67 [table-data] : 0
Original file line number Diff line number Diff line change 11total
22 [exports] : 2
33 [funcs] : 8
4+ [globals] : 1
45 [imports] : 3
56 [memory-data] : 28
67 [table-data] : 429
@@ -243,6 +244,7 @@ total
243244total
244245 [exports] : 2
245246 [funcs] : 8
247+ [globals] : 1
246248 [imports] : 3
247249 [memory-data] : 28
248250 [table-data] : 429
@@ -486,6 +488,7 @@ total
486488total
487489 [exports] : 2
488490 [funcs] : 8
491+ [globals] : 1
489492 [imports] : 3
490493 [memory-data] : 28
491494 [table-data] : 429
Original file line number Diff line number Diff line change 11global
22 [exports] : 0
33 [funcs] : 3
4+ [globals] : 1
45 [imports] : 0
56 [memory-data] : 9
67 [table-data] : 3
@@ -90,13 +91,15 @@ func: ifs
9091global
9192 [exports] : 0
9293 [funcs] : 0
94+ [globals] : 0
9395 [imports] : 0
9496 [total] : 0
9597(module
9698)
9799global
98100 [exports] : 2
99101 [funcs] : 3
102+ [globals] : 0
100103 [imports] : 1
101104 [total] : 0
102105func: func_a
@@ -170,6 +173,7 @@ export: b (func_b)
170173global
171174 [exports] : 1
172175 [funcs] : 1
176+ [globals] : 0
173177 [imports] : 1
174178 [total] : 0
175179func: func_a
@@ -200,6 +204,7 @@ start: func_a
200204global
201205 [exports] : 0
202206 [funcs] : 1
207+ [globals] : 0
203208 [imports] : 1
204209 [total] : 0
205210func: func_a
@@ -226,6 +231,7 @@ start: func_a
226231global
227232 [exports] : 1
228233 [funcs] : 1
234+ [globals] : 1
229235 [imports] : 1
230236 [total] : 1
231237 global.get : 1
Original file line number Diff line number Diff line change 11total
22 [exports] : 0
33 [funcs] : 1
4+ [globals] : 1
45 [imports] : 0
56 [memory-data] : 9
67 [table-data] : 3
6162total
6263 [exports] : 0
6364 [funcs] : 0
65+ [globals] : 0
6466 [imports] : 0
6567 [total] : 0
6668 [vars] : 0
Original file line number Diff line number Diff line change 11total
22 [exports] : 1
33 [funcs] : 1
4+ [globals] : 0
45 [imports] : 0
56 [total] : 1
67 [vars] : 0
78 nop : 1
89total
910 [exports] : 1
1011 [funcs] : 1
12+ [globals] : 0
1113 [imports] : 0
1214 [total] : 1
1315 [vars] : 0
Original file line number Diff line number Diff line change 11total
22 [exports] : 1
33 [funcs] : 1
4+ [globals] : 0
45 [imports] : 0
56 [total] : 1
67 [vars] : 0
78 nop : 1
89total
910 [exports] : 1
1011 [funcs] : 1
12+ [globals] : 0
1113 [imports] : 0
1214 [total] : 1
1315 [vars] : 0
You can’t perform that action at this time.
0 commit comments