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

Side by Side Diff: sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart

Issue 11688005: Start unification of overload dispatcher generation. (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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 library indexed_db; 1 library indexed_db;
2 2
3 import 'dart:html'; 3 import 'dart:html';
4 import 'dart:html_common'; 4 import 'dart:html_common';
5 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 5 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
6 // for details. All rights reserved. Use of this source code is governed by a 6 // for details. All rights reserved. Use of this source code is governed by a
7 // BSD-style license that can be found in the LICENSE file. 7 // BSD-style license that can be found in the LICENSE file.
8 8
9 // DO NOT EDIT 9 // DO NOT EDIT
10 // Auto-generated dart:svg library. 10 // Auto-generated dart:svg library.
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 final ObjectStore objectStore; 323 final ObjectStore objectStore;
324 324
325 /// @domName IDBIndex.unique; @docsEditable true 325 /// @domName IDBIndex.unique; @docsEditable true
326 final bool unique; 326 final bool unique;
327 327
328 /// @domName IDBIndex.count; @docsEditable true 328 /// @domName IDBIndex.count; @docsEditable true
329 Request count([key_OR_range]) { 329 Request count([key_OR_range]) {
330 if (!?key_OR_range) { 330 if (!?key_OR_range) {
331 return _count_1(); 331 return _count_1();
332 } 332 }
333 if ((?key_OR_range && (key_OR_range is KeyRange || key_OR_range == null))) { 333 if ((key_OR_range is KeyRange || key_OR_range == null)) {
334 return _count_2(key_OR_range); 334 return _count_2(key_OR_range);
335 } 335 }
336 if (?key_OR_range) { 336 if (?key_OR_range) {
337 var key_1 = _convertDartToNative_IDBKey(key_OR_range); 337 var key_1 = _convertDartToNative_IDBKey(key_OR_range);
338 return _count_3(key_1); 338 return _count_3(key_1);
339 } 339 }
340 throw new ArgumentError("Incorrect number or type of arguments"); 340 throw new ArgumentError("Incorrect number or type of arguments");
341 } 341 }
342 @JSName('count') 342 @JSName('count')
343 Request _count_1() native; 343 Request _count_1() native;
344 @JSName('count') 344 @JSName('count')
345 Request _count_2(KeyRange range) native; 345 Request _count_2(KeyRange range) native;
346 @JSName('count') 346 @JSName('count')
347 Request _count_3(key) native; 347 Request _count_3(key) native;
348 348
349 /// @domName IDBIndex.get; @docsEditable true 349 /// @domName IDBIndex.get; @docsEditable true
350 Request get(key) { 350 Request get(key) {
351 if ((?key && (key is KeyRange || key == null))) { 351 if ((key is KeyRange || key == null)) {
352 return _get_1(key); 352 return _get_1(key);
353 } 353 }
354 if (?key) { 354 if (?key) {
355 var key_1 = _convertDartToNative_IDBKey(key); 355 var key_1 = _convertDartToNative_IDBKey(key);
356 return _get_2(key_1); 356 return _get_2(key_1);
357 } 357 }
358 throw new ArgumentError("Incorrect number or type of arguments"); 358 throw new ArgumentError("Incorrect number or type of arguments");
359 } 359 }
360 @JSName('get') 360 @JSName('get')
361 @Returns('Request') @Creates('Request') @annotation_Creates_SerializedScriptVa lue 361 @Returns('Request') @Creates('Request') @annotation_Creates_SerializedScriptVa lue
362 Request _get_1(KeyRange key) native; 362 Request _get_1(KeyRange key) native;
363 @JSName('get') 363 @JSName('get')
364 @Returns('Request') @Creates('Request') @annotation_Creates_SerializedScriptVa lue 364 @Returns('Request') @Creates('Request') @annotation_Creates_SerializedScriptVa lue
365 Request _get_2(key) native; 365 Request _get_2(key) native;
366 366
367 /// @domName IDBIndex.getKey; @docsEditable true 367 /// @domName IDBIndex.getKey; @docsEditable true
368 Request getKey(key) { 368 Request getKey(key) {
369 if ((?key && (key is KeyRange || key == null))) { 369 if ((key is KeyRange || key == null)) {
370 return _getKey_1(key); 370 return _getKey_1(key);
371 } 371 }
372 if (?key) { 372 if (?key) {
373 var key_1 = _convertDartToNative_IDBKey(key); 373 var key_1 = _convertDartToNative_IDBKey(key);
374 return _getKey_2(key_1); 374 return _getKey_2(key_1);
375 } 375 }
376 throw new ArgumentError("Incorrect number or type of arguments"); 376 throw new ArgumentError("Incorrect number or type of arguments");
377 } 377 }
378 @JSName('getKey') 378 @JSName('getKey')
379 @Returns('Request') @Creates('Request') @annotation_Creates_SerializedScriptVa lue @Creates('ObjectStore') 379 @Returns('Request') @Creates('Request') @annotation_Creates_SerializedScriptVa lue @Creates('ObjectStore')
380 Request _getKey_1(KeyRange key) native; 380 Request _getKey_1(KeyRange key) native;
381 @JSName('getKey') 381 @JSName('getKey')
382 @Returns('Request') @Creates('Request') @annotation_Creates_SerializedScriptVa lue @Creates('ObjectStore') 382 @Returns('Request') @Creates('Request') @annotation_Creates_SerializedScriptVa lue @Creates('ObjectStore')
383 Request _getKey_2(key) native; 383 Request _getKey_2(key) native;
384 384
385 /// @domName IDBIndex.openCursor; @docsEditable true 385 /// @domName IDBIndex.openCursor; @docsEditable true
386 Request openCursor([key_OR_range, String direction]) { 386 Request openCursor([key_OR_range, String direction]) {
387 if (!?key_OR_range && 387 if (!?key_OR_range &&
388 !?direction) { 388 !?direction) {
389 return _openCursor_1(); 389 return _openCursor_1();
390 } 390 }
391 if ((?key_OR_range && (key_OR_range is KeyRange || key_OR_range == null)) && 391 if ((key_OR_range is KeyRange || key_OR_range == null) &&
392 !?direction) { 392 !?direction) {
393 return _openCursor_2(key_OR_range); 393 return _openCursor_2(key_OR_range);
394 } 394 }
395 if ((?key_OR_range && (key_OR_range is KeyRange || key_OR_range == null))) { 395 if ((key_OR_range is KeyRange || key_OR_range == null)) {
396 return _openCursor_3(key_OR_range, direction); 396 return _openCursor_3(key_OR_range, direction);
397 } 397 }
398 if (?key_OR_range && 398 if (?key_OR_range &&
399 !?direction) { 399 !?direction) {
400 var key_1 = _convertDartToNative_IDBKey(key_OR_range); 400 var key_1 = _convertDartToNative_IDBKey(key_OR_range);
401 return _openCursor_4(key_1); 401 return _openCursor_4(key_1);
402 } 402 }
403 if (?key_OR_range) { 403 if (?key_OR_range) {
404 var key_2 = _convertDartToNative_IDBKey(key_OR_range); 404 var key_2 = _convertDartToNative_IDBKey(key_OR_range);
405 return _openCursor_5(key_2, direction); 405 return _openCursor_5(key_2, direction);
(...skipping 15 matching lines...) Expand all
421 @JSName('openCursor') 421 @JSName('openCursor')
422 @Returns('Request') @Creates('Request') @Creates('Cursor') 422 @Returns('Request') @Creates('Request') @Creates('Cursor')
423 Request _openCursor_5(key, direction) native; 423 Request _openCursor_5(key, direction) native;
424 424
425 /// @domName IDBIndex.openKeyCursor; @docsEditable true 425 /// @domName IDBIndex.openKeyCursor; @docsEditable true
426 Request openKeyCursor([key_OR_range, String direction]) { 426 Request openKeyCursor([key_OR_range, String direction]) {
427 if (!?key_OR_range && 427 if (!?key_OR_range &&
428 !?direction) { 428 !?direction) {
429 return _openKeyCursor_1(); 429 return _openKeyCursor_1();
430 } 430 }
431 if ((?key_OR_range && (key_OR_range is KeyRange || key_OR_range == null)) && 431 if ((key_OR_range is KeyRange || key_OR_range == null) &&
432 !?direction) { 432 !?direction) {
433 return _openKeyCursor_2(key_OR_range); 433 return _openKeyCursor_2(key_OR_range);
434 } 434 }
435 if ((?key_OR_range && (key_OR_range is KeyRange || key_OR_range == null))) { 435 if ((key_OR_range is KeyRange || key_OR_range == null)) {
436 return _openKeyCursor_3(key_OR_range, direction); 436 return _openKeyCursor_3(key_OR_range, direction);
437 } 437 }
438 if (?key_OR_range && 438 if (?key_OR_range &&
439 !?direction) { 439 !?direction) {
440 var key_1 = _convertDartToNative_IDBKey(key_OR_range); 440 var key_1 = _convertDartToNative_IDBKey(key_OR_range);
441 return _openKeyCursor_4(key_1); 441 return _openKeyCursor_4(key_1);
442 } 442 }
443 if (?key_OR_range) { 443 if (?key_OR_range) {
444 var key_2 = _convertDartToNative_IDBKey(key_OR_range); 444 var key_2 = _convertDartToNative_IDBKey(key_OR_range);
445 return _openKeyCursor_5(key_2, direction); 445 return _openKeyCursor_5(key_2, direction);
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 Request _add_2(value) native; 622 Request _add_2(value) native;
623 623
624 /// @domName IDBObjectStore.clear; @docsEditable true 624 /// @domName IDBObjectStore.clear; @docsEditable true
625 Request clear() native; 625 Request clear() native;
626 626
627 /// @domName IDBObjectStore.count; @docsEditable true 627 /// @domName IDBObjectStore.count; @docsEditable true
628 Request count([key_OR_range]) { 628 Request count([key_OR_range]) {
629 if (!?key_OR_range) { 629 if (!?key_OR_range) {
630 return _count_1(); 630 return _count_1();
631 } 631 }
632 if ((?key_OR_range && (key_OR_range is KeyRange || key_OR_range == null))) { 632 if ((key_OR_range is KeyRange || key_OR_range == null)) {
633 return _count_2(key_OR_range); 633 return _count_2(key_OR_range);
634 } 634 }
635 if (?key_OR_range) { 635 if (?key_OR_range) {
636 var key_1 = _convertDartToNative_IDBKey(key_OR_range); 636 var key_1 = _convertDartToNative_IDBKey(key_OR_range);
637 return _count_3(key_1); 637 return _count_3(key_1);
638 } 638 }
639 throw new ArgumentError("Incorrect number or type of arguments"); 639 throw new ArgumentError("Incorrect number or type of arguments");
640 } 640 }
641 @JSName('count') 641 @JSName('count')
642 Request _count_1() native; 642 Request _count_1() native;
643 @JSName('count') 643 @JSName('count')
644 Request _count_2(KeyRange range) native; 644 Request _count_2(KeyRange range) native;
645 @JSName('count') 645 @JSName('count')
646 Request _count_3(key) native; 646 Request _count_3(key) native;
647 647
648 /// @domName IDBObjectStore.createIndex; @docsEditable true 648 /// @domName IDBObjectStore.createIndex; @docsEditable true
649 Index createIndex(String name, keyPath, [Map options]) { 649 Index createIndex(String name, keyPath, [Map options]) {
650 if ((?keyPath && (keyPath is List<String> || keyPath == null)) && 650 if ((keyPath is List<String> || keyPath == null) &&
651 !?options) { 651 !?options) {
652 return _createIndex_1(name, keyPath); 652 return _createIndex_1(name, keyPath);
653 } 653 }
654 if ((?keyPath && (keyPath is List<String> || keyPath == null))) { 654 if ((keyPath is List<String> || keyPath == null)) {
655 var options_1 = convertDartToNative_Dictionary(options); 655 var options_1 = convertDartToNative_Dictionary(options);
656 return _createIndex_2(name, keyPath, options_1); 656 return _createIndex_2(name, keyPath, options_1);
657 } 657 }
658 if ((?keyPath && (keyPath is String || keyPath == null)) && 658 if ((keyPath is String || keyPath == null) &&
659 !?options) { 659 !?options) {
660 return _createIndex_3(name, keyPath); 660 return _createIndex_3(name, keyPath);
661 } 661 }
662 if ((?keyPath && (keyPath is String || keyPath == null))) { 662 if ((keyPath is String || keyPath == null)) {
663 var options_2 = convertDartToNative_Dictionary(options); 663 var options_2 = convertDartToNative_Dictionary(options);
664 return _createIndex_4(name, keyPath, options_2); 664 return _createIndex_4(name, keyPath, options_2);
665 } 665 }
666 throw new ArgumentError("Incorrect number or type of arguments"); 666 throw new ArgumentError("Incorrect number or type of arguments");
667 } 667 }
668 @JSName('createIndex') 668 @JSName('createIndex')
669 Index _createIndex_1(name, List<String> keyPath) native; 669 Index _createIndex_1(name, List<String> keyPath) native;
670 @JSName('createIndex') 670 @JSName('createIndex')
671 Index _createIndex_2(name, List<String> keyPath, options) native; 671 Index _createIndex_2(name, List<String> keyPath, options) native;
672 @JSName('createIndex') 672 @JSName('createIndex')
673 Index _createIndex_3(name, String keyPath) native; 673 Index _createIndex_3(name, String keyPath) native;
674 @JSName('createIndex') 674 @JSName('createIndex')
675 Index _createIndex_4(name, String keyPath, options) native; 675 Index _createIndex_4(name, String keyPath, options) native;
676 676
677 /// @domName IDBObjectStore.delete; @docsEditable true 677 /// @domName IDBObjectStore.delete; @docsEditable true
678 Request delete(key_OR_keyRange) { 678 Request delete(key_OR_keyRange) {
679 if ((?key_OR_keyRange && (key_OR_keyRange is KeyRange || key_OR_keyRange == null))) { 679 if ((key_OR_keyRange is KeyRange || key_OR_keyRange == null)) {
680 return _delete_1(key_OR_keyRange); 680 return _delete_1(key_OR_keyRange);
681 } 681 }
682 if (?key_OR_keyRange) { 682 if (?key_OR_keyRange) {
683 var key_1 = _convertDartToNative_IDBKey(key_OR_keyRange); 683 var key_1 = _convertDartToNative_IDBKey(key_OR_keyRange);
684 return _delete_2(key_1); 684 return _delete_2(key_1);
685 } 685 }
686 throw new ArgumentError("Incorrect number or type of arguments"); 686 throw new ArgumentError("Incorrect number or type of arguments");
687 } 687 }
688 @JSName('delete') 688 @JSName('delete')
689 Request _delete_1(KeyRange keyRange) native; 689 Request _delete_1(KeyRange keyRange) native;
690 @JSName('delete') 690 @JSName('delete')
691 Request _delete_2(key) native; 691 Request _delete_2(key) native;
692 692
693 /// @domName IDBObjectStore.deleteIndex; @docsEditable true 693 /// @domName IDBObjectStore.deleteIndex; @docsEditable true
694 void deleteIndex(String name) native; 694 void deleteIndex(String name) native;
695 695
696 /// @domName IDBObjectStore.getObject; @docsEditable true 696 /// @domName IDBObjectStore.getObject; @docsEditable true
697 Request getObject(key) { 697 Request getObject(key) {
698 if ((?key && (key is KeyRange || key == null))) { 698 if ((key is KeyRange || key == null)) {
699 return _getObject_1(key); 699 return _getObject_1(key);
700 } 700 }
701 if (?key) { 701 if (?key) {
702 var key_1 = _convertDartToNative_IDBKey(key); 702 var key_1 = _convertDartToNative_IDBKey(key);
703 return _getObject_2(key_1); 703 return _getObject_2(key_1);
704 } 704 }
705 throw new ArgumentError("Incorrect number or type of arguments"); 705 throw new ArgumentError("Incorrect number or type of arguments");
706 } 706 }
707 @JSName('get') 707 @JSName('get')
708 @Returns('Request') @Creates('Request') @annotation_Creates_SerializedScriptVa lue 708 @Returns('Request') @Creates('Request') @annotation_Creates_SerializedScriptVa lue
709 Request _getObject_1(KeyRange key) native; 709 Request _getObject_1(KeyRange key) native;
710 @JSName('get') 710 @JSName('get')
711 @Returns('Request') @Creates('Request') @annotation_Creates_SerializedScriptVa lue 711 @Returns('Request') @Creates('Request') @annotation_Creates_SerializedScriptVa lue
712 Request _getObject_2(key) native; 712 Request _getObject_2(key) native;
713 713
714 /// @domName IDBObjectStore.index; @docsEditable true 714 /// @domName IDBObjectStore.index; @docsEditable true
715 Index index(String name) native; 715 Index index(String name) native;
716 716
717 /// @domName IDBObjectStore.openCursor; @docsEditable true 717 /// @domName IDBObjectStore.openCursor; @docsEditable true
718 Request openCursor([key_OR_range, String direction]) { 718 Request openCursor([key_OR_range, String direction]) {
719 if (!?key_OR_range && 719 if (!?key_OR_range &&
720 !?direction) { 720 !?direction) {
721 return _openCursor_1(); 721 return _openCursor_1();
722 } 722 }
723 if ((?key_OR_range && (key_OR_range is KeyRange || key_OR_range == null)) && 723 if ((key_OR_range is KeyRange || key_OR_range == null) &&
724 !?direction) { 724 !?direction) {
725 return _openCursor_2(key_OR_range); 725 return _openCursor_2(key_OR_range);
726 } 726 }
727 if ((?key_OR_range && (key_OR_range is KeyRange || key_OR_range == null))) { 727 if ((key_OR_range is KeyRange || key_OR_range == null)) {
728 return _openCursor_3(key_OR_range, direction); 728 return _openCursor_3(key_OR_range, direction);
729 } 729 }
730 if (?key_OR_range && 730 if (?key_OR_range &&
731 !?direction) { 731 !?direction) {
732 var key_1 = _convertDartToNative_IDBKey(key_OR_range); 732 var key_1 = _convertDartToNative_IDBKey(key_OR_range);
733 return _openCursor_4(key_1); 733 return _openCursor_4(key_1);
734 } 734 }
735 if (?key_OR_range) { 735 if (?key_OR_range) {
736 var key_2 = _convertDartToNative_IDBKey(key_OR_range); 736 var key_2 = _convertDartToNative_IDBKey(key_OR_range);
737 return _openCursor_5(key_2, direction); 737 return _openCursor_5(key_2, direction);
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
957 EventListenerList get blocked => this['blocked']; 957 EventListenerList get blocked => this['blocked'];
958 } 958 }
959 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 959 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
960 // for details. All rights reserved. Use of this source code is governed by a 960 // for details. All rights reserved. Use of this source code is governed by a
961 // BSD-style license that can be found in the LICENSE file. 961 // BSD-style license that can be found in the LICENSE file.
962 962
963 963
964 /// @domName IDBAny; @docsEditable true 964 /// @domName IDBAny; @docsEditable true
965 class _Any native "*IDBAny" { 965 class _Any native "*IDBAny" {
966 } 966 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698