Skip to content

Commit

Permalink
fix temp used in postfix ops
Browse files Browse the repository at this point in the history
  • Loading branch information
John Messerly committed Mar 27, 2015
1 parent 2357e30 commit 34e2fba
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 47 deletions.
22 changes: 11 additions & 11 deletions pkg/dev_compiler/lib/runtime/dart/_internal.js
Original file line number Diff line number Diff line change
Expand Up @@ -1156,13 +1156,13 @@ var _internal;
list.length = insertionLength;
list.setRange(dart.notNull(index) + dart.notNull(insertionLength), list.length, list, index);
for (let element of iterable) {
list.set(((x) => index = dart.notNull(x$) + 1, x$)(index), element);
list.set(((x) => index = dart.notNull(x) + 1, x)(index), element);
}
}
static setAllList(list, index, iterable) {
core.RangeError.checkValueInInterval(index, 0, list.length, "index");
for (let element of iterable) {
list.set(((x) => index = dart.notNull(x$) + 1, x$)(index), element);
list.set(((x) => index = dart.notNull(x) + 1, x)(index), element);
}
}
asMapList(l) {
Expand Down Expand Up @@ -1660,12 +1660,12 @@ var _internal;
continue;
} else if (dart.notNull(comp) < 0) {
a.set(k, a.get(less));
a.set(((x) => less = dart.notNull(x$) + 1, x$)(less), a.get(great));
a.set(((x) => great = dart.notNull(x$) - 1, x$)(great), ak);
a.set(((x) => less = dart.notNull(x) + 1, x)(less), a.get(great));
a.set(((x) => great = dart.notNull(x) - 1, x)(great), ak);
break;
} else {
a.set(k, a.get(great));
a.set(((x) => great = dart.notNull(x$) - 1, x$)(great), ak);
a.set(((x) => great = dart.notNull(x) - 1, x)(great), ak);
break;
}
}
Expand Down Expand Up @@ -1695,11 +1695,11 @@ var _internal;
comp = dart.dinvokef(compare, a.get(great), pivot1);
if (dart.notNull(comp) < 0) {
a.set(k, a.get(less));
a.set(((x) => less = dart.notNull(x$) + 1, x$)(less), a.get(great));
a.set(((x) => great = dart.notNull(x$) - 1, x$)(great), ak);
a.set(((x) => less = dart.notNull(x) + 1, x)(less), a.get(great));
a.set(((x) => great = dart.notNull(x) - 1, x)(great), ak);
} else {
a.set(k, a.get(great));
a.set(((x) => great = dart.notNull(x$) - 1, x$)(great), ak);
a.set(((x) => great = dart.notNull(x) - 1, x)(great), ak);
}
break;
}
Expand Down Expand Up @@ -1747,11 +1747,11 @@ var _internal;
comp = dart.dinvokef(compare, a.get(great), pivot1);
if (dart.notNull(comp) < 0) {
a.set(k, a.get(less));
a.set(((x) => less = dart.notNull(x$) + 1, x$)(less), a.get(great));
a.set(((x) => great = dart.notNull(x$) - 1, x$)(great), ak);
a.set(((x) => less = dart.notNull(x) + 1, x)(less), a.get(great));
a.set(((x) => great = dart.notNull(x) - 1, x)(great), ak);
} else {
a.set(k, a.get(great));
a.set(((x) => great = dart.notNull(x$) - 1, x$)(great), ak);
a.set(((x) => great = dart.notNull(x) - 1, x)(great), ak);
}
break;
}
Expand Down
8 changes: 4 additions & 4 deletions pkg/dev_compiler/lib/runtime/dart/_isolate_helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ var _isolate_helper;
let _addRegistration = Symbol('_addRegistration');
class _IsolateContext extends core.Object {
_IsolateContext() {
this.id = ((x) => exports._globalState.nextIsolateId = dart.notNull(x$) + 1, x$).bind(this)(exports._globalState.nextIsolateId);
this.id = ((x$) => exports._globalState.nextIsolateId = dart.notNull(x$) + 1, x$).bind(this)(exports._globalState.nextIsolateId);
this.ports = new core.Map();
this.weakPorts = new core.Set();
this.isolateStatics = _foreign_helper.JS_CREATE_ISOLATE();
Expand Down Expand Up @@ -1025,7 +1025,7 @@ var _isolate_helper;
};
}(_foreign_helper.DART_CLOSURE_TO_JS(_processWorkerMessage), worker);
worker.onmessage = processWorkerMessageTrampoline;
let workerId = ((x) => exports._globalState.nextManagerId = dart.notNull(x$) + 1, x$).bind(this)(exports._globalState.nextManagerId);
let workerId = ((x$) => exports._globalState.nextManagerId = dart.notNull(x$) + 1, x$).bind(this)(exports._globalState.nextManagerId);
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})));
Expand Down Expand Up @@ -1123,13 +1123,13 @@ var _isolate_helper;
class RawReceivePortImpl extends core.Object {
RawReceivePortImpl(handler) {
this[_handler] = handler;
this[_id] = ((x) => _nextFreeId = dart.notNull(x$) + 1, x$)(_nextFreeId);
this[_id] = ((x$) => _nextFreeId = dart.notNull(x$) + 1, x$)(_nextFreeId);
this[_isClosed] = false;
exports._globalState.currentContext.register(this[_id], this);
}
RawReceivePortImpl$weak(handler) {
this[_handler] = handler;
this[_id] = ((x) => _nextFreeId = dart.notNull(x$) + 1, x$)(_nextFreeId);
this[_id] = ((x$) => _nextFreeId = dart.notNull(x$) + 1, x$)(_nextFreeId);
this[_isClosed] = false;
exports._globalState.currentContext.registerWeak(this[_id], this);
}
Expand Down
16 changes: 8 additions & 8 deletions pkg/dev_compiler/lib/runtime/dart/_js_helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -1674,7 +1674,7 @@ var _js_helper;
_$.sort();
return _$;
}).bind(this)(positions.keys.toList()).forEach(((name) => {
this.cachedSortedIndices.set(((x) => index = dart.notNull(x$) + 1, x$)(index), positions.get(name));
this.cachedSortedIndices.set(((x$) => index = dart.notNull(x$) + 1, x$)(index), positions.get(name));
}).bind(this));
}
return dart.as(this.cachedSortedIndices.get(unsortedIndex), core.int);
Expand Down Expand Up @@ -2518,8 +2518,8 @@ var _js_helper;
let index = 0;
let length = getLength(keyValuePairs);
while (dart.notNull(index) < dart.notNull(length)) {
let key = getIndex(keyValuePairs, ((x) => index = dart.notNull(x$) + 1, x$)(index));
let value = getIndex(keyValuePairs, ((x) => index = dart.notNull(x$) + 1, x$)(index));
let key = getIndex(keyValuePairs, ((x$) => index = dart.notNull(x$) + 1, x$)(index));
let value = getIndex(keyValuePairs, ((x$) => index = dart.notNull(x$) + 1, x$)(index));
result.set(key, value);
}
return result;
Expand Down Expand Up @@ -2575,7 +2575,7 @@ var _js_helper;
this.$initialize();
} : isCsp ? function(a, b, c, d) {
this.$initialize(a, b, c, d);
} : new Function("a", "b", "c", "d", "this.$initialize(a,b,c,d);" + ((x) => functionCounter = dart.notNull(x$) + 1, x$)(functionCounter));
} : new Function("a", "b", "c", "d", "this.$initialize(a,b,c,d);" + ((x$) => functionCounter = dart.notNull(x$) + 1, x$)(functionCounter));
prototype.constructor = constructor;
constructor.prototype = prototype;
let trampoline = func;
Expand Down Expand Up @@ -2682,11 +2682,11 @@ var _js_helper;
return cspForwardCall(arity, isSuperCall, stubName, func);
}
if (arity === 0) {
return new Function('return function(){' + `return this.${BoundClosure.selfFieldName()}.${stubName}();` + `${((x) => functionCounter = dart.notNull(x$) + 1, x$)(functionCounter)}` + '}')();
return new Function('return function(){' + `return this.${BoundClosure.selfFieldName()}.${stubName}();` + `${((x$) => functionCounter = dart.notNull(x$) + 1, x$)(functionCounter)}` + '}')();
}
dart.assert(1 <= dart.notNull(arity) && dart.notNull(arity) < 27);
let arguments = "abcdefghijklmnopqrstuvwxyz".split("").splice(0, arity).join(",");
return new Function(`return function(${arguments}){` + `return this.${BoundClosure.selfFieldName()}.${stubName}(${arguments});` + `${((x) => functionCounter = dart.notNull(x$) + 1, x$)(functionCounter)}` + '}')();
return new Function(`return function(${arguments}){` + `return this.${BoundClosure.selfFieldName()}.${stubName}(${arguments});` + `${((x$) => functionCounter = dart.notNull(x$) + 1, x$)(functionCounter)}` + '}')();
}
static cspForwardInterceptedCall(arity, isSuperCall, name, func) {
let getSelf = _foreign_helper.RAW_DART_FUNCTION_REF(BoundClosure.selfOf);
Expand Down Expand Up @@ -2754,11 +2754,11 @@ var _js_helper;
return cspForwardInterceptedCall(arity, isSuperCall, stubName, func);
}
if (arity === 1) {
return new Function('return function(){' + `return this.${selfField}.${stubName}(this.${receiverField});` + `${((x) => functionCounter = dart.notNull(x$) + 1, x$)(functionCounter)}` + '}')();
return new Function('return function(){' + `return this.${selfField}.${stubName}(this.${receiverField});` + `${((x$) => functionCounter = dart.notNull(x$) + 1, x$)(functionCounter)}` + '}')();
}
dart.assert(1 < dart.notNull(arity) && dart.notNull(arity) < 28);
let arguments = "abcdefghijklmnopqrstuvwxyz".split("").splice(0, dart.notNull(arity) - 1).join(",");
return new Function(`return function(${arguments}){` + `return this.${selfField}.${stubName}(this.${receiverField}, ${arguments});` + `${((x) => functionCounter = dart.notNull(x$) + 1, x$)(functionCounter)}` + '}')();
return new Function(`return function(${arguments}){` + `return this.${selfField}.${stubName}(this.${receiverField}, ${arguments});` + `${((x$) => functionCounter = dart.notNull(x$) + 1, x$)(functionCounter)}` + '}')();
}
toString() {
return "Closure";
Expand Down
4 changes: 2 additions & 2 deletions pkg/dev_compiler/lib/runtime/dart/async.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ var async;
// Function sendEvent: () → void
function sendEvent() {
watch.reset();
let data = computation(((x) => computationCount = dart.notNull(x$) + 1, x$)(computationCount));
let data = computation(((x) => computationCount = dart.notNull(x) + 1, x)(computationCount));
controller.add(data);
}
// Function startPeriodicTimer: () → void
Expand Down Expand Up @@ -1654,7 +1654,7 @@ var async;
}
}
for (let future of futures) {
let pos = ((x) => remaining = dart.notNull(x$) + 1, x$)(remaining);
let pos = ((x) => remaining = dart.notNull(x) + 1, x)(remaining);
future.then(((value) => {
remaining = dart.notNull(remaining) - 1;
if (values !== null) {
Expand Down
8 changes: 4 additions & 4 deletions pkg/dev_compiler/lib/runtime/dart/collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ var collection;
}).bind(this)(new core.List()) : new core.List(this.length);
let i = 0;
for (let element of this)
result.set(((x) => i = dart.notNull(x$) + 1, x$)(i), element);
result.set(((x$) => i = dart.notNull(x$) + 1, x$)(i), element);
return result;
}
map(f) {
Expand Down Expand Up @@ -1473,11 +1473,11 @@ var collection;
return result;
}
add(element) {
this.set(((x) => this.length = dart.notNull(x$) + 1, x$).bind(this)(this.length), element);
this.set(((x$) => this.length = dart.notNull(x$) + 1, x$).bind(this)(this.length), element);
}
addAll(iterable) {
for (let element of iterable) {
this.set(((x) => this.length = dart.notNull(x$) + 1, x$).bind(this)(this.length), element);
this.set(((x$) => this.length = dart.notNull(x$) + 1, x$).bind(this)(this.length), element);
}
}
remove(element) {
Expand Down Expand Up @@ -1707,7 +1707,7 @@ var collection;
this.setRange(index, dart.notNull(index) + dart.notNull(iterable.length), iterable);
} else {
for (let element of iterable) {
this.set(((x) => index = dart.notNull(x$) + 1, x$)(index), element);
this.set(((x$) => index = dart.notNull(x$) + 1, x$)(index), element);
}
}
}
Expand Down
30 changes: 15 additions & 15 deletions pkg/dev_compiler/lib/runtime/dart/convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -1185,7 +1185,7 @@ var convert;
this.buffer = new typed_data.Uint8List(this.bufferSize);
this.index = 0;
}
this.buffer.set(((x) => this.index = dart.notNull(x$) + 1, x$).bind(this)(this.index), byte);
this.buffer.set(((x$) => this.index = dart.notNull(x$) + 1, x$).bind(this)(this.index), byte);
}
}
class _JsonUtf8StringifierPretty extends dart.mixin(_JsonUtf8Stringifier, _JsonPrettyPrintMixin) {
Expand Down Expand Up @@ -1709,15 +1709,15 @@ var convert;
let rune = _combineSurrogatePair(leadingSurrogate, nextCodeUnit);
dart.assert(dart.notNull(rune) > dart.notNull(_THREE_BYTE_LIMIT));
dart.assert(dart.notNull(rune) <= dart.notNull(_FOUR_BYTE_LIMIT));
this[_buffer].set(((x) => this[_bufferIndex] = dart.notNull(x$) + 1, x$).bind(this)(this[_bufferIndex]), 240 | dart.notNull(rune) >> 18);
this[_buffer].set(((x) => this[_bufferIndex] = dart.notNull(x$) + 1, x$).bind(this)(this[_bufferIndex]), 128 | dart.notNull(rune) >> 12 & 63);
this[_buffer].set(((x) => this[_bufferIndex] = dart.notNull(x$) + 1, x$).bind(this)(this[_bufferIndex]), 128 | dart.notNull(rune) >> 6 & 63);
this[_buffer].set(((x) => this[_bufferIndex] = dart.notNull(x$) + 1, x$).bind(this)(this[_bufferIndex]), 128 | dart.notNull(rune) & 63);
this[_buffer].set(((x$) => this[_bufferIndex] = dart.notNull(x$) + 1, x$).bind(this)(this[_bufferIndex]), 240 | dart.notNull(rune) >> 18);
this[_buffer].set(((x$) => this[_bufferIndex] = dart.notNull(x$) + 1, x$).bind(this)(this[_bufferIndex]), 128 | dart.notNull(rune) >> 12 & 63);
this[_buffer].set(((x$) => this[_bufferIndex] = dart.notNull(x$) + 1, x$).bind(this)(this[_bufferIndex]), 128 | dart.notNull(rune) >> 6 & 63);
this[_buffer].set(((x$) => this[_bufferIndex] = dart.notNull(x$) + 1, x$).bind(this)(this[_bufferIndex]), 128 | dart.notNull(rune) & 63);
return true;
} else {
this[_buffer].set(((x) => this[_bufferIndex] = dart.notNull(x$) + 1, x$).bind(this)(this[_bufferIndex]), 224 | dart.notNull(leadingSurrogate) >> 12);
this[_buffer].set(((x) => this[_bufferIndex] = dart.notNull(x$) + 1, x$).bind(this)(this[_bufferIndex]), 128 | dart.notNull(leadingSurrogate) >> 6 & 63);
this[_buffer].set(((x) => this[_bufferIndex] = dart.notNull(x$) + 1, x$).bind(this)(this[_bufferIndex]), 128 | dart.notNull(leadingSurrogate) & 63);
this[_buffer].set(((x$) => this[_bufferIndex] = dart.notNull(x$) + 1, x$).bind(this)(this[_bufferIndex]), 224 | dart.notNull(leadingSurrogate) >> 12);
this[_buffer].set(((x$) => this[_bufferIndex] = dart.notNull(x$) + 1, x$).bind(this)(this[_bufferIndex]), 128 | dart.notNull(leadingSurrogate) >> 6 & 63);
this[_buffer].set(((x$) => this[_bufferIndex] = dart.notNull(x$) + 1, x$).bind(this)(this[_bufferIndex]), 128 | dart.notNull(leadingSurrogate) & 63);
return false;
}
}
Expand All @@ -1731,7 +1731,7 @@ var convert;
if (dart.notNull(codeUnit) <= dart.notNull(_ONE_BYTE_LIMIT)) {
if (dart.notNull(this[_bufferIndex]) >= dart.notNull(this[_buffer].length))
break;
this[_buffer].set(((x) => this[_bufferIndex] = dart.notNull(x$) + 1, x$).bind(this)(this[_bufferIndex]), codeUnit);
this[_buffer].set(((x$) => this[_bufferIndex] = dart.notNull(x$) + 1, x$).bind(this)(this[_bufferIndex]), codeUnit);
} else if (_isLeadSurrogate(codeUnit)) {
if (dart.notNull(this[_bufferIndex]) + 3 >= dart.notNull(this[_buffer].length))
break;
Expand All @@ -1744,15 +1744,15 @@ var convert;
if (dart.notNull(rune) <= dart.notNull(_TWO_BYTE_LIMIT)) {
if (dart.notNull(this[_bufferIndex]) + 1 >= dart.notNull(this[_buffer].length))
break;
this[_buffer].set(((x) => this[_bufferIndex] = dart.notNull(x$) + 1, x$).bind(this)(this[_bufferIndex]), 192 | dart.notNull(rune) >> 6);
this[_buffer].set(((x) => this[_bufferIndex] = dart.notNull(x$) + 1, x$).bind(this)(this[_bufferIndex]), 128 | dart.notNull(rune) & 63);
this[_buffer].set(((x$) => this[_bufferIndex] = dart.notNull(x$) + 1, x$).bind(this)(this[_bufferIndex]), 192 | dart.notNull(rune) >> 6);
this[_buffer].set(((x$) => this[_bufferIndex] = dart.notNull(x$) + 1, x$).bind(this)(this[_bufferIndex]), 128 | dart.notNull(rune) & 63);
} else {
dart.assert(dart.notNull(rune) <= dart.notNull(_THREE_BYTE_LIMIT));
if (dart.notNull(this[_bufferIndex]) + 2 >= dart.notNull(this[_buffer].length))
break;
this[_buffer].set(((x) => this[_bufferIndex] = dart.notNull(x$) + 1, x$).bind(this)(this[_bufferIndex]), 224 | dart.notNull(rune) >> 12);
this[_buffer].set(((x) => this[_bufferIndex] = dart.notNull(x$) + 1, x$).bind(this)(this[_bufferIndex]), 128 | dart.notNull(rune) >> 6 & 63);
this[_buffer].set(((x) => this[_bufferIndex] = dart.notNull(x$) + 1, x$).bind(this)(this[_bufferIndex]), 128 | dart.notNull(rune) & 63);
this[_buffer].set(((x$) => this[_bufferIndex] = dart.notNull(x$) + 1, x$).bind(this)(this[_bufferIndex]), 224 | dart.notNull(rune) >> 12);
this[_buffer].set(((x$) => this[_bufferIndex] = dart.notNull(x$) + 1, x$).bind(this)(this[_bufferIndex]), 128 | dart.notNull(rune) >> 6 & 63);
this[_buffer].set(((x$) => this[_bufferIndex] = dart.notNull(x$) + 1, x$).bind(this)(this[_bufferIndex]), 128 | dart.notNull(rune) & 63);
}
}
}
Expand Down Expand Up @@ -1977,7 +1977,7 @@ var convert;
if (i === endIndex)
break;
}
let unit = codeUnits.get(((x) => i = dart.notNull(x$) + 1, x$)(i));
let unit = codeUnits.get(((x$) => i = dart.notNull(x$) + 1, x$)(i));
if (dart.notNull(unit) < 0) {
if (!dart.notNull(this[_allowMalformed])) {
throw new core.FormatException(`Negative UTF-8 code unit: -0x${(-dart.notNull(unit)).toRadixString(16)}`);
Expand Down
2 changes: 1 addition & 1 deletion pkg/dev_compiler/lib/runtime/dart/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,7 @@ var core;
[_getKey]() {
let key = dart.as(_js_helper.Primitives.getProperty(this, Expando._KEY_PROPERTY_NAME), String);
if (key === null) {
key = `expando$key$${((x) => _keyCount = dart.notNull(x$) + 1, x$)(_keyCount)}`;
key = `expando$key$${((x) => _keyCount = dart.notNull(x) + 1, x)(_keyCount)}`;
_js_helper.Primitives.setProperty(this, Expando._KEY_PROPERTY_NAME, key);
}
return key;
Expand Down
2 changes: 1 addition & 1 deletion pkg/dev_compiler/lib/src/codegen/js_codegen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1520,7 +1520,7 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor {

var bindThis = _maybeBindThis(expr);
return js.call("((#) => (#, #))$bindThis(#)", [
tmp.name,
_visit(tmp),
write,
_visit(tmp),
_visit(expr)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<html><head></head><body>
<script src="cached/c947f9f732203b97dd2882e63da78dbe/dev_compiler/runtime/harmony_feature_check.js"></script>
<script src="cached/4615119c209e4a6985a41cff7647d1c5/dev_compiler/runtime/dart_runtime.js"></script>
<script src="cached/c1f8bdd710eb9ba92315774d7a62d81b/dev_compiler/runtime/dart/core.js"></script>
<script src="cached/a0564d9ebc6f53577c10967588fb1ca5/dev_compiler/runtime/dart/core.js"></script>
<script src="cached/b846e240bec12226bbe7dcccfdd3fdf6/dev_compiler/runtime/dart/math.js"></script>
<script src="cached/c36af93826f645c97ae65b44badd998b/dev_compiler/runtime/messages_widget.js"></script>
<link rel="stylesheet" href="cached/307a7ef1e0cd0544d55c6f768f5e3886/dev_compiler/runtime/messages.css">
Expand Down

0 comments on commit 34e2fba

Please sign in to comment.