# HG changeset patch # User Doug Simon # Date 1411735386 -7200 # Node ID 4cbf3ab4b7d273e02ec77fde8d25abef6b4053e7 # Parent c1d10773331fcabc73a213d029d9b765f2ae9a2f added graal-truffle.jar to the classes checked by CheckGraalInvariants diff -r c1d10773331f -r 4cbf3ab4b7d2 graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/CheckGraalInvariants.java --- a/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/CheckGraalInvariants.java Fri Sep 26 09:22:45 2014 +0200 +++ b/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/CheckGraalInvariants.java Fri Sep 26 14:43:06 2014 +0200 @@ -75,28 +75,31 @@ bootclasspath.split(File.pathSeparator); - String graalJar = null; - for (String e : bootclasspath.split(File.pathSeparator)) { - if (e.endsWith("graal.jar")) { - graalJar = e; - break; - } - } - Assert.assertNotNull("Could not find graal.jar on boot class path: " + bootclasspath, graalJar); + final List classNames = new ArrayList<>(); + for (String jarName : new String[]{"graal.jar", "graal-truffle.jar"}) { - final List classNames = new ArrayList<>(); - try { - final ZipFile zipFile = new ZipFile(new File(graalJar)); - for (final Enumeration e = zipFile.entries(); e.hasMoreElements();) { - final ZipEntry zipEntry = e.nextElement(); - String name = zipEntry.getName(); - if (name.endsWith(".class")) { - String className = name.substring(0, name.length() - ".class".length()).replace('/', '.'); - classNames.add(className); + String jar = null; + for (String e : bootclasspath.split(File.pathSeparator)) { + if (e.endsWith(jarName)) { + jar = e; + break; } } - } catch (IOException e) { - Assert.fail(e.toString()); + Assert.assertNotNull("Could not find graal.jar on boot class path: " + bootclasspath, jar); + + try { + final ZipFile zipFile = new ZipFile(new File(jar)); + for (final Enumeration e = zipFile.entries(); e.hasMoreElements();) { + final ZipEntry zipEntry = e.nextElement(); + String name = zipEntry.getName(); + if (name.endsWith(".class")) { + String className = name.substring(0, name.length() - ".class".length()).replace('/', '.'); + classNames.add(className); + } + } + } catch (IOException e) { + Assert.fail(e.toString()); + } } // Allows a subset of methods to be checked through use of a system property @@ -131,8 +134,9 @@ boolean verifyEquals = !m.isAnnotationPresent(ExcludeFromIdentityComparisonVerification.class); if (matches(filters, methodName)) { executor.execute(() -> { - StructuredGraph graph = new StructuredGraph(metaAccess.lookupJavaMethod(m)); - try (DebugConfigScope s = Debug.setConfig(new DelegatingDebugConfig().disable(INTERCEPT))) { + ResolvedJavaMethod method = metaAccess.lookupJavaMethod(m); + StructuredGraph graph = new StructuredGraph(method); + try (DebugConfigScope s = Debug.setConfig(new DelegatingDebugConfig().disable(INTERCEPT)); Debug.Scope ds = Debug.scope("CheckingGraph", graph, method)) { graphBuilderSuite.apply(graph, context); // update phi stamps graph.getNodes().filter(PhiNode.class).forEach(PhiNode::inferStamp);