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

Side by Side Diff: lib/runtime/dart/_interceptors.js

Issue 1144303003: Use signature inheritance when method types are unchanged (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Remove empty signatures Created 5 years, 7 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
« no previous file with comments | « lib/runtime/dart/_foreign_helper.js ('k') | lib/runtime/dart/_internal.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 var _interceptors = dart.defineLibrary(_interceptors, {}); 1 var _interceptors = dart.defineLibrary(_interceptors, {});
2 var core = dart.import(core); 2 var core = dart.import(core);
3 var _js_helper = dart.lazyImport(_js_helper); 3 var _js_helper = dart.lazyImport(_js_helper);
4 var _internal = dart.import(_internal); 4 var _internal = dart.import(_internal);
5 var _foreign_helper = dart.import(_foreign_helper); 5 var _foreign_helper = dart.import(_foreign_helper);
6 var _js_embedded_names = dart.import(_js_embedded_names); 6 var _js_embedded_names = dart.import(_js_embedded_names);
7 (function(exports, core, _js_helper, _internal, _foreign_helper, _js_embedded_na mes) { 7 (function(exports, core, _js_helper, _internal, _foreign_helper, _js_embedded_na mes) {
8 'use strict'; 8 'use strict';
9 let JSArray = Array; 9 let JSArray = Array;
10 let JSMutableArray$ = dart.generic(function(E) { 10 let JSMutableArray$ = dart.generic(function(E) {
11 class JSMutableArray extends JSArray$(E) { 11 class JSMutableArray extends JSArray$(E) {
12 JSMutableArray() { 12 JSMutableArray() {
13 super.JSArray(); 13 super.JSArray();
14 } 14 }
15 } 15 }
16 JSMutableArray[dart.implements] = () => [JSMutableIndexable]; 16 JSMutableArray[dart.implements] = () => [JSMutableIndexable];
17 dart.setSignature(JSMutableArray, {});
18 return JSMutableArray; 17 return JSMutableArray;
19 }); 18 });
20 let JSMutableArray = JSMutableArray$(); 19 let JSMutableArray = JSMutableArray$();
21 let JSFixedArray$ = dart.generic(function(E) { 20 let JSFixedArray$ = dart.generic(function(E) {
22 class JSFixedArray extends JSMutableArray$(E) {} 21 class JSFixedArray extends JSMutableArray$(E) {}
23 dart.setSignature(JSFixedArray, {});
24 return JSFixedArray; 22 return JSFixedArray;
25 }); 23 });
26 let JSFixedArray = JSFixedArray$(); 24 let JSFixedArray = JSFixedArray$();
27 let JSExtendableArray$ = dart.generic(function(E) { 25 let JSExtendableArray$ = dart.generic(function(E) {
28 class JSExtendableArray extends JSMutableArray$(E) {} 26 class JSExtendableArray extends JSMutableArray$(E) {}
29 dart.setSignature(JSExtendableArray, {});
30 return JSExtendableArray; 27 return JSExtendableArray;
31 }); 28 });
32 let JSExtendableArray = JSExtendableArray$(); 29 let JSExtendableArray = JSExtendableArray$();
33 class Interceptor extends core.Object { 30 class Interceptor extends core.Object {
34 Interceptor() { 31 Interceptor() {
35 } 32 }
36 ['=='](other) { 33 ['=='](other) {
37 return core.identical(this, other); 34 return core.identical(this, other);
38 } 35 }
39 get hashCode() { 36 get hashCode() {
40 return _js_helper.Primitives.objectHashCode(this); 37 return _js_helper.Primitives.objectHashCode(this);
41 } 38 }
42 toString() { 39 toString() {
43 return _js_helper.Primitives.objectToString(this); 40 return _js_helper.Primitives.objectToString(this);
44 } 41 }
45 noSuchMethod(invocation) { 42 noSuchMethod(invocation) {
46 throw new core.NoSuchMethodError(this, invocation.memberName, invocation.p ositionalArguments, invocation.namedArguments); 43 throw new core.NoSuchMethodError(this, invocation.memberName, invocation.p ositionalArguments, invocation.namedArguments);
47 } 44 }
48 get runtimeType() { 45 get runtimeType() {
49 return _js_helper.getRuntimeType(this); 46 return _js_helper.getRuntimeType(this);
50 } 47 }
51 } 48 }
52 dart.setSignature(Interceptor, { 49 dart.setSignature(Interceptor, {
53 methods: () => ({ 50 methods: () => ({'==': dart.functionType(core.bool, [core.Object])})
54 '==': dart.functionType(core.bool, [core.Object]),
55 toString: dart.functionType(core.String, []),
56 noSuchMethod: dart.functionType(dart.dynamic, [core.Invocation])
57 })
58 }); 51 });
59 let _isInt32 = Symbol('_isInt32'); 52 let _isInt32 = Symbol('_isInt32');
60 let _tdivFast = Symbol('_tdivFast'); 53 let _tdivFast = Symbol('_tdivFast');
61 let _tdivSlow = Symbol('_tdivSlow'); 54 let _tdivSlow = Symbol('_tdivSlow');
62 let _shlPositive = Symbol('_shlPositive'); 55 let _shlPositive = Symbol('_shlPositive');
63 let _shrReceiverPositive = Symbol('_shrReceiverPositive'); 56 let _shrReceiverPositive = Symbol('_shrReceiverPositive');
64 let _shrOtherPositive = Symbol('_shrOtherPositive'); 57 let _shrOtherPositive = Symbol('_shrOtherPositive');
65 let _shrBothPositive = Symbol('_shrBothPositive'); 58 let _shrBothPositive = Symbol('_shrBothPositive');
66 class JSNumber extends Interceptor { 59 class JSNumber extends Interceptor {
67 JSNumber() { 60 JSNumber() {
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 ceilToDouble: dart.functionType(core.double, []), 375 ceilToDouble: dart.functionType(core.double, []),
383 floorToDouble: dart.functionType(core.double, []), 376 floorToDouble: dart.functionType(core.double, []),
384 roundToDouble: dart.functionType(core.double, []), 377 roundToDouble: dart.functionType(core.double, []),
385 truncateToDouble: dart.functionType(core.double, []), 378 truncateToDouble: dart.functionType(core.double, []),
386 clamp: dart.functionType(core.num, [core.num, core.num]), 379 clamp: dart.functionType(core.num, [core.num, core.num]),
387 toDouble: dart.functionType(core.double, []), 380 toDouble: dart.functionType(core.double, []),
388 toStringAsFixed: dart.functionType(core.String, [core.int]), 381 toStringAsFixed: dart.functionType(core.String, [core.int]),
389 toStringAsExponential: dart.functionType(core.String, [], [core.int]), 382 toStringAsExponential: dart.functionType(core.String, [], [core.int]),
390 toStringAsPrecision: dart.functionType(core.String, [core.int]), 383 toStringAsPrecision: dart.functionType(core.String, [core.int]),
391 toRadixString: dart.functionType(core.String, [core.int]), 384 toRadixString: dart.functionType(core.String, [core.int]),
392 toString: dart.functionType(core.String, []),
393 'unary-': dart.functionType(core.num, []), 385 'unary-': dart.functionType(core.num, []),
394 '+': dart.functionType(core.num, [core.num]), 386 '+': dart.functionType(core.num, [core.num]),
395 '-': dart.functionType(core.num, [core.num]), 387 '-': dart.functionType(core.num, [core.num]),
396 '/': dart.functionType(core.double, [core.num]), 388 '/': dart.functionType(core.double, [core.num]),
397 '*': dart.functionType(core.num, [core.num]), 389 '*': dart.functionType(core.num, [core.num]),
398 '%': dart.functionType(core.num, [core.num]), 390 '%': dart.functionType(core.num, [core.num]),
399 [_isInt32]: dart.functionType(core.bool, [dart.dynamic]), 391 [_isInt32]: dart.functionType(core.bool, [dart.dynamic]),
400 '~/': dart.functionType(core.int, [core.num]), 392 '~/': dart.functionType(core.int, [core.num]),
401 [_tdivFast]: dart.functionType(core.int, [core.num]), 393 [_tdivFast]: dart.functionType(core.int, [core.num]),
402 [_tdivSlow]: dart.functionType(core.int, [core.num]), 394 [_tdivSlow]: dart.functionType(core.int, [core.num]),
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 }); 486 });
495 class JSDouble extends JSNumber { 487 class JSDouble extends JSNumber {
496 JSDouble() { 488 JSDouble() {
497 super.JSNumber(); 489 super.JSNumber();
498 } 490 }
499 get runtimeType() { 491 get runtimeType() {
500 return core.double; 492 return core.double;
501 } 493 }
502 } 494 }
503 JSDouble[dart.implements] = () => [core.double]; 495 JSDouble[dart.implements] = () => [core.double];
504 dart.setSignature(JSDouble, {});
505 class JSPositiveInt extends JSInt { 496 class JSPositiveInt extends JSInt {
506 JSPositiveInt() { 497 JSPositiveInt() {
507 super.JSInt(); 498 super.JSInt();
508 } 499 }
509 } 500 }
510 dart.setSignature(JSPositiveInt, {});
511 class JSUInt32 extends JSPositiveInt {} 501 class JSUInt32 extends JSPositiveInt {}
512 dart.setSignature(JSUInt32, {});
513 class JSUInt31 extends JSUInt32 {} 502 class JSUInt31 extends JSUInt32 {}
514 dart.setSignature(JSUInt31, {});
515 let _defaultSplit = Symbol('_defaultSplit'); 503 let _defaultSplit = Symbol('_defaultSplit');
516 class JSString extends Interceptor { 504 class JSString extends Interceptor {
517 JSString() { 505 JSString() {
518 super.Interceptor(); 506 super.Interceptor();
519 } 507 }
520 codeUnitAt(index) { 508 codeUnitAt(index) {
521 if (!(typeof index == 'number')) 509 if (!(typeof index == 'number'))
522 throw new core.ArgumentError(index); 510 throw new core.ArgumentError(index);
523 if (dart.notNull(index) < 0) 511 if (dart.notNull(index) < 0)
524 throw new core.RangeError.value(index); 512 throw new core.RangeError.value(index);
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
951 trim: dart.functionType(core.String, []), 939 trim: dart.functionType(core.String, []),
952 trimLeft: dart.functionType(core.String, []), 940 trimLeft: dart.functionType(core.String, []),
953 trimRight: dart.functionType(core.String, []), 941 trimRight: dart.functionType(core.String, []),
954 '*': dart.functionType(core.String, [core.int]), 942 '*': dart.functionType(core.String, [core.int]),
955 padLeft: dart.functionType(core.String, [core.int], [core.String]), 943 padLeft: dart.functionType(core.String, [core.int], [core.String]),
956 padRight: dart.functionType(core.String, [core.int], [core.String]), 944 padRight: dart.functionType(core.String, [core.int], [core.String]),
957 indexOf: dart.functionType(core.int, [core.Pattern], [core.int]), 945 indexOf: dart.functionType(core.int, [core.Pattern], [core.int]),
958 lastIndexOf: dart.functionType(core.int, [core.Pattern], [core.int]), 946 lastIndexOf: dart.functionType(core.int, [core.Pattern], [core.int]),
959 contains: dart.functionType(core.bool, [core.Pattern], [core.int]), 947 contains: dart.functionType(core.bool, [core.Pattern], [core.int]),
960 compareTo: dart.functionType(core.int, [core.String]), 948 compareTo: dart.functionType(core.int, [core.String]),
961 toString: dart.functionType(core.String, []),
962 get: dart.functionType(core.String, [core.int]) 949 get: dart.functionType(core.String, [core.int])
963 }), 950 }),
964 statics: () => ({ 951 statics: () => ({
965 _isWhitespace: dart.functionType(core.bool, [core.int]), 952 _isWhitespace: dart.functionType(core.bool, [core.int]),
966 _skipLeadingWhitespace: dart.functionType(core.int, [core.String, core.int ]), 953 _skipLeadingWhitespace: dart.functionType(core.int, [core.String, core.int ]),
967 _skipTrailingWhitespace: dart.functionType(core.int, [core.String, core.in t]) 954 _skipTrailingWhitespace: dart.functionType(core.int, [core.String, core.in t])
968 }), 955 }),
969 names: ['_isWhitespace', '_skipLeadingWhitespace', '_skipTrailingWhitespace' ] 956 names: ['_isWhitespace', '_skipLeadingWhitespace', '_skipTrailingWhitespace' ]
970 }); 957 });
971 let _string = Symbol('_string'); 958 let _string = Symbol('_string');
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
1115 return String(this); 1102 return String(this);
1116 } 1103 }
1117 get hashCode() { 1104 get hashCode() {
1118 return this ? 2 * 3 * 23 * 3761 : 269 * 811; 1105 return this ? 2 * 3 * 23 * 3761 : 269 * 811;
1119 } 1106 }
1120 get runtimeType() { 1107 get runtimeType() {
1121 return core.bool; 1108 return core.bool;
1122 } 1109 }
1123 } 1110 }
1124 JSBool[dart.implements] = () => [core.bool]; 1111 JSBool[dart.implements] = () => [core.bool];
1125 dart.setSignature(JSBool, {
1126 methods: () => ({toString: dart.functionType(core.String, [])})
1127 });
1128 class JSNull extends Interceptor { 1112 class JSNull extends Interceptor {
1129 JSNull() { 1113 JSNull() {
1130 super.Interceptor(); 1114 super.Interceptor();
1131 } 1115 }
1132 ['=='](other) { 1116 ['=='](other) {
1133 return core.identical(null, other); 1117 return core.identical(null, other);
1134 } 1118 }
1135 toString() { 1119 toString() {
1136 return 'null'; 1120 return 'null';
1137 } 1121 }
1138 get hashCode() { 1122 get hashCode() {
1139 return 0; 1123 return 0;
1140 } 1124 }
1141 get runtimeType() { 1125 get runtimeType() {
1142 return core.Null; 1126 return core.Null;
1143 } 1127 }
1144 noSuchMethod(invocation) { 1128 noSuchMethod(invocation) {
1145 return super.noSuchMethod(invocation); 1129 return super.noSuchMethod(invocation);
1146 } 1130 }
1147 } 1131 }
1148 JSNull[dart.implements] = () => [core.Null]; 1132 JSNull[dart.implements] = () => [core.Null];
1149 dart.setSignature(JSNull, { 1133 dart.setSignature(JSNull, {
1150 methods: () => ({ 1134 methods: () => ({'==': dart.functionType(core.bool, [dart.dynamic])})
1151 '==': dart.functionType(core.bool, [dart.dynamic]),
1152 toString: dart.functionType(core.String, []),
1153 noSuchMethod: dart.functionType(dart.dynamic, [core.Invocation])
1154 })
1155 }); 1135 });
1156 class JSIndexable extends core.Object {} 1136 class JSIndexable extends core.Object {}
1157 dart.setSignature(JSIndexable, {});
1158 class JSMutableIndexable extends JSIndexable {} 1137 class JSMutableIndexable extends JSIndexable {}
1159 dart.setSignature(JSMutableIndexable, {});
1160 class JSObject extends core.Object {} 1138 class JSObject extends core.Object {}
1161 dart.setSignature(JSObject, {});
1162 class JavaScriptObject extends Interceptor { 1139 class JavaScriptObject extends Interceptor {
1163 JavaScriptObject() { 1140 JavaScriptObject() {
1164 super.Interceptor(); 1141 super.Interceptor();
1165 } 1142 }
1166 get hashCode() { 1143 get hashCode() {
1167 return 0; 1144 return 0;
1168 } 1145 }
1169 get runtimeType() { 1146 get runtimeType() {
1170 return JSObject; 1147 return JSObject;
1171 } 1148 }
1172 } 1149 }
1173 JavaScriptObject[dart.implements] = () => [JSObject]; 1150 JavaScriptObject[dart.implements] = () => [JSObject];
1174 dart.setSignature(JavaScriptObject, {});
1175 class PlainJavaScriptObject extends JavaScriptObject { 1151 class PlainJavaScriptObject extends JavaScriptObject {
1176 PlainJavaScriptObject() { 1152 PlainJavaScriptObject() {
1177 super.JavaScriptObject(); 1153 super.JavaScriptObject();
1178 } 1154 }
1179 } 1155 }
1180 dart.setSignature(PlainJavaScriptObject, {});
1181 class UnknownJavaScriptObject extends JavaScriptObject { 1156 class UnknownJavaScriptObject extends JavaScriptObject {
1182 UnknownJavaScriptObject() { 1157 UnknownJavaScriptObject() {
1183 super.JavaScriptObject(); 1158 super.JavaScriptObject();
1184 } 1159 }
1185 toString() { 1160 toString() {
1186 return String(this); 1161 return String(this);
1187 } 1162 }
1188 } 1163 }
1189 dart.setSignature(UnknownJavaScriptObject, {
1190 methods: () => ({toString: dart.functionType(core.String, [])})
1191 });
1192 // Exports: 1164 // Exports:
1193 exports.JSArray = JSArray; 1165 exports.JSArray = JSArray;
1194 exports.JSMutableArray$ = JSMutableArray$; 1166 exports.JSMutableArray$ = JSMutableArray$;
1195 exports.JSMutableArray = JSMutableArray; 1167 exports.JSMutableArray = JSMutableArray;
1196 exports.JSFixedArray$ = JSFixedArray$; 1168 exports.JSFixedArray$ = JSFixedArray$;
1197 exports.JSFixedArray = JSFixedArray; 1169 exports.JSFixedArray = JSFixedArray;
1198 exports.JSExtendableArray$ = JSExtendableArray$; 1170 exports.JSExtendableArray$ = JSExtendableArray$;
1199 exports.JSExtendableArray = JSExtendableArray; 1171 exports.JSExtendableArray = JSExtendableArray;
1200 exports.Interceptor = Interceptor; 1172 exports.Interceptor = Interceptor;
1201 exports.JSNumber = JSNumber; 1173 exports.JSNumber = JSNumber;
(...skipping 18 matching lines...) Expand all
1220 exports.findInterceptorForType = findInterceptorForType; 1192 exports.findInterceptorForType = findInterceptorForType;
1221 exports.JSBool = JSBool; 1193 exports.JSBool = JSBool;
1222 exports.JSNull = JSNull; 1194 exports.JSNull = JSNull;
1223 exports.JSIndexable = JSIndexable; 1195 exports.JSIndexable = JSIndexable;
1224 exports.JSMutableIndexable = JSMutableIndexable; 1196 exports.JSMutableIndexable = JSMutableIndexable;
1225 exports.JSObject = JSObject; 1197 exports.JSObject = JSObject;
1226 exports.JavaScriptObject = JavaScriptObject; 1198 exports.JavaScriptObject = JavaScriptObject;
1227 exports.PlainJavaScriptObject = PlainJavaScriptObject; 1199 exports.PlainJavaScriptObject = PlainJavaScriptObject;
1228 exports.UnknownJavaScriptObject = UnknownJavaScriptObject; 1200 exports.UnknownJavaScriptObject = UnknownJavaScriptObject;
1229 })(_interceptors, core, _js_helper, _internal, _foreign_helper, _js_embedded_nam es); 1201 })(_interceptors, core, _js_helper, _internal, _foreign_helper, _js_embedded_nam es);
OLDNEW
« no previous file with comments | « lib/runtime/dart/_foreign_helper.js ('k') | lib/runtime/dart/_internal.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698