-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1067 from andrew-johnson-4/port-lm-libs-to-lsts
Port lm libs to lsts
- Loading branch information
Showing
29 changed files
with
23,661 additions
and
23,571 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
declare-binop( $"!=", raw-type(base-type[]), raw-type(base-type[]), raw-type(U64), ( l"("; x; l"!="; y; l")"; ) ); | ||
declare-binop( $"==", raw-type(base-type[]), raw-type(base-type[]), raw-type(U64), ( l"("; x; l"=="; y; l")"; ) ); | ||
declare-binop( $"<", raw-type(base-type[]), raw-type(base-type[]), raw-type(U64), ( l"("; x; l"<"; y; l")"; ) ); | ||
declare-binop( $"<=", raw-type(base-type[]), raw-type(base-type[]), raw-type(U64), ( l"("; x; l"<="; y; l")"; ) ); | ||
declare-binop( $">", raw-type(base-type[]), raw-type(base-type[]), raw-type(U64), ( l"("; x; l">"; y; l")"; ) ); | ||
declare-binop( $">=", raw-type(base-type[]), raw-type(base-type[]), raw-type(U64), ( l"("; x; l">="; y; l")"; ) ); | ||
|
||
declare-binop( $"+", raw-type(base-type[]), raw-type(U64), raw-type(base-type[]), ( l"("; x; l"+"; y; l")"; ) ); | ||
declare-binop( $"+", raw-type(base-type[]), raw-type(I64), raw-type(base-type[]), ( l"("; x; l"+"; y; l")"; ) ); | ||
declare-binop( $"-", raw-type(base-type[]), raw-type(U64), raw-type(base-type[]), ( l"("; x; l"-"; y; l")"; ) ); | ||
declare-binop( $"-", raw-type(base-type[]), raw-type(I64), raw-type(base-type[]), ( l"("; x; l"-"; y; l")"; ) ); | ||
declare-binop( $"-", raw-type(base-type[]), raw-type(base-type[]), raw-type(U64), ( l"("; x; l"-"; y; l")"; ) ); | ||
|
||
declare-unop( not, raw-type(base-type[]), raw-type(U64), ( l"(!"; x; l")"; ) ); | ||
|
||
declare-unop( into-branch-conditional, raw-type(base-type[]), raw-type(BranchConditional), x ); | ||
|
||
declare-binop( $"[]", raw-type(base-type[]), raw-type(U64), raw-type(base-type), ( l"("; x; l"["; y; l"])"; ) ); | ||
declare-ternop( $"set[]", raw-type(base-type[]), raw-type(U64), raw-type(base-type), raw-type(base-type), ( l"("; x; l"["; y; l"]="; z; l")"; ) ); | ||
|
||
declare-unop( open, raw-type(t), raw-type(t), x ); | ||
declare-unop( open, raw-type(base-type[]), raw-type(base-type), (l"(*"; x; l")";) ); | ||
declare-unop( $"&", raw-type(t), raw-type(t[]), (l"(&"; x; l")";) ); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
declare-binop( $"!=", raw-type(F64), raw-type(F64), raw-type(U64), ( l"("; x; l"!="; y; l")"; ) ); | ||
declare-binop( $"==", raw-type(F64), raw-type(F64), raw-type(U64), ( l"("; x; l"=="; y; l")"; ) ); | ||
declare-binop( $"<", raw-type(F64), raw-type(F64), raw-type(U64), ( l"("; x; l"<"; y; l")"; ) ); | ||
declare-binop( $"<=", raw-type(F64), raw-type(F64), raw-type(U64), ( l"("; x; l"<="; y; l")"; ) ); | ||
declare-binop( $">", raw-type(F64), raw-type(F64), raw-type(U64), ( l"("; x; l">"; y; l")"; ) ); | ||
declare-binop( $">=", raw-type(F64), raw-type(F64), raw-type(U64), ( l"("; x; l">="; y; l")"; ) ); | ||
|
||
declare-binop( $"+", raw-type(F64), raw-type(F64), raw-type(F64), ( l"("; x; l"+"; y; l")"; ) ); | ||
declare-binop( $"-", raw-type(F64), raw-type(F64), raw-type(F64), ( l"("; x; l"-"; y; l")"; ) ); | ||
declare-binop( $"^", raw-type(F64), raw-type(F64), raw-type(F64), ( l"("; x; l"^"; y; l")"; ) ); | ||
declare-binop( $"/", raw-type(F64), raw-type(F64), raw-type(F64), ( l"("; x; l"/"; y; l")"; ) ); | ||
declare-binop( $"%", raw-type(F64), raw-type(F64), raw-type(F64), ( l"("; x; l"%"; y; l")"; ) ); | ||
declare-binop( $"*", raw-type(F64), raw-type(F64), raw-type(F64), ( l"("; x; l"*"; y; l")"; ) ); | ||
|
||
declare-binop( $"&&", raw-type(F64), raw-type(F64), raw-type(U64), ( l"("; x; l"&&"; y; l")"; ) ); | ||
declare-binop( $"||", raw-type(F64), raw-type(F64), raw-type(U64), ( l"("; x; l"||"; y; l")"; ) ); | ||
|
||
declare-binop( $"<<", raw-type(F64), raw-type(U64+Constant), raw-type(F64), ( l"("; x; l"<<"; y; l")"; ) ); | ||
declare-binop( $">>", raw-type(F64), raw-type(U64+Constant), raw-type(F64), ( l"("; x; l">>"; y; l")"; ) ); | ||
|
||
declare-unop( not, raw-type(F64), raw-type(U64), ( l"(!"; x; l")"; ) ); | ||
|
||
declare-unop( into-branch-conditional, raw-type(F64), raw-type(BranchConditional), x ); | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
declare-unop( $".0", raw-type(LMStruct), raw-type(U64), ( l"("; x; l".field_0)"; ) ); | ||
declare-unop( $".1", raw-type(CaseNumber<cn>+Field::1<a>), raw-type(a), ( l"("; x; l".field_"; 1_l + 1000_l * (cn :: L); l")"; ) ); | ||
declare-unop( $".2", raw-type(CaseNumber<cn>+Field::2<a>), raw-type(a), ( l"("; x; l".field_"; 2_l + 1000_l * (cn :: L); l")"; ) ); | ||
declare-unop( $".3", raw-type(CaseNumber<cn>+Field::3<a>), raw-type(a), ( l"("; x; l".field_"; 3_l + 1000_l * (cn :: L); l")"; ) ); | ||
declare-unop( $".4", raw-type(CaseNumber<cn>+Field::4<a>), raw-type(a), ( l"("; x; l".field_"; 4_l + 1000_l * (cn :: L); l")"; ) ); | ||
declare-unop( $".5", raw-type(CaseNumber<cn>+Field::5<a>), raw-type(a), ( l"("; x; l".field_"; 5_l + 1000_l * (cn :: L); l")"; ) ); | ||
declare-unop( $".6", raw-type(CaseNumber<cn>+Field::6<a>), raw-type(a), ( l"("; x; l".field_"; 6_l + 1000_l * (cn :: L); l")"; ) ); | ||
|
||
declare-binop( $"set.1", raw-type(CaseNumber<cn>+Field::1<a>), raw-type(a), raw-type(Nil), ( l"({"; x; l".field_"; 1_l + 1000_l * (cn :: L); l"="; y; l";({});})"; ) ); | ||
declare-binop( $"set.2", raw-type(CaseNumber<cn>+Field::2<a>), raw-type(a), raw-type(Nil), ( l"({"; x; l".field_"; 2_l + 1000_l * (cn :: L); l"="; y; l";({});})"; ) ); | ||
declare-binop( $"set.3", raw-type(CaseNumber<cn>+Field::3<a>), raw-type(a), raw-type(Nil), ( l"({"; x; l".field_"; 3_l + 1000_l * (cn :: L); l"="; y; l";({});})"; ) ); | ||
declare-binop( $"set.4", raw-type(CaseNumber<cn>+Field::4<a>), raw-type(a), raw-type(Nil), ( l"({"; x; l".field_"; 4_l + 1000_l * (cn :: L); l"="; y; l";({});})"; ) ); | ||
declare-binop( $"set.5", raw-type(CaseNumber<cn>+Field::5<a>), raw-type(a), raw-type(Nil), ( l"({"; x; l".field_"; 5_l + 1000_l * (cn :: L); l"="; y; l";({});})"; ) ); | ||
declare-binop( $"set.6", raw-type(CaseNumber<cn>+Field::6<a>), raw-type(a), raw-type(Nil), ( l"({"; x; l".field_"; 6_l + 1000_l * (cn :: L); l"="; y; l";({});})"; ) ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
|
||
fragment type I16; size I16 2; atom suffix I16 _i16; | ||
|
||
(declare-unop( into-branch-conditional I16 BranchConditional ( x ) )); | ||
|
||
print := λ(: x I16). (: ( | ||
(print (as x I64)) | ||
) Nil); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
declare-binop( $"!=", raw-type(I16), raw-type(I16), raw-type(U64), ( l"("; x; l"!="; y; l")"; ) ); | ||
declare-binop( $"==", raw-type(I16), raw-type(I16), raw-type(U64), ( l"("; x; l"=="; y; l")"; ) ); | ||
declare-binop( $"<", raw-type(I16), raw-type(I16), raw-type(U64), ( l"("; x; l"<"; y; l")"; ) ); | ||
declare-binop( $"<=", raw-type(I16), raw-type(I16), raw-type(U64), ( l"("; x; l"<="; y; l")"; ) ); | ||
declare-binop( $">", raw-type(I16), raw-type(I16), raw-type(U64), ( l"("; x; l">"; y; l")"; ) ); | ||
declare-binop( $">=", raw-type(I16), raw-type(I16), raw-type(U64), ( l"("; x; l">="; y; l")"; ) ); | ||
|
||
declare-binop( $"+", raw-type(I16), raw-type(I16), raw-type(I16), ( l"("; x; l"+"; y; l")"; ) ); | ||
declare-binop( $"-", raw-type(I16), raw-type(I16), raw-type(I16), ( l"("; x; l"-"; y; l")"; ) ); | ||
declare-binop( $"^", raw-type(I16), raw-type(I16), raw-type(I16), ( l"("; x; l"^"; y; l")"; ) ); | ||
declare-binop( $"/", raw-type(I16), raw-type(I16), raw-type(I16), ( l"("; x; l"/"; y; l")"; ) ); | ||
declare-binop( $"%", raw-type(I16), raw-type(I16), raw-type(I16), ( l"("; x; l"%"; y; l")"; ) ); | ||
declare-binop( $"*", raw-type(I16), raw-type(I16), raw-type(I16), ( l"("; x; l"*"; y; l")"; ) ); | ||
|
||
declare-unop( not, raw-type(I16), raw-type(U64), ( l"(!"; x; l")"; ) ); | ||
|
||
declare-unop( into-branch-conditional, raw-type(I16), raw-type(BranchConditional), x ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,6 @@ | ||
|
||
fragment type I32; size I32 4; atom suffix I32 _i32; | ||
|
||
(declare-binop( != I32 I32 U64 ( '\[_l x '!=_l y '\]_l ) )); | ||
(declare-binop( == I32 I32 U64 ( '\[_l x '==_l y '\]_l ) )); | ||
(declare-binop( < I32 I32 U64 ( '\[_l x '<_l y '\]_l ) )); | ||
(declare-binop( <= I32 I32 U64 ( '\[_l x '<=_l y '\]_l ) )); | ||
(declare-binop( > I32 I32 U64 ( '\[_l x '>_l y '\]_l ) )); | ||
(declare-binop( >= I32 I32 U64 ( '\[_l x '>=_l y '\]_l ) )); | ||
|
||
(declare-binop( && I32 I32 U64 ( '\[_l x '&&_l y '\]_l ) )); | ||
(declare-binop( || I32 I32 U64 ( '\[_l x '||_l y '\]_l ) )); | ||
|
||
(declare-binop( + I32 I32 I32 ( '\[_l x '+_l y '\]_l ) )); | ||
(declare-binop( - I32 I32 I32 ( '\[_l x '-_l y '\]_l ) )); | ||
(declare-binop( ^ I32 I32 I32 ( '\[_l x '^_l y '\]_l ) )); | ||
(declare-binop( / I32 I32 I32 ( '\[_l x '/_l y '\]_l ) )); | ||
(declare-binop( % I32 I32 I32 ( '\[_l x '%_l y '\]_l ) )); | ||
(declare-binop( * I32 I32 I32 ( '\[_l x '*_l y '\]_l ) )); | ||
|
||
(declare-unop( not I32 U64 ( '\[!_l x '\]_l ) )); | ||
|
||
(declare-unop( into-branch-conditional I32 BranchConditional ( x ) )); | ||
|
||
print := λ(: x I32). (: ( | ||
(print (as x I64)) | ||
) Nil); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
|
||
declare-binop( $"!=", raw-type(I32), raw-type(I32), raw-type(U64), ( l"("; x; l"!="; y; l")"; ) ); | ||
declare-binop( $"==", raw-type(I32), raw-type(I32), raw-type(U64), ( l"("; x; l"=="; y; l")"; ) ); | ||
declare-binop( $"<", raw-type(I32), raw-type(I32), raw-type(U64), ( l"("; x; l"<"; y; l")"; ) ); | ||
declare-binop( $"<=", raw-type(I32), raw-type(I32), raw-type(U64), ( l"("; x; l"<="; y; l")"; ) ); | ||
declare-binop( $">", raw-type(I32), raw-type(I32), raw-type(U64), ( l"("; x; l">"; y; l")"; ) ); | ||
declare-binop( $">=", raw-type(I32), raw-type(I32), raw-type(U64), ( l"("; x; l">="; y; l")"; ) ); | ||
|
||
declare-binop( $"+", raw-type(I32), raw-type(I32), raw-type(I32), ( l"("; x; l"+"; y; l")"; ) ); | ||
declare-binop( $"-", raw-type(I32), raw-type(I32), raw-type(I32), ( l"("; x; l"-"; y; l")"; ) ); | ||
declare-binop( $"^", raw-type(I32), raw-type(I32), raw-type(I32), ( l"("; x; l"^"; y; l")"; ) ); | ||
declare-binop( $"/", raw-type(I32), raw-type(I32), raw-type(I32), ( l"("; x; l"/"; y; l")"; ) ); | ||
declare-binop( $"%", raw-type(I32), raw-type(I32), raw-type(I32), ( l"("; x; l"%"; y; l")"; ) ); | ||
declare-binop( $"*", raw-type(I32), raw-type(I32), raw-type(I32), ( l"("; x; l"*"; y; l")"; ) ); | ||
|
||
declare-binop( $"&&", raw-type(I32), raw-type(I32), raw-type(U64), ( l"("; x; l"&&"; y; l")"; ) ); | ||
declare-binop( $"||", raw-type(I32), raw-type(I32), raw-type(U64), ( l"("; x; l"||"; y; l")"; ) ); | ||
|
||
declare-unop( not, raw-type(I32), raw-type(U64), ( l"(!"; x; l")"; ) ); | ||
|
||
declare-unop( into-branch-conditional, raw-type(I32), raw-type(BranchConditional), x ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
declare-binop( $"!=", raw-type(I64), raw-type(I64), raw-type(U64), ( l"("; x; l"!="; y; l")"; ) ); | ||
declare-binop( $"==", raw-type(I64), raw-type(I64), raw-type(U64), ( l"("; x; l"=="; y; l")"; ) ); | ||
declare-binop( $"<", raw-type(I64), raw-type(I64), raw-type(U64), ( l"("; x; l"<"; y; l")"; ) ); | ||
declare-binop( $"<=", raw-type(I64), raw-type(I64), raw-type(U64), ( l"("; x; l"<="; y; l")"; ) ); | ||
declare-binop( $">", raw-type(I64), raw-type(I64), raw-type(U64), ( l"("; x; l">"; y; l")"; ) ); | ||
declare-binop( $">=", raw-type(I64), raw-type(I64), raw-type(U64), ( l"("; x; l">="; y; l")"; ) ); | ||
|
||
declare-binop( $"+", raw-type(I64), raw-type(I64), raw-type(I64), ( l"("; x; l"+"; y; l")"; ) ); | ||
declare-binop( $"-", raw-type(I64), raw-type(I64), raw-type(I64), ( l"("; x; l"-"; y; l")"; ) ); | ||
declare-binop( $"^", raw-type(I64), raw-type(I64), raw-type(I64), ( l"("; x; l"^"; y; l")"; ) ); | ||
declare-binop( $"/", raw-type(I64), raw-type(I64), raw-type(I64), ( l"("; x; l"/"; y; l")"; ) ); | ||
declare-binop( $"%", raw-type(I64), raw-type(I64), raw-type(I64), ( l"("; x; l"%"; y; l")"; ) ); | ||
declare-binop( $"*", raw-type(I64), raw-type(I64), raw-type(I64), ( l"("; x; l"*"; y; l")"; ) ); | ||
|
||
declare-unop( not, raw-type(I64), raw-type(U64), ( l"(!"; x; l")"; ) ); | ||
|
||
declare-unop( into-branch-conditional, raw-type(I64), raw-type(BranchConditional), x ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
|
||
fragment type I8; size I8 1; atom suffix I8 _i8; | ||
|
||
(declare-unop( into-branch-conditional I8 BranchConditional ( x ) )); | ||
|
||
print := λ(: x I8). (: ( | ||
(print (as x I64)) | ||
) Nil); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
declare-binop( $"!=", raw-type(I8), raw-type(I8), raw-type(U64), ( l"("; x; l"!="; y; l")"; ) ); | ||
declare-binop( $"==", raw-type(I8), raw-type(I8), raw-type(U64), ( l"("; x; l"=="; y; l")"; ) ); | ||
declare-binop( $"<", raw-type(I8), raw-type(I8), raw-type(U64), ( l"("; x; l"<"; y; l")"; ) ); | ||
declare-binop( $"<=", raw-type(I8), raw-type(I8), raw-type(U64), ( l"("; x; l"<="; y; l")"; ) ); | ||
declare-binop( $">", raw-type(I8), raw-type(I8), raw-type(U64), ( l"("; x; l">"; y; l")"; ) ); | ||
declare-binop( $">=", raw-type(I8), raw-type(I8), raw-type(U64), ( l"("; x; l">="; y; l")"; ) ); | ||
|
||
declare-binop( $"+", raw-type(I8), raw-type(I8), raw-type(I8), ( l"("; x; l"+"; y; l")"; ) ); | ||
declare-binop( $"-", raw-type(I8), raw-type(I8), raw-type(I8), ( l"("; x; l"-"; y; l")"; ) ); | ||
declare-binop( $"^", raw-type(I8), raw-type(I8), raw-type(I8), ( l"("; x; l"^"; y; l")"; ) ); | ||
declare-binop( $"/", raw-type(I8), raw-type(I8), raw-type(I8), ( l"("; x; l"/"; y; l")"; ) ); | ||
declare-binop( $"%", raw-type(I8), raw-type(I8), raw-type(I8), ( l"("; x; l"%"; y; l")"; ) ); | ||
declare-binop( $"*", raw-type(I8), raw-type(I8), raw-type(I8), ( l"("; x; l"*"; y; l")"; ) ); | ||
|
||
declare-unop( not, raw-type(I8), raw-type(U64), ( l"(!"; x; l")"; ) ); | ||
|
||
declare-unop( into-branch-conditional, raw-type(I8), raw-type(BranchConditional), x ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.