Bug 145047 - use chars instead of strings to process signatures in UnresolvedType
Summary: use chars instead of strings to process signatures in UnresolvedType
Status: NEW
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: DEVELOPMENT   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-02 08:17 EDT by Helen Beeken CLA
Modified: 2013-06-24 11:02 EDT (History)
1 user (show)

See Also:


Attachments
possible start of implementation (15.58 KB, patch)
2006-06-02 08:23 EDT, Helen Beeken CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Helen Beeken CLA 2006-06-02 08:17:13 EDT
Strings are currently used within UnresolvedType.signatureToName() and UnresolvedType.nameToSignature() whereas chars would be more effient.
Comment 1 Helen Beeken CLA 2006-06-02 08:23:25 EDT
Created attachment 43344 [details]
possible start of implementation

This came about whilst investigating bug 141730. Before realizing that the work is done for you within UnresolvedType (doh :-)) I wrote my own converter from signatures like 'Ljava/lang/String' and 'I' to 'java.lang.String' and 'int' all in terms of chars. Comparing this with the implementation in UnresolvedType the logic is pretty similar.

The attached patch is a patch to the asm project and adds methods equivalent to UnresolvedType.signatureToName() and UnresolvedType.nameToSignature() to ProgramElement (called createReadableName() and getTypeName()). It also contains a typesafe enum SignatureType and a helper class CharOperation (because from the asm project you can't see the compiler CharOperation class)
Comment 2 Andrew Clement CLA 2007-10-24 10:03:48 EDT
decide on what to do here
Comment 3 Andrew Clement CLA 2013-06-24 11:02:15 EDT
unsetting the target field which is currently set for something already released