Lines 349-355
Link Here
|
349 |
if (fieldBinding.isStatic()) { |
349 |
if (fieldBinding.isStatic()) { |
350 |
if (!valueRequired) { |
350 |
if (!valueRequired) { |
351 |
// if no valueRequired, still need possible side-effects of <clinit> invocation, if field belongs to different class |
351 |
// if no valueRequired, still need possible side-effects of <clinit> invocation, if field belongs to different class |
352 |
if (((FieldBinding)binding).original().declaringClass == this.actualReceiverType.erasure()) { |
352 |
if (((FieldBinding)binding).original().declaringClass == this.actualReceiverType.erasure() |
|
|
353 |
&& ((implicitConversion & TypeIds.UNBOXING) == 0)) { |
353 |
break; |
354 |
break; |
354 |
} |
355 |
} |
355 |
} |
356 |
} |
Lines 360-368
Link Here
|
360 |
codeStream.invokestatic(syntheticAccessors[READ]); |
361 |
codeStream.invokestatic(syntheticAccessors[READ]); |
361 |
} |
362 |
} |
362 |
if (valueRequired) { |
363 |
if (valueRequired) { |
363 |
if (this.genericCast != null) codeStream.checkcast(this.genericCast); |
364 |
if (this.genericCast != null) codeStream.checkcast(this.genericCast); |
364 |
codeStream.generateImplicitConversion(implicitConversion); |
365 |
codeStream.generateImplicitConversion(implicitConversion); |
365 |
} else { |
366 |
} else { |
|
|
367 |
if ((implicitConversion & TypeIds.UNBOXING) != 0) { |
368 |
codeStream.generateImplicitConversion(implicitConversion); |
369 |
} |
366 |
// could occur if !valueRequired but static field belongs to different class |
370 |
// could occur if !valueRequired but static field belongs to different class |
367 |
switch (fieldBinding.type.id) { |
371 |
switch (fieldBinding.type.id) { |
368 |
case T_long : |
372 |
case T_long : |
Lines 374-380
Link Here
|
374 |
} |
378 |
} |
375 |
} |
379 |
} |
376 |
} else { |
380 |
} else { |
377 |
if (!valueRequired) { |
381 |
if (!valueRequired && ((implicitConversion & TypeIds.UNBOXING) == 0)) { |
378 |
// if no valueRequired, optimize out entire gen |
382 |
// if no valueRequired, optimize out entire gen |
379 |
break; |
383 |
break; |
380 |
} |
384 |
} |
Lines 410-415
Link Here
|
410 |
codeStream.load(localBinding); |
414 |
codeStream.load(localBinding); |
411 |
} |
415 |
} |
412 |
codeStream.generateImplicitConversion(implicitConversion); |
416 |
codeStream.generateImplicitConversion(implicitConversion); |
|
|
417 |
} else if ((implicitConversion & TypeIds.UNBOXING) != 0) { |
418 |
|
419 |
// outer local? |
420 |
if ((bits & DepthMASK) != 0) { |
421 |
// outer local can be reached either through a synthetic arg or a synthetic field |
422 |
VariableBinding[] path = currentScope.getEmulationPath(localBinding); |
423 |
codeStream.generateOuterAccess(path, this, localBinding, currentScope); |
424 |
} else { |
425 |
// regular local variable read |
426 |
codeStream.load(localBinding); |
427 |
} |
428 |
codeStream.generateImplicitConversion(implicitConversion); |
429 |
if ((localBinding.type == TypeBinding.LONG) || (localBinding.type == TypeBinding.DOUBLE)) { |
430 |
codeStream.pop2(); |
431 |
} else { |
432 |
codeStream.pop(); |
433 |
} |
413 |
} |
434 |
} |
414 |
} |
435 |
} |
415 |
} |
436 |
} |