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

Side by Side Diff: tests/compiler/dart2js/source_map_validator_helper.dart

Issue 2944843002: All strong mode cleaning of dart2js. (Closed)
Patch Set: More issues discovered during testing. Created 3 years, 6 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 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:io'; 5 import 'dart:io';
6 import 'dart:convert'; 6 import 'dart:convert';
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:path/path.dart' as path; 9 import 'package:path/path.dart' as path;
10 import 'package:expect/expect.dart'; 10 import 'package:expect/expect.dart';
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 if (interval != null && 167 if (interval != null &&
168 interval.contains(sourcePosition) && 168 interval.contains(sourcePosition) &&
169 isInsideElement(localFunction)) { 169 isInsideElement(localFunction)) {
170 element = localFunction; 170 element = localFunction;
171 } 171 }
172 }); 172 });
173 } 173 }
174 return element; 174 return element;
175 } 175 }
176 176
177 void match(AstElement element) { 177 void match(Element _element) {
178 AstElement element = _element;
178 Interval interval = intervalFromElement(element); 179 Interval interval = intervalFromElement(element);
179 if (interval != null && interval.contains(sourcePosition)) { 180 if (interval != null && interval.contains(sourcePosition)) {
180 AstElement innerElement = findInnermost(element); 181 AstElement innerElement = findInnermost(element);
181 String expectedName = computeElementNameForSourceMaps(innerElement); 182 String expectedName = computeElementNameForSourceMaps(innerElement);
182 if (name != expectedName) { 183 if (name != expectedName) {
183 // For the code 184 // For the code
184 // (){}(); 185 // (){}();
185 // ^ 186 // ^
186 // the indicated position is within the scope of the local 187 // the indicated position is within the scope of the local
187 // function but it is also the position for the invocation of it. 188 // function but it is also the position for the invocation of it.
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 final Position end; 318 final Position end;
318 319
319 Interval(this.begin, this.end); 320 Interval(this.begin, this.end);
320 321
321 bool contains(Position other) { 322 bool contains(Position other) {
322 return begin <= other && other <= end; 323 return begin <= other && other <= end;
323 } 324 }
324 325
325 String toString() => '$begin-$end'; 326 String toString() => '$begin-$end';
326 } 327 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/simple_inferrer_test.dart ('k') | tests/compiler/dart2js/sourcemaps/data/invokes_test_file.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698