Merge pull request #2 from aeternity/PT-163083710-implement_ecverify

Add CRYPT primop range and ECVERIFY primp
This commit is contained in:
Hans Svensson 2019-01-21 14:16:00 +01:00 committed by GitHub
commit 19d0e3ee84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -179,3 +179,5 @@
-define(PRIM_CALL_MAP_SIZE, 304).
-define(PRIM_CALL_MAP_TOLIST, 305).
-define(PRIM_CALL_IN_CRYPTO_RANGE(__TTYPE__), (((__TTYPE__) > 399) andalso ((__TTYPE__) < 500))).
-define(PRIM_CALL_CRYPTO_ECVERIFY, 400).

View File

@ -14,8 +14,9 @@
-include("aeb_opcodes.hrl").
is_local_primop_op(Op) when ?PRIM_CALL_IN_MAP_RANGE(Op) -> true;
is_local_primop_op(Op) when is_integer(Op) -> false.
is_local_primop_op(Op) when ?PRIM_CALL_IN_MAP_RANGE(Op) -> true;
is_local_primop_op(Op) when ?PRIM_CALL_IN_CRYPTO_RANGE(Op) -> true;
is_local_primop_op(Op) when is_integer(Op) -> false.
op_needs_type_check(Op) ->
(not is_local_primop_op(Op)) andalso op_has_dynamic_type(Op).