summaryrefslogtreecommitdiff
path: root/chapter18
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix deep co-recursive type checkCliff Click2025-01-155-22/+85
|
* Missing "!" check for finding a type declCliff Click2025-01-151-0/+1
| | | | In "N? !n" , "N?" is a type and "n" is the declared variable.
* Update README.mdCliff Click2025-01-151-3/+3
|
* Final vars and forced constants do not lazy-phiCliff Click2025-01-153-6/+33
| | | | Better comments on why a field is final
* Promote outside of constructorsCliff Click2025-01-156-15/+40
| | | | | Var picks up a Real(tm) isFRef flag. Minor progress bug.
* Update FunNode.javaCliff Click2025-01-151-5/+4
|
* Forward Ref type to BottomCliff Click2025-01-159-22/+96
| | | | | | So FRefs can strictly lift when defined. Parser can support forward refs in more cases, by upcasting now and proving the cast is correct later. Monotonic for some float ops.
* Fix a series of small bugsCliff Click2025-01-159-35/+92
| | | | Various kinds of missing checks, over-aggressive asserts, and a few odds and ends
* Series of minor bugsCliff Click2025-01-155-9/+66
|
* Update README.mdCliff Click2025-01-151-2/+2
|
* JSView for functionsCliff Click2025-01-158-45/+67
| | | | | Constants use glabel in JSView. TypeFunPtr gprint uses "→" instead of "->"
* More READMECliff Click2025-01-151-24/+53
|
* Rewrite ReadmeCliff Click2025-01-151-54/+146
|
* Finalize function semanticsCliff Click2025-01-1515-186/+245
| | | | | | | Rename ScopeMin to MergeMem. Move Var to its own file. Allow out-of-scope id lookups in functions, as long as its a final constant. This allows e.g. factorial to find "fact" as an out-of-scope final constant function.
* Add Call/CallEnd in many CFG walksCliff Click2025-01-156-9/+51
| | | | | | Can store into an array. Check array is "of nullable" Add crazy closure test
* Handle recursive functionsCliff Click2025-01-158-96/+363
| | | | | | Define a "Return PC" type, which maps a simple bit vector to call sites. Returns take an RPC; function headers merge RPC from all callers. Work over the Eval2 control path to support recursion; probably 90% to closures now as well.
* Cleanup Eval2Cliff Click2025-01-152-64/+86
|
* Add function forward refsCliff Click2025-01-1529-166/+333
| | | | | | Add FRefNode, making and defining a forward ref. Forward refs promote out of scopes instead of being an undefined error. Add location data to all errors, because introducing more "delayed errors"- forward references are not errors if they get eventually defined. Touches many Nodes. Fix FunNode idom/idepth.
* Compile pipeline deals with functionsCliff Click2025-01-1519-131/+290
| | | | | | | | | Pretty-print functions. GCM deals with functions. Tighten linker API. CallEnd asserts harder proper graph. Eval2 makes (non recursive) function calls Peeps infer sharper function return sigs.
* Getting error code to report same w/out peepsCliff Click2025-01-1520-43/+92
| | | | | | | | | Parse "arg--2" as "arg - -2" and not "arg-- 2". Use ParserException instead of RuntimeException. Add a Field w/out final test. Allow Float NaN to hash/compare Bug cast didn't check type when GVN Better handling of dead return/exit paths
* More getting errors reliableCliff Click2025-01-1511-87/+94
| | | | | ...with and without peeps. Float moves out of the TypeNil set. Eval2 picks up the FLT compares.
* More precise error reportingCliff Click2025-01-1524-155/+211
| | | | | | | Demand CFG cleanup, even if peeps are off; cleans up some tests & a lot of fuzzer bugs related to trying to find infinite loops in dead code. Logical subclass for better error reporting on &,|,^,>>,<<,>>> More precise error reporting on multi returns and trinaries Fuzzer uses new Eval2
* Parallel assign PhisCliff Click2025-01-152-67/+106
|
* New evaluator, more Compiler Driver cleanupCliff Click2025-01-1546-612/+1066
| | | | | | | | | | More compiler driver cleanup: Stop only has Return inputs, never an expr. Drop extra lexical scope. Linker table moves to CodeGen. Replace evaluator with a simpler design; I was unable to get the current design to work with the other changes. Updates to old eval; proper idoms; forced type checks; extensions for Fun, Return, Call, CallEnd. Accessor find next control to execute. Accessor for deciding when its ok to optimize a Function/Return, Call/CallEnd, Stop, ScopeMin (merge) Add local scheduling pass. IRPrinter uses SB instead of StringBuilder Spelling SubF comment
* Fix commentCliff Click2025-01-151-1/+1
|
* Cleanup compile driverCliff Click2025-01-1559-1179/+1693
| | | | | | | | | | Top level makes a "main" function and calls it. Opto() pass inlines main into top-level and removes the function call. If peeps are off, the function call remains; this breaks many tests. Add a FunNode function header; Return is its end. Return no long used at the top level; only a single return per-function, merging all returns (breaks many tests). Add a Call & CallEnd nodes. Fix many tests to pass again. Fix a bunch of minor bugs.
* Intercept first function definitionCliff Click2025-01-153-6/+63
|
* Clean up public API for nil/byte testingCliff Click2025-01-1513-99/+79
|
* All parsing null to be TFP or TMPCliff Click2025-01-1551-429/+1606
| | | | | | | | Insert a TypePtr/TypeNil around TypeMemPtr and TypeFunPtr in the lattice; allows the parsing of "null" to mean either a TMP or TFP null. Cleanup Type null checks and several prints. Drop Type.lub, Type.makeInit. Add a Parser NIL & ZERO. Clean up parser errors, track line numbers for future parser errors.
* Add a tighter/graphviz-oriented type printCliff Click2025-01-158-4/+37
|
* Update README.mdCliff Click2025-01-151-0/+3
|
* Better websocket readerCliff Click2025-01-152-5/+33
| | | | fix bug double-render
* Fix HTML printingCliff Click2025-01-155-6/+7
|
* viewer improvementsCliff Click2025-01-153-27/+57
| | | | | | | viewer highlights parsed text; larger input box removes some double-display handles mouse over-run
* Greatly improved JSViewerCliff Click2025-01-1525-212/+210
| | | | | | | | | | Handle memory edges. Color-coded edges & nodes to match lattice. Add SB vs StringBuilder. JSViewer needs SB to keep my sanity. Catch successful peeps and `show` them. Drop unused LLVM format, so I don't need to support Yet Another Printer. SimpleWebSocket handles longer packets; more robust close. Bug fix st/new fold. Bug fix Phi pull-down op losing precision.
* Progress JSViewCliff Click2025-01-1512-73/+446
| | | | | Larger programs, better layouts. Missing e.g. types, & program text & the inter peeps phase
* Start on a graph viz animation of peepsCliff Click2025-01-1512-2/+2620
|
* First cut function ptr typeCliff Click2025-01-155-5/+144
|
* Initial pushCliff Click2025-01-1592-0/+14890