0N/A/*
2105N/A * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
0N/A * published by the Free Software Foundation.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1472N/A * or visit www.oracle.com if you need additional information or have any
1472N/A * questions.
0N/A *
0N/A */
0N/A
1879N/A#ifndef SHARE_VM_ADLC_ADLC_HPP
1879N/A#define SHARE_VM_ADLC_ADLC_HPP
1879N/A
0N/A//
0N/A// Standard include file for ADLC parser
0N/A//
0N/A
0N/A// standard library constants
0N/A#include "stdio.h"
0N/A#include "stdlib.h"
0N/A#include <iostream>
0N/A#include "string.h"
0N/A#include "ctype.h"
0N/A#include "stdarg.h"
0N/A#include <sys/types.h>
0N/A
0N/A#if _MSC_VER >= 1300
0N/Ausing namespace std;
0N/A#endif
0N/A
645N/A#if _MSC_VER >= 1400
0N/A#define strdup _strdup
0N/A#endif
0N/A
0N/A/* Make sure that we have the intptr_t and uintptr_t definitions */
0N/A#ifdef _WIN32
0N/A#ifndef _INTPTR_T_DEFINED
0N/A#ifdef _WIN64
0N/Atypedef __int64 intptr_t;
0N/A#else
0N/Atypedef int intptr_t;
0N/A#endif
0N/A#define _INTPTR_T_DEFINED
0N/A#endif
0N/A
0N/A#ifndef _UINTPTR_T_DEFINED
0N/A#ifdef _WIN64
0N/Atypedef unsigned __int64 uintptr_t;
0N/A#else
0N/Atypedef unsigned int uintptr_t;
0N/A#endif
0N/A#define _UINTPTR_T_DEFINED
0N/A#endif
0N/A#endif // _WIN32
0N/A
2796N/A#if defined(LINUX) || defined(_ALLBSD_SOURCE)
0N/A #include <inttypes.h>
2796N/A#endif // LINUX || _ALLBSD_SOURCE
0N/A
0N/A// Macros
0N/A#define uint32 unsigned int
0N/A#define uint unsigned int
0N/A
1879N/A// VM components
1879N/A#include "opto/opcodes.hpp"
1879N/A
0N/A// Macros
0N/A// Debugging note: Put a breakpoint on "abort".
603N/A#undef assert
0N/A#define assert(cond, msg) { if (!(cond)) { fprintf(stderr, "assert fails %s %d: %s\n", __FILE__, __LINE__, msg); abort(); }}
1879N/A#undef max
0N/A#define max(a, b) (((a)>(b)) ? (a) : (b))
0N/A
0N/A// ADLC components
0N/A#include "arena.hpp"
1879N/A#include "opto/adlcVMDeps.hpp"
0N/A#include "filebuff.hpp"
0N/A#include "dict2.hpp"
0N/A#include "forms.hpp"
0N/A#include "formsopt.hpp"
0N/A#include "formssel.hpp"
0N/A#include "archDesc.hpp"
0N/A#include "adlparse.hpp"
0N/A
0N/A// globally define ArchDesc for convenience. Alternatively every form
0N/A// could have a backpointer to the AD but it's too complicated to pass
0N/A// it everywhere it needs to be available.
0N/Aextern ArchDesc* globalAD;
1879N/A
1879N/A#endif // SHARE_VM_ADLC_ADLC_HPP