Björn Lindqvist
ddc5ece757
alien.*: frontend varargs support! #1677
...
alien-invoke gets an extra parameter indicating if the call uses varargs
or not. In 99.9% of the cases, the parameter should be f, but is t if
varargs are indicated. E.g
: do-printf ( fmt d -- st ) int f "printf" { c-string double } t alien-invoke ;
2016-08-10 21:34:37 +02:00
Björn Lindqvist
2fe26444aa
compiler.cfg.builder.*: docs and tests
2016-05-24 17:22:38 +02:00
Björn Lindqvist
b8e0d5e278
compiler.cfg.builder.*: the when* checks aren't needed
2016-04-30 09:28:30 +02:00
Björn Lindqvist
3e14ceafe2
compiler.*: more compiler tests
2016-04-22 12:44:25 +02:00
Björn Lindqvist
b27634bff7
compiler.cfg.builder.blocks: removes assignments to basic-block variable
...
Now it isn't used at all in the cfg creation step.
2016-03-09 23:24:43 +01:00
Björn Lindqvist
9df955e199
compiler.cfg.*: big changes which removes the last basic-block uses
...
All intrinsic code generating words signatures are changed from ( node
-- ) to ( block node -- block' ) so the current block is now always
passed on the stack.
2016-03-09 23:24:42 +01:00
Björn Lindqvist
f9c6d7cc43
compiler.cfg.*: changes to remove basic-block variable
...
The emit-node generics signature is changed to ( block node -- block' )
so that it always returns the next block to operate on. Signature for a
lot of related words are changed similarily. Now there is only a few
basic-block usages left.
2016-03-09 23:24:42 +01:00
Björn Lindqvist
07adc2ecae
compiler.cfg.*: changed generic emit-node to take the current block as
...
stack parameter
The idea is to eventually completely remove the basic-block dynamic
variable from cfg construction.
2016-03-09 23:24:42 +01:00
Björn Lindqvist
1421779c9e
compiler.cfg.*: refactors words to take a block parameter instead of
...
using the basic-block dynamic variable
the idea is to make the code easier to follow by limiting the use of
dynamic variables
2015-11-22 00:37:34 +01:00
Björn Lindqvist
4db173cadb
compiler.*: random doc and tests updates
2015-09-22 08:52:59 +02:00
Doug Coleman
ce046b77c8
compiler: rename D to D: because it wants a token. Same for R -> R:
2015-08-13 15:23:10 -07:00
Doug Coleman
892c62e1dc
factor: second stab at [ ] [ ] unit-test -> { } [ ] unit-test
2015-07-03 09:39:59 -07:00
Doug Coleman
59f3b1ea57
Revert "factor: rename [ ] [ ] unit-test -> { } [ ] unit-test using a refactoring tool!"
...
Needs a bit more work.
This reverts commit 7e54cc2824
.
2015-07-02 13:47:06 -07:00
Doug Coleman
7e54cc2824
factor: rename [ ] [ ] unit-test -> { } [ ] unit-test using a refactoring tool!
2015-07-02 11:36:08 -07:00
Björn Lindqvist
655faadec9
compiler.*: now when we're tracking uninitialized locations instead of
...
initialized ones, the height slot isn't needed on ##call anymore
2015-05-17 07:59:34 +02:00
Björn Lindqvist
8df92abeb9
compiler.*,cpu.*: add a height slot to ##call nodes, then other compiler
...
passes can much easier to accurate liveness analysis on stack locations
2015-05-09 20:04:22 -07:00
Björn Lindqvist
8f02cad9c5
compiler.cfg.*: a bunch of new tests
2015-05-09 20:04:22 -07:00
Björn Lindqvist
f9812d9874
compiler.cfg.stacks.*: possible fix for #1289
...
instead of delaying outputting ##replace instructions to when they are
needed, output them directly in the block so that "holes" in the
stacks are avoided.
2015-04-29 09:31:56 -07:00
Björn Lindqvist
177a356240
compiler.cfg.stacks.local: refactorings on the vocab to try and make it using less dynamic variables
2015-04-29 09:31:56 -07:00
Björn Lindqvist
b983053130
compiler.cfg.*: putting test-init in compiler.cfg.stacks.tests didn't work, put new word cfg-unit-test in compiler.test
2015-04-29 09:31:55 -07:00
Björn Lindqvist
4390561a6e
compiler.cfg.*: new word reset-vreg-counter, useful for making test writing more convenient
2015-04-29 09:31:55 -07:00
Björn Lindqvist
2536943e82
compiler.cfg.*: new word connect-Nto1-bbs
...
using that word predecessors is already up-to-date so calling needs-predecessors isn't needed
2015-04-29 09:31:55 -07:00
Björn Lindqvist
8a7699e42c
compiler.cfg.*: refactoring to remove the initial-basic-block word
2015-04-29 09:31:55 -07:00
Björn Lindqvist
cc1903bec1
compiler.cfg.*: some refactoring in the stack tracking for #shuffle nodes
...
instead of having separate words for the stacks like inc-d/r and ds/rs-store use generic words that work on either stack
2015-04-29 09:31:55 -07:00
Björn Lindqvist
ba4736ff75
compiler.cfg.stacks.local: change current-height to a two-tuple { { d emit-d } { r emit-r } } it makes the code a bit simpler
2015-04-29 09:31:54 -07:00
Björn Lindqvist
79d294e4bf
compiler.cfg.*: docs and more tests
2014-12-31 03:37:16 +01:00
John Benediktsson
068ddd6c7b
compiler: cleanup cfg passes to have stack effect ( cfg -- )
2014-12-11 12:48:43 -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
Slava Pestov
5a3c5c7749
compiler.cfg.branch-splitting was totally broken
2011-02-27 16:43:26 -08: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
f5c5d8b44c
compiler: remove flat machine representation and generate code directly from the CFG
2010-05-03 17:34:32 -04:00
Slava Pestov
df86d1341f
compiler.cfg: clean up ##phi literals in tests
2010-05-03 17:34:24 -04:00
Slava Pestov
9b34a4a054
compiler.cfg: remove unused 'reps' slot from compiler.cfg, and re-organize things in preparation for SSA register allocation
2010-05-03 17:34:18 -04:00
Slava Pestov
732f57f31d
compiler.cfg.builder: fix unit tests
2010-05-03 17:34:08 -04:00
Slava Pestov
913b95192e
compiler.cfg: merge all alien accessors into ##load-memory-imm and ##store-memory-imm
2010-05-03 17:34:06 -04:00
Joe Groff
65c3259761
"cdecl" -> cdecl
2010-03-31 19:20:35 -07:00
Slava Pestov
e4ad642134
vm: 4 bit tags, new representation of alien objects makes unbox-any-c-ptr more efficient (work in progress)
2009-11-02 04:25:54 -06:00
Doug Coleman
1d12a6707d
sigma -> map-sum
2009-10-29 14:34:04 -05:00
Joe Groff
c3b8847936
update a bunch of alien-callbacks and alien-indirects to use c-type words
2009-10-21 21:10:11 -05:00
Joe Groff
7fac3682a6
update some naked alien-invokes to use c-type words
2009-10-21 18:44:00 -05:00
Slava Pestov
c3d81cefe9
compiler.cfg: don't unbox the same value more than once per basic block
2009-10-01 19:41:23 -05:00
Slava Pestov
c0abb9ce95
hints: fix regression with declarations
2009-09-25 18:50:08 -05:00
Slava Pestov
a2de9d9e54
compiler.cfg.builder: don't run certain tests if float intrinsics are not available
2009-09-13 23:12:47 -05:00
Slava Pestov
e36a0d7ef4
compiler: clean up code generation for alien boxing/unboxing a bit
2009-09-03 21:22:43 -05:00
Slava Pestov
d957ae4e44
Performance improvements to make struct-arrays benchmark faster
...
- improved optimization of ##unbox-any-c-ptr on ##box-displaced-alien; convert it to ##unbox-c-ptr where possible using class info stored in the ##bda instruction
- make fcos, fsin, etc inline again; everything in math.libm inline again, except for fsqrt which is an intrinsic
- convert min and max on floats to float-min and float-max
- make min and max not inline, so that the above can work
- struct-arrays: rice a bit so that more fixnums come up
2009-08-28 05:21:16 -05:00
Slava Pestov
81b72cb5c5
Add some unit tests
2009-08-22 17:15:10 -05:00
Slava Pestov
a598cc35a5
compiler: add unit tests for new bugs
2009-08-19 16:56:26 -05:00
Doug Coleman
3f3d57032b
Delete empty unit tests files, remove 1- and 1+, reorder IN: lines in a lot of places, minor refactoring
2009-08-13 19:21:44 -05:00
Slava Pestov
d0c393aa60
compiler.cfg: new system to track when results of analyses need to be recomputed (reverse post order, linear order, predecessors, dominance, loops). Passes can now call needs-predecessors, needs-dominance, needs-loops at the beginning, and cfg-changed, predecessors-changd at the end. Linearization order now takes loop nesting into account, and linear scan now uses linearization order instead of RPO.
2009-08-08 20:02:56 -05:00
Slava Pestov
c5d7ed58a5
Debugging compiler.cfg.coalescing
2009-07-27 19:24:13 -05:00