src/share/vm/adlc/adlc.hpp

changeset 0
f90c822e73f8
child 6876
710a3c8b516e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/share/vm/adlc/adlc.hpp	Wed Apr 27 01:25:04 2016 +0800
     1.3 @@ -0,0 +1,104 @@
     1.4 +/*
     1.5 + * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
     1.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.7 + *
     1.8 + * This code is free software; you can redistribute it and/or modify it
     1.9 + * under the terms of the GNU General Public License version 2 only, as
    1.10 + * published by the Free Software Foundation.
    1.11 + *
    1.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
    1.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    1.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    1.15 + * version 2 for more details (a copy is included in the LICENSE file that
    1.16 + * accompanied this code).
    1.17 + *
    1.18 + * You should have received a copy of the GNU General Public License version
    1.19 + * 2 along with this work; if not, write to the Free Software Foundation,
    1.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1.21 + *
    1.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    1.23 + * or visit www.oracle.com if you need additional information or have any
    1.24 + * questions.
    1.25 + *
    1.26 + */
    1.27 +
    1.28 +#ifndef SHARE_VM_ADLC_ADLC_HPP
    1.29 +#define SHARE_VM_ADLC_ADLC_HPP
    1.30 +
    1.31 +//
    1.32 +// Standard include file for ADLC parser
    1.33 +//
    1.34 +
    1.35 +// standard library constants
    1.36 +#include "stdio.h"
    1.37 +#include "stdlib.h"
    1.38 +#include <iostream>
    1.39 +#include "string.h"
    1.40 +#include "ctype.h"
    1.41 +#include "stdarg.h"
    1.42 +#include <sys/types.h>
    1.43 +
    1.44 +#if _MSC_VER >= 1300
    1.45 +using namespace std;
    1.46 +#endif
    1.47 +
    1.48 +#if _MSC_VER >= 1400
    1.49 +#define strdup _strdup
    1.50 +#endif
    1.51 +
    1.52 +/* Make sure that we have the intptr_t and uintptr_t definitions */
    1.53 +#ifdef _WIN32
    1.54 +#ifndef _INTPTR_T_DEFINED
    1.55 +#ifdef _WIN64
    1.56 +typedef __int64 intptr_t;
    1.57 +#else
    1.58 +typedef int intptr_t;
    1.59 +#endif
    1.60 +#define _INTPTR_T_DEFINED
    1.61 +#endif
    1.62 +
    1.63 +#ifndef _UINTPTR_T_DEFINED
    1.64 +#ifdef _WIN64
    1.65 +typedef unsigned __int64 uintptr_t;
    1.66 +#else
    1.67 +typedef unsigned int uintptr_t;
    1.68 +#endif
    1.69 +#define _UINTPTR_T_DEFINED
    1.70 +#endif
    1.71 +#endif // _WIN32
    1.72 +
    1.73 +#if defined(LINUX) || defined(_ALLBSD_SOURCE)
    1.74 +  #include <inttypes.h>
    1.75 +#endif // LINUX || _ALLBSD_SOURCE
    1.76 +
    1.77 +// Macros
    1.78 +#define uint32 unsigned int
    1.79 +#define uint   unsigned int
    1.80 +
    1.81 +// VM components
    1.82 +#include "opto/opcodes.hpp"
    1.83 +
    1.84 +// Macros
    1.85 +// Debugging note:  Put a breakpoint on "abort".
    1.86 +#undef assert
    1.87 +#define assert(cond, msg) { if (!(cond)) { fprintf(stderr, "assert fails %s %d: %s\n", __FILE__, __LINE__, msg); abort(); }}
    1.88 +#undef max
    1.89 +#define max(a, b)   (((a)>(b)) ? (a) : (b))
    1.90 +
    1.91 +// ADLC components
    1.92 +#include "arena.hpp"
    1.93 +#include "opto/adlcVMDeps.hpp"
    1.94 +#include "filebuff.hpp"
    1.95 +#include "dict2.hpp"
    1.96 +#include "forms.hpp"
    1.97 +#include "formsopt.hpp"
    1.98 +#include "formssel.hpp"
    1.99 +#include "archDesc.hpp"
   1.100 +#include "adlparse.hpp"
   1.101 +
   1.102 +// globally define ArchDesc for convenience.  Alternatively every form
   1.103 +// could have a backpointer to the AD but it's too complicated to pass
   1.104 +// it everywhere it needs to be available.
   1.105 +extern ArchDesc* globalAD;
   1.106 +
   1.107 +#endif // SHARE_VM_ADLC_ADLC_HPP

mercurial