summaryrefslogtreecommitdiffstats
path: root/dx
diff options
context:
space:
mode:
authormikaelpeltier <mikaelpeltier@google.com>2015-03-26 13:23:44 +0100
committermikaelpeltier <mikaelpeltier@google.com>2015-03-26 13:23:44 +0100
commitba1e0835896f5190fc3051d58ed0a1a384bb35c3 (patch)
treef5a35868dfbe9f58c8df60a3501d5ab23dffca8c /dx
parent70d574c2fbf99ed95c92f9037deeb3543f8fec18 (diff)
downloadtoolchain_jack-ba1e0835896f5190fc3051d58ed0a1a384bb35c3.tar.gz
toolchain_jack-ba1e0835896f5190fc3051d58ed0a1a384bb35c3.tar.bz2
toolchain_jack-ba1e0835896f5190fc3051d58ed0a1a384bb35c3.zip
Simplify set and get method of IntList to enable Jit inlining
Change-Id: Ia28ac670894233f7434053b66fb8d6664f92d2fa
Diffstat (limited to 'dx')
-rw-r--r--dx/src/com/android/jack/dx/util/IntList.java25
1 files changed, 2 insertions, 23 deletions
diff --git a/dx/src/com/android/jack/dx/util/IntList.java b/dx/src/com/android/jack/dx/util/IntList.java
index 36e96d05..415dea47 100644
--- a/dx/src/com/android/jack/dx/util/IntList.java
+++ b/dx/src/com/android/jack/dx/util/IntList.java
@@ -169,16 +169,7 @@ public final class IntList extends MutabilityControl {
* @return the indicated element's value
*/
public int get(int n) {
- if (n >= size) {
- throw new IndexOutOfBoundsException("n >= size()");
- }
-
- try {
return values[n];
- } catch (ArrayIndexOutOfBoundsException ex) {
- // Translate exception.
- throw new IndexOutOfBoundsException("n < 0");
- }
}
/**
@@ -189,20 +180,8 @@ public final class IntList extends MutabilityControl {
*/
public void set(int n, int value) {
throwIfImmutable();
-
- if (n >= size) {
- throw new IndexOutOfBoundsException("n >= size()");
- }
-
- try {
- values[n] = value;
- sorted = false;
- } catch (ArrayIndexOutOfBoundsException ex) {
- // Translate the exception.
- if (n < 0) {
- throw new IllegalArgumentException("n < 0");
- }
- }
+ values[n] = value;
+ sorted = false;
}
/**