Files
sdk/pkg/kernel/lib/transformations/flags.dart
T
Asger Feldthaus 8f12489839 Add --verify-ir flag to dartk and test.py.
This replaces the old --sanity-check flag from dartk. Some files have
been renamed to avoid the wording "sanity check".

Compared to --sanity-check, the following checks have been added:
- variables are not referenced out of scope
- variables are not redeclared
- class type parameters are not referenced from static context

A unit test has been added to check that the verifier rejects certain
invalid ASTs.

BUG=
R=kmillikin@google.com

Review URL: https://codereview.chromium.org/2531873002 .
2016-11-28 12:21:19 +01:00

22 lines
757 B
Dart

library kernel.transformations.flags;
import '../ast.dart';
/// Flags summarizing the kinds of AST nodes contained in a given member or
/// class, for speeding up transformations that only affect certain types of
/// nodes.
///
/// These are set by the frontend and the deserializer.
class TransformerFlag {
/// The class or member contains 'super' calls, that is, one of the AST nodes
/// [SuperPropertyGet], [SuperPropertySet], [SuperMethodInvocation].
static const int superCalls = 1 << 0;
/// Temporary flag used by the verifier to indicate that the given member
/// has been seen.
static const int seenByVerifier = 1 << 1;
// TODO(asgerf): We could also add a flag for 'async' and will probably have
// one for closures as well.
}