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

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

Issue 10540007: Map operator [] directly to native implementation. (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 | « no previous file | lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/dom/scripts/systemnative.py
diff --git a/lib/dom/scripts/systemnative.py b/lib/dom/scripts/systemnative.py
index 8a316e8e8930643b09f3cd77af4a1de03f2eb1cb..9429cadb82f9d3fadda3f652c835a2fb4922529a 100644
--- a/lib/dom/scripts/systemnative.py
+++ b/lib/dom/scripts/systemnative.py
@@ -675,10 +675,8 @@ class NativeImplementationGenerator(object):
else:
self._members_emitter.Emit(
'\n'
- ' $TYPE operator[](int index) {\n'
- ' return item(index);\n'
- ' }\n',
- TYPE=dart_element_type)
+ ' $TYPE operator[](int index) native "$(INTERFACE)_item_Callback";\n',
+ TYPE=dart_element_type, INTERFACE=self._interface.id)
if self._HasNativeIndexSetter():
self._EmitNativeIndexSetter(dart_element_type)
@@ -755,7 +753,7 @@ class NativeImplementationGenerator(object):
if not html_name and info.name == 'item':
# FIXME: item should be renamed to operator[], not removed.
- html_name = 'item'
+ html_name = '_item'
Anton Muhin 2012/06/05 16:38:51 do we need it still?
podivilov 2012/06/05 16:45:25 Yes, we still need to generate native implementati
Anton Muhin 2012/06/05 16:49:19 Ok, thanks. On 2012/06/05 16:45:25, podivilov wrot
if not html_name:
return
« no previous file with comments | « no previous file | lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698