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

Unified Diff: lib/dom/scripts/generator.py

Issue 10513004: Implement v8-like overload resolving. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: . Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/dom/scripts/databasebuilder.py ('k') | lib/dom/scripts/systemnative.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/dom/scripts/generator.py
diff --git a/lib/dom/scripts/generator.py b/lib/dom/scripts/generator.py
index 875a0004d8a9442fa1e61452bae9d4244b558e4f..121c46e5b79a793c6cc721b87a662d455c23c57d 100644
--- a/lib/dom/scripts/generator.py
+++ b/lib/dom/scripts/generator.py
@@ -258,6 +258,7 @@ def AnalyzeOperation(interface, operations):
*(op.arguments for op in split_operations))
info = OperationInfo()
+ info.operations = operations
info.overloads = split_operations
info.declared_name = operations[0].id
info.name = operations[0].ext_attrs.get('DartName', info.declared_name)
@@ -528,7 +529,7 @@ class IDLTypeInfo(object):
def emit_to_native(self, emitter, idl_node, name, handle, interface_name):
if 'Callback' in idl_node.ext_attrs:
- if 'RequiredCppParameter' in idl_node.ext_attrs:
+ if set(['Optional', 'Callback']).issubset(idl_node.ext_attrs.keys()):
flag = 'DartUtilities::ConvertNullToDefaultValue'
else:
flag = 'DartUtilities::ConvertNone'
@@ -637,7 +638,7 @@ class PrimitiveIDLTypeInfo(IDLTypeInfo):
def emit_to_native(self, emitter, idl_node, name, handle, interface_name):
arguments = [handle]
- if idl_node.ext_attrs.get('Optional') == 'DefaultIsNullString' or 'RequiredCppParameter' in idl_node.ext_attrs:
+ if idl_node.ext_attrs.get('Optional') == 'DefaultIsNullString':
arguments.append('DartUtilities::ConvertNullToDefaultValue')
emitter.Emit(
'\n'
« no previous file with comments | « lib/dom/scripts/databasebuilder.py ('k') | lib/dom/scripts/systemnative.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698