File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -640,6 +640,36 @@ impl Object {
640640 }
641641 _ => return Ok ( false ) ,
642642 } ,
643+ GCRefData :: SLICE ( s) => match other {
644+ Object :: GC_REF ( other_gc_ref) => {
645+ let other_res = shared_execution_context. heap . deref ( & other_gc_ref) ;
646+ if other_res. is_err ( ) {
647+ return Err ( other_res. err ( ) . unwrap ( ) ) ;
648+ }
649+ match other_res. unwrap ( ) {
650+ GCRefData :: SLICE ( other_s) => {
651+ if s. s . len ( ) != other_s. s . len ( ) {
652+ return Ok ( false ) ;
653+ }
654+ let mut i = 0 ;
655+ for item in s. s {
656+ let eq_res = item
657+ . equals ( shared_execution_context, other_s. s [ i] . clone ( ) ) ;
658+ if eq_res. is_err ( ) {
659+ return Err ( eq_res. err ( ) . unwrap ( ) ) ;
660+ }
661+ if eq_res. unwrap ( ) {
662+ return Ok ( false ) ;
663+ }
664+ i += 1 ;
665+ }
666+ return Ok ( true ) ;
667+ }
668+ _ => return Ok ( false ) ,
669+ }
670+ }
671+ _ => return Ok ( false ) ,
672+ } ,
643673 _ => todo ! ( ) ,
644674 }
645675 Ok ( true )
You can’t perform that action at this time.
0 commit comments