1
0
mirror of https://github.com/catseye/SixtyPical.git synced 2024-06-26 16:29:28 +00:00
Commit Graph

389 Commits

Author SHA1 Message Date
Chris Pressey
b9df1482c6 Pass next routine to each routine being compiled. 2019-10-22 10:32:14 +01:00
Chris Pressey
3d88226058 Implement --prune-unreachable-routines. 2019-10-22 09:41:30 +01:00
Chris Pressey
1df6941b01 Callgraph uses reachability. 2019-10-22 09:07:16 +01:00
Chris Pressey
1098347fa5 Routines can be declared preserved. 2019-10-21 21:45:59 +01:00
Chris Pressey
a84cd4de8c Expand on the callgraph tests. 2019-10-21 21:35:28 +01:00
Chris Pressey
b09d0c0b76 Routines that are goto'd are also in the call graph. 2019-10-21 17:15:28 +01:00
Chris Pressey
182935a088 First cut at finding all routines that could be assigned to vector. 2019-10-21 16:12:06 +01:00
Chris Pressey
7187fa6285 Refactor: move to dedicated module. 2019-10-21 15:41:17 +01:00
Chris Pressey
bcc256aa5d Checkpoint. 2019-10-21 15:07:54 +01:00
Chris Pressey
87a2f70092 First cut at constructing a call graph. 2019-10-21 14:03:35 +01:00
Chris Pressey
2e2e80664e Forbid nested with interrupts blocks, and more refactoring. 2019-05-14 15:01:10 +01:00
Chris Pressey
3f666f4385 Add reset instruction; much refactoring. 2019-05-14 08:56:35 +01:00
Chris Pressey
dd29b6fd4a Implement local locations that aren't statically initialized. 2019-05-13 12:32:18 +01:00
Chris Pressey
c246424930 Fix bug raising InconsistentExitError, and type-bug in ribos2.60p. 2019-04-15 17:35:17 +01:00
Chris Pressey
8d6e5e090d The Type and Ref class hierarchies are now namedtuples. 2019-04-10 08:50:13 +01:00
Chris Pressey
a0328b8840 Store type information in SymbolTable shared across phases. 2019-04-10 08:48:33 +01:00
Chris Pressey
394fbddad6 Refactor to avoid storing LocationRefs in SymEntry. 2019-04-09 09:42:22 +01:00
Chris Pressey
4615d8d054 Distinct AST nodes for call and goto instructions. 2019-04-08 16:26:51 +01:00
Chris Pressey
bd462d6d8b Include more info in --dump-exit-contexts. 2019-04-08 12:23:44 +01:00
Chris Pressey
b19267d3ba Checkpoint import of changes for version 0.19. 2019-04-08 11:50:54 +01:00
Chris Pressey
75449d7271
Merge pull request #18 from catseye/more-modes-on-add-and-sub
More modes on add and sub
2018-12-12 15:13:26 +00:00
Chris Pressey
35a1053439 Support more modes on add and sub. 2018-12-12 10:34:25 +00:00
Chris Pressey
69df175230 Merge branch 'develop-0.18' of https://github.com/catseye/SixtyPical into inconsistent-initialization 2018-12-12 09:58:26 +00:00
Chris Pressey
d1a29709f2 Add example test program for cmp-against-literal-word. Fix it. 2018-12-12 09:09:45 +00:00
Chris Pressey
97e6e619ff cmp can compare against a literal word. 2018-12-12 09:01:46 +00:00
Chris Pressey
547b7c960a Restore the debugging (which should be rethought, anyway). 2018-12-11 22:40:23 +00:00
Chris Pressey
d13c6a94a2 Drop the check for "consistent initialization" inside if blocks. 2018-12-11 19:27:40 +00:00
Chris Pressey
3a4c2e46c1 inc and dec on a known range usually keeps it known, now. 2018-12-11 17:35:01 +00:00
Chris Pressey
bf3f1835ed Merge branch 'develop-0.18' of https://github.com/catseye/SixtyPical into goto-at-end-of-block 2018-11-29 17:47:48 +00:00
Chris Pressey
d1befe7123 All tests pass again -- but this needs lots more tests please. 2018-11-27 17:11:37 +00:00
Chris Pressey
07ec6752ee Introduce yet another new error. 2018-11-27 17:09:38 +00:00
Chris Pressey
a53a3529ea Better name for this error. 2018-11-27 17:06:07 +00:00
Chris Pressey
21e623f3ad Collect exit contexts. Disturbs fallthru analysis, but otherwise? 2018-11-27 16:59:16 +00:00
Chris Pressey
0ca545c89a Begin working out what happens when you encounter a goto. 2018-11-27 15:44:39 +00:00
Chris Pressey
27aca3dd86 Looks like, when we "goto", we should "pull in" the constraints. 2018-11-27 15:10:18 +00:00
Chris Pressey
6dbce205d1 goto is no longer restricted to appearing in tail position. 2018-11-27 14:25:43 +00:00
Chris Pressey
d90ac92a33 Merge branch 'develop-0.18' into goto-at-end-of-block 2018-11-27 13:55:36 +00:00
Chris Pressey
9e9284bee5 goto may only occur at the end of a block. 2018-11-27 13:43:36 +00:00
Chris Pressey
94ee042a1e Fix order of operands in word-sized cmp. 2018-11-27 13:12:55 +00:00
Chris Pressey
dcc944d732 If add and sub can work on words, then cmp can work on words too. 2018-11-23 23:00:41 +00:00
Chris Pressey
e74c7f2b31 Initial attempt at 16-bit compare. Not super well tested yet. 2018-11-23 22:09:28 +00:00
Chris Pressey
0429e4bd90 Make lexer greatly less inefficient on large source files. 2018-11-20 13:14:45 +00:00
Chris Pressey
0c63de9351 Merge branch 'develop-0.17' into remove-legacy-syntax 2018-09-07 17:49:03 +01:00
Chris Pressey
684b26dd5c locexpr() always returns a ForwardReference if it can't lookup it. 2018-09-07 15:03:41 +01:00
Chris Pressey
07ef1e243a backpatch_constraint_labels can resolve ForwardReferences. 2018-09-07 14:51:16 +01:00
Chris Pressey
29a5bba85c Distinct symbol resolution phase (as a method on parser.) 2018-09-07 14:27:49 +01:00
Chris Pressey
cc98e023c4 Simply always produce ForwardReferences in locexpr(forward=True). 2018-09-07 14:02:40 +01:00
Chris Pressey
d70092c373 Even more general. 2018-09-07 13:42:18 +01:00
Chris Pressey
af0e1b41c7 Forward-reference resolution becomes increasingly general. 2018-09-07 13:40:41 +01:00
Chris Pressey
26a2fb448c Generalize forward reference resolution a smidge. 2018-09-07 13:27:18 +01:00