Lines 1025-1042
Link Here
|
1025 |
if (((this.generateAttributes & ClassFileConstants.ATTR_VARS) == 0) |
1025 |
if (((this.generateAttributes & ClassFileConstants.ATTR_VARS) == 0) |
1026 |
&& ((this.generateAttributes & ClassFileConstants.ATTR_STACK_MAP) == 0)) |
1026 |
&& ((this.generateAttributes & ClassFileConstants.ATTR_STACK_MAP) == 0)) |
1027 |
return; |
1027 |
return; |
1028 |
while (visibleLocalsCount > 0) { |
1028 |
int index = this.visibleLocalsCount - 1; |
1029 |
LocalVariableBinding visibleLocal = visibleLocals[this.visibleLocalsCount - 1]; |
1029 |
while (index >= 0) { |
|
|
1030 |
LocalVariableBinding visibleLocal = visibleLocals[index]; |
1030 |
if (visibleLocal == null || visibleLocal.declaringScope != currentScope) { |
1031 |
if (visibleLocal == null || visibleLocal.declaringScope != currentScope) { |
1031 |
// left currentScope |
1032 |
// left currentScope |
1032 |
break; |
1033 |
index--; |
|
|
1034 |
continue; |
1033 |
} |
1035 |
} |
1034 |
|
1036 |
|
1035 |
// there may be some preserved locals never initialized |
1037 |
// there may be some preserved locals never initialized |
1036 |
if (visibleLocal.initializationCount > 0 && ((this.generateAttributes & ClassFileConstants.ATTR_VARS) != 0)){ |
1038 |
if (visibleLocal.initializationCount > 0 && ((this.generateAttributes & ClassFileConstants.ATTR_VARS) != 0)){ |
1037 |
visibleLocal.recordInitializationEndPC(position); |
1039 |
visibleLocal.recordInitializationEndPC(position); |
1038 |
} |
1040 |
} |
1039 |
visibleLocals[--this.visibleLocalsCount] = null; // this variable is no longer visible afterwards |
1041 |
visibleLocals[index--] = null; // this variable is no longer visible afterwards |
1040 |
} |
1042 |
} |
1041 |
} |
1043 |
} |
1042 |
public void f2d() { |
1044 |
public void f2d() { |
Lines 5883-5889
Link Here
|
5883 |
// no need to resize. So just add the new exception label |
5885 |
// no need to resize. So just add the new exception label |
5884 |
exceptionLabels[exceptionLabelsCounter++] = anExceptionLabel; |
5886 |
exceptionLabels[exceptionLabelsCounter++] = anExceptionLabel; |
5885 |
} |
5887 |
} |
5886 |
|
5888 |
public void removeVariable(LocalVariableBinding localBinding) { |
|
|
5889 |
for (int i = visibleLocalsCount - 1; i >= 0; i--) { |
5890 |
LocalVariableBinding visibleLocal = visibleLocals[i]; |
5891 |
if (visibleLocal == localBinding && visibleLocal.initializationCount > 0){ |
5892 |
visibleLocal.recordInitializationEndPC(position); |
5893 |
visibleLocals[i] = null; // this variable is no longer visible afterwards |
5894 |
return; |
5895 |
} |
5896 |
} |
5897 |
} |
5887 |
public void removeNotDefinitelyAssignedVariables(Scope scope, int initStateIndex) { |
5898 |
public void removeNotDefinitelyAssignedVariables(Scope scope, int initStateIndex) { |
5888 |
// given some flow info, make sure we did not loose some variables initialization |
5899 |
// given some flow info, make sure we did not loose some variables initialization |
5889 |
// if this happens, then we must update their pc entries to reflect it in debug attributes |
5900 |
// if this happens, then we must update their pc entries to reflect it in debug attributes |