Changeset 4270
- Timestamp:
- 05/23/08 09:49:25 (4 months ago)
- Location:
- trunk
- Files:
-
- 9 modified
-
compiler/logtalk.pl (modified) (3 diffs)
-
manuals/index.html (modified) (1 diff)
-
manuals/refman/control/direct1.html (modified) (3 diffs)
-
manuals/refman/control/to_super1.html (modified) (1 diff)
-
manuals/refman/index.html (modified) (2 diffs)
-
manuals/userman/index.html (modified) (2 diffs)
-
manuals/userman/messages.html (modified) (2 diffs)
-
manuals/userman/objects.html (modified) (2 diffs)
-
RELEASE_NOTES.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/compiler/logtalk.pl
r4269 r4270 3154 3154 3155 3155 3156 % '$lgt_call_ctg_pred'(+atom, +atom, +callable, +object_identifier, +object_identifier, +object_identifier) 3157 % 3158 % calls a category predicate directly, without using the message sending mechanism 3159 3160 '$lgt_call_ctg_pred'(Dcl, Def, Pred, Sender, This, Self) :- 3156 % '$lgt_call_pred_from_this'(+atom, +object_identifier, +atom, +atom, +callable, +object_identifier, +object_identifier, +object_identifier) 3157 % '$lgt_call_pred_from_this'(+atom, +category_identifier, +atom, +atom, +callable, +object_identifier, +object_identifier, +object_identifier) 3158 % 3159 % calls a predicate from "this", without using the message sending mechanism 3160 % prevent loops by ensuring that we look for an inherited or imported definition 3161 3162 '$lgt_call_pred_from_this'(object, Obj, Dcl, Def, Pred, Sender, This, Self) :- 3161 3163 ( call_with_args(Dcl, Pred, _, _, _, _, _, _, _) -> 3162 ( '$lgt_imports_category_'(This, Ctg, _), 3163 call_with_args(Def, Pred, Sender, This, Self, Call, Ctg) -> 3164 ( call_with_args(Def, Pred, Sender, This, Self, Call, Ctn), Obj \= Ctn -> 3165 call(Call) 3166 ) 3167 ; throw(error(existence_error(predicate_declaration, Pred), ':'(Pred), This)) 3168 ). 3169 3170 '$lgt_call_pred_from_this'(category, Ctg, Dcl, Def, Pred, Sender, This, Self) :- 3171 ( call_with_args(Dcl, Pred, _, _, _, _, _, _) -> 3172 ( call_with_args(Def, Pred, Sender, This, Self, Call, Ctn), Ctg \= Ctn -> 3164 3173 call(Call) 3165 3174 ) … … 6924 6933 '$lgt_tr_body'(':'(Pred), _, _, _) :- 6925 6934 \+ '$lgt_pp_imported_category_'(_, _, _, _, _), 6935 \+ '$lgt_pp_extended_category_'(_, _, _, _, _), 6936 \+ '$lgt_pp_extended_object_'(_, _, _, _, _, _, _, _, _, _), 6937 \+ '$lgt_pp_instantiated_class_'(_, _, _, _, _, _, _, _, _, _), 6938 \+ '$lgt_pp_specialized_class_'(_, _, _, _, _, _, _, _, _, _), 6926 6939 throw(existence_error(procedure, Pred)). 6927 6940 6928 6941 '$lgt_tr_body'(':'(Alias), TPred, '$lgt_dbg_goal'(':'(Alias), TPred, DbgCtx), Ctx) :- 6942 '$lgt_pp_object_'(Obj, _, Dcl, Def, _, IDcl, IDef, _, _, _, _), 6929 6943 !, 6930 6944 '$lgt_ctx_ctx'(Ctx, _, Sender, This, Self, _, _, _), … … 6938 6952 true 6939 6953 ; Pred = Alias, 6940 '$lgt_pp_object_'(_, _, Dcl, Def, _, IDcl, _, _, _, _, _),6941 6954 ( ('$lgt_pp_instantiated_class_'(_, _, _, _, _, _, _, _, _, _); '$lgt_pp_specialized_class_'(_, _, _, _, _, _, _, _, _, _)) -> 6942 TPred = '$lgt_call_ ctg_pred'(IDcl,Def, Pred, Sender, This, Self)6943 ; TPred = '$lgt_call_ ctg_pred'(Dcl, Def, Pred, Sender, This, Self)6955 TPred = '$lgt_call_pred_from_this'(object, Obj, IDcl, IDef, Pred, Sender, This, Self) 6956 ; TPred = '$lgt_call_pred_from_this'(object, Obj, Dcl, Def, Pred, Sender, This, Self) 6944 6957 ) 6958 ). 6959 6960 '$lgt_tr_body'(':'(Alias), TPred, '$lgt_dbg_goal'(':'(Alias), TPred, DbgCtx), Ctx) :- 6961 '$lgt_pp_category_'(Ctg, _, Dcl, Def, _, _), 6962 '$lgt_ctx_ctx'(Ctx, _, Sender, This, Self, _, _, _), 6963 '$lgt_ctx_dbg_ctx'(Ctx, DbgCtx), 6964 ( '$lgt_pp_extended_category_'(Ctg2, _, _, _, _), 6965 ( '$lgt_pp_alias_'(Ctg2, Pred, Alias) -> 6966 true 6967 ; Pred = Alias 6968 ), 6969 '$lgt_ctg_static_binding_cache'(Ctg2, Pred, Sender, This, Self, TPred) -> 6970 true 6971 ; Pred = Alias, 6972 TPred = '$lgt_call_pred_from_this'(category, Ctg, Dcl, Def, Pred, Sender, This, Self) 6945 6973 ). 6946 6974 -
trunk/manuals/index.html
r4233 r4270 32 32 <div class="copyright"> 33 33 <span>Copyright © <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> — <a href="http://logtalk.org">Logtalk.org</a></span><br/> 34 <span>Last updated on: April 21, 2008</span>34 <span>Last updated on: May 23, 2008</span> 35 35 </div> 36 36 <div class="navbottom"> -
trunk/manuals/refman/control/direct1.html
r3826 r4270 26 26 <pre>:Goal</pre> 27 27 <p> 28 Calls an i mported category predicate without using the message sending mechanisms. The category predicate is called with the same execution context (<em>sender</em>, <em>this</em>, and <em>self</em>) as the predicate whose body contains the call. The lookup for both the predicate declaration and the predicate definition begins in <em>this</em> instead of <em>self</em>. Furthermore, the lookup of the predicate definition is restricted to the imported categories. As a consequence, any redeclaration or redefinition of the predicate in a descendant of the object containing the call will be ignored.28 Calls an inherited or imported predicate with the lookup for both the predicate declaration and the predicate definition beginning in <em>this</em> instead of <em>self</em>. As a consequence, any redeclaration or redefinition of the predicate in a descendant of the object containing the call will be ignored. The predicate is called with the same execution context (<em>sender</em>, <em>this</em>, and <em>self</em>) as the predicate whose body contains the call. When the predicate is defined in an imported category compiled using static binding, this control construct allows the predicate to be called with the same performance as a local object predicate. 29 29 </p> 30 30 … … 40 40 <dt>Goal is neither a variable nor a callable term:</dt> 41 41 <dd><code>type_error(callable, Goal)</code></dd> 42 <dt>The object containing the call does not import any category:</dt>42 <dt>The entity containing the call does not import or inherit from any entity:</dt> 43 43 <dd><code>existence_error(procedure, Goal)</code></dd> 44 44 </dl> … … 59 59 <div class="copyright"> 60 60 <span>Copyright © <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> — <a href="http://logtalk.org">Logtalk.org</a></span><br/> 61 <span>Last updated on: August 27, 2007</span>61 <span>Last updated on: May 23, 2008</span> 62 62 </div> 63 63 <div class="navbottom"> -
trunk/manuals/refman/control/to_super1.html
r3560 r4270 26 26 <pre>^^Predicate</pre> 27 27 <p> 28 Calls a redefined/inherited definition for a message. Normally only used in the body of a predicate definition for the message. Predicate should match a public or protected predicate of <a class="glossary" title="Go to glossary definition" href="../../glossary.html#self"> self</a> or be within the scope of <a class="glossary" title="Go to glossary definition" href="../../glossary.html#this">this</a>.28 Calls a redefined/inherited definition for a message. Normally only used in the body of a predicate definition for the message. Predicate should match a public or protected predicate of <a class="glossary" title="Go to glossary definition" href="../../glossary.html#self"><em>self</em></a> or be within the scope of <a class="glossary" title="Go to glossary definition" href="../../glossary.html#this"><em>this</em></a>. 29 29 </p> 30 30 -
trunk/manuals/refman/index.html
r4209 r4270 311 311 </dl> 312 312 313 <h3>Direct calls of categorypredicates</h3>313 <h3>Direct calls of inherited or imported predicates</h3> 314 314 315 315 <dl class="toc-entries"> … … 320 320 <div class="copyright"> 321 321 <span>Copyright © <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> — <a href="http://logtalk.org">Logtalk.org</a></span><br/> 322 <span>Last updated on: April 18, 2008</span>322 <span>Last updated on: May 23, 2008</span> 323 323 </div> 324 324 <div class="navbottom"> -
trunk/manuals/userman/index.html
r4213 r4270 79 79 <dt><a href="messages.html#messages_self">Sending a message to <em>self</em></a><span class="leader"></span><span class="page-ref"><span class="messages_self"></span></span></dt> 80 80 <dt><a href="messages.html#messages_super">Calling an overridden predicate definition</a><span class="leader"></span><span class="page-ref"><span class="messages_super"></span></span></dt> 81 <dt><a href="messages.html#messages_direct">Direct calls of imported and inherited predicates</a><span class="leader"></span><span class="page-ref"><span class="messages_direct"></span></span></dt> 81 82 <dt><a href="messages.html#messages_events">Message sending and event generation</a><span class="leader"></span><span class="page-ref"><span class="messages_events"></span></span></dt> 82 83 <dt><a href="messages.html#messages_performance">Message sending performance</a><span class="leader"></span><span class="page-ref"><span class="messages_performance"></span></span></dt> … … 302 303 <div class="copyright"> 303 304 <span>Copyright © <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> — <a href="http://logtalk.org">Logtalk.org</a></span><br/> 304 <span>Last updated on: April 21, 2008</span>305 <span>Last updated on: May 23, 2008</span> 305 306 </div> 306 307 <div class="navbottom"> -
trunk/manuals/userman/messages.html
r3854 r4270 120 120 ^^Predicate, % call inherited definition 121 121 ... . % do something more</pre> 122 123 <h2 id="messages_direct">Direct calls of imported and inherited predicates</h2> 124 125 <p> 126 It is possible to call an imported or inherited predicate starting the lookups for the predicate declaration and definition from <em>this</em> instead of <em>self</em> by using the <a title="Consult reference manual" href="../refman/control/direct1.html"><code>:/1</code></a> control construct. 127 </p> 122 128 123 129 <h2 id="messages_events">Message sending and event generation</h2> … … 236 242 <div class="copyright"> 237 243 <span>Copyright © <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> — <a href="http://logtalk.org">Logtalk.org</a></span><br/> 238 <span>Last updated on: September 15, 2007</span>244 <span>Last updated on: May 23, 2008</span> 239 245 </div> 240 246 <div class="navbottom"> -
trunk/manuals/userman/objects.html
r3960 r4270 304 304 <pre>:- synchronized.</pre> 305 305 <p> 306 This directive results in using internally the same mutex for synchronizing the execution of all defined object predicates. 306 This directive results in using internally the same mutex for synchronizing the execution of all defined object predicates. For fine-grained predicate synchronization, the <a title="Consult reference manual" href="../refman/directives/synchronized1.html"><code>synchronized/1</code></a> directive may be used instead. 307 307 </p> 308 308 … … 439 439 <div class="copyright"> 440 440 <span>Copyright © <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> — <a href="http://logtalk.org">Logtalk.org</a></span><br/> 441 <span>Last updated on: December 9, 2007</span>441 <span>Last updated on: May 21, 2008</span> 442 442 </div> 443 443 <div class="navbottom"> -
trunk/RELEASE_NOTES.txt
r4269 r4270 11 11 12 12 13 2.31.6 - May 26, 2008 13 2.31.6 - May ??, 2008 14 15 Generalized the :/1 control construct to allow its use from within 16 categories that extend other categories. 14 17 15 18 Fixed a Logtalk compiler bug when compiling a class that imports a
