OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
3 # for details. All rights reserved. Use of this source code is governed by a | 3 # for details. All rights reserved. Use of this source code is governed by a |
4 # BSD-style license that can be found in the LICENSE file. | 4 # BSD-style license that can be found in the LICENSE file. |
5 | 5 |
6 """This module provides shared functionality for systems to generate | 6 """This module provides shared functionality for systems to generate |
7 Dart APIs from the IDL database.""" | 7 Dart APIs from the IDL database.""" |
8 | 8 |
9 import re | 9 import re |
10 | 10 |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 # Primitive type conversion | 175 # Primitive type conversion |
176 return _idl_to_dart_type_conversions[type_name] | 176 return _idl_to_dart_type_conversions[type_name] |
177 return None | 177 return None |
178 | 178 |
179 def IsPrimitiveType(type_name): | 179 def IsPrimitiveType(type_name): |
180 return (ConvertPrimitiveType(type_name) is not None or | 180 return (ConvertPrimitiveType(type_name) is not None or |
181 type_name in _dart_to_idl_type_conversions) | 181 type_name in _dart_to_idl_type_conversions) |
182 | 182 |
183 def MaybeListElementTypeName(type_name): | 183 def MaybeListElementTypeName(type_name): |
184 """Returns the List element type T from string of form "List<T>", or None.""" | 184 """Returns the List element type T from string of form "List<T>", or None.""" |
185 match = re.match(r'List<(\w*)>$', type_name) | 185 match = re.match(r'sequence<(\w*)>$', type_name) |
186 if match: | 186 if match: |
187 return match.group(1) | 187 return match.group(1) |
188 return None | 188 return None |
189 | 189 |
190 def MaybeListElementType(interface): | 190 def MaybeListElementType(interface): |
191 """Returns the List element type T, or None in interface does not implement | 191 """Returns the List element type T, or None in interface does not implement |
192 List<T>. | 192 List<T>. |
193 """ | 193 """ |
194 for parent in interface.parents: | 194 for parent in interface.parents: |
195 element_type = MaybeListElementTypeName(parent.type.id) | 195 element_type = MaybeListElementTypeName(parent.type.id) |
(...skipping 22 matching lines...) Expand all Loading... |
218 # against dart:dom to load in a worker isolate. | 218 # against dart:dom to load in a worker isolate. |
219 return '*' + javascript_binding_name | 219 return '*' + javascript_binding_name |
220 | 220 |
221 | 221 |
222 def MatchSourceFilter(filter, thing): | 222 def MatchSourceFilter(filter, thing): |
223 if not filter: | 223 if not filter: |
224 return True | 224 return True |
225 else: | 225 else: |
226 return any(token in thing.annotations for token in filter) | 226 return any(token in thing.annotations for token in filter) |
227 | 227 |
| 228 def DartType(idl_type_name): |
| 229 match = re.match(r'sequence<(\w*)>$', idl_type_name) |
| 230 if match: |
| 231 return 'List<%s>' % GetIDLTypeInfoByName(match.group(1)).dart_type() |
| 232 return GetIDLTypeInfoByName(idl_type_name).dart_type() |
228 | 233 |
229 # Given a list of overloaded arguments, render a dart argument. | 234 # Given a list of overloaded arguments, render a dart argument. |
230 def _DartArg(args, interface): | 235 def _DartArg(args, interface): |
231 # Given a list of overloaded arguments, choose a suitable name. | 236 # Given a list of overloaded arguments, choose a suitable name. |
232 def OverloadedName(args): | 237 def OverloadedName(args): |
233 return '_OR_'.join(sorted(set(arg.id for arg in args))) | 238 return '_OR_'.join(sorted(set(arg.id for arg in args))) |
234 | 239 |
235 # Given a list of overloaded arguments, choose a suitable type. | 240 # Given a list of overloaded arguments, choose a suitable type. |
236 def OverloadedType(args): | 241 def OverloadedType(args): |
237 typeIds = sorted(set(arg.type.id for arg in args)) | 242 typeIds = sorted(set(DartType(arg.type.id) for arg in args)) |
238 if len(typeIds) == 1: | 243 if len(typeIds) == 1: |
239 return typeIds[0] | 244 return typeIds[0] |
240 else: | 245 else: |
241 return TypeName(typeIds, interface) | 246 return TypeName(typeIds, interface) |
242 | 247 |
243 filtered = filter(None, args) | 248 filtered = filter(None, args) |
244 optional = any(not arg or arg.is_optional for arg in args) | 249 optional = any(not arg or arg.is_optional for arg in args) |
245 type = OverloadedType(filtered) | 250 type = OverloadedType(filtered) |
246 name = OverloadedName(filtered) | 251 name = OverloadedName(filtered) |
247 if optional: | 252 if optional: |
(...skipping 11 matching lines...) Expand all Loading... |
259 # Zip together arguments from each overload by position, then convert | 264 # Zip together arguments from each overload by position, then convert |
260 # to a dart argument. | 265 # to a dart argument. |
261 args = map(lambda *args: _DartArg(args, interface), | 266 args = map(lambda *args: _DartArg(args, interface), |
262 *(op.arguments for op in operations)) | 267 *(op.arguments for op in operations)) |
263 | 268 |
264 info = OperationInfo() | 269 info = OperationInfo() |
265 info.overloads = operations | 270 info.overloads = operations |
266 info.declared_name = operations[0].id | 271 info.declared_name = operations[0].id |
267 info.name = operations[0].ext_attrs.get('DartName', info.declared_name) | 272 info.name = operations[0].ext_attrs.get('DartName', info.declared_name) |
268 info.js_name = info.declared_name | 273 info.js_name = info.declared_name |
269 info.type_name = operations[0].type.id # TODO: widen. | 274 info.type_name = DartType(operations[0].type.id) # TODO: widen. |
270 info.arg_infos = args | 275 info.arg_infos = args |
271 return info | 276 return info |
272 | 277 |
273 | 278 |
274 def AnalyzeConstructor(interface): | 279 def AnalyzeConstructor(interface): |
275 """Returns an OperationInfo object for the constructor. | 280 """Returns an OperationInfo object for the constructor. |
276 | 281 |
277 Returns None if the interface has no Constructor. | 282 Returns None if the interface has no Constructor. |
278 """ | 283 """ |
279 def GetArgs(func_value): | 284 def GetArgs(func_value): |
(...skipping 29 matching lines...) Expand all Loading... |
309 """Returns the info for the callback method if the interface smells like a | 314 """Returns the info for the callback method if the interface smells like a |
310 callback. | 315 callback. |
311 """ | 316 """ |
312 if 'Callback' not in interface.ext_attrs: return None | 317 if 'Callback' not in interface.ext_attrs: return None |
313 handlers = [op for op in interface.operations if op.id == 'handleEvent'] | 318 handlers = [op for op in interface.operations if op.id == 'handleEvent'] |
314 if not handlers: return None | 319 if not handlers: return None |
315 if not (handlers == interface.operations): return None | 320 if not (handlers == interface.operations): return None |
316 return AnalyzeOperation(interface, handlers) | 321 return AnalyzeOperation(interface, handlers) |
317 | 322 |
318 def IsDartListType(type): | 323 def IsDartListType(type): |
319 return type == 'List' or type.startswith('List<') | 324 return type == 'List' or type.startswith('sequence<') |
320 | 325 |
321 def IsDartCollectionType(type): | 326 def IsDartCollectionType(type): |
322 return IsDartListType(type) | 327 return IsDartListType(type) |
323 | 328 |
324 def FindMatchingAttribute(interface, attr1): | 329 def FindMatchingAttribute(interface, attr1): |
325 matches = [attr2 for attr2 in interface.attributes | 330 matches = [attr2 for attr2 in interface.attributes |
326 if attr1.id == attr2.id | 331 if attr1.id == attr2.id |
327 and attr1.is_fc_getter == attr2.is_fc_getter | 332 and attr1.is_fc_getter == attr2.is_fc_getter |
328 and attr1.is_fc_setter == attr2.is_fc_setter] | 333 and attr1.is_fc_setter == attr2.is_fc_setter] |
329 if matches: | 334 if matches: |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 | 437 |
433 # Given a sorted sequence of type identifiers, return an appropriate type | 438 # Given a sorted sequence of type identifiers, return an appropriate type |
434 # name | 439 # name |
435 def TypeName(typeIds, interface): | 440 def TypeName(typeIds, interface): |
436 # Dynamically type this field for now. | 441 # Dynamically type this field for now. |
437 return 'var' | 442 return 'var' |
438 | 443 |
439 # ------------------------------------------------------------------------------ | 444 # ------------------------------------------------------------------------------ |
440 | 445 |
441 class IDLTypeInfo(object): | 446 class IDLTypeInfo(object): |
442 def __init__(self, idl_type, native_type=None, ref_counted=True, | 447 def __init__(self, idl_type, dart_type=None, native_type=None, ref_counted=Tru
e, |
443 has_dart_wrapper=True, conversion_template=None, | 448 has_dart_wrapper=True, conversion_template=None, |
444 custom_to_dart=False): | 449 custom_to_dart=False): |
445 self._idl_type = idl_type | 450 self._idl_type = idl_type |
| 451 self._dart_type = dart_type |
446 self._native_type = native_type | 452 self._native_type = native_type |
447 self._ref_counted = ref_counted | 453 self._ref_counted = ref_counted |
448 self._has_dart_wrapper = has_dart_wrapper | 454 self._has_dart_wrapper = has_dart_wrapper |
449 self._conversion_template = conversion_template | 455 self._conversion_template = conversion_template |
450 self._custom_to_dart = custom_to_dart | 456 self._custom_to_dart = custom_to_dart |
451 | 457 |
452 def idl_type(self): | 458 def idl_type(self): |
453 return self._idl_type | 459 return self._idl_type |
454 | 460 |
| 461 def dart_type(self): |
| 462 if self._dart_type: |
| 463 return self._dart_type |
| 464 return self._idl_type |
| 465 |
455 def native_type(self): | 466 def native_type(self): |
456 if self._native_type: | 467 if self._native_type: |
457 return self._native_type | 468 return self._native_type |
458 return self._idl_type | 469 return self._idl_type |
459 | 470 |
460 def parameter_adapter_info(self): | 471 def parameter_adapter_info(self): |
461 native_type = self.native_type() | 472 native_type = self.native_type() |
462 if self._ref_counted: | 473 if self._ref_counted: |
463 native_type = 'RefPtr< %s >' % native_type | 474 native_type = 'RefPtr< %s >' % native_type |
464 if self._has_dart_wrapper: | 475 if self._has_dart_wrapper: |
(...skipping 20 matching lines...) Expand all Loading... |
485 | 496 |
486 def conversion_cast(self, expression): | 497 def conversion_cast(self, expression): |
487 if self._conversion_template: | 498 if self._conversion_template: |
488 return self._conversion_template % expression | 499 return self._conversion_template % expression |
489 return expression | 500 return expression |
490 | 501 |
491 def custom_to_dart(self): | 502 def custom_to_dart(self): |
492 return self._custom_to_dart | 503 return self._custom_to_dart |
493 | 504 |
494 class PrimitiveIDLTypeInfo(IDLTypeInfo): | 505 class PrimitiveIDLTypeInfo(IDLTypeInfo): |
495 def __init__(self, idl_type, native_type=None, ref_counted=False, | 506 def __init__(self, idl_type, dart_type, native_type=None, ref_counted=False, |
496 conversion_template=None, | 507 conversion_template=None, |
497 webcore_getter_name='getAttribute', | 508 webcore_getter_name='getAttribute', |
498 webcore_setter_name='setAttribute'): | 509 webcore_setter_name='setAttribute'): |
499 super(PrimitiveIDLTypeInfo, self).__init__(idl_type, | 510 super(PrimitiveIDLTypeInfo, self).__init__(idl_type, dart_type=dart_type, |
500 native_type=native_type, ref_counted=ref_counted, | 511 native_type=native_type, ref_counted=ref_counted, |
501 conversion_template=conversion_template) | 512 conversion_template=conversion_template) |
502 self._webcore_getter_name = webcore_getter_name | 513 self._webcore_getter_name = webcore_getter_name |
503 self._webcore_setter_name = webcore_setter_name | 514 self._webcore_setter_name = webcore_setter_name |
504 | 515 |
505 def parameter_adapter_info(self): | 516 def parameter_adapter_info(self): |
506 native_type = self.native_type() | 517 native_type = self.native_type() |
507 if self._ref_counted: | 518 if self._ref_counted: |
508 native_type = 'RefPtr< %s >' % native_type | 519 native_type = 'RefPtr< %s >' % native_type |
509 return ('ParameterAdapter< %s >' % native_type, None) | 520 return ('ParameterAdapter< %s >' % native_type, None) |
(...skipping 26 matching lines...) Expand all Loading... |
536 tear_off_type = 'SVGListPropertyTearOff' | 547 tear_off_type = 'SVGListPropertyTearOff' |
537 return '%s<%s>' % (tear_off_type, self._idl_type) | 548 return '%s<%s>' % (tear_off_type, self._idl_type) |
538 | 549 |
539 def receiver(self): | 550 def receiver(self): |
540 if self._idl_type.endswith('List'): | 551 if self._idl_type.endswith('List'): |
541 return 'receiver->' | 552 return 'receiver->' |
542 return 'receiver->propertyReference().' | 553 return 'receiver->propertyReference().' |
543 | 554 |
544 | 555 |
545 _idl_type_registry = { | 556 _idl_type_registry = { |
546 # There is GC3Dboolean which is not a bool, but unsigned char for OpenGL co
mpatibility. | 557 # There is GC3Dboolean which is not a bool, but unsigned char for OpenGL com
patibility. |
547 'boolean': PrimitiveIDLTypeInfo('boolean', native_type='bool', | 558 'boolean': PrimitiveIDLTypeInfo('boolean', dart_type='bool', native_type='bo
ol', |
548 conversion_template='static_cast<bool>(%s)', | 559 conversion_template='static_cast<bool>(%s)', |
549 webcore_getter_name='hasAttribute', | 560 webcore_getter_name='hasAttribute', |
550 webcore_setter_name='setBooleanAttribute'), | 561 webcore_setter_name='setBooleanAttribute'), |
551 # Some IDL's unsigned shorts/shorts are mapped to WebCore C++ enums, so we | 562 # Some IDL's unsigned shorts/shorts are mapped to WebCore C++ enums, so we |
552 # use a static_cast<int> here not to provide overloads for all enums. | 563 # use a static_cast<int> here not to provide overloads for all enums. |
553 'short': PrimitiveIDLTypeInfo('short', native_type='int', conversion_templat
e='static_cast<int>(%s)'), | 564 'short': PrimitiveIDLTypeInfo('short', dart_type='int', native_type='int', |
554 'unsigned short': PrimitiveIDLTypeInfo('unsigned short', native_type='int',
conversion_template='static_cast<int>(%s)'), | 565 conversion_template='static_cast<int>(%s)'), |
555 'int': PrimitiveIDLTypeInfo('int'), | 566 'unsigned short': PrimitiveIDLTypeInfo('unsigned short', dart_type='int', |
556 'unsigned int': PrimitiveIDLTypeInfo('unsigned int', native_type='unsigned')
, | 567 native_type='int', conversion_template='static_cast<int>(%s)'), |
557 'long': PrimitiveIDLTypeInfo('long', native_type='int', | 568 'int': PrimitiveIDLTypeInfo('int', dart_type='int'), |
| 569 'unsigned int': PrimitiveIDLTypeInfo('unsigned int', dart_type='int', |
| 570 native_type='unsigned'), |
| 571 'long': PrimitiveIDLTypeInfo('long', dart_type='int', native_type='int', |
558 webcore_getter_name='getIntegralAttribute', | 572 webcore_getter_name='getIntegralAttribute', |
559 webcore_setter_name='setIntegralAttribute'), | 573 webcore_setter_name='setIntegralAttribute'), |
560 'unsigned long': PrimitiveIDLTypeInfo('unsigned long', native_type='unsigned
', | 574 'unsigned long': PrimitiveIDLTypeInfo('unsigned long', dart_type='int', |
| 575 native_type='unsigned', |
561 webcore_getter_name='getUnsignedIntegralAttribute', | 576 webcore_getter_name='getUnsignedIntegralAttribute', |
562 webcore_setter_name='setUnsignedIntegralAttribute'), | 577 webcore_setter_name='setUnsignedIntegralAttribute'), |
563 'long long': PrimitiveIDLTypeInfo('long long'), | 578 'long long': PrimitiveIDLTypeInfo('long long', dart_type='int'), |
564 'unsigned long long': PrimitiveIDLTypeInfo('unsigned long long'), | 579 'unsigned long long': PrimitiveIDLTypeInfo('unsigned long long', dart_type='
int'), |
565 'double': PrimitiveIDLTypeInfo('double'), | 580 'double': PrimitiveIDLTypeInfo('double', dart_type='num'), |
| 581 'float': PrimitiveIDLTypeInfo('float', dart_type='num'), |
566 | 582 |
567 'Date': PrimitiveIDLTypeInfo('Date', native_type='double'), | 583 'any': PrimitiveIDLTypeInfo('any', dart_type='Object'), |
568 'DOMString': PrimitiveIDLTypeInfo('DOMString', native_type='String'), | 584 'any[]': PrimitiveIDLTypeInfo('any[]', dart_type='List'), |
569 'DOMTimeStamp': PrimitiveIDLTypeInfo('DOMTimeStamp'), | 585 'Array': PrimitiveIDLTypeInfo('Array', dart_type='List'), |
570 'object': PrimitiveIDLTypeInfo('object', native_type='ScriptValue'), | 586 'custom': PrimitiveIDLTypeInfo('custom', dart_type='Dynamic'), |
571 'SerializedScriptValue': PrimitiveIDLTypeInfo('SerializedScriptValue', ref_c
ounted=True), | 587 'Date': PrimitiveIDLTypeInfo('Date', dart_type='Date', native_type='double')
, |
| 588 'DOMObject': PrimitiveIDLTypeInfo('DOMObject', dart_type='Object'), |
| 589 'DOMString': PrimitiveIDLTypeInfo('DOMString', dart_type='String', native_ty
pe='String'), |
| 590 # TODO(sra): Flags is really a dictionary: {create:bool, exclusive:bool} |
| 591 # http://dev.w3.org/2009/dap/file-system/file-dir-sys.html#the-flags-interfa
ce |
| 592 'Flags': PrimitiveIDLTypeInfo('Flags', dart_type='Object'), |
| 593 'List<String>': PrimitiveIDLTypeInfo('DOMStringList', dart_type='List<String
>'), |
| 594 'DOMTimeStamp': PrimitiveIDLTypeInfo('DOMTimeStamp', dart_type='int'), |
| 595 'object': PrimitiveIDLTypeInfo('object', dart_type='Object', native_type='Sc
riptValue'), |
| 596 'SerializedScriptValue': PrimitiveIDLTypeInfo('SerializedScriptValue', dart_
type='Dynamic', ref_counted=True), |
| 597 'WebKitFlags': PrimitiveIDLTypeInfo('WebKitFlags', dart_type='Object'), |
572 | 598 |
573 'DOMException': IDLTypeInfo('DOMCoreException'), | 599 'DOMException': IDLTypeInfo('DOMCoreException', dart_type='DOMException'), |
574 'DOMWindow': IDLTypeInfo('DOMWindow', custom_to_dart=True), | 600 'DOMWindow': IDLTypeInfo('DOMWindow', custom_to_dart=True), |
575 'Element': IDLTypeInfo('Element', custom_to_dart=True), | 601 'Element': IDLTypeInfo('Element', custom_to_dart=True), |
576 'EventListener': IDLTypeInfo('EventListener', has_dart_wrapper=False), | 602 'EventListener': IDLTypeInfo('EventListener', has_dart_wrapper=False), |
577 'EventTarget': IDLTypeInfo('EventTarget', has_dart_wrapper=False), | 603 'EventTarget': IDLTypeInfo('EventTarget', has_dart_wrapper=False), |
578 'HTMLElement': IDLTypeInfo('HTMLElement', custom_to_dart=True), | 604 'HTMLElement': IDLTypeInfo('HTMLElement', custom_to_dart=True), |
579 'MediaQueryListListener': IDLTypeInfo('MediaQueryListListener', has_dart_wra
pper=False), | 605 'MediaQueryListListener': IDLTypeInfo('MediaQueryListListener', has_dart_wra
pper=False), |
580 'OptionsObject': IDLTypeInfo('OptionsObject', has_dart_wrapper=False), | 606 'OptionsObject': IDLTypeInfo('OptionsObject', has_dart_wrapper=False), |
581 'SVGElement': IDLTypeInfo('SVGElement', custom_to_dart=True), | 607 'SVGElement': IDLTypeInfo('SVGElement', custom_to_dart=True), |
582 | 608 |
583 'SVGAngle': SVGTearOffIDLTypeInfo('SVGAngle'), | 609 'SVGAngle': SVGTearOffIDLTypeInfo('SVGAngle'), |
584 'SVGLength': SVGTearOffIDLTypeInfo('SVGLength'), | 610 'SVGLength': SVGTearOffIDLTypeInfo('SVGLength'), |
585 'SVGLengthList': SVGTearOffIDLTypeInfo('SVGLengthList', ref_counted=False), | 611 'SVGLengthList': SVGTearOffIDLTypeInfo('SVGLengthList', ref_counted=False), |
586 'SVGMatrix': SVGTearOffIDLTypeInfo('SVGMatrix'), | 612 'SVGMatrix': SVGTearOffIDLTypeInfo('SVGMatrix'), |
587 'SVGNumber': SVGTearOffIDLTypeInfo('SVGNumber', native_type='SVGPropertyTear
Off<float>'), | 613 'SVGNumber': SVGTearOffIDLTypeInfo('SVGNumber', native_type='SVGPropertyTear
Off<float>'), |
588 'SVGNumberList': SVGTearOffIDLTypeInfo('SVGNumberList', ref_counted=False), | 614 'SVGNumberList': SVGTearOffIDLTypeInfo('SVGNumberList', ref_counted=False), |
589 'SVGPathSegList': SVGTearOffIDLTypeInfo('SVGPathSegList', native_type='SVGPa
thSegListPropertyTearOff', ref_counted=False), | 615 'SVGPathSegList': SVGTearOffIDLTypeInfo('SVGPathSegList', native_type='SVGPa
thSegListPropertyTearOff', ref_counted=False), |
590 'SVGPoint': SVGTearOffIDLTypeInfo('SVGPoint', native_type='SVGPropertyTearOf
f<FloatPoint>'), | 616 'SVGPoint': SVGTearOffIDLTypeInfo('SVGPoint', native_type='SVGPropertyTearOf
f<FloatPoint>'), |
591 'SVGPointList': SVGTearOffIDLTypeInfo('SVGPointList', ref_counted=False), | 617 'SVGPointList': SVGTearOffIDLTypeInfo('SVGPointList', ref_counted=False), |
592 'SVGPreserveAspectRatio': SVGTearOffIDLTypeInfo('SVGPreserveAspectRatio'), | 618 'SVGPreserveAspectRatio': SVGTearOffIDLTypeInfo('SVGPreserveAspectRatio'), |
593 'SVGRect': SVGTearOffIDLTypeInfo('SVGRect', native_type='SVGPropertyTearOff<
FloatRect>'), | 619 'SVGRect': SVGTearOffIDLTypeInfo('SVGRect', native_type='SVGPropertyTearOff<
FloatRect>'), |
594 'SVGStringList': SVGTearOffIDLTypeInfo('SVGStringList', native_type='SVGStat
icListPropertyTearOff<SVGStringList>', ref_counted=False), | 620 'SVGStringList': SVGTearOffIDLTypeInfo('SVGStringList', native_type='SVGStat
icListPropertyTearOff<SVGStringList>', ref_counted=False), |
595 'SVGTransform': SVGTearOffIDLTypeInfo('SVGTransform'), | 621 'SVGTransform': SVGTearOffIDLTypeInfo('SVGTransform'), |
596 'SVGTransformList': SVGTearOffIDLTypeInfo('SVGTransformList', native_type='S
VGTransformListPropertyTearOff', ref_counted=False) | 622 'SVGTransformList': SVGTearOffIDLTypeInfo('SVGTransformList', native_type='S
VGTransformListPropertyTearOff', ref_counted=False) |
597 } | 623 } |
598 | 624 |
599 original_idl_types = { | |
600 } | |
601 | |
602 def GetIDLTypeInfo(idl_type): | 625 def GetIDLTypeInfo(idl_type): |
603 idl_type_name = original_idl_types.get(idl_type, idl_type.id) | 626 return GetIDLTypeInfoByName(idl_type.id) |
604 return GetIDLTypeInfoByName(idl_type_name) | |
605 | 627 |
606 def GetIDLTypeInfoByName(idl_type_name): | 628 def GetIDLTypeInfoByName(idl_type_name): |
607 return _idl_type_registry.get(idl_type_name, IDLTypeInfo(idl_type_name)) | 629 return _idl_type_registry.get(idl_type_name, IDLTypeInfo(idl_type_name)) |
OLD | NEW |