Skip to content

Commit da0e9eb

Browse files
authored
Merge pull request #2005 from andrew-johnson-4/gc-enabled-compiler-fdskdsl
Gc enabled compiler fdskdsl
2 parents 628f1d6 + f33221e commit da0e9eb

17 files changed

Lines changed: 43 additions & 85 deletions

LM/index.lsts

Lines changed: 0 additions & 3 deletions
This file was deleted.

LM/type-definition.lsts

Lines changed: 0 additions & 50 deletions
This file was deleted.

LM/unit-type-core.lsts

Lines changed: 0 additions & 5 deletions
This file was deleted.

lib/core/array.lsts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ let safe-alloc-impl(nb: USize, tt: Type<t>): t[] = (
5353
mark-memory-as-safe(ptr as U8[], nb);
5454

5555
# TODO: wrap counter adjustments in conditional compilation
56-
if not(config-v23) then safe-alloc-block-count = safe-alloc-block-count + 1;
57-
if not(config-v23) then safe-alloc-block-count-monotonic = safe-alloc-block-count-monotonic + 1;
56+
safe-alloc-block-count = safe-alloc-block-count + 1;
57+
safe-alloc-block-count-monotonic = safe-alloc-block-count-monotonic + 1;
5858

5959
ptr
6060
);
@@ -71,7 +71,7 @@ let safe-realloc-impl(ptr: ?[], nb: USize): ?[] = (
7171
mark-memory-as-safe(new-ptr as U8[], nb);
7272

7373
# TODO: wrap counter adjustments in conditional compilation
74-
if not(config-v23) then safe-alloc-block-count-monotonic = safe-alloc-block-count-monotonic + 1;
74+
safe-alloc-block-count-monotonic = safe-alloc-block-count-monotonic + 1;
7575

7676
new-ptr
7777
);
@@ -96,7 +96,7 @@ let safe-free(ptr: ?[]): Nil = (
9696
# BEFORE CHANGING THIS: talk to alex
9797

9898
# TODO: wrap counter adjustments in conditional compilation
99-
if not(config-v23) then safe-alloc-block-count = safe-alloc-block-count - 1;
99+
safe-alloc-block-count = safe-alloc-block-count - 1;
100100

101101
free(ptr as C<"void">[]);
102102
()

tests/promises/vector/bound-buffer-into-string.lsts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ import lib/core/bedrock.lsts;
1010
# 1 string literal "a"
1111
assert( mk-vector(type(U8), 1).push(97).buffer-into-string == "a" );
1212
assert( safe-alloc-block-count == 0 );
13-
if not(config-v23) then assert( safe-alloc-block-count-monotonic == 2 );
13+
assert( safe-alloc-block-count-monotonic == 2 );
1414
safe-alloc-block-count-monotonic = 0;

tests/promises/vector/bound-cmp.lsts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ safe-alloc-block-count-monotonic = 0;
88

99
assert( mk-vector(type(U8), 0).push(8) == mk-vector(type(U8), 0).push(8) );
1010
assert( safe-alloc-block-count == 0 );
11-
if not(config-v23) then assert( safe-alloc-block-count-monotonic == 2 );
11+
assert( safe-alloc-block-count-monotonic == 2 );
1212
safe-alloc-block-count-monotonic = 0;

tests/promises/vector/bound-constructor.lsts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ safe-alloc-block-count-monotonic = 0;
1313

1414
assert( mk-vector(type(U8), 123).length == 0 );
1515
assert( safe-alloc-block-count == 0 );
16-
if not(config-v23) then assert( safe-alloc-block-count-monotonic == 1 );
16+
assert( safe-alloc-block-count-monotonic == 1 );
1717
safe-alloc-block-count-monotonic = 0;
1818

1919
assert( (mk-vector() : Vector<U8>).length == 0 );
@@ -28,5 +28,5 @@ safe-alloc-block-count-monotonic = 0;
2828

2929
assert( (mk-vector(123) : Vector<U8>).length == 0 );
3030
assert( safe-alloc-block-count == 0 );
31-
if not(config-v23) then assert( safe-alloc-block-count-monotonic == 1 );
31+
assert( safe-alloc-block-count-monotonic == 1 );
3232
safe-alloc-block-count-monotonic = 0;

tests/promises/vector/bound-index.lsts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ import lib/core/bedrock.lsts;
33

44
assert( mk-vector(type(U8), 123).push(8)[0] == 8 );
55
assert( safe-alloc-block-count == 0 );
6-
if not(config-v23) then assert( safe-alloc-block-count-monotonic == 1 );
6+
assert( safe-alloc-block-count-monotonic == 1 );
77
safe-alloc-block-count-monotonic = 0;

tests/promises/vector/bound-into-vector.lsts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ safe-alloc-block-count-monotonic = 0;
88

99
assert( mk-vector(type(U8), 1).push(8).into(type(Vector<U8>)).length == 1 );
1010
assert( safe-alloc-block-count == 0 );
11-
if not(config-v23) then assert( safe-alloc-block-count-monotonic == 1 );
11+
assert( safe-alloc-block-count-monotonic == 1 );
1212
safe-alloc-block-count-monotonic = 0;

tests/promises/vector/bound-length.lsts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ safe-alloc-block-count-monotonic = 0;
88

99
assert( mk-vector(type(U8), 123).length == 0 );
1010
assert( safe-alloc-block-count == 0 );
11-
if not(config-v23) then assert( safe-alloc-block-count-monotonic == 1 );
11+
assert( safe-alloc-block-count-monotonic == 1 );
1212
safe-alloc-block-count-monotonic = 0;
1313

1414
assert( mk-vector(type(U8), 123).push(8).length == 1 );
1515
assert( safe-alloc-block-count == 0 );
16-
if not(config-v23) then assert( safe-alloc-block-count-monotonic == 1 );
16+
assert( safe-alloc-block-count-monotonic == 1 );
1717
safe-alloc-block-count-monotonic = 0;

0 commit comments

Comments
 (0)