| Index: pkg/compiler/lib/src/resolution/secret_tree_element.dart
|
| diff --git a/pkg/compiler/lib/src/resolution/secret_tree_element.dart b/pkg/compiler/lib/src/resolution/secret_tree_element.dart
|
| index 635ffe77b648865ba6f613b5c760344e2207a472..9b118a65af613e22dac85bf6e4cf7e468aca0848 100644
|
| --- a/pkg/compiler/lib/src/resolution/secret_tree_element.dart
|
| +++ b/pkg/compiler/lib/src/resolution/secret_tree_element.dart
|
| @@ -2,65 +2,11 @@
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| -/**
|
| - * Encapsulates the field [TreeElementMixin._element].
|
| - *
|
| - * This library is an implementation detail of dart2js, and should not
|
| - * be imported except by resolution and tree node libraries, or for
|
| - * testing.
|
| - *
|
| - * We have taken great care to ensure AST nodes can be cached between
|
| - * compiler instances. Part of this requires that we always access
|
| - * resolution results through TreeElements.
|
| - *
|
| - * So please, do not add additional elements to this library, and do
|
| - * not import it.
|
| - */
|
| library dart2js.resolution.secret_tree_element;
|
|
|
| -import '../common.dart';
|
| +// The code in this library was moved to ../tree/nodes.dart to satisfy extra
|
| +// restrictions on overriding private members.
|
| +//
|
| +// [See issue for more details](https://github.com/dart-lang/sdk/issues/28809).
|
|
|
| -/// Interface for associating
|
| -abstract class TreeElementMixin {
|
| - Object get _element;
|
| - void set _element(Object value);
|
| -}
|
| -
|
| -/// Null implementation of [TreeElementMixin] which does not allow association
|
| -/// of elements.
|
| -///
|
| -/// This class is the superclass of all AST nodes.
|
| -abstract class NullTreeElementMixin implements TreeElementMixin, Spannable {
|
| - // Deliberately using [Object] here to thwart code completion.
|
| - // You're not really supposed to access this field anyways.
|
| - Object get _element => null;
|
| - set _element(_) {
|
| - assert(invariant(this, false,
|
| - message: "Elements cannot be associated with ${runtimeType}."));
|
| - }
|
| -}
|
| -
|
| -/// Actual implementation of [TreeElementMixin] which stores the associated
|
| -/// element in the private field [_element].
|
| -///
|
| -/// This class is mixed into the node classes that are actually associated with
|
| -/// elements.
|
| -abstract class StoredTreeElementMixin implements TreeElementMixin {
|
| - Object _element;
|
| -}
|
| -
|
| -/**
|
| - * Do not call this method directly. Instead, use an instance of
|
| - * TreeElements.
|
| - *
|
| - * Using [Object] as return type to thwart code completion.
|
| - */
|
| -Object getTreeElement(TreeElementMixin node) => node._element;
|
| -
|
| -/**
|
| - * Do not call this method directly. Instead, use an instance of
|
| - * TreeElements.
|
| - */
|
| -void setTreeElement(TreeElementMixin node, Object value) {
|
| - node._element = value;
|
| -}
|
| +export '../tree/nodes.dart' show getTreeElement, setTreeElement;
|
|
|