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

Side by Side Diff: pkg/compiler/lib/src/js_backend/backend_helpers.dart

Issue 2603263002: Prefix resolution_types with Resolution. (Closed)
Patch Set: Rebased Created 3 years, 11 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 dart2js.js_backend.helpers; 5 library dart2js.js_backend.helpers;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../common/names.dart' show Identifiers, Uris; 8 import '../common/names.dart' show Identifiers, Uris;
9 import '../common/resolution.dart' show Resolution; 9 import '../common/resolution.dart' show Resolution;
10 import '../compiler.dart' show Compiler; 10 import '../compiler.dart' show Compiler;
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 } 196 }
197 return false; 197 return false;
198 } 198 }
199 199
200 ConstructorElement get symbolValidatedConstructor { 200 ConstructorElement get symbolValidatedConstructor {
201 return _symbolValidatedConstructor ??= _findConstructor( 201 return _symbolValidatedConstructor ??= _findConstructor(
202 symbolImplementationClass, symbolValidatedConstructorSelector.name); 202 symbolImplementationClass, symbolValidatedConstructorSelector.name);
203 } 203 }
204 204
205 // TODO(johnniwinther): Make these private. 205 // TODO(johnniwinther): Make these private.
206 // TODO(johnniwinther): Split into _findHelperFunction and _findHelperClass an d 206 // TODO(johnniwinther): Split into _findHelperFunction and _findHelperClass
207 // add a check that the element has the expected kind. 207 // and add a check that the element has the expected kind.
208 Element _findHelper(String name) => _find(jsHelperLibrary, name); 208 Element _findHelper(String name) => _find(jsHelperLibrary, name);
209 FunctionElement _findHelperFunction(String name) => 209 FunctionElement _findHelperFunction(String name) =>
210 _find(jsHelperLibrary, name); 210 _find(jsHelperLibrary, name);
211 Element _findAsyncHelper(String name) => _find(asyncLibrary, name); 211 Element _findAsyncHelper(String name) => _find(asyncLibrary, name);
212 Element _findInterceptor(String name) => _find(interceptorsLibrary, name); 212 Element _findInterceptor(String name) => _find(interceptorsLibrary, name);
213 Element _find(LibraryElement library, String name) { 213 Element _find(LibraryElement library, String name) {
214 Element element = library.implementation.findLocal(name); 214 Element element = library.implementation.findLocal(name);
215 assert(invariant(library, element != null, 215 assert(invariant(library, element != null,
216 message: "Element '$name' not found in '${library.canonicalUri}'.")); 216 message: "Element '$name' not found in '${library.canonicalUri}'."));
217 return element; 217 return element;
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after
866 } 866 }
867 867
868 MethodElement get toStringForNativeObject { 868 MethodElement get toStringForNativeObject {
869 return _findHelper('toStringForNativeObject'); 869 return _findHelper('toStringForNativeObject');
870 } 870 }
871 871
872 MethodElement get hashCodeForNativeObject { 872 MethodElement get hashCodeForNativeObject {
873 return _findHelper('hashCodeForNativeObject'); 873 return _findHelper('hashCodeForNativeObject');
874 } 874 }
875 } 875 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | pkg/compiler/lib/src/js_backend/backend_impact.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698