Skip to content

Commit d40e84a

Browse files
authored
chore(compiler)!: Remove built-in FileDescriptor type (#1747)
1 parent f6e5b00 commit d40e84a

File tree

8 files changed

+20
-24
lines changed

8 files changed

+20
-24
lines changed

compiler/src/typed/builtin_types.re

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ and ident_char = ident_create("Char")
6363
and ident_void = ident_create("Void")
6464
and ident_box = ident_create("Box")
6565
and ident_array = ident_create("Array")
66-
and ident_fd = ident_create("FileDescriptor")
6766
and ident_assertion_error = ident_create_predef_exn("AssertionError")
6867
and ident_index_out_of_bounds = ident_create_predef_exn("IndexOutOfBounds")
6968
and ident_index_non_integer = ident_create_predef_exn("IndexNonInteger")
@@ -97,8 +96,7 @@ and path_bytes = PIdent(ident_bytes)
9796
and path_char = PIdent(ident_char)
9897
and path_void = PIdent(ident_void)
9998
and path_box = PIdent(ident_box)
100-
and path_array = PIdent(ident_array)
101-
and path_fd = PIdent(ident_fd);
99+
and path_array = PIdent(ident_array);
102100

103101
let type_number = newgenty(TTyConstr(path_number, [], ref(TMemNil)))
104102
and type_exception = newgenty(TTyConstr(path_exception, [], ref(TMemNil)))
@@ -138,7 +136,6 @@ and type_void = newgenty(TTyConstr(path_void, [], ref(TMemNil)))
138136
and type_box = var => newgenty(TTyConstr(path_box, [var], ref(TMemNil)))
139137
and type_array = var =>
140138
newgenty(TTyConstr(path_array, [var], ref(TMemNil)))
141-
and type_fd = newgenty(TTyConstr(path_fd, [], ref(TMemNil)))
142139
and type_lambda = (args, res) => newgenty(TTyArrow(args, res, TComOk));
143140

144141
let decl_abstr = path => {
@@ -306,7 +303,6 @@ let initial_env = (add_type, add_extension, empty_env) =>
306303
|> add_type(ident_char, decl_abstr_imm(WasmI32, path_char))
307304
|> add_type(ident_void, decl_void)
308305
|> add_type(ident_array, decl_array)
309-
|> add_type(ident_fd, decl_abstr(path_fd))
310306
|> add_type(ident_bytes, decl_abstr(path_bytes))
311307
|> add_extension(ident_assertion_error, decl_assertion_error)
312308
|> add_extension(ident_index_out_of_bounds, decl_index_out_of_bounds)

compiler/test/__snapshots__/arrays.0f9e7d37.0.snapshot

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ arrays › array_access
130130
)
131131
(i32.store offset=12
132132
(local.get $0)
133-
(i32.const 69)
133+
(i32.const 67)
134134
)
135135
(i32.store offset=16
136136
(local.get $0)
@@ -164,7 +164,7 @@ arrays › array_access
164164
)
165165
(i32.store offset=12
166166
(local.get $0)
167-
(i32.const 71)
167+
(i32.const 69)
168168
)
169169
(i32.store offset=16
170170
(local.get $0)
@@ -230,7 +230,7 @@ arrays › array_access
230230
)
231231
(i32.store offset=12
232232
(local.get $0)
233-
(i32.const 69)
233+
(i32.const 67)
234234
)
235235
(i32.store offset=16
236236
(local.get $0)

compiler/test/__snapshots__/arrays.1deb7b51.0.snapshot

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ arrays › array_access5
134134
)
135135
(i32.store offset=12
136136
(local.get $0)
137-
(i32.const 69)
137+
(i32.const 67)
138138
)
139139
(i32.store offset=16
140140
(local.get $0)
@@ -168,7 +168,7 @@ arrays › array_access5
168168
)
169169
(i32.store offset=12
170170
(local.get $0)
171-
(i32.const 71)
171+
(i32.const 69)
172172
)
173173
(i32.store offset=16
174174
(local.get $0)
@@ -234,7 +234,7 @@ arrays › array_access5
234234
)
235235
(i32.store offset=12
236236
(local.get $0)
237-
(i32.const 69)
237+
(i32.const 67)
238238
)
239239
(i32.store offset=16
240240
(local.get $0)

compiler/test/__snapshots__/arrays.28fcc534.0.snapshot

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ arrays › array_access4
130130
)
131131
(i32.store offset=12
132132
(local.get $0)
133-
(i32.const 69)
133+
(i32.const 67)
134134
)
135135
(i32.store offset=16
136136
(local.get $0)
@@ -164,7 +164,7 @@ arrays › array_access4
164164
)
165165
(i32.store offset=12
166166
(local.get $0)
167-
(i32.const 71)
167+
(i32.const 69)
168168
)
169169
(i32.store offset=16
170170
(local.get $0)
@@ -230,7 +230,7 @@ arrays › array_access4
230230
)
231231
(i32.store offset=12
232232
(local.get $0)
233-
(i32.const 69)
233+
(i32.const 67)
234234
)
235235
(i32.store offset=16
236236
(local.get $0)

compiler/test/__snapshots__/arrays.4c8c9f91.0.snapshot

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ arrays › array_access2
130130
)
131131
(i32.store offset=12
132132
(local.get $0)
133-
(i32.const 69)
133+
(i32.const 67)
134134
)
135135
(i32.store offset=16
136136
(local.get $0)
@@ -164,7 +164,7 @@ arrays › array_access2
164164
)
165165
(i32.store offset=12
166166
(local.get $0)
167-
(i32.const 71)
167+
(i32.const 69)
168168
)
169169
(i32.store offset=16
170170
(local.get $0)
@@ -230,7 +230,7 @@ arrays › array_access2
230230
)
231231
(i32.store offset=12
232232
(local.get $0)
233-
(i32.const 69)
233+
(i32.const 67)
234234
)
235235
(i32.store offset=16
236236
(local.get $0)

compiler/test/__snapshots__/arrays.6eac4e1f.0.snapshot

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ arrays › array_access3
130130
)
131131
(i32.store offset=12
132132
(local.get $0)
133-
(i32.const 69)
133+
(i32.const 67)
134134
)
135135
(i32.store offset=16
136136
(local.get $0)
@@ -164,7 +164,7 @@ arrays › array_access3
164164
)
165165
(i32.store offset=12
166166
(local.get $0)
167-
(i32.const 71)
167+
(i32.const 69)
168168
)
169169
(i32.store offset=16
170170
(local.get $0)
@@ -230,7 +230,7 @@ arrays › array_access3
230230
)
231231
(i32.store offset=12
232232
(local.get $0)
233-
(i32.const 69)
233+
(i32.const 67)
234234
)
235235
(i32.store offset=16
236236
(local.get $0)

compiler/test/__snapshots__/arrays.74d79181.0.snapshot

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ arrays › array_access5
130130
)
131131
(i32.store offset=12
132132
(local.get $0)
133-
(i32.const 69)
133+
(i32.const 67)
134134
)
135135
(i32.store offset=16
136136
(local.get $0)
@@ -164,7 +164,7 @@ arrays › array_access5
164164
)
165165
(i32.store offset=12
166166
(local.get $0)
167-
(i32.const 71)
167+
(i32.const 69)
168168
)
169169
(i32.store offset=16
170170
(local.get $0)
@@ -230,7 +230,7 @@ arrays › array_access5
230230
)
231231
(i32.store offset=12
232232
(local.get $0)
233-
(i32.const 69)
233+
(i32.const 67)
234234
)
235235
(i32.store offset=16
236236
(local.get $0)

compiler/test/__snapshots__/basic_functionality.2bcc447b.0.snapshot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ basic functionality › assert2
158158
)
159159
(i32.store offset=12
160160
(local.get $0)
161-
(i32.const 67)
161+
(i32.const 65)
162162
)
163163
(i32.store offset=16
164164
(local.get $0)

0 commit comments

Comments
 (0)