4138277ee6
Decorating a field with 'vm:shared' pragma makes values in this field accessible to all isolates in an isolate group. Introduce `channel` to the `Version` class so that the pragma can only be enabled on main and dev channels. TEST=shared_test, shared_fail_without_flag_test BUG=https://github.com/dart-lang/sdk/issues/55991 Change-Id: I843c9f0d2ffc9f2ced7ddc4006bb6f9ca4e2ddf4 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370064 Reviewed-by: Slava Egorov <vegorov@google.com> Commit-Queue: Alexander Aprelev <aam@google.com>
45 lines
1020 B
C++
45 lines
1020 B
C++
// Copyright (c) 2012, 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.
|
|
|
|
#include "vm/version.h"
|
|
|
|
#include "vm/globals.h"
|
|
|
|
namespace dart {
|
|
|
|
const char* Version::String() {
|
|
return str_;
|
|
}
|
|
|
|
const char* Version::SnapshotString() {
|
|
return snapshot_hash_;
|
|
}
|
|
|
|
const char* Version::CommitString() {
|
|
return commit_;
|
|
}
|
|
|
|
const char* Version::SdkHash() {
|
|
return git_short_hash_;
|
|
}
|
|
|
|
const char* Version::Channel() {
|
|
return channel_;
|
|
}
|
|
|
|
const char* Version::snapshot_hash_ = "{{SNAPSHOT_HASH}}";
|
|
const char* Version::str_ =
|
|
"{{VERSION_STR}} ({{CHANNEL}}) ({{COMMIT_TIME}})"
|
|
" on \"" kHostOperatingSystemName
|
|
"_"
|
|
#if defined(USING_SIMULATOR)
|
|
"sim"
|
|
#endif
|
|
kTargetArchitectureName "\"";
|
|
const char* Version::commit_ = "{{VERSION_STR}}";
|
|
const char* Version::git_short_hash_ = "{{GIT_HASH}}";
|
|
const char* Version::channel_ = "{{CHANNEL}}";
|
|
|
|
} // namespace dart
|