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

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

Issue 1069493002: implement opassign, fix bugs in pre/postfix, introduce a let* helper (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 | « lib/runtime/dart/isolate.js ('k') | lib/src/codegen/ast_builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart/math.js
diff --git a/lib/runtime/dart/math.js b/lib/runtime/dart/math.js
index 4f7b60acb2f451fc4d0ae4d309c7c34b1f2b68fe..ad6a382788c631272f5522865eea3cd80bf41e33 100644
--- a/lib/runtime/dart/math.js
+++ b/lib/runtime/dart/math.js
@@ -344,32 +344,32 @@ var math;
high = ~dart.notNull(high) + dart.notNull(tmphigh) + ((dart.notNull(tmplow) - dart.notNull(low)) / 4294967296).truncate() & dart.notNull(_Random[_MASK32]);
tmphigh = dart.notNull(high) >> 24;
tmplow = dart.notNull(low) >> 24 | dart.notNull(high) << 8;
- low = tmplow;
- high = tmphigh;
+ low = dart.notNull(low) ^ dart.notNull(tmplow);
+ high = dart.notNull(high) ^ dart.notNull(tmphigh);
tmplow = dart.notNull(low) * 265;
low = dart.notNull(tmplow) & dart.notNull(_Random[_MASK32]);
high = dart.notNull(high) * 265 + ((dart.notNull(tmplow) - dart.notNull(low)) / 4294967296).truncate() & dart.notNull(_Random[_MASK32]);
tmphigh = dart.notNull(high) >> 14;
tmplow = dart.notNull(low) >> 14 | dart.notNull(high) << 18;
- low = tmplow;
- high = tmphigh;
+ low = dart.notNull(low) ^ dart.notNull(tmplow);
+ high = dart.notNull(high) ^ dart.notNull(tmphigh);
tmplow = dart.notNull(low) * 21;
low = dart.notNull(tmplow) & dart.notNull(_Random[_MASK32]);
high = dart.notNull(high) * 21 + ((dart.notNull(tmplow) - dart.notNull(low)) / 4294967296).truncate() & dart.notNull(_Random[_MASK32]);
tmphigh = dart.notNull(high) >> 28;
tmplow = dart.notNull(low) >> 28 | dart.notNull(high) << 4;
- low = tmplow;
- high = tmphigh;
+ low = dart.notNull(low) ^ dart.notNull(tmplow);
+ high = dart.notNull(high) ^ dart.notNull(tmphigh);
tmplow = dart.notNull(low) << 31;
tmphigh = dart.notNull(high) << 31 | dart.notNull(low) >> 1;
- tmplow = low;
+ tmplow = dart.notNull(tmplow) + dart.notNull(low);
low = dart.notNull(tmplow) & dart.notNull(_Random[_MASK32]);
high = dart.notNull(high) + dart.notNull(tmphigh) + ((dart.notNull(tmplow) - dart.notNull(low)) / 4294967296).truncate() & dart.notNull(_Random[_MASK32]);
tmplow = dart.notNull(this[_lo]) * 1037;
this[_lo] = dart.notNull(tmplow) & dart.notNull(_Random[_MASK32]);
this[_hi] = dart.notNull(this[_hi]) * 1037 + ((dart.notNull(tmplow) - dart.notNull(this[_lo])) / 4294967296).truncate() & dart.notNull(_Random[_MASK32]);
- this[_lo] = low;
- this[_hi] = high;
+ this[_lo] = dart.notNull(this[_lo]) ^ dart.notNull(low);
+ this[_hi] = dart.notNull(this[_hi]) ^ dart.notNull(high);
} while (seed != empty_seed);
if (this[_hi] == 0 && this[_lo] == 0) {
this[_lo] = 23063;
« no previous file with comments | « lib/runtime/dart/isolate.js ('k') | lib/src/codegen/ast_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698