Path: blob/master/runtime/bcutil/bcutil_internal.h
5985 views
/*******************************************************************************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#ifndef bcutil_internal_h23#define bcutil_internal_h2425/**26* @file bcutil_internal.h27* @brief Internal prototypes used within the BCUTIL module.28*29* This file contains implementation-private function prototypes and30* type definitions for the BCUTIL module.31*32*/3334#include "j9.h"35#include "j9comp.h"36#include "bcutil_api.h"3738#ifdef __cplusplus39extern "C" {40#endif4142/* ---------------- bcutil.c ---------------- */4344#if defined(J9VM_OPT_INVARIANT_INTERNING)4546#define BCU_TREE_VERIFY_ASSERT(tree, condition) \47do { \48if (!condition) { \49if (tree != NULL) { \50tree->flags = (tree->flags & (~J9AVLTREE_DO_VERIFY_TREE_STRUCT_AND_ACCESS)); \51} \52Trc_BCU_Assert_TrueTreeVerify(condition); \53} \54} while(0)5556#define BCU_TREE_VERIFY_ASSERT_AND_RETURN_ONFAIL_VOID(tree, condition) \57do { \58if (!condition) { \59if (tree != NULL) { \60tree->flags = (tree->flags & (~J9AVLTREE_DO_VERIFY_TREE_STRUCT_AND_ACCESS)); \61} \62Trc_BCU_Assert_TrueTreeVerify(condition); \63return; \64} \65} while(0)6667#define BCU_TREE_VERIFY_ASSERT_AND_RETURN_ONFAIL_RC(tree, condition, rc) \68do { \69if (!condition) { \70if (tree != NULL) { \71tree->flags = (tree->flags & (~J9AVLTREE_DO_VERIFY_TREE_STRUCT_AND_ACCESS)); \72} \73Trc_BCU_Assert_TrueTreeVerify(condition); \74return rc; \75} \76} while(0)7778#else79#define BCU_TREE_VERIFY_ASSERT(tree, condition)80#define BCU_TREE_VERIFY_ASSERT_AND_RETURN_ONFAIL_VOID(tree, condition)81#define BCU_TREE_VERIFY_ASSERT_AND_RETURN_ONFAIL_RC(tree, condition, rc)82#endif8384J9HashTable*85romClassHashTableNew(J9JavaVM *vm, U_32 initialSize);8687void88romClassHashTableFree(J9HashTable *hashTable);8990UDATA91romClassHashTableAdd(J9HashTable *hashTable, J9ROMClass *value);9293J9ROMClass*94romClassHashTableFind(J9HashTable *hashTable, U_8 *className, UDATA classNameLength);9596void97romClassHashTableReplace(J9HashTable *hashTable, J9ROMClass *originalClass, J9ROMClass *replacementClass);9899UDATA100romClassHashTableDelete(J9HashTable *hashTable, J9ROMClass *romClass);101102void103romVerboseRecordPhaseStart(void *verboseContext, UDATA phase);104105void106romVerboseRecordPhaseEnd(void *verboseContext, UDATA phase);107108#ifdef __cplusplus109}110#endif111112#endif /* bcutil_internal_h */113114115116