Change function references from aeso_sophia to aeb_aevm_data
This commit is contained in:
parent
0528ee1229
commit
333bf53537
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
-record(pmap, {key_t :: aeso_sophia:type(),
|
-record(pmap, {key_t :: aeb_aevm_data:type(),
|
||||||
val_t :: aeso_sophia:type(),
|
val_t :: aeb_aevm_data:type(),
|
||||||
parent :: none | non_neg_integer(),
|
parent :: none | non_neg_integer(),
|
||||||
size = 0 :: non_neg_integer(),
|
size = 0 :: non_neg_integer(),
|
||||||
data :: #{aeb_heap:binary_value() => aeb_heap:binary_value() | tombstone}
|
data :: #{aeb_heap:binary_value() => aeb_heap:binary_value() | tombstone}
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
-type hash() :: <<_:256>>. %% 256 = ?HASH_SIZE * 8.
|
-type hash() :: <<_:256>>. %% 256 = ?HASH_SIZE * 8.
|
||||||
-type function_name() :: binary(). %% String
|
-type function_name() :: binary(). %% String
|
||||||
-type typerep() :: aeso_sophia:type().
|
-type typerep() :: aeb_aevm_data:type().
|
||||||
-type function_type_info() :: { FunctionHash :: hash()
|
-type function_type_info() :: { FunctionHash :: hash()
|
||||||
, FunctionName :: function_name()
|
, FunctionName :: function_name()
|
||||||
, ArgType :: binary() %% binary typerep
|
, ArgType :: binary() %% binary typerep
|
||||||
|
30
src/aeb_aevm_data.erl
Normal file
30
src/aeb_aevm_data.erl
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
-module(aeb_aevm_data).
|
||||||
|
|
||||||
|
-export_type([data/0,
|
||||||
|
type/0,
|
||||||
|
heap/0]).
|
||||||
|
|
||||||
|
-type type() :: word | signed_word | string | typerep | function
|
||||||
|
| {list, type()}
|
||||||
|
| {option, type()}
|
||||||
|
| {tuple, [type()]}
|
||||||
|
| {variant, [[type()]]}.
|
||||||
|
|
||||||
|
|
||||||
|
-type data() :: none
|
||||||
|
| {some, data()}
|
||||||
|
| {option, data()}
|
||||||
|
| word
|
||||||
|
| string
|
||||||
|
| {list, data()}
|
||||||
|
| {tuple, [data()]}
|
||||||
|
| {variant, integer(), [data()]}
|
||||||
|
| integer()
|
||||||
|
| binary()
|
||||||
|
| [data()]
|
||||||
|
| {}
|
||||||
|
| {data()}
|
||||||
|
| {data(), data()}.
|
||||||
|
|
||||||
|
-type heap() :: binary().
|
||||||
|
|
@ -92,7 +92,7 @@ heap_value_heap({_, Heap}) -> Heap#heap.heap.
|
|||||||
|
|
||||||
%% -- Value to binary --------------------------------------------------------
|
%% -- Value to binary --------------------------------------------------------
|
||||||
|
|
||||||
-spec to_binary(aeso_sophia:data()) -> aeso_sophia:heap().
|
-spec to_binary(aeb_aevm_data:data()) -> aeb_aevm_data:heap().
|
||||||
%% Encode the data as a heap where the first word is the value (for unboxed
|
%% Encode the data as a heap where the first word is the value (for unboxed
|
||||||
%% types) or a pointer to the value (for boxed types).
|
%% types) or a pointer to the value (for boxed types).
|
||||||
to_binary(Data) ->
|
to_binary(Data) ->
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
-define(Type(), aeso_sophia:type()).
|
-define(Type(), aeb_aevm_data:type()).
|
||||||
|
|
||||||
-define(TYPEREP_WORD_TAG, 0).
|
-define(TYPEREP_WORD_TAG, 0).
|
||||||
-define(TYPEREP_STRING_TAG, 1).
|
-define(TYPEREP_STRING_TAG, 1).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user