@@ -5430,6 +5430,15 @@ sub trace { return main::trace(@_); }
5430
5430
# used to override calculations.
5431
5431
main::set_access('format', \%format, 'r', 'p_s');
5432
5432
5433
+ my %has_dependency;
5434
+ # A boolean that gives whether some other table in this property is
5435
+ # defined as the complement of this table. This is a crude, but currently
5436
+ # sufficient, mechanism to make this table not get destroyed before what
5437
+ # is dependent on it is. Other dependencies could be added, so the name
5438
+ # was chosen to reflect a more general situation than actually is
5439
+ # currently the case.
5440
+ main::set_access('has_dependency', \%has_dependency, 'r', 's');
5441
+
5433
5442
sub new {
5434
5443
# All arguments are key => value pairs, which you can see below, most
5435
5444
# of which match fields documented above. Otherwise: Re_Pod_Entry,
@@ -5485,6 +5494,7 @@ sub trace { return main::trace(@_); }
5485
5494
$note{$addr} = [ ];
5486
5495
$file_path{$addr} = [ ];
5487
5496
$locked{$addr} = "";
5497
+ $has_dependency{$addr} = 0;
5488
5498
5489
5499
push @{$description{$addr}}, $description if $description;
5490
5500
push @{$note{$addr}}, $note if $note;
@@ -8168,6 +8178,15 @@ sub trace { return main::trace(@_); }
8168
8178
}
8169
8179
my $addr = do { no overloading; pack 'J', $self; };
8170
8180
$complement{$addr} = $other;
8181
+
8182
+ # Be sure the other property knows we are depending on them; or the
8183
+ # other table if it is one in the current property.
8184
+ if ($self->property != $other->property) {
8185
+ $other->property->set_has_dependency(1);
8186
+ }
8187
+ else {
8188
+ $other->set_has_dependency(1);
8189
+ }
8171
8190
$self->lock;
8172
8191
return;
8173
8192
}
@@ -8754,6 +8773,15 @@ sub trace { return main::trace(@_) if main::DEBUG && $to_trace }
8754
8773
main::set_access('pre_declared_maps',
8755
8774
\%pre_declared_maps, 'r', 's');
8756
8775
8776
+ my %has_dependency;
8777
+ # A boolean that gives whether some table somewhere is defined as the
8778
+ # complement of a table in this property. This is a crude, but currently
8779
+ # sufficient, mechanism to make this property not get destroyed before
8780
+ # what is dependent on it is. Other dependencies could be added, so the
8781
+ # name was chosen to reflect a more general situation than actually is
8782
+ # currently the case.
8783
+ main::set_access('has_dependency', \%has_dependency, 'r', 's');
8784
+
8757
8785
sub new {
8758
8786
# The only required parameter is the positionally first, name. All
8759
8787
# other parameters are key => value pairs. See the documentation just
@@ -8792,6 +8820,7 @@ sub trace { return main::trace(@_) if main::DEBUG && $to_trace }
8792
8820
$has_only_code_point_maps{$addr} = 1;
8793
8821
$table_ref{$addr} = { };
8794
8822
$unique_maps{$addr} = { };
8823
+ $has_dependency{$addr} = 0;
8795
8824
8796
8825
$map{$addr} = Map_Table->new($name,
8797
8826
Full_Name => $full_name{$addr},
@@ -18558,8 +18587,16 @@ sub make_property_test_script() {
18558
18587
18559
18588
# Sort these so get results in same order on different runs of this
18560
18589
# program
18561
- foreach my $property (sort { $a->name cmp $b->name } property_ref('*')) {
18562
- foreach my $table (sort { $a->name cmp $b->name } $property->tables) {
18590
+ foreach my $property (sort { $a->has_dependency <=> $b->has_dependency
18591
+ or
18592
+ lc $a->name cmp lc $b->name
18593
+ } property_ref('*'))
18594
+ {
18595
+ foreach my $table (sort { $a->has_dependency <=> $b->has_dependency
18596
+ or
18597
+ lc $a->name cmp lc $b->name
18598
+ } $property->tables)
18599
+ {
18563
18600
18564
18601
# Find code points that match, and don't match this table.
18565
18602
my $valid = $table->get_valid_code_point;
0 commit comments