diff options
| author | mikaelpeltier <mikaelpeltier@google.com> | 2015-03-27 15:32:51 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-03-27 15:32:52 +0000 |
| commit | 7bc2a1beaee2d44685aa8a0e60f6b26fb9f64573 (patch) | |
| tree | 55c63d8bbf0dd46120639b179c2848f5c11940bc /dx | |
| parent | ea3ee6d7303ab8674084c21424300e5742139541 (diff) | |
| parent | ba1e0835896f5190fc3051d58ed0a1a384bb35c3 (diff) | |
| download | toolchain_jack-7bc2a1beaee2d44685aa8a0e60f6b26fb9f64573.tar.gz toolchain_jack-7bc2a1beaee2d44685aa8a0e60f6b26fb9f64573.tar.bz2 toolchain_jack-7bc2a1beaee2d44685aa8a0e60f6b26fb9f64573.zip | |
Merge "Simplify set and get method of IntList to enable Jit inlining" into ub-jack
Diffstat (limited to 'dx')
| -rw-r--r-- | dx/src/com/android/jack/dx/util/IntList.java | 25 |
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; } /** |
