diff options
Diffstat (limited to 'lib/compiler/src/beam_types.hrl')
-rw-r--r-- | lib/compiler/src/beam_types.hrl | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/lib/compiler/src/beam_types.hrl b/lib/compiler/src/beam_types.hrl index 58ffd18110..18f7e29074 100644 --- a/lib/compiler/src/beam_types.hrl +++ b/lib/compiler/src/beam_types.hrl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2019-2021. All Rights Reserved. +%% Copyright Ericsson AB 2019-2022. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -18,6 +18,9 @@ %% %CopyrightEnd% %% +%% Type version, must be bumped whenever the external type format changes. +-define(BEAM_TYPES_VERSION, 1). + %% Common term types for passes operating on beam SSA and assembly. Helper %% functions for wrangling these can be found in beam_types.erl %% @@ -37,6 +40,9 @@ %% - #t_list{} Any list. %% -- #t_cons{} Cons (nonempty list). %% -- nil The empty list. +%% - pid +%% - port +%% - reference %% - #t_tuple{} Tuple. %% %% none No type (bottom element). @@ -75,15 +81,15 @@ %% [1] https://en.wikipedia.org/wiki/Lattice_(order)#General_lattice -define(ATOM_SET_SIZE, 5). +-define(MAX_FUNC_ARGS, 255). -record(t_atom, {elements=any :: 'any' | ordsets:ordset(atom())}). -record(t_bitstring, {size_unit=1 :: pos_integer()}). --record(t_bs_context, {tail_unit=1 :: pos_integer(), - slots=0 :: non_neg_integer(), - valid=0 :: non_neg_integer()}). --record(t_bs_matchable, {tail_unit=1}). +-record(t_bs_context, {tail_unit=1 :: pos_integer()}). +-record(t_bs_matchable, {tail_unit=1 :: pos_integer()}). -record(t_float, {elements=any :: 'any' | {float(),float()}}). -record(t_fun, {arity=any :: arity() | 'any', + target=any :: {atom(), non_neg_integer()} | 'any', type=any :: type() }). -record(t_integer, {elements=any :: 'any' | {integer(),integer()}}). @@ -133,6 +139,9 @@ #t_fun{} | #t_list{} | #t_cons{} | nil | #t_map{} | + pid | + port | + reference | #t_tuple{}. -type record_key() :: {Arity :: integer(), Tag :: normal_type() }. |