Commit Graph

1188 Commits (2c82dfb51ba6923c2e7dcf3fac5109ae9da528f2)

Author SHA1 Message Date
Björn Lindqvist e5866dfa80 compiler.cfg.*: changed stack effect of needs-predecessors from ( cfg -- cfg') to ( cfg -- ) 2014-12-11 14:30:47 +01:00
Björn Lindqvist 76cb665a8d compiler.cfg.dominance: change needs-dominance effect from ( cfg -- cfg') to ( cfg -- ) 2014-12-11 14:30:46 +01:00
Björn Lindqvist 054982f24a compiler.cfg.*: docs for compiler.cfg.dominance and compiler.cfg.ssa.construction 2014-12-11 14:30:46 +01:00
Björn Lindqvist 53b7f82368 Docs: more compiler docs 2014-12-11 14:30:46 +01:00
Björn Lindqvist 5fe9ce4235 compiler.cfg: fix stack effect of cfg-changed and predecessors changed to ( cfg -- ) 2014-12-11 14:30:46 +01:00
Björn Lindqvist a0d4e9b417 compiler.cfg.stacks.uninitialized: this compiler pass isn't used anymore -- let's get rid of it 2014-12-11 14:30:46 +01:00
Björn Lindqvist 8744d908b6 compiler.cfg.*: fix stack effect of compiler passes in optimize-cfg
since they all modify the cfg in place, it is better if their stack
effect is ( cfg -- ) instead of ( cfg -- cfg' )
2014-12-11 14:30:45 +01:00
Björn Lindqvist 971a157369 compiler.cfg.instructions: ##alien-assembly should be in the alien-call-insn union but not gc-map-insn 2014-12-08 18:13:46 -08:00
Björn Lindqvist 52d3affeb8 compiler.cfg.*: the ##alien-assembly instruction does not use a gc-map 2014-12-08 18:13:46 -08:00
John Benediktsson ad9d44aa2b compiler.cfg.linear-scan.allocation.state: simplify init-unhandled. 2014-12-01 22:18:15 -08:00
Doug Coleman 20add9544a compiler.cfg: cfg>insns has to go in linearization because of bootstrap circularity. Fix usings. 2014-11-23 22:53:27 -08:00
Björn Lindqvist 4c07d04417 compiler.cfg.*: getting an instruction sequence from a cfg is used in a few tests so let's make a word for it 2014-11-24 06:25:34 +01:00
Björn Lindqvist 9b7a873f6d compiler.cfg.build-stack-frame.tests: improved fix for the test case 2014-11-24 03:42:27 +01:00
Doug Coleman d40faa3bdc compiler.cfg: Add vocabulary for words defined just to test compiler.cfg. 2014-11-23 01:06:46 -08:00
Doug Coleman 3b3103b545 compiler.cfg.scheduling: Fix V{ } -> { } unit test. 2014-11-22 17:43:27 -08:00
Björn Lindqvist 964ae127a2 compiler.cfg.dependence: docs 2014-11-22 17:31:40 -08:00
Björn Lindqvist aca14563b0 compiler.cfg.dependence/scheduling: fix(?) for #1187, just avoid shuffling ##peek... 2014-11-22 17:31:40 -08:00
Björn Lindqvist 9d0379b9ba compiler.cfg.dependence: if node subclasses identity-tuple it doesn't need the number slot 2014-11-22 17:31:40 -08:00
Björn Lindqvist eb9ca1c6fe compiler.cfg.dependence: node class doesn't need parent attribute, that's nice 2014-11-22 17:31:40 -08:00
Björn Lindqvist 0feece123c compiler.cfg.dependence/scheduling.tests: new tests, some that doesnt work yet 2014-11-22 17:31:40 -08:00
Björn Lindqvist 8347f43f84 compiler.cfg.dependence/scheduling: refactoring to get rid of node's follows>> 2014-11-22 17:31:40 -08:00
Björn Lindqvist 645a70f1d4 compiler.cfg.scheduling: refactoring to get rid of the roots dynamic variable 2014-11-22 17:31:39 -08:00
Björn Lindqvist a96fff60af compiler.cfg.dependence: keys-for ?first is not deterministic, use tiebreak-parents to get predictable ordering 2014-11-22 17:31:39 -08:00
Björn Lindqvist 7ebceb50e5 compiler.cfg.dependence/scheduling: select-parent and roots moved to scheduling
the roots stuff is only used by compiler.cfg.scheduling, so it's more
simple to have it there than in compiler.cfg.dependence
2014-11-22 17:31:39 -08:00
Björn Lindqvist 586c47e5ab compiler.cfg.dependence/scheduling: more readable version of the select word 2014-11-22 17:31:39 -08:00
Björn Lindqvist b5754d32ef compiler.cfg.dependence: moved tree verification code to .tests
Since verify-trees just checked that make-trees worked correctly, it's
better to have that code in the test vocab instead of slowing down
every compile by running it
2014-11-22 17:31:39 -08:00
Björn Lindqvist 2ea1a999a4 compiler.cfg.dependence.tests: unit tests for the dependence vocab 2014-11-22 17:31:39 -08:00
Björn Lindqvist 3f3cc0eb8a compiler.cfg.dependence: now the nodes are on the stack instead of being saved in a dynamic variable (fp++) 2014-11-22 17:31:39 -08:00
Björn Lindqvist 2cfd55b864 compiler.cfg.dependence/scheduling: refactoring, trying to get rid of the ugly usage of nodes dynamic variable 2014-11-22 17:31:39 -08:00
Björn Lindqvist 0a7726b66d compiler.cfg.dependence: more docs for the vocab 2014-11-22 17:31:38 -08:00
Björn Lindqvist a1b20e451b compiler.cfg.scheduling: split-insns returns a 3-tuple instead of 3 items on the stack 2014-11-22 17:31:38 -08:00
Björn Lindqvist c777cb954a compiler.cfg.scheduling: refactor to use split-insns and compiler.cfg.linear-scan.numbering + tests 2014-11-22 17:31:38 -08:00
Björn Lindqvist 96396cb3ad compiler.*: use block>cfg and insns>block in many tests instead of wordier code 2014-11-22 17:31:38 -08:00
Björn Lindqvist c8a022423e compiler.cfg.utilities: move and rename the helper words block>cfg, insns>block and insns>cfg, they are useful to many testing vocabs 2014-11-22 17:31:38 -08:00
John Benediktsson 44f31ee13e use swapd instead of [ swap ] dip. 2014-11-21 11:56:17 -08:00
Doug Coleman 46174ab748 compiler.cfg.build-stack-frame: Fix test for win64 2014-11-18 14:21:45 -08:00
John Benediktsson 60d0937041 compiler.cfg.instructions: fix help-lint. 2014-11-16 16:22:13 -08:00
Björn Lindqvist 0d9316f4f9 Docs: more various compiler doc improvements 2014-11-16 06:25:55 -08:00
Björn Lindqvist d3c91bea72 compiler.cfg.linear-scan.*: stub docs and tests 2014-11-16 06:25:54 -08:00
Björn Lindqvist 3b86d4b9ba compiler.cfg.def-use: docs 2014-11-16 06:25:54 -08:00
Björn Lindqvist 90b31d543b compiler.cfg.instructions: more docs 2014-11-16 06:25:54 -08:00
Björn Lindqvist f06f59b956 Docs: smallish improvements to compiler vocabs 2014-11-16 06:25:54 -08:00
Björn Lindqvist bc5c23b162 compiler.cfg.linear-scan.assignment: stub docs 2014-11-16 06:25:54 -08:00
Björn Lindqvist 1eac4afc8b compiler.cfg.linear-scan.allocation.state: sub docs and tests 2014-11-16 06:25:53 -08:00
Björn Lindqvist 0a30bd9218 compiler.cfg.stack-frame: stub docs and tests for vocab 2014-11-16 06:25:53 -08:00
Björn Lindqvist 8a0b4c3d26 compiler.cfg.build-stack-frame: stub docs and tests for vocab 2014-11-16 06:25:53 -08:00
Björn Lindqvist cbc8681187 Docs: compiler.cfg.instructions improvements 2014-11-16 06:25:53 -08:00
Doug Coleman 7cfa9d9518 assocs: Make map-index-as support seq or assoc exemplars and move map-index, map-index-as to assocs because they need to use new-assoc. Make zip-index-as support assoc exemplars. Fix up docs and tests.
assocs.extras: Remove zip-as and move tests to assocs.
2014-11-08 18:18:00 -08:00
Doug Coleman 56f1b87a6f basis, extra: Use zip-index. 2014-11-08 00:46:30 -08:00
Doug Coleman 1ee9a8ea13 compiler.cfg.stacks.local: Have unit test load prettyprint implementation for ds-loc so that it always prints as "D 4". 2014-10-22 10:31:27 -07:00
Björn Lindqvist a617855aef Docs: fixing smaller help-lint nitpicks 2014-10-19 14:05:06 +02:00
Björn Lindqvist 164af978ba compiler.cfg.*: more stub docs for cfg construction words 2014-10-19 13:45:42 +02:00
Björn Lindqvist 83cf4b9d57 compiler,cpu: more docs 2014-10-17 23:18:57 +02:00
Björn Lindqvist 476ebf5b25 compiler.cfg.*: more docs, tests and a small refactoring of the
admissible-registers word
2014-10-17 23:18:57 +02:00
Doug Coleman 4c6435934b compiler.cfg.stacks.vacant: Fix docs for word rename. 2014-09-08 17:48:22 -07:00
Björn Lindqvist ffacc8370d compiler.cfg.stacks.vacant: ##call instructions clear the set of overinitialized locations 2014-09-08 14:54:18 -07:00
Björn Lindqvist 9836d6a1d0 VM: move the stack scrubbing logic to call_frame_slot_visitor to avoid visiting the callstack twice
primitive_minor_gc() iterates the stack twice, first to scrub stack
locations, then to trace overinitialized ones and gc roots. By running
visit_callstack() before visit_stack_elements() you only need to do it
once.
2014-09-08 14:54:18 -07:00
Björn Lindqvist 46082d836a compiler.cfg.stacks.vacant: invert meaning of 0/1 for overinit:ed locs to make some logic simpler 2014-09-08 14:54:17 -07:00
Björn Lindqvist 70e4f2a8b7 compiler.cfg.instructions: added check-d and check-r slots to gc-map
the data is output from compiler.cfg.stacks.vacant in a reasonable
format but not yet used for code generation.
2014-09-08 14:54:17 -07:00
Björn Lindqvist ecead801c1 compiler.cfg.stacks.vacant: more docs and removed usage of byte-arrays 2014-09-08 14:54:17 -07:00
Björn Lindqvist ab5e629243 compiler.cfg.stacks.vacant: sub docs seeded with a stolen comment from uninitialized.factor 2014-09-08 14:54:17 -07:00
Björn Lindqvist 40ee3cdcbb compiler.cfg.stacks.vacant: fix usings and remove commented out code 2014-09-08 14:54:17 -07:00
Björn Lindqvist e961a03837 compiler.cfg.stacks.vacant: compiler pass replacing uninitialized for more accurate stack maps
This pass uses a better algorithm for keeping track of all stack
manipulations which means that the stack maps it assigns are much more
precise.
2014-09-08 14:54:17 -07:00
Björn Lindqvist d1032c159a compiler.cfg.dataflow-analysis: generic for configuring the "block skipping"
To accurately record uninitialized/overinitialized stack locations,
kill blocks needs to be analyzed. Now you can make it so by overriding
ignore-block?.
2014-09-08 14:54:17 -07:00
John Benediktsson 7609ab6eda compiler.cfg: fix some help-lint warnings. 2014-08-14 09:59:27 -07:00
Björn Lindqvist c3253406e3 compiler.cfg.*: more docstrings for compiler words 2014-08-13 11:01:11 -07:00
Björn Lindqvist c6784020aa compiler.cfg.*: initial docs for dataflow analysis vocabs 2014-08-13 11:01:11 -07:00
Björn Lindqvist 6560778d2a compiler.cfg.*: stub docs for register scheduling vocabs 2014-08-13 11:01:11 -07:00
Björn Lindqvist 769ca5550f compiler.cfg.*: docs for compiler words 2014-08-13 11:01:11 -07:00
Björn Lindqvist 1225abeeaf Docs: more compiler-related documentation 2014-08-13 11:01:10 -07:00
Björn Lindqvist 60ffe0680e kernel: new combinator 2with = with with 2014-07-22 07:40:13 -07:00
Doug Coleman f9d9d8d64c compiler.cfg.instructions: Messed up a patch. oops. 2014-07-17 18:19:10 -05:00
Doug Coleman 1d0f0fb98a compiler.cfg.instructions: Fix using. 2014-07-17 15:48:41 -05:00
Doug Coleman d173da94c1 compiler.cfg: Rename doc -> docs in filenames so the docs load. 2014-07-17 15:32:29 -05:00
Doug Coleman 712aa303db compiler, stack-checker docs: Fix for 32-bit builds. 2014-07-03 12:21:17 -07:00
John Benediktsson bf473ec943 compiler.cfg: fix some docs. 2014-06-08 18:20:27 -07:00
Björn Lindqvist 280620c55f Docs: docs for compiler-related words 2014-06-08 11:48:31 -07:00
Björn Lindqvist 160df8b3f1 Docs: for compiler.cfg.* vocabs 2014-06-08 11:48:31 -07:00
Björn Lindqvist 2d7f344109 Docs: more docs for compiler.cfg.* words 2014-06-08 11:48:30 -07:00
Björn Lindqvist 3d7b0dbf0a Docs: for compiler.cfg.regsters 2014-06-08 11:48:30 -07:00
Björn Lindqvist 395a490b90 Docs: documentation for stack-checker.* and compiler.* vocabs 2014-06-08 11:48:30 -07:00
Björn Lindqvist fa097c7a56 Docs: for compiler.cfg and cpu.architecture words
Conflicts:
	basis/cpu/architecture/architecture-docs.factor
2014-06-08 11:48:30 -07:00
Björn Lindqvist c76a994f27 Docs: new stub documentation for vocabs in compiler.cfg 2014-06-08 11:48:29 -07:00
Björn Lindqvist c3f9c0a9a3 compiler.cfg.intrinsics.simd: the ulonglong case is correct, it just shouldn't convert the value to a fixnum 2014-06-07 17:00:52 +02:00
Björn Lindqvist 644dac1fc0 compiler.cfg.intrinsics.simd: remove a case in sign-bit-mask that is probably unused 2014-06-07 14:39:19 +02:00
Björn Lindqvist e2eebdec4d Docs: mostly fixes for doc errors found by help lint 2014-05-10 17:13:49 -07:00
Björn Lindqvist 4f9f2b862f Docs: docs for compiler-related vocabs 2014-05-10 17:13:49 -07:00
Björn Lindqvist ea48d13731 Docs: for compiler.cfg and compiler.codegen 2014-05-10 17:13:49 -07:00
Björn Lindqvist 0bb3e2397b Docs: more compiler documentation 2014-05-10 17:13:48 -07:00
Björn Lindqvist 6a8336047d Docs: initial docs for the compiler.cfg.* vocabs 2014-05-10 17:13:48 -07:00
Doug Coleman 33a4117787 compiler: Fix tuple literals in tests. 2013-03-24 01:09:37 -07:00
Doug Coleman 5f377c0849 compiler: Rename value-info, live-interval 2013-03-23 22:56:47 -07:00
John Benediktsson d0ad18a64e compiler.cfg.ssa.construction.tdmsc: fix previous broken commits. 2013-03-23 18:44:49 -07:00
John Benediktsson 15f9ba2763 Revert "compiler.cfg.ssa.construction.tdmsc: more use of ?adjoin."
This reverts commit 6bf55a6d89.
2013-03-23 18:39:15 -07:00
John Benediktsson 3f1a426210 Revert "compiler.cfg.ssa.construction.tdmsc: pass visited set on stack."
This reverts commit ec2834300b.
2013-03-23 18:25:53 -07:00
John Benediktsson 7744498ad2 compiler.cfg.ssa.construction.tdmsc: pass visited set on stack. 2013-03-23 18:13:17 -07:00
John Benediktsson 56a7cf4df2 compiler.cfg.ssa.construction.tdmsc: more use of ?adjoin. 2013-03-23 17:57:41 -07:00
John Benediktsson 93fb7805b0 compiler: more use of ?adjoin. 2013-03-23 17:47:07 -07:00
Doug Coleman f820215b1e alien.libraries: Rename library to lookup-library. 2013-03-23 17:16:46 -07:00
John Benediktsson 7da4a74588 compiler: fewer namespace lookups. 2013-03-21 19:11:20 -07:00
John Benediktsson 972281987c compiler.cfg.intrinsics: intrinsics on inline words are not supported. 2013-03-20 10:59:45 -07:00
John Benediktsson b8097f9221 compiler: cleaner use of sets. 2013-03-10 17:21:27 -07:00
John Benediktsson ac95c024f3 compiler.cfg.loop-detection: more use of hash-sets. 2013-03-10 10:06:48 -07:00
John Benediktsson c7c951f207 compiler.cfg.ssa.construction: more use of hash-sets. 2013-03-10 10:03:11 -07:00
John Benediktsson 262a46a3f4 compiler.cfg.loop-detection: more use of hash-sets. 2013-03-08 12:38:50 -08:00
John Benediktsson 9d43e21563 compiler.cfg.write-barrier: more use of hash-sets. 2013-03-08 12:30:37 -08:00
John Benediktsson 88626d38ca compiler.cfg.ssa.construction: more use of hash-sets. 2013-03-08 12:24:06 -08:00
John Benediktsson b97a1a0753 compiler: fix stack effects to indicate visited is same object. 2013-03-08 12:16:02 -08:00
John Benediktsson bf35114fec compiler: use hash-sets to track visited sets. 2013-03-08 11:04:47 -08:00
John Benediktsson 5908186301 compiler.cfg.alias-analysis: use clear-set. 2013-03-07 21:35:00 -08:00
Doug Coleman 63e55ac813 compiler.cfg.liveness: Break the infinite loop--add the base-pointer as f to start with, and replace it with the real one if there's not a circular chain. Fixes #22 again. 2013-01-01 14:47:54 -08:00
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
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 b6c069f99a compiler.cfg.representations.selection: removing 10^ in favor of 10^. 2012-09-05 09:25:26 -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 4e72d80256 Using "same?" in more places. 2012-07-21 10:22:44 -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 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
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
Joe Groff 248066c710 code beautification 2011-11-13 16:10:26 -08:00
Joe Groff 873208f986 compiler: more peephole tests for shl/sar 2011-11-13 16:10:24 -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
Doug Coleman 6cca0ea468 compiler.cfg: Rename <##foo> to ##foo, in the low-level IR 2011-11-11 19:48:38 -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 c731dc6edb Rename lookup to lookup-word. 2011-11-06 16:00:00 -08: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
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
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 378786599d Cleanup lint warnings. 2011-10-14 11:47:24 -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 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 06218d5d12 compiler.cfg.builder.alien: fix compilation of callbacks which unconditionally throw errors 2011-10-02 19:52:12 -07:00
Doug Coleman 671f19d70f Remove all non-core uses of (scan-token)
Add scan-datum
Add scan-number
Document more words
Fixes #225.
2011-10-02 12:00:08 -07:00
Doug Coleman 76580da5d5 Refactor the lexer/parser to expose friendlier words for scanning tokens. The preferred top-level words now throw an exception on EOF.
CREATE -> scan-new
CREATE-CLASS -> scan-new-class
CREATE-WORD -> scan-new-word
CREATE-GENERIC -> scan-new-generic
scan -> (scan-token)
scan-token now throws on eof
(scan-word) returns word/number/f
scan-word now throws on eof
scan-word-name expects a non-number
Fixes #183.
Fixes #209.
2011-09-29 11:28:28 -07:00
Doug Coleman 3826febfae Fixes the symptom but not the problem. See bug #201. 2011-09-26 17:32:34 -07:00
Joe Groff 2bd6de9a02 slots: pre-create the "at", "nth", and "global" slots to make deterministic the currently nondeterministic ambiguity between accessors:change-* and assocs:change-at, sequences:change-nth, and namespaces:change-global 2011-09-19 10:03:43 -07:00
Joe Groff d6668caf7d compiler.cfg.builder.alien: fix caller-linkage to return the DLL and not the library tuple again; fixes issue #121 2011-09-13 15:10:48 -07:00
Joe Groff 5703e8d7a1 alien.libraries, compiler.cfg.builder.alien: if `dlopen` fails during `<library>`, call `dlerror` and store the error message in the library object; put the dlerror message in the linkage-error when a word from the library is compiled 2011-09-12 23:25:59 -07:00
Joe Groff b6e0f0180b alien.libraries, compiler.cfg.builder.alien: include the result of dlerror/GetLastError in the linkage-error for missing symbols 2011-09-12 23:25:59 -07:00
Slava Pestov edddffdadd compiler.cfg.dependence: Add ##allot to control dependency chain, so that we don't re-order an allocation and initialization with an alien call. The alien call might GC, exposing uninitialized memory to the GC. Fixes #53, fixes #58, fixes #20. 2011-08-28 21:25:39 -07:00
Slava Pestov 34f71ea042 compiler.cfg.debugger: add random-scheduling word.
Run 'random-scheduling "compiler" test' to find bugs in compiler.cfg.dependencies.
2011-08-28 21:25:37 -07:00
Slava Pestov 3ed1910ab1 compiler.cfg.scheduling: remove old scheduling test code, adding a better way of testing scheduling 2011-08-28 21:25:35 -07:00
Erik Charlebois 64252dbdbc 32 and 64 bit Linux PPC support 2011-05-23 23:36:14 -04:00
Slava Pestov 5a3c5c7749 compiler.cfg.branch-splitting was totally broken 2011-02-27 16:43:26 -08:00
Slava Pestov 6f7e4e32d0 compiler.cfg.ssa.construction: update unit tests for nths change 2011-02-25 21:05:38 -08:00
Slava Pestov b052aa61cb compiler.cfg.linear-scan: extend lifetime intervals of base pointers correctly (reported by Anton Gorenko) 2010-09-30 20:49:03 -07:00
Slava Pestov 6b5fffc026 compiler: preliminary implementation of tracking derived pointers in GC maps 2010-09-27 20:12:44 -07:00
Slava Pestov 53aed0805a compiler.cfg.alias-analysis: fix bug in lazy alias class instantiation 2010-09-27 20:12:43 -07:00
Slava Pestov 546b81b697 compiler.cfg.scheduling: always run scheduling because heuristic was broken 2010-09-25 16:31:42 -07:00
Slava Pestov 80d7aab40b compiler.cfg.alias-analysis: don't need to do a local live-in calculation anymore 2010-09-25 16:13:17 -07:00
Slava Pestov ec2f42fd40 compiler.cfg.liveness: merge in compiler.cfg.liveness.ssa and simplify the code, since we don't compute live sets before SSA construction anymore 2010-09-25 14:36:58 -07:00
Slava Pestov 8bc2ea7a5c compiler.cfg.ssa.construction: use the baller method for pruned SSA 2010-09-20 21:36:22 -07:00
Slava Pestov a67c7c5739 compiler.cfg.write-barrier: fix soundness issue with ##copy that never came up but probably should've been fixed anyway 2010-09-06 17:01:44 -07:00
Slava Pestov a605d5c9c9 compiler.cfg.alias-analysis: dead store elimination was too aggressive, can't eliminate dead stores across a GC call even for fresh allocations because GC will see uninitialized data 2010-09-06 16:57:56 -07:00
Slava Pestov add75411a0 compiler.cfg.write-barrier: handle ##copy instructions 2010-09-05 23:07:30 -07:00
Slava Pestov 54f97557e6 compiler.cfg.dependence: compute dependency graph for write barrier instructions 2010-09-05 22:51:17 -07:00
Slava Pestov c677c35de4 compiler.cfg: fix major facepalm with write barrier elimination 2010-09-05 21:39:45 -07:00
Slava Pestov 1985705413 compiler: now that FFI has been deconcatenatized, we no longer need the special ##unary-float-function and ##binary-float-function fastpaths 2010-08-13 23:59:19 -07:00
Slava Pestov b5fc39c198 compiler.cfg: Reading the return value of a float-returning function on x86-32 had a side effect of popping the x87 stack, so it was not correct for DCE to just eliminate this if the return value was not used. Fix this by adding a new dead-outputs slot to alien-call-insns and having DCE move dead returns there 2010-08-13 23:19:56 -07:00
Slava Pestov 42b858b3f0 math.libm: fix regression: fsqrt intrinsic was not working ever since change was made to inline FUNCTION: bodies 2010-08-12 21:41:57 -07:00
Slava Pestov 94f6ac98de compiler.cfg.linear-scan: fix bad interaction between inactive intervals and sync points 2010-07-29 21:06:48 -04:00
Slava Pestov 168dd1f825 FFI rewrite part 7: compile callback bodies with the optimizing compiler 2010-07-28 00:49:26 -04:00
Slava Pestov 5fc9aa05b0 Revert "compiler.cfg: change linear ordering to place GC call blocks at the end"
This reverts commit 544a288192.
2010-07-27 23:58:41 -04:00
Slava Pestov 8adde5360a compiler.cfg: change linear ordering to place GC call blocks at the end 2010-07-27 13:00:28 -04:00
Slava Pestov 355d89e8e8 compiler.cfg: now that kill-blocks cannot contain instructions that define vregs we can skip them all 2010-07-27 12:40:31 -04:00
Slava Pestov b6fe62299e compiler.cfg.alias-analysis: factor-call-insns which defined values were not handled properly 2010-07-19 19:56:00 -04:00
Slava Pestov b23aac1beb compiler.cfg: open-code parameter boxing and unboxing for certain C types 2010-07-19 10:25:13 -04:00
Slava Pestov 8e46305288 compiler.cfg.save-contexts: don't insert ##save-context in front of ##phi 2010-07-19 09:27:10 -04:00
Slava Pestov adc9db3ea8 compiler.cfg.linear-scan.allocation: fix wrong order 2010-07-19 06:46:50 -04:00
Slava Pestov b776a92546 compiler.cfg.linear-scan: fix bad interaction between split position calculation and register-clobbering instructions 2010-07-18 17:38:52 -04:00
Slava Pestov e3edb2653d compiler.cfg.intrinsics.allot: clean up 2010-07-16 20:04:03 -04:00
Slava Pestov e5dd21b0b9 compiler.cfg: nuke ##allot-byte-array instruction 2010-07-16 19:57:45 -04:00
Slava Pestov 60ddbd9d9b compiler.cfg.scheduling: ##dispatch must go at the end since its a control flow transfer 2010-07-15 20:55:31 -04:00
Slava Pestov 0fd636b4b9 compiler.cfg: ##unbox-long-long can have multiple outputs now, clean up long long parameter passing code using this 2010-07-15 19:49:29 -04:00
Slava Pestov 48e96ef032 compiler.cfg.scheduling: update to support multiple-output instructions 2010-07-15 17:38:34 -04:00
Slava Pestov e27adb2830 compiler: re-architect low-level optimizer to allow more than one output value per instruction 2010-07-13 07:40:14 -04:00
Slava Pestov a55c8ee671 FFI rewrite part 6: deconcatenatize 2010-07-02 15:44:12 -04:00
Slava Pestov 7e24994db5 Whitespace fix 2010-06-23 03:56:17 -04:00
Slava Pestov 68cd067f31 compiler.cfg.builder: if there is a conditional where every branch is known to throw an error, don't process any of the (unreachable) code after the conditional, since this can confuse analysis (reported by Daniel Ehrenberg) 2010-06-23 03:33:15 -04:00
Slava Pestov 167aff1b57 compiler.cfg.height: clean it up a bit 2010-06-22 04:14:03 -04:00
Slava Pestov 5d6816d364 compiler.cfg.ssa: fixing test failures 2010-06-15 17:18:51 -04:00
Slava Pestov e86f434f26 Add GC maps to ##box, ##box-long-long, ##alien-invoke, ##alien-indirect and ##call-gc; remove ##gc-map instruction 2010-06-14 19:39:46 -04:00
Slava Pestov 806e54630a GC maps for more compact inline GC checks 2010-06-11 20:06:00 -04:00
Joe Groff 7fe04fa8ee compiler.cfg.intrinsics.simd: intrinsic support for double-2>float-4 conversion 2010-06-01 00:34:50 -07:00
Slava Pestov ba7cb61133 Stack allocation improvements
- New with-out-parameters combinator
- Inhibit tail call optimization in frames with local allocation, to ensure that passing a stack allocated value to the last word in the quotation works
- local allocations are now aligned properly
- spill slots are now aligned properly aligned in frames which have parameter and local allocation areas
2010-05-22 02:37:00 -04:00
Slava Pestov 9e59192c73 compiler.cfg.builder.alien: use ##local-allot to fix value struct passing on Win64 2010-05-19 01:53:32 -04:00
Slava Pestov 91cd3b854d Use ##local-allot to simplify longlong unboxing 2010-05-19 01:07:22 -04:00
Slava Pestov 86358b1dc3 alien.data: add with-scoped-allocation combinator for stack-allocating C data 2010-05-19 00:33:36 -04:00
Slava Pestov 77516c6932 compiler.cfg: generalize ##prepare-struct-caller instruction to alloca()-like ##local-allot 2010-05-19 00:33:15 -04:00
Slava Pestov ea726f5680 Move remaining sequence operations from generalizations to sequences.generalizations where they belong 2010-05-18 18:36:47 -04:00
Slava Pestov be733cd797 compiler.cfg.value-numbering: constant folding for ##shuffle-vector 2010-05-18 04:22:21 -04:00
Slava Pestov 53a51957df compiler.cfg.value-numbering: add constant folding for ##gather-vector instructions, and fix ##scalar>vector constant folding for integers 2010-05-18 03:56:07 -04:00
Slava Pestov 6eaf2d7534 cpu.x86: add x87 codegen for Model T enthusiasts 2010-05-17 11:35:47 -04:00
Slava Pestov 41d929a201 compiler.cfg.ssa.interference: implement linear-time interference test 2010-05-17 05:50:13 -04:00
Slava Pestov 6b7260a4a7 compiler.cfg.ssa.interference.live-ranges: compute correct live ranges for ##phi instructions 2010-05-17 05:50:13 -04:00
Slava Pestov 0955f2c7eb compiler.cfg.linear-scan: fix typo 2010-05-17 05:50:13 -04:00
Slava Pestov 7ff309d50e cpu.x86: get rid of this extra-stack-space nonsense 2010-05-17 02:14:44 -04:00
Slava Pestov 3f8e13bf66 compiler.cfg: refactor stack frame code and fix frame pointer usage in callbacks 2010-05-16 21:04:40 -04:00
Slava Pestov a7b5957f6d compiler: hack to make XCreateIC() work on x86-64 2010-05-16 04:49:53 -04:00
Slava Pestov 8ebecac4d2 Merge branch 'master' of git://factorcode.org/git/factor 2010-05-16 04:10:03 -04:00
Slava Pestov e6abc0be15 Fixes for FFI changes 2010-05-16 04:09:47 -04:00
Joe Groff 67ea40ade3 compiler.cfg.intrinsics.simd: use ^^select-vector for simd constant nth when available 2010-05-16 00:50:20 -07:00
Joe Groff 645164188d compiler.cfg.instructions: ##select-vector instruction mapping to SSE4 PEXTR* 2010-05-16 00:50:19 -07:00
Slava Pestov 5b48cd2a63 FFI rewrite part 5: return value boxing and callback parameter boxing now uses vregs; simplify return value unboxing 2010-05-16 03:43:23 -04:00
Joe Groff 0c27f30475 compiler.cfg.intrinsics.simd: use new ##gather-int-vector insns to construct int vectors when available 2010-05-15 23:59:27 -07:00
Joe Groff 8c878ada17 compiler.cfg.instructions: ##gather-int-vector-2/4 instructions that map to SSE4 PINSR/PEXTR 2010-05-15 23:48:22 -07:00
Joe Groff 5d35917061 compiler.cfg.intrinsics: intrinsic for fixnum-bit-count 2010-05-15 13:59:47 -07:00
Joe Groff 7fec53b509 compiler.cfg.instructions: ##bit-count insn 2010-05-15 13:57:35 -07:00
Slava Pestov 5c0c87fcaa compiler.cfg.value-numbering.comparisons: ##test-imm rewrite rule must check that the immediate fits 2010-05-15 03:19:24 -04:00
Slava Pestov 5ecd2b61c7 compiler.cfg: more silly optimizations 2010-05-14 18:37:09 -04:00
Slava Pestov 1a61c50896 compiler.cfg.instructions: change vreg-insn from a mixin into a superclass 2010-05-14 18:37:09 -04:00
Slava Pestov 6d30bb8bf4 compiler.cfg.linear-scan: pointless optimizations 2010-05-14 18:37:08 -04:00
Slava Pestov 291543c300 compiler.cfg.ssa.live-ranges: clean up 2010-05-14 18:37:08 -04:00
Slava Pestov d1e422c981 compiler.cfg.alias-analysis: simplify and speed up 2010-05-14 18:37:07 -04:00
Slava Pestov 5a67711bfd compiler.cfg: use x86 TEST instruction to optimize 'bitand 0 =' 2010-05-14 18:37:06 -04:00
Joe Groff 465a1673eb compiler.cfg.intrinsics.simd: mod shuffle indices for shuffle-2-vectors-imm intrinsic so they wrap like a real instruction would 2010-05-14 01:20:05 -07:00
Joe Groff 9f9e145819 math.vectors.simd.intrinsics: (simd-vshuffle2-elements) intrinsic that creates a vector by selecting elements from two input vectors. use ##shuffle-vector-halves-imm to implement for double-2s with SSE 2010-05-14 01:16:29 -07:00
Joe Groff 3766abd65e compiler.cfg.instructions: ##shuffle-vector-halves-imm insn to map to SSE's two-input SHUFPS/SHUFPD 2010-05-14 00:20:21 -07:00
Slava Pestov bb87d124c1 compiler: small fixes and cleanups 2010-05-13 02:48:20 -04:00
Slava Pestov db2db6a1a6 compiler.cfg.builder.alien: fix for x86-32 2010-05-12 18:07:11 -04:00
Slava Pestov 42b0d456cd Refactor x86-32 stack cleanup logic 2010-05-12 02:09:11 -04:00
Slava Pestov f89b85db7b Temporary fixes for x86-32 until FFI boxing is rewritten 2010-05-12 01:41:49 -04:00
Slava Pestov 0cde5c8fb5 Eliminate compiler.alien 2010-05-11 23:24:47 -04:00