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

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

Issue 1413213004: Move remaining helpers to BackendHelpers (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 library compiler_helper; 5 library compiler_helper;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import "package:expect/expect.dart"; 8 import "package:expect/expect.dart";
9 9
10 import 'package:compiler/src/elements/elements.dart' 10 import 'package:compiler/src/elements/elements.dart'
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 var element = lib.find(name); 193 var element = lib.find(name);
194 Expect.isNotNull(element, 'Could not locate $name.'); 194 Expect.isNotNull(element, 'Could not locate $name.');
195 return element; 195 return element;
196 } 196 }
197 197
198 types.TypeMask findTypeMask(compiler, String name, 198 types.TypeMask findTypeMask(compiler, String name,
199 [String how = 'nonNullExact']) { 199 [String how = 'nonNullExact']) {
200 var sourceName = name; 200 var sourceName = name;
201 var element = compiler.mainApp.find(sourceName); 201 var element = compiler.mainApp.find(sourceName);
202 if (element == null) { 202 if (element == null) {
203 element = compiler.backend.interceptorsLibrary.find(sourceName); 203 element = compiler.backend.helpers.interceptorsLibrary.find(sourceName);
204 } 204 }
205 if (element == null) { 205 if (element == null) {
206 element = compiler.coreLibrary.find(sourceName); 206 element = compiler.coreLibrary.find(sourceName);
207 } 207 }
208 Expect.isNotNull(element, 'Could not locate $name'); 208 Expect.isNotNull(element, 'Could not locate $name');
209 switch (how) { 209 switch (how) {
210 case 'exact': 210 case 'exact':
211 return new types.TypeMask.exact(element, compiler.world); 211 return new types.TypeMask.exact(element, compiler.world);
212 case 'nonNullExact': 212 case 'nonNullExact':
213 return new types.TypeMask.nonNullExact(element, compiler.world); 213 return new types.TypeMask.nonNullExact(element, compiler.world);
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 regexp = regexp.replaceAll(xRe, '(?:$anyIdentifier)'); 280 regexp = regexp.replaceAll(xRe, '(?:$anyIdentifier)');
281 final spaceRe = new RegExp('\\s+'); 281 final spaceRe = new RegExp('\\s+');
282 regexp = regexp.replaceAll(spaceRe, '(?:\\s*)'); 282 regexp = regexp.replaceAll(spaceRe, '(?:\\s*)');
283 if (shouldMatch) { 283 if (shouldMatch) {
284 Expect.isTrue(new RegExp(regexp).hasMatch(generated)); 284 Expect.isTrue(new RegExp(regexp).hasMatch(generated));
285 } else { 285 } else {
286 Expect.isFalse(new RegExp(regexp).hasMatch(generated)); 286 Expect.isFalse(new RegExp(regexp).hasMatch(generated));
287 } 287 }
288 }); 288 });
289 } 289 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/value_range_analyzer.dart ('k') | tests/compiler/dart2js/field_type_simple_inferer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698