Slava Pestov
530accdad9
io.mmap: fix obsolete tests and get code to inline better
2009-09-28 03:18:27 -05:00
Slava Pestov
7ea8832556
Tweaks to reduce deployed image size
2009-09-24 06:24:43 -05:00
Daniel Ehrenberg
45ba559ce4
Merge branch 'master' of git://factorcode.org/git/factor into constraints
2009-09-22 16:09:33 -05:00
Daniel Ehrenberg
6e936bdb05
Fixing failing unit tests in compiler.tree.propagation due to constraints
2009-09-22 16:01:14 -05:00
Joe Groff
01d2ef415a
get compiler tests loading
2009-09-16 09:20:47 -05:00
Slava Pestov
172219e931
compiler.tree.propagation: fix unary-op type functions with complex number inputs
2009-09-15 14:30:20 -07:00
Slava Pestov
32b95c2cdf
math: add unordered comparison operators u< u<= u> u>= which behave exactly like < <= > >= except no floating point exceptions are set if one or both inputs are NaNs; also add efficient intrinsic for unordered? predicate, and fix propagation type functions for abs, absq, and bitnot
2009-09-12 22:20:13 -05:00
Slava Pestov
dd661edf46
compiler.tree.propagation: convert /i of a positive integer by a power of two into a shift
2009-09-11 21:03:11 -05:00
Slava Pestov
7f2e2b1777
Specialized array overhaul
...
- Replace hand-written specialized-arrays.* subvocabularies with new system; instead of USE:ing specialized-arrays.T, do SPECIALIZED-ARRAY: T
- Ditto for specialized-vectors; use SPECIALIZED-VECTOR:
- io.mmap.functor: removed entirely, use <mapped-array> instead
- struct-arrays and struct-vectors have been removed because specialized arrays and vectors subsume them entirely
2009-09-09 22:33:34 -05:00
Slava Pestov
bbca00e2ae
Fix conflicts
2009-09-07 23:51:25 -05:00
Slava Pestov
9f9b6bca01
compiler.tree.propagation: type check inputs to unsafe foldable words manually, so that stuff like [ "Hi" { } fixnum+fast ] doesn't crash in the compiler
2009-09-07 23:40:23 -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
ae051e0c9a
compiler.tree.propagation: type function for clone had an issue, sometimes clone would get optimized out because of incorrect constant folding
2009-09-03 02:40:18 -05:00
Slava Pestov
ba0f3a9911
compiler.tree.propagation.transforms: don't fail to compile if 'at' called on something that's not an assoc
2009-08-27 18:57:56 -05:00
Slava Pestov
f01f7ad6eb
compiler.tree.propagation: bitand custom inlining was wrong if the second input was a bignum
2009-08-20 03:47:07 -05:00
Slava Pestov
2dc99ea05f
Fix interval inference of abs, absq when input is a complex number
2009-08-19 16:06:37 -05:00
Slava Pestov
829107902e
compiler.tree.propagation: improved interval inference for absq eliminates a conditional from math.vectors:distance. Type inference for rational math also a bit sharper now
2009-08-19 02:33:41 -05:00
Slava Pestov
3047d4a451
compiler.tree.propagation: remove method inlining heuristic
2009-08-17 22:29:05 -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
7e35723db0
compiler.tree.propagation: be more careful with intervals, ensuring that the inferred interval of a value is a subset of the value class's interval. This improves accuracy, for example [ >fixnum 1 + >fixnum most-positive-fixnum <= ] constant-folds to true
2009-08-10 01:16:49 -05:00
Slava Pestov
e400d80d8b
More accurate interval inference for mod, rem, and propagation can now infer intervals in the case where a value might be f. so, [ [ 127 bitand ] [ drop f ] if dup [ 0 >= ] [ not ] if ] now constant-folds down to 't'!
2009-08-08 23:03:45 -05:00
Slava Pestov
61ea749bb6
More accurate interval-mod and interval-rem
2009-08-08 22:01:12 -05:00
Slava Pestov
3fb4fc1bde
Improve code generation for shift word: add intrinsics for fixnum-shift-fast in the case where the shift count is not constant, transform 1 swap shift into a more overflow check with open-coded fast case, transform bitand into fixnum-bitand in more cases
2009-07-16 23:50:48 -05:00
Daniel Ehrenberg
ee3e84a1f8
define-partial-eval framework in propagation pass makes it easy to add transforms; moving some transforms from stack checker to propagation, making them stronger
2009-07-16 00:34:50 -05:00
Daniel Ehrenberg
bb06facb01
new is inlined in the propagation pass when the class is known
2009-07-14 14:16:39 -05:00
Slava Pestov
e0d84eb3a2
compiler.tree.propagation: better length propagation
2009-07-09 02:28:30 -05:00
Doug Coleman
a54c78007b
add a clamp word to math.order, use clamp word throughout libraries
2009-05-24 21:35:50 -05:00
Slava Pestov
466533d509
Fix overly-eager strength reduction for mod, and add a type function for >integer (reported by Joe Groff)
2009-05-07 12:32:06 -05:00
Slava Pestov
f2ec59d658
Fix infinite loop when compiling a word containing a tuple literal with circular structure in it. This was triggered by call( inline caching in core-foundation.fsevents on Mac OS X
2009-05-01 09:36:53 -05:00
Slava Pestov
fc4894fbdf
Replace ratio and complex built-in types with tuples defined in the library. This frees up two lo-tags, so move array and quotation over to these tags and update compiler for new tags
2009-04-30 00:27:35 -05:00
Slava Pestov
05f3f9dcb9
Fixing unit tests for stack effect inference changes
2009-04-20 21:15:19 -05:00
Doug Coleman
dba4c0d589
fixing compiler errors in basis
2009-04-17 12:46:04 -05:00
Slava Pestov
4fdb5d0557
Fix infinite fixed point iteration bug found by littledan; generalize-counter-interval wasn't called in all the right places
2009-03-12 17:30:24 -05:00
Samuel Tardieu
da2ebe21a6
Fix two overzealous [ ] removal in tests
2009-02-18 03:06:14 +01:00
Samuel Tardieu
087d931c36
Remove the tail argument from do/until/while
2009-02-18 02:41:14 +01:00
Slava Pestov
34792a9f23
Remove >r/r>
2008-12-17 19:17:37 -06:00
Slava Pestov
c5160d76e9
Merge qualified, alias, symbols, constants into core
2008-12-17 18:10:01 -06:00
Slava Pestov
60a1378a0a
Faster dynamic variable lookup: 6% speedup in benchmark.fib5
...
- If type of first input of equal? is known but not second, rewrite it as swap equal? and try to inline again
- Fix hints on methods to work better
- Put hints for word and fixnum keys on at* and set-at on hashtables
2008-12-17 14:57:24 -06:00
Slava Pestov
e4f8448eb1
Fix some problems with arithmetic type inference, exposed by recent changes to log2 word
...
- declared input type for bignum-shift was stricter than the runtime behavior, leading to bad propagation of type info if shift count was a bignum
- types inferred for type functions which used number-valued/integer-valued/real-valued were not always precise, eg bignum bignum bitxor => integer
- add interval-log2, type function for (log2)
- remove math-class-min, it was useless
2008-12-07 19:44:49 -06:00
Slava Pestov
145b635eb6
More optimization intended to reduce compile time. Another 10% speedup on compiling empty PEG parser
...
- new map-flat combinator replaces usages of 'map flatten' in compiler
- compiler.tree.def-use.simplified uses an explicit accumulator instead of flatten
- compiler.tree.tuple-unboxing uses an explicit accumulator instead of flatten
- fix inlining regression from last time: custom inlining results would sometimes be discarded
- compiler.tree's 3each and 3map combinators rewritten to not use flip
- rewrite math.partial-dispatch without locals (purely stylistic, no performance increase)
- hand-optimize flip for common arrays-of-arrays case
- don't run escape analysis and tuple unboxing if there are no allocations in the IR
2008-12-06 11:17:19 -06:00
Slava Pestov
e5ed7447ed
Removing more >r/r> usages
2008-12-03 08:46:16 -06:00
Slava Pestov
402da00390
Fixing bootstrap with specialized arrays
2008-12-02 02:44:19 -06:00
Slava Pestov
e8a69a3aea
Fix conflict
2008-11-29 05:14:49 -06:00
Slava Pestov
86d45262dc
Add toutput ype propagation for #alien-invoke and #alien-indirect nodes
2008-11-29 03:47:38 -06:00
Slava Pestov
2fe364a7bb
Specialized arrays work in progress
2008-11-14 20:18:16 -06:00
Slava Pestov
5f4b247072
Propagation pass now uses a stack of hashtables for predicated constraints instead of cloning a hashtable. New strategy for recursive propagation; now converges with fewer iterations. ~15 sec bootstrap time improvement
2008-11-11 08:49:00 -06:00
Slava Pestov
cc879fa9b7
Tuple layouts are now arrays, instead of built-in types. The superclass
...
array is now part of the tuple layout object itself, and class hashcodes
are stored alongside class words there. This removes 2 indirections when
reading a superclass, and 3 when reading a superclass hashcode.
2008-11-05 22:20:29 -06:00
Slava Pestov
f539406ee1
Fold class predicates applied to literals
2008-10-02 05:12:38 -05:00
Slava Pestov
01129fb9bd
Add unit test for locals performance regresion
2008-09-13 03:09:16 -05:00
Slava Pestov
10c68ebb21
New modular arithmetic optimization pass
2008-09-12 18:08:38 -05:00