8dea42e4e7
Change-Id: I8312642ba80176c7c298bebce82005be0a3a07b0 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267141 Reviewed-by: Sigmund Cherem <sigmund@google.com> Commit-Queue: Nate Biggs <natebiggs@google.com>
34 lines
1.1 KiB
Dart
34 lines
1.1 KiB
Dart
// Copyright (c) 2017, 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.
|
|
|
|
// TODO(joshualitt): Merge the contents of element_map_impl.dart into this file.
|
|
export 'element_map_impl.dart';
|
|
import 'package:kernel/ast.dart' as ir;
|
|
|
|
/// Kinds of foreign functions.
|
|
enum ForeignKind {
|
|
JS,
|
|
JS_BUILTIN,
|
|
JS_EMBEDDED_GLOBAL,
|
|
JS_INTERCEPTOR_CONSTANT,
|
|
NONE,
|
|
}
|
|
|
|
// Members which dart2js ignores.
|
|
bool memberIsIgnorable(ir.Member node, {ir.Class? cls}) {
|
|
if (node is! ir.Procedure) return false;
|
|
ir.Procedure member = node;
|
|
switch (member.stubKind) {
|
|
case ir.ProcedureStubKind.Regular:
|
|
case ir.ProcedureStubKind.ConcreteForwardingStub:
|
|
case ir.ProcedureStubKind.NoSuchMethodForwarder:
|
|
return false;
|
|
case ir.ProcedureStubKind.AbstractForwardingStub:
|
|
case ir.ProcedureStubKind.MemberSignature:
|
|
case ir.ProcedureStubKind.AbstractMixinStub:
|
|
case ir.ProcedureStubKind.ConcreteMixinStub:
|
|
return true;
|
|
}
|
|
}
|