Files
sdk/pkg/compiler/lib/src/environment.dart
T
Johnni Winther 9c9ab11450 Reland "Handle ir constants in field analysis and impact tests"
Include initial handling of unevaluated constants from environment.

Change-Id: I288801b42a9e25e440baa3eac9ce88263acea0a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97241
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Auto-Submit: Johnni Winther <johnniwinther@google.com>
2019-03-18 17:57:55 +00:00

20 lines
784 B
Dart

// Copyright (c) 2016, 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.
/// Collects definitions provided to the compiler via the `-D` flag.
///
/// Environment variables can be used in the user code in two ways. From
/// conditional imports, and from `const String.fromEnvironment` and
/// other similar constructors.
abstract class Environment {
/// Return the string value of the given key.
///
/// Note that `bool.fromEnvironment` and `int.fromEnvironment` are also
/// implemented in terms of `String.fromEnvironment`.
String valueOf(String key);
/// Returns the full environment as map.
Map<String, String> toMap();
}