diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 8 | ||||
-rw-r--r-- | src/interp/c-util.boot | 7 | ||||
-rw-r--r-- | src/interp/define.boot | 4 | ||||
-rw-r--r-- | src/interp/i-eval.boot | 2 |
4 files changed, 18 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 2977932d..5e1421e5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2011-03-02 Gabriel Dos Reis <gdr@cs.tamu.edu> + + * interp/i-eval.boot (mkEvalable): Exit early on niladic constructors. + * interp/define.boot (compDefineFunctor1): If bootstrapping, mark + functor as incomplete. + * interp/c-util.boot (lookupDefiningFunction): Don't look into + incomplete domains. + 2011-02-28 Gabriel Dos Reis <gdr@cs.tamu.edu> * interp/info.boot: Move content to modemap.boot. Delete. diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot index 8904dddc..8c1fe71b 100644 --- a/src/interp/c-util.boot +++ b/src/interp/c-util.boot @@ -1747,8 +1747,11 @@ lookupInheritedDefiningFunction(op,sig,shell,args,slot) == ++ and that is unambiguous is returned. In particular, this ++ function defaulting packages. lookupDefiningFunction(op,sig,dc) == - -- 1. Read domain information, if available. + -- 1. Read domain information, if available. Silently give up if + -- the constructor is just not there [ctor,:args] := dc + loadLibIfNotLoaded ctor + property(ctor,'%incomplete) => nil -- 1.1. Niladic constructors don't need approximation. -- FIXME: However, there may be cylic dependencies -- such as AN ~> IAN ~> EXPR INT ~> AN that prevents @@ -1757,8 +1760,6 @@ lookupDefiningFunction(op,sig,dc) == compiledLookup(op,sig,dc) -- 1.2. Don't look into defaulting package isDefaultPackageName ctor => nil - -- 1.2. Silently give up if the constructor is just not there - loadLibIfNotLoaded ctor infovec := property(ctor,'infovec) or return nil -- 1.3. We need information about the original domain template shell := first infovec -- domain template diff --git a/src/interp/define.boot b/src/interp/define.boot index b921d206..695a1ac8 100644 --- a/src/interp/define.boot +++ b/src/interp/define.boot @@ -752,6 +752,10 @@ compDefineFunctor1(df is ['DEF,form,signature,nils,body], if null argl then evalAndRwriteLispForm('NILADIC, ['MAKEPROP, ['QUOTE,op'], ['QUOTE,'NILADIC], true]) + -- Functors are incomplete during bootstrap + if $bootStrapMode then + evalAndRwriteLispForm('%incomplete, + ['MAKEPROP, ['QUOTE,op'], ['QUOTE,'%incomplete], true]) [fun,['Mapping,:signature'],originale] ++ Subroutine of compDefineFunctor1. Called to generate backend code diff --git a/src/interp/i-eval.boot b/src/interp/i-eval.boot index ef02faf9..e857253d 100644 --- a/src/interp/i-eval.boot +++ b/src/interp/i-eval.boot @@ -55,6 +55,8 @@ mkEvalable form == op="Union" => mkEvalableUnion form op="Mapping"=> mkEvalableMapping form op="Enumeration" => form + -- a niladic constructor instantiation goes by itself + constructor? op and argl = nil => form loadIfNecessary op kind:= getConstructorKindFromDB op cosig := getDualSignatureFromDB op => |