Tristan B. Kildaire
8da6d94212
I wonder if that worked
2021-06-07 14:27:36 +02:00
Tristan B. Kildaire
00920ad43b
Added quick fix for gotcha
2021-06-07 14:00:06 +02:00
Tristan B. Kildaire
7e05c1cbdb
Prevent non-static classes from being used as a type in static initialization
2021-06-07 13:59:12 +02:00
Tristan B. Kildaire
2ac0e18aac
Statically initialize static classes that are members of the current class being statically initialized
2021-06-07 13:54:17 +02:00
Tristan B. Kildaire
d9566698d2
Pool the Module and make it depend on variables
2021-06-07 13:48:14 +02:00
Tristan B. Kildaire
547f25b835
Nvm
2021-06-07 13:29:15 +02:00
Tristan B. Kildaire
ea2f27d0b8
This is pretty aids not gonna lie
2021-06-07 13:25:42 +02:00
Tristan B. Kildaire
eac31532c7
If a Variable declaration has a non-basic type that is a Class-type then that class should have its static initialization run (we should make sure it is reachable however)
2021-06-07 11:17:48 +02:00
Tristan B. Kildaire
b07eecd5a2
Recursively print dependencies of the Module after running the dependency generator
2021-06-07 11:14:38 +02:00
Tristan B. Kildaire
edb11df247
Added method to print dependencies of the given Container
2021-06-07 11:14:22 +02:00
Tristan B. Kildaire
1aa3aabc44
Tired
2021-06-06 23:29:16 +02:00
Tristan B. Kildaire
d42779c3cc
WIP: Dependency
2021-06-06 23:10:16 +02:00
Tristan B. Kildaire
88a6346993
Before revamp
2021-06-06 22:48:04 +02:00
Tristan B. Kildaire
dc01256e60
Fuck this is complicated (1/2)
...
Going to need proper tree and also usign static now in a way that is legal but want it to be illegal to test for loops
2021-06-06 22:45:49 +02:00
Tristan B. Kildaire
a604f4ca27
Return immediatelly if the class has been statically initialized already
2021-06-06 21:43:42 +02:00
Tristan B. Kildaire
5f30ba1ac9
Don't init the class already being initted
2021-06-06 21:34:23 +02:00
Tristan B. Kildaire
9609e11303
Process the class itself then too, because if it must be initted as it is referenced by a variable's type then we must do the initializtions (static) of said class first and then that variable is satisfied (it doesn't matter too much without an assignment expresison but would with it hence we definately want this.
2021-06-06 19:10:26 +02:00
Tristan B. Kildaire
4f0d601a0e
Added more tests
...
Added print out for case where parent of class type being referenced is not at module-level hence static-ness cannot be guaranteed and we will need to process this (possibly recursively)
2021-06-06 19:04:26 +02:00
Tristan B. Kildaire
343564f287
All entities must be dependent on themselves (reason: see last commit)
2021-06-06 18:46:21 +02:00
Tristan B. Kildaire
15bce32ef6
WIP: Everything should be dependent on itself, just so we can build a tree afterwards else things like `int j;` at module-level will not be remembered
2021-06-06 18:44:47 +02:00
Tristan B. Kildaire
4aeca83d90
Variables declared at module-level with types that are class types must set a dependency on said class running its static initializer
2021-06-06 18:38:07 +02:00
Tristan B. Kildaire
b2eca50f5f
Print out ndependencies after generating the list
2021-06-06 18:37:34 +02:00
Tristan B. Kildaire
3294076faa
If a variable declaration occurs at the module level an it is of a type that is non-basic then it is only a class-type and it must be statically initialized
...
(An actual check as to whether the type idk
2021-06-06 18:33:33 +02:00
Tristan B. Kildaire
8e2807c24a
WIP: Module-level type checking
2021-06-06 18:13:12 +02:00
Tristan B. Kildaire
420ec5060d
TODO: Restarting dependency stuff
2021-06-06 17:56:31 +02:00
Tristan B. Kildaire
7e8e4d6f56
Disabled visitation code for now
2021-06-06 17:33:14 +02:00
Tristan B. Kildaire
ea411066aa
Grouped dependency code toghether
2021-06-06 17:15:48 +02:00
Tristan B. Kildaire
bf226a16c7
Switched around
2021-06-06 17:14:24 +02:00
Tristan B. Kildaire
0596611295
Reliance list was keyed incorrecttly
2021-06-06 17:13:32 +02:00
Tristan B. Kildaire
4c538a95f5
Dependency list construction works
2021-06-06 17:08:55 +02:00
Tristan B. Kildaire
3501910f32
WIP: Dependancy "tree" construction
...
Added collection of all static members per each class in a container
2021-06-06 16:52:47 +02:00
Tristan B. Velloza Kildaire
1974428772
Found my bug
2021-06-04 13:42:26 +02:00
Tristan B. Velloza Kildaire
440154b228
Visitation by UFOs, damn
2021-06-04 13:39:11 +02:00
Tristan B. Velloza Kildaire
f024bedaaa
WIP: Need to add support for the `new` keyword
2021-06-04 12:04:58 +02:00
Tristan B. Velloza Kildaire
9cf1a181a2
TIme for expression checking
2021-06-04 11:57:25 +02:00
Tristan B. Velloza Kildaire
e5873fecb3
Idea: Added visitation, we don't need marking tbh , we checking visitaion, marking is implcii in that if there is an error, we exit compiation rpocess, else we continue (which implies marked i.e. the type checking succeeded)
2021-06-04 11:55:22 +02:00
Tristan B. Velloza Kildaire
6c0a0ec69e
Idea: /* TODO: Got it, we NEED a dependency tree, to know chihs is being processed previosuly */
2021-06-04 11:44:51 +02:00
Tristan B. Velloza Kildaire
09bb089998
WIP: Found problem for ongoing recursion, we need a stopping case - we need to mark things
2021-06-04 11:34:18 +02:00
Tristan B. Velloza Kildaire
cfd81a6b45
Don't check the type (in class case) when the conatiner we are in is a class AND is the same class as that of the type of the typed entity being checked
2021-06-04 11:31:44 +02:00
Tristan B. Velloza Kildaire
6089598afe
WIP
2021-06-04 11:27:56 +02:00
Tristan B. Velloza Kildaire
7642db1420
Undid, might wanna dependency check those
2021-04-29 17:59:36 +02:00
Tristan B. Velloza Kildaire
c2f82f5577
Added comment
2021-04-29 17:58:45 +02:00
Tristan B. Velloza Kildaire
292407cbae
Refactored
2021-04-29 17:57:15 +02:00
Tristan B. Velloza Kildaire
88e2dc03e1
Renamed `checkContainer` to `checkContainerCollision`
2021-04-29 17:54:26 +02:00
Tristan B. Velloza Kildaire
eefb78158d
Removed TODO
2021-04-28 01:38:00 +02:00
Tristan B. Velloza Kildaire
6185f8847c
Fixed type resolution for built-in types
2021-04-26 10:01:53 +02:00
Tristan B. Velloza Kildaire
c9c913eaae
Call method
2021-04-26 10:00:32 +02:00
Tristan B. Velloza Kildaire
3bc19fb3cb
Refactored typing system
2021-04-23 14:19:46 +02:00
Tristan B. Velloza Kildaire
7476c1a3ce
Refactored, functions and variables both checked for valid type names using one funciton that processes TypedEntities
2021-04-23 14:14:09 +02:00
Tristan B. Velloza Kildaire
5e296dd67c
SHow error on invalid type being used for variable declarations
2021-04-23 14:09:05 +02:00