Changeset 4304

Show
Ignore:
Timestamp:
06/08/08 03:20:46 (3 months ago)
Author:
pmoura
Message:

Simplified the generated source file initialization goal to avoid redundant calls to true/0.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/compiler/logtalk.pl

    r4303 r4304  
    1056810568    ), 
    1056910569    (   Type \== protocol, Compilation == static, '$lgt_compiler_flag'(reload, skip) -> 
    10570         Goal = (Goal5, '$lgt_add_static_binding_cache_entry'(Entity)) 
    10571     ;   Goal = Goal5   
    10572     ), 
    10573     (   Goal == true -> 
     10570        Goal6 = (Goal5, '$lgt_add_static_binding_cache_entry'(Entity)) 
     10571    ;   Goal6 = Goal5   
     10572    ), 
     10573    (   Goal6 == true -> 
    1057410574        true 
    10575     ;   assertz('$lgt_pp_entity_init_'(Type, Entity, Goal)) 
     10575    ;   '$lgt_simplify_body'(Goal6, Goal), 
     10576        assertz('$lgt_pp_entity_init_'(Type, Entity, Goal)) 
    1057610577    ). 
    1057710578