Lines 1-5
Link Here
|
1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
2 |
* Copyright (c) 2000, 2009 IBM Corporation and others. |
2 |
* Copyright (c) 2000, 2010 IBM Corporation and others. |
3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
Lines 762-775
Link Here
|
762 |
} |
762 |
} |
763 |
|
763 |
|
764 |
public void manageEnclosingInstanceAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo) { |
764 |
public void manageEnclosingInstanceAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo) { |
765 |
if ((flowInfo.tagBits & FlowInfo.UNREACHABLE) == 0) { |
|
|
766 |
//If inlinable field, forget the access emulation, the code gen will directly target it |
765 |
//If inlinable field, forget the access emulation, the code gen will directly target it |
767 |
if (((this.bits & ASTNode.DepthMASK) == 0) || (this.constant != Constant.NotAConstant)) { |
766 |
if (((this.bits & ASTNode.DepthMASK) == 0) || (this.constant != Constant.NotAConstant)) { |
768 |
return; |
767 |
return; |
769 |
} |
768 |
} |
770 |
if ((this.bits & ASTNode.RestrictiveFlagMASK) == Binding.LOCAL) { |
769 |
if ((this.bits & ASTNode.RestrictiveFlagMASK) == Binding.LOCAL) { |
771 |
currentScope.emulateOuterAccess((LocalVariableBinding) this.binding); |
770 |
LocalVariableBinding localVariableBinding = (LocalVariableBinding) this.binding; |
772 |
} |
771 |
if (localVariableBinding != null) { |
|
|
772 |
switch(localVariableBinding.useFlag) { |
773 |
case LocalVariableBinding.FAKE_USED : |
774 |
case LocalVariableBinding.USED : |
775 |
currentScope.emulateOuterAccess(localVariableBinding); |
776 |
} |
777 |
} |
773 |
} |
778 |
} |
774 |
} |
779 |
} |
775 |
|
780 |
|
Lines 777-783
Link Here
|
777 |
* index is <0 to denote write access emulation |
782 |
* index is <0 to denote write access emulation |
778 |
*/ |
783 |
*/ |
779 |
public void manageSyntheticAccessIfNecessary(BlockScope currentScope, FieldBinding fieldBinding, int index, FlowInfo flowInfo) { |
784 |
public void manageSyntheticAccessIfNecessary(BlockScope currentScope, FieldBinding fieldBinding, int index, FlowInfo flowInfo) { |
780 |
if ((flowInfo.tagBits & FlowInfo.UNREACHABLE) != 0) return; |
785 |
if ((flowInfo.tagBits & FlowInfo.UNREACHABLE) != 0) return; |
781 |
// index == 0 denotes the first fieldBinding, index > 0 denotes one of the 'otherBindings', index < 0 denotes a write access (to last binding) |
786 |
// index == 0 denotes the first fieldBinding, index > 0 denotes one of the 'otherBindings', index < 0 denotes a write access (to last binding) |
782 |
if (fieldBinding.constant() != Constant.NotAConstant) |
787 |
if (fieldBinding.constant() != Constant.NotAConstant) |
783 |
return; |
788 |
return; |