diff options
| author | Guillaume Melquiond | 2021-03-25 11:27:05 +0100 |
|---|---|---|
| committer | Guillaume Melquiond | 2021-03-26 15:18:28 +0100 |
| commit | 5f6e788e0f404755d6cd1494e18e38758865188f (patch) | |
| tree | 3f1b19ebb52dc24996206e35e3e579d6920c0af1 /kernel/nativecode.ml | |
| parent | c2ed2e395f2164ebbc550e70899c49af23e1ad1e (diff) | |
Split the return type away from the signature of primitive operations.
This avoids having to drop the last element of the signature in the
common case.
Diffstat (limited to 'kernel/nativecode.ml')
| -rw-r--r-- | kernel/nativecode.ml | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/nativecode.ml b/kernel/nativecode.ml index 9ce388929c..22bbcb8a65 100644 --- a/kernel/nativecode.ml +++ b/kernel/nativecode.ml @@ -994,9 +994,8 @@ let extract_prim ml_of l = let decl = ref [] in let cond = ref [] in let type_args p = - let rec aux = function [] | [_] -> [] | h :: t -> h :: aux t in - let params, sign = CPrimitives.types p in - List.length params, Array.of_list (aux sign) in + let params, args_ty, _ = CPrimitives.types p in + List.length params, Array.of_list args_ty in let rec aux l = match l with | Lprim(prefix,kn,p,args) -> |
