• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2023 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16  // opcode keywords
17#define OPCODE(X, Y, Z, S) KEYWORD(X)
18#include "opcodes.def"
19#undef OPCODE
20  // primitive types
21#define LOAD_ALGO_PRIMARY_TYPE
22#define PRIMTYPE(P) KEYWORD(P)
23#include "prim_types.def"
24#undef PRIMTYPE
25  // intrinsic names
26#undef DEF_MIR_INTRINSIC
27#define DEF_MIR_INTRINSIC(X, NAME, INTRN_CLASS, RETURN_TYPE, ...)  KEYWORD(X)
28#include "intrinsics.def"
29#undef DEF_MIR_INTRINSIC
30  KEYWORD(else)
31  // declaration keywords
32  KEYWORD(var)
33  KEYWORD(tempvar)
34  KEYWORD(reg)
35  KEYWORD(type)
36  KEYWORD(func)
37  KEYWORD(struct)
38  KEYWORD(structincomplete)
39  KEYWORD(union)
40  KEYWORD(class)
41  KEYWORD(classincomplete)
42  KEYWORD(interfaceincomplete)
43  KEYWORD(javaclass)
44  KEYWORD(javainterface)
45  // type attribute keywords
46#define FUNC_ATTR
47#define TYPE_ATTR
48#define FIELD_ATTR
49#define ATTR(X) KEYWORD(X)
50#include "all_attributes.def"
51#undef ATTR
52#undef FUNC_ATTR
53#undef TYPE_ATTR
54#undef FIELD_ATTR
55  KEYWORD(align)
56  // per-function declaration keywords
57  KEYWORD(framesize)
58  KEYWORD(upformalsize)
59  KEYWORD(moduleid)
60  KEYWORD(funcsize)
61  KEYWORD(funcid)
62  KEYWORD(formalwordstypetagged)
63  KEYWORD(localwordstypetagged)
64  KEYWORD(formalwordsrefcounted)
65  KEYWORD(localwordsrefcounted)
66  // per-module declaration keywords
67  KEYWORD(flavor)
68  KEYWORD(srclang)
69  KEYWORD(globalmemsize)
70  KEYWORD(globalmemmap)
71  KEYWORD(globalwordstypetagged)
72  KEYWORD(globalwordsrefcounted)
73  KEYWORD(id)
74  KEYWORD(numfuncs)
75  KEYWORD(entryfunc)
76  // file related declaration keywords
77  KEYWORD(fileinfo)
78  KEYWORD(filedata)
79  KEYWORD(srcfileinfo)
80  KEYWORD(funcinfo)
81  // special float constants
82  KEYWORD(nanf)
83  KEYWORD(nan)
84  KEYWORD(inff)
85  KEYWORD(inf)
86  // pragma
87  KEYWORD(pragma)
88  KEYWORD(param)
89  KEYWORD(func_ex)
90  KEYWORD(func_var)
91  // staticvalue
92  KEYWORD(staticvalue)
93  // import
94  KEYWORD(import)
95  KEYWORD(importpath)
96  // source position information
97  KEYWORD(LOC)
98  // scope and source var to mpl var mapping
99  KEYWORD(SCOPE)
100  KEYWORD(ALIAS)
101  // storage class
102  KEYWORD(pstatic)
103  KEYWORD(fstatic)
104  // file-scope asm
105  KEYWORD(asmdecl)
106