Skip to content

Commit

Permalink
Eliminate dumb c stub from test
Browse files Browse the repository at this point in the history
  • Loading branch information
ccasin committed Dec 23, 2024
1 parent 3aecf5b commit 045df34
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
(* TEST
modules = "custom_block_padding.c";
flags = "-extension layouts_alpha";
flambda2;
{
Expand All @@ -11,13 +10,16 @@

(* CR layouts v7.1: move this test to beta/stable when product arrays are ready. *)

(* CR layouts v4: The below C stub is just to give this test slightly different
behavior on native code and bytecode, because some arrays of unboxed things
are represented as custom blocks on only native code, and therefore the size
calculations differ slightly. Delete this and the corresponding C file when
we change the representation to not use custom blocks. *)
external custom_block_padding : unit -> int = "custom_block_padding_byte" "custom_block_padding_native"
let custom_block_padding = custom_block_padding ()
(* CR layouts v4: The below definition is just to give this test slightly
different behavior on native code and bytecode, because some arrays of
unboxed things are represented as custom blocks on only native code, and
therefore the size calculations differ slightly. Delete this when we change
the representation to not use custom blocks. *)
let custom_block_padding =
match Sys.backend_type with
| Native -> 1
| Bytecode -> 0
| Other _ -> failwith "Don't know what to do"

(* We only compile for 64 bits. *)
let bytes_per_word = 8
Expand Down
11 changes: 0 additions & 11 deletions testsuite/tests/typing-layouts-arrays/custom_block_padding.c

This file was deleted.

0 comments on commit 045df34

Please sign in to comment.