@Nonnull private AnalyzedInstruction[] buildExceptionHandlerArray(@Nonnull TryBlock<? extends ExceptionHandler> tryBlock) { List<? extends ExceptionHandler> exceptionHandlers = tryBlock.getExceptionHandlers(); AnalyzedInstruction[] handlerInstructions = new AnalyzedInstruction[exceptionHandlers.size()]; for (int i=0; i<exceptionHandlers.size(); i++) { handlerInstructions[i] = analyzedInstructions.get(exceptionHandlers.get(i).getHandlerCodeAddress()); } return handlerInstructions; }
@Override @Nullable public FieldReference getFieldByOffset(int fieldOffset) { if (getInstanceFields().size() == 0) { return null; } return getInstanceFields().get(fieldOffset); }
@Bench public void timeLookupSparseArray() { Object value = null; for (int i = 0; i < data.length; i++) { int key = mySparse.keyAt(i); value = mySparse.get(key); } value.toString(); }
@Bench public void timeInsertAndLookupSparseArray() { SparseArray<Object> sparse = new SparseArray<Object>(); Object value = null; for (int i = 0; i < data.length; i++) { sparse.put(i, data[i]); // int key = sparse.keyAt(i); value = sparse.get(i); } value.toString(); }
AnalyzedInstruction analyzedSwitchPayload = analyzedInstructions.get( instructionCodeAddress + offsetInstruction.getCodeOffset()); if (analyzedSwitchPayload == null) { AnalyzedInstruction targetInstruction = analyzedInstructions.get(instructionCodeAddress + switchElement.getOffset()); if (targetInstruction == null) { AnalyzedInstruction targetInstruction = analyzedInstructions.get(instructionCodeAddress + targetAddressOffset); addPredecessorSuccessor(instruction, targetInstruction, exceptionHandlers, instructionsToProcess);
AnalyzedInstruction branchInstruction = analyzedInstructions.get(nextAddress);
/** * Gets the Object mapped from the specified key, or <code>null</code> * if no such mapping has been made. */ public E get(int key) { return get(key, null); }
/** * Gets the Object mapped from the specified key, or <code>null</code> * if no such mapping has been made. */ public E get(int key) { return get(key, null); }
/** * Gets the Object mapped from the specified key, or <code>null</code> * if no such mapping has been made. */ public E get(int key) { return get(key, null); }
@Nonnull private AnalyzedInstruction[] buildExceptionHandlerArray(@Nonnull TryBlock<? extends ExceptionHandler> tryBlock) { List<? extends ExceptionHandler> exceptionHandlers = tryBlock.getExceptionHandlers(); AnalyzedInstruction[] handlerInstructions = new AnalyzedInstruction[exceptionHandlers.size()]; for (int i=0; i<exceptionHandlers.size(); i++) { handlerInstructions[i] = analyzedInstructions.get(exceptionHandlers.get(i).getHandlerCodeAddress()); } return handlerInstructions; }
@Nonnull private AnalyzedInstruction[] buildExceptionHandlerArray(@Nonnull TryBlock<? extends ExceptionHandler> tryBlock) { List<? extends ExceptionHandler> exceptionHandlers = tryBlock.getExceptionHandlers(); AnalyzedInstruction[] handlerInstructions = new AnalyzedInstruction[exceptionHandlers.size()]; for (int i=0; i<exceptionHandlers.size(); i++) { handlerInstructions[i] = analyzedInstructions.get(exceptionHandlers.get(i).getHandlerCodeAddress()); } return handlerInstructions; }
@Override @Nullable public FieldReference getFieldByOffset(int fieldOffset) { if (getInstanceFields().size() == 0) { return null; } return getInstanceFields().get(fieldOffset); }
@Override @Nullable public FieldReference getFieldByOffset(int fieldOffset) { if (getInstanceFields().size() == 0) { return null; } return getInstanceFields().get(fieldOffset); }
SwitchPayload switchPayload = (SwitchPayload)analyzedInstructions.get(instructionCodeAddress + offsetInstruction.getCodeOffset()).instruction; for (SwitchElement switchElement: switchPayload.getSwitchElements()) { AnalyzedInstruction targetInstruction = analyzedInstructions.get(instructionCodeAddress + switchElement.getOffset()); AnalyzedInstruction targetInstruction = analyzedInstructions.get(instructionCodeAddress + targetAddressOffset); addPredecessorSuccessor(instruction, targetInstruction, exceptionHandlers, instructionsToProcess);
AnalyzedInstruction analyzedSwitchPayload = analyzedInstructions.get( instructionCodeAddress + offsetInstruction.getCodeOffset()); if (analyzedSwitchPayload == null) { AnalyzedInstruction targetInstruction = analyzedInstructions.get(instructionCodeAddress + switchElement.getOffset()); if (targetInstruction == null) { AnalyzedInstruction targetInstruction = analyzedInstructions.get(instructionCodeAddress + targetAddressOffset); addPredecessorSuccessor(instruction, targetInstruction, exceptionHandlers, instructionsToProcess);
AnalyzedInstruction branchInstruction = analyzedInstructions.get(nextAddress);