Path: blob/aarch64-shenandoah-jdk8u272-b10/hotspot/src/share/vm/adlc/adlc.hpp
32285 views
/*1* Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*22*/2324#ifndef SHARE_VM_ADLC_ADLC_HPP25#define SHARE_VM_ADLC_ADLC_HPP2627//28// Standard include file for ADLC parser29//3031// standard library constants32#include "stdio.h"33#include "stdlib.h"34#include <iostream>35#include "string.h"36#include "ctype.h"37#include "stdarg.h"38#include <sys/types.h>3940#if _MSC_VER >= 130041using namespace std;42#endif4344#if _MSC_VER >= 140045#define strdup _strdup46#endif4748/* Make sure that we have the intptr_t and uintptr_t definitions */49#ifdef _WIN3250#ifndef _INTPTR_T_DEFINED51#ifdef _WIN6452typedef __int64 intptr_t;53#else54typedef int intptr_t;55#endif56#define _INTPTR_T_DEFINED57#endif5859#ifndef _UINTPTR_T_DEFINED60#ifdef _WIN6461typedef unsigned __int64 uintptr_t;62#else63typedef unsigned int uintptr_t;64#endif65#define _UINTPTR_T_DEFINED66#endif67#endif // _WIN326869#if defined(LINUX) || defined(_ALLBSD_SOURCE)70#include <inttypes.h>71#endif // LINUX || _ALLBSD_SOURCE7273// Macros74#define uint32 unsigned int75#define uint unsigned int7677// VM components78#include "opto/opcodes.hpp"7980// Macros81// Debugging note: Put a breakpoint on "abort".82#undef assert83#define assert(cond, msg) { if (!(cond)) { fprintf(stderr, "assert fails %s %d: %s\n", __FILE__, __LINE__, msg); abort(); }}84#undef max85#define max(a, b) (((a)>(b)) ? (a) : (b))8687// ADLC components88#include "arena.hpp"89#include "opto/adlcVMDeps.hpp"90#include "filebuff.hpp"91#include "dict2.hpp"92#include "forms.hpp"93#include "formsopt.hpp"94#include "formssel.hpp"95#include "archDesc.hpp"96#include "adlparse.hpp"9798// globally define ArchDesc for convenience. Alternatively every form99// could have a backpointer to the AD but it's too complicated to pass100// it everywhere it needs to be available.101extern ArchDesc* globalAD;102103#endif // SHARE_VM_ADLC_ADLC_HPP104105106