@@ -8,6 +8,8 @@ use crate::value::function::{Function, FunctionKind};
8
8
use crate :: value:: map:: Map ;
9
9
use crate :: value:: regex:: RegExp ;
10
10
use crate :: value:: set:: Set ;
11
+ use crate :: value:: weakmap:: WeakMap ;
12
+ use crate :: value:: weakset:: WeakSet ;
11
13
use dash_middle:: interner:: { self , sym} ;
12
14
13
15
use super :: value:: array:: { Array , ArrayIterator } ;
@@ -246,6 +248,17 @@ pub struct Statics {
246
248
pub map_delete : ObjectId ,
247
249
pub map_clear : ObjectId ,
248
250
pub map_size : ObjectId ,
251
+ pub weakmap_constructor : ObjectId ,
252
+ pub weakmap_prototype : ObjectId ,
253
+ pub weakmap_set : ObjectId ,
254
+ pub weakmap_has : ObjectId ,
255
+ pub weakmap_get : ObjectId ,
256
+ pub weakmap_delete : ObjectId ,
257
+ pub weakset_constructor : ObjectId ,
258
+ pub weakset_prototype : ObjectId ,
259
+ pub weakset_add : ObjectId ,
260
+ pub weakset_has : ObjectId ,
261
+ pub weakset_delete : ObjectId ,
249
262
pub regexp_ctor : ObjectId ,
250
263
pub regexp_prototype : ObjectId ,
251
264
pub regexp_test : ObjectId ,
@@ -525,6 +538,17 @@ impl Statics {
525
538
date_get_time : function ( gc, sym:: getTime, js_std:: date:: get_time) ,
526
539
json_ctor : function ( gc, sym:: JSON , js_std:: json:: constructor) ,
527
540
json_parse : function ( gc, sym:: parse, js_std:: json:: parse) ,
541
+ weakmap_constructor : function ( gc, sym:: WeakMap , js_std:: weakmap:: constructor) ,
542
+ weakmap_prototype : builtin_object ( gc, WeakMap :: null ( ) ) ,
543
+ weakmap_set : function ( gc, sym:: set, js_std:: weakmap:: set) ,
544
+ weakmap_has : function ( gc, sym:: has, js_std:: weakmap:: has) ,
545
+ weakmap_get : function ( gc, sym:: get, js_std:: weakmap:: get) ,
546
+ weakmap_delete : function ( gc, sym:: delete, js_std:: weakmap:: delete) ,
547
+ weakset_constructor : function ( gc, sym:: WeakSet , js_std:: weakset:: constructor) ,
548
+ weakset_prototype : builtin_object ( gc, WeakSet :: null ( ) ) ,
549
+ weakset_add : function ( gc, sym:: add, js_std:: weakset:: add) ,
550
+ weakset_has : function ( gc, sym:: has, js_std:: weakset:: has) ,
551
+ weakset_delete : function ( gc, sym:: delete, js_std:: weakset:: delete) ,
528
552
}
529
553
}
530
554
}
0 commit comments