- Timestamp:
- 05/24/08 08:23:23 (3 months ago)
- Location:
- trunk
- Files:
-
- 2 modified
-
compiler/logtalk.pl (modified) (20 diffs)
-
RELEASE_NOTES.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/compiler/logtalk.pl
r4273 r4275 65 65 66 66 :- dynamic('$lgt_current_protocol_'/3). % '$lgt_current_protocol_'(Ptc, Prefix, Type) 67 :- dynamic('$lgt_current_category_'/ 5). % '$lgt_current_category_'(Ctg, Prefix, Def, Type, Synchronized)67 :- dynamic('$lgt_current_category_'/6). % '$lgt_current_category_'(Ctg, Prefix, Dcl, Def, Type, Synchronized) 68 68 :- dynamic('$lgt_current_object_'/8). % '$lgt_current_object_'(Obj, Prefix, Dcl, Def, Super, Type, Synchronized, Threaded) 69 69 … … 76 76 :- dynamic('$lgt_extends_protocol_'/3). % '$lgt_extends_protocol_'(Ptc1, Ptc2, Scope) 77 77 78 :- dynamic('$lgt_complemented_object_'/4). % '$lgt_complemented_object_'(Obj ect, Category, Dcl, Def)78 :- dynamic('$lgt_complemented_object_'/4). % '$lgt_complemented_object_'(Obj, Ctg, Dcl, Def) 79 79 80 80 … … 314 314 ; '$lgt_extends_protocol_'(_, CtgOrPtc, _), \+ '$lgt_current_protocol_'(CtgOrPtc, _, _) -> 315 315 throw(error(existence_error(protocol, CtgOrPtc), _, _)) 316 ; '$lgt_imports_category_'(_, CtgOrPtc, _), \+ '$lgt_current_category_'(CtgOrPtc, _, _, _, _ ) ->316 ; '$lgt_imports_category_'(_, CtgOrPtc, _), \+ '$lgt_current_category_'(CtgOrPtc, _, _, _, _, _) -> 317 317 throw(error(existence_error(category, CtgOrPtc), _, _)) 318 ; '$lgt_extends_category_'(_, CtgOrPtc, _), \+ '$lgt_current_category_'(CtgOrPtc, _, _, _, _ ) ->318 ; '$lgt_extends_category_'(_, CtgOrPtc, _), \+ '$lgt_current_category_'(CtgOrPtc, _, _, _, _, _) -> 319 319 throw(error(existence_error(category, CtgOrPtc), _, _)) 320 320 ). … … 408 408 409 409 current_category(Ctg) :- 410 '$lgt_current_category_'(Ctg, _, _, _, _ ).410 '$lgt_current_category_'(Ctg, _, _, _, _, _). 411 411 412 412 … … 452 452 453 453 category_property(Ctg, Prop) :- % static/dynamic property 454 '$lgt_current_category_'(Ctg, _, _, Prop, _).454 '$lgt_current_category_'(Ctg, _, _, _, Prop, _). 455 455 456 456 category_property(Ctg, synchronized) :- 457 '$lgt_current_category_'(Ctg, _, _, _, yes).457 '$lgt_current_category_'(Ctg, _, _, _, _, yes). 458 458 459 459 … … 491 491 492 492 create_object(Obj, Rels, Dirs, Clauses) :- 493 '$lgt_current_category_'(Obj, _, _, _, _ ),493 '$lgt_current_category_'(Obj, _, _, _, _, _), 494 494 throw(error(permission_error(modify, category, Obj), create_object(Obj, Rels, Dirs, Clauses))). 495 495 … … 537 537 538 538 create_category(Ctg, Rels, Dirs, Clauses) :- 539 '$lgt_current_category_'(Ctg, _, _, _, _ ),539 '$lgt_current_category_'(Ctg, _, _, _, _, _), 540 540 throw(error(permission_error(modify, category, Ctg), create_category(Ctg, Rels, Dirs, Clauses))). 541 541 … … 594 594 595 595 create_protocol(Ptc, Rels, Dirs) :- 596 '$lgt_current_category_'(Ptc, _, _, _, _ ),596 '$lgt_current_category_'(Ptc, _, _, _, _, _), 597 597 throw(error(permission_error(modify, category, Ptc), create_protocol(Ptc, Rels, Dirs))). 598 598 … … 670 670 671 671 abolish_category(Ctg) :- 672 ( '$lgt_current_category_'(Ctg, Prefix, _, Type, _) ->672 ( '$lgt_current_category_'(Ctg, Prefix, _, _, Type, _) -> 673 673 ( Type == (dynamic) -> 674 674 call_with_args(Prefix, Dcl, Def, Rnm), … … 679 679 abolish(Rnm/3), 680 680 abolish(Prefix/3), 681 retractall('$lgt_current_category_'(Ctg, _, _, _, _ )),681 retractall('$lgt_current_category_'(Ctg, _, _, _, _, _)), 682 682 retractall('$lgt_extends_category_'(Ctg, _, _)), 683 683 retractall('$lgt_implements_protocol_'(Ctg, _, _)), … … 1963 1963 '$lgt_alias_pred'(Ctg1, _, Alias, Pred, _) :- 1964 1964 '$lgt_extends_category_'(Ctg1, Ctg2, _), 1965 '$lgt_current_category_'(Ctg2, Prefix, _, _, _ ),1965 '$lgt_current_category_'(Ctg2, Prefix, _, _, _, _), 1966 1966 '$lgt_alias_pred'(Ctg2, Prefix, Alias, Pred, _). 1967 1967 1968 1968 '$lgt_alias_pred'(Obj, _, Alias, Pred, _) :- 1969 1969 '$lgt_imports_category_'(Obj, Ctg, _), 1970 '$lgt_current_category_'(Ctg, Prefix, _, _, _ ),1970 '$lgt_current_category_'(Ctg, Prefix, _, _, _, _), 1971 1971 '$lgt_alias_pred'(Ctg, Prefix, Alias, Pred, _). 1972 1972 … … 3161 3161 ( call_with_args(Dcl, Pred, _, _, _, _, _, _, _) -> 3162 3162 ( '$lgt_imports_category_'(This, Ctg, _), 3163 '$lgt_current_category_'(Ctg, _, Def, _, _),3163 '$lgt_current_category_'(Ctg, _, _, Def, _, _), 3164 3164 call_with_args(Def, Pred, Sender, This, Self, Call, _) -> 3165 3165 call(Call) … … 3323 3323 3324 3324 '$lgt_hidden_functor'(Functor) :- 3325 '$lgt_current_category_'(_, Prefix, _, _, _ ),3325 '$lgt_current_category_'(_, Prefix, _, _, _, _), 3326 3326 atom_concat(Prefix, _, Functor), 3327 3327 !. … … 4065 4065 4066 4066 '$lgt_redefined_entity'(Entity, category) :- 4067 '$lgt_current_category_'(Entity, _, _, _, _ ).4067 '$lgt_current_category_'(Entity, _, _, _, _, _). 4068 4068 4069 4069 … … 4921 4921 !. 4922 4922 4923 '$lgt_pp_rclause'('$lgt_current_category_'(Ctg, Prefix, D ef, Mode, Synchronized)) :-4924 '$lgt_pp_category_'(Ctg, Prefix, _, Def, _, Mode),4923 '$lgt_pp_rclause'('$lgt_current_category_'(Ctg, Prefix, Dcl, Def, Mode, Synchronized)) :- 4924 '$lgt_pp_category_'(Ctg, Prefix, Dcl, Def, _, Mode), 4925 4925 ( '$lgt_pp_synchronized_' -> 4926 4926 Synchronized = yes … … 8775 8775 '$lgt_unknown_category'(Ctg) :- 8776 8776 '$lgt_pp_referenced_category_'(Ctg), 8777 \+ '$lgt_current_category_'(Ctg, _, _, _, _ ), % not a currently loaded category8778 \+ '$lgt_pp_category_'(Ctg, _, _, _, _, _), % not the category being compiled (self references)8779 \+ '$lgt_pp_entity_init_'(category, Ctg, _). % not a category defined in the source file being compiled8777 \+ '$lgt_current_category_'(Ctg, _, _, _, _, _), % not a currently loaded category 8778 \+ '$lgt_pp_category_'(Ctg, _, _, _, _, _), % not the category being compiled (self references) 8779 \+ '$lgt_pp_entity_init_'(category, Ctg, _). % not a category defined in the source file being compiled 8780 8780 8781 8781 … … 10605 10605 retractall('$lgt_current_object_'(Entity, _, _, _, _, _, _, _)), 10606 10606 retractall('$lgt_current_protocol_'(Entity, _, _)), 10607 retractall('$lgt_current_category_'(Entity, _, _, _, _ )),10607 retractall('$lgt_current_category_'(Entity, _, _, _, _, _)), 10608 10608 retractall('$lgt_implements_protocol_'(Entity, _, _)), 10609 10609 retractall('$lgt_imports_category_'(Entity, _, _)), … … 10672 10672 '$lgt_construct_category_functors'(Ctg, Prefix, Dcl, Def, Rnm) :- 10673 10673 ( '$lgt_built_in_category'(Ctg) -> 10674 '$lgt_current_category_'(Ctg, Prefix, _, _, _ ),10674 '$lgt_current_category_'(Ctg, Prefix, _, _, _, _), 10675 10675 Call =.. [Prefix, Dcl, Def, Rnm], 10676 10676 once(Call) … … 10721 10721 ( '$lgt_current_object_'(Entity, Prefix, _, _, _, _, _, _), 10722 10722 Type = object 10723 ; '$lgt_current_category_'(Entity, Prefix, _, _, _ ),10723 ; '$lgt_current_category_'(Entity, Prefix, _, _, _, _), 10724 10724 Type = category 10725 10725 ), … … 13332 13332 true 13333 13333 ; '$lgt_static_binding_entity_'(Ctg), 13334 '$lgt_current_category_'(Ctg, Prefix, _, _, _), 13335 Clause =.. [Prefix, Dcl, Def, _], 13336 call(Clause), 13334 '$lgt_current_category_'(Ctg, _, Dcl, Def, _, _), 13337 13335 call_with_args(Dcl, Pred, _, static, _, _, _, DclCtn), !, 13338 13336 functor(Pred, PredFunctor, PredArity), -
trunk/RELEASE_NOTES.txt
r4274 r4275 23 23 category that extends other categories. Thanks to Victor Noel for 24 24 the bug report. 25 26 Small performance improvement to the caching of category predicates 27 when using static binding. 25 28 26 29 Removed from the YAP config file the definition of the forall/2
