@Nonnull public RegisterType merge(@Nonnull RegisterType other) { if (other.equals(this)) { return this;
protected boolean setPostRegisterType(int registerNumber, RegisterType registerType) { assert registerNumber >= 0 && registerNumber < postRegisterMap.length; assert registerType != null; RegisterType oldRegisterType = postRegisterMap[registerNumber]; if (oldRegisterType.equals(registerType)) { return false; } postRegisterMap[registerNumber] = registerType; return true; }
/** * Sets the "post-instruction" register type as indicated. * @param registerNumber Which register to set * @param registerType The "post-instruction" register type * @return true if the given register type is different than the existing post-instruction register type */ protected boolean setPostRegisterType(int registerNumber, RegisterType registerType) { assert registerNumber >= 0 && registerNumber < postRegisterMap.length; assert registerType != null; RegisterType oldRegisterType = postRegisterMap[registerNumber]; if (oldRegisterType.equals(registerType)) { return false; } postRegisterMap[registerNumber] = registerType; return true; }
/** * Sets the "post-instruction" register type as indicated. * @param registerNumber Which register to set * @param registerType The "post-instruction" register type * @return true if the given register type is different than the existing post-instruction register type */ protected boolean setPostRegisterType(int registerNumber, RegisterType registerType) { assert registerNumber >= 0 && registerNumber < postRegisterMap.length; assert registerType != null; RegisterType oldRegisterType = postRegisterMap[registerNumber]; if (oldRegisterType.equals(registerType)) { return false; } postRegisterMap[registerNumber] = registerType; return true; }
private void addDestRegs(BitSet printPostRegister, int registerCount) { for (int registerNum=0; registerNum<registerCount; registerNum++) { if (!analyzedInstruction.getPreInstructionRegisterType(registerNum).equals( analyzedInstruction.getPostInstructionRegisterType(registerNum))) { printPostRegister.set(registerNum); } } }
private void addDestRegs(BitSet printPostRegister, int registerCount) { for (int registerNum=0; registerNum<registerCount; registerNum++) { if (!analyzedInstruction.getPreInstructionRegisterType(registerNum).equals( analyzedInstruction.getPostInstructionRegisterType(registerNum))) { printPostRegister.set(registerNum); } } }
private void addDestRegs(BitSet printPostRegister, int registerCount) { for (int registerNum=0; registerNum<registerCount; registerNum++) { if (!analyzedInstruction.getPreInstructionRegisterType(registerNum).equals( analyzedInstruction.getPostInstructionRegisterType(registerNum))) { printPostRegister.set(registerNum); } } }
private void addDestRegs(BitSet printPostRegister, int registerCount) { for (int registerNum=0; registerNum<registerCount; registerNum++) { if (!analyzedInstruction.getPreInstructionRegisterType(registerNum).equals( analyzedInstruction.getPostInstructionRegisterType(registerNum))) { printPostRegister.set(registerNum); } } }
protected boolean mergeRegister(int registerNumber, RegisterType registerType, BitSet verifiedInstructions) { assert registerNumber >= 0 && registerNumber < postRegisterMap.length; assert registerType != null; RegisterType oldRegisterType = preRegisterMap[registerNumber]; RegisterType mergedRegisterType = oldRegisterType.merge(registerType); if (mergedRegisterType.equals(oldRegisterType)) { return false; } preRegisterMap[registerNumber] = mergedRegisterType; verifiedInstructions.clear(instructionIndex); if (!setsRegister(registerNumber)) { postRegisterMap[registerNumber] = mergedRegisterType; return true; } return false; }
@Nonnull public RegisterType merge(@Nonnull RegisterType other) { if (other.equals(this)) { return this;
@Nonnull public RegisterType merge(@Nonnull RegisterType other) { if (other.equals(this)) { return this;
protected boolean mergeRegister(int registerNumber, RegisterType registerType, BitSet verifiedInstructions, boolean override) { assert registerNumber >= 0 && registerNumber < postRegisterMap.length; assert registerType != null; RegisterType oldRegisterType = preRegisterMap[registerNumber]; RegisterType mergedRegisterType; if (override) { mergedRegisterType = getMergedPreRegisterTypeFromPredecessors(registerNumber); } else { mergedRegisterType = oldRegisterType.merge(registerType); } if (mergedRegisterType.equals(oldRegisterType)) { return false; } preRegisterMap[registerNumber] = mergedRegisterType; verifiedInstructions.clear(instructionIndex); if (!setsRegister(registerNumber)) { postRegisterMap[registerNumber] = mergedRegisterType; return true; } return false; }
protected boolean mergeRegister(int registerNumber, RegisterType registerType, BitSet verifiedInstructions, boolean override) { assert registerNumber >= 0 && registerNumber < postRegisterMap.length; assert registerType != null; RegisterType oldRegisterType = preRegisterMap[registerNumber]; RegisterType mergedRegisterType; if (override) { mergedRegisterType = getMergedPreRegisterTypeFromPredecessors(registerNumber); } else { mergedRegisterType = oldRegisterType.merge(registerType); } if (mergedRegisterType.equals(oldRegisterType)) { return false; } preRegisterMap[registerNumber] = mergedRegisterType; verifiedInstructions.clear(instructionIndex); if (!setsRegister(registerNumber)) { postRegisterMap[registerNumber] = mergedRegisterType; return true; } return false; }
private void addMergeRegs(BitSet registers, int registerCount) { if (analyzedInstruction.getPredecessorCount() <= 1) { //in the common case of an instruction that only has a single predecessor which is the previous //instruction, the pre-instruction registers will always match the previous instruction's //post-instruction registers return; } for (int registerNum=0; registerNum<registerCount; registerNum++) { RegisterType mergedRegisterType = analyzedInstruction.getPreInstructionRegisterType(registerNum); for (AnalyzedInstruction predecessor: analyzedInstruction.getPredecessors()) { RegisterType predecessorRegisterType = predecessor.getPostInstructionRegisterType(registerNum); if (predecessorRegisterType.category != RegisterType.UNKNOWN && !predecessorRegisterType.equals(mergedRegisterType)) { registers.set(registerNum); } } } }
private void addMergeRegs(BitSet registers, int registerCount) { if (analyzedInstruction.getPredecessorCount() <= 1) { //in the common case of an instruction that only has a single predecessor which is the previous //instruction, the pre-instruction registers will always match the previous instruction's //post-instruction registers return; } for (int registerNum=0; registerNum<registerCount; registerNum++) { RegisterType mergedRegisterType = analyzedInstruction.getPreInstructionRegisterType(registerNum); for (AnalyzedInstruction predecessor: analyzedInstruction.getPredecessors()) { RegisterType predecessorRegisterType = predecessor.getPostInstructionRegisterType(registerNum); if (predecessorRegisterType.category != RegisterType.UNKNOWN && !predecessorRegisterType.equals(mergedRegisterType)) { registers.set(registerNum); } } } }
private void addMergeRegs(BitSet registers, int registerCount) { if (analyzedInstruction.getPredecessorCount() <= 1) { //in the common case of an instruction that only has a single predecessor which is the previous //instruction, the pre-instruction registers will always match the previous instruction's //post-instruction registers return; } for (int registerNum=0; registerNum<registerCount; registerNum++) { RegisterType mergedRegisterType = analyzedInstruction.getPreInstructionRegisterType(registerNum); for (AnalyzedInstruction predecessor: analyzedInstruction.getPredecessors()) { RegisterType predecessorRegisterType = analyzedInstruction.getPredecessorRegisterType( predecessor, registerNum); if (predecessorRegisterType.category != RegisterType.UNKNOWN && !predecessorRegisterType.equals(mergedRegisterType)) { registers.set(registerNum); } } } }
private void addMergeRegs(BitSet registers, int registerCount) { if (analyzedInstruction.getPredecessorCount() <= 1) { //in the common case of an instruction that only has a single predecessor which is the previous //instruction, the pre-instruction registers will always match the previous instruction's //post-instruction registers return; } for (int registerNum=0; registerNum<registerCount; registerNum++) { RegisterType mergedRegisterType = analyzedInstruction.getPreInstructionRegisterType(registerNum); for (AnalyzedInstruction predecessor: analyzedInstruction.getPredecessors()) { RegisterType predecessorRegisterType = analyzedInstruction.getPredecessorRegisterType( predecessor, registerNum); if (predecessorRegisterType.category != RegisterType.UNKNOWN && !predecessorRegisterType.equals(mergedRegisterType)) { registers.set(registerNum); } } } }
preInstructionRegisterType.category == RegisterType.UNINIT_THIS) { RegisterType registerType; if (preInstructionRegisterType.equals(objectRegisterType)) { registerType = analyzedInstruction.postRegisterMap[objectRegister]; } else {