Skip to content

Commit 31821ab

Browse files
committed
add primitive refs package
1 parent 7bef333 commit 31821ab

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/**
2+
Simple wrappers for primitive types, which allows them to be used by the
3+
allocator.
4+
*/
5+
package PrimitiveRefs
6+
7+
public class BoolRef
8+
bool val
9+
10+
construct(bool val)
11+
this.val = val
12+
13+
14+
public class IntRef
15+
int val
16+
17+
construct(int val)
18+
this.val = val
19+
20+
21+
public class RealRef
22+
real val
23+
24+
construct(real val)
25+
this.val = val
26+
27+
28+
public class StringRef
29+
string val
30+
31+
construct(string val)
32+
this.val = val

0 commit comments

Comments
 (0)