| 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 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 new Selector.call(const PublicName('validated'), CallStructure.ONE_ARG); | 434 new Selector.call(const PublicName('validated'), CallStructure.ONE_ARG); |
| 435 | 435 |
| 436 ConstructorEntity get symbolValidatedConstructor => | 436 ConstructorEntity get symbolValidatedConstructor => |
| 437 _symbolValidatedConstructor ??= _findConstructor( | 437 _symbolValidatedConstructor ??= _findConstructor( |
| 438 symbolImplementationClass, symbolValidatedConstructorSelector.name); | 438 symbolImplementationClass, symbolValidatedConstructorSelector.name); |
| 439 | 439 |
| 440 ClassEntity _symbolImplementationClass; | 440 ClassEntity _symbolImplementationClass; |
| 441 ClassEntity get symbolImplementationClass => | 441 ClassEntity get symbolImplementationClass => |
| 442 _symbolImplementationClass ??= _findClass(internalLibrary, 'Symbol'); | 442 _symbolImplementationClass ??= _findClass(internalLibrary, 'Symbol'); |
| 443 | 443 |
| 444 FieldEntity _symbolImplementationField; |
| 445 |
| 446 /// Returns the field that holds the internal name in the implementation class |
| 447 /// for `Symbol`. |
| 448 FieldEntity get symbolImplementationField => _symbolImplementationField ??= |
| 449 _env.lookupClassMember(symbolImplementationClass, '_name', |
| 450 required: true); |
| 451 |
| 444 ConstructorEntity _symbolValidatedConstructor; | 452 ConstructorEntity _symbolValidatedConstructor; |
| 445 | 453 |
| 446 bool isSymbolValidatedConstructor(ConstructorEntity element) { | 454 bool isSymbolValidatedConstructor(ConstructorEntity element) { |
| 447 if (_symbolValidatedConstructor != null) { | 455 if (_symbolValidatedConstructor != null) { |
| 448 return element == _symbolValidatedConstructor; | 456 return element == _symbolValidatedConstructor; |
| 449 } | 457 } |
| 450 return false; | 458 return false; |
| 451 } | 459 } |
| 452 | 460 |
| 453 ConstructorEntity _mapLiteralConstructor; | 461 ConstructorEntity _mapLiteralConstructor; |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 780 ClassEntity get annotationReturnsClass => _findHelperClass('Returns'); | 788 ClassEntity get annotationReturnsClass => _findHelperClass('Returns'); |
| 781 | 789 |
| 782 ClassEntity get annotationJSNameClass => _findHelperClass('JSName'); | 790 ClassEntity get annotationJSNameClass => _findHelperClass('JSName'); |
| 783 | 791 |
| 784 FunctionEntity get toStringForNativeObject => | 792 FunctionEntity get toStringForNativeObject => |
| 785 _findHelperFunction('toStringForNativeObject'); | 793 _findHelperFunction('toStringForNativeObject'); |
| 786 | 794 |
| 787 FunctionEntity get hashCodeForNativeObject => | 795 FunctionEntity get hashCodeForNativeObject => |
| 788 _findHelperFunction('hashCodeForNativeObject'); | 796 _findHelperFunction('hashCodeForNativeObject'); |
| 789 } | 797 } |
| OLD | NEW |