1316 /** Initialize new trackable variable by setting its address field |
1316 /** Initialize new trackable variable by setting its address field |
1317 * to the next available sequence number and entering it under that |
1317 * to the next available sequence number and entering it under that |
1318 * index into the vars array. |
1318 * index into the vars array. |
1319 */ |
1319 */ |
1320 void newVar(VarSymbol sym) { |
1320 void newVar(VarSymbol sym) { |
1321 if (nextadr == vars.length) { |
1321 vars = ArrayUtils.ensureCapacity(vars, nextadr); |
1322 VarSymbol[] newvars = new VarSymbol[nextadr * 2]; |
|
1323 System.arraycopy(vars, 0, newvars, 0, nextadr); |
|
1324 vars = newvars; |
|
1325 } |
|
1326 if ((sym.flags() & FINAL) == 0) { |
1322 if ((sym.flags() & FINAL) == 0) { |
1327 sym.flags_field |= EFFECTIVELY_FINAL; |
1323 sym.flags_field |= EFFECTIVELY_FINAL; |
1328 } |
1324 } |
1329 sym.adr = nextadr; |
1325 sym.adr = nextadr; |
1330 vars[nextadr] = sym; |
1326 vars[nextadr] = sym; |