Commit Graph

342 Commits (c28d5589a2daa66b6e273f03fbff272278a9fb15)

Author SHA1 Message Date
Joe Groff e03ce4b5e1 non-polymorphic input parameter check was too strict: wouldn't allow ( x -- ) for ( x x -- x ), for example 2010-03-09 15:57:00 -08:00
Joe Groff d4a0a69eb1 generalize stack effects so we can bootstrap with the stricter stack effect checking 2010-03-08 23:38:10 -08:00
Joe Groff 541c347257 stack-checker.row-polymorphism: modify check-variables to enforce non-polymorphic stack effects 2010-03-08 19:44:01 -08:00
Joe Groff 5c08a11016 refactor stack-checker.row-polymorphism a little 2010-03-08 19:32:25 -08:00
Joe Groff d969bc22e3 add documentation about stack effect variable syntax and the effect on the stack checker 2010-03-08 17:17:47 -08:00
Joe Groff 1b3a92441a combine unbalanced-branches-error and invalid-quotation-input into one error 2010-03-07 22:23:24 -08:00
Joe Groff 51de9cbb4a declare effect on inputs to infer-if in non-literal case, so we get a better error than "unbalanced drop call/nip call" 2010-03-07 21:37:24 -08:00
Joe Groff ce0e5d030c unify inner-d-index when unifying branches; close a few other leaks where meta-d could have been popped without updating inner-d-index 2010-03-07 20:44:50 -08:00
Joe Groff e761828d47 reuse @ and _ from fry in placeholders for invalid-quotation-input errors rather than making our own redundant placeholder symbols 2010-03-07 20:08:35 -08:00
Joe Groff c1555cc653 add unit test from quotation that fails to infer during bootstrap.compiler 2010-03-07 20:07:30 -08:00
Joe Groff 352ed41e74 add tests from old row-polymorphism implementation to stack-checker unit tests 2010-03-07 19:13:41 -08:00
Joe Groff ac90071cd7 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 f5b0f55ec3 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 8751e464ef clear away some rebar 2010-03-07 18:11:44 -08:00
Joe Groff e2ee197e46 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 4a9b65b422 add stack variable unification to M\ declared-effect infer-call* 2010-03-07 17:51:41 -08:00
Joe Groff 42ed9bb11f 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 048aba0b1c tweak recursive call site checking to consider declared-effects equivalent to their wrapped values 2010-03-07 11:55:47 -08:00
Joe Groff a5291e4702 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 7b97b84156 add unit test to show that polymorphic check breaks inference of inline recursive words 2010-03-06 12:28:09 -08:00
Joe Groff ca944518f7 give terminating stack effects a pass in the polymorphic checker 2010-03-05 21:51:38 -08:00
Joe Groff 3ba4805e29 move error summaries for effect parsing errors to debugger vocab 2010-03-05 21:50:40 -08:00
Joe Groff 4cc12d3c70 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 dd9c758447 fix stack error in stack-checker.row-polymorphism 2010-03-05 14:34:50 -08:00
Joe Groff 2ca507eb1a refactor stack-checker slightly to fix circular dependency 2010-03-05 14:27:36 -08:00
Joe Groff 8a36d57505 make effect variables part of effect syntax, stored out of band in effect tuple 2010-03-05 13:30:10 -08:00
Joe Groff fb86397021 make tests pass 2010-03-04 22:43:01 -08:00
Joe Groff 7f33e007f9 improve error reporting 2010-03-04 21:51:49 -08:00
Joe Groff 5c0787a1e3 nested scopes were messing up stack checker state 2010-03-04 20:15:26 -08:00
Joe Groff 9eeb0c1b3b initial implementation of row-polymorphism check 2010-03-04 19:30:08 -08:00
Daniel Ehrenberg 0f0571e48a Moving new-sets to sets 2010-02-26 16:01:01 -05:00
Slava Pestov c1e7a3ffc2 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 b435b2b84b 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 316b831208 alien: some code cleanups and fixes 2010-02-23 01:28:56 +13:00
Slava Pestov ad951c85ae 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 b8bfeec48f 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 b8ab9434cf stack-checker.dependencies: add method for pointers to depends-on-c-type 2010-02-21 22:31:32 -08:00
Slava Pestov b6eb3c04e6 stack-checker.dependencies: add depends-on-c-type 2010-02-22 19:25:09 +13:00
Slava Pestov 93c0bb56e7 stack-checker.dependencies: fix load error 2010-02-20 12:08:14 +13:00
Slava Pestov 58d035f1c7 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 56dff5b0f4 typed: only unbox final classes. Fixes bug reported by littledan 2010-02-18 02:39:12 +13:00
Slava Pestov 974074d089 A few documentation fixes 2010-02-17 00:05:36 +13:00
Slava Pestov 18ed2d8c69 vm: nuke unused (string>float) primitive 2010-02-08 08:16:56 +13:00
Slava Pestov 310399995e 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 a968f37bf9 Test fixes 2010-02-03 23:11:31 +13:00
Slava Pestov edbb980e3f 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 d19709c188 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 0ff526f478 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 c37b4f5f61 A number of documentation fixes and cleanup. 2010-02-03 00:05:03 -07:00
Slava Pestov 8e2e869ec5 stack-checker.dependencies: make conditional dependencies more robust 2010-01-31 01:55:35 +13:00
Slava Pestov 93c2428cf4 compiler.crossref: more space-efficient storage of dependency information 2010-01-30 09:29:02 +13:00
Slava Pestov 39aa70aa88 Clean up some code in preparation for a refactoring 2010-01-30 09:29:02 +13:00
Slava Pestov 3632e97376 compiler.crossref: add next-method dependency 2010-01-30 09:29:01 +13:00
Slava Pestov 65ba4b58d9 stack-checker.dependencies: add tuple layout dependencies for use by 'new' and 'boa' 2010-01-30 09:29:00 +13:00
Slava Pestov df16224ab2 Re-work flushed dependencies into new compiler cross-referencing framework 2010-01-30 09:29:00 +13:00
Slava Pestov 13f920babb Add some utility words to stack-checker.dependencies in preparation for a refactoring 2010-01-30 09:28:59 +13:00
Slava Pestov 468a3a74f1 Re-defining a tuple class now invalidates cached quotation stack effects 2010-01-30 09:28:59 +13:00
Slava Pestov 2138b55708 New 'conditional dependency' mechanism for more accurate recording of recompilation information 2010-01-30 09:28:57 +13:00
Slava Pestov dba5b0be08 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 0738e85df1 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 9502f6f091 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 952a0784a7 vm: remove vm-ptr primitive 2010-01-20 17:06:49 +13:00
Slava Pestov 184d286d29 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 88004434ec vm: remove primitive table, non-optimizing compiler now looks up primitives with dlsym() 2010-01-19 20:00:33 +13:00
Slava Pestov 0165daf56c 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 bf0de9f7ee Help lint fixes for iota 2010-01-15 17:04:14 +13:00
Slava Pestov ce05955693 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 792e6dbd5d stack-checker.errors.prettyprint: fix prettyprinting of unbalanced-branches-error 2010-01-15 07:51:36 +13:00
Slava Pestov 880fb747fc Removing integers-as-sequences 2010-01-15 07:15:33 +13:00
Slava Pestov 790674cf89 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 ecb9137675 stack-checker: fix unit test 2010-01-07 17:40:23 +13:00
Slava Pestov 1e2c0327ee 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 9399a68786 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 08b6ebc7fa Factor source files should not be executable 2009-11-21 17:50:43 -06:00
Slava Pestov 058be8ca47 stack-checker: fix error message printed when do-primitive is inferred 2009-11-19 19:43:41 -06:00
Doug Coleman addb1c90bb rename millis to system-millis, micros to system-micros, add nano-count 2009-11-18 15:58:48 -06:00
Doug Coleman 1861dd2705 initial commit to nanos branch to replace micros 2009-11-18 04:20:05 -06:00
Slava Pestov ab7583ac37 Fix bootstrap 2009-11-13 07:55:47 -06:00
Slava Pestov 68f3087c1c Faster identity-hashcode primitive; fast path now opencoded by the compiler 2009-11-11 02:27:19 -06:00
Slava Pestov 4168ffbcee New identity-hashcode primitive 2009-11-10 21:18:54 -06:00
Slava Pestov d6cb95718f stack-checker: fix help lint 2009-11-10 19:19:59 -06:00
Slava Pestov 0de1335d88 Fix some test failures 2009-11-10 16:48:06 -06:00
Slava Pestov e0d3878c00 stack-checker: tighten some screws in error reporting 2009-11-09 00:17:24 -06:00
Slava Pestov 8f9d4e3d2c stack-checker: split off stack-checker.dependencies from stack-checker.state 2009-11-08 20:34:46 -06:00
Slava Pestov 5dc20ef385 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 32f85587a8 stack-checker.known-words: fix declared output type for dispatch-stats primitive 2009-11-06 04:36:46 -06:00
Slava Pestov f07bb13e88 Fix some test failures 2009-11-06 02:35:43 -06:00
Joe Groff f780bbddc3 deprimitivize tuck and put it to pasture 2009-11-05 22:47:05 -06:00
Slava Pestov 065dac3736 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 40a82aba19 tools.time: overhaul 2009-11-05 01:07:59 -06:00
Slava Pestov d65296b334 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 5da0b1a22e Merge branch 'master' into new_gc 2009-10-30 21:04:37 -05:00
Joe Groff 9a891b4ab6 add missing USING: to stack-checker tests 2009-10-30 20:49:09 -05:00
Slava Pestov 051dcb6849 Merge branch 'master' into new_gc 2009-10-30 03:03:05 -05:00
Joe Groff 33f373162d fix load errors from bootstrapping 2009-10-28 12:51:03 -05:00
Joe Groff 8b6665c57e update existing code for [let change 2009-10-27 22:05:37 -05:00
Slava Pestov 61c2ff4fff 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 772c5483dc vm: get GC events working, -verbosegc switch now produces more info 2009-10-26 23:57:26 -05:00
Slava Pestov d3dede5599 vm: room. now prints mark stack size, and total/contiguous free space 2009-10-25 13:18:06 -05:00
Joe Groff 65a2f803d5 remove the monocle from inference docs and clarify it a bit 2009-10-24 20:57:49 -05:00