Changeset 4518 for trunk/compiler

Show
Ignore:
Timestamp:
10/19/08 03:04:21 (3 months ago)
Author:
pmoura
Message:

Added the new entity properties file/2 and lines/2 to the list of valid entity properties used for error checking. Corrected a bug in the object_property/2, protocol_property/2, and category_property/2 built-in predicates when accessing the new internal entity property table.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/compiler/logtalk.pl

    r4517 r4518  
    479479object_property(logtalk, built_in). 
    480480 
    481 object_property(Obj, Prop) :-               % static/dynamic property 
    482     '$lgt_current_object_'(Obj, _, _, _, _, _, _, _, _, _, Prop). 
    483  
    484481object_property(Obj, Prop) :- 
    485     '$lgt_entity_property_'(Obj, Prop). 
     482    '$lgt_current_object_'(Obj, _, _, _, _, _, _, _, _, _, Type), 
     483    (   Prop = Type                         % static/dynamic property 
     484    ;   '$lgt_entity_property_'(Obj, Prop)  % other properties 
     485    ). 
    486486 
    487487 
     
    499499    throw(error(domain_error(category_property, Prop), category_property(Ctg, Prop))). 
    500500 
    501 category_property(Ctg, Prop) :-             % static/dynamic property 
    502     '$lgt_current_category_'(Ctg, _, _, _, _, Prop). 
    503  
    504501category_property(Ctg, Prop) :- 
    505     '$lgt_entity_property_'(Ctg, Prop). 
     502    '$lgt_current_category_'(Ctg, _, _, _, _, Type), 
     503    (   Prop = Type                         % static/dynamic property 
     504    ;   '$lgt_entity_property_'(Ctg, Prop)  % other properties 
     505    ). 
    506506 
    507507 
     
    519519    throw(error(domain_error(protocol_property, Prop), protocol_property(Ptc, Prop))). 
    520520 
    521 protocol_property(Ptc, Prop) :-             % static/dynamic property 
    522     '$lgt_current_protocol_'(Ptc, _, _, _, Prop). 
    523  
    524521protocol_property(Ptc, Prop) :- 
    525     '$lgt_entity_property_'(Ptc, Prop). 
     522    '$lgt_current_protocol_'(Ptc, _, _, _, _, Type), 
     523    (   Prop = Type                         % static/dynamic property 
     524    ;   '$lgt_entity_property_'(Ptc, Prop)  % other properties 
     525    ). 
    526526 
    527527 
     
    1163611636'$lgt_valid_object_property'(synchronized). 
    1163711637'$lgt_valid_object_property'(threaded). 
     11638'$lgt_valid_object_property'(file(_, _)). 
     11639'$lgt_valid_object_property'(lines(_, _)). 
    1163811640 
    1163911641 
     
    1164411646'$lgt_valid_protocol_property'((dynamic)). 
    1164511647'$lgt_valid_protocol_property'(static). 
     11648'$lgt_valid_protocol_property'(file(_, _)). 
     11649'$lgt_valid_protocol_property'(lines(_, _)). 
    1164611650 
    1164711651 
     
    1165311657'$lgt_valid_category_property'(static). 
    1165411658'$lgt_valid_category_property'(synchronized). 
     11659'$lgt_valid_category_property'(file(_, _)). 
     11660'$lgt_valid_category_property'(lines(_, _)). 
    1165511661 
    1165611662