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

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

Issue 1137543005: Type check binary expressions (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Rebase and remove assert Created 5 years, 7 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/_js_helper.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart/_interceptors.js
diff --git a/lib/runtime/dart/_interceptors.js b/lib/runtime/dart/_interceptors.js
index eae9f75af124538611e270217521f74c04db14bf..2d3a82c0125acc8b88b3ca1fb22e687c8af5d725 100644
--- a/lib/runtime/dart/_interceptors.js
+++ b/lib/runtime/dart/_interceptors.js
@@ -446,8 +446,8 @@ var _js_embedded_names = dart.import(_js_embedded_names);
}
static _bitCount(i) {
i = dart.as(dart.dsend(JSInt._shru(i, 0), '-', dart.dsend(JSInt._shru(i, 1), '&', 1431655765)), core.int);
- i = (dart.notNull(i) & 858993459)['+'](dart.dsend(JSInt._shru(i, 2), '&', 858993459));
- i = 252645135 & i['+'](JSInt._shru(i, 4));
+ i = (dart.notNull(i) & 858993459)['+'](dart.as(dart.dsend(JSInt._shru(i, 2), '&', 858993459), core.num));
+ i = 252645135 & dart.notNull(dart.notNull(i) + dart.notNull(dart.as(JSInt._shru(i, 4), core.num)));
Leaf 2015/05/20 16:13:22 Ugly. Do we really not know the type of _shru?
vsm 2015/05/20 16:39:10 It's declared dynamic for some reason. Addressing
i = dart.notNull(i) + dart.notNull(dart.as(JSInt._shru(i, 8), core.int));
i = dart.notNull(i) + dart.notNull(dart.as(JSInt._shru(i, 16), core.int));
return dart.notNull(i) & 63;
« no previous file with comments | « no previous file | lib/runtime/dart/_js_helper.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698