|
@@ -1381,6 +1381,14 @@ let encode_list_iterator l =
|
|
)
|
|
)
|
|
]
|
|
]
|
|
|
|
|
|
|
|
+let map_key_value_iterator path = vifun0 (fun vthis ->
|
|
|
|
+ let ctx = get_ctx() in
|
|
|
|
+ let vit = encode_instance path in
|
|
|
|
+ let fnew = get_instance_constructor ctx path null_pos in
|
|
|
|
+ ignore(call_value_on vit (Lazy.force fnew) [vthis]);
|
|
|
|
+ vit
|
|
|
|
+)
|
|
|
|
+
|
|
module StdIntMap = struct
|
|
module StdIntMap = struct
|
|
let this vthis = match vthis with
|
|
let this vthis = match vthis with
|
|
| VInstance {ikind = IIntMap h} -> h
|
|
| VInstance {ikind = IIntMap h} -> h
|
|
@@ -1410,6 +1418,8 @@ module StdIntMap = struct
|
|
encode_list_iterator keys
|
|
encode_list_iterator keys
|
|
)
|
|
)
|
|
|
|
|
|
|
|
+ let keyValueIterator = map_key_value_iterator key_haxe_iterators_map_key_value_iterator
|
|
|
|
+
|
|
let remove = vifun1 (fun vthis vkey ->
|
|
let remove = vifun1 (fun vthis vkey ->
|
|
let this = this vthis in
|
|
let this = this vthis in
|
|
let key = decode_int vkey in
|
|
let key = decode_int vkey in
|
|
@@ -1462,6 +1472,8 @@ module StdStringMap = struct
|
|
encode_list_iterator keys
|
|
encode_list_iterator keys
|
|
)
|
|
)
|
|
|
|
|
|
|
|
+ let keyValueIterator = map_key_value_iterator key_haxe_iterators_map_key_value_iterator
|
|
|
|
+
|
|
let remove = vifun1 (fun vthis vkey ->
|
|
let remove = vifun1 (fun vthis vkey ->
|
|
let this = this vthis in
|
|
let this = this vthis in
|
|
let key = decode_vstring vkey in
|
|
let key = decode_vstring vkey in
|
|
@@ -1514,6 +1526,8 @@ module StdObjectMap = struct
|
|
encode_list_iterator keys
|
|
encode_list_iterator keys
|
|
)
|
|
)
|
|
|
|
|
|
|
|
+ let keyValueIterator = map_key_value_iterator key_haxe_iterators_map_key_value_iterator
|
|
|
|
+
|
|
let remove = vifun1 (fun vthis vkey ->
|
|
let remove = vifun1 (fun vthis vkey ->
|
|
let this = this vthis in
|
|
let this = this vthis in
|
|
let b = ValueHashtbl.mem this vkey in
|
|
let b = ValueHashtbl.mem this vkey in
|
|
@@ -2854,6 +2868,7 @@ let init_maps builtins =
|
|
"get",StdIntMap.get;
|
|
"get",StdIntMap.get;
|
|
"iterator",StdIntMap.iterator;
|
|
"iterator",StdIntMap.iterator;
|
|
"keys",StdIntMap.keys;
|
|
"keys",StdIntMap.keys;
|
|
|
|
+ "keyValueIterator",StdIntMap.keyValueIterator;
|
|
"remove",StdIntMap.remove;
|
|
"remove",StdIntMap.remove;
|
|
"set",StdIntMap.set;
|
|
"set",StdIntMap.set;
|
|
"toString",StdIntMap.toString;
|
|
"toString",StdIntMap.toString;
|
|
@@ -2864,6 +2879,7 @@ let init_maps builtins =
|
|
"get",StdObjectMap.get;
|
|
"get",StdObjectMap.get;
|
|
"iterator",StdObjectMap.iterator;
|
|
"iterator",StdObjectMap.iterator;
|
|
"keys",StdObjectMap.keys;
|
|
"keys",StdObjectMap.keys;
|
|
|
|
+ "keyValueIterator",StdObjectMap.keyValueIterator;
|
|
"remove",StdObjectMap.remove;
|
|
"remove",StdObjectMap.remove;
|
|
"set",StdObjectMap.set;
|
|
"set",StdObjectMap.set;
|
|
"toString",StdObjectMap.toString;
|
|
"toString",StdObjectMap.toString;
|
|
@@ -2874,6 +2890,7 @@ let init_maps builtins =
|
|
"get",StdStringMap.get;
|
|
"get",StdStringMap.get;
|
|
"iterator",StdStringMap.iterator;
|
|
"iterator",StdStringMap.iterator;
|
|
"keys",StdStringMap.keys;
|
|
"keys",StdStringMap.keys;
|
|
|
|
+ "keyValueIterator",StdStringMap.keyValueIterator;
|
|
"remove",StdStringMap.remove;
|
|
"remove",StdStringMap.remove;
|
|
"set",StdStringMap.set;
|
|
"set",StdStringMap.set;
|
|
"toString",StdStringMap.toString;
|
|
"toString",StdStringMap.toString;
|