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

Unified Diff: lib/runtime/dart/_isolate_helper.js

Issue 1071773002: metalet with postfix improvement (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | lib/runtime/dart/collection.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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})));
« no previous file with comments | « no previous file | lib/runtime/dart/collection.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698