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

Side by Side Diff: pkg/dev_compiler/tool/input_sdk/private/interceptors.dart

Issue 2378423003: Fix some errors around []= in core types. (Closed)
Patch Set: Created 4 years, 2 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library dart._interceptors; 5 library dart._interceptors;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 import 'dart:_internal' hide Symbol; 8 import 'dart:_internal' hide Symbol;
9 import 'dart:_js_helper'; 9 import 'dart:_js_helper';
10 import 'dart:_foreign_helper' show JS; 10 import 'dart:_foreign_helper' show JS;
(...skipping 26 matching lines...) Expand all
37 int get hashCode => this ? (2 * 3 * 23 * 3761) : (269 * 811); 37 int get hashCode => this ? (2 * 3 * 23 * 3761) : (269 * 811);
38 38
39 Type get runtimeType => bool; 39 Type get runtimeType => bool;
40 } 40 }
41 41
42 /** 42 /**
43 * The supertype for JSString and JSArray. Used by the backend as to 43 * The supertype for JSString and JSArray. Used by the backend as to
44 * have a type mask that contains the objects that we can use the 44 * have a type mask that contains the objects that we can use the
45 * native JS [] operator and length on. 45 * native JS [] operator and length on.
46 */ 46 */
47 abstract class JSIndexable { 47 abstract class JSIndexable<E> {
48 int get length; 48 int get length;
49 operator[](int index); 49 E operator[](int index);
50 } 50 }
51 51
52 /** 52 /**
53 * The supertype for JSMutableArray and
54 * JavaScriptIndexingBehavior. Used by the backend to have a type mask
55 * that contains the objects we can use the JS []= operator on.
56 */
57 abstract class JSMutableIndexable extends JSIndexable {
58 operator[]=(int index, var value);
59 }
60
61 /**
62 * The interface implemented by JavaScript objects. These are methods in 53 * The interface implemented by JavaScript objects. These are methods in
63 * addition to the regular Dart Object methods like [Object.hashCode]. 54 * addition to the regular Dart Object methods like [Object.hashCode].
64 * 55 *
65 * This is the type that should be exported by a JavaScript interop library. 56 * This is the type that should be exported by a JavaScript interop library.
66 */ 57 */
67 abstract class JSObject { 58 abstract class JSObject {
68 } 59 }
69 60
70 61
71 /** 62 /**
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 96
106 // Obsolete in dart dev compiler. Added only so that the same version of 97 // Obsolete in dart dev compiler. Added only so that the same version of
107 // dart:html can be used in dart2js an dev compiler. 98 // dart:html can be used in dart2js an dev compiler.
108 // Warning: calls to these methods need to be removed before custom elements 99 // Warning: calls to these methods need to be removed before custom elements
109 // and cross-frame dom objects behave correctly in ddc. 100 // and cross-frame dom objects behave correctly in ddc.
110 // See https://github.com/dart-lang/dev_compiler/issues/517 101 // See https://github.com/dart-lang/dev_compiler/issues/517
111 findInterceptorConstructorForType(Type type) { } 102 findInterceptorConstructorForType(Type type) { }
112 findConstructorForNativeSubclassType(Type type, String name) { } 103 findConstructorForNativeSubclassType(Type type, String name) { }
113 getNativeInterceptor(object) {} 104 getNativeInterceptor(object) {}
114 setDispatchProperty(object, value) {} 105 setDispatchProperty(object, value) {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698