Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Side by Side Diff: Source/bindings/scripts/generate-bindings.pl

Issue 17572008: WIP IDL compiler rewrite (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: non-callback headers working Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 #!/usr/bin/perl -w 1 #!/usr/bin/perl -w
2 # 2 #
3 # Copyright (C) 2005 Apple Computer, Inc. 3 # Copyright (C) 2005 Apple Computer, Inc.
4 # Copyright (C) 2006 Anders Carlsson <andersca@mac.com> 4 # Copyright (C) 2006 Anders Carlsson <andersca@mac.com>
5 # 5 #
6 # This file is part of WebKit 6 # This file is part of WebKit
7 # 7 #
8 # This library is free software; you can redistribute it and/or 8 # This library is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU Library General Public 9 # modify it under the terms of the GNU Library General Public
10 # License as published by the Free Software Foundation; either 10 # License as published by the Free Software Foundation; either
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 } 183 }
184 } 184 }
185 } 185 }
186 186
187 # FIXME: This code will be removed once IDLParser.pm and CodeGeneratorV8.pm 187 # FIXME: This code will be removed once IDLParser.pm and CodeGeneratorV8.pm
188 # are connected via JSON files. See http://crbug.com/242795 188 # are connected via JSON files. See http://crbug.com/242795
189 $targetDocument = deserializeJSON(serializeJSON($targetDocument)); 189 $targetDocument = deserializeJSON(serializeJSON($targetDocument));
190 190
191 # Generate desired output for the target IDL file. 191 # Generate desired output for the target IDL file.
192 my @dependentIdlFiles = ($targetDocument->fileName(), @supplementedIdlFiles); 192 my @dependentIdlFiles = ($targetDocument->fileName(), @supplementedIdlFiles);
193
194 use Data::Dumper;
195 print "[targetIdlFile]", $targetIdlFile, "[Content]", serializeJSON($targetDocum ent), "\n [sup]",
196 Dumper(@supplementedIdlFiles), "\n",
197 "[idlDi]", Dumper(@idlDirectories)
198 if $targetIdlFile =~ /RTCErrorCallback/;
199
200
193 my $codeGenerator = CodeGeneratorV8->new($targetDocument, \@idlDirectories, $pre processor, $defines, $verbose, \@dependentIdlFiles, $writeFileOnlyIfChanged); 201 my $codeGenerator = CodeGeneratorV8->new($targetDocument, \@idlDirectories, $pre processor, $defines, $verbose, \@dependentIdlFiles, $writeFileOnlyIfChanged);
194 my $interfaces = $targetDocument->interfaces; 202 my $interfaces = $targetDocument->interfaces;
195 foreach my $interface (@$interfaces) { 203 foreach my $interface (@$interfaces) {
196 print "Generating bindings code for IDL interface \"" . $interface->name . " \"...\n" if $verbose; 204 print "Generating bindings code for IDL interface \"" . $interface->name . " \"...\n" if $verbose;
197 $codeGenerator->GenerateInterface($interface); 205 $codeGenerator->GenerateInterface($interface);
198 $codeGenerator->WriteData($interface, $outputDirectory, $outputHeadersDirect ory); 206 $codeGenerator->WriteData($interface, $outputDirectory, $outputHeadersDirect ory);
199 } 207 }
200 208
201 sub generateEmptyHeaderAndCpp 209 sub generateEmptyHeaderAndCpp
202 { 210 {
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 last OUTER; 314 last OUTER;
307 } 315 }
308 } 316 }
309 } 317 }
310 if ($error) { 318 if ($error) {
311 die "IDL ATTRIBUTE CHECKER ERROR: $error 319 die "IDL ATTRIBUTE CHECKER ERROR: $error
312 If you want to add a new IDL attribute, you need to add it to bindings/scripts/I DLAttributes.txt and add explanations to the Blink IDL document (http://chromium .org/blink/webidl). 320 If you want to add a new IDL attribute, you need to add it to bindings/scripts/I DLAttributes.txt and add explanations to the Blink IDL document (http://chromium .org/blink/webidl).
313 "; 321 ";
314 } 322 }
315 } 323 }
OLDNEW
« no previous file with comments | « Source/bindings/scripts/code_generator_v8.py ('k') | Source/bindings/scripts/generate_bindings.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698