9443e248ee
Update the golden for a front_end test which adds additional constant evaluation information now that the experiment is enabled. A co19 test will start failing. https://github.com/dart-lang/co19/issues/1062 Change-Id: I18ec586f57deda83f6cd75e476137ab75d50a92f TEST=No new tests. Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193747 Auto-Submit: Nate Bosch <nbosch@google.com> Commit-Queue: Nate Bosch <nbosch@google.com> Reviewed-by: Leaf Petersen <leafp@google.com>
39 lines
1.3 KiB
C++
39 lines
1.3 KiB
C++
// Copyright (c) 2020, 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.
|
|
// NOTE: THIS FILE IS GENERATED. DO NOT EDIT.
|
|
//
|
|
// Instead modify 'tools/experimental_features.yaml' and run
|
|
// 'dart tools/generate_experimental_flags.dart' to update.
|
|
//
|
|
// Current version: 2.14.0
|
|
|
|
#include "vm/experimental_features.h"
|
|
|
|
#include <cstring>
|
|
#include "platform/assert.h"
|
|
#include "vm/globals.h"
|
|
|
|
namespace dart {
|
|
|
|
bool GetExperimentalFeatureDefault(ExperimentalFeature feature) {
|
|
constexpr bool kFeatureValues[] = {
|
|
true, true, true, true, true, true, true, true,
|
|
};
|
|
ASSERT(static_cast<size_t>(feature) < ARRAY_SIZE(kFeatureValues));
|
|
return kFeatureValues[static_cast<int>(feature)];
|
|
}
|
|
|
|
const char* GetExperimentalFeatureName(ExperimentalFeature feature) {
|
|
constexpr const char* kFeatureNames[] = {
|
|
"nonfunction-type-aliases", "non-nullable",
|
|
"extension-methods", "constant-update-2018",
|
|
"control-flow-collections", "set-literals",
|
|
"spread-collections", "triple-shift",
|
|
};
|
|
ASSERT(static_cast<size_t>(feature) < ARRAY_SIZE(kFeatureNames));
|
|
return kFeatureNames[static_cast<int>(feature)];
|
|
}
|
|
|
|
} // namespace dart
|