< prev index next >
src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/MethodGenerator.java
Print this page
*** 1,8 ****
/*
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
! * @LastModified: Oct 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.
--- 1,8 ----
/*
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
! * @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,872 ****
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()
: null;
Instruction inst =
(currentHandle != null) ? currentHandle.getInstruction()
: null;
--- 862,872 ----
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()
! ? instructions.next()
: null;
Instruction inst =
(currentHandle != null) ? currentHandle.getInstruction()
: null;
*** 902,919 ****
// 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();
}
// Get the handle for the start of this chunk (the last entry
// in currLevelChunks)
InstructionHandle chunkStart =
! (InstructionHandle) currLevelChunks.get(
! currLevelChunks.size()-1);
int chunkEndPosition =
(currentHandle != null) ? currentHandle.getPosition()
: totalMethodSize;
int chunkSize = chunkEndPosition - chunkStart.getPosition();
--- 902,918 ----
// 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 = subChunkStack.pop();
}
// Get the handle for the start of this chunk (the last entry
// in currLevelChunks)
InstructionHandle chunkStart =
! currLevelChunks.get(currLevelChunks.size()-1);
int chunkEndPosition =
(currentHandle != null) ? currentHandle.getPosition()
: totalMethodSize;
int chunkSize = chunkEndPosition - chunkStart.getPosition();
*** 938,953 ****
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);
childChunks[i] = new Chunk(start, end);
}
// Merge adjacent siblings
--- 937,948 ----
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 = nestedSubChunks.get(i*2);
! InstructionHandle end = nestedSubChunks.get(i*2+1);
childChunks[i] = new Chunk(start, end);
}
// Merge adjacent siblings
*** 1166,1176 ****
// 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);
methodsOutlined.add(outline(chunkToOutline.getChunkStart(),
chunkToOutline.getChunkEnd(),
originalMethodName + "$outline$"
+ outlinedCount,
--- 1161,1171 ----
// 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 = candidateChunks.get(i);
methodsOutlined.add(outline(chunkToOutline.getChunkStart(),
chunkToOutline.getChunkEnd(),
originalMethodName + "$outline$"
+ outlinedCount,
< prev index next >