src/share/classes/com/sun/tools/javac/util/Bits.java

changeset 816
7c537f4298fb
parent 798
4868a36f6fd8
child 1326
30c36e23f154
     1.1 --- a/src/share/classes/com/sun/tools/javac/util/Bits.java	Mon Jan 10 14:57:59 2011 -0800
     1.2 +++ b/src/share/classes/com/sun/tools/javac/util/Bits.java	Mon Jan 10 15:08:31 2011 -0800
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -85,7 +85,7 @@
    1.11      /** Include x in this set.
    1.12       */
    1.13      public void incl(int x) {
    1.14 -        assert x >= 0;
    1.15 +        Assert.check(x >= 0);
    1.16          sizeTo((x >>> wordshift) + 1);
    1.17          bits[x >>> wordshift] = bits[x >>> wordshift] |
    1.18              (1 << (x & wordmask));
    1.19 @@ -113,7 +113,7 @@
    1.20      /** Exclude x from this set.
    1.21       */
    1.22      public void excl(int x) {
    1.23 -        assert x >= 0;
    1.24 +        Assert.check(x >= 0);
    1.25          sizeTo((x >>> wordshift) + 1);
    1.26          bits[x >>> wordshift] = bits[x >>> wordshift] &
    1.27              ~(1 << (x & wordmask));
    1.28 @@ -169,7 +169,7 @@
    1.29       *  Delight" by Henry S. Warren Jr. (figure 5-13)
    1.30       */
    1.31      private static int trailingZeroBits(int x) {
    1.32 -        assert wordlen == 32;
    1.33 +        Assert.check(wordlen == 32);
    1.34          if (x == 0) return 32;
    1.35          int n = 1;
    1.36          if ((x & 0xffff) == 0) { n += 16; x >>>= 16; }

mercurial