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

Side by Side Diff: lib/runtime/dart/_isolate_helper.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/_internal.js ('k') | lib/runtime/dart/_js_helper.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 _isolate_helper = dart.defineLibrary(_isolate_helper, {}); 1 var _isolate_helper = dart.defineLibrary(_isolate_helper, {});
2 var core = dart.import(core); 2 var core = dart.import(core);
3 var _native_typed_data = dart.import(_native_typed_data); 3 var _native_typed_data = dart.import(_native_typed_data);
4 var _interceptors = dart.lazyImport(_interceptors); 4 var _interceptors = dart.lazyImport(_interceptors);
5 var _js_helper = dart.lazyImport(_js_helper); 5 var _js_helper = dart.lazyImport(_js_helper);
6 var isolate = dart.import(isolate); 6 var isolate = dart.import(isolate);
7 var _foreign_helper = dart.import(_foreign_helper); 7 var _foreign_helper = dart.import(_foreign_helper);
8 var _js_embedded_names = dart.import(_js_embedded_names); 8 var _js_embedded_names = dart.import(_js_embedded_names);
9 var collection = dart.import(collection); 9 var collection = dart.import(collection);
10 var async = dart.import(async); 10 var async = dart.import(async);
(...skipping 1269 matching lines...) Expand 10 before | Expand all | Expand 10 after
1280 } 1280 }
1281 ['=='](other) { 1281 ['=='](other) {
1282 return dart.is(other, _NativeJsSendPort) && dart.notNull(dart.equals(this[ _receivePort], dart.dload(other, _receivePort))); 1282 return dart.is(other, _NativeJsSendPort) && dart.notNull(dart.equals(this[ _receivePort], dart.dload(other, _receivePort)));
1283 } 1283 }
1284 get hashCode() { 1284 get hashCode() {
1285 return this[_receivePort][_id]; 1285 return this[_receivePort][_id];
1286 } 1286 }
1287 } 1287 }
1288 _NativeJsSendPort[dart.implements] = () => [isolate.SendPort]; 1288 _NativeJsSendPort[dart.implements] = () => [isolate.SendPort];
1289 dart.setSignature(_NativeJsSendPort, { 1289 dart.setSignature(_NativeJsSendPort, {
1290 methods: () => ({ 1290 methods: () => ({send: dart.functionType(dart.void, [dart.dynamic])})
1291 send: dart.functionType(dart.void, [dart.dynamic]),
1292 '==': dart.functionType(core.bool, [dart.dynamic])
1293 })
1294 }); 1291 });
1295 class _WorkerSendPort extends _BaseSendPort { 1292 class _WorkerSendPort extends _BaseSendPort {
1296 _WorkerSendPort(workerId, isolateId, receivePortId) { 1293 _WorkerSendPort(workerId, isolateId, receivePortId) {
1297 this[_workerId] = workerId; 1294 this[_workerId] = workerId;
1298 this[_receivePortId] = receivePortId; 1295 this[_receivePortId] = receivePortId;
1299 super._BaseSendPort(isolateId); 1296 super._BaseSendPort(isolateId);
1300 } 1297 }
1301 send(message) { 1298 send(message) {
1302 let workerMessage = _serializeMessage(dart.map({command: 'message', port: this, msg: message})); 1299 let workerMessage = _serializeMessage(dart.map({command: 'message', port: this, msg: message}));
1303 if (exports._globalState.isWorker) { 1300 if (exports._globalState.isWorker) {
1304 exports._globalState.mainManager.postMessage(workerMessage); 1301 exports._globalState.mainManager.postMessage(workerMessage);
1305 } else { 1302 } else {
1306 let manager = exports._globalState.managers.get(this[_workerId]); 1303 let manager = exports._globalState.managers.get(this[_workerId]);
1307 if (manager != null) { 1304 if (manager != null) {
1308 manager.postMessage(workerMessage); 1305 manager.postMessage(workerMessage);
1309 } 1306 }
1310 } 1307 }
1311 } 1308 }
1312 ['=='](other) { 1309 ['=='](other) {
1313 return dart.is(other, _WorkerSendPort) && dart.equals(this[_workerId], dar t.dload(other, _workerId)) && dart.equals(this[_isolateId], dart.dload(other, _i solateId)) && dart.equals(this[_receivePortId], dart.dload(other, _receivePortId )); 1310 return dart.is(other, _WorkerSendPort) && dart.equals(this[_workerId], dar t.dload(other, _workerId)) && dart.equals(this[_isolateId], dart.dload(other, _i solateId)) && dart.equals(this[_receivePortId], dart.dload(other, _receivePortId ));
1314 } 1311 }
1315 get hashCode() { 1312 get hashCode() {
1316 return dart.notNull(this[_workerId]) << 16 ^ dart.notNull(this[_isolateId] ) << 8 ^ dart.notNull(this[_receivePortId]); 1313 return dart.notNull(this[_workerId]) << 16 ^ dart.notNull(this[_isolateId] ) << 8 ^ dart.notNull(this[_receivePortId]);
1317 } 1314 }
1318 } 1315 }
1319 _WorkerSendPort[dart.implements] = () => [isolate.SendPort]; 1316 _WorkerSendPort[dart.implements] = () => [isolate.SendPort];
1320 dart.setSignature(_WorkerSendPort, { 1317 dart.setSignature(_WorkerSendPort, {
1321 methods: () => ({ 1318 methods: () => ({send: dart.functionType(dart.void, [dart.dynamic])})
1322 send: dart.functionType(dart.void, [dart.dynamic]),
1323 '==': dart.functionType(core.bool, [dart.dynamic])
1324 })
1325 }); 1319 });
1326 let _handler = Symbol('_handler'); 1320 let _handler = Symbol('_handler');
1327 class RawReceivePortImpl extends core.Object { 1321 class RawReceivePortImpl extends core.Object {
1328 RawReceivePortImpl(handler) { 1322 RawReceivePortImpl(handler) {
1329 this[_handler] = handler; 1323 this[_handler] = handler;
1330 this[_id] = (() => { 1324 this[_id] = (() => {
1331 let x = RawReceivePortImpl._nextFreeId; 1325 let x = RawReceivePortImpl._nextFreeId;
1332 RawReceivePortImpl._nextFreeId = dart.notNull(x) + 1; 1326 RawReceivePortImpl._nextFreeId = dart.notNull(x) + 1;
1333 return x; 1327 return x;
1334 })(); 1328 })();
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
1536 exports.leaveJsAsync = leaveJsAsync; 1530 exports.leaveJsAsync = leaveJsAsync;
1537 exports.isWorker = isWorker; 1531 exports.isWorker = isWorker;
1538 exports.startRootIsolate = startRootIsolate; 1532 exports.startRootIsolate = startRootIsolate;
1539 exports.IsolateNatives = IsolateNatives; 1533 exports.IsolateNatives = IsolateNatives;
1540 exports.RawReceivePortImpl = RawReceivePortImpl; 1534 exports.RawReceivePortImpl = RawReceivePortImpl;
1541 exports.ReceivePortImpl = ReceivePortImpl; 1535 exports.ReceivePortImpl = ReceivePortImpl;
1542 exports.TimerImpl = TimerImpl; 1536 exports.TimerImpl = TimerImpl;
1543 exports.hasTimer = hasTimer; 1537 exports.hasTimer = hasTimer;
1544 exports.CapabilityImpl = CapabilityImpl; 1538 exports.CapabilityImpl = CapabilityImpl;
1545 })(_isolate_helper, core, _native_typed_data, _interceptors, _js_helper, isolate , _foreign_helper, _js_embedded_names, collection, async); 1539 })(_isolate_helper, core, _native_typed_data, _interceptors, _js_helper, isolate , _foreign_helper, _js_embedded_names, collection, async);
OLDNEW
« no previous file with comments | « lib/runtime/dart/_internal.js ('k') | lib/runtime/dart/_js_helper.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698