Commit Graph

58 Commits (d65bd97a5433d9e0fb44e8913f68bbb7de1819cc)

Author SHA1 Message Date
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
John Benediktsson 378786599d Cleanup lint warnings. 2011-10-14 11:47:24 -07:00
Slava Pestov ae2c2909af Revert guarded method inlining
This reverts commit 44a835e3fc, reversing
changes made to d45926bda0.
2010-06-24 12:35:21 -04:00
Daniel Ehrenberg fbaa8d153f Inlining no-method when a generic word has no method 2010-05-14 20:28:09 -05:00
Daniel Ehrenberg 05290ee1b1 Merge branch 'master' of git://factorcode.org/git/factor into propagation
Conflicts:

	basis/compiler/tree/propagation/propagation-tests.factor
2010-05-14 18:59:39 -05:00
Slava Pestov 627295f094 Language change: tuple slot setter words with stack effect ( value object -- ) are now named FOO<< instead of (>>FOO) 2010-05-06 17:21:02 -04:00
Daniel Ehrenberg 4d5b7fe883 Fixing bug in dependency tracking for guarded method inlining 2010-05-04 16:47:00 -05:00
Daniel Ehrenberg 0d055060ad Bug fix in method inlining 2010-05-04 16:46:39 -05:00
Daniel Ehrenberg 0f0b56f1ef Adding dependency checking and proper handing of dispatch# to the new method inlining 2010-05-04 16:46:38 -05:00
Daniel Ehrenberg f1d7a4e663 Improving method inlining change, but there's still a bug 2010-05-04 16:46:08 -05:00
Daniel Ehrenberg 19a44d65df Changes to compiler.tree.propagation.inlining 2010-05-04 16:46:08 -05:00
Daniel Ehrenberg 3ed4a82475 Fixing another bug in the method inlining improvement 2010-05-04 16:46:08 -05:00
Daniel Ehrenberg 416707f327 Fixing optimization for improved method inlining 2010-05-04 16:46:07 -05:00
Daniel Ehrenberg 02bd3d7142 splitting generic word callsites when only one method is applicable 2010-05-04 16:46:07 -05:00
Slava Pestov 57ba1aff60 compiler.tree.propagation.inlining: remove some unused words 2010-02-11 16:29:48 +13:00
Slava Pestov 0612bc6177 Factor source files should not be executable 2009-11-21 17:50:43 -06:00
Doug Coleman bd13e018dd memq? -> member-eq?, sorted-memq? -> sorted-member-eq? 2009-10-28 15:02:00 -05:00
Slava Pestov 962d039852 Rename specific-method to method-for-class, rename (effective-method) to method-for-object, and make both much faster 2009-09-21 17:42:20 -05:00
Slava Pestov a1ae209f81 compiler.tree.propagation.call-effect: stronger call( inlining; now can inline 'a [ b ] curry call(' where 'a' is literal, [ b ] doesn't infer, but [ a b ] does infer. This simplifies classes.struct:memory>struct 2009-09-07 17:45:03 -05:00
Slava Pestov 3047d4a451 compiler.tree.propagation: remove method inlining heuristic 2009-08-17 22:29:05 -05:00
Doug Coleman 7c92ab1ea5 move if-zero etc to math, remove 1-/1+ from math 2009-08-14 14:27:23 -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 8a9c15ab0b compiler.tree.escape-analysis: if the output of an #introduce node has an immutable tuple class type declaration, and it is not passed to any subroutine calls, or returned from the word, then unbox it. This speeds up vector arithmetic words on specialized arrays, because the specialized array is unboxed up-front, eliminating an indirection on every loop iteration 2009-08-09 16:29:21 -05:00
Slava Pestov e01fc93812 compiler.tree.propagation.call-effect: fix case where quotation inlining could enter an infinite loop: [ dup call( quot -- ) ] dup call( quot -- ) etc 2009-08-01 23:34:14 -05:00
Slava Pestov b67b617746 Fix compiler breakage if a GENERIC# has an incorrect stack effect declaration 2009-05-12 21:23:52 -05:00
Slava Pestov 029d93a838 Make walker work better with call( and breakpoints which are nested inside combinators 2009-05-05 09:12:32 -05:00
Slava Pestov e5cdb7ac2d call( fast-path now supports curry and compose 2009-04-30 21:08:29 -05:00
Slava Pestov 3dc9fdf9db Fleshed out new dispatch code 2009-04-24 20:43:01 -05:00
Slava Pestov 057f75e9a1 Refactor compiler.tree.builder to fix various regressions 2009-04-21 23:02:00 -05:00
Slava Pestov 469c9ee21d Debugging stack checking 2009-04-21 16:09:53 -05:00
Slava Pestov 8414693142 stack-checker: trust word declarations instead of recursively checking them 2009-04-20 18:44:45 -05:00
Slava Pestov ec49307c88 Never inline default methods, and fix inlining of methods with hints 2009-04-20 03:27:18 -05:00
Slava Pestov 0a5b076c11 Make the walker infer 2009-04-16 23:14:11 -05:00
Slava Pestov be4fb1e7d9 Move call( and execute( to core 2009-03-16 20:11:36 -05:00
Slava Pestov 42224eb4e7 Propagation pass: add inlined node counts to total node count, so that the more we inline the less we are eager to inline more 2009-03-06 23:34:01 -06:00
Slava Pestov 03cb32ad9c Make execute( faster, add execute-unsafe( and make effect tuple slots read only 2009-03-01 20:12:35 -06:00
Daniel Ehrenberg b65b88364c Updating lots of things to use call( -- ) 2009-02-08 22:12:11 -06:00
Doug Coleman 3c408342ef renaming: contain? -> any?, deep-contains? -> deep-any?, pad-left -> pad-head, pad-right -> pad-tail, trim-left -> trim-head, trim-right -> trim-tail 2009-01-29 22:19:07 -06:00
Doug Coleman e661c67189 refactor a word to use smart combinators 2009-01-08 23:09:38 -06:00
Slava Pestov a90118da5d Add inc-at word to core, and update some usages of at+ to use it instead 2008-12-09 16:54:48 -06:00
Slava Pestov 640b37cb70 More permissive 2008-12-08 19:14:18 -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 a56d480aa6 Various optimizations leading to a 10% speedup on compiling empty EBNF parser:
- open-code getenv primitive
- inline tuple predicates in finalization
- faster partial dispatch
- faster built-in type predicates
- faster tuple predicates
- faster lo-tag dispatch
- compile V{ } clone and H{ } clone more efficiently
- add fixnum fast-path to =; avoid indirect branch if two fixnums not eq
- faster >alist on hashtables
2008-12-06 09:16:29 -06:00
Slava Pestov 6c7005d588 Tweak inlining heuristic 2008-12-05 01:50:14 -06:00
Slava Pestov fa6a2047f0 New inlining heuristic: number of usages within this word. Speeds up bootstrap by 10% 2008-12-04 07:05:59 -06:00
Slava Pestov d60c79c9bf Expand instance? with literal class 2008-12-03 08:11:51 -06:00
Slava Pestov 1fa819191d Change inlining heuristic so that it behaves the same with dip and >r/r> 2008-11-24 05:46:26 -06:00
Slava Pestov bfd119e3b5 I/O ricing: various hints added so that UTF8 and ASCII fastpaths compile with less dispatch. 25% improvement on reverse-complement 2008-11-06 00:02:44 -06:00
Slava Pestov 06b99c31ee Fix regression. If a parsing word called the compiler, it might compile a caller of a generic before the generic gets built, which would throw an error since the inferred effect of the generic might have less inputs than the combination's dispatch# 2008-11-03 20:59:48 -06:00
Slava Pestov 10c68ebb21 New modular arithmetic optimization pass 2008-09-12 18:08:38 -05:00