Skip to content

Commit bdfb5ef

Browse files
committed
remove experiment
1 parent 76b0350 commit bdfb5ef

File tree

5 files changed

+0
-29
lines changed

5 files changed

+0
-29
lines changed

jscomp/core/lam_dispatch_primitive.ml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -265,18 +265,6 @@ let translate loc (prim_name : string) (args : J.expression list) : J.expression
265265
| [e] -> {e with expression_desc = Await e}
266266
| _ -> assert false
267267
)
268-
| "?createDict" -> (
269-
match args with
270-
| [{expression_desc=Array (exprs, _)} as e] ->
271-
let key_values =
272-
exprs
273-
|> List.filter_map (fun (e : J.expression) ->
274-
match e.expression_desc with
275-
| Caml_block ([{expression_desc = Str {txt}}; value], _, _, _) -> Some (Js_op.Lit txt, value)
276-
| _ -> None) in
277-
{e with expression_desc=Object key_values}
278-
| _ -> assert false
279-
)
280268
| _ ->
281269
Bs_warnings.warn_missing_primitive loc prim_name;
282270
E.resolve_and_apply prim_name args

jscomp/others/js_dict.res

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
/** The dict type */
2828
type t<'a> = dict<'a>
2929

30-
external _unsafe_create: array<(string, 'a)> => dict<'a> = "?createDict"
31-
3230
/** The key type, an alias of string */
3331
type key = string
3432

jscomp/others/js_dict.resi

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ mostly used with the Js_json.t type.
4141
*/
4242
type t<'a> = dict<'a>
4343

44-
external _unsafe_create: array<(string, 'a)> => dict<'a> = "?createDict"
45-
4644
/**
4745
The type for dictionary keys. This means that dictionaries *must* use `string`s as their keys.
4846
*/

jscomp/test/DictTests.js

Lines changed: 0 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jscomp/test/DictTests.res

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@ external imaginaryExternalArgs: array<(string, string)> = "imaginary"
88

99
let dictCreationCanNotBeInlined = Js.Dict.fromArray(imaginaryExternalArgs)
1010

11-
let dictCreationCanBeInlined2 = Js.Dict._unsafe_create([
12-
("name", "hello"),
13-
("age", "what"),
14-
("more", "stuff"),
15-
])
16-
1711
open Js
1812

1913
let dictCreationCanBeInlined3 = Dict.fromArray([

0 commit comments

Comments
 (0)