You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucy.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/05/21 02:14:00 UTC

[lucy-issues] [jira] [Commented] (CLOWNFISH-47) Tighten up final method code gen and optimization

    [ https://issues.apache.org/jira/browse/CLOWNFISH-47?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14553395#comment-14553395 ] 

ASF GitHub Bot commented on CLOWNFISH-47:
-----------------------------------------

GitHub user rectang opened a pull request:

    https://github.com/apache/lucy-clownfish/pull/20

    CLOWNFISH-47 Fix final methods

    Final methods should be implemented using static inline functions rather than macros, improving type safety. Final methods are also being optimized too eagerly, though limited use of final classes and methods in earlier releases means that this compilation bug has not manifested in live code to my knowledge.
    
    This branch also re-enables the Go build in Travis.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/rectang/lucy-clownfish CLOWNFISH-47-fix-final-methods

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/lucy-clownfish/pull/20.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #20
    
----
commit 5bb75c9dd63aab1d772bd2b7c68d2e25253fc42c
Author: Marvin Humphrey <ma...@rectangular.com>
Date:   2015-05-20T22:35:14Z

    Stop forcing invocant to "self" in codegen.
    
    Use the original invocant name in generated method invocation function
    and method typedef.

commit f1e69a0fcbf62008bfd2ce8e0235243d6b138e58
Author: Marvin Humphrey <ma...@rectangular.com>
Date:   2015-05-20T23:23:37Z

    Use static inline funcs for final methods.
    
    Instead of a macro which aliases to a specific implementing function,
    wrap a call to the implementing function in a static inline function.
    This encapsulates casting of the invocant, improving type safety.  It is
    also more compatible with CGO, which did not understand the macros.

commit 596d282770eb92281190ff7a9158a478ef8cf55a
Author: Marvin Humphrey <ma...@rectangular.com>
Date:   2015-05-20T23:40:56Z

    Don't over-optimize final methods.
    
    It is only valid to resolve a final method to a specific implementing
    function when that function resides in the same parcel as the invocant.
    A ancestor class in another parcel has the option of adding or removing
    an implementation, so the descendant class cannot know for sure what
    function it should resolve to.

commit 0daeb0d7893eec2b7763a53289a2c876ac65a427
Author: Marvin Humphrey <ma...@rectangular.com>
Date:   2015-05-21T00:01:15Z

    Fix invalid NULL argument.

commit 54373b61aad37c16ffdd124f244ad03e6a8a01cb
Author: Marvin Humphrey <ma...@rectangular.com>
Date:   2015-05-21T00:02:43Z

    Re-enable Go Travis build.

----


> Tighten up final method code gen and optimization
> -------------------------------------------------
>
>                 Key: CLOWNFISH-47
>                 URL: https://issues.apache.org/jira/browse/CLOWNFISH-47
>             Project: Apache Lucy-Clownfish
>          Issue Type: Bug
>          Components: Core
>            Reporter: Marvin Humphrey
>             Fix For: 0.5.0
>
>
> Final methods should be implemented using static inline functions rather than macros, improving type safety.  Final methods are also being optimized too eagerly, though limited use of final classes and methods in earlier releases means that this compilation bug has not manifested in live code to my knowledge.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)