-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ASM integration in TypesLoaderVisitor #86
base: master
Are you sure you want to change the base?
Conversation
} | ||
} | ||
|
||
public Boolean isAnonymous() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Primitive return instead of wrapper?
return actualName; | ||
} | ||
|
||
public Boolean isPrivate() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Return primitive?
if (!actualName.contains(File.separator)){ | ||
return null; | ||
} | ||
return getActualName().substring(0, getActualName().lastIndexOf(File.separator) + 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really file separator? Or internal class name with "/"?
} | ||
|
||
outputStream.flush(); | ||
byte[] var5 = outputStream.toByteArray(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inline.
src/main/java/org/walkmod/javalang/compiler/types/TypesLoaderVisitor.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 bugs, see comments.
if (!actualName.contains(File.separator)){ | ||
return null; | ||
} | ||
return getActualName().substring(0, getActualName().lastIndexOf("/") + 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
internal name is "/" based. File.separator is wrong here.
} | ||
|
||
public String getSimpleName() { | ||
int index = getActualName().lastIndexOf(File.separator); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be '/'
|
||
public String getCanonicalName() { | ||
return getPackage() + "." + getSimpleName().replaceAll("$", "\\."); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Must be "replace"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not agree. I may have multiple nesting levels, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We had the same discussion 2 (?) years ago. :-)
"replace(a,b)" replaces all strings "a" with string "b".
replaceAll(regular-expression, replacement) replaces all occurences of the regular expression. And the regexp "$" means "end of line".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops 😄
This patch replaces reflection by ASM and increases the performace almost a 20%. ASM parses binary files and allows to extract the minimum amount of information that is required to analyze.
This patch replaces reflection by ASM and increases the performace almost a 20%. ASM parses binary files and allows to extract the minimum amount of information that is required to analyze.
requests addressed |
ping @cal101 |
Moin Raquel! How are you! |
@rpau remember that you have a pending review request |
This patch replaces reflection by ASM and increases
the performace almost a 20%. ASM parses binary files and
allows to extract the minimum amount of information that
is required to analyze.