Skip to content

Commit 21da2c9

Browse files
authored
Merge pull request #1980 from andrew-johnson-4/lm-gc-vector-iiiiii
Lm gc vector iiiiii
2 parents 0aea5b9 + 0332de2 commit 21da2c9

146 files changed

Lines changed: 6316 additions & 2658 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

BOOTSTRAP/cli.c

Lines changed: 2569 additions & 2561 deletions
Large diffs are not rendered by default.

LM23COMMON/ast-misc-globals.lsts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@ let parse-suffixes = [] : List<(CString,Type)>;
3030
non-zero(parse-suffixes); # TODO remove
3131

3232
let config-v3 = true;
33+
let config-v1 = false;

LM23COMMON/unit-main-core.lsts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ let main(argc: C_int, argv: CString[]): Nil = (
4040
c"--typecheck" => config-mode = ModeTypecheck();
4141
c"--parse" => config-mode = ModeParse();
4242
c"--compile" => config-mode = ModeCompile();
43+
c"--v1" => (config-v3 = false; config-v1 = true;);
4344
c"--v2" => config-v3 = false;
4445
c"--v3" => config-v3 = true;
4546
c"--highlight" => (

PLUGINS/FRONTEND/LSTS/lsts-frontend.lsts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11

22
let lsts-frontend(fp: CString): Nil = (
3+
if config-v1 and fp==c"lib/std/minimal.lsts" then fp = c"lib1/std/minimal.lsts";
34
if config-v3 and fp==c"lib/std/minimal.lsts" then fp = c"lib2/core/bedrock.lsts";
45
if config-v3 and fp==c"lib/std/compiler-only.lsts" then fp = c"lib2/core/compiler-only.lsts";
56
lsts-parse(lsts-tokenize(fp));

PLUGINS/FRONTEND/LSTS/lsts-parse.lsts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ let lsts-parse-doc-wordf(tokens: List<Token>, begin: CString, end: CString): Tup
6060
};
6161
tokens = tail(tokens);
6262
};
63-
Tuple ( text.buffer-into-string.into(type(CString)), tokens )
63+
Tuple ( text.buffer-into-cstring, tokens )
6464
);
6565

6666
let lsts-parse-doc-expr(tokens: List<Token>): Tuple<AST, List<(CString, AST)>, List<Token>> = (

lib/std/vector.lsts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,5 +263,12 @@ let deep-hash(ts: Vector<t>): U64 = (
263263
# for compatibility in lmcommon
264264
let .buffer-into-string(c: Vector<U8>): Vector<U8> = c;
265265

266+
# new allocations = 1 if realloc is necessary
267+
# | 0
268+
let .buffer-into-cstring(v: Vector<U8>): CString = (
269+
v.into(type(CString))
270+
);
271+
266272
let .release(v: Vector<x>): Nil = ();
267273
let .retain(v: Vector<x>): Vector<x> = v;
274+

lib1/core/blob.lsts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
2+
type L suffix _l;
3+
4+
let :Blob $":expression"(x: Any): L = ();
5+
let :Blob $":program"(x: Any): L = ();
6+
let :Blob $":frame"(x: Any): L = ();
7+
let :Blob $":case-number"(x: Any): L = ();
8+
let :Blob $":function-id"(x: Any): L = ();
9+
10+
let :Blob $"=="(l: L, r: L): L = ();
11+
let :Blob $"!="(l: L, r: L): L = ();
12+
let :Blob $"<"(l: L, r: L): L = ();
13+
let :Blob $"<="(l: L, r: L): L = ();
14+
let :Blob $">"(l: L, r: L): L = ();
15+
let :Blob $">="(l: L, r: L): L = ();
16+
17+
let :Blob $"*"(l: L, r: L): L = ();
18+
let :Blob $"/"(l: L, r: L): L = ();
19+
let :Blob $"%"(l: L, r: L): L = ();
20+
let :Blob $"+"(l: L, r: L): L = ();
21+
let :Blob $"-"(l: L, r: L): L = ();
22+
23+
let :Blob range(hi: L): L = ();
24+
let :Blob range(lo: L, hi: L): L = ();
25+
26+
let :Blob align(hi: L): L = ();
27+
let :Blob uuid(t: L): L = ();
28+
29+
let :Blob remove-trailing-comma(t: L): L = ();
30+
31+
let :Blob mangle(t: L): L = ();
32+
let :Blob mangle-pre(t: Type<Any>): L = ();
33+
let :Blob mangle-post(t: Type<Any>): L = ();

0 commit comments

Comments
 (0)