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

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

Issue 2680823002: Extract InterceptorData from JavaScriptBackend. (Closed)
Patch Set: Updated cf. comments Created 3 years, 10 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 '../compiler.dart' show Compiler; 9 import '../compiler.dart' show Compiler;
10 import '../core_types.dart' show CommonElements, ElementEnvironment; 10 import '../core_types.dart' show CommonElements, ElementEnvironment;
(...skipping 25 matching lines...) Expand all
36 static const String START_ROOT_ISOLATE = 'startRootIsolate'; 36 static const String START_ROOT_ISOLATE = 'startRootIsolate';
37 37
38 static const String JS = 'JS'; 38 static const String JS = 'JS';
39 static const String JS_BUILTIN = 'JS_BUILTIN'; 39 static const String JS_BUILTIN = 'JS_BUILTIN';
40 static const String JS_EMBEDDED_GLOBAL = 'JS_EMBEDDED_GLOBAL'; 40 static const String JS_EMBEDDED_GLOBAL = 'JS_EMBEDDED_GLOBAL';
41 static const String JS_INTERCEPTOR_CONSTANT = 'JS_INTERCEPTOR_CONSTANT'; 41 static const String JS_INTERCEPTOR_CONSTANT = 'JS_INTERCEPTOR_CONSTANT';
42 42
43 final ElementEnvironment _env; 43 final ElementEnvironment _env;
44 44
45 // TODO(johnniwinther): Remove this. 45 // TODO(johnniwinther): Remove this.
46 final JavaScriptBackend backend; 46 final JavaScriptBackend _backend;
47 47
48 final CommonElements commonElements; 48 final CommonElements commonElements;
49 49
50 BackendHelpers(this._env, this.backend, this.commonElements); 50 BackendHelpers(this._env, this._backend, this.commonElements);
51 51
52 ClassEntity _findInterceptorsClass(String name) => 52 ClassEntity _findInterceptorsClass(String name) =>
53 _findClass(interceptorsLibrary, name); 53 _findClass(interceptorsLibrary, name);
54 54
55 FunctionEntity _findInterceptorsFunction(String name) => 55 FunctionEntity _findInterceptorsFunction(String name) =>
56 _findLibraryMember(interceptorsLibrary, name); 56 _findLibraryMember(interceptorsLibrary, name);
57 57
58 ClassEntity _findHelperClass(String name) => 58 ClassEntity _findHelperClass(String name) =>
59 _findClass(jsHelperLibrary, name); 59 _findClass(jsHelperLibrary, name);
60 60
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 ClassEntity get annotationReturnsClass => _findHelperClass('Returns'); 780 ClassEntity get annotationReturnsClass => _findHelperClass('Returns');
781 781
782 ClassEntity get annotationJSNameClass => _findHelperClass('JSName'); 782 ClassEntity get annotationJSNameClass => _findHelperClass('JSName');
783 783
784 FunctionEntity get toStringForNativeObject => 784 FunctionEntity get toStringForNativeObject =>
785 _findHelperFunction('toStringForNativeObject'); 785 _findHelperFunction('toStringForNativeObject');
786 786
787 FunctionEntity get hashCodeForNativeObject => 787 FunctionEntity get hashCodeForNativeObject =>
788 _findHelperFunction('hashCodeForNativeObject'); 788 _findHelperFunction('hashCodeForNativeObject');
789 } 789 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | pkg/compiler/lib/src/js_backend/custom_elements_analysis.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698