diff --git a/vm/jitrino/src/optimizer/abcd/abcd.cpp b/vm/jitrino/src/optimizer/abcd/abcd.cpp index 623d300..1efc499 100644 --- a/vm/jitrino/src/optimizer/abcd/abcd.cpp +++ b/vm/jitrino/src/optimizer/abcd/abcd.cpp @@ -65,7 +65,7 @@ Abcd::readFlags(Action* argSource, AbcdF flags->dryRun = argSource->getBoolArg(p, "abcd.dry_run", false); flags->useAliases = argSource->getBoolArg(p, "abcd.use_aliases", true); flags->useConv = argSource->getBoolArg(p, "abcd.use_conv", true); - flags->remConv = argSource->getBoolArg(p, "abcd.rem_conv", true); + flags->remConv = argSource->getBoolArg(p, "abcd.rem_conv", false); flags->useShr = argSource->getBoolArg(p, "abcd.use_shr", true); flags->unmaskShifts = argSource->getBoolArg(p, "abcd.unmask_shifts", true); flags->remBr = argSource->getBoolArg(p, "abcd.rem_br", true); diff --git a/vm/jitrino/src/optimizer/simplifier.cpp b/vm/jitrino/src/optimizer/simplifier.cpp index c173075..7b39830 100644 --- a/vm/jitrino/src/optimizer/simplifier.cpp +++ b/vm/jitrino/src/optimizer/simplifier.cpp @@ -946,8 +946,8 @@ Simplifier::simplifyAnd(Type* theType, O } else if (ConstantFolder::isConstant(src2->getInst(), val64) && (inst1->getOpcode() == Op_Conv) && (((typeTag1 == Type::Int8) && (((uint64)val64) <= 0xff)) || - ((typeTag2 == Type::Int16) && (((uint64)val64) <= 0xffff)) || - ((typeTag2 == Type::Int32) && (((uint64)val64) <= 0xffffffff)))) { + ((typeTag1 == Type::Int16) && (((uint64)val64) <= 0xffff)) || + ((typeTag1 == Type::Int32) && (((uint64)val64) <= 0xffffffff)))) { Opnd *src1opnd = inst1->getSrc(0); if (src1opnd->getType() == src1->getType()) { return genAnd(theType, src1opnd, src2)->getDst(); @@ -964,8 +964,8 @@ Simplifier::simplifyAnd(Type* theType, O } else if (ConstantFolder::isConstant(src2->getInst(), val32) && (inst1->getOpcode() == Op_Conv) && (((typeTag1 == Type::Int8) && (((uint32)val32) <= 0xff)) || - ((typeTag2 == Type::Int16) && (((uint32)val32) <= 0xffff)) || - ((typeTag2 == Type::Int32) && (((uint32)val32) <= 0xffffffff)))) { + ((typeTag1 == Type::Int16) && (((uint32)val32) <= 0xffff)) || + ((typeTag1 == Type::Int32) && (((uint32)val32) <= 0xffffffff)))) { Opnd *src1opnd = inst1->getSrc(0); if (src1opnd->getType() == src1->getType()) { return genAnd(theType, src1opnd, src2)->getDst(); @@ -984,8 +984,8 @@ Simplifier::simplifyAnd(Type* theType, O } else if (ConstantFolder::isConstant(src2->getInst(), val64) && (inst1->getOpcode() == Op_TauLdInd) && (((typeTag1 == Type::UInt8) && (((uint64)val64) == 0xff)) || - ((typeTag2 == Type::UInt16) && (((uint64)val64) == 0xffff)) || - ((typeTag2 == Type::UInt32) && (((uint64)val64) == 0xffffffff)))) { + ((typeTag1 == Type::UInt16) && (((uint64)val64) == 0xffff)) || + ((typeTag1 == Type::UInt32) && (((uint64)val64) == 0xffffffff)))) { if (theType == src1->getType()) { return src1; } @@ -1000,8 +1000,8 @@ Simplifier::simplifyAnd(Type* theType, O } else if (ConstantFolder::isConstant(src2->getInst(), val32) && (inst1->getOpcode() == Op_TauLdInd) && (((typeTag1 == Type::UInt8) && (((uint32)val32) == 0xff)) || - ((typeTag2 == Type::UInt16) && (((uint32)val32) == 0xffff)) || - ((typeTag2 == Type::UInt32) && (((uint32)val32) == 0xffffffff)))) { + ((typeTag1 == Type::UInt16) && (((uint32)val32) == 0xffff)) || + ((typeTag1 == Type::UInt32) && (((uint32)val32) == 0xffffffff)))) { if (theType == src1->getType()) { return src1; } diff --git a/vm/jitrino/src/translator/java/JavaByteCodeTranslator.cpp b/vm/jitrino/src/translator/java/JavaByteCodeTranslator.cpp index 6b00a85..05df3c5 100644 --- a/vm/jitrino/src/translator/java/JavaByteCodeTranslator.cpp +++ b/vm/jitrino/src/translator/java/JavaByteCodeTranslator.cpp @@ -885,8 +885,17 @@ JavaByteCodeTranslator::ldc(uint32 const Type* constantType = compilationInterface.getConstantType(&methodToCompile,constPoolIndex); Opnd* opnd = NULL; - if (constantType->isSystemString() || constantType->isSystemClass()) { + if (constantType->isSystemString()) { opnd = irBuilder.genLdRef(&methodToCompile,constPoolIndex,constantType); + } else if (constantType->isSystemClass()) { + NamedType *literalType = resolveType(constPoolIndex); + if (!literalType) { + linkingException(constPoolIndex, OPCODE_LDC); + pushOpnd(irBuilder.genLdNull()); + return; + } else { + opnd = irBuilder.genLdRef(&methodToCompile,constPoolIndex,constantType); + } } else { const void* constantAddress = compilationInterface.getConstantValue(&methodToCompile,constPoolIndex);