Lichen

Changeset

656:cb4fd280007e
2017-03-05 Paul Boddie raw files shortlog changelog graph Avoid unnecessary work by testing for the True value before any bool invocation.
templates/progops.c (file)
     1.1 --- a/templates/progops.c	Sun Mar 05 18:08:19 2017 +0100
     1.2 +++ b/templates/progops.c	Sun Mar 05 19:00:40 2017 +0100
     1.3 @@ -281,5 +281,6 @@
     1.4  
     1.5      /* Invoke the bool function with the object and test against True. */
     1.6  
     1.7 -    return __fn___builtins___boolean_bool(args).value == __builtins___boolean_True.value;
     1.8 +    return (attr.value == __builtins___boolean_True.value) ||
     1.9 +           (__fn___builtins___boolean_bool(args).value == __builtins___boolean_True.value);
    1.10  }