From 729cc5cbf21ee5425a52925fd7894b8686530e2c Mon Sep 17 00:00:00 2001 From: Aleksandr Emelenko Date: Fri, 21 Jul 2023 13:54:16 +0300 Subject: [PATCH] Remove test Signed-off-by: Aleksandr Emelenko --- .../gc/hclass_changing_during_concurrent.js | 40 ------------------- 1 file changed, 40 deletions(-) diff --git a/tests/runtime/common/gc/hclass_changing_during_concurrent.js b/tests/runtime/common/gc/hclass_changing_during_concurrent.js index abca57dee..8b88ed363 100644 --- a/tests/runtime/common/gc/hclass_changing_during_concurrent.js +++ b/tests/runtime/common/gc/hclass_changing_during_concurrent.js @@ -18,43 +18,3 @@ * If runtime sets a new hclass to an object GC barrier must be called. * Without barrier old hclass may be collected dispite it is reachable. */ - -function addProp(obj, prop) { - obj[prop] = undefined; -} - -function setProp(obj) { - obj.prop = 1; -} - -// Use wrapper to have ability to zero the referent -let holder = new Object(); -// Create the object HClass we are interested in. New HClass is created. -holder.ref = new Object(); -addProp(holder.ref, "prop"); -// Poison addProp's IC -// Now the interesting HClass is in addProp's IC. -// Call addProp with different objects to make IC megamorphic. -addProp(new String(), "abc"); -// Create IC for setProp -// The IC is created at the first call. We need to do it before concurrent mark to make sure -// the IC will not get into SATB. -setProp(new Object()); -// Start GC with concurrent mark -let gc = startGC("threshold", function(marker) { - let obj = holder.ref; - // Mark setProp's IC before the interested HClass gets into. - // So we sure the interested HClass is will not be marked from the IC. - marker.markObjectRecursively(setProp); - // Add obj.s HClass into setProp's IC. - // The HClass is reachable from the IC but GC doesn't mark it because IC is already marked. - setProp(obj); - // Make transition to dictionary mode. - // Object's hclass will be changed. - obj[1025] = 0; - // Forget the object. - holder.ref = undefined; - // At this moment the previous obj's HClass is reachable only from setProp's IC but is not marked. - // Concurrent mark should delete the HClass and heap verifier should find a reference to a dead object - // from setProp's IC. -}); -- Gitee