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

Unified Diff: sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart

Issue 12094103: Added MappedListIterable/Iterator to implement map() on Lists. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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
Index: sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart
diff --git a/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart b/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart
index e3f6e1078db982e74aff55d9920eef42f970ee53..49ceeacd686c86b0adca014e517f1f33011f1c83 100644
--- a/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart
+++ b/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart
@@ -161,23 +161,42 @@ class Cursor native "*IDBCursor" {
@DocsEditable
void advance(int count) native;
- void continueFunction([/*IDBKey*/ key]) {
+ void continue([key]) {
+ if (!?key) {
+ _continue_1();
+ return;
+ }
if (?key) {
var key_1 = _convertDartToNative_IDBKey(key);
- _continueFunction_1(key_1);
+ _continue_2(key_1);
+ return;
+ }
+ if (!?key) {
+ _continue_3();
return;
}
- _continueFunction_2();
- return;
+ if (?key) {
+ _continue_4(key);
+ return;
+ }
+ throw new ArgumentError("Incorrect number or type of arguments");
}
@JSName('continue')
@DomName('IDBCursor.continue')
@DocsEditable
- void _continueFunction_1(key) native;
+ void _continue_1() native;
@JSName('continue')
@DomName('IDBCursor.continue')
@DocsEditable
- void _continueFunction_2() native;
+ void _continue_2(key) native;
+ @JSName('continue')
+ @DomName('IDBCursor.continue')
+ @DocsEditable
+ void _continue_3() native;
+ @JSName('continue')
+ @DomName('IDBCursor.continue')
+ @DocsEditable
+ void _continue_4(Object key) native;
@DomName('IDBCursor.delete')
@DocsEditable
@@ -446,6 +465,9 @@ class Index native "*IDBIndex" {
var key_1 = _convertDartToNative_IDBKey(key);
return _get_2(key_1);
}
+ if (?key) {
+ return _get_3(key);
+ }
throw new ArgumentError("Incorrect number or type of arguments");
}
@JSName('get')
@@ -462,6 +484,13 @@ class Index native "*IDBIndex" {
@Creates('Request')
@annotation_Creates_SerializedScriptValue
Request _get_2(key) native;
+ @JSName('get')
+ @DomName('IDBIndex.get')
+ @DocsEditable
+ @Returns('Request')
+ @Creates('Request')
+ @annotation_Creates_SerializedScriptValue
+ Request _get_3(Object key) native;
Request getKey(key) {
if ((key is KeyRange || key == null)) {
@@ -657,76 +686,76 @@ class KeyRange native "*IDBKeyRange" {
@DocsEditable
final bool upperOpen;
- static KeyRange bound_(/*IDBKey*/ lower, /*IDBKey*/ upper, [bool lowerOpen, bool upperOpen]) {
+ static KeyRange bound(/*IDBKey*/ lower, /*IDBKey*/ upper, [bool lowerOpen, bool upperOpen]) {
if (?upperOpen) {
var lower_1 = _convertDartToNative_IDBKey(lower);
var upper_2 = _convertDartToNative_IDBKey(upper);
- return _bound__1(lower_1, upper_2, lowerOpen, upperOpen);
+ return _bound_1(lower_1, upper_2, lowerOpen, upperOpen);
}
if (?lowerOpen) {
var lower_3 = _convertDartToNative_IDBKey(lower);
var upper_4 = _convertDartToNative_IDBKey(upper);
- return _bound__2(lower_3, upper_4, lowerOpen);
+ return _bound_2(lower_3, upper_4, lowerOpen);
}
var lower_5 = _convertDartToNative_IDBKey(lower);
var upper_6 = _convertDartToNative_IDBKey(upper);
- return _bound__3(lower_5, upper_6);
+ return _bound_3(lower_5, upper_6);
}
@JSName('bound')
@DomName('IDBKeyRange.bound')
@DocsEditable
- static KeyRange _bound__1(lower, upper, lowerOpen, upperOpen) native;
+ static KeyRange _bound_1(lower, upper, lowerOpen, upperOpen) native;
@JSName('bound')
@DomName('IDBKeyRange.bound')
@DocsEditable
- static KeyRange _bound__2(lower, upper, lowerOpen) native;
+ static KeyRange _bound_2(lower, upper, lowerOpen) native;
@JSName('bound')
@DomName('IDBKeyRange.bound')
@DocsEditable
- static KeyRange _bound__3(lower, upper) native;
+ static KeyRange _bound_3(lower, upper) native;
- static KeyRange lowerBound_(/*IDBKey*/ bound, [bool open]) {
+ static KeyRange lowerBound(/*IDBKey*/ bound, [bool open]) {
if (?open) {
var bound_1 = _convertDartToNative_IDBKey(bound);
- return _lowerBound__1(bound_1, open);
+ return _lowerBound_1(bound_1, open);
}
var bound_2 = _convertDartToNative_IDBKey(bound);
- return _lowerBound__2(bound_2);
+ return _lowerBound_2(bound_2);
}
@JSName('lowerBound')
@DomName('IDBKeyRange.lowerBound')
@DocsEditable
- static KeyRange _lowerBound__1(bound, open) native;
+ static KeyRange _lowerBound_1(bound, open) native;
@JSName('lowerBound')
@DomName('IDBKeyRange.lowerBound')
@DocsEditable
- static KeyRange _lowerBound__2(bound) native;
+ static KeyRange _lowerBound_2(bound) native;
- static KeyRange only_(/*IDBKey*/ value) {
+ static KeyRange only(/*IDBKey*/ value) {
var value_1 = _convertDartToNative_IDBKey(value);
- return _only__1(value_1);
+ return _only_1(value_1);
}
@JSName('only')
@DomName('IDBKeyRange.only')
@DocsEditable
- static KeyRange _only__1(value) native;
+ static KeyRange _only_1(value) native;
- static KeyRange upperBound_(/*IDBKey*/ bound, [bool open]) {
+ static KeyRange upperBound(/*IDBKey*/ bound, [bool open]) {
if (?open) {
var bound_1 = _convertDartToNative_IDBKey(bound);
- return _upperBound__1(bound_1, open);
+ return _upperBound_1(bound_1, open);
}
var bound_2 = _convertDartToNative_IDBKey(bound);
- return _upperBound__2(bound_2);
+ return _upperBound_2(bound_2);
}
@JSName('upperBound')
@DomName('IDBKeyRange.upperBound')
@DocsEditable
- static KeyRange _upperBound__1(bound, open) native;
+ static KeyRange _upperBound_1(bound, open) native;
@JSName('upperBound')
@DomName('IDBKeyRange.upperBound')
@DocsEditable
- static KeyRange _upperBound__2(bound) native;
+ static KeyRange _upperBound_2(bound) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -879,6 +908,9 @@ class ObjectStore native "*IDBObjectStore" {
var key_1 = _convertDartToNative_IDBKey(key);
return _getObject_2(key_1);
}
+ if (?key) {
+ return _getObject_3(key);
+ }
throw new ArgumentError("Incorrect number or type of arguments");
}
@JSName('get')
@@ -895,6 +927,13 @@ class ObjectStore native "*IDBObjectStore" {
@Creates('Request')
@annotation_Creates_SerializedScriptValue
Request _getObject_2(key) native;
+ @JSName('get')
+ @DomName('IDBObjectStore.get')
+ @DocsEditable
+ @Returns('Request')
+ @Creates('Request')
+ @annotation_Creates_SerializedScriptValue
+ Request _getObject_3(Object key) native;
@DomName('IDBObjectStore.index')
@DocsEditable

Powered by Google App Engine
This is Rietveld 408576698