File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ module To_buf : sig
74
74
val write_float : t -> float -> buf_offset
75
75
val write_string_slice : t -> slice -> buf_offset
76
76
val write_blob_slice : t -> slice -> buf_offset
77
- val write_cstor0 : t -> index :offset -> buf_offset
77
+ val write_cstor0 : t -> index :int -> buf_offset
78
78
end = struct
79
79
type buf_offset = offset
80
80
@@ -293,10 +293,10 @@ let cstor (self : t) ~(index : int) (args : immediate array) : immediate =
293
293
let finalize (self : t ) ~(entrypoint : immediate ) : slice =
294
294
let top = write_or_ref_immediate self entrypoint in
295
295
296
- let total_len = self.global_offset + self.buf.len in
297
- assert (top < total_len);
296
+ assert (top < self.global_offset + self.buf.len);
298
297
299
298
let rec finalize_offset top =
299
+ let total_len = self.global_offset + self.buf.len in
300
300
let delta = total_len - top - 1 in
301
301
if delta > 250 then (
302
302
(* go through intermediate pointer (uncommon, can happen if last value is ginormous) *)
You can’t perform that action at this time.
0 commit comments