Commit Graph

482 Commits (8c223d40736c3150771cc8b0bda59d4aa873d628)

Author SHA1 Message Date
Joe Groff 4cd6ad840d add tests from old row-polymorphism implementation to stack-checker unit tests 2010-03-07 19:13:41 -08:00
Joe Groff 1512ed12f3 further improve error message for invalid quotation inputs using a table display with the actual quotation effects determined so far 2010-03-07 18:40:58 -08:00
Joe Groff ea4545e366 improve error message for invalid quotation inputs by referencing each declared-effect to its other references 2010-03-07 18:27:55 -08:00
Joe Groff 011a39457e clear away some rebar 2010-03-07 18:11:44 -08:00
Joe Groff 6b9a79159d tweak declared-effect to wrap the existing known instead of introducing a new value, so we don't confuse the compiler 2010-03-07 18:07:42 -08:00
Joe Groff b14d59030f add stack variable unification to M\ declared-effect infer-call* 2010-03-07 17:51:41 -08:00
Joe Groff bbbda64ee7 add a with-effect-here combinator that determines the effect of a scoped subset of the stack checker 2010-03-07 16:54:25 -08:00
Joe Groff 63ad397cc1 tweak recursive call site checking to consider declared-effects equivalent to their wrapped values 2010-03-07 11:55:47 -08:00
Joe Groff 339cc8f04e row polymorphism new approach: wrap polymorphic quotation inputs in a "declared-effect" value. M\ declared-effect infer-call* will then assert the effect of declared-effect values during the normal course of stack inference 2010-03-07 11:54:57 -08:00
Joe Groff 68dd644233 add unit test to show that polymorphic check breaks inference of inline recursive words 2010-03-06 12:28:09 -08:00
Joe Groff 9571bf6d4b give terminating stack effects a pass in the polymorphic checker 2010-03-05 21:51:38 -08:00
Joe Groff 15e6a7fa5e move error summaries for effect parsing errors to debugger vocab 2010-03-05 21:50:40 -08:00
Joe Groff 26e4bb818a reuse infer-call* for polymorphic inference, which handles curried quotations. tests can pass with real "each" etc. now 2010-03-05 15:20:55 -08:00
Joe Groff c9162c5e31 fix stack error in stack-checker.row-polymorphism 2010-03-05 14:34:50 -08:00
Joe Groff 4892bf1d47 refactor stack-checker slightly to fix circular dependency 2010-03-05 14:27:36 -08:00
Joe Groff a3033e885a make effect variables part of effect syntax, stored out of band in effect tuple 2010-03-05 13:30:10 -08:00
Joe Groff 1b1ccb71a4 make tests pass 2010-03-04 22:43:01 -08:00
Joe Groff 053ba583fc improve error reporting 2010-03-04 21:51:49 -08:00
Joe Groff 31640ea9c6 nested scopes were messing up stack checker state 2010-03-04 20:15:26 -08:00
Joe Groff 23de281186 initial implementation of row-polymorphism check 2010-03-04 19:30:08 -08:00
Daniel Ehrenberg 7074979745 Moving new-sets to sets 2010-02-26 16:01:01 -05:00
Slava Pestov af0ddd5985 Specialized arrays, structs and other objects responding to the >c-ptr / byte-length protocol can now be written to binary streams 2010-02-24 20:18:41 +13:00
Joe Groff 31a0d98e02 Merge branch 'master' into new-alien-pointers
Conflicts:
	basis/alien/c-types/c-types.factor
	basis/stack-checker/dependencies/dependencies.factor
2010-02-22 10:32:59 -08:00
Slava Pestov 23a1f0ed8c alien: some code cleanups and fixes 2010-02-23 01:28:56 +13:00
Slava Pestov eb3f8632dd stack-checker.alien: now that C types are words, the compiler can add dependencies on them when compiling alien words. This triggers the necessary recompilation when C types are redefined 2010-02-22 21:32:41 +13:00
Joe Groff c4cc70b92c stack-checker.dependencies: extend c-type-word method for depends-on-c-type to all words (so it works for non-c-types like void) 2010-02-21 23:13:12 -08:00
Joe Groff 310b3df2ec stack-checker.dependencies: add method for pointers to depends-on-c-type 2010-02-21 22:31:32 -08:00
Slava Pestov 2c34ecbdb5 stack-checker.dependencies: add depends-on-c-type 2010-02-22 19:25:09 +13:00
Slava Pestov c5a62b14e7 stack-checker.dependencies: fix load error 2010-02-20 12:08:14 +13:00
Slava Pestov 6501480a0e Fix two problems with recompilation: predicate constant folding was recording unsatisfied dependencies in some cases, and literal tuple instances of forgotten classes would cause problems for method inlining 2010-02-20 12:01:47 +13:00
Slava Pestov 60296be964 typed: only unbox final classes. Fixes bug reported by littledan 2010-02-18 02:39:12 +13:00
Slava Pestov f01487eb83 A few documentation fixes 2010-02-17 00:05:36 +13:00
Slava Pestov 747974f4ae vm: nuke unused (string>float) primitive 2010-02-08 08:16:56 +13:00
Slava Pestov 26cae00eeb Add code heap introspection primitive to VM, and make a code-blocks word in tools.memory that wraps a useful interface around this. Add a lookup-return-address word and use this in tools.disassembler.utils 2010-02-03 23:11:32 +13:00
Slava Pestov 0b278adb5a Test fixes 2010-02-03 23:11:31 +13:00
Slava Pestov 7de81976a5 Revert "macros: macro body is now defined in its own subword, for compile-time stack effect checking"
This reverts commit 24de7c52f0c3f21cfcdb80235cac7296b0401c85.
2010-02-03 23:11:29 +13:00
Slava Pestov 3259ef4bec vm: modify-code-heap primitive now takes a pair of parameters, update-existing? and reset-pics?. If no generic words were changed, PICs do not need to be reset. If no existing words were redefined, the code heap doesn't have to be traced at all. Speeds up compilation of PEGs since those create lots of compilation units 2010-02-03 23:11:28 +13:00
Slava Pestov b7fde7af27 macros: macro body is now defined in its own subword, for compile-time stack effect checking 2010-02-03 23:11:22 +13:00
Brad Christensen 9b9322ea1e A number of documentation fixes and cleanup. 2010-02-03 00:05:03 -07:00
Slava Pestov 2c63161c84 stack-checker.dependencies: make conditional dependencies more robust 2010-01-31 01:55:35 +13:00
Slava Pestov ea9dbf2ea1 compiler.crossref: more space-efficient storage of dependency information 2010-01-30 09:29:02 +13:00
Slava Pestov fa4f7d8ccf Clean up some code in preparation for a refactoring 2010-01-30 09:29:02 +13:00
Slava Pestov c438e84bd0 compiler.crossref: add next-method dependency 2010-01-30 09:29:01 +13:00
Slava Pestov 6cc68e889e stack-checker.dependencies: add tuple layout dependencies for use by 'new' and 'boa' 2010-01-30 09:29:00 +13:00
Slava Pestov 09ead56652 Re-work flushed dependencies into new compiler cross-referencing framework 2010-01-30 09:29:00 +13:00
Slava Pestov c058343167 Add some utility words to stack-checker.dependencies in preparation for a refactoring 2010-01-30 09:28:59 +13:00
Slava Pestov 26f311279c Re-defining a tuple class now invalidates cached quotation stack effects 2010-01-30 09:28:59 +13:00
Slava Pestov c027046857 New 'conditional dependency' mechanism for more accurate recording of recompilation information 2010-01-30 09:28:57 +13:00
Slava Pestov 817bc02392 compiler.tree.propagation.call-effect: clear out dependency tracking variables to ensure that infer calls made by call( as part of the compile process doesn't pollute the dependencies of the word being compiled 2010-01-30 09:28:57 +13:00
Slava Pestov f031a97084 Work in progress: record constant-folds of predicate words, and call-next-method invocations, in the same way that method inlining are recorded, for greater recompilation accuracy 2010-01-30 09:28:56 +13:00
Doug Coleman bb2f455747 Save images to a temporary file first, then call MOVE_FILE to avoid writing incomplete and truncated images. 2010-01-22 12:59:20 -06:00
Slava Pestov 00328c85e0 vm: remove vm-ptr primitive 2010-01-20 17:06:49 +13:00
Slava Pestov 580cbe75c6 Make stack-checker throw proper errors for primitives that do not have static stack effects 2010-01-20 16:37:58 +13:00
Slava Pestov 5606825e8b vm: remove primitive table, non-optimizing compiler now looks up primitives with dlsym() 2010-01-19 20:00:33 +13:00
Slava Pestov 637a77c018 Stop wearing monocle and use the term "entry point" instead of "XT" throughout VM and compiler; also remove two unused relocation types 2010-01-18 20:54:00 +13:00
Slava Pestov 7f7e1e4e1d Help lint fixes for iota 2010-01-15 17:04:14 +13:00
Slava Pestov 7155447aed stack-checker: add inputs and outputs words, since 'infer (in>>|out>>) length' was coming up a lot 2010-01-15 08:04:14 +13:00
Slava Pestov e4c53f67b0 stack-checker.errors.prettyprint: fix prettyprinting of unbalanced-branches-error 2010-01-15 07:51:36 +13:00
Slava Pestov df4fb4a3ee Removing integers-as-sequences 2010-01-15 07:15:33 +13:00
Slava Pestov 1c10196c43 Rename kernel.private:getenv/setenv to special-object/set-special-object to mirror recent renaming on the VM side 2010-01-13 18:08:18 +13:00
Slava Pestov e8892d9cde stack-checker: fix unit test 2010-01-07 17:40:23 +13:00
Slava Pestov 235f3238f5 Add alien-assembly form for inline assembler, works like alien-invoke except calls a user-supplied quotation instead of generating a subroutine call. Replaces FPU status control, SSE detection and read timestamp routines in vm/cpu-x86.*S 2010-01-07 17:39:22 +13:00
Slava Pestov ba5b90e063 Change how non-volatile register preservation is done in alien callbacks, with the aim of fixing callbacks on PowerPC, and to eventually eliminate assembly code from VM
- Simplify calculation of offset in relocation table
- Open-code %alien-callback
- Remove magic_frame hack from context objects
- Move magical return instruction from optimizing compiler backend into callback entry stub
2010-01-03 01:11:51 +13:00
Slava Pestov 0612bc6177 Factor source files should not be executable 2009-11-21 17:50:43 -06:00
Slava Pestov 1d16152057 stack-checker: fix error message printed when do-primitive is inferred 2009-11-19 19:43:41 -06:00
Doug Coleman 6f7ec206a1 rename millis to system-millis, micros to system-micros, add nano-count 2009-11-18 15:58:48 -06:00
Doug Coleman b4206f5252 initial commit to nanos branch to replace micros 2009-11-18 04:20:05 -06:00
Slava Pestov ea36783fb3 Fix bootstrap 2009-11-13 07:55:47 -06:00
Slava Pestov 2afd7ce244 Faster identity-hashcode primitive; fast path now opencoded by the compiler 2009-11-11 02:27:19 -06:00
Slava Pestov 064c00f78d New identity-hashcode primitive 2009-11-10 21:18:54 -06:00
Slava Pestov aed9dcff53 stack-checker: fix help lint 2009-11-10 19:19:59 -06:00
Slava Pestov 425e9d0dde Fix some test failures 2009-11-10 16:48:06 -06:00
Slava Pestov 473cc7db4a stack-checker: tighten some screws in error reporting 2009-11-09 00:17:24 -06:00
Slava Pestov cd2e226afa stack-checker: split off stack-checker.dependencies from stack-checker.state 2009-11-08 20:34:46 -06:00
Slava Pestov 5d79450d9d Use a more compact representation for "compiled-uses" and "compiled-generic-uses" word-props; reduces image size 2009-11-08 06:08:04 -06:00
Slava Pestov 1d4ec1959d stack-checker.known-words: fix declared output type for dispatch-stats primitive 2009-11-06 04:36:46 -06:00
Slava Pestov ba31abb301 Fix some test failures 2009-11-06 02:35:43 -06:00
Joe Groff 00ce8b6a33 deprimitivize tuck and put it to pasture 2009-11-05 22:47:05 -06:00
Slava Pestov 4061951d1c vm: simpler object space implementation. begin-scan/next-object/end-scan primitives replaced by a single all-instances primitive 2009-11-05 21:49:03 -06:00
Slava Pestov 47df580081 tools.time: overhaul 2009-11-05 01:07:59 -06: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
Slava Pestov 37abac7407 Merge branch 'master' into new_gc 2009-10-30 21:04:37 -05:00
Joe Groff 32450a0575 add missing USING: to stack-checker tests 2009-10-30 20:49:09 -05:00
Slava Pestov 6f9336c29e Merge branch 'master' into new_gc 2009-10-30 03:03:05 -05:00
Joe Groff 2ecf3fb568 fix load errors from bootstrapping 2009-10-28 12:51:03 -05:00
Joe Groff 935c0797c3 update existing code for [let change 2009-10-27 22:05:37 -05:00
Slava Pestov d95a98eb9c vm: add primitives for getting at GC events, data-room and code-room primitives now return structs instead of arrays 2009-10-27 03:32:28 -05:00
Slava Pestov 91cec17e52 vm: get GC events working, -verbosegc switch now produces more info 2009-10-26 23:57:26 -05:00
Slava Pestov cf247c23a2 vm: room. now prints mark stack size, and total/contiguous free space 2009-10-25 13:18:06 -05:00
Joe Groff 372718304c remove the monocle from inference docs and clarify it a bit 2009-10-24 20:57:49 -05:00
Slava Pestov bf5d0de840 peg.ebnf: turn $unchecked-examples into $examples 2009-10-19 03:44:50 -05:00
Slava Pestov 107c96f642 vm: code heap compaction at runtime using compact-gc primitive 2009-10-16 11:39:35 -05:00
Keith Lazuka 405e5d015b docs: change $subsection to $subsections 2009-10-02 12:15:48 -04:00
Slava Pestov ab8c6e9978 Word hashcodes are now computed from the word's name/vocabulary, removing a source of non-determinism 2009-09-27 21:09:11 -05:00
Joe Groff 0354ab60ba Merge branch 'master' of git://factorcode.org/git/factor 2009-09-17 15:31:43 -05:00
Slava Pestov 7f1c33f363 stack-checker.errors: improve documentation a bit 2009-09-17 13:27:15 -07:00
Joe Groff 3b4330fcf6 get things to a point where they bootstrap again 2009-09-15 21:43:18 -05: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 7cf4e608e5 alien: move code for supporting CONSTANT: foo 123 { "int" foo } C types into one place instead of the old scattershot approach 2009-08-27 21:49:25 -05:00
Slava Pestov 030b1b816c Add inline declarations for various assorted methods 2009-08-17 22:32:21 -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
Doug Coleman 379c17a284 Throw typed errors instead of strings for calling/executing non-callables 2009-08-11 22:40:29 -05:00
Slava Pestov 60f4f4c16e combinators.short-circuit: speed up in non-optimized code 2009-07-18 03:33:45 -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
Daniel Ehrenberg 4aa3e2135a Unit tests for inference behavior of call( and execute( 2009-07-14 01:23:21 -05:00
Daniel Ehrenberg 47500fad06 call( and execute( inline known quotations/words in the propagation pass 2009-07-14 01:12:45 -05:00
Daniel Ehrenberg 500c784bd7 Minor reorganization of stack-checker.call-effect 2009-07-10 01:05:03 -05:00
Daniel Ehrenberg 23b8f48267 stack-checker.known-words:infer-special uses a word property 2009-07-10 00:52:08 -05:00
Slava Pestov 0068a3d965 stack-checker: fix doc typo reported by OneEyed 2009-06-21 15:11:41 -05:00
Doug Coleman 407377fc98 rename peek -> last and update all usages 2009-05-25 16:38:33 -05:00
Slava Pestov 43a1834e0b stack-checker: fix case where invalid code could infer 2009-05-23 15:50:35 -05:00
Slava Pestov 66a9416473 Update documentation for stricter vocabulary search path semantics 2009-05-16 00:29:21 -05:00
Slava Pestov fb6df472a2 Cleaning up USING: lists for new strict semantics 2009-05-14 16:54:16 -05:00
Slava Pestov 65faa3fda3 Fix unit tests and load errors for slip removal 2009-05-10 17:03:41 -05:00
Slava Pestov a366909c25 Removing slip usage from basis 2009-05-10 15:28:22 -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 a63ad6a7a5 Remove cruddy string encoding/decoding code from VM 2009-05-02 13:45:38 -05:00
Slava Pestov 05ecd04e2f macro call sites don't need an inlined-dependency on the macro 2009-05-01 05:52:34 -05:00
Slava Pestov 9d1c4f39a8 Some gold plating 2009-05-01 02:03:22 -05:00
Slava Pestov a70a2c0e31 Fix some test failures and add an unportable tag 2009-04-30 22:56:15 -05:00
Slava Pestov e5cdb7ac2d call( fast-path now supports curry and compose 2009-04-30 21:08:29 -05:00
Slava Pestov a79e3eb687 Passing an invalid parameter to 'declare' doesn't break the compiler anymore 2009-04-30 20:40:47 -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 5f6c074edd Split up types.c/h into smaller files, remove optimized slot from F_WORD struct 2009-04-28 17:26:11 -05:00
Slava Pestov e940f6fd8b Add method dispatch statistics 2009-04-28 16:58:05 -05:00
Slava Pestov 7e84daf0f1 Move (execute) to kernel.private 2009-04-26 02:42:37 -05:00
Slava Pestov 356537593e Get rid of execute-unsafe now that (execute) is more versatile 2009-04-25 21:50:34 -05:00
Slava Pestov 7aa65b5b5f Fixing new method dispatch implementation 2009-04-25 19:41:27 -05:00
Slava Pestov 3dc9fdf9db Fleshed out new dispatch code 2009-04-24 20:43:01 -05:00
Slava Pestov 8c5b0373a8 Working on new method dispatch system 2009-04-24 15:31:06 -05:00
Slava Pestov 5649cc7a0a Compiler warnings are no more 2009-04-23 22:17:25 -05:00
Slava Pestov c2fe2a4fea Improve stack checker documentation 2009-04-23 03:48:32 -05:00
Slava Pestov 57e1de5181 stack-checker.transforms doesn't need make anymore 2009-04-22 21:26:55 -05:00
Slava Pestov d3cffcbee2 Slightly more efficient compilation of 'new' 2009-04-22 21:26:22 -05:00
Slava Pestov 1dd3ed519f Revert part of an earlier ccompiler.tree.checker hange to fix smalltalk.eval regression 2009-04-22 21:03:53 -05:00
Slava Pestov 20ca578ed1 stack-checker.transforms: fix tests 2009-04-22 04:21:15 -05:00
Slava Pestov 28b9e474dd Set more no-compile word props 2009-04-21 23:18:19 -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 f38d2f91f6 Words which didn't compile cannot be run at all 2009-04-20 22:05:41 -05:00
Slava Pestov 05f3f9dcb9 Fixing unit tests for stack effect inference changes 2009-04-20 21:15:19 -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 5165d811d5 Changing the stack effect of a generic word could break the compiler 2009-04-20 04:21:00 -05:00
Doug Coleman 7a1841f59b (( -- )) eval -> eval( -- ) 2009-04-17 15:49:21 -05:00
Doug Coleman dba4c0d589 fixing compiler errors in basis 2009-04-17 12:46:04 -05:00
Slava Pestov 65b27354ad Merge branch 'master' into smarter_error_list 2009-04-14 15:07:22 -05:00
Slava Pestov e595576dc3 Make more words infer 2009-04-12 23:01:14 -05:00
Slava Pestov c4be8bd65a Refactor error code so that error types are registered; listener prints a summary of errors 2009-04-12 16:08:46 -05:00
Slava Pestov 0fda643ab1 Optimizing string>number 2009-04-11 20:30:51 -05:00
Slava Pestov 8290624733 Macro expansion errors are now wrapped 2009-04-10 07:08:16 -05:00
Slava Pestov 0a7485190b compile-error-type => source-error-type; make test failures global 2009-04-10 03:52:12 -05:00
Slava Pestov 7adb76aaf4 Factor out some compiler error code into source-files.errors 2009-04-09 04:50:38 -05:00
Slava Pestov 2b384a7742 Re-organize some error-related code, three-pane look for compiler errors tool, add Joe's icons 2009-04-08 23:05:45 -05:00
Slava Pestov 07f585a81d Error list tool work in progress 2009-04-06 15:24:21 -05:00
Slava Pestov 9907bd9fe2 Add fseek primitive so that c-streams can seek. This lets the UI work without native IO 2009-04-03 10:16:25 -05:00
Slava Pestov b53960dace Add compiler transform for index with a literal sequenc 2009-03-27 20:05:23 -05:00
Doug Coleman 8b7fcce399 update code for usages of add-library 2009-03-25 23:00:19 -05:00
Slava Pestov 8385e9d9f5 Fixing compile errors, test failures and help lint failures 2009-03-23 17:12:41 -05:00
Slava Pestov 385892be64 Make the member? transform better 2009-03-21 03:10:21 -05:00
Slava Pestov bb92336fb8 Change a throw to a rethrow 2009-03-18 19:44:38 -05:00
Slava Pestov 2ed97f5a24 Various fixes for call( 2009-03-17 18:53:44 -05:00
Slava Pestov 786475102d Make more code infer 2009-03-17 02:19:50 -05:00
Slava Pestov e981090045 Inline caching for call( 2009-03-16 23:02:55 -05:00
Slava Pestov be4fb1e7d9 Move call( and execute( to core 2009-03-16 20:11:36 -05:00
Slava Pestov 1559b74640 Add new check-datastack primitive and re-implement call( with it, instead of using with-datastack. call( is now 5x faster 2009-03-16 06:16:51 -05:00
Slava Pestov 06f29ab7e4 give-up-transform now uses a cached stack effect. Slight performance improvement when compiling calls to member? with a non-literal quotation 2009-03-13 04:28:24 -05:00
Slava Pestov 8f1240cf96 Forgetting a word doesn't call reset-word anymore, fixing an issue where a word calling a forgotten word wouldn't compile because the 'declared-effect' word prop was not set 2009-03-13 00:40:18 -05:00
Slava Pestov 21f8ba2917 Change another throw to rethrow in stack checker 2009-03-11 03:17:06 -05:00
Slava Pestov 52fef83061 Fix various unit tests 2009-03-07 15:58:14 -06:00
Slava Pestov 7b9491066c Fix conflict in images vocab 2009-03-04 21:43:56 -06:00
Slava Pestov 74573c65f5 Change a throw to rethrow so that we don't lose the original stack trace 2009-03-04 21:38:05 -06:00
Slava Pestov ca7a155b72 Merge branch 'master' into new_ui 2009-03-01 20:13:05 -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
Slava Pestov 25a877e50b Merge OneEyed's patch 2009-02-28 17:06:55 -06:00
Slava Pestov cd53c2bd37 produce and produce-as: don't need third quotation either 2009-02-28 15:31:34 -06:00
Slava Pestov 78ce670101 Merge branch 'for-slava' of git://git.rfc1149.net/factor 2009-02-28 14:42:56 -06:00
Slava Pestov 45dae72f4a Merge branch 'master' into new_ui 2009-02-26 23:31:36 -06:00
Slava Pestov 11117648ea Fix stack checker regressions 2009-02-26 23:30:48 -06:00
Slava Pestov e0cfad4676 Merge branch 'master' into new_ui 2009-02-26 14:27:55 -06:00
Slava Pestov 3f70bb3b22 Update docs for improved error reporting 2009-02-26 13:41:50 -06:00
Slava Pestov c8d5e98898 Fix conflicts 2009-02-26 03:12:19 -06:00
Slava Pestov efede19571 Make some errors better in the stack checker 2009-02-26 01:25:13 -06:00
Slava Pestov ce1bc1d6ed Fixing conflicts from stack checker changes 2009-02-24 01:21:10 -06:00
Slava Pestov 91d0c4ed1f Fix conflict 2009-02-22 20:02:13 -06:00
Doug Coleman 990513db60 use CONSTANT: in basis 2009-02-22 19:13:08 -06:00
Slava Pestov b4a61114e1 Merge branch 'master' into new_ui 2009-02-19 13:36:32 -06:00
Slava Pestov 60134eeb98 Documentation fixes 2009-02-19 13:35:53 -06:00
Slava Pestov 5e19766330 Fix conflict 2009-02-18 22:20:05 -06: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
Doug Coleman b3e3c74561 add ; to word definition in stack-checker docs 2009-02-17 11:40:50 -06:00
Slava Pestov 421ee726b8 Merge branch 'master' into new_ui 2009-02-16 21:22:12 -06:00
Slava Pestov 6b25e99470 Add summary for heaps more vocabs 2009-02-16 21:05:13 -06:00
Slava Pestov 43e6a6987a Fix circularity 2009-02-10 16:42:35 -06:00
Slava Pestov 53758074a2 stack-checker: do constant folding for curry and compose with constant inputs at compile time. Allows macros to expand in more cases, fixing the fry caveat found by Doug 2009-02-06 10:21:55 -06:00
Slava Pestov 3166828f75 Fix bug reported by Doug: smart combinators and inline words didn't mix very well in some cases 2009-02-06 04:38:54 -06:00
Slava Pestov cd77ecfab3 'case' didn't work if the default was a non-quotation callable, like a curry; this could come up with macro expansion. Bug reported by Dan 2009-02-04 02:41:30 -06:00
slava e29f18a2f4 Trying to fix a bad merge...
Revert "Merge branch 'master' of git://factorcode.org/git/factor"

This reverts commit da639739bd, reversing
changes made to 346a61f497.
2009-02-03 00:27:34 -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
Slava Pestov f1d20719b2 inferred-effect word prop is just a boolean now, not an effect object 2009-02-23 20:51:14 -06:00
Slava Pestov 1951d739a0 Stack effect declarations are mandatory on all words now
define-temp now takes an effect parameter
Fix compiler bug that Dan found
Stricter enforcement of * effects
Move compile-call from compiler.units to compiler
2009-02-23 20:27:05 -06:00
Slava Pestov a9ef525aed Help lint fixes for stricter help lint 2009-01-27 04:12:37 -06:00
Slava Pestov 60f36cd9c8 Update user-space code for modify-code-heap primitive change 2009-01-24 20:17:11 -06:00
Slava Pestov bf5ff11720 Update usages of all-equal? now that its in the grouping vocab 2009-01-16 15:14:30 -06:00
Slava Pestov 1f29e128c1 io.styles refactoring introduced a load error in io.streams.null; fix that, add docs, and remove unused with-null-stream 2009-01-13 19:25:44 -06:00
Slava Pestov 5fdb474c76 Fixing various test failures and updating some more vocabs for >r/r> removal 2008-12-17 22:29:32 -06:00
Slava Pestov a713538535 Fix bootstrap 2008-12-17 19:23:37 -06:00
Slava Pestov 34792a9f23 Remove >r/r> 2008-12-17 19:17:37 -06:00
Slava Pestov daf2857d7b define-inline now takes an effect parameter
C: now sets the stack effect of the new word to slot names
add new basis/constants vocab; CONSTANT: foo bar is equivalent to : foo bar ; inline
(going to fold CONSTANT:, ALIAS: and qualified into core soon perhaps)
tighten the screws: inline words now need a stack declaration too
update some usages of inline words
2008-12-15 19:44:56 -06:00
Slava Pestov a91dee7810 Fix for native I/O backends that create callbacks in deployed apps; this affected tools.deploy.test[35] ever since run-loop multiplexer landed on OS X 2008-12-12 19:48:17 -06:00
Slava Pestov 8b42b168e2 Removed (string) primitivE 2008-12-09 18:22:38 -06:00
Slava Pestov eb79c6ab71 Fix conflict 2008-12-09 17:52:45 -06:00
Slava Pestov 7940020491 Untangling more dependencies 2008-12-08 16:02:31 -06:00
Slava Pestov 4f0a9f311e Untangling some dependencies 2008-12-08 14:58:00 -06:00
Slava Pestov 9c2e8abaca Enable more local DCE 2008-12-06 14:24:31 -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 aa838dbc2d Fix compile errors 2008-12-05 09:04:16 -06:00
Slava Pestov 908644ee7a O(1) <sbuf> and new-sequence on byte-arrays (work in progress) 2008-12-05 07:28:52 -06:00
Slava Pestov e256846acd Tweak string representation; high bit indicates if character has high bits in aux vector. Avoids memory access in common case. Split set-string-nth into two primitives; set-string-nth-fast is open-coded by optimizing compiler. 13% improvement on reverse-complement 2008-12-05 06:38:51 -06:00
Slava Pestov ba31f73b41 Fix regression on >r/r> test 2008-12-04 10:19:05 -06:00
Slava Pestov e304d3c9f8 Local DCE 2008-12-04 06:02:49 -06:00
Slava Pestov e5ed7447ed Removing more >r/r> usages 2008-12-03 08:46:16 -06:00
Slava Pestov b80e82b170 Use specializer hints when inlining words 2008-11-29 12:05:27 -06:00
Slava Pestov eb8c621b6f Faster generic arithmetic on fiixnums: both-fixnums? sub-primitive performs a check if the top two stack items are both fixnums with a single conditional branch 2008-11-28 08:35:02 -06:00
Slava Pestov 92cc760070 Fixes 2008-11-28 01:11:03 -06:00
Slava Pestov 6dfce7d4e7 load-locals is a primitive now, change semantics of get-locals to bum out 2 instructions from the sub-primitive 2008-11-27 22:30:29 -06:00
Slava Pestov 02b8dcf9f3 Stack checker now knows about wlet words 2008-11-27 21:57:16 -06:00
slava e9aa13150f gc-reset, gc-stats, jit-compile primitives didn't have static stack effects 2008-11-24 16:01:53 -06:00
Slava Pestov 7788b3e0db Merge branch 'master' into microseconds 2008-11-23 03:06:32 -06:00
Slava Pestov a4d9cdfeb3 Refactor all usages of >r/r> in core to use dip, 2dip, 3dip
Non-optimizing compiler now special-cases dip, 2dip, 3dip following a
literal quotation: this allows us to break the dip/slip meta-circle
without explicit calls to >r/r>
2008-11-23 02:44:56 -06:00
Slava Pestov 3e7afcac29 (call-next-method) now takes a method instead of a class and a generic 2008-11-22 19:57:25 -06:00
Slava Pestov 8819f23312 Replace millis primitive with micros primitive
Add millis as a library word
sleep now takes either a duration or a microsecond count; code using durations doens't need to be updated, code using millisecond counts updated to use durations for the most part
2008-11-19 01:50:05 -06:00
Slava Pestov a166db313a Inferring set-datastack is just a warning not an error 2008-11-17 12:23:12 -06:00
Slava Pestov 672f9e400e Better error message 2008-11-17 11:16:32 -06:00
Slava Pestov 9e82f1f8dd Better inference error messages 2008-11-16 19:42:53 -06:00
Doug Coleman afc071eaf8 fix docs 2008-11-13 16:15:57 -06:00
Slava Pestov 5bae69426d Stack checker cleanup and optimization
- stack-checker.state vocabulary split up into stack-checker.{state,values,recursive-state}
- code that modifies and searches recursive state factored out into stack-checker.recursive-state
- recursive state is now a set of three binary hash trees instead of an alist, and no longer contains unnecessary data
- binary hash trees are in stack-checker.recursive-state.tree: unbalanced, persistent
- ~8 second speedup on bootstrap, ~20 second speedup in "peg.javascript" require
2008-11-13 00:07:45 -06:00
Slava Pestov 4a1bcacfd4 Refactoring recursive-state alist; now its a mapping from words to local state triples, reduces searching by a bit 2008-11-12 19:08:40 -06:00
Slava Pestov fab60f94a7 Minor performance improvements 2008-11-11 19:51:26 -06:00
Slava Pestov 26f309d2ae Trying to make PEGs compile faster by reducing the number of low level IR nodes: merge functionality of #>r and #r> into #shuffle, and generate 1 node instead of 3 for calls to get-local 2008-11-11 18:46:31 -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 2445a83cb9 Clean up recursive-state usage 2008-11-03 03:06:11 -06:00
Slava Pestov b6ec4dc6ff Merge branch 'master' of git://factorcode.org/git/factor into new_codegen 2008-10-19 18:10:48 -05:00
Doug Coleman 78a529b1c3 remove directory from the vm 2008-10-19 13:27:59 -05:00
Slava Pestov b5f9d47968 Merge branch 'master' into new_codegen 2008-10-19 01:12:20 -05:00
Doug Coleman 27c36974a7 remove primitives from core, update usages 2008-10-18 21:42:01 -05:00
Slava Pestov 5f93ab74e4 Fix #dispatch generation 2008-10-12 16:46:59 -05:00
Slava Pestov 0e4e05d5cd Debugging new codegen 2008-10-08 03:51:44 -05:00
Slava Pestov c19f2257f4 Fix permission bits 2008-10-02 08:34:49 -05:00