本文整理汇总了Java中it.unimi.dsi.fastutil.longs.Long2ObjectMap.get方法的典型用法代码示例。如果您正苦于以下问题:Java Long2ObjectMap.get方法的具体用法?Java Long2ObjectMap.get怎么用?Java Long2ObjectMap.get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类it.unimi.dsi.fastutil.longs.Long2ObjectMap
的用法示例。
在下文中一共展示了Long2ObjectMap.get方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: convertIdentifiers
import it.unimi.dsi.fastutil.longs.Long2ObjectMap; //导入方法依赖的package包/类
@Override
public void convertIdentifiers(final Long2ObjectMap<ValueSpecification> identifiers) {
if (_inputSpecifications == null) {
if (_inputIdentifiers.length > 0) {
_inputSpecifications = new ValueSpecification[_inputIdentifiers.length];
for (int i = 0; i < _inputIdentifiers.length; i++) {
_inputSpecifications[i] = identifiers.get(_inputIdentifiers[i]);
}
} else {
_inputSpecifications = EMPTY_VALUESPEC;
}
}
if (_outputSpecifications == null) {
if (_outputIdentifiers.length > 0) {
_outputSpecifications = new ValueSpecification[_outputIdentifiers.length];
for (int i = 0; i < _outputIdentifiers.length; i++) {
_outputSpecifications[i] = identifiers.get(_outputIdentifiers[i]);
}
} else {
_outputSpecifications = EMPTY_VALUESPEC;
}
}
}
示例2: canonicalizeAndAddConst
import it.unimi.dsi.fastutil.longs.Long2ObjectMap; //导入方法依赖的package包/类
private void canonicalizeAndAddConst(
ConstType type, int dest, long value, Long2ObjectMap<ConstNumber> table) {
ConstNumber existing = table.get(value);
if (existing != null) {
currentBlock.writeCurrentDefinition(dest, existing.outValue(), ThrowingInfo.NO_THROW);
} else {
Value out = writeRegister(dest, MoveType.fromConstType(type), ThrowingInfo.NO_THROW);
ConstNumber instruction = new ConstNumber(type, out, value);
BasicBlock entryBlock = blocks.get(0);
if (currentBlock != entryBlock) {
// Insert the constant instruction at the start of the block right after the argument
// instructions. It is important that the const instruction is put before any instruction
// that can throw exceptions (since the value could be used on the exceptional edge).
InstructionListIterator it = entryBlock.listIterator();
while (it.hasNext()) {
if (!it.next().isArgument()) {
it.previous();
break;
}
}
it.add(instruction);
} else {
add(instruction);
}
table.put(value, instruction);
}
}