Skip to content

Commit

Permalink
* Separated a GlobalOptions module
Browse files Browse the repository at this point in the history
 * Removed astronomers specific rules
 * Removed types from the astronomer rules.
    * Learned: It's not always a great thing to denormalize data, it leads to inconsistency opportunities. An instance of premature optimization likely. Now I'm questioning why .ll does this.
 * Added better humanizing of errors
 * Added a MUCH better solver error printer
 * Brought back the distinction between declaration names and imprecise names
 * Made a better distinction between drop and free
 * Fixed build failure counting bug in Tester
 * Took out localRunes and knowableRunes from Astronomer, moved some of that logic back into astronomer.
    * Learned: It's not always a great thing to pull as much logic as possible out of Templar. In this case, reducing the amount of code in Templar actually increased its complexity, ironically.
 * Changed some astronomer tests into integration tests, feeding actual vale source code now.
    * Learned: Unit tests have a high cost in maintaining the inputs. Perhaps unit tests only make sense on very established chunks of code.
 * Moved a bunch of hardcoded functions (weaks, drop, free, array len, panic) to actual vale code.
 * Made tuple an extern struct, using variadic members.
 * We now internally support variadic members!
 * Made a functor struct, to give to the array instructions, since they need a 'this' object basically
 * Removed special PackTT type.
 * Took out `all` function, pulled into a separate Collector class
 * Added the "macro" concept, for any syntactical sugar features (or semantic sugar? like anonymous substructs, theyre kind of semantic sugar I guess?)
 * Moved drop functions into macros.
 * Moved anonymous substruct functionality into macros.
 * Better distinction between a template name and a stamped name, see CitizenNameT vs CitizenTemplateNameT.
 * Fixed types starting with _, like __Never
 * Added free() functions for interfaces, which then call virtualfree(). Now, there is a normal free() function for every immutable type.
 * Fixed printing exceptions twice in tests
 * Added a "Location In Function" notion, so places in the code are marked by tree-shaped paths
 * Made impl rules sane again, no more NMORFI!

Breaking changes:
- Void's name changed from Tup0_0 to Tup0
- To define abstract functions outside an interface, now need `sealed` on the interface
- To make custom destructors, need #!DeriveStructDrop now, and it's called `drop` not `destructor`.
- All parameters need a type. `fn do(callable)` -> `fn do<F>(callable F)`
  • Loading branch information
Verdagon committed Nov 27, 2021
1 parent 5bcca34 commit 70173bf
Show file tree
Hide file tree
Showing 290 changed files with 14,695 additions and 21,968 deletions.
1 change: 1 addition & 0 deletions Midas/src/c-compiler/globalstate.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ class GlobalState {
return numMetalMethods + i;
}
}
std::cerr << "Couldn't find method " << prototype->name->name << " in interface " << interfaceKindM->fullName->name << std::endl;
assert(false);
}

Expand Down
2 changes: 1 addition & 1 deletion Midas/src/c-compiler/metal/readjson.cpp