OLD | NEW |
1 # Copyright (C) 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> | 1 # Copyright (C) 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> |
2 # Copyright (C) 2006 Anders Carlsson <andersca@mac.com> | 2 # Copyright (C) 2006 Anders Carlsson <andersca@mac.com> |
3 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> | 3 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> |
4 # Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org> | 4 # Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org> |
5 # Copyright (C) 2006 Apple Computer, Inc. | 5 # Copyright (C) 2006 Apple Computer, Inc. |
6 # Copyright (C) 2007, 2008, 2009, 2012 Google Inc. | 6 # Copyright (C) 2007, 2008, 2009, 2012 Google Inc. |
7 # Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> | 7 # Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> |
8 # Copyright (C) Research In Motion Limited 2010. All rights reserved. | 8 # Copyright (C) Research In Motion Limited 2010. All rights reserved. |
9 # Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 # Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
10 # Copyright (C) 2012 Ericsson AB. All rights reserved. | 10 # Copyright (C) 2012 Ericsson AB. All rights reserved. |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 } else { | 100 } else { |
101 $code .= $content; | 101 $code .= $content; |
102 } | 102 } |
103 } | 103 } |
104 $code .= $footer . "\n" if $footer; | 104 $code .= $footer . "\n" if $footer; |
105 $code .= "/* END " . $object->{name} . " */\n" if $verbose; | 105 $code .= "/* END " . $object->{name} . " */\n" if $verbose; |
106 return $code; | 106 return $code; |
107 } | 107 } |
108 | 108 |
109 | 109 |
110 package CodeGeneratorV8; | 110 package deprecated_code_generator_v8; |
111 | 111 |
112 use strict; | 112 use strict; |
113 use Cwd; | 113 use Cwd; |
114 use File::Basename; | 114 use File::Basename; |
115 use File::Find; | 115 use File::Find; |
116 use File::Spec; | 116 use File::Spec; |
117 | 117 |
118 my $idlDocument; | 118 my $idlDocument; |
119 my $idlDirectories; | 119 my $idlDirectories; |
120 my $preprocessor; | 120 my $preprocessor; |
121 my $defines; | |
122 my $verbose; | 121 my $verbose; |
123 my $dependentIdlFiles; | 122 my $dependentIdlFiles; |
124 my $writeFileOnlyIfChanged; | 123 my $writeFileOnlyIfChanged; |
125 my $sourceRoot; | 124 my $sourceRoot; |
126 | 125 |
127 # Cache of IDL file pathnames. | 126 # Cache of IDL file pathnames. |
128 my $idlFiles; | 127 my $idlFiles; |
129 my $cachedInterfaces = {}; | 128 my $cachedInterfaces = {}; |
130 | 129 |
131 my %implIncludes = (); | 130 my %implIncludes = (); |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 EOF | 253 EOF |
255 | 254 |
256 sub new | 255 sub new |
257 { | 256 { |
258 my $object = shift; | 257 my $object = shift; |
259 my $reference = { }; | 258 my $reference = { }; |
260 | 259 |
261 $idlDocument = shift; | 260 $idlDocument = shift; |
262 $idlDirectories = shift; | 261 $idlDirectories = shift; |
263 $preprocessor = shift; | 262 $preprocessor = shift; |
264 $defines = shift; | |
265 $verbose = shift; | 263 $verbose = shift; |
266 $dependentIdlFiles = shift; | 264 $dependentIdlFiles = shift; |
267 $writeFileOnlyIfChanged = shift; | 265 $writeFileOnlyIfChanged = shift; |
268 | 266 |
269 $sourceRoot = getcwd(); | 267 $sourceRoot = getcwd(); |
270 | 268 |
271 bless($reference, $object); | 269 bless($reference, $object); |
272 return $reference; | 270 return $reference; |
273 } | 271 } |
274 | 272 |
(...skipping 29 matching lines...) Expand all Loading... |
304 return $cachedInterfaces->{$interfaceName}; | 302 return $cachedInterfaces->{$interfaceName}; |
305 } | 303 } |
306 | 304 |
307 # Step #1: Find the IDL file associated with 'interface' | 305 # Step #1: Find the IDL file associated with 'interface' |
308 my $filename = IDLFileForInterface($interfaceName) | 306 my $filename = IDLFileForInterface($interfaceName) |
309 or die("Could NOT find IDL file for interface \"$interfaceName\" $!\n"); | 307 or die("Could NOT find IDL file for interface \"$interfaceName\" $!\n"); |
310 | 308 |
311 print " | |> Parsing parent IDL \"$filename\" for interface \"$interfaceN
ame\"\n" if $verbose; | 309 print " | |> Parsing parent IDL \"$filename\" for interface \"$interfaceN
ame\"\n" if $verbose; |
312 | 310 |
313 # Step #2: Parse the found IDL file (in quiet mode). | 311 # Step #2: Parse the found IDL file (in quiet mode). |
314 my $parser = IDLParser->new(1); | 312 my $parser = deprecated_idl_parser->new(1); |
315 my $document = $parser->Parse($filename, $defines, $preprocessor); | 313 my $document = $parser->Parse($filename, $preprocessor); |
316 | 314 |
317 foreach my $interface (@{$document->interfaces}) { | 315 foreach my $interface (@{$document->interfaces}) { |
318 if ($interface->name eq $interfaceName or $interface->isPartial) { | 316 if ($interface->name eq $interfaceName or $interface->isPartial) { |
319 $cachedInterfaces->{$interfaceName} = $interface; | 317 $cachedInterfaces->{$interfaceName} = $interface; |
320 return $interface; | 318 return $interface; |
321 } | 319 } |
322 } | 320 } |
323 | 321 |
324 die("Could NOT find interface definition for $interfaceName in $filename"); | 322 die("Could NOT find interface definition for $interfaceName in $filename"); |
325 } | 323 } |
(...skipping 5710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6036 if ($currentInterface->extendedAttributes->{$extendedAttribute}) { | 6034 if ($currentInterface->extendedAttributes->{$extendedAttribute}) { |
6037 $found = 1; | 6035 $found = 1; |
6038 } | 6036 } |
6039 return 1 if $found; | 6037 return 1 if $found; |
6040 }, 0); | 6038 }, 0); |
6041 | 6039 |
6042 return $found; | 6040 return $found; |
6043 } | 6041 } |
6044 | 6042 |
6045 1; | 6043 1; |
OLD | NEW |