Chromium Code Reviews| 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 //_memberData.add(field); | |
|
Emily Fortuna
2017/07/19 00:10:30
This line is commented out because executing it ca
Johnni Winther
2017/07/19 10:47:12
The need for the J-equivalent of ResolvedAst came
| |
| 694 }); | |
| 690 // TODO(efortuna): Does getMetadata get called in ClassData for this object? | 695 // TODO(efortuna): Does getMetadata get called in ClassData for this object? |
| 691 } | 696 } |
| 692 | 697 |
| 693 ClassEntity _getClass(ir.Class node, [ClassEnv classEnv]) { | 698 ClassEntity _getClass(ir.Class node, [ClassEnv classEnv]) { |
| 694 return _classMap.putIfAbsent(node, () { | 699 return _classMap.putIfAbsent(node, () { |
| 695 KLibrary library = _getLibrary(node.enclosingLibrary); | 700 KLibrary library = _getLibrary(node.enclosingLibrary); |
| 696 if (classEnv == null) { | 701 if (classEnv == null) { |
| 697 classEnv = _libraryEnvs[library.libraryIndex].lookupClass(node.name); | 702 classEnv = _libraryEnvs[library.libraryIndex].lookupClass(node.name); |
| 698 } | 703 } |
| 699 _classEnvs.add(classEnv); | 704 _classEnvs.add(classEnv); |
| (...skipping 1306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2006 if (data.constructorBody != null) { | 2011 if (data.constructorBody != null) { |
| 2007 f(data.constructorBody); | 2012 f(data.constructorBody); |
| 2008 } | 2013 } |
| 2009 }); | 2014 }); |
| 2010 } | 2015 } |
| 2011 | 2016 |
| 2012 String getDeferredUri(ir.LibraryDependency node) { | 2017 String getDeferredUri(ir.LibraryDependency node) { |
| 2013 throw new UnimplementedError('JsKernelToElementMap.getDeferredUri'); | 2018 throw new UnimplementedError('JsKernelToElementMap.getDeferredUri'); |
| 2014 } | 2019 } |
| 2015 } | 2020 } |
| OLD | NEW |