/*******************************************************************************1* Copyright (c) 1991, 2014 IBM Corp. and others2*3* This program and the accompanying materials are made available under4* the terms of the Eclipse Public License 2.0 which accompanies this5* distribution and is available at https://www.eclipse.org/legal/epl-2.0/6* or the Apache License, Version 2.0 which accompanies this distribution and7* is available at https://www.apache.org/licenses/LICENSE-2.0.8*9* This Source Code may also be made available under the following10* Secondary Licenses when the conditions for such availability set11* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU12* General Public License, version 2 with the GNU Classpath13* Exception [1] and GNU General Public License, version 2 with the14* OpenJDK Assembly Exception [2].15*16* [1] https://www.gnu.org/software/classpath/license.html17* [2] http://openjdk.java.net/legal/assembly-exception.html18*19* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception20*******************************************************************************/2122#include "j9.h"23#include "j9protos.h"2425#include "cache.h"26#include "jitavl.h"2728J9_DECLARE_CONSTANT_UTF8(newInstanceImplName, "newInstanceImpl");29J9_DECLARE_CONSTANT_UTF8(newInstanceImplSig, "(Ljava/lang/Class;)Ljava/lang/Object;");30const J9NameAndSignature newInstanceImplNameAndSig = { (J9UTF8*)&newInstanceImplName, (J9UTF8*)&newInstanceImplSig };3132J9AVLTree * jit_allocate_artifacts(J9PortLibrary * portLibrary)33{34J9AVLTree *artifactAVLTree;35PORT_ACCESS_FROM_PORT(portLibrary);3637artifactAVLTree = (J9AVLTree *) j9mem_allocate_memory(sizeof(J9AVLTree), OMRMEM_CATEGORY_JIT);38if (!artifactAVLTree)39return NULL;40artifactAVLTree->insertionComparator = (IDATA (*)(J9AVLTree *, J9AVLTreeNode *, J9AVLTreeNode *))avl_jit_artifact_insertionCompare;41artifactAVLTree->searchComparator = (IDATA (*)(J9AVLTree *, UDATA, J9AVLTreeNode *))avl_jit_artifact_searchCompare;42artifactAVLTree->genericActionHook = NULL;43artifactAVLTree->flags = 0;44artifactAVLTree->rootNode = 0;45artifactAVLTree->portLibrary = OMRPORT_FROM_J9PORT(PORTLIB);4647return artifactAVLTree;48}4950J9JITHashTable *avl_jit_artifact_insert_existing_table(J9AVLTree * tree, J9JITHashTable * hashTable)51{52avl_insert(tree, (J9AVLTreeNode *) hashTable);53return hashTable;54}55565758