@@ -32,6 +32,8 @@ impl crate::snapshot::Serialize for Intrinsics {
3232 s : & mut crate :: snapshot:: SnapshotSerializer ,
3333 ) -> Result < ( ) , crate :: snapshot:: SnapshotError > {
3434 self . constructors . serialize ( s) ?;
35+ self . objects . serialize ( s) ?;
36+ self . templates . serialize ( s) ?;
3537 Ok ( ( ) )
3638 }
3739}
@@ -896,6 +898,40 @@ pub struct IntrinsicObjects {
896898 segments_prototype : JsObject ,
897899}
898900
901+ impl crate :: snapshot:: Serialize for IntrinsicObjects {
902+ fn serialize (
903+ & self ,
904+ s : & mut crate :: snapshot:: SnapshotSerializer ,
905+ ) -> Result < ( ) , crate :: snapshot:: SnapshotError > {
906+ self . reflect . serialize ( s) ?;
907+ self . math . serialize ( s) ?;
908+ self . json . serialize ( s) ?;
909+ self . throw_type_error . serialize ( s) ?;
910+ self . array_prototype_values . serialize ( s) ?;
911+ self . iterator_prototypes . serialize ( s) ?;
912+ self . generator . serialize ( s) ?;
913+ self . async_generator . serialize ( s) ?;
914+ self . eval . serialize ( s) ?;
915+ self . uri_functions . serialize ( s) ?;
916+ self . is_finite . serialize ( s) ?;
917+ self . is_nan . serialize ( s) ?;
918+ self . parse_float . serialize ( s) ?;
919+ self . parse_int . serialize ( s) ?;
920+ #[ cfg( feature = "annex-b" ) ]
921+ {
922+ self . escape . serialize ( s) ?;
923+ self . unescape . serialize ( s) ?;
924+ }
925+ #[ cfg( feature = "intl" ) ]
926+ {
927+ self . intl . serialize ( s) ?;
928+ self . segments_prototype . serialize ( s) ?;
929+ }
930+
931+ Ok ( ( ) )
932+ }
933+ }
934+
899935impl Default for IntrinsicObjects {
900936 fn default ( ) -> Self {
901937 Self {
@@ -1085,6 +1121,33 @@ pub(crate) struct ObjectTemplates {
10851121 namespace : ObjectTemplate ,
10861122}
10871123
1124+ impl crate :: snapshot:: Serialize for ObjectTemplates {
1125+ fn serialize (
1126+ & self ,
1127+ s : & mut crate :: snapshot:: SnapshotSerializer ,
1128+ ) -> Result < ( ) , crate :: snapshot:: SnapshotError > {
1129+ self . iterator_result . serialize ( s) ?;
1130+ self . ordinary_object . serialize ( s) ?;
1131+ self . array . serialize ( s) ?;
1132+ self . number . serialize ( s) ?;
1133+ self . string . serialize ( s) ?;
1134+ self . symbol . serialize ( s) ?;
1135+ self . bigint . serialize ( s) ?;
1136+ self . boolean . serialize ( s) ?;
1137+
1138+ self . unmapped_arguments . serialize ( s) ?;
1139+ self . mapped_arguments . serialize ( s) ?;
1140+ self . function_with_prototype . serialize ( s) ?;
1141+ self . function_prototype . serialize ( s) ?;
1142+ self . function . serialize ( s) ?;
1143+ self . async_function . serialize ( s) ?;
1144+ self . function_without_proto . serialize ( s) ?;
1145+ self . function_with_prototype_without_proto . serialize ( s) ?;
1146+ self . namespace . serialize ( s) ?;
1147+ Ok ( ( ) )
1148+ }
1149+ }
1150+
10881151impl ObjectTemplates {
10891152 pub ( crate ) fn new ( root_shape : & RootShape , constructors : & StandardConstructors ) -> Self {
10901153 let root_shape = root_shape. shape ( ) ;
0 commit comments