Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
xFrednet committed Nov 1, 2024
1 parent e9ef82c commit beccc35
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 17 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,6 @@ set_property(TEST leak_with_global.vpy PROPERTY WILL_FAIL true)
set_property(TEST invalid_read.vpy PROPERTY WILL_FAIL true)
set_property(TEST invalid_shared_region.vpy PROPERTY WILL_FAIL true)
set_property(TEST invalid_write.vpy PROPERTY WILL_FAIL true)
set_property(TEST fail_cross_region_reg.vpy PROPERTY WILL_FAIL true)
set_property(TEST region_bad_1.vpy PROPERTY WILL_FAIL true)
set_property(TEST region_bad_2.vpy PROPERTY WILL_FAIL true)
set_property(TEST fail_cross_region_ref.vpy PROPERTY WILL_FAIL true)
16 changes: 16 additions & 0 deletions src/rt/objects/region.cc
Original file line number Diff line number Diff line change
Expand Up @@ -251,4 +251,20 @@ namespace rt::objects
return obj;
}

void Region::action(Region* r)
{
if ((r->local_reference_count == 0) && (r->parent == nullptr))
{
// TODO, this can be hooked to perform delayed operations like send.
// Needs to check for sub_region_reference_count for send, but not
// deallocate.

if (r != get_local_region() && r != cown_region)
{
to_collect.push_back(r);
std::cout << "Collecting region: " << r << std::endl;
}
}
}

}
13 changes: 1 addition & 12 deletions src/rt/objects/region.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,7 @@ namespace rt::objects
return local_reference_count + sub_region_reference_count;
}

static void action(Region* r)
{
if ((r->local_reference_count == 0) && (r->parent == nullptr))
{
// TODO, this can be hooked to perform delayed operations like send.
// Needs to check for sub_region_reference_count for send, but not
// deallocate.

to_collect.push_back(r);
std::cout << "Collecting region: " << r << std::endl;
}
}
static void action(Region*);

static void dec_lrc(Region* r)
{
Expand Down
1 change: 0 additions & 1 deletion tests/cowns/valid_01.vpy
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ global = {}
a = Region()
a.b = {}


c01 = cown(move a)

# Store the cown in a global
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# Root a
a = Region()
a = {}
region(a)

# Root b
b = Region()
b = {}
region(b)

# Child region
c = Region()
c = {}
region(c)
a.child = c

# Error
Expand Down

0 comments on commit beccc35

Please sign in to comment.