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
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
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