Search in sources :

Example 1 with J9AVLTreePointer

use of com.ibm.j9ddr.vm29.pointer.generated.J9AVLTreePointer in project openj9 by eclipse.

the class JITLook method jit_artifact_search.

public static J9JITExceptionTablePointer jit_artifact_search(J9AVLTreePointer tree, UDATA searchValue) throws CorruptDataException {
    /* find the right hash table to look in */
    AVLTree localTree = AVLTree.fromJ9AVLTreePointer(tree, new JITArtifactSearchCompare());
    J9JITHashTablePointer table = J9JITHashTablePointer.cast(localTree.search(searchValue));
    if (table.notNull()) {
        /* return the result of looking in the correct hash table */
        return hash_jit_artifact_search(table, searchValue);
    }
    return J9JITExceptionTablePointer.NULL;
}
Also used : J9JITHashTablePointer(com.ibm.j9ddr.vm29.pointer.generated.J9JITHashTablePointer)

Example 2 with J9AVLTreePointer

use of com.ibm.j9ddr.vm29.pointer.generated.J9AVLTreePointer in project openj9 by eclipse.

the class HashTable_V1 method hashTableFindNodeInTree.

private VoidPointer hashTableFindNodeInTree(J9HashTablePointer table, StructType entry, PointerPointer head) throws CorruptDataException {
    J9AVLTreePointer tree = avlTreeUntag(head.at(0));
    AVLTree avlTree = AVLTree.fromJ9AVLTreePointer(tree, _avlTreeComparatorFunction);
    J9AVLTreeNodePointer searchResult = avlTree.search(UDATA.cast(entry));
    if (searchResult.notNull()) {
        return avlNodeToData(searchResult);
    } else {
        return VoidPointer.NULL;
    }
}
Also used : J9AVLTreePointer(com.ibm.j9ddr.vm29.pointer.generated.J9AVLTreePointer) J9AVLTreeNodePointer(com.ibm.j9ddr.vm29.pointer.generated.J9AVLTreeNodePointer)

Aggregations

J9AVLTreeNodePointer (com.ibm.j9ddr.vm29.pointer.generated.J9AVLTreeNodePointer)1 J9AVLTreePointer (com.ibm.j9ddr.vm29.pointer.generated.J9AVLTreePointer)1 J9JITHashTablePointer (com.ibm.j9ddr.vm29.pointer.generated.J9JITHashTablePointer)1