| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |