jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
Signup
groovy
  • groovy
  • GROOVY-3254 code clean up in 1.7
  • GROOVY-3255

ClassNode:306

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Sub-task Sub-task
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.7-beta-1
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    1

Description

ClassNode:306 has

        if ((modifiers & ACC_INTERFACE) == 0)
          addField("$ownClass", ACC_STATIC|ACC_PUBLIC|ACC_FINAL, ClassHelper.CLASS_Type, new ClassExpression(this)).setSynthetic(true);

        transformInstances = new EnumMap<CompilePhase, Map<Class <? extends ASTTransformation>, Set<ASTNode>>>(CompilePhase.class);
        for (CompilePhase phase : CompilePhase.values()) {
            transformInstances.put(phase, new HashMap<Class <? extends ASTTransformation>, Set<ASTNode>>());
        }

which should be moved somewhere else. The "$ownclass" probably into verifier and the for transformInstances (moved to GROOVY-3588) we need to find a good place. At last there is no sense in addeding these instances to a ClassNode, that is no primary class node. The code above is for example executed for each class creation in ClassHelper, which looks very surplus

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    groovy-3255.patch
    08/Mar/09 10:36 AM
    2 kB
    René de Bloois

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
René de Bloois added a comment - 08/Mar/09 10:36 AM

Added in rev 10389, I think $ownClass is not really needed.

I attached a patch which removes it.

Show
René de Bloois added a comment - 08/Mar/09 10:36 AM Added in rev 10389, I think $ownClass is not really needed. I attached a patch which removes it.
Hide
Permalink
Paul King added a comment - 19/Jun/09 6:34 AM

Jochen, any thoughts on this patch?

Show
Paul King added a comment - 19/Jun/09 6:34 AM Jochen, any thoughts on this patch?
Hide
Permalink
blackdrag blackdrag added a comment - 19/Jun/09 6:51 AM

it is a partial solution, since it does not move out the transform code. maybe we should make two sub tasks, one for the transform code and one for the $ownclass code. Now the patch removes the usage of this field totally. On first glance this seems to be a valid change. So I approve of the patch

Show
blackdrag blackdrag added a comment - 19/Jun/09 6:51 AM it is a partial solution, since it does not move out the transform code. maybe we should make two sub tasks, one for the transform code and one for the $ownclass code. Now the patch removes the usage of this field totally. On first glance this seems to be a valid change. So I approve of the patch
Hide
Permalink
Paul King added a comment - 19/Jun/09 7:34 AM

Just on trunk right - not 1_6_X.

Show
Paul King added a comment - 19/Jun/09 7:34 AM Just on trunk right - not 1_6_X.
Hide
Permalink
Paul King added a comment - 19/Jun/09 6:19 PM

Assuming just for trunk. Thanks for the patch René.

Show
Paul King added a comment - 19/Jun/09 6:19 PM Assuming just for trunk. Thanks for the patch René.
Hide
Permalink
René de Bloois added a comment - 29/Jun/09 5:48 AM

You're welcome.

Show
René de Bloois added a comment - 29/Jun/09 5:48 AM You're welcome.

People

  • Assignee:
    Paul King
    Reporter:
    blackdrag blackdrag
Vote (0)
Watch (2)

Dates

  • Created:
    05/Jan/09 7:25 AM
    Updated:
    15/Oct/09 5:17 PM
    Resolved:
    19/Jun/09 6:19 PM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.