tools.deploy: remove malloc debugging better, and don't set next-method word prop for methods that don't call-next-method

db4
Slava Pestov 2009-08-27 20:29:16 -05:00
parent e40ac73085
commit f1b4d94f2f
2 changed files with 19 additions and 10 deletions

View File

@ -1,12 +1,13 @@
! Copyright (C) 2007, 2009 Slava Pestov. ! Copyright (C) 2007, 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: arrays accessors io.backend io.streams.c init fry namespaces USING: arrays accessors io.backend io.streams.c init fry
math make assocs kernel parser parser.notes lexer strings.parser namespaces math make assocs kernel parser parser.notes lexer
vocabs sequences sequences.private words memory kernel.private strings.parser vocabs sequences sequences.deep sequences.private
continuations io vocabs.loader system strings sets vectors quotations words memory kernel.private continuations io vocabs.loader
byte-arrays sorting compiler.units definitions generic system strings sets vectors quotations byte-arrays sorting
generic.standard generic.single tools.deploy.config combinators compiler.units definitions generic generic.standard
classes classes.builtin slots.private grouping ; generic.single tools.deploy.config combinators classes
classes.builtin slots.private grouping ;
QUALIFIED: bootstrap.stage2 QUALIFIED: bootstrap.stage2
QUALIFIED: command-line QUALIFIED: command-line
QUALIFIED: compiler.errors QUALIFIED: compiler.errors
@ -120,6 +121,7 @@ IN: tools.deploy.shaker
"combination" "combination"
"compiled-generic-uses" "compiled-generic-uses"
"compiled-uses" "compiled-uses"
"constant"
"constraints" "constraints"
"custom-inlining" "custom-inlining"
"decision-tree" "decision-tree"
@ -145,6 +147,7 @@ IN: tools.deploy.shaker
"local-writer" "local-writer"
"local-writer?" "local-writer?"
"local?" "local?"
"low-order"
"macro" "macro"
"members" "members"
"memo-quot" "memo-quot"
@ -456,11 +459,13 @@ SYMBOL: deploy-vocab
[ "method-generic" word-prop ] bi [ "method-generic" word-prop ] bi
next-method ; next-method ;
: calls-next-method? ( method -- ? )
def>> flatten \ (call-next-method) swap memq? ;
: compute-next-methods ( -- ) : compute-next-methods ( -- )
[ standard-generic? ] instances [ [ standard-generic? ] instances [
"methods" word-prop [ "methods" word-prop values [ calls-next-method? ] filter
nip dup next-method* "next-method" set-word-prop [ dup next-method* "next-method" set-word-prop ] each
] assoc-each
] each ] each
"vocab:tools/deploy/shaker/next-methods.factor" run-file ; "vocab:tools/deploy/shaker/next-methods.factor" run-file ;

View File

@ -8,3 +8,7 @@ IN: libc
: calloc ( size count -- newalien ) (calloc) check-ptr ; : calloc ( size count -- newalien ) (calloc) check-ptr ;
: free ( alien -- ) (free) ; : free ( alien -- ) (free) ;
FORGET: malloc-ptr
FORGET: <malloc-ptr>