File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11
2+ let config-profile-ast = false;
3+
24let profile-count-ast-unique-index = mk-hashtable-is(type(AST), type(U64));
35let profile-count-ast-equal-index = mk-hashtable(type(AST), type(U64));
46
57let profile-visit-ast-unique(t: AST): Nil = (
6- profile-count-ast-unique-index = profile-count-ast-unique-index.bind(
7- t,
8- profile-count-ast-unique-index.lookup(t, 0_u64) + 1
9- );
8+ if config-profile-ast then {
9+ profile-count-ast-unique-index = profile-count-ast-unique-index.bind(
10+ t,
11+ profile-count-ast-unique-index.lookup(t, 0_u64) + 1
12+ );
13+ }
1014);
1115
1216let profile-visit-ast-equal(t: AST): Nil = (
13- profile-count-ast-equal-index = profile-count-ast-equal-index.bind(
14- t,
15- profile-count-ast-equal-index.lookup(t, 0_u64) + 1
16- );
17+ if config-profile-ast then {
18+ profile-count-ast-equal-index = profile-count-ast-equal-index.bind(
19+ t,
20+ profile-count-ast-equal-index.lookup(t, 0_u64) + 1
21+ );
22+ }
1723);
1824
1925let profile-print-ast(): Nil = (
Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ let print-toks-json(fp: CString): Nil = (
2727);
2828
2929let show-alloc-count = false;
30- let config-profile-ast = false;
3130
3231let main(argc: C_int, argv: CString[]): Nil = (
3332 let argi = 1_u64;
You can’t perform that action at this time.
0 commit comments