# HG changeset patch # User adinn # Date 1437402612 -3600 # Node ID ed1d445a7b4b37e6efdb9688893833f30f28282e # Parent 628accf3a0d4b7e4079d7ab4587bbb63fae40434# Parent 8d152d1e45944616309886e730ffcbfb5c078d22 Merge diff -r 628accf3a0d4 -r ed1d445a7b4b .hgtags --- a/.hgtags Tue Jun 30 16:17:56 2015 +0100 +++ b/.hgtags Mon Jul 20 15:30:12 2015 +0100 @@ -361,6 +361,7 @@ 7a34ec7bb1c831e82ac88da578a028572b676260 jdk8u31-b13 b813a76f10911ac8db2c775e52b29f36ab0005f4 jdk8u31-b31 8dc0c7e42d90c9f323582b742a7f228bad57b124 jdk8u31-b32 +f75e26a5c3acc1ca9f5035dbfc4a40710d354dff jdk8u31-b33 d231957fe3103e790465fcf058fb8cb33bbc4c4e jdk8u40-b00 bf89a471779d13a9407f7d1c86f7716258bc4aa6 jdk8u40-b01 df9cb52f5dd70d8da138276f4ee2427012d2d385 jdk8u40-b02 @@ -389,6 +390,8 @@ 991141080b2078e67179ff307a5051e59431762c jdk8u40-b25 2904142783dd0a9e12195a84c7dcdb3d8278b1b1 jdk8u40-b26 83eca922346e27ec42645e9630c04fbaec5eaf0f jdk8u40-b27 +d727ca30ce3c1b97ed9acd7380f8e4cf41813ffa jdk8u40-b31 +cc9fc1abb5aeffe2b6123c392a5c602a0ba75368 jdk8u40-b32 dbae37f50c43453f7d6f22d96adc8b5b6cd1e90d jdk8u45-b00 244e6dc772877dfae6286530f58e11a210a48a3c jdk8u45-b01 401ec76887623a29d3f868f9f9b18b42838d2e92 jdk8u45-b02 @@ -404,6 +407,26 @@ 4f89bbda7b4532b9f6eeee8c41b7a3b38570ae93 jdk8u45-b12 5ce022bca792453a7efedaed419a9d763d7a9fc3 jdk8u45-b13 847af465a5425e2caa1f1d7a09efec3b3f31b323 jdk8u45-b14 +ebe1e9d17713e45d157b48b9a31c5c2d077c7970 jdk8u45-b15 +10fae8059bb210df1624b827a3895ccc455e3c64 jdk8u45-b31 +e0b8d79bef0c01d77453579b1d36e926892c774b jdk8u45-b32 +ac1c3ae884633c2ec3881816977023fc44919c66 jdk8u51-b00 +565167bf31eab083c306dfe11c947e59f4f4ee72 jdk8u51-b01 +2078bad2444c509a63a539f3bbe1db0f36513c9e jdk8u51-b02 +30124dd95dc07edf3340c98d5af2a5a254b233b5 jdk8u51-b03 +9cb46d0c0d5932f1e52f1f06f015a9a5c1190bc2 jdk8u51-b04 +412ac274e12075e1a774f9b971ce019bcc2e1435 jdk8u51-b05 +7c65f509ca37c7b45c9762841cc280f572686c70 jdk8u51-b06 +b40a953cbc4dbcd87e56b9f9e006ab048d0deaa1 jdk8u51-b07 +858a7fc598d0baa0949a525fadfe912efd15b459 jdk8u51-b08 +90def0a14f4ad8c99fcda34f2745b6158823e21c jdk8u51-b09 +417f734de62d74c69e3a8465340bfb3aca60151a jdk8u51-b10 +8ac1243890d4f427a32320b81ae1be38f81f0c62 jdk8u51-b11 +f65c2fc549b5e9184da67e3a4f81260c27a88010 jdk8u51-b12 +3836d67a94a92befedd97064358270c6f0760e5c jdk8u51-b13 +f3a44c7deac2b23a53f0fd35b22a5d9181291616 jdk8u51-b14 +f77e8d012e8d6ee3432515ad68dd4f630dd08d56 jdk8u51-b15 +e27a094cb423a3bf32906969e9e454e061ce94d4 jdk8u51-b16 0c514d1fd006fc79d35b670de10c370c8d559db7 jdk8u60-b00 0ba07c272e33c93377a5d7ed98b9de873cc91980 jdk8u60-b01 387cf62ce7895dd5e067aaa51faa93d5c078583e jdk8u60-b02 @@ -425,3 +448,7 @@ e7e42c79861ea1ab7495de5f238c01f98035a8a8 jdk8u60-b18 0366d7f1faa12ed35694571c151524e0847f05ff jdk8u60-b19 976523f1d5626bdb6dd47883e2734614b64a5e61 jdk8u60-b20 +97328f3e2aa2c713931edf471270a1208980b963 jdk8u60-b21 +d1febf79ce5ea41fb4b818ffd3589cf923e6de5f jdk8u60-b22 +7f88b5dc78cebc2c5ebb716938fd9a7632b052b2 jdk8u60-b23 +2af11e10da7dc24610551bbeed02c4ca3f4ae654 jdk8u60-b24 diff -r 628accf3a0d4 -r ed1d445a7b4b THIRD_PARTY_README --- a/THIRD_PARTY_README Tue Jun 30 16:17:56 2015 +0100 +++ b/THIRD_PARTY_README Mon Jul 20 15:30:12 2015 +0100 @@ -1140,37 +1140,6 @@ -------------------------------------------------------------------------------- -%% This notice is provided with respect to JSON, which may be included -with JRE 8 & JDK 8. - ---- begin of LICENSE --- - -Copyright (c) 2002 JSON.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -The Software shall be used for Good, not Evil. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ---- end of LICENSE --- - -------------------------------------------------------------------------------- - %% This notice is provided with respect to Kerberos functionality, which which may be included with JRE 8, JDK 8, and OpenJDK 8. @@ -1250,7 +1219,7 @@ ------------------------------------------------------------------------------- -%% This notice is provided with respect to libpng 1.6.16, which may be +%% This notice is provided with respect to libpng 1.6.16, which may be included with JRE 8, JDK 8, and OpenJDK 8. --- begin of LICENSE --- @@ -1370,7 +1339,7 @@ ------------------------------------------------------------------------------- -%% This notice is provided with respect to libungif 4.1.3, which may be +%% This notice is provided with respect to GIFLIB 5.1.1 & libungif 4.1.3, which may be included with JRE 8, JDK 8, and OpenJDK 8. --- begin of LICENSE --- @@ -1399,13 +1368,13 @@ ------------------------------------------------------------------------------- -%% This notice is provided with respect to Little CMS 2.5, which may be +%% This notice is provided with respect to Little CMS 2.7, which may be included with JRE 8, JDK 8, and OpenJDK 8. --- begin of LICENSE --- Little CMS -Copyright (c) 1998-2011 Marti Maria Saguer +Copyright (c) 1998-2015 Marti Maria Saguer Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff -r 628accf3a0d4 -r ed1d445a7b4b src/share/classes/com/sun/tools/javac/comp/Flow.java --- a/src/share/classes/com/sun/tools/javac/comp/Flow.java Tue Jun 30 16:17:56 2015 +0100 +++ b/src/share/classes/com/sun/tools/javac/comp/Flow.java Mon Jul 20 15:30:12 2015 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -353,17 +353,17 @@ this.tree = tree; } - void resolveJump(JCTree tree) { + void resolveJump() { //do nothing } } - abstract void markDead(JCTree tree); + abstract void markDead(); /** Record an outward transfer of control. */ - void recordExit(JCTree tree, P pe) { + void recordExit(P pe) { pendingExits.append(pe); - markDead(tree); + markDead(); } /** Resolve all jumps of this statement. */ @@ -377,7 +377,7 @@ P exit = exits.head; if (exit.tree.hasTag(jk.treeTag) && jk.getTarget(exit.tree) == tree) { - exit.resolveJump(tree); + exit.resolveJump(); resolved = true; } else { pendingExits.append(exit); @@ -420,7 +420,7 @@ private boolean alive; @Override - void markDead(JCTree tree) { + void markDead() { alive = false; } @@ -464,7 +464,7 @@ ListBuffer pendingExitsPrev = pendingExits; Lint lintPrev = lint; - pendingExits = new ListBuffer(); + pendingExits = new ListBuffer<>(); lint = lint.augment(tree.sym); try { @@ -513,7 +513,7 @@ log.error(TreeInfo.diagEndPos(tree.body), "missing.ret.stmt"); List exits = pendingExits.toList(); - pendingExits = new ListBuffer(); + pendingExits = new ListBuffer<>(); while (exits.nonEmpty()) { PendingExit exit = exits.head; exits = exits.tail; @@ -542,7 +542,7 @@ public void visitDoLoop(JCDoWhileLoop tree) { ListBuffer prevPendingExits = pendingExits; - pendingExits = new ListBuffer(); + pendingExits = new ListBuffer<>(); scanStat(tree.body); alive |= resolveContinues(tree); scan(tree.cond); @@ -552,7 +552,7 @@ public void visitWhileLoop(JCWhileLoop tree) { ListBuffer prevPendingExits = pendingExits; - pendingExits = new ListBuffer(); + pendingExits = new ListBuffer<>(); scan(tree.cond); alive = !tree.cond.type.isFalse(); scanStat(tree.body); @@ -564,7 +564,7 @@ public void visitForLoop(JCForLoop tree) { ListBuffer prevPendingExits = pendingExits; scanStats(tree.init); - pendingExits = new ListBuffer(); + pendingExits = new ListBuffer<>(); if (tree.cond != null) { scan(tree.cond); alive = !tree.cond.type.isFalse(); @@ -582,7 +582,7 @@ visitVarDef(tree.var); ListBuffer prevPendingExits = pendingExits; scan(tree.expr); - pendingExits = new ListBuffer(); + pendingExits = new ListBuffer<>(); scanStat(tree.body); alive |= resolveContinues(tree); resolveBreaks(tree, prevPendingExits); @@ -591,14 +591,14 @@ public void visitLabelled(JCLabeledStatement tree) { ListBuffer prevPendingExits = pendingExits; - pendingExits = new ListBuffer(); + pendingExits = new ListBuffer<>(); scanStat(tree.body); alive |= resolveBreaks(tree, prevPendingExits); } public void visitSwitch(JCSwitch tree) { ListBuffer prevPendingExits = pendingExits; - pendingExits = new ListBuffer(); + pendingExits = new ListBuffer<>(); scan(tree.selector); boolean hasDefault = false; for (List l = tree.cases; l.nonEmpty(); l = l.tail) { @@ -625,7 +625,7 @@ public void visitTry(JCTry tree) { ListBuffer prevPendingExits = pendingExits; - pendingExits = new ListBuffer(); + pendingExits = new ListBuffer<>(); for (JCTree resource : tree.resources) { if (resource instanceof JCVariableDecl) { JCVariableDecl vdecl = (JCVariableDecl) resource; @@ -688,21 +688,21 @@ } public void visitBreak(JCBreak tree) { - recordExit(tree, new PendingExit(tree)); + recordExit(new PendingExit(tree)); } public void visitContinue(JCContinue tree) { - recordExit(tree, new PendingExit(tree)); + recordExit(new PendingExit(tree)); } public void visitReturn(JCReturn tree) { scan(tree.expr); - recordExit(tree, new PendingExit(tree)); + recordExit(new PendingExit(tree)); } public void visitThrow(JCThrow tree) { scan(tree.expr); - markDead(tree); + markDead(); } public void visitApply(JCMethodInvocation tree) { @@ -756,7 +756,7 @@ try { attrEnv = env; Flow.this.make = make; - pendingExits = new ListBuffer(); + pendingExits = new ListBuffer<>(); alive = true; scan(tree); } finally { @@ -803,7 +803,7 @@ } @Override - void markDead(JCTree tree) { + void markDead() { //do nothing } @@ -1201,16 +1201,16 @@ } public void visitBreak(JCBreak tree) { - recordExit(tree, new FlowPendingExit(tree, null)); + recordExit(new FlowPendingExit(tree, null)); } public void visitContinue(JCContinue tree) { - recordExit(tree, new FlowPendingExit(tree, null)); + recordExit(new FlowPendingExit(tree, null)); } public void visitReturn(JCReturn tree) { scan(tree.expr); - recordExit(tree, new FlowPendingExit(tree, null)); + recordExit(new FlowPendingExit(tree, null)); } public void visitThrow(JCThrow tree) { @@ -1228,7 +1228,7 @@ else { markThrown(tree, tree.expr.type); } - markDead(tree); + markDead(); } public void visitApply(JCMethodInvocation tree) { @@ -1379,12 +1379,10 @@ * effectively-final local variables/parameters. */ - public abstract class AbstractAssignAnalyzer

.AbstractAssignPendingExit> - extends BaseAnalyzer

{ - + public class AssignAnalyzer extends BaseAnalyzer { /** The set of definitely assigned variables. */ - protected Bits inits; + final Bits inits; /** The set of definitely unassigned variables. */ @@ -1432,20 +1430,20 @@ */ Scope unrefdResources; - /** Set when processing a loop body the second time for DU analysis. */ + /** Modified when processing a loop body the second time for DU analysis. */ FlowKind flowKind = FlowKind.NORMAL; - /** The starting position of the analysed tree */ + /** The starting position of the analyzed tree */ int startPos; - public class AbstractAssignPendingExit extends BaseAnalyzer.PendingExit { + public class AssignPendingExit extends BaseAnalyzer.PendingExit { final Bits inits; final Bits uninits; final Bits exit_inits = new Bits(true); final Bits exit_uninits = new Bits(true); - public AbstractAssignPendingExit(JCTree tree, final Bits inits, final Bits uninits) { + public AssignPendingExit(JCTree tree, final Bits inits, final Bits uninits) { super(tree); this.inits = inits; this.uninits = uninits; @@ -1454,13 +1452,13 @@ } @Override - public void resolveJump(JCTree tree) { + void resolveJump() { inits.andSet(exit_inits); uninits.andSet(exit_uninits); } } - public AbstractAssignAnalyzer() { + public AssignAnalyzer() { this.inits = new Bits(); uninits = new Bits(); uninitsTry = new Bits(); @@ -1473,7 +1471,7 @@ private boolean isInitialConstructor = false; @Override - protected void markDead(JCTree tree) { + void markDead() { if (!isInitialConstructor) { inits.inclRange(returnadr, nextadr); } else { @@ -1520,35 +1518,41 @@ } sym.adr = nextadr; vardecls[nextadr] = varDecl; - exclVarFromInits(varDecl, nextadr); + inits.excl(nextadr); uninits.incl(nextadr); nextadr++; } - protected void exclVarFromInits(JCTree tree, int adr) { - inits.excl(adr); - } - - protected void assignToInits(JCTree tree, Bits bits) { - inits.assign(bits); - } - - protected void andSetInits(JCTree tree, Bits bits) { - inits.andSet(bits); - } - - protected void orSetInits(JCTree tree, Bits bits) { - inits.orSet(bits); - } - /** Record an initialization of a trackable variable. */ void letInit(DiagnosticPosition pos, VarSymbol sym) { if (sym.adr >= firstadr && trackable(sym)) { - if (uninits.isMember(sym.adr)) { - uninit(sym); + if ((sym.flags() & EFFECTIVELY_FINAL) != 0) { + if (!uninits.isMember(sym.adr)) { + //assignment targeting an effectively final variable + //makes the variable lose its status of effectively final + //if the variable is _not_ definitively unassigned + sym.flags_field &= ~EFFECTIVELY_FINAL; + } else { + uninit(sym); + } + } else if ((sym.flags() & FINAL) != 0) { + if ((sym.flags() & PARAMETER) != 0) { + if ((sym.flags() & UNION) != 0) { //multi-catch parameter + log.error(pos, "multicatch.parameter.may.not.be.assigned", sym); + } else { + log.error(pos, "final.parameter.may.not.be.assigned", + sym); + } + } else if (!uninits.isMember(sym.adr)) { + log.error(pos, flowKind.errKey, sym); + } else { + uninit(sym); + } } inits.incl(sym.adr); + } else if ((sym.flags() & FINAL) != 0) { + log.error(pos, "var.might.already.be.assigned", sym); } } //where @@ -1583,7 +1587,14 @@ checkInit(pos, sym, "var.might.not.have.been.initialized"); } - void checkInit(DiagnosticPosition pos, VarSymbol sym, String errkey) {} + void checkInit(DiagnosticPosition pos, VarSymbol sym, String errkey) { + if ((sym.adr >= firstadr || sym.owner.kind != TYP) && + trackable(sym) && + !inits.isMember(sym.adr)) { + log.error(pos, errkey, sym); + inits.incl(sym.adr); + } + } /** Utility method to reset several Bits instances. */ @@ -1607,7 +1618,7 @@ /** Merge (intersect) inits/uninits from WhenTrue/WhenFalse sets. */ - protected void merge(JCTree tree) { + protected void merge() { inits.assign(initsWhenFalse.andSet(initsWhenTrue)); uninits.assign(uninitsWhenFalse.andSet(uninitsWhenTrue)); } @@ -1623,7 +1634,7 @@ if (tree != null) { scan(tree); if (inits.isReset()) { - merge(tree); + merge(); } } } @@ -1641,7 +1652,7 @@ */ void scanCond(JCTree tree) { if (tree.type.isFalse()) { - if (inits.isReset()) merge(tree); + if (inits.isReset()) merge(); initsWhenTrue.assign(inits); initsWhenTrue.inclRange(firstadr, nextadr); uninitsWhenTrue.assign(uninits); @@ -1649,7 +1660,7 @@ initsWhenFalse.assign(inits); uninitsWhenFalse.assign(uninits); } else if (tree.type.isTrue()) { - if (inits.isReset()) merge(tree); + if (inits.isReset()) merge(); initsWhenFalse.assign(inits); initsWhenFalse.inclRange(firstadr, nextadr); uninitsWhenFalse.assign(uninits); @@ -1668,173 +1679,202 @@ /* ------------ Visitor methods for various sorts of trees -------------*/ - @Override public void visitClassDef(JCClassDecl tree) { if (tree.sym == null) { return; } - JCClassDecl classDefPrev = classDef; - int firstadrPrev = firstadr; - int nextadrPrev = nextadr; - ListBuffer

pendingExitsPrev = pendingExits; + Lint lintPrev = lint; + lint = lint.augment(tree.sym); + try { + if (tree.sym == null) { + return; + } + + JCClassDecl classDefPrev = classDef; + int firstadrPrev = firstadr; + int nextadrPrev = nextadr; + ListBuffer pendingExitsPrev = pendingExits; - pendingExits = new ListBuffer

(); - if (tree.name != names.empty) { - firstadr = nextadr; - } - classDef = tree; - try { - // define all the static fields - for (List l = tree.defs; l.nonEmpty(); l = l.tail) { - if (l.head.hasTag(VARDEF)) { - JCVariableDecl def = (JCVariableDecl)l.head; - if ((def.mods.flags & STATIC) != 0) { - VarSymbol sym = def.sym; - if (trackable(sym)) { - newVar(def); + pendingExits = new ListBuffer<>(); + if (tree.name != names.empty) { + firstadr = nextadr; + } + classDef = tree; + try { + // define all the static fields + for (List l = tree.defs; l.nonEmpty(); l = l.tail) { + if (l.head.hasTag(VARDEF)) { + JCVariableDecl def = (JCVariableDecl)l.head; + if ((def.mods.flags & STATIC) != 0) { + VarSymbol sym = def.sym; + if (trackable(sym)) { + newVar(def); + } } } } - } - // process all the static initializers - for (List l = tree.defs; l.nonEmpty(); l = l.tail) { - if (!l.head.hasTag(METHODDEF) && - (TreeInfo.flags(l.head) & STATIC) != 0) { - scan(l.head); + // process all the static initializers + for (List l = tree.defs; l.nonEmpty(); l = l.tail) { + if (!l.head.hasTag(METHODDEF) && + (TreeInfo.flags(l.head) & STATIC) != 0) { + scan(l.head); + } } - } - // define all the instance fields - for (List l = tree.defs; l.nonEmpty(); l = l.tail) { - if (l.head.hasTag(VARDEF)) { - JCVariableDecl def = (JCVariableDecl)l.head; - if ((def.mods.flags & STATIC) == 0) { - VarSymbol sym = def.sym; - if (trackable(sym)) { - newVar(def); + // define all the instance fields + for (List l = tree.defs; l.nonEmpty(); l = l.tail) { + if (l.head.hasTag(VARDEF)) { + JCVariableDecl def = (JCVariableDecl)l.head; + if ((def.mods.flags & STATIC) == 0) { + VarSymbol sym = def.sym; + if (trackable(sym)) { + newVar(def); + } } } } - } - - // process all the instance initializers - for (List l = tree.defs; l.nonEmpty(); l = l.tail) { - if (!l.head.hasTag(METHODDEF) && - (TreeInfo.flags(l.head) & STATIC) == 0) { - scan(l.head); + // process all the instance initializers + for (List l = tree.defs; l.nonEmpty(); l = l.tail) { + if (!l.head.hasTag(METHODDEF) && + (TreeInfo.flags(l.head) & STATIC) == 0) { + scan(l.head); + } } - } - // process all the methods - for (List l = tree.defs; l.nonEmpty(); l = l.tail) { - if (l.head.hasTag(METHODDEF)) { - scan(l.head); + // process all the methods + for (List l = tree.defs; l.nonEmpty(); l = l.tail) { + if (l.head.hasTag(METHODDEF)) { + scan(l.head); + } } + } finally { + pendingExits = pendingExitsPrev; + nextadr = nextadrPrev; + firstadr = firstadrPrev; + classDef = classDefPrev; } } finally { - pendingExits = pendingExitsPrev; - nextadr = nextadrPrev; - firstadr = firstadrPrev; - classDef = classDefPrev; + lint = lintPrev; } } - @Override public void visitMethodDef(JCMethodDecl tree) { if (tree.body == null) { return; } - /* Ignore synthetic methods, except for translated lambda methods. + + /* MemberEnter can generate synthetic methods ignore them */ - if ((tree.sym.flags() & (SYNTHETIC | LAMBDA_METHOD)) == SYNTHETIC) { + if ((tree.sym.flags() & SYNTHETIC) != 0) { return; } - final Bits initsPrev = new Bits(inits); - final Bits uninitsPrev = new Bits(uninits); - int nextadrPrev = nextadr; - int firstadrPrev = firstadr; - int returnadrPrev = returnadr; - - Assert.check(pendingExits.isEmpty()); - boolean lastInitialConstructor = isInitialConstructor; + Lint lintPrev = lint; + lint = lint.augment(tree.sym); try { - isInitialConstructor = TreeInfo.isInitialConstructor(tree); - - if (!isInitialConstructor) { - firstadr = nextadr; + if (tree.body == null) { + return; + } + /* Ignore synthetic methods, except for translated lambda methods. + */ + if ((tree.sym.flags() & (SYNTHETIC | LAMBDA_METHOD)) == SYNTHETIC) { + return; } - for (List l = tree.params; l.nonEmpty(); l = l.tail) { - JCVariableDecl def = l.head; - scan(def); - Assert.check((def.sym.flags() & PARAMETER) != 0, "Method parameter without PARAMETER flag"); - /* If we are executing the code from Gen, then there can be - * synthetic or mandated variables, ignore them. - */ - initParam(def); - } - // else we are in an instance initializer block; - // leave caught unchanged. - scan(tree.body); + + final Bits initsPrev = new Bits(inits); + final Bits uninitsPrev = new Bits(uninits); + int nextadrPrev = nextadr; + int firstadrPrev = firstadr; + int returnadrPrev = returnadr; + + Assert.check(pendingExits.isEmpty()); + boolean lastInitialConstructor = isInitialConstructor; + try { + isInitialConstructor = TreeInfo.isInitialConstructor(tree); - if (isInitialConstructor) { - boolean isSynthesized = (tree.sym.flags() & - GENERATEDCONSTR) != 0; - for (int i = firstadr; i < nextadr; i++) { - JCVariableDecl vardecl = vardecls[i]; - VarSymbol var = vardecl.sym; - if (var.owner == classDef.sym) { - // choose the diagnostic position based on whether - // the ctor is default(synthesized) or not - if (isSynthesized) { - checkInit(TreeInfo.diagnosticPositionFor(var, vardecl), - var, "var.not.initialized.in.default.constructor"); - } else { - checkInit(TreeInfo.diagEndPos(tree.body), var); + if (!isInitialConstructor) { + firstadr = nextadr; + } + for (List l = tree.params; l.nonEmpty(); l = l.tail) { + JCVariableDecl def = l.head; + scan(def); + Assert.check((def.sym.flags() & PARAMETER) != 0, "Method parameter without PARAMETER flag"); + /* If we are executing the code from Gen, then there can be + * synthetic or mandated variables, ignore them. + */ + initParam(def); + } + // else we are in an instance initializer block; + // leave caught unchanged. + scan(tree.body); + + if (isInitialConstructor) { + boolean isSynthesized = (tree.sym.flags() & + GENERATEDCONSTR) != 0; + for (int i = firstadr; i < nextadr; i++) { + JCVariableDecl vardecl = vardecls[i]; + VarSymbol var = vardecl.sym; + if (var.owner == classDef.sym) { + // choose the diagnostic position based on whether + // the ctor is default(synthesized) or not + if (isSynthesized) { + checkInit(TreeInfo.diagnosticPositionFor(var, vardecl), + var, "var.not.initialized.in.default.constructor"); + } else { + checkInit(TreeInfo.diagEndPos(tree.body), var); + } } } } - } - List

exits = pendingExits.toList(); - pendingExits = new ListBuffer<>(); - while (exits.nonEmpty()) { - P exit = exits.head; - exits = exits.tail; - Assert.check(exit.tree.hasTag(RETURN), exit.tree); - if (isInitialConstructor) { - assignToInits(exit.tree, exit.exit_inits); - for (int i = firstadr; i < nextadr; i++) { - checkInit(exit.tree.pos(), vardecls[i].sym); + List exits = pendingExits.toList(); + pendingExits = new ListBuffer<>(); + while (exits.nonEmpty()) { + AssignPendingExit exit = exits.head; + exits = exits.tail; + Assert.check(exit.tree.hasTag(RETURN), exit.tree); + if (isInitialConstructor) { + inits.assign(exit.exit_inits); + for (int i = firstadr; i < nextadr; i++) { + checkInit(exit.tree.pos(), vardecls[i].sym); + } } } + } finally { + inits.assign(initsPrev); + uninits.assign(uninitsPrev); + nextadr = nextadrPrev; + firstadr = firstadrPrev; + returnadr = returnadrPrev; + isInitialConstructor = lastInitialConstructor; } } finally { - assignToInits(tree, initsPrev); - uninits.assign(uninitsPrev); - nextadr = nextadrPrev; - firstadr = firstadrPrev; - returnadr = returnadrPrev; - isInitialConstructor = lastInitialConstructor; + lint = lintPrev; } } protected void initParam(JCVariableDecl def) { inits.incl(def.sym.adr); uninits.excl(def.sym.adr); - } + } public void visitVarDef(JCVariableDecl tree) { - boolean track = trackable(tree.sym); - if (track && tree.sym.owner.kind == MTH) { - newVar(tree); - } - if (tree.init != null) { - scanExpr(tree.init); - if (track) { - letInit(tree.pos(), tree.sym); + Lint lintPrev = lint; + lint = lint.augment(tree.sym); + try{ + boolean track = trackable(tree.sym); + if (track && tree.sym.owner.kind == MTH) { + newVar(tree); } + if (tree.init != null) { + scanExpr(tree.init); + if (track) { + letInit(tree.pos(), tree.sym); + } + } + } finally { + lint = lintPrev; } } @@ -1844,18 +1884,14 @@ nextadr = nextadrPrev; } - int getLogNumberOfErrors() { - return 0; - } - public void visitDoLoop(JCDoWhileLoop tree) { - ListBuffer

prevPendingExits = pendingExits; + ListBuffer prevPendingExits = pendingExits; FlowKind prevFlowKind = flowKind; flowKind = FlowKind.NORMAL; final Bits initsSkip = new Bits(true); final Bits uninitsSkip = new Bits(true); - pendingExits = new ListBuffer

(); - int prevErrors = getLogNumberOfErrors(); + pendingExits = new ListBuffer<>(); + int prevErrors = log.nerrors; do { final Bits uninitsEntry = new Bits(uninits); uninitsEntry.excludeFrom(nextadr); @@ -1866,28 +1902,28 @@ initsSkip.assign(initsWhenFalse); uninitsSkip.assign(uninitsWhenFalse); } - if (getLogNumberOfErrors() != prevErrors || + if (log.nerrors != prevErrors || flowKind.isFinal() || new Bits(uninitsEntry).diffSet(uninitsWhenTrue).nextBit(firstadr)==-1) break; - assignToInits(tree.cond, initsWhenTrue); + inits.assign(initsWhenTrue); uninits.assign(uninitsEntry.andSet(uninitsWhenTrue)); flowKind = FlowKind.SPECULATIVE_LOOP; } while (true); flowKind = prevFlowKind; - assignToInits(tree, initsSkip); + inits.assign(initsSkip); uninits.assign(uninitsSkip); resolveBreaks(tree, prevPendingExits); } public void visitWhileLoop(JCWhileLoop tree) { - ListBuffer

prevPendingExits = pendingExits; + ListBuffer prevPendingExits = pendingExits; FlowKind prevFlowKind = flowKind; flowKind = FlowKind.NORMAL; final Bits initsSkip = new Bits(true); final Bits uninitsSkip = new Bits(true); pendingExits = new ListBuffer<>(); - int prevErrors = getLogNumberOfErrors(); + int prevErrors = log.nerrors; final Bits uninitsEntry = new Bits(uninits); uninitsEntry.excludeFrom(nextadr); do { @@ -1896,11 +1932,11 @@ initsSkip.assign(initsWhenFalse) ; uninitsSkip.assign(uninitsWhenFalse); } - assignToInits(tree, initsWhenTrue); + inits.assign(initsWhenTrue); uninits.assign(uninitsWhenTrue); scan(tree.body); resolveContinues(tree); - if (getLogNumberOfErrors() != prevErrors || + if (log.nerrors != prevErrors || flowKind.isFinal() || new Bits(uninitsEntry).diffSet(uninits).nextBit(firstadr) == -1) { break; @@ -1911,21 +1947,21 @@ flowKind = prevFlowKind; //a variable is DA/DU after the while statement, if it's DA/DU assuming the //branch is not taken AND if it's DA/DU before any break statement - assignToInits(tree.body, initsSkip); + inits.assign(initsSkip); uninits.assign(uninitsSkip); resolveBreaks(tree, prevPendingExits); } public void visitForLoop(JCForLoop tree) { - ListBuffer

prevPendingExits = pendingExits; + ListBuffer prevPendingExits = pendingExits; FlowKind prevFlowKind = flowKind; flowKind = FlowKind.NORMAL; int nextadrPrev = nextadr; scan(tree.init); final Bits initsSkip = new Bits(true); final Bits uninitsSkip = new Bits(true); - pendingExits = new ListBuffer

(); - int prevErrors = getLogNumberOfErrors(); + pendingExits = new ListBuffer<>(); + int prevErrors = log.nerrors; do { final Bits uninitsEntry = new Bits(uninits); uninitsEntry.excludeFrom(nextadr); @@ -1935,7 +1971,7 @@ initsSkip.assign(initsWhenFalse); uninitsSkip.assign(uninitsWhenFalse); } - assignToInits(tree.body, initsWhenTrue); + inits.assign(initsWhenTrue); uninits.assign(uninitsWhenTrue); } else if (!flowKind.isFinal()) { initsSkip.assign(inits); @@ -1946,7 +1982,7 @@ scan(tree.body); resolveContinues(tree); scan(tree.step); - if (getLogNumberOfErrors() != prevErrors || + if (log.nerrors != prevErrors || flowKind.isFinal() || new Bits(uninitsEntry).diffSet(uninits).nextBit(firstadr) == -1) break; @@ -1956,7 +1992,7 @@ flowKind = prevFlowKind; //a variable is DA/DU after a for loop, if it's DA/DU assuming the //branch is not taken AND if it's DA/DU before any break statement - assignToInits(tree.body, initsSkip); + inits.assign(initsSkip); uninits.assign(uninitsSkip); resolveBreaks(tree, prevPendingExits); nextadr = nextadrPrev; @@ -1965,7 +2001,7 @@ public void visitForeachLoop(JCEnhancedForLoop tree) { visitVarDef(tree.var); - ListBuffer

prevPendingExits = pendingExits; + ListBuffer prevPendingExits = pendingExits; FlowKind prevFlowKind = flowKind; flowKind = FlowKind.NORMAL; int nextadrPrev = nextadr; @@ -1974,14 +2010,14 @@ final Bits uninitsStart = new Bits(uninits); letInit(tree.pos(), tree.var.sym); - pendingExits = new ListBuffer

(); - int prevErrors = getLogNumberOfErrors(); + pendingExits = new ListBuffer<>(); + int prevErrors = log.nerrors; do { final Bits uninitsEntry = new Bits(uninits); uninitsEntry.excludeFrom(nextadr); scan(tree.body); resolveContinues(tree); - if (getLogNumberOfErrors() != prevErrors || + if (log.nerrors != prevErrors || flowKind.isFinal() || new Bits(uninitsEntry).diffSet(uninits).nextBit(firstadr) == -1) break; @@ -1989,21 +2025,21 @@ flowKind = FlowKind.SPECULATIVE_LOOP; } while (true); flowKind = prevFlowKind; - assignToInits(tree.body, initsStart); + inits.assign(initsStart); uninits.assign(uninitsStart.andSet(uninits)); resolveBreaks(tree, prevPendingExits); nextadr = nextadrPrev; } public void visitLabelled(JCLabeledStatement tree) { - ListBuffer

prevPendingExits = pendingExits; - pendingExits = new ListBuffer

(); + ListBuffer prevPendingExits = pendingExits; + pendingExits = new ListBuffer<>(); scan(tree.body); resolveBreaks(tree, prevPendingExits); } public void visitSwitch(JCSwitch tree) { - ListBuffer

prevPendingExits = pendingExits; + ListBuffer prevPendingExits = pendingExits; pendingExits = new ListBuffer<>(); int nextadrPrev = nextadr; scanExpr(tree.selector); @@ -2011,7 +2047,7 @@ final Bits uninitsSwitch = new Bits(uninits); boolean hasDefault = false; for (List l = tree.cases; l.nonEmpty(); l = l.tail) { - assignToInits(l.head, initsSwitch); + inits.assign(initsSwitch); uninits.assign(uninits.andSet(uninitsSwitch)); JCCase c = l.head; if (c.pat == null) { @@ -2020,19 +2056,19 @@ scanExpr(c.pat); } if (hasDefault) { - assignToInits(null, initsSwitch); + inits.assign(initsSwitch); uninits.assign(uninits.andSet(uninitsSwitch)); } scan(c.stats); addVars(c.stats, initsSwitch, uninitsSwitch); if (!hasDefault) { - assignToInits(l.head.stats.last(), initsSwitch); + inits.assign(initsSwitch); uninits.assign(uninits.andSet(uninitsSwitch)); } // Warn about fall-through if lint switch fallthrough enabled. } if (!hasDefault) { - andSetInits(null, initsSwitch); + inits.andSet(initsSwitch); } resolveBreaks(tree, prevPendingExits); nextadr = nextadrPrev; @@ -2051,16 +2087,10 @@ } } - boolean isEnabled(Lint.LintCategory lc) { - return false; - } - - void reportWarning(Lint.LintCategory lc, DiagnosticPosition pos, String key, Object ... args) {} - public void visitTry(JCTry tree) { ListBuffer resourceVarDecls = new ListBuffer<>(); final Bits uninitsTryPrev = new Bits(uninitsTry); - ListBuffer

prevPendingExits = pendingExits; + ListBuffer prevPendingExits = pendingExits; pendingExits = new ListBuffer<>(); final Bits initsTry = new Bits(inits); uninitsTry.assign(uninits); @@ -2083,10 +2113,10 @@ int nextadrCatch = nextadr; if (!resourceVarDecls.isEmpty() && - isEnabled(Lint.LintCategory.TRY)) { + lint.isEnabled(Lint.LintCategory.TRY)) { for (JCVariableDecl resVar : resourceVarDecls) { if (unrefdResources.includes(resVar.sym)) { - reportWarning(Lint.LintCategory.TRY, resVar.pos(), + log.warning(Lint.LintCategory.TRY, resVar.pos(), "try.resource.not.referenced", resVar.sym); unrefdResources.remove(resVar.sym); } @@ -2102,7 +2132,7 @@ for (List l = tree.catchers; l.nonEmpty(); l = l.tail) { JCVariableDecl param = l.head.param; - assignToInits(tree.body, initsCatchPrev); + inits.assign(initsCatchPrev); uninits.assign(uninitsCatchPrev); scan(param); /* If this is a TWR and we are executing the code from Gen, @@ -2115,9 +2145,9 @@ nextadr = nextadrCatch; } if (tree.finalizer != null) { - assignToInits(tree.finalizer, initsTry); + inits.assign(initsTry); uninits.assign(uninitsTry); - ListBuffer

exits = pendingExits; + ListBuffer exits = pendingExits; pendingExits = prevPendingExits; scan(tree.finalizer); if (!tree.finallyCanCompleteNormally) { @@ -2127,19 +2157,19 @@ // FIX: this doesn't preserve source order of exits in catch // versus finally! while (exits.nonEmpty()) { - P exit = exits.next(); + AssignPendingExit exit = exits.next(); if (exit.exit_inits != null) { exit.exit_inits.orSet(inits); exit.exit_uninits.andSet(uninits); } pendingExits.append(exit); } - orSetInits(tree, initsEnd); + inits.orSet(initsEnd); } } else { - assignToInits(tree, initsEnd); + inits.assign(initsEnd); uninits.assign(uninitsEnd); - ListBuffer

exits = pendingExits; + ListBuffer exits = pendingExits; pendingExits = prevPendingExits; while (exits.nonEmpty()) pendingExits.append(exits.next()); } @@ -2150,7 +2180,7 @@ scanCond(tree.cond); final Bits initsBeforeElse = new Bits(initsWhenFalse); final Bits uninitsBeforeElse = new Bits(uninitsWhenFalse); - assignToInits(tree.cond, initsWhenTrue); + inits.assign(initsWhenTrue); uninits.assign(uninitsWhenTrue); if (tree.truepart.type.hasTag(BOOLEAN) && tree.falsepart.type.hasTag(BOOLEAN)) { @@ -2163,7 +2193,7 @@ final Bits initsAfterThenWhenFalse = new Bits(initsWhenFalse); final Bits uninitsAfterThenWhenTrue = new Bits(uninitsWhenTrue); final Bits uninitsAfterThenWhenFalse = new Bits(uninitsWhenFalse); - assignToInits(tree.truepart, initsBeforeElse); + inits.assign(initsBeforeElse); uninits.assign(uninitsBeforeElse); scanCond(tree.falsepart); initsWhenTrue.andSet(initsAfterThenWhenTrue); @@ -2174,10 +2204,10 @@ scanExpr(tree.truepart); final Bits initsAfterThen = new Bits(inits); final Bits uninitsAfterThen = new Bits(uninits); - assignToInits(tree.truepart, initsBeforeElse); + inits.assign(initsBeforeElse); uninits.assign(uninitsBeforeElse); scanExpr(tree.falsepart); - andSetInits(tree.falsepart, initsAfterThen); + inits.andSet(initsAfterThen); uninits.andSet(uninitsAfterThen); } } @@ -2186,46 +2216,42 @@ scanCond(tree.cond); final Bits initsBeforeElse = new Bits(initsWhenFalse); final Bits uninitsBeforeElse = new Bits(uninitsWhenFalse); - assignToInits(tree.cond, initsWhenTrue); + inits.assign(initsWhenTrue); uninits.assign(uninitsWhenTrue); scan(tree.thenpart); if (tree.elsepart != null) { final Bits initsAfterThen = new Bits(inits); final Bits uninitsAfterThen = new Bits(uninits); - assignToInits(tree.thenpart, initsBeforeElse); + inits.assign(initsBeforeElse); uninits.assign(uninitsBeforeElse); scan(tree.elsepart); - andSetInits(tree.elsepart, initsAfterThen); + inits.andSet(initsAfterThen); uninits.andSet(uninitsAfterThen); } else { - andSetInits(tree.thenpart, initsBeforeElse); + inits.andSet(initsBeforeElse); uninits.andSet(uninitsBeforeElse); } } - protected P createNewPendingExit(JCTree tree, Bits inits, Bits uninits) { - return null; - } - @Override public void visitBreak(JCBreak tree) { - recordExit(tree, createNewPendingExit(tree, inits, uninits)); + recordExit(new AssignPendingExit(tree, inits, uninits)); } @Override public void visitContinue(JCContinue tree) { - recordExit(tree, createNewPendingExit(tree, inits, uninits)); + recordExit(new AssignPendingExit(tree, inits, uninits)); } @Override public void visitReturn(JCReturn tree) { scanExpr(tree.expr); - recordExit(tree, createNewPendingExit(tree, inits, uninits)); + recordExit(new AssignPendingExit(tree, inits, uninits)); } public void visitThrow(JCThrow tree) { scanExpr(tree.expr); - markDead(tree.expr); + markDead(); } public void visitApply(JCMethodInvocation tree) { @@ -2244,10 +2270,10 @@ final Bits prevUninits = new Bits(uninits); final Bits prevInits = new Bits(inits); int returnadrPrev = returnadr; - ListBuffer

prevPending = pendingExits; + ListBuffer prevPending = pendingExits; try { returnadr = nextadr; - pendingExits = new ListBuffer

(); + pendingExits = new ListBuffer<>(); for (List l = tree.params; l.nonEmpty(); l = l.tail) { JCVariableDecl def = l.head; scan(def); @@ -2263,7 +2289,7 @@ finally { returnadr = returnadrPrev; uninits.assign(prevUninits); - assignToInits(tree, prevInits); + inits.assign(prevInits); pendingExits = prevPending; } } @@ -2279,11 +2305,11 @@ scanCond(tree.cond); uninitsExit.andSet(uninitsWhenTrue); if (tree.detail != null) { - assignToInits(tree, initsWhenFalse); + inits.assign(initsWhenFalse); uninits.assign(uninitsWhenFalse); scanExpr(tree.detail); } - assignToInits(tree, initsExit); + inits.assign(initsExit); uninits.assign(uninitsExit); } @@ -2351,7 +2377,7 @@ scanCond(tree.lhs); final Bits initsWhenFalseLeft = new Bits(initsWhenFalse); final Bits uninitsWhenFalseLeft = new Bits(uninitsWhenFalse); - assignToInits(tree.lhs, initsWhenTrue); + inits.assign(initsWhenTrue); uninits.assign(uninitsWhenTrue); scanCond(tree.rhs); initsWhenFalse.andSet(initsWhenFalseLeft); @@ -2361,7 +2387,7 @@ scanCond(tree.lhs); final Bits initsWhenTrueLeft = new Bits(initsWhenTrue); final Bits uninitsWhenTrueLeft = new Bits(uninitsWhenTrue); - assignToInits(tree.lhs, initsWhenFalse); + inits.assign(initsWhenFalse); uninits.assign(uninitsWhenFalse); scanCond(tree.rhs); initsWhenTrue.andSet(initsWhenTrueLeft); @@ -2436,136 +2462,6 @@ } } - public class AssignAnalyzer extends AbstractAssignAnalyzer { - - public class AssignPendingExit extends AbstractAssignAnalyzer.AbstractAssignPendingExit { - - public AssignPendingExit(JCTree tree, final Bits inits, final Bits uninits) { - super(tree, inits, uninits); - } - } - - @Override - protected AssignPendingExit createNewPendingExit(JCTree tree, - Bits inits, Bits uninits) { - return new AssignPendingExit(tree, inits, uninits); - } - - /** Record an initialization of a trackable variable. - */ - @Override - void letInit(DiagnosticPosition pos, VarSymbol sym) { - if (sym.adr >= firstadr && trackable(sym)) { - if ((sym.flags() & EFFECTIVELY_FINAL) != 0) { - if (!uninits.isMember(sym.adr)) { - //assignment targeting an effectively final variable - //makes the variable lose its status of effectively final - //if the variable is _not_ definitively unassigned - sym.flags_field &= ~EFFECTIVELY_FINAL; - } else { - uninit(sym); - } - } - else if ((sym.flags() & FINAL) != 0) { - if ((sym.flags() & PARAMETER) != 0) { - if ((sym.flags() & UNION) != 0) { //multi-catch parameter - log.error(pos, "multicatch.parameter.may.not.be.assigned", sym); - } - else { - log.error(pos, "final.parameter.may.not.be.assigned", - sym); - } - } else if (!uninits.isMember(sym.adr)) { - log.error(pos, flowKind.errKey, sym); - } else { - uninit(sym); - } - } - inits.incl(sym.adr); - } else if ((sym.flags() & FINAL) != 0) { - log.error(pos, "var.might.already.be.assigned", sym); - } - } - - @Override - void checkInit(DiagnosticPosition pos, VarSymbol sym, String errkey) { - if ((sym.adr >= firstadr || sym.owner.kind != TYP) && - trackable(sym) && - !inits.isMember(sym.adr)) { - log.error(pos, errkey, sym); - inits.incl(sym.adr); - } - } - - @Override - void reportWarning(Lint.LintCategory lc, DiagnosticPosition pos, - String key, Object ... args) { - log.warning(lc, pos, key, args); - } - - @Override - int getLogNumberOfErrors() { - return log.nerrors; - } - - @Override - boolean isEnabled(Lint.LintCategory lc) { - return lint.isEnabled(lc); - } - - @Override - public void visitClassDef(JCClassDecl tree) { - if (tree.sym == null) { - return; - } - - Lint lintPrev = lint; - lint = lint.augment(tree.sym); - try { - super.visitClassDef(tree); - } finally { - lint = lintPrev; - } - } - - @Override - public void visitMethodDef(JCMethodDecl tree) { - if (tree.body == null) { - return; - } - - /* MemberEnter can generate synthetic methods ignore them - */ - if ((tree.sym.flags() & SYNTHETIC) != 0) { - return; - } - - Lint lintPrev = lint; - lint = lint.augment(tree.sym); - try { - super.visitMethodDef(tree); - } finally { - lint = lintPrev; - } - } - - @Override - public void visitVarDef(JCVariableDecl tree) { - if (tree.init == null) { - super.visitVarDef(tree); - } else { - Lint lintPrev = lint; - lint = lint.augment(tree.sym); - try{ - super.visitVarDef(tree); - } finally { - lint = lintPrev; - } - } - } - - } - /** * This pass implements the last step of the dataflow analysis, namely * the effectively-final analysis check. This checks that every local variable @@ -2578,7 +2474,7 @@ JCTree currentTree; //local class or lambda @Override - void markDead(JCTree tree) { + void markDead() { //do nothing } @@ -2715,7 +2611,7 @@ try { attrEnv = env; Flow.this.make = make; - pendingExits = new ListBuffer(); + pendingExits = new ListBuffer<>(); scan(tree); } finally { pendingExits = null; diff -r 628accf3a0d4 -r ed1d445a7b4b src/share/classes/com/sun/tools/javac/util/Bits.java --- a/src/share/classes/com/sun/tools/javac/util/Bits.java Tue Jun 30 16:17:56 2015 +0100 +++ b/src/share/classes/com/sun/tools/javac/util/Bits.java Mon Jul 20 15:30:12 2015 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -84,20 +84,6 @@ } - public enum BitsOpKind { - INIT, - CLEAR, - INCL_BIT, - EXCL_BIT, - ASSIGN, - AND_SET, - OR_SET, - DIFF_SET, - XOR_SET, - INCL_RANGE, - EXCL_RANGE, - } - private final static int wordlen = 32; private final static int wordshift = 5; private final static int wordmask = wordlen - 1;