Skip to content

Commit

Permalink
Make the bcIndex field in InlineSequence private.
Browse files Browse the repository at this point in the history
  • Loading branch information
erik-brangs committed Mar 1, 2016
1 parent e8d3012 commit 3d8b9a9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
10 changes: 9 additions & 1 deletion rvm/src/org/jikesrvm/compilers/opt/inlining/InlineSequence.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public final class InlineSequence {
/**
* bytecode index (in caller) of call site
*/
public int bcIndex;
private int bcIndex;

/**
* We need more detailed information of call site than bcIndex.
Expand Down Expand Up @@ -205,4 +205,12 @@ public boolean equals(Object obj) {
return true;
}

public int getBcIndex() {
return bcIndex;
}

public void adjustBcIndex(int delta) {
this.bcIndex += delta;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ static int getEncoding(CallSiteTreeNode current, int offset, int parent, int[] e
int j = i;
while (x != null) {
x.encodedOffset = j;
int byteCodeIndex = x.callSite.bcIndex;
int byteCodeIndex = x.callSite.getBcIndex();
encoding[j++] = (byteCodeIndex >= 0) ? byteCodeIndex : -1;
encoding[j++] = x.callSite.getMethod().getId();
x = (CallSiteTreeNode) x.getRightSibling();
Expand Down
2 changes: 1 addition & 1 deletion rvm/src/org/jikesrvm/osr/AdjustBCIndexes.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public final void perform(IR ir) {
InlineSequence caller = s.position().caller;
if ((caller != null) && (caller.method == ir.method)) {
// adjust the call site's bcIndex
s.position().bcIndex -= offset;
s.position().adjustBcIndex(-offset);
}
continue;
}
Expand Down

0 comments on commit 3d8b9a9

Please sign in to comment.