Chromium Code Reviews| Index: lib/runtime/dart/_isolate_helper.js |
| diff --git a/lib/runtime/dart/_isolate_helper.js b/lib/runtime/dart/_isolate_helper.js |
| index 3c53c4ccf53f9512936fd673fa5f663c9a157a7e..c1826816560e179bb9617012a2c1e5c50beefa44 100644 |
| --- a/lib/runtime/dart/_isolate_helper.js |
| +++ b/lib/runtime/dart/_isolate_helper.js |
| @@ -358,13 +358,11 @@ var _isolate_helper; |
| let _activeJsAsyncCount = Symbol('_activeJsAsyncCount'); |
| // Function enterJsAsync: () → dynamic |
| function enterJsAsync() { |
| - let o$ = exports._globalState.topEventLoop; |
| - o$[_activeJsAsyncCount] = dart.notNull(o$[_activeJsAsyncCount]) + 1; |
| + dart.prop(exports._globalState.topEventLoop, _activeJsAsyncCount).notNull++; |
|
vsm
2015/04/09 16:58:28
How about just specializing the increment case? E
Jennifer Messerly
2015/04/09 17:47:40
yeah, that could work, would we have different pre
vsm
2015/04/10 00:14:10
Another alternative:
dart.nullcheck(exports._glob
Jennifer Messerly
2015/04/10 01:00:24
that won't work though ... it has to be an lvalue.
|
| } |
| // Function leaveJsAsync: () → dynamic |
| function leaveJsAsync() { |
| - let o$ = exports._globalState.topEventLoop; |
| - o$[_activeJsAsyncCount] = dart.notNull(o$[_activeJsAsyncCount]) - 1; |
| + dart.prop(exports._globalState.topEventLoop, _activeJsAsyncCount).notNull--; |
| dart.assert(dart.notNull(exports._globalState.topEventLoop[_activeJsAsyncCount]) >= 0); |
| } |
| // Function isWorker: () → bool |
| @@ -483,11 +481,7 @@ var _isolate_helper; |
| let _close = Symbol('_close'); |
| class _IsolateContext extends core.Object { |
| _IsolateContext() { |
| - this.id = (() => { |
| - let o$ = exports._globalState, x$ = o$.nextIsolateId; |
| - o$.nextIsolateId = dart.notNull(x$) + 1; |
| - return x$; |
| - })(); |
| + this.id = dart.prop(exports._globalState, 'nextIsolateId').notNull++; |
| this.ports = new (core.Map$(core.int, RawReceivePortImpl))(); |
| this.weakPorts = new (core.Set$(core.int))(); |
| this.isolateStatics = _foreign_helper.JS_CREATE_ISOLATE(); |
| @@ -1098,9 +1092,7 @@ var _isolate_helper; |
| }; |
| }(_foreign_helper.DART_CLOSURE_TO_JS(IsolateNatives[_processWorkerMessage]), worker); |
| worker.onmessage = processWorkerMessageTrampoline; |
| - let o$ = exports._globalState; |
| - let workerId = o$.nextManagerId; |
| - o$.nextManagerId = dart.notNull(workerId) + 1; |
| + let workerId = dart.prop(exports._globalState, 'nextManagerId').notNull++; |
| IsolateNatives.workerIds.set(worker, workerId); |
| exports._globalState.managers.set(workerId, worker); |
| worker.postMessage(_serializeMessage(dart.map({command: 'start', id: workerId, replyTo: _serializeMessage(replyPort), args: args, msg: _serializeMessage(message), isSpawnUri: isSpawnUri, startPaused: startPaused, functionName: functionName}))); |