Commit Graph

1635 Commits (df8c370e17b56cf7b19240283c02568a73db2bc7)

Author SHA1 Message Date
Doug Coleman 125e4befd3 compiler.cfg.liveness: Add parallel-copy method for lookup-base-pointer*. Adjust lookup-base-pointer* stack effect to take two parameters. Still retain stack overflows, but more correct now... 2013-01-01 14:16:51 -08:00
Alex Vondrak 8b44af4717 compiler.cfg.renaming.functor: fix ##parallel-copy methods 2012-12-31 11:26:46 -08:00
Alex Vondrak e90ce0865c compiler.cfg.ssa.destruction.leaders: break off leader-map to resolve circular dependencies (oops) 2012-12-31 11:20:57 -08:00
Alex Vondrak dcb27c51e4 compiler.cfg.liveness: still kill defs by leaders, but keep original
vregs in the live-sets so accurate info (e.g., representations) can
still be looked up (issue #22)
2012-12-31 11:05:05 -08:00
Alex Vondrak fc91dcf530 compiler.cfg.ssa.destruction: alien-call-insns are too hairy to coalesce (issue #22) 2012-12-31 11:04:57 -08:00
Alex Vondrak 86a15ad47b compiler.cfg.liveness: look up leaders (if possible) so liveness analysis doesn't break after leaving SSA (issue #22) 2012-12-31 11:04:52 -08:00
Alex Vondrak b08c077023 compiler.cfg.parallel-copy: make sure new vregs used to break cycles in parallel-copy-rep update the leader-map (issue #22) 2012-12-31 11:04:44 -08:00
Alex Vondrak ff1c2c293b compiler.cfg.ssa.interference.live-ranges: fix kill-indices for ##parallel-copy (issue #22) 2012-12-31 11:04:38 -08:00
Alex Vondrak ae0b77a0c4 compiler.cfg.ssa.cssa: split the definitions of ##phis so live-ranges don't interfere (issue #22)
See the explanation after the proof of Lemma 1 in "Revisiting Out-of-SSA
Translation for Correctness, Code Quality, and Efficiency" (Boissinot et
al.) for why this is necessary.
2012-12-31 11:04:26 -08:00
Doug Coleman a0dd953e33 starting point - Fix bootstrap; I broke it in merging. Disable environment variables because the compiler isn't loaded yet and can't call C ffi functions, and tools.test loads this vocab.
Disable intrinsics in cpu.x86.64 for now, since they invoke the compiler
Fix ##branch renaming to ##branch,
To work on this branch:
./factor -include=math -i=boot.image
./factor -run=listener
USE: compiler USE: tools.test save
enable-optimizer

Error message is now:
T{ vregs-shouldn't-interfere f 409 424 }
2012-12-31 11:03:45 -08:00
Slava Pestov 07227f22f9 WIP 2012-12-31 11:03:33 -08:00
John Benediktsson 013160df9a change some "2drop 2drop" to "4drop". 2012-10-23 12:21:30 -07:00
John Benediktsson cf3c197743 compiler.tree.propagation: revert cleanup, this was more correct. 2012-10-05 15:00:49 -07:00
John Benediktsson f7d58fff90 compiler.tree.propagation: throw the proper error in >fixnum methods. 2012-10-05 09:54:51 -07:00
John Benediktsson 80b39bd4f2 compiler.tree.propagation: cleanup known-words a bit. 2012-10-05 09:47:27 -07:00
John Benediktsson 040b94f5ce compiler.tree.propagation: make sure integer>fixnum-strict infers a fixnum. 2012-10-05 04:17:43 -07:00
Alex Vondrak f75f99ecc9 compiler.cfg.copy-prop: kludge to make sure ##phis get updated 2012-09-12 15:14:11 -07:00
Alex Vondrak 4008edfdf8 move compiler.cfg.graphviz & compiler.cfg.gvn from basis to extra, just to keep organized 2012-09-12 15:14:07 -07:00
Alex Vondrak 51b3b1fd87 compiler.cfg.graphviz: tweak code & output a little 2012-09-12 15:14:06 -07:00
Alex Vondrak d6849da7ec compiler.cfg.graphviz: refactoring 2012-09-12 15:14:06 -07:00
Alex Vondrak 64b541759e add crappy experimental code for compiler.cfg.graphviz & compiler.cfg.gvn 2012-09-12 15:14:06 -07:00
John Benediktsson e72e1a340f compiler.tree.propagation: fix >fraction types. 2012-09-11 07:42:39 -07:00
John Benediktsson e84e508256 math.ratios: speed up some operations on ratios. 2012-09-10 19:53:25 -07:00
John Benediktsson ec6baefce3 compiler.tree.cleanup: fix "-1 shift" tests. 2012-09-10 19:24:23 -07:00
John Benediktsson a4f264509d math: cleaner "2/" speedup by using custom inlining. 2012-09-10 17:59:03 -07:00
John Benediktsson b6c069f99a compiler.cfg.representations.selection: removing 10^ in favor of 10^. 2012-09-05 09:25:26 -07:00
Doug Coleman 27f445d505 assocs: Add sift-keys and sift-values. Remove three other implementations
of sift-values and use the new one.
2012-08-23 22:36:10 -07:00
John Benediktsson 465a969b61 layouts: defining "fixnum-bits". 2012-08-21 18:05:59 -07:00
Doug Coleman cd9dd9d752 core: Throw an error when assigning a bignum to a fixnum tuple slot if the bignum doesn't fit. Fixes #594. 2012-08-03 14:59:59 -07:00
John Benediktsson 6a183718fa compiler.cfg: don't need to escape the symbol here. 2012-08-02 15:14:42 -07:00
John Benediktsson 3a7a7ac86b compiler.codegen: instruction counter is a global. 2012-08-02 15:06:04 -07:00
Doug Coleman 2996ef41ff sequences: Fix tests that broke when nth could only be integers. Undo integer>fixnum in iota nth. See bug #582. 2012-07-25 22:17:24 -07:00
Doug Coleman c936f9d5e5 modular-arithmetic: Fix unit test. Should expect integer>fixnum, not >fixnum. 2012-07-23 11:51:44 -07:00
Doug Coleman fb4e3ad9bc compiler: Fix bitand on ratios, floats. Fix shift on ratios, floats. Add integer>fixnum. Fixes #500. 2012-07-23 09:31:12 -07:00
John Benediktsson 4e72d80256 Using "same?" in more places. 2012-07-21 10:22:44 -07:00
Doug Coleman bf8d455e9c compiler: Fix /mod simplications in dead-code, add unit tests. Fixes #544 2012-07-21 03:41:42 -07:00
Doug Coleman d979478bc4 stack-checker: meta-d was a word and symbol, now meta-d word and (meta-d) symbol
issuse #358
2012-07-20 12:30:14 -07:00
Doug Coleman 99ec318a98 compiler.tree.debugger: Remove make-assoc 2012-07-19 17:48:02 -07:00
John Benediktsson 559b5bfa5b using the new H{ } make. 2012-07-19 09:50:09 -07:00
Doug Coleman 42f4dc36b2 namespaces: Rename ``bind`` to ``with-variables``. Update a few places that called ``global [ ] with-variables`` to use ``with-global``. 2012-07-19 00:02:47 -07:00
Doug Coleman 7c77597b09 issue #358: fix a couple compiler errors 2012-06-21 08:35:47 -07:00
Doug Coleman 1c3deddf61 issue #358: Rename all of the words depends-on-* to add-depends-on* 2012-06-21 08:35:45 -07:00
John Benediktsson d1f3b326e5 math: using if-zero in more places. 2012-06-18 14:32:39 -07:00
Doug Coleman 3507b9bad7 classes:
- Allow methods to dispatch off union{ } and intersection{ } classes.
- Add not{ } anonymous-complement syntax.
- Define class-name for anonymous-union/intersection/complement and maybes, and clean up pprint.
- Change maybe: foo to maybe{ foo }
- Call sort-classes when making anonymous-union/anonymous-intersection classes so that they are canonicalized.
2012-05-03 19:45:30 -07:00
Joe Groff c86d92a219 fix compiler.codegen tests 2011-12-14 12:51:12 -08:00
Joe Groff c9cc98d124 compiler.constants: remove unused constants 2011-12-14 09:56:45 -08:00
Joe Groff e21f316583 vm: store stack frame size in code blocks
Change modify-code-heap primitive so it takes a sixth element in each array for the frame size.
2011-12-14 09:56:45 -08:00
Joe Groff 47fc91e948 command-line: don't pull in tools.errors
tools.errors brings the debugger with it, which bloats deploy image size
2011-12-07 10:52:58 -08:00
Joe Groff 2e4d6f724b compiler: fix failing test 2011-12-06 21:11:44 -08:00
Doug Coleman 80385770ef compiler: The non-optimizing compiler is too slow with smart combinators in the compiler. Speed up bootstrap by not using them. 2011-12-05 14:50:51 -08:00
Doug Coleman 2b87eaa1b5 generalizations: Refactor stack-checker so that smart combinators can be used with curry and compose. 2011-11-27 20:25:22 -08:00
Joe Groff 943596575a use radix literals 2011-11-23 19:03:40 -08:00
Joe Groff f225bf7f55 compiler.cfg.finalization: reenable scheduling
Prolog safepoint appears to work with it enabled
2011-11-23 11:11:27 -08:00
Joe Groff 6498bc65ce compiler: emit safepoints in optimized prologs 2011-11-23 11:11:25 -08:00
Doug Coleman f7700809c5 compiler tests: fix using, add tests to make sure instance? inlines 2011-11-23 01:01:11 -08:00
Doug Coleman b37bebb17f compiler.tree.propagation.transforms: fix infinite recursion that was breaking prettyprint 2011-11-23 00:48:05 -08:00
Doug Coleman f90bc5cdb6 classes: optimize instance? for classoids 2011-11-22 20:38:07 -08:00
Doug Coleman 82c5388f68 classes: add syntax for intersection{ and union{ anonymous classes. make classoid a mixin. 2011-11-22 18:49:42 -08:00
Doug Coleman cab0369fec classes: Make methods dispatch on maybes. Fix a couple bugs in the implementation of maybe. classoid? is now a dumb test if an object could be a well-formed classoid; valid-classoid? tests for well-formedness. Move maybe tests. Make pprint* work better on methods. 2011-11-22 15:12:20 -08:00
Doug Coleman fac17c10ba classes.maybe: move maybe definition from classes.union to classes.maybe 2011-11-22 02:46:36 -08:00
Doug Coleman 067f9830ef classes.union: Define a maybe: word that makes a tuple that acts as an anonymous union for a type and f. Updated all the places we define UNION: ?foo foo POSTPONE: f ;. Fixes #416 and lots of headaches. 2011-11-22 01:56:13 -08:00
Joe Groff 248066c710 code beautification 2011-11-13 16:10:26 -08:00
Joe Groff 9a19f82470 compiler.tree.propagation: missed using 2011-11-13 16:10:25 -08:00
Joe Groff 873208f986 compiler: more peephole tests for shl/sar 2011-11-13 16:10:24 -08:00
Joe Groff 4261d8bb8d compiler: tighten (simd-select) output class
Ints and smaller (or shorts and smaller on 32-bit) can be assumed to be fixnums. Fixes #393
2011-11-13 16:10:23 -08:00
Joe Groff d79b462f75 compiler: add intrinsic for PMOVMSKB/MOVMSKP[SD]
Combined with a fast bit-count this will let us rice byte-counting.
2011-11-13 16:10:20 -08:00
Slava Pestov 910748819d Now that #foo and ##foo are symbols we can remove a bunch of \ 2011-11-12 22:04:26 -08:00
Joe Groff e0dc236725 cpu.*.bootstrap: clear faulting flag directly
No reason to go through a safepoint in unwind-native-frames really.
2011-11-12 13:02:57 -08:00
Doug Coleman 6cca0ea468 compiler.cfg: Rename <##foo> to ##foo, in the low-level IR 2011-11-11 19:48:38 -08:00
Joe Groff c31530caec vm: strip out call-counting profiler
This makes the separate "code" and "entry_point" fields in word and quotation redundant, so also remove them to reclaim an additional cell per word and quotation object, which should help with #318.
2011-11-10 16:01:07 -08:00
Doug Coleman eb2a0c611b compiler.cfg: Change low-level IR constructors from ##foo to <##foo> 2011-11-06 23:02:46 -08:00
Doug Coleman d65bd97a54 compiler.tree: Renamed high-level IR node constructors to <#foo> from #foo. Moving towards making classes/word names not conflict. 2011-11-06 23:02:45 -08:00
Doug Coleman 9048233d27 compiler.tree.dead-code: Rewrite /mod to /i or mod in the dead-code pass in the high level optimizer. Fixes #279. 2011-11-06 19:23:26 -08:00
Doug Coleman c731dc6edb Rename lookup to lookup-word. 2011-11-06 16:00:00 -08:00
Joe Groff 8cf18d1a82 remove BSD,solaris,etc. misc platform support code 2011-11-02 17:13:51 -07:00
Slava Pestov 70056d756b compiler.cfg.builder: add test to ensure that fast union predicates do not contain a conditional 2011-10-29 17:11:04 -07:00
Slava Pestov 5a46b45312 compiler.tree.propagation: more accurate output type for 'tag' primitive 2011-10-29 17:11:04 -07:00
Slava Pestov e5a308d56a compiler.tree.debugger: disable length limit when printing optimized. quotation 2011-10-29 17:11:03 -07:00
Joe Groff 402e1155a5 vm: resumably handle signals from leaf procedures 2011-10-27 21:18:18 -07:00
Joe Groff c06be95816 compiler: no spurious safepoint at start of loops 2011-10-27 21:14:48 -07:00
Joe Groff 41c36752fc compiler.cfg.tco: clean up commented-out old code 2011-10-27 21:14:47 -07:00
Joe Groff 6f75e84d93 compiler.cfg.tco: teach TCO about safepoints 2011-10-27 21:14:46 -07:00
Joe Groff e449fef4e3 compiler.cfg.builder: safepoint loops and epilogs 2011-10-27 21:14:46 -07:00
Joe Groff 0c022f2454 compiler: add ##safepoint IR insn 2011-10-27 21:14:46 -07:00
Joe Groff 98fa51f0e0 compiler: rt-safepoint and rel-safepoint words 2011-10-27 21:14:45 -07:00
Doug Coleman 51c033a1f6 Fix all failures in the linux64 build email 2011-10-24 19:33:09 -07:00
Doug Coleman f9257959fd Rename class to class-of 2011-10-24 06:47:42 -05:00
John Benediktsson f4a6e10818 More cleanup of unused stuff. 2011-10-19 11:01:16 -07:00
John Benediktsson 80e1c8e3f2 Eliminate duplicate syntax for stack effects "(" no longer drops and is identical to the old "((", which is now removed. 2011-10-18 13:19:39 -07:00
Joe Groff dbda6cb40b compiler.tree.dead-code: fix test
It was using "read" in an optimization test, but since "read" is now inline, it wasn't getting the expected optimized quotation back.
2011-10-17 21:23:10 -07:00
John Benediktsson 81714b8dc3 More lint cleanups. 2011-10-16 19:33:16 -07:00
John Benediktsson 378786599d Cleanup lint warnings. 2011-10-14 11:47:24 -07:00
John Benediktsson 6417f36397 namespaces: adding a "with-global" word to replace "global [ ] bind". 2011-10-13 17:21:59 -07:00
John Benediktsson 1987deb359 Fix M: stack effects. 2011-10-13 16:41:17 -07:00
John Benediktsson 4baf14972f sequences: adding ?last for symmetry. 2011-10-13 13:04:24 -07:00
Slava Pestov ae286fb7ef callback-error: don't use -e until we fix issue #245 2011-10-10 21:25:50 -07:00
Slava Pestov 7bc38641f9 compiler.tree.identities: the identity on mod was useless too, because we already have a rewrite rule which handles this case in compiler.tree.propagation 2011-10-10 12:34:21 -07:00
Slava Pestov dc36fd712d compiler.cfg.representations: fix unit test, it depended on hashing order which changed recently 2011-10-10 12:15:41 -07:00
Slava Pestov 3a0ffceed9 compiler.tree.propagation.transforms: fix rem and mod custom inlining 2011-10-10 12:12:53 -07:00
Slava Pestov 7a4ab74703 compiler.codegen.gc-maps: fix tests 2011-10-10 12:07:09 -07:00