Johan B.W. de Vries
6231c6b279
Tuple instantiation works again
...
Typing is getting ugly again
2023-01-01 16:00:18 +01:00
Johan B.W. de Vries
f281b78c78
Fixed a wrong test that the new typer caught
...
Also, some fixes of things that were broken on structs
due to the tuple changes
2023-01-01 15:02:45 +01:00
Johan B.W. de Vries
7f0acf00fe
Started work on applied type constraints
2022-12-31 15:31:39 +01:00
Johan B.W. de Vries
e936d6e885
Started on tuples
2022-12-31 14:52:10 +01:00
Johan B.W. de Vries
ac8daf74f5
PP UP, Python3.10
2022-12-31 14:40:41 +01:00
Johan B.W. de Vries
8f8f79d799
Comment fixes
2022-12-26 13:35:26 +01:00
Johan B.W. de Vries
4876be77fd
Cleanup type comments, old generator file
2022-12-26 13:20:15 +01:00
Johan B.W. de Vries
1afa3efc31
Reimplements casting and foldl
...
Probably not 100% type checked yet.
Also, fixed logical right shift; standard says the type
is different.
2022-12-26 13:11:36 +01:00
Johan B.W. de Vries
a164976f63
Restored importing of function
2022-12-25 14:30:21 +01:00
Johan B.W. de Vries
2ab574706f
Updated main, buffer, added test
2022-12-24 20:00:24 +01:00
Johan B.W. de Vries
750f8806b6
Work on bytes
2022-12-24 19:47:13 +01:00
Johan B.W. de Vries
25b5d6fc06
More work on tuples
2022-12-24 19:40:07 +01:00
Johan B.W. de Vries
17f538d8cc
Fixed a missing constraint
2022-12-24 19:25:30 +01:00
Johan B.W. de Vries
e456f55bb0
Type compare, code cleanup, extra test
2022-12-24 19:22:03 +01:00
Johan B.W. de Vries
6e0c554cf2
Starting to see how this could work with static arrays
2022-12-24 17:56:47 +01:00
Johan B.W. de Vries
08b1d78faf
Edge case fixes
2022-12-24 17:43:05 +01:00
Johan B.W. de Vries
1ab6dfd333
Some fixes for static array
2022-12-24 17:37:53 +01:00
Johan B.W. de Vries
d4d5e9e482
Constraints can now explode into more constraints
...
What could possibly go wrong.
All struct tests seem to pass.
2022-12-24 15:07:21 +01:00
Johan B.W. de Vries
7ce3f0f11c
Started on struct constants
2022-12-18 15:05:41 +01:00
Johan B.W. de Vries
d18f1c6956
Re-implemented allocation calculations
2022-12-18 14:31:17 +01:00
Johan B.W. de Vries
6d426753c8
Various small fixes
...
Re-implementing some things that were broken.
Also, if a typing error is found, and we detect an
infinite loop, we return the errors instead, as that's
probably what causing the loop anyhow.
2022-12-18 14:26:10 +01:00
Johan B.W. de Vries
05e7c356ea
Fixes
...
- Moved the three ConstraintBase functions into one, as it was
giving trouble calculating everything
- Gave each constraint the option to have a comment
- SameTypeConstraint now can have multiple arguments
- Redid the infinite loop detection
- Implemented some more basic operators
- Redid the division by zero for floats, it wasn't giving the
right results.
- Also postponed the updating the AST type3 until afterwards
- Various linting fixes
2022-11-27 14:11:14 +01:00
Johan B.W. de Vries
a838035e1a
Cleanup
...
- Removed unused _str types
- Tested with untyped function arguments, seems to work a bit
2022-11-27 12:33:17 +01:00
Johan B.W. de Vries
30a4cee5af
Fixes
...
- Tuple wasn't an applied type yet
- phasm_type3 would re-order type IDs between prints
- AppliedType3 wouldn't store the args for iterators
-
2022-11-26 14:46:31 +01:00
Johan B.W. de Vries
3bac625714
Introduced type classes, added debugging info for constraint
2022-11-25 15:04:15 +01:00
Johan B.W. de Vries
9f21d0fd1d
More work on type3
2022-11-24 15:43:23 +01:00
Johan B.W. de Vries
b5a28daebf
Ripping out Type2 (type_var) system
2022-11-24 14:49:17 +01:00
Johan B.W. de Vries
8cc47ae63e
Cleanup to module_constant_def, function calls
2022-11-17 19:30:37 +01:00
Johan B.W. de Vries
13f3f33740
PlaceHolder all the things
2022-11-17 15:23:56 +01:00
Johan B.W. de Vries
a0645d94dd
More ideas for type3
2022-11-17 14:51:14 +01:00
Johan B.W. de Vries
79ff11f622
Started on attempt3 of the type system
2022-11-17 13:31:10 +01:00
Johan B.W. de Vries
55a45ff17c
Trying out some things regarding StaticArray
2022-11-16 13:50:03 +01:00
Johan B.W. de Vries
42c9ff6ca7
idea: Actual type class
2022-10-23 13:52:48 +02:00
Johan B.W. de Vries
312f7949bd
Add mathematic edge case tests
2022-09-22 11:58:18 +02:00
Johan B.W. de Vries
bce3ed7ba1
Implements division
...
Division by zero is a trap on most runtimes, following
the Let it Crash philosophy
2022-09-22 11:50:38 +02:00
Johan B.W. de Vries
977c449c3f
Removed redundant file
2022-09-19 14:55:05 +02:00
Johan B.W. de Vries
2a6da91eb9
Simplified locations, adds typing tests
2022-09-19 14:53:22 +02:00
Johan B.W. de Vries
4d3c0c6c3c
StaticArray with constant index works again
...
Also, fix issue with f64 being parsed as f32
2022-09-19 14:43:15 +02:00
Johan B.W. de Vries
5da45e78c2
More work on StaticArray
...
Also naming fix, buildin => builtin.
Removes the use of ConstantStaticArray, as this was context dependent
2022-09-19 13:50:20 +02:00
Johan B.W. de Vries
4f7608a601
Fix: ModuleConstantDef type annotation was ignored
2022-09-19 12:29:48 +02:00
Johan B.W. de Vries
0097ce782d
First work on restoring StaticArray
...
Removed the separate ModuleConstantRef since you can tell by the variable
property of VariableReference. We'll also add local variables there later
on.
2022-09-19 12:15:03 +02:00
Johan B.W. de Vries
299551db1b
All primitive tests work again
2022-09-19 11:49:10 +02:00
Johan B.W. de Vries
906b15c93c
Large cleanup to the tests
...
They are now better organized and easier to extend, I hope.
2022-09-19 11:16:34 +02:00
Johan B.W. de Vries
07c0688d1b
Ripping out old type system. Will have to reimplement
...
bytes, static array, tuple and struct.
2022-09-17 20:50:06 +02:00
Johan B.W. de Vries
564f00a419
Work on ripping out old type system
2022-09-17 20:13:16 +02:00
Johan B.W. de Vries
58f74d3e1d
Restored function calling
2022-09-17 19:37:49 +02:00
Johan B.W. de Vries
4b46483895
Worked on floats
2022-09-17 19:21:56 +02:00
Johan B.W. de Vries
b2816164f9
Improved unification
2022-09-17 17:14:17 +02:00
Johan B.W. de Vries
6f3d9a5bcc
First attempt at ripping out old system
...
This breaks test_addition[u32], which is a good thing to chase next.
2022-09-16 17:39:46 +02:00
Johan B.W. de Vries
2d0daf4b90
Fixes
2022-09-16 17:04:13 +02:00