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

Unified Diff: lib/runtime/dart/core.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
Index: lib/runtime/dart/core.js
diff --git a/lib/runtime/dart/core.js b/lib/runtime/dart/core.js
index c2aae7f86066353763dd05c25554816c09c99408..0b3ca2418ff9b3de563d85e7ee69c2b3032ee7d9 100644
--- a/lib/runtime/dart/core.js
+++ b/lib/runtime/dart/core.js
@@ -1073,7 +1073,7 @@ var convert = dart.lazyImport(convert);
}
return report;
}
- if (offset != -1 && (dart.notNull(offset) < 0 || offset['>'](dart.dload(this.source, 'length')))) {
+ if (offset != -1 && (dart.notNull(offset) < 0 || dart.notNull(offset) > dart.notNull(dart.as(dart.dload(this.source, 'length'), num)))) {
offset = -1;
}
if (offset == -1) {
@@ -1106,7 +1106,7 @@ var convert = dart.lazyImport(convert);
report = dart.notNull(report) + ` (at character ${dart.notNull(offset) + 1})\n`;
}
let lineEnd = dart.as(dart.dload(this.source, 'length'), int);
- for (let i = offset; i['<'](dart.dload(this.source, 'length')); i = dart.notNull(i) + 1) {
+ for (let i = offset; dart.notNull(i) < dart.notNull(dart.as(dart.dload(this.source, 'length'), num)); i = dart.notNull(i) + 1) {
let char = dart.as(dart.dsend(this.source, 'codeUnitAt', i), int);
if (char == 10 || char == 13) {
lineEnd = i;

Powered by Google App Engine
This is Rietveld 408576698