< prev index next >

src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/MethodGenerator.java

Print this page

        

@@ -1,8 +1,8 @@
 /*
  * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
- * @LastModified: Oct 2017
+ * @LastModified: Nov 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.

@@ -862,11 +862,11 @@
         do {
             // Get the next instruction.  The loop will perform one extra
             // iteration after it reaches the end of the InstructionList, with
             // currentHandle set to null.
             currentHandle = instructions.hasNext()
-                                    ? (InstructionHandle) instructions.next()
+                                    ? instructions.next()
                                     : null;
             Instruction inst =
                     (currentHandle != null) ? currentHandle.getInstruction()
                                             : null;
 

@@ -902,18 +902,17 @@
                 // marks the end of a chunk that contained child chunks.
                 // Those children might need to be examined below in case they
                 // are better candidates for outlining than the current chunk.
                 if (!openChunkAtCurrLevel) {
                     nestedSubChunks = currLevelChunks;
-                    currLevelChunks = (List<InstructionHandle>)subChunkStack.pop();
+                    currLevelChunks = subChunkStack.pop();
                 }
 
                 // Get the handle for the start of this chunk (the last entry
                 // in currLevelChunks)
                 InstructionHandle chunkStart =
-                        (InstructionHandle) currLevelChunks.get(
-                                                      currLevelChunks.size()-1);
+                        currLevelChunks.get(currLevelChunks.size()-1);
 
                 int chunkEndPosition =
                         (currentHandle != null) ? currentHandle.getPosition()
                                                 : totalMethodSize;
                 int chunkSize = chunkEndPosition - chunkStart.getPosition();

@@ -938,16 +937,12 @@
                         if (childChunkCount > 0) {
                             Chunk[] childChunks = new Chunk[childChunkCount];
 
                             // Gather all the child chunks of the current chunk
                             for (int i = 0; i < childChunkCount; i++) {
-                                InstructionHandle start =
-                                    (InstructionHandle) nestedSubChunks
-                                                            .get(i*2);
-                                InstructionHandle end =
-                                    (InstructionHandle) nestedSubChunks
-                                                            .get(i*2+1);
+                                InstructionHandle start = nestedSubChunks.get(i*2);
+                                InstructionHandle end = nestedSubChunks.get(i*2+1);
 
                                 childChunks[i] = new Chunk(start, end);
                             }
 
                             // Merge adjacent siblings

@@ -1166,11 +1161,11 @@
             // outlined all or the original method comes in under the JVM
             // limit on the size of a method.
             for (int i = candidateChunks.size()-1;
                  i >= 0 && currentMethodSize > TARGET_METHOD_SIZE;
                  i--) {
-                Chunk chunkToOutline = (Chunk)candidateChunks.get(i);
+                Chunk chunkToOutline = candidateChunks.get(i);
 
                 methodsOutlined.add(outline(chunkToOutline.getChunkStart(),
                                             chunkToOutline.getChunkEnd(),
                                             originalMethodName + "$outline$"
                                                                + outlinedCount,
< prev index next >