| Index: lib/runtime/dart/_isolate_helper.js
|
| diff --git a/lib/runtime/dart/_isolate_helper.js b/lib/runtime/dart/_isolate_helper.js
|
| index bc07ef5ee5f2d5a7db08788addc7b2b3a02e76b5..1dada5e2f80a90ea9a945f96f8c00eff4e153081 100644
|
| --- a/lib/runtime/dart/_isolate_helper.js
|
| +++ b/lib/runtime/dart/_isolate_helper.js
|
| @@ -19,8 +19,8 @@ var _isolate_helper;
|
| let _workerId = Symbol('_workerId');
|
| let _isolateId = Symbol('_isolateId');
|
| let _receivePortId = Symbol('_receivePortId');
|
| - let _receivePort = Symbol('_receivePort');
|
| let _id = Symbol('_id');
|
| + let _receivePort = Symbol('_receivePort');
|
| let _getJSFunctionName = Symbol('_getJSFunctionName');
|
| class _Serializer extends core.Object {
|
| _Serializer(opts) {
|
| @@ -70,7 +70,7 @@ var _isolate_helper;
|
| return new core.List.from(["ref", serializationId]);
|
| }
|
| isPrimitive(x) {
|
| - return dart.notNull(x == null) || dart.notNull(typeof x == 'string') || dart.notNull(dart.is(x, core.num)) || dart.notNull(typeof x == 'boolean');
|
| + return dart.notNull(x == null) || typeof x == 'string' || dart.is(x, core.num) || typeof x == 'boolean';
|
| }
|
| serializePrimitive(primitive) {
|
| return primitive;
|
| @@ -229,7 +229,7 @@ var _isolate_helper;
|
| }
|
| }
|
| isPrimitive(x) {
|
| - return dart.notNull(x == null) || dart.notNull(typeof x == 'string') || dart.notNull(dart.is(x, core.num)) || dart.notNull(typeof x == 'boolean');
|
| + return dart.notNull(x == null) || typeof x == 'string' || dart.is(x, core.num) || typeof x == 'boolean';
|
| }
|
| deserializePrimitive(x) {
|
| return x;
|
| @@ -530,14 +530,14 @@ var _isolate_helper;
|
| if (this.doneHandlers == null) {
|
| this.doneHandlers = new core.List.from([]);
|
| }
|
| - if (dart.dinvoke(this.doneHandlers, 'contains', responsePort))
|
| + if (dart.dsend(this.doneHandlers, 'contains', responsePort))
|
| return;
|
| - dart.dinvoke(this.doneHandlers, 'add', responsePort);
|
| + dart.dsend(this.doneHandlers, 'add', responsePort);
|
| }
|
| removeDoneListener(responsePort) {
|
| if (this.doneHandlers == null)
|
| return;
|
| - dart.dinvoke(this.doneHandlers, 'remove', responsePort);
|
| + dart.dsend(this.doneHandlers, 'remove', responsePort);
|
| }
|
| setErrorsFatal(authentification, errorsAreFatal) {
|
| if (!dart.equals(this.terminateCapability, authentification))
|
| @@ -561,7 +561,7 @@ var _isolate_helper;
|
| if (this[_scheduledControlEvents] == null) {
|
| this[_scheduledControlEvents] = new collection.Queue();
|
| }
|
| - dart.dinvoke(this[_scheduledControlEvents], 'addLast', respond);
|
| + dart.dsend(this[_scheduledControlEvents], 'addLast', respond);
|
| }
|
| handleKill(authentification, priority) {
|
| if (!dart.equals(this.terminateCapability, authentification))
|
| @@ -578,7 +578,7 @@ var _isolate_helper;
|
| if (this[_scheduledControlEvents] == null) {
|
| this[_scheduledControlEvents] = new collection.Queue();
|
| }
|
| - dart.dinvoke(this[_scheduledControlEvents], 'addLast', this.kill);
|
| + dart.dsend(this[_scheduledControlEvents], 'addLast', this.kill);
|
| }
|
| addErrorListener(port) {
|
| this.errorPorts.add(port);
|
| @@ -631,7 +631,7 @@ var _isolate_helper;
|
| old[_setGlobals]();
|
| if (this[_scheduledControlEvents] != null) {
|
| while (dart.dload(this[_scheduledControlEvents], 'isNotEmpty')) {
|
| - dart.dinvokef(dart.dinvoke(this[_scheduledControlEvents], 'removeFirst'));
|
| + dart.dinvokef(dart.dsend(this[_scheduledControlEvents], 'removeFirst'));
|
| }
|
| }
|
| }
|
| @@ -716,7 +716,7 @@ var _isolate_helper;
|
| }
|
| kill() {
|
| if (this[_scheduledControlEvents] != null) {
|
| - dart.dinvoke(this[_scheduledControlEvents], 'clear');
|
| + dart.dsend(this[_scheduledControlEvents], 'clear');
|
| }
|
| for (let port of this.ports.values) {
|
| port[_close]();
|
| @@ -925,7 +925,7 @@ var _isolate_helper;
|
| {
|
| let port = dart.as(dart.dindex(msg, 'port'), isolate.SendPort);
|
| if (port != null) {
|
| - dart.dinvoke(dart.dindex(msg, 'port'), 'send', dart.dindex(msg, 'msg'));
|
| + dart.dsend(dart.dindex(msg, 'port'), 'send', dart.dindex(msg, 'msg'));
|
| }
|
| exports._globalState.topEventLoop.run();
|
| break;
|
| @@ -960,10 +960,10 @@ var _isolate_helper;
|
| static handleSpawnWorkerRequest(msg) {
|
| let replyPort = dart.dindex(msg, 'replyPort');
|
| IsolateNatives.spawn(dart.as(dart.dindex(msg, 'functionName'), core.String), dart.as(dart.dindex(msg, 'uri'), core.String), dart.as(dart.dindex(msg, 'args'), core.List$(core.String)), dart.dindex(msg, 'msg'), false, dart.as(dart.dindex(msg, 'isSpawnUri'), core.bool), dart.as(dart.dindex(msg, 'startPaused'), core.bool)).then(dart.as(msg => {
|
| - dart.dinvoke(replyPort, 'send', msg);
|
| + dart.dsend(replyPort, 'send', msg);
|
| }, dart.functionType(dart.dynamic, [core.List])), {
|
| onError: errorMessage => {
|
| - dart.dinvoke(replyPort, 'send', new core.List.from([_SPAWN_FAILED_SIGNAL, errorMessage]));
|
| + dart.dsend(replyPort, 'send', new core.List.from([_SPAWN_FAILED_SIGNAL, errorMessage]));
|
| }
|
| });
|
| }
|
| @@ -1133,7 +1133,7 @@ var _isolate_helper;
|
| this[_isolateId] = isolateId$;
|
| }
|
| [_checkReplyTo](replyTo) {
|
| - if (dart.notNull(replyTo != null) && dart.notNull(!dart.is(replyTo, _NativeJsSendPort)) && dart.notNull(!dart.is(replyTo, _WorkerSendPort))) {
|
| + if (dart.notNull(replyTo != null) && !dart.is(replyTo, _NativeJsSendPort) && !dart.is(replyTo, _WorkerSendPort)) {
|
| throw new core.Exception("SendPort.send: Illegal replyTo port type");
|
| }
|
| }
|
| @@ -1164,7 +1164,7 @@ var _isolate_helper;
|
| }).bind(this), `receive ${message}`);
|
| }
|
| ['=='](other) {
|
| - return dart.notNull(dart.is(other, _NativeJsSendPort)) && dart.notNull(dart.equals(this[_receivePort], dart.dload(other, '_receivePort')));
|
| + return dart.is(other, _NativeJsSendPort) && dart.notNull(dart.equals(this[_receivePort], dart.dload(other, _receivePort)));
|
| }
|
| get hashCode() {
|
| return this[_receivePort][_id];
|
| @@ -1189,7 +1189,7 @@ var _isolate_helper;
|
| }
|
| }
|
| ['=='](other) {
|
| - return dart.notNull(dart.is(other, _WorkerSendPort)) && dart.equals(this[_workerId], dart.dload(other, '_workerId')) && dart.equals(this[_isolateId], dart.dload(other, '_isolateId')) && dart.equals(this[_receivePortId], dart.dload(other, '_receivePortId'));
|
| + return dart.is(other, _WorkerSendPort) && dart.equals(this[_workerId], dart.dload(other, _workerId)) && dart.equals(this[_isolateId], dart.dload(other, _isolateId)) && dart.equals(this[_receivePortId], dart.dload(other, _receivePortId));
|
| }
|
| get hashCode() {
|
| return dart.notNull(this[_workerId]) << 16 ^ dart.notNull(this[_isolateId]) << 8 ^ dart.notNull(this[_receivePortId]);
|
|
|