mktables: Don't generate swash info unnecessarily
authorKarl Williamson <public@khwilliamson.com>
Wed, 12 Oct 2011 15:43:02 +0000 (09:43 -0600)
committerKarl Williamson <public@khwilliamson.com>
Tue, 8 Nov 2011 15:09:27 +0000 (08:09 -0700)
Certain map files are special purpose, for use by certain modules, as
documented in the files (but these comments are stripped for
non-DEBUGGING builds).  They do not need to have the information about
the format, etc. of the file.

lib/unicore/mktables

index d83aeb0..605c598 100644 (file)
@@ -6112,6 +6112,10 @@ END
 
         my $name = $self->property->swash_name;
 
+        # Currently there is nothing in the pre_body unless a swash is being
+        # generated.
+        return unless defined $name;
+
         if (defined $swash_keys{$name}) {
             Carp::my_carp(join_lines(<<END
 Already created a swash name '$name' for $swash_keys{$name}.  This means that
@@ -7504,6 +7508,11 @@ sub trace { return main::trace(@_) if main::DEBUG && $to_trace }
 
         my $addr = do { no overloading; pack 'J', $self; };
 
+        # Swash names are used only on regular map tables; otherwise there
+        # should be no access to the property map table from other parts of
+        # Perl.
+        return if $map{$addr}->fate != $ORDINARY;
+
         return $file{$addr} if defined $file{$addr};
         return $map{$addr}->external_name;
     }