Changeset 4425 for trunk/compiler

Show
Ignore:
Timestamp:
08/14/08 13:36:34 (5 months ago)
Author:
pmoura
Message:

Corrected a set of singleton variable bugs in the Logtalk compiler and runtime. Thanks to Joachim Schimpf and Kish Shen work on the improved singleton variable checking code found on the new ECLiPSe 6.0 compiler.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/compiler/logtalk.pl

    r4417 r4425  
    20902090    '$lgt_current_object_'(Obj, _, Dcl, _, _, _, _, DDcl, DDef, _, _, _, _), 
    20912091    !, 
    2092     (   functor(Pred, Functor, Arity), 
    2093         call_with_args(Dcl, Pred, PScope, Compilation, _, _, _, SCtn, _) -> 
     2092    functor(Pred, Functor, Arity), 
     2093    (   call_with_args(Dcl, Pred, PScope, Compilation, _, _, _, SCtn, _) -> 
    20942094        (   (\+ \+ PScope = Scope; Sender = SCtn) -> 
    20952095            (   Compilation == (dynamic) -> 
     
    28092809 
    28102810'$lgt_phrase'(Obj, NonTerminal, Input, Rest, Sender, Scope) :- 
     2811    NonTerminal =.. [Functor| Args], 
     2812    '$lgt_append'(Args, [Input, Rest], Args2), 
     2813    Pred =.. [Functor| Args2], 
    28112814    (   '$lgt_current_object_'(Obj, _, Dcl, Def, _, _, _, _, DDef, _, _, _, _) -> 
    2812         NonTerminal =.. [Functor| Args], 
    2813         '$lgt_append'(Args, [Input, Rest], Args2), 
    2814         Pred =.. [Functor| Args2], 
    28152815        (   call_with_args(Dcl, Pred, PScope, _, _, _, _, SCtn, _) -> 
    28162816            (   (\+ \+ PScope = Scope; Sender = SCtn) -> 
     
    87378737            assertz('$lgt_pp_implemented_protocol_'(Ptc, Prefix, Dcl, Scope)), 
    87388738            '$lgt_tr_implements_protocol'(Refs, ObjOrCtg) 
    8739         ;   throw(type_error(protocol_identifier, Ptc)) 
     8739        ;   throw(type_error(protocol_identifier, Ref)) 
    87408740        ) 
    87418741    ;   throw(type_error(scope, Ref)) 
     
    87668766            assertz('$lgt_pp_imported_category_'(Ctg, Prefix, Dcl, Def, Scope)), 
    87678767            '$lgt_tr_imports_category'(Refs, Obj) 
    8768         ;   throw(type_error(category_identifier, Ctg)) 
     8768        ;   throw(type_error(category_identifier, Ref)) 
    87698769        ) 
    87708770    ;   throw(type_error(scope, Ref)) 
     
    87958795            assertz('$lgt_pp_instantiated_class_'(Class, Prefix, Dcl, Def, Super, IDcl, IDef, DDcl, DDef, Scope)), 
    87968796            '$lgt_tr_instantiates_class'(Refs, Obj) 
    8797         ;   throw(type_error(object_identifier, Class)) 
     8797        ;   throw(type_error(object_identifier, Ref)) 
    87988798        ) 
    87998799    ;   throw(type_error(scope, Ref)) 
     
    88248824            assertz('$lgt_pp_specialized_class_'(Superclass, Prefix, Dcl, Def, Super, IDcl, IDef, DDcl, DDef, Scope)), 
    88258825            '$lgt_tr_specializes_class'(Refs, Class) 
    8826         ;   throw(type_error(object_identifier, Superclass)) 
     8826        ;   throw(type_error(object_identifier, Ref)) 
    88278827        ) 
    88288828    ;   throw(type_error(scope, Ref)) 
     
    88538853            assertz('$lgt_pp_extended_object_'(Parent, Prefix, Dcl, Def, Super, IDcl, IDef, DDcl, DDef, Scope)), 
    88548854            '$lgt_tr_extends_object'(Refs, Obj) 
    8855         ;   throw(type_error(object_identifier, Parent)) 
     8855        ;   throw(type_error(object_identifier, Ref)) 
    88568856        ) 
    88578857    ;   throw(type_error(scope, Ref)) 
     
    88828882            assertz('$lgt_pp_extended_protocol_'(Ptc2, Prefix, Dcl, Scope)), 
    88838883            '$lgt_tr_extends_protocol'(Refs, Ptc1) 
    8884         ;   throw(type_error(protocol_identifier, Ptc2)) 
     8884        ;   throw(type_error(protocol_identifier, Ref)) 
    88858885        ) 
    88868886    ;   throw(type_error(scope, Ref)) 
     
    89118911            assertz('$lgt_pp_extended_category_'(Ctg2, Prefix, Dcl, Def, Scope)), 
    89128912            '$lgt_tr_extends_category'(Refs, Ctg1) 
    8913         ;   throw(type_error(category_identifier, Ctg2)) 
     8913        ;   throw(type_error(category_identifier, Ref)) 
    89148914        ) 
    89158915    ;   throw(type_error(scope, Ref))