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

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: 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 | « no previous file | lib/runtime/dart/_internal.js » ('j') | lib/runtime/dart/async.js » ('J')
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) {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 return _js_helper.Primitives.objectToString(this); 43 return _js_helper.Primitives.objectToString(this);
44 } 44 }
45 noSuchMethod(invocation) { 45 noSuchMethod(invocation) {
46 throw new core.NoSuchMethodError(this, invocation.memberName, invocation.p ositionalArguments, invocation.namedArguments); 46 throw new core.NoSuchMethodError(this, invocation.memberName, invocation.p ositionalArguments, invocation.namedArguments);
47 } 47 }
48 get runtimeType() { 48 get runtimeType() {
49 return _js_helper.getRuntimeType(this); 49 return _js_helper.getRuntimeType(this);
50 } 50 }
51 } 51 }
52 dart.setSignature(Interceptor, { 52 dart.setSignature(Interceptor, {
53 methods: () => ({ 53 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 }); 54 });
59 let _isInt32 = Symbol('_isInt32'); 55 let _isInt32 = Symbol('_isInt32');
60 let _tdivFast = Symbol('_tdivFast'); 56 let _tdivFast = Symbol('_tdivFast');
61 let _tdivSlow = Symbol('_tdivSlow'); 57 let _tdivSlow = Symbol('_tdivSlow');
62 let _shlPositive = Symbol('_shlPositive'); 58 let _shlPositive = Symbol('_shlPositive');
63 let _shrReceiverPositive = Symbol('_shrReceiverPositive'); 59 let _shrReceiverPositive = Symbol('_shrReceiverPositive');
64 let _shrOtherPositive = Symbol('_shrOtherPositive'); 60 let _shrOtherPositive = Symbol('_shrOtherPositive');
65 let _shrBothPositive = Symbol('_shrBothPositive'); 61 let _shrBothPositive = Symbol('_shrBothPositive');
66 class JSNumber extends Interceptor { 62 class JSNumber extends Interceptor {
67 JSNumber() { 63 JSNumber() {
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 ceilToDouble: dart.functionType(core.double, []), 378 ceilToDouble: dart.functionType(core.double, []),
383 floorToDouble: dart.functionType(core.double, []), 379 floorToDouble: dart.functionType(core.double, []),
384 roundToDouble: dart.functionType(core.double, []), 380 roundToDouble: dart.functionType(core.double, []),
385 truncateToDouble: dart.functionType(core.double, []), 381 truncateToDouble: dart.functionType(core.double, []),
386 clamp: dart.functionType(core.num, [core.num, core.num]), 382 clamp: dart.functionType(core.num, [core.num, core.num]),
387 toDouble: dart.functionType(core.double, []), 383 toDouble: dart.functionType(core.double, []),
388 toStringAsFixed: dart.functionType(core.String, [core.int]), 384 toStringAsFixed: dart.functionType(core.String, [core.int]),
389 toStringAsExponential: dart.functionType(core.String, [], [core.int]), 385 toStringAsExponential: dart.functionType(core.String, [], [core.int]),
390 toStringAsPrecision: dart.functionType(core.String, [core.int]), 386 toStringAsPrecision: dart.functionType(core.String, [core.int]),
391 toRadixString: dart.functionType(core.String, [core.int]), 387 toRadixString: dart.functionType(core.String, [core.int]),
392 toString: dart.functionType(core.String, []),
393 'unary-': dart.functionType(core.num, []), 388 'unary-': dart.functionType(core.num, []),
394 '+': dart.functionType(core.num, [core.num]), 389 '+': dart.functionType(core.num, [core.num]),
395 '-': dart.functionType(core.num, [core.num]), 390 '-': dart.functionType(core.num, [core.num]),
396 '/': dart.functionType(core.double, [core.num]), 391 '/': dart.functionType(core.double, [core.num]),
397 '*': dart.functionType(core.num, [core.num]), 392 '*': dart.functionType(core.num, [core.num]),
398 '%': dart.functionType(core.num, [core.num]), 393 '%': dart.functionType(core.num, [core.num]),
399 [_isInt32]: dart.functionType(core.bool, [dart.dynamic]), 394 [_isInt32]: dart.functionType(core.bool, [dart.dynamic]),
400 '~/': dart.functionType(core.int, [core.num]), 395 '~/': dart.functionType(core.int, [core.num]),
401 [_tdivFast]: dart.functionType(core.int, [core.num]), 396 [_tdivFast]: dart.functionType(core.int, [core.num]),
402 [_tdivSlow]: dart.functionType(core.int, [core.num]), 397 [_tdivSlow]: dart.functionType(core.int, [core.num]),
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
951 trim: dart.functionType(core.String, []), 946 trim: dart.functionType(core.String, []),
952 trimLeft: dart.functionType(core.String, []), 947 trimLeft: dart.functionType(core.String, []),
953 trimRight: dart.functionType(core.String, []), 948 trimRight: dart.functionType(core.String, []),
954 '*': dart.functionType(core.String, [core.int]), 949 '*': dart.functionType(core.String, [core.int]),
955 padLeft: dart.functionType(core.String, [core.int], [core.String]), 950 padLeft: dart.functionType(core.String, [core.int], [core.String]),
956 padRight: dart.functionType(core.String, [core.int], [core.String]), 951 padRight: dart.functionType(core.String, [core.int], [core.String]),
957 indexOf: dart.functionType(core.int, [core.Pattern], [core.int]), 952 indexOf: dart.functionType(core.int, [core.Pattern], [core.int]),
958 lastIndexOf: dart.functionType(core.int, [core.Pattern], [core.int]), 953 lastIndexOf: dart.functionType(core.int, [core.Pattern], [core.int]),
959 contains: dart.functionType(core.bool, [core.Pattern], [core.int]), 954 contains: dart.functionType(core.bool, [core.Pattern], [core.int]),
960 compareTo: dart.functionType(core.int, [core.String]), 955 compareTo: dart.functionType(core.int, [core.String]),
961 toString: dart.functionType(core.String, []),
962 get: dart.functionType(core.String, [core.int]) 956 get: dart.functionType(core.String, [core.int])
963 }), 957 }),
964 statics: () => ({ 958 statics: () => ({
965 _isWhitespace: dart.functionType(core.bool, [core.int]), 959 _isWhitespace: dart.functionType(core.bool, [core.int]),
966 _skipLeadingWhitespace: dart.functionType(core.int, [core.String, core.int ]), 960 _skipLeadingWhitespace: dart.functionType(core.int, [core.String, core.int ]),
967 _skipTrailingWhitespace: dart.functionType(core.int, [core.String, core.in t]) 961 _skipTrailingWhitespace: dart.functionType(core.int, [core.String, core.in t])
968 }), 962 }),
969 names: ['_isWhitespace', '_skipLeadingWhitespace', '_skipTrailingWhitespace' ] 963 names: ['_isWhitespace', '_skipLeadingWhitespace', '_skipTrailingWhitespace' ]
970 }); 964 });
971 let _string = Symbol('_string'); 965 let _string = Symbol('_string');
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
1115 return String(this); 1109 return String(this);
1116 } 1110 }
1117 get hashCode() { 1111 get hashCode() {
1118 return this ? 2 * 3 * 23 * 3761 : 269 * 811; 1112 return this ? 2 * 3 * 23 * 3761 : 269 * 811;
1119 } 1113 }
1120 get runtimeType() { 1114 get runtimeType() {
1121 return core.bool; 1115 return core.bool;
1122 } 1116 }
1123 } 1117 }
1124 JSBool[dart.implements] = () => [core.bool]; 1118 JSBool[dart.implements] = () => [core.bool];
1125 dart.setSignature(JSBool, { 1119 dart.setSignature(JSBool, {});
1126 methods: () => ({toString: dart.functionType(core.String, [])})
1127 });
1128 class JSNull extends Interceptor { 1120 class JSNull extends Interceptor {
1129 JSNull() { 1121 JSNull() {
1130 super.Interceptor(); 1122 super.Interceptor();
1131 } 1123 }
1132 ['=='](other) { 1124 ['=='](other) {
1133 return core.identical(null, other); 1125 return core.identical(null, other);
1134 } 1126 }
1135 toString() { 1127 toString() {
1136 return 'null'; 1128 return 'null';
1137 } 1129 }
1138 get hashCode() { 1130 get hashCode() {
1139 return 0; 1131 return 0;
1140 } 1132 }
1141 get runtimeType() { 1133 get runtimeType() {
1142 return core.Null; 1134 return core.Null;
1143 } 1135 }
1144 noSuchMethod(invocation) { 1136 noSuchMethod(invocation) {
1145 return super.noSuchMethod(invocation); 1137 return super.noSuchMethod(invocation);
1146 } 1138 }
1147 } 1139 }
1148 JSNull[dart.implements] = () => [core.Null]; 1140 JSNull[dart.implements] = () => [core.Null];
1149 dart.setSignature(JSNull, { 1141 dart.setSignature(JSNull, {
1150 methods: () => ({ 1142 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 }); 1143 });
1156 class JSIndexable extends core.Object {} 1144 class JSIndexable extends core.Object {}
1157 dart.setSignature(JSIndexable, {}); 1145 dart.setSignature(JSIndexable, {});
1158 class JSMutableIndexable extends JSIndexable {} 1146 class JSMutableIndexable extends JSIndexable {}
1159 dart.setSignature(JSMutableIndexable, {}); 1147 dart.setSignature(JSMutableIndexable, {});
1160 class JSObject extends core.Object {} 1148 class JSObject extends core.Object {}
1161 dart.setSignature(JSObject, {}); 1149 dart.setSignature(JSObject, {});
1162 class JavaScriptObject extends Interceptor { 1150 class JavaScriptObject extends Interceptor {
1163 JavaScriptObject() { 1151 JavaScriptObject() {
1164 super.Interceptor(); 1152 super.Interceptor();
(...skipping 14 matching lines...) Expand all
1179 } 1167 }
1180 dart.setSignature(PlainJavaScriptObject, {}); 1168 dart.setSignature(PlainJavaScriptObject, {});
1181 class UnknownJavaScriptObject extends JavaScriptObject { 1169 class UnknownJavaScriptObject extends JavaScriptObject {
1182 UnknownJavaScriptObject() { 1170 UnknownJavaScriptObject() {
1183 super.JavaScriptObject(); 1171 super.JavaScriptObject();
1184 } 1172 }
1185 toString() { 1173 toString() {
1186 return String(this); 1174 return String(this);
1187 } 1175 }
1188 } 1176 }
1189 dart.setSignature(UnknownJavaScriptObject, { 1177 dart.setSignature(UnknownJavaScriptObject, {});
1190 methods: () => ({toString: dart.functionType(core.String, [])})
1191 });
1192 // Exports: 1178 // Exports:
1193 exports.JSArray = JSArray; 1179 exports.JSArray = JSArray;
1194 exports.JSMutableArray$ = JSMutableArray$; 1180 exports.JSMutableArray$ = JSMutableArray$;
1195 exports.JSMutableArray = JSMutableArray; 1181 exports.JSMutableArray = JSMutableArray;
1196 exports.JSFixedArray$ = JSFixedArray$; 1182 exports.JSFixedArray$ = JSFixedArray$;
1197 exports.JSFixedArray = JSFixedArray; 1183 exports.JSFixedArray = JSFixedArray;
1198 exports.JSExtendableArray$ = JSExtendableArray$; 1184 exports.JSExtendableArray$ = JSExtendableArray$;
1199 exports.JSExtendableArray = JSExtendableArray; 1185 exports.JSExtendableArray = JSExtendableArray;
1200 exports.Interceptor = Interceptor; 1186 exports.Interceptor = Interceptor;
1201 exports.JSNumber = JSNumber; 1187 exports.JSNumber = JSNumber;
(...skipping 18 matching lines...) Expand all
1220 exports.findInterceptorForType = findInterceptorForType; 1206 exports.findInterceptorForType = findInterceptorForType;
1221 exports.JSBool = JSBool; 1207 exports.JSBool = JSBool;
1222 exports.JSNull = JSNull; 1208 exports.JSNull = JSNull;
1223 exports.JSIndexable = JSIndexable; 1209 exports.JSIndexable = JSIndexable;
1224 exports.JSMutableIndexable = JSMutableIndexable; 1210 exports.JSMutableIndexable = JSMutableIndexable;
1225 exports.JSObject = JSObject; 1211 exports.JSObject = JSObject;
1226 exports.JavaScriptObject = JavaScriptObject; 1212 exports.JavaScriptObject = JavaScriptObject;
1227 exports.PlainJavaScriptObject = PlainJavaScriptObject; 1213 exports.PlainJavaScriptObject = PlainJavaScriptObject;
1228 exports.UnknownJavaScriptObject = UnknownJavaScriptObject; 1214 exports.UnknownJavaScriptObject = UnknownJavaScriptObject;
1229 })(_interceptors, core, _js_helper, _internal, _foreign_helper, _js_embedded_nam es); 1215 })(_interceptors, core, _js_helper, _internal, _foreign_helper, _js_embedded_nam es);
OLDNEW
« no previous file with comments | « no previous file | lib/runtime/dart/_internal.js » ('j') | lib/runtime/dart/async.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698