-
Notifications
You must be signed in to change notification settings - Fork 121
Gabor/typtbl #5642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Gabor/typtbl #5642
Changes from 9 commits
92604cd
267acdd
92a0895
34c4371
b8ff2c4
66182be
f703cca
c6a3d08
efb98d5
0c0dd98
7835f37
b3dc0a5
df2393b
f536cc7
1580442
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -761,7 +761,7 @@ let compile_op_const op i = | |
| G.i (Binary (Wasm.Values.I32 op)) | ||
| let compile_add_const = compile_op_const I32Op.Add | ||
| let compile_sub_const = compile_op_const I32Op.Sub | ||
| let compile_mul_const = compile_op_const I32Op.Mul | ||
| let compile_mul_const = compile_op_const I32Op.Mul (* TODO: use shift: compile_mul_const 2l *) | ||
|
||
| let compile_divU_const = compile_op_const I32Op.DivU | ||
| let compile_shrU_const = compile_op_const I32Op.ShrU | ||
| let compile_shrS_const = compile_op_const I32Op.ShrS | ||
|
|
@@ -783,7 +783,7 @@ let compile_op64_const op i = | |
| G.i (Binary (Wasm.Values.I64 op)) | ||
| let compile_add64_const = compile_op64_const I64Op.Add | ||
| let compile_sub64_const = compile_op64_const I64Op.Sub | ||
| let compile_mul64_const = compile_op64_const I64Op.Mul | ||
| let compile_mul64_const = compile_op64_const I64Op.Mul (* TODO: use shift: compile_mul_const 2l *) | ||
| let _compile_divU64_const = compile_op64_const I64Op.DivU | ||
| let compile_shrU64_const = function | ||
| | 0L -> G.nop | n -> compile_op64_const I64Op.ShrU n | ||
|
|
@@ -1072,7 +1072,7 @@ module RTS = struct | |
| let system_imports env = | ||
| E.add_func_import env "rts" "memcmp" [I32Type; I32Type; I32Type] [I32Type]; | ||
| E.add_func_import env "rts" "version" [] [I32Type]; | ||
| E.add_func_import env "rts" "parse_idl_header" [I32Type; I32Type; I32Type; I32Type; I32Type] []; | ||
| E.add_func_import env "rts" "parse_idl_header" [I32Type; I32Type; I32Type; I32Type; I32Type; I32Type] []; | ||
| E.add_func_import env "rts" "idl_sub_buf_words" [I32Type; I32Type] [I32Type]; | ||
| E.add_func_import env "rts" "idl_sub_buf_init" [I32Type; I32Type; I32Type] []; | ||
| E.add_func_import env "rts" "idl_sub" | ||
|
|
@@ -7455,7 +7455,7 @@ module MakeSerialization (Strm : Stream) = struct | |
| comparison. | ||
| *) | ||
| let coercion_error_value env : int32 = | ||
| Tagged.shared_static_obj env Tagged.CoercionFailure [] | ||
| Tagged.(shared_static_obj env CoercionFailure []) | ||
|
|
||
| (* See Note [Candid subtype checks] *) | ||
| let with_rel_buf_opt env extended get_typtbl_size1 f = | ||
|
|
@@ -8299,7 +8299,9 @@ module MakeSerialization (Strm : Stream) = struct | |
| ReadBuf.set_size get_ref_buf (get_refs_size ^^ compile_mul_const Heap.word_size) ^^ | ||
|
|
||
| (* Go! *) | ||
| Bool.lit extended ^^ get_data_buf ^^ get_typtbl_ptr ^^ get_typtbl_size_ptr ^^ get_maintyps_ptr ^^ | ||
| let tydesc, _, _ = type_desc env ts in | ||
| let tydesc_len = Int32.of_int (String.length tydesc * 2 + 300) in | ||
ggreif marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Bool.lit extended ^^ get_data_buf ^^ compile_unboxed_const tydesc_len ^^ get_typtbl_ptr ^^ get_typtbl_size_ptr ^^ get_maintyps_ptr ^^ | ||
| E.call_import env "rts" "parse_idl_header" ^^ | ||
|
|
||
| (* Allocate memo table, if necessary *) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -844,7 +844,7 @@ let compile_op_const op i = | |
| G.i (Binary (Wasm_exts.Values.I64 op)) | ||
| let compile_add_const = compile_op_const I64Op.Add | ||
| let compile_sub_const = compile_op_const I64Op.Sub | ||
| let compile_mul_const = compile_op_const I64Op.Mul | ||
| let compile_mul_const = compile_op_const I64Op.Mul (* TODO: use shift: compile_mul_const 2l *) | ||
| let compile_divU_const = compile_op_const I64Op.DivU | ||
| let compile_shrU_const = compile_op_const I64Op.ShrU | ||
| let compile_shrS_const = compile_op_const I64Op.ShrS | ||
|
|
@@ -1150,7 +1150,7 @@ module RTS = struct | |
| E.add_func_import env "rts" "get_upgrade_instructions" [] [I64Type]; | ||
| E.add_func_import env "rts" "memcmp" [I64Type; I64Type; I64Type] [I32Type]; | ||
| E.add_func_import env "rts" "version" [] [I64Type]; | ||
| E.add_func_import env "rts" "parse_idl_header" [I32Type; I64Type; I64Type; I64Type; I64Type] []; | ||
| E.add_func_import env "rts" "parse_idl_header" [I32Type; I64Type; I64Type; I64Type; I64Type; I64Type] []; | ||
| E.add_func_import env "rts" "idl_alloc_typtbl" [I64Type; I64Type; I64Type; I64Type; I64Type] []; | ||
| E.add_func_import env "rts" "idl_sub_buf_words" [I64Type; I64Type] [I64Type]; | ||
| E.add_func_import env "rts" "idl_sub_buf_init" [I64Type; I64Type; I64Type] []; | ||
|
|
@@ -8781,7 +8781,9 @@ module Serialization = struct | |
| ReadBuf.set_size get_ref_buf (get_refs_size ^^ compile_mul_const Heap.word_size) ^^ | ||
|
|
||
| (* Go! *) | ||
| Bool.lit extended ^^ Bool.to_rts_int32 ^^ get_data_buf ^^ get_typtbl_ptr ^^ get_typtbl_size_ptr ^^ get_maintyps_ptr ^^ | ||
| let tydesc, _, _ = type_desc env Candid ts in | ||
| let tydesc_len = Int64.of_int (String.length tydesc * 2 + 300) in | ||
|
||
| Bool.(lit extended ^^ to_rts_int32) ^^ get_data_buf ^^ compile_unboxed_const tydesc_len ^^ get_typtbl_ptr ^^ get_typtbl_size_ptr ^^ get_maintyps_ptr ^^ | ||
| E.call_import env "rts" "parse_idl_header" ^^ | ||
|
|
||
| (* Allocate global type type, if necessary for subtype checks *) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,6 @@ ingress Completed: Reply: 0x4449444c016c01b3c4b1f204680100010a000000000000000001 | |
| ingress Completed: Reply: 0x4449444c0000 | ||
| debug.print: {cycles = 2_509_532; size = +25_528} | ||
| ingress Completed: Reply: 0x4449444c0000 | ||
| debug.print: {cycles = 54_921_553; size = +830_464} | ||
| debug.print: {cycles = 54_921_579; size = +830_464} | ||
|
||
| ingress Completed: Reply: 0x4449444c0000 | ||
| ingress Completed: Reply: 0x4449444c0000 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| ingress Completed: Reply: 0x4449444c016c01b3c4b1f204680100010a00000000000000000101 | ||
| ingress Completed: Reply: 0x4449444c0000 | ||
| debug.print: {cycles = 1_121_619; heap_bytes = +33_888} | ||
| debug.print: {cycles = 1_121_645; heap_bytes = +33_888} | ||
| ingress Completed: Reply: 0x4449444c0000 | ||
| ingress Completed: Reply: 0x4449444c0000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would aid CSE.