Changeset 4426 for trunk/compiler

Show
Ignore:
Timestamp:
08/14/08 14:29:49 (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

    r4425 r4426  
    1317913179        (   var(Flag) -> 
    1318013180            thread_send_message(Return, '$lgt_reply'(Goal, This, Self, Tag, success, DetId)) 
    13181         ;   true 
     13181        ;   % Goal generated an exception, which was already reported 
     13182            true 
    1318213183        ) 
    1318313184    ;   thread_send_message(Return, '$lgt_reply'(Goal, This, Self, Tag, failure, DetId)) 
     
    1319613197    thread_send_message(Return, '$lgt_ready'(Goal, This, Self, call(Tag))), 
    1319713198    (   catch(Goal, Error, (thread_send_message(Return, '$lgt_reply'(Goal, This, Self, Tag, Error, NonDetId)), Flag = error)), 
    13198         var(Flag), 
    13199         thread_send_message(Return, '$lgt_reply'(Goal, This, Self, Tag, success, NonDetId)), 
    13200         thread_get_message(Message), 
    13201         (   Message == '$lgt_next' -> 
    13202             fail    % backtrack to the catch(Goal, ...) to try to find an alternative solution 
    13203         ;   true    % otherwise assume Message = '$lgt_exit' and terminate thread 
     13199        (   var(Flag) -> 
     13200            thread_send_message(Return, '$lgt_reply'(Goal, This, Self, Tag, success, NonDetId)), 
     13201            thread_get_message(Message), 
     13202            (   Message == '$lgt_next' -> 
     13203                fail    % backtrack to the catch(Goal, ...) to try to find an alternative solution 
     13204            ;   true    % otherwise assume Message = '$lgt_exit' and terminate thread 
     13205            ) 
     13206        ;   % Goal generated an exception, which was already reported 
     13207            true 
    1320413208        ) 
    13205     ;   nonvar(Flag), 
    13206         !, 
    13207         true 
    1320813209    ;   thread_send_message(Return, '$lgt_reply'(Goal, This, Self, Tag, failure, NonDetId)) 
    1320913210    ).