Skip to content

Commit 2f9d94f

Browse files
authored
Merge pull request #2031 from andrew4328/avoid-mini-allocations-to-constants-fdsklfew
Avoid mini allocations to constants fdsklfew
2 parents d9bb1fb + 67fd964 commit 2f9d94f

16 files changed

+3558
-3463
lines changed

BOOTSTRAP/cli.c

Lines changed: 3426 additions & 3388 deletions
Large diffs are not rendered by default.

PLUGINS/BACKEND/C/std-c-compile-expr.lsts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ let .rewrite-if-reserved(s: CString): CString = (
6868
let std-c-compile-expr(ctx: FContext, t: AST, is-stmt: Bool): Fragment = (
6969
let f = match t {
7070
Var{ key=key } => (
71-
if typeof-term(t) <: t1(c"C",t0(c"void")) {
71+
if typeof-term(t) <: type-c-void {
7272
mk-fragment().set(c"expression",SAtom(c"({})"));
7373
} else if typeof-term(t).is-t(c"C-FFI",0) {
7474
mk-fragment().set(c"expression",SAtom(key.replace(c"-",c"_").rewrite-if-reserved));
@@ -89,13 +89,13 @@ let std-c-compile-expr(ctx: FContext, t: AST, is-stmt: Bool): Fragment = (
8989
);
9090
App{ left:Abs{lhs=lhs:Var{name=key}, rhs:ASTNil{}}, rhs=right } => (
9191
let lt = typeof-term(lhs).without-modifiers;
92-
let vid = if lt.is-t(c"Nil",0) or lt <: t1(c"C",t0(c"void")) then SAtom(c"({})") else if std-c-is-ctype(lt) then SAtom(name.replace(c"-",c"_").rewrite-if-reserved) else SAtom(uuid());
92+
let vid = if lt.is-t(c"Nil",0) or lt <: type-c-void then SAtom(c"({})") else if std-c-is-ctype(lt) then SAtom(name.replace(c"-",c"_").rewrite-if-reserved) else SAtom(uuid());
9393
let v = mk-fragment().set(c"expression",vid);
9494
let f = mk-fragment();
9595
std-c-fragment-context = std-c-fragment-context.bind( lhs, v );
9696
ctx = ctx.bind( name, lt, v );
97-
if lt.is-t(c"Nil",0) or lt.is-t(c"Never",0) or lt <: t1(c"C",t0(c"void")) {
98-
} else if lt <: t1(c"C",t0(c":Label")) {
97+
if lt.is-t(c"Nil",0) or lt.is-t(c"Never",0) or lt <: type-c-void {
98+
} else if lt <: type-c-label {
9999
f = f.set(c"expression", v.get(c"expression") + SAtom(c":"));
100100
} else {
101101
(let pre, let post) = std-c-mangle-declaration(lt, t);
@@ -110,7 +110,7 @@ let std-c-compile-expr(ctx: FContext, t: AST, is-stmt: Bool): Fragment = (
110110
_ => (
111111
let rf = std-c-compile-expr(ctx, rhs, false);
112112
f = f.set(c"frame", f.get(c"frame") + rf.get(c"frame"));
113-
if lt.is-t(c"Nil",0) or lt.is-t(c"Never",0) or lt <: t1(c"C",t0(c"void")) {
113+
if lt.is-t(c"Nil",0) or lt.is-t(c"Never",0) or lt <: type-c-void {
114114
f = f.set(c"expression", SAtom(c"({") + rf.get(c"expression") + SAtom(c";({});})"));
115115
} else {
116116
f = f.set(c"expression", SAtom(c"({")

PLUGINS/BACKEND/C/std-c-compile-function-args.lsts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ let std-c-compile-function-args(ctx: FContext, lhs: AST): S = (
55
let decl = std-c-mangle-declaration(kt, lhs);
66
let text = std-c-compile-function-args(ctx, rest);
77
text = text + SAtom(c",");
8-
if can-unify( t1(c"C",t0(c"...")), kt ) {
8+
if can-unify( type-c-vararg, kt ) {
99
text = text + SAtom(c"...");
10-
} else if can-unify( t1(c"C",t0(c"void")), kt ) {
10+
} else if can-unify( type-c-void, kt ) {
1111
text = text + SAtom(c"void");
1212
} else {
1313
text = text + decl.first;
@@ -21,9 +21,9 @@ let std-c-compile-function-args(ctx: FContext, lhs: AST): S = (
2121
App{ left:Lit{key:c":"}, right:App{ v-t=left:Var{k2=key}, right:AType{kt=tt} } } => (
2222
let decl = std-c-mangle-declaration(kt, lhs);
2323
let text = SNil();
24-
if can-unify( t1(c"C",t0(c"...")), kt ) {
24+
if can-unify( type-c-vararg, kt ) {
2525
text = text + SAtom(c"...");
26-
} else if can-unify( t1(c"C",t0(c"void")), kt ) {
26+
} else if can-unify( type-c-void, kt ) {
2727
text = text + SAtom(c"void");
2828
} else {
2929
text = text + decl.first;

PLUGINS/BACKEND/C/std-c-compile-global.lsts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ let std-c-compile-global(ctx: FContext, k: CString, term: AST): Nil = (
5656
text = text + SAtom(k);
5757
text = text + post-decl;
5858
text = text + SAtom(c";\n");
59-
if kt.is-t(c"Nil",0) or kt.is-t(c"Never",0) or kt <: t1(c"C",t0(c"void")) then ()
60-
else if can-unify(t1(c"C",t0(c"typedef")), tt) or can-unify(t2(c"Array",t1(c"C",t0(c"typedef")),ta), tt) {
59+
if kt.is-t(c"Nil",0) or kt.is-t(c"Never",0) or kt <: type-c-void then ()
60+
else if can-unify(type-c-typedef, tt) or can-unify(type-array-c-typedef, tt) {
6161
assemble-header-typedef-section = assemble-header-typedef-section + text;
6262
} else {
6363
assemble-gdecl-section = assemble-gdecl-section + text;
@@ -72,14 +72,14 @@ let std-c-compile-global(ctx: FContext, k: CString, term: AST): Nil = (
7272
if tt.is-t(c"C-Fragment",0) {
7373
match t {
7474
Lit{key=key} => (
75-
if kt.is-t(c"Nil",0) or kt.is-t(c"Never",0) or kt <: t1(c"C",t0(c"void")) then ()
75+
if kt.is-t(c"Nil",0) or kt.is-t(c"Never",0) or kt <: type-c-void then ()
7676
else assemble-gdecl-section = assemble-gdecl-section + SAtom(key);
7777
gend = true;
7878
);
7979
_ => ();
8080
}
8181
};
82-
if not(gend) and (kt.is-t(c"Nil",0) or kt.is-t(c"Never",0) or kt <: t1(c"C",t0(c"void"))) {
82+
if not(gend) and (kt.is-t(c"Nil",0) or kt.is-t(c"Never",0) or kt <: type-c-void) {
8383
let inner-expr = std-c-compile-expr( ctx, t, false );
8484
let text = inner-expr.get(c"expression") + SAtom(c";\n");
8585
assemble-global-initializer-section = assemble-global-initializer-section + text;
@@ -93,10 +93,10 @@ let std-c-compile-global(ctx: FContext, k: CString, term: AST): Nil = (
9393
text = text + SAtom(c";\n");
9494

9595
let inner-expr = std-c-compile-expr( ctx, t, false );
96-
if kt.is-t(c"Nil",0) or kt.is-t(c"Never",0) or kt <: t1(c"C",t0(c"void")) then {
96+
if kt.is-t(c"Nil",0) or kt.is-t(c"Never",0) or kt <: type-c-void then {
9797
text = SNil;
9898
text = SAtom(k) + SAtom(c" = ") + inner-expr.get(c"expression") + SAtom(c";\n");
99-
} else if can-unify(t1(c"C",t0(c"typedef")), tt) or can-unify(t2(c"Array",t1(c"C",t0(c"typedef")),ta), tt) {
99+
} else if can-unify(type-c-typedef, tt) or can-unify(type-array-c-typedef, tt) {
100100
assemble-header-typedef-section = assemble-header-typedef-section + text;
101101
} else {
102102
assemble-gdecl-section = assemble-gdecl-section + text;
@@ -115,7 +115,7 @@ let std-c-compile-global(ctx: FContext, k: CString, term: AST): Nil = (
115115
App{ left:Lit{key:c":"}, right:App{ left:ASTNil{}, right:AType{asc-tt=tt} } } => asc-tt.is-t(c"Nil",0);
116116
_ => true;
117117
};
118-
if initialized or can-unify(t1(c"C",t0(c"typedef")), tt) {
118+
if initialized or can-unify(type-c-typedef, tt) {
119119
let text = SNil();
120120
if not(config-strip-debug) and loc.filename != c"Unknown" {
121121
text = text + SAtom(c"\n#line ");
@@ -131,7 +131,7 @@ let std-c-compile-global(ctx: FContext, k: CString, term: AST): Nil = (
131131
text = text + SAtom(c"(");
132132
text = text + std-c-compile-function-args(ctx, lhs);
133133
text = text + SAtom(c");\n");
134-
if can-unify(t1(c"C",t0(c"typedef")), tt) {
134+
if can-unify(type-c-typedef, tt) {
135135
assemble-header-typedef-section = assemble-header-typedef-section + text;
136136
} else {
137137
assemble-gdecl-section = assemble-gdecl-section + text;
@@ -176,11 +176,11 @@ let std-c-compile-global(ctx: FContext, k: CString, term: AST): Nil = (
176176
text = text + SAtom(k);
177177
text = text + post-decl;
178178
text = text + SAtom(c";\n");
179-
if kt.is-t(c"Nil",0) or kt.is-t(c"Never",0) or kt <: t1(c"C",t0(c"void")) then ()
179+
if kt.is-t(c"Nil",0) or kt.is-t(c"Never",0) or kt <: type-c-void then ()
180180
else assemble-gdecl-section = assemble-gdecl-section + text;
181181

182182
let inner-expr = std-c-compile-expr( ctx, t, false );
183-
if kt.is-t(c"Nil",0) or kt.is-t(c"Never",0) or kt <: t1(c"C",t0(c"void")) {
183+
if kt.is-t(c"Nil",0) or kt.is-t(c"Never",0) or kt <: type-c-void {
184184
text = inner-expr.get(c"expression") + SAtom(c";\n");
185185
assemble-global-initializer-section = assemble-global-initializer-section + text;
186186
} else {

PLUGINS/BACKEND/C/std-c-mangle-type.lsts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ let std-c-mangle-type-internal(tt: Type, blame: AST): S = (
1515
let std-c-mangle-type-internal-internal(tt: Type, blame: AST): S = (
1616
match tt {
1717
TAnd{ conjugate=conjugate } => (
18-
let is-c = can-unify(t1(c"C",ta), tt);
18+
let is-c = can-unify(type-c-tany, tt);
1919
let modifiers = SNil;
2020
let result = SNil;
2121
for vector c in conjugate {
@@ -101,7 +101,7 @@ let std-c-mangle-type-internal-internal(tt: Type, blame: AST): S = (
101101
let std-c-mangle-type-simple(tt: Type, blame: AST): S = (
102102
match tt {
103103
TAnd{ conjugate=conjugate } => (
104-
let is-c = can-unify(t1(c"C",ta), tt);
104+
let is-c = can-unify(type-c-tany, tt);
105105
let result = SNil();
106106
for vector c in conjugate {
107107
if is-c and c.simple-tag != c"C" {} else {

PLUGINS/FRONTEND/C/c-ast-to-lm-ast.lsts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ let std-c-declare(t: CTerm): Nil = (
2121
);
2222
CIdentifier{name2=value} => (if not(std-c-declare-dedup-index.has-key(name2)) {
2323
std-c-declare-dedup-index = std-c-declare-dedup-index.bind(name2, true);
24-
if can-unify( t1(c"C",t0(c"typedef")), return-type ) {
24+
if can-unify( type-c-typedef, return-type ) {
2525
std-c-typedef-name-index = std-c-typedef-name-index.bind(name2, true);
2626
};
2727
ast-parsed-program = ast-parsed-program + Glb(
@@ -38,7 +38,7 @@ let std-c-declare(t: CTerm): Nil = (
3838
(let name3, let body) = std-c-sig-of-declarator(return-type, arg, ta, (None : Maybe<CTerm>)());
3939
if not(std-c-declare-dedup-index.has-key(name3.into(type(String)))) {
4040
std-c-declare-dedup-index = std-c-declare-dedup-index.bind(name3.into(type(String)), true);
41-
if can-unify( t1(c"C",t0(c"typedef")), return-type ) {
41+
if can-unify( type-c-typedef, return-type ) {
4242
std-c-typedef-name-index = std-c-typedef-name-index.bind(name3.into(type(String)), true);
4343
};
4444
ast-parsed-program = ast-parsed-program + Glb(
@@ -50,7 +50,7 @@ let std-c-declare(t: CTerm): Nil = (
5050
(let name4, let body) = std-c-sig-of-declarator(return-type, arg1, ta, Some(arg2));
5151
if not(std-c-declare-dedup-index.has-key(name4.into(type(String)))) {
5252
std-c-declare-dedup-index = std-c-declare-dedup-index.bind(name4.into(type(String)), true);
53-
if can-unify( t1(c"C",t0(c"typedef")), return-type ) {
53+
if can-unify( type-c-typedef, return-type ) {
5454
std-c-typedef-name-index = std-c-typedef-name-index.bind(name4.into(type(String)), true);
5555
};
5656
ast-parsed-program = ast-parsed-program + Glb(
@@ -63,7 +63,7 @@ let std-c-declare(t: CTerm): Nil = (
6363
(let name5, let body) = std-c-sig-of-declarator(return-type, arg1, ta, Some(arg2));
6464
if not(std-c-declare-dedup-index.has-key(name5.into(type(String)))) {
6565
std-c-declare-dedup-index = std-c-declare-dedup-index.bind(name5.into(type(String)), true);
66-
if can-unify( t1(c"C",t0(c"typedef")), return-type ) {
66+
if can-unify( type-c-typedef, return-type ) {
6767
std-c-typedef-name-index = std-c-typedef-name-index.bind(name5.into(type(String)), true);
6868
};
6969
ast-parsed-program = ast-parsed-program + Glb(
@@ -74,7 +74,7 @@ let std-c-declare(t: CTerm): Nil = (
7474
CBinaryOp{op:"Declarator*", ptr=arg1, arg2:CIdentifier{name6=value} } => (
7575
if not(std-c-declare-dedup-index.has-key(name6)) {
7676
std-c-declare-dedup-index = std-c-declare-dedup-index.bind(name6, true);
77-
if can-unify( t1(c"C",t0(c"typedef")), return-type ) {
77+
if can-unify( type-c-typedef, return-type ) {
7878
std-c-typedef-name-index = std-c-typedef-name-index.bind(name6, true);
7979
};
8080
return-type = std-c-decorate-pointer(return-type, ptr);
@@ -130,7 +130,7 @@ let std-c-nametypes-of-params-list(params: List<CTerm>, is-vararg: Bool): List<(
130130
_ => print("std-c-sig-of-params-list: Unexpected Parameter \{p}\n");
131131
}};
132132
if is-vararg {
133-
nametypes = cons((uuid(), t1(c"C",t0(c"..."))), nametypes);
133+
nametypes = cons((uuid(), type-c-vararg), nametypes);
134134
};
135135
nametypes.reverse
136136
);
@@ -159,7 +159,7 @@ let std-c-paramstype-of-params-list(params: List<CTerm>, is-vararg: Bool): Type
159159
return = tt;
160160
}
161161
};
162-
if non-zero(return) then return else t1(c"C",t0(c"void"))
162+
if non-zero(return) then return else type-c-void
163163
);
164164

165165
let std-c-type-of-arrow(spec: CTerm, decl: CTerm, params: List<CTerm>): (CString, Type) = (
@@ -414,7 +414,7 @@ let std-c-expr-of-statement(t: CTerm): AST = (
414414
match std-c-expr-of-statement(arg1) {
415415
Var{key=key} => (
416416
mk-cons(
417-
mk-app( mk-app( mk-var("let"), mk-var(key) ), mk-nil().ascript(t1(c"C",t0(c":Label"))) ),
417+
mk-app( mk-app( mk-var("let"), mk-var(key) ), mk-nil().ascript(type-c-label) ),
418418
std-c-expr-of-statement(arg2)
419419
)
420420
);
@@ -609,15 +609,15 @@ let std-c-decorate-pointer(tt: Type, ptr: CTerm): Type = (
609609
let std-c-type-of-integer(i: String): Type = (
610610
if i.has-prefix("-") {
611611
let n = to-u64(tail(i).into(type(CString)));
612-
if n <= 128 then t1(c"C",t0(c"uint8_t")) else
613-
if n <= 32768 then t1(c"C",t0(c"uint06_t")) else
614-
if n <= 2147483648 then t1(c"C",t0(c"uint22_t")) else
615-
t1(c"C",t0(c"uint64_t"))
612+
if n <= 128 then type-c-uint8 else
613+
if n <= 32768 then type-c-uint16 else
614+
if n <= 2147483648 then type-c-uint32 else
615+
type-c-uint64
616616
} else {
617617
let n = to-u64(i.into(type(CString)));
618-
if n <= 255 then t1(c"C",t0(c"int8_t")) else
619-
if n <= 65535 then t1(c"C",t0(c"int06_t")) else
620-
if n <= 4294967295 then t1(c"C",t0(c"int22_t")) else
621-
t1(c"C",t0(c"int64_t"))
618+
if n <= 255 then type-c-int8 else
619+
if n <= 65535 then type-c-int16 else
620+
if n <= 4294967295 then type-c-int32 else
621+
type-c-int64
622622
};
623623
);

PLUGINS/FRONTEND/LSTS/lsts-parse.lsts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ let lsts-parse-type-conjugate(tokens: List<Token>): Tuple<Type,List<Token>> = (
321321
tokens = tnext-rest.second;
322322
};
323323
lsts-parse-expect(c")", tokens); tokens = tail(tokens);
324-
if args.length==0 then t0(c"Nil")
324+
if args.length==0 then type-nil
325325
else if args.length==1 then head(args)
326326
else ts( c"Tuple", args );
327327
} else if lsts-parse-head(tokens)==c"?" {
@@ -331,7 +331,7 @@ let lsts-parse-type-conjugate(tokens: List<Token>): Tuple<Type,List<Token>> = (
331331
lsts-parse-expect(c"_", tokens); tokens = tail(tokens);
332332
ta
333333
} else if lsts-parse-head(tokens).has-prefix(c"'") and not(lsts-parse-head(tokens).has-suffix(c"'")) {
334-
let new-tt = t1(c"Linear",t0(c"Phi::Live"));
334+
let new-tt = type-linear-live;
335335
tokens = tail(tokens);
336336
new-tt
337337
} else if lsts-is-ident-head(lsts-parse-head(tokens)) and not(lsts-is-type-tag(lsts-parse-head(tokens))) {
@@ -952,7 +952,7 @@ let lsts-parse-typedef(tokens: List<Token>): (AST, List<Token>) = (
952952
for vector i in infers {
953953
if i.is-t(c"MustRelease",0) and not(implied-phi.slot(c"MustRelease::ToRelease",1).l1.is-t(c"Linear",1))
954954
then {
955-
let mt = t1(c"MustRelease::ToRelease",t1(c"Linear",t0(c"Phi::Live")));
955+
let mt = t1(c"MustRelease::ToRelease",type-linear-live);
956956
implied-phi = implied-phi && mt;
957957
implied-phi-index = implied-phi-index.bind(lhs-type.ground-tag-and-arity, mt);
958958
};
@@ -1025,7 +1025,7 @@ let lsts-parse-function-signature(fname: CString, tokens: List<Token>, loc: Sour
10251025
let out = LstsFnSignature ( mk-nil(), ta, ta );
10261026

10271027
lsts-parse-expect(c"(", tokens); tokens = tail(tokens);
1028-
out.args-type = t0(c"Nil");
1028+
out.args-type = type-nil;
10291029
while non-zero(tokens) and lsts-parse-head(tokens)!=c")" {
10301030
lsts-parse-expect(c"Identifier", lsts-is-ident-head(lsts-parse-head(tokens)), tokens);
10311031
let arg-name = head(tokens); tokens = tail(tokens);
@@ -1059,7 +1059,7 @@ let lsts-parse-function-signature(fname: CString, tokens: List<Token>, loc: Sour
10591059
if fname!=c"phi" then out.return-type = phi-as-state(out.return-type);
10601060
tokens = rtype-rest.second;
10611061
} else if non-zero(out.args-type) {
1062-
out.return-type = t0(c"Nil");
1062+
out.return-type = type-nil;
10631063
};
10641064

10651065
Tuple ( out, tokens )
@@ -1637,7 +1637,7 @@ let lsts-make-lit(t: Token): AST = (
16371637
Var( c".into", with-location(mk-token(".into"),loc) ),
16381638
mk-cons(
16391639
se-rest.first,
1640-
mk-atype(t1(c"Type",t0(c"String")))
1640+
mk-atype(type-type-string)
16411641
)
16421642
);
16431643
if non-zero(base) {

SRC/tctx-unify.lsts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ let unify-inner(fpt: Type, pt: Type, blame: AST): Maybe<TypeContext> = (
122122
second:rp1
123123
} => (
124124
if can-unify(lp1, rp1)
125-
then { ctx = unify-inner(lp1,rp1,blame) && unify-inner(lpr, t0(c"Nil"), blame); }
125+
then { ctx = unify-inner(lp1,rp1,blame) && unify-inner(lpr, type-nil, blame); }
126126
else { ctx = unify-inner(lpr,rp1,blame); }
127127
);
128128
Tuple{

SRC/type-can-unify.lsts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ let can-unify(fpt: Type, pt: Type): Bool = (
124124
]},
125125
second:rp1
126126
} => (
127-
if can-unify(lp1,rp1) then can-unify(lpr,t0(c"Nil")) else can-unify(lpr,rp1)
127+
if can-unify(lp1,rp1) then can-unify(lpr,type-nil) else can-unify(lpr,rp1)
128128
);
129129
Tuple{
130130
first:TGround{tag:c"...", parameters:[lp1..]},

SRC/type-constructor.lsts

Lines changed: 59 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,65 @@ let t2(tag: CString, p1: Type, p2: Type): Type = TGround(tag, mk-vector(type(Typ
2020
# new allocations = 0
2121
let tv(name: CString): Type = TVar(name);
2222

23-
# new allocations = 0
24-
let type-any-arrow = t2(c"Arrow", t0(c"Any"), t0(c"Any"));
23+
# new allocations = 0 (constant)
24+
let type-nil = t0(c"Nil");
25+
26+
# new allocations = 0 (constant)
27+
let type-any = t0(c"Any");
28+
29+
# new allocations = 0 (constant)
30+
let type-type-string = t1(c"Type",t0(c"String"));
31+
32+
# new allocations = 0 (constant)
33+
let type-linear-moved = t1(c"Linear",t0(c"Phi::Moved"));
34+
35+
# new allocations = 0 (constant)
36+
let type-linear-live = t1(c"Linear",t0(c"Phi::Live"));
37+
38+
# new allocations = 0 (constant)
39+
let type-c-void = t1(c"C",t0(c"void"));
40+
41+
# new allocations = 0 (constant)
42+
let type-c-label = t1(c"C",t0(c":Label"));
43+
44+
# new allocations = 0 (constant)
45+
let type-c-vararg = t1(c"C",t0(c"..."));
46+
47+
# new allocations = 0 (constant)
48+
let type-c-tany = t1(c"C",ta);
49+
50+
# new allocations = 0 (constant)
51+
let type-c-typedef = t1(c"C",t0(c"typedef"));
52+
53+
# new allocations = 0 (constant)
54+
let type-array-c-typedef = t2(c"Array",t1(c"C",t0(c"typedef")),ta);
55+
56+
# new allocations = 0 (constant)
57+
let type-c-int8 = t1(c"C",t0(c"int8_t"));
58+
59+
# new allocations = 0 (constant)
60+
let type-c-int16 = t1(c"C",t0(c"int16_t"));
61+
62+
# new allocations = 0 (constant)
63+
let type-c-int32 = t1(c"C",t0(c"int32_t"));
64+
65+
# new allocations = 0 (constant)
66+
let type-c-int64 = t1(c"C",t0(c"int64_t"));
67+
68+
# new allocations = 0 (constant)
69+
let type-c-uint8 = t1(c"C",t0(c"uint8_t"));
70+
71+
# new allocations = 0 (constant)
72+
let type-c-uint16 = t1(c"C",t0(c"uint16_t"));
73+
74+
# new allocations = 0 (constant)
75+
let type-c-uint32 = t1(c"C",t0(c"uint32_t"));
76+
77+
# new allocations = 0 (constant)
78+
let type-c-uint64 = t1(c"C",t0(c"uint64_t"));
79+
80+
# new allocations = 0 (constant)
81+
let type-any-arrow = t2(c"Arrow", type-any, type-any);
2582

2683
# new allocations = 0 if either argument is ?
2784
# | 1

0 commit comments

Comments
 (0)