Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/src/hotspot/share/adlc/adlc.hpp
41144 views
1
/*
2
* Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
*
5
* This code is free software; you can redistribute it and/or modify it
6
* under the terms of the GNU General Public License version 2 only, as
7
* published by the Free Software Foundation.
8
*
9
* This code is distributed in the hope that it will be useful, but WITHOUT
10
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12
* version 2 for more details (a copy is included in the LICENSE file that
13
* accompanied this code).
14
*
15
* You should have received a copy of the GNU General Public License version
16
* 2 along with this work; if not, write to the Free Software Foundation,
17
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18
*
19
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20
* or visit www.oracle.com if you need additional information or have any
21
* questions.
22
*
23
*/
24
25
#ifndef SHARE_ADLC_ADLC_HPP
26
#define SHARE_ADLC_ADLC_HPP
27
28
//
29
// Standard include file for ADLC parser
30
//
31
32
// standard library constants
33
#include <iostream>
34
35
#include <stdio.h>
36
#include <stdlib.h>
37
#include <string.h>
38
#include <ctype.h>
39
#include <stdarg.h>
40
#include <sys/types.h>
41
42
/* Make sure that we have the intptr_t and uintptr_t definitions */
43
#ifdef _WIN32
44
45
#if _MSC_VER >= 1300
46
using namespace std;
47
#endif
48
49
#if _MSC_VER >= 1400
50
#define strdup _strdup
51
#endif
52
53
#if _MSC_VER < 1900
54
#define snprintf _snprintf
55
#endif
56
57
#ifndef _INTPTR_T_DEFINED
58
#ifdef _WIN64
59
typedef __int64 intptr_t;
60
#else
61
typedef int intptr_t;
62
#endif
63
#define _INTPTR_T_DEFINED
64
#endif
65
66
#ifndef _UINTPTR_T_DEFINED
67
#ifdef _WIN64
68
typedef unsigned __int64 uintptr_t;
69
#else
70
typedef unsigned int uintptr_t;
71
#endif
72
#define _UINTPTR_T_DEFINED
73
#endif
74
75
#endif // _WIN32
76
77
#if defined(LINUX) || defined(_ALLBSD_SOURCE)
78
#include <inttypes.h>
79
#endif // LINUX || _ALLBSD_SOURCE
80
81
// Macros
82
#define uint32 unsigned int
83
#define uint unsigned int
84
85
// VM components
86
#include "opto/opcodes.hpp"
87
88
// Macros
89
// Debugging note: Put a breakpoint on "abort".
90
#undef assert
91
#define assert(cond, msg) { if (!(cond)) { fprintf(stderr, "assert fails %s %d: %s\n", __FILE__, __LINE__, msg); abort(); }}
92
#undef max
93
#define max(a, b) (((a)>(b)) ? (a) : (b))
94
95
// ADLC components
96
#include "arena.hpp"
97
#include "opto/adlcVMDeps.hpp"
98
#include "filebuff.hpp"
99
#include "dict2.hpp"
100
#include "forms.hpp"
101
#include "formsopt.hpp"
102
#include "formssel.hpp"
103
#include "archDesc.hpp"
104
#include "adlparse.hpp"
105
106
// globally define ArchDesc for convenience. Alternatively every form
107
// could have a backpointer to the AD but it's too complicated to pass
108
// it everywhere it needs to be available.
109
extern ArchDesc* globalAD;
110
111
#endif // SHARE_ADLC_ADLC_HPP
112
113