dart-sdk/tests/web/regress/private_names_lib2.dart
Johnni Winther 50ac2500a1 [dart2js] Handle private names correctly in K/J-model
The library wasn't taken into account when handling computing class
members in the K/J-model and not handled correctly when computing
applicable selectors. This made dart2js unable to handle members with
a name private to a different library than the enclosing library.

Fixes #33732
Fixes #49226

Change-Id: I5ba143d87662bbd42e0ff02355054e4a937be8f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252665
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2022-08-11 06:56:32 +00:00

25 lines
693 B
Dart

// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
// 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.
class DoubleLinkedQueueEntry<E> {
DoubleLinkedQueueEntry<E>? _previousLink;
DoubleLinkedQueueEntry<E>? _nextLink;
E element;
DoubleLinkedQueueEntry(this.element);
void _link(
DoubleLinkedQueueEntry<E>? previous, DoubleLinkedQueueEntry<E>? next) {
_nextLink = next;
_previousLink = previous;
previous?._nextLink = this;
next?._previousLink = this;
}
void prepend(E e) {
DoubleLinkedQueueEntry<E>(e)._link(_previousLink, this);
}
}