Changeset 208045 in webkit
- Timestamp:
- Oct 28, 2016 5:36:33 AM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r208043 r208045 1 2016-10-28 Fujii Hironori <Hironori.Fujii@sony.com> 2 3 generate-bindings-all.pl should recompile supplemented IDL if its supplemental IDL are added or removed 4 https://bugs.webkit.org/show_bug.cgi?id=164054 5 6 Reviewed by Michael Catanzaro. 7 8 generate-bindings-all.pl determines which IDL to recompile by 9 comparing timestamps of generated files, source IDL and its 10 dependencies. But this is not enough. If a new supplemental IDL 11 is added, its supplemented IDL needs to be recompiled even though 12 the timestamp of the supplemental IDL is older than the 13 generated files. 14 15 * bindings/scripts/generate-bindings-all.pl: Read supplemental 16 dependency file both before and after invoking preprocess-idls.pl. 17 Recompile IDL files if its supplemental dependencies are added or 18 removed. 19 1 20 2016-10-28 Youenn Fablet <youenn@apple.com> 2 21 -
trunk/Source/WebCore/bindings/scripts/generate-bindings-all.pl
r207617 r208045 71 71 close($fh) or die; 72 72 73 my %supplementedIdlFiles; 73 my %oldSupplements; 74 my %newSupplements; 74 75 if ($supplementalDependencyFile) { 75 76 my @output = ($supplementalDependencyFile, @ppExtraOutput); 76 my @deps = ( @idlFiles, @generatorDependency);77 my @deps = ($idlFilesList, @idlFiles, @generatorDependency); 77 78 if (needsUpdate(\@output, \@deps)) { 79 readSupplementalDependencyFile($supplementalDependencyFile, \%oldSupplements) if -e $supplementalDependencyFile; 78 80 my @args = (File::Spec->catfile($scriptDir, 'preprocess-idls.pl'), 79 81 '--defines', $defines, … … 84 86 executeCommand($perl, @args) == 0 or die; 85 87 } 86 open(my $fh, '<', $supplementalDependencyFile) or die "Cannot open $supplementalDependencyFile"; 87 while (<$fh>) { 88 my ($idlFile, @followingIdlFiles) = split(/\s+/); 89 $supplementedIdlFiles{$idlFile} = \@followingIdlFiles; 90 } 91 close($fh) or die; 88 readSupplementalDependencyFile($supplementalDependencyFile, \%newSupplements); 92 89 } 93 90 … … 105 102 buildDirectoryCache(); 106 103 107 my @idlFilesToUpdate = grep { 104 my @idlFilesToUpdate = grep &{sub { 105 if (defined($oldSupplements{$_}) 106 && @{$oldSupplements{$_}} ne @{$newSupplements{$_} or []}) { 107 # Re-process the IDL file if its supplemental dependencies were added or removed 108 return 1; 109 } 108 110 my ($filename, $dirs, $suffix) = fileparse($_, '.idl'); 109 111 my $sourceFile = File::Spec->catfile($outputDirectory, "JS$filename.cpp"); … … 114 116 $idlAttributesFile, 115 117 @generatorDependency, 116 @{$ supplementedIdlFiles{$_} or []},118 @{$newSupplements{$_} or []}, 117 119 implicitDependencies($depFile)); 118 120 needsUpdate(\@output, \@deps); 119 } @idlFiles;121 }}, @idlFiles; 120 122 my $queue = Thread::Queue->new(@idlFilesToUpdate); 121 123 my $abort :shared = 0; … … 235 237 return `stty size` =~ /\d+\s+(\d+)/ ? $1 : 80; 236 238 } 239 240 sub readSupplementalDependencyFile 241 { 242 my $filename = shift; 243 my $supplements = shift; 244 open(my $fh, '<', $filename) or die "Cannot open $filename"; 245 while (<$fh>) { 246 my ($idlFile, @followingIdlFiles) = split(/\s+/); 247 $supplements->{$idlFile} = [sort @followingIdlFiles]; 248 } 249 close($fh) or die; 250 }
Note: See TracChangeset
for help on using the changeset viewer.