|
|
@ -426,6 +426,12 @@ public abstract class StructuredBlock { |
|
|
|
while (enum.hasMoreElements()) { |
|
|
|
while (enum.hasMoreElements()) { |
|
|
|
LocalInfo local = (LocalInfo) enum.nextElement(); |
|
|
|
LocalInfo local = (LocalInfo) enum.nextElement(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* First generate the names for the locals, since this may |
|
|
|
|
|
|
|
* also change their types, if they are in the local |
|
|
|
|
|
|
|
* variable table. |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
String localName = local.getName(); |
|
|
|
|
|
|
|
|
|
|
|
// Merge with all locals in this block, that use the same
|
|
|
|
// Merge with all locals in this block, that use the same
|
|
|
|
// slot and have compatible type.
|
|
|
|
// slot and have compatible type.
|
|
|
|
int size = done.size(); |
|
|
|
int size = done.size(); |
|
|
@ -442,11 +448,17 @@ public abstract class StructuredBlock { |
|
|
|
* of prevLocal (it has already a name) doesn't match |
|
|
|
* of prevLocal (it has already a name) doesn't match |
|
|
|
* the intersected type. |
|
|
|
* the intersected type. |
|
|
|
* |
|
|
|
* |
|
|
|
* A special case: this mustn't be merged, since it is |
|
|
|
* We don't want to merge variables, whose names are |
|
|
|
* special. "this" can't be assigned to. |
|
|
|
* not generated by us and differ. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* And don't merge "this" with any other variable |
|
|
|
|
|
|
|
* since it mustn't be written to. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
if (prevLocal.getType().isOfType(local.getType()) |
|
|
|
if (prevLocal.getType().isOfType(local.getType()) |
|
|
|
&& prevLocal.getName() != "this") { |
|
|
|
&& prevLocal.getName() != "this" |
|
|
|
|
|
|
|
&& (!prevLocal.isNameGenerated() |
|
|
|
|
|
|
|
|| !local.isNameGenerated() |
|
|
|
|
|
|
|
|| localName.equals(prevLocal.getName()))) { |
|
|
|
local.combineWith(prevLocal); |
|
|
|
local.combineWith(prevLocal); |
|
|
|
continue next_used; |
|
|
|
continue next_used; |
|
|
|
} |
|
|
|
} |
|
|
|