reduced memory usage - use HashMap for attributes

This commit is contained in:
Egor.Ushakov
2017-04-20 19:27:41 +03:00
parent 234073efb2
commit 7041accfe9
10 changed files with 50 additions and 48 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2000-2016 JetBrains s.r.o.
* Copyright 2000-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -56,7 +56,7 @@ public class LambdaProcessor {
}
StructBootstrapMethodsAttribute bootstrap =
(StructBootstrapMethodsAttribute)cl.getAttributes().getWithKey(StructGeneralAttribute.ATTRIBUTE_BOOTSTRAP_METHODS);
(StructBootstrapMethodsAttribute)cl.getAttribute(StructGeneralAttribute.ATTRIBUTE_BOOTSTRAP_METHODS);
if (bootstrap == null || bootstrap.getMethodsNumber() == 0) {
return false; // no bootstrap constants in pool
}

View File

@@ -192,7 +192,7 @@ public class NestedClassProcessor {
if (!setEnclosing.isEmpty()) {
StructEnclosingMethodAttribute attr =
(StructEnclosingMethodAttribute)child.classStruct.getAttributes().getWithKey("EnclosingMethod");
(StructEnclosingMethodAttribute)child.classStruct.getAttribute("EnclosingMethod");
if (attr != null &&
attr.getMethodName() != null &&
node.classStruct.qualifiedName.equals(attr.getClassName()) &&