| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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.kernel.element_map; | 5 library dart2js.kernel.element_map; |
| 6 | 6 |
| 7 import 'package:kernel/ast.dart' as ir; | 7 import 'package:kernel/ast.dart' as ir; |
| 8 | 8 |
| 9 import '../common.dart'; | 9 import '../common.dart'; |
| 10 import '../common/names.dart' show Identifiers; | 10 import '../common/names.dart' show Identifiers; |
| (...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 ..isMixinApplication = false | 680 ..isMixinApplication = false |
| 681 ..thisType = | 681 ..thisType = |
| 682 closureData.rawType = new InterfaceType(cls, const/*<DartType>*/ []) | 682 closureData.rawType = new InterfaceType(cls, const/*<DartType>*/ []) |
| 683 ..supertype = supertype | 683 ..supertype = supertype |
| 684 ..interfaces = const <InterfaceType>[]; | 684 ..interfaces = const <InterfaceType>[]; |
| 685 var setBuilder = | 685 var setBuilder = |
| 686 new _KernelOrderedTypeSetBuilder((this as KernelToElementMapBase), cls); | 686 new _KernelOrderedTypeSetBuilder((this as KernelToElementMapBase), cls); |
| 687 _classData.add(closureData); | 687 _classData.add(closureData); |
| 688 closureData.orderedTypeSet = setBuilder.createOrderedTypeSet( | 688 closureData.orderedTypeSet = setBuilder.createOrderedTypeSet( |
| 689 closureData.supertype, const Link<InterfaceType>()); | 689 closureData.supertype, const Link<InterfaceType>()); |
| 690 | |
| 691 cls.forEachCapturedVariable((Local local, JField field) { | |
| 692 field.setClosureMemberIndex = _memberData.length; | |
| 693 // TODO(efortuna): Uncomment this line after Johnni's added in his CL | |
| 694 // about Class/MemberDefinition. | |
| 695 //_memberData.add(field); | |
| 696 }); | |
| 697 // TODO(efortuna): Does getMetadata get called in ClassData for this object? | 690 // TODO(efortuna): Does getMetadata get called in ClassData for this object? |
| 698 } | 691 } |
| 699 | 692 |
| 700 ClassEntity _getClass(ir.Class node, [ClassEnv classEnv]) { | 693 ClassEntity _getClass(ir.Class node, [ClassEnv classEnv]) { |
| 701 return _classMap.putIfAbsent(node, () { | 694 return _classMap.putIfAbsent(node, () { |
| 702 KLibrary library = _getLibrary(node.enclosingLibrary); | 695 KLibrary library = _getLibrary(node.enclosingLibrary); |
| 703 if (classEnv == null) { | 696 if (classEnv == null) { |
| 704 classEnv = _libraryEnvs[library.libraryIndex].lookupClass(node.name); | 697 classEnv = _libraryEnvs[library.libraryIndex].lookupClass(node.name); |
| 705 } | 698 } |
| 706 _classEnvs.add(classEnv); | 699 _classEnvs.add(classEnv); |
| (...skipping 1306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2013 if (data.constructorBody != null) { | 2006 if (data.constructorBody != null) { |
| 2014 f(data.constructorBody); | 2007 f(data.constructorBody); |
| 2015 } | 2008 } |
| 2016 }); | 2009 }); |
| 2017 } | 2010 } |
| 2018 | 2011 |
| 2019 String getDeferredUri(ir.LibraryDependency node) { | 2012 String getDeferredUri(ir.LibraryDependency node) { |
| 2020 throw new UnimplementedError('JsKernelToElementMap.getDeferredUri'); | 2013 throw new UnimplementedError('JsKernelToElementMap.getDeferredUri'); |
| 2021 } | 2014 } |
| 2022 } | 2015 } |
| OLD | NEW |