Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions nix/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"homepage": "",
"owner": "dfinity",
"repo": "candid",
"rev": "a555d77704d691bb8f34e21a049d44ba0acee3f8",
"sha256": "0vn171lcadpznrl5nq2mws2zjjqj9jxyvndb2is3dixbjqyvjssx",
"rev": "0c8e620444ad6e2a4105ddc87b0e6292063b26cc",
"sha256": "014v0hn8yb80b4p4hy8qfqr6k90z9dcxhgbn1vrd7f5pa1dw39bg",
"type": "tarball",
"url": "https://github.com/dfinity/candid/archive/a555d77704d691bb8f34e21a049d44ba0acee3f8.tar.gz",
"url": "https://github.com/dfinity/candid/archive/0c8e620444ad6e2a4105ddc87b0e6292063b26cc.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"esm": {
Expand Down
24 changes: 13 additions & 11 deletions src/codegen/compile.ml
Original file line number Diff line number Diff line change
Expand Up @@ -5436,23 +5436,25 @@ module Serialization = struct
get_typtbl ^^ (* get_typtbl ^^ *)
get_idltyp ^^ (* get_idltyp ^^ *)
idl_sub env t ^^
E.else_trap_with env "idl_sub_irreflexive:func" ^^
with_composite_typ idl_func (fun _get_typ_buf ->
read_byte_tagged
[ E.trap_with env ("IDL error: unexpected function reference" ^ Type.string_of_typ t)
; read_actor_data t ^^
read_text () ^^
Tuple.from_stack env 2
]
);
G.if1 I32Type
(with_composite_typ idl_func (fun _get_typ_buf ->
read_byte_tagged
[ E.trap_with env ("IDL error: unexpected function reference" ^ Type.string_of_typ t)
; read_actor_data t ^^
read_text () ^^
Tuple.from_stack env 2
]))
(coercion_failed "IDL error: incompatible function type")
| Obj (Actor, _) ->
compile_unboxed_const 0xFFFF_FFFFl ^^ (* compile_unboxed_const 0xFFFF_FFFFl ^^ (* FIX ME *) *)
get_typtbl_size ^^ (* get_typtbl_size ^^ *)
get_typtbl ^^ (* get_typtbl ^^ *)
get_idltyp ^^ (* get_idltyp ^^ *)
idl_sub env t ^^
E.else_trap_with env "idl_sub_irreflexive:actor" ^^
with_composite_typ idl_service (fun _get_typ_buf -> read_actor_data t)
G.if1 I32Type
(with_composite_typ idl_service
(fun _get_typ_buf -> read_actor_data t))
(coercion_failed "IDL error: incompatible actor type")
| Mut t ->
read_alias env (Mut t) (fun get_arg_typ on_alloc ->
let (set_result, get_result) = new_local env "result" in
Expand Down