• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2021-2022 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// Autogenerated file -- DO NOT EDIT!
17
18#ifndef PANDA_RUNTIME_SHORTY_VALUES_H_
19#define PANDA_RUNTIME_SHORTY_VALUES_H_
20
21% PandaFile::types.each do |type|
22// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
23#define SHORTY_<%= type.name.upcase %> 0x<%= type.code.to_s(16) %>
24%end
25
26% first_nonvoid = PandaFile::types.select {|type| type.name != "void"}.first.code
27% first_32 = PandaFile::types.select {|type| type.width && type.width == 32}.first.code
28% last_int32 = PandaFile::types.select {|type| type.width && type.width == 32 && type.properties.include?("integral")}.last.code
29% first_64 = PandaFile::types.select {|type| (type.width && type.width == 64)}.first.code
30% first_float = PandaFile::types.select {|type| type.properties.include?("float") }.first.code
31% num_32_and_larger = PandaFile::types.select {|type| type.width && type.width >= 32 || type.name == "reference" || type.name == "tagged" }.length
32% num_float_types = PandaFile::types.select {|type| type.properties.include?("float") }.length
33% num_64bit_types = PandaFile::types.select {|type| (type.width && type.width == 64)}.length
34// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
35#define SHORTY_FIRST_NONVOID 0x<%= first_nonvoid.to_s(16) %>
36// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
37#define SHORTY_FIRST_32 0x<%= first_32.to_s(16) %>
38// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
39#define SHORTY_LAST_INT32 0x<%= last_int32.to_s(16) %>
40// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
41#define SHORTY_FIRST_64 0x<%= first_64.to_s(16) %>
42// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
43#define SHORTY_FIRST_FLOAT 0x<%= first_float.to_s(16) %>
44// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
45#define SHORTY_NUM_MIN32_TYPES <%= num_32_and_larger %>
46// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
47#define SHORTY_NUM_FLOAT_TYPES <%= num_float_types %>
48// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
49#define SHORTY_NUM_64BIT_TYPES <%= num_64bit_types %>
50
51#endif  // PANDA_RUNTIME_SHORTY_VALUES_H_
52
53