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

Side by Side 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 unified diff | Download patch
OLDNEW
1 var core = dart.defineLibrary(core, {}); 1 var core = dart.defineLibrary(core, {});
2 var _js_helper = dart.lazyImport(_js_helper); 2 var _js_helper = dart.lazyImport(_js_helper);
3 var _internal = dart.lazyImport(_internal); 3 var _internal = dart.lazyImport(_internal);
4 var collection = dart.lazyImport(collection); 4 var collection = dart.lazyImport(collection);
5 var _interceptors = dart.lazyImport(_interceptors); 5 var _interceptors = dart.lazyImport(_interceptors);
6 var math = dart.lazyImport(math); 6 var math = dart.lazyImport(math);
7 var convert = dart.lazyImport(convert); 7 var convert = dart.lazyImport(convert);
8 (function(exports, _js_helper, _internal, collection, _interceptors, math, conve rt) { 8 (function(exports, _js_helper, _internal, collection, _interceptors, math, conve rt) {
9 'use strict'; 9 'use strict';
10 class Object { 10 class Object {
(...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after
1066 if (this.message != null && "" != this.message) { 1066 if (this.message != null && "" != this.message) {
1067 report = `${report}: ${this.message}`; 1067 report = `${report}: ${this.message}`;
1068 } 1068 }
1069 let offset = this.offset; 1069 let offset = this.offset;
1070 if (!(typeof this.source == 'string')) { 1070 if (!(typeof this.source == 'string')) {
1071 if (offset != -1) { 1071 if (offset != -1) {
1072 report = dart.notNull(report) + ` (at offset ${offset})`; 1072 report = dart.notNull(report) + ` (at offset ${offset})`;
1073 } 1073 }
1074 return report; 1074 return report;
1075 } 1075 }
1076 if (offset != -1 && (dart.notNull(offset) < 0 || offset['>'](dart.dload(th is.source, 'length')))) { 1076 if (offset != -1 && (dart.notNull(offset) < 0 || dart.notNull(offset) > da rt.notNull(dart.as(dart.dload(this.source, 'length'), num)))) {
1077 offset = -1; 1077 offset = -1;
1078 } 1078 }
1079 if (offset == -1) { 1079 if (offset == -1) {
1080 let source = dart.as(this.source, String); 1080 let source = dart.as(this.source, String);
1081 if (dart.notNull(source.length) > 78) { 1081 if (dart.notNull(source.length) > 78) {
1082 source = dart.notNull(source.substring(0, 75)) + "..."; 1082 source = dart.notNull(source.substring(0, 75)) + "...";
1083 } 1083 }
1084 return `${report}\n${source}`; 1084 return `${report}\n${source}`;
1085 } 1085 }
1086 let lineNum = 1; 1086 let lineNum = 1;
(...skipping 12 matching lines...) Expand all
1099 lineStart = dart.notNull(i) + 1; 1099 lineStart = dart.notNull(i) + 1;
1100 lastWasCR = true; 1100 lastWasCR = true;
1101 } 1101 }
1102 } 1102 }
1103 if (dart.notNull(lineNum) > 1) { 1103 if (dart.notNull(lineNum) > 1) {
1104 report = dart.notNull(report) + ` (at line ${lineNum}, character ${dart. notNull(offset) - dart.notNull(lineStart) + 1})\n`; 1104 report = dart.notNull(report) + ` (at line ${lineNum}, character ${dart. notNull(offset) - dart.notNull(lineStart) + 1})\n`;
1105 } else { 1105 } else {
1106 report = dart.notNull(report) + ` (at character ${dart.notNull(offset) + 1})\n`; 1106 report = dart.notNull(report) + ` (at character ${dart.notNull(offset) + 1})\n`;
1107 } 1107 }
1108 let lineEnd = dart.as(dart.dload(this.source, 'length'), int); 1108 let lineEnd = dart.as(dart.dload(this.source, 'length'), int);
1109 for (let i = offset; i['<'](dart.dload(this.source, 'length')); i = dart.n otNull(i) + 1) { 1109 for (let i = offset; dart.notNull(i) < dart.notNull(dart.as(dart.dload(thi s.source, 'length'), num)); i = dart.notNull(i) + 1) {
1110 let char = dart.as(dart.dsend(this.source, 'codeUnitAt', i), int); 1110 let char = dart.as(dart.dsend(this.source, 'codeUnitAt', i), int);
1111 if (char == 10 || char == 13) { 1111 if (char == 10 || char == 13) {
1112 lineEnd = i; 1112 lineEnd = i;
1113 break; 1113 break;
1114 } 1114 }
1115 } 1115 }
1116 let length = dart.notNull(lineEnd) - dart.notNull(lineStart); 1116 let length = dart.notNull(lineEnd) - dart.notNull(lineStart);
1117 let start = lineStart; 1117 let start = lineStart;
1118 let end = lineEnd; 1118 let end = lineEnd;
1119 let prefix = ""; 1119 let prefix = "";
(...skipping 2704 matching lines...) Expand 10 before | Expand all | Expand 10 after
3824 exports.Stopwatch = Stopwatch; 3824 exports.Stopwatch = Stopwatch;
3825 exports.String = String; 3825 exports.String = String;
3826 exports.RuneIterator = RuneIterator; 3826 exports.RuneIterator = RuneIterator;
3827 exports.StringBuffer = StringBuffer; 3827 exports.StringBuffer = StringBuffer;
3828 exports.StringSink = StringSink; 3828 exports.StringSink = StringSink;
3829 exports.Symbol = Symbol; 3829 exports.Symbol = Symbol;
3830 exports.Type = Type; 3830 exports.Type = Type;
3831 exports.Uri = Uri; 3831 exports.Uri = Uri;
3832 exports.SupportJsExtensionMethods = SupportJsExtensionMethods; 3832 exports.SupportJsExtensionMethods = SupportJsExtensionMethods;
3833 })(core, _js_helper, _internal, collection, _interceptors, math, convert); 3833 })(core, _js_helper, _internal, collection, _interceptors, math, convert);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698