Files
sdk/runtime/vm/version.h
Alexander Aprelev 4138277ee6 [vm/shared] Introduce 'vm:shared' pragma.
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>
2024-06-14 23:24:19 +00:00

31 lines
772 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.
#ifndef RUNTIME_VM_VERSION_H_
#define RUNTIME_VM_VERSION_H_
#include "vm/allocation.h"
namespace dart {
class Version : public AllStatic {
public:
static const char* String();
static const char* SnapshotString();
static const char* CommitString();
static const char* SdkHash();
static const char* Channel();
private:
static const char* str_;
static const char* snapshot_hash_;
static const char* commit_;
static const char* git_short_hash_;
static const char* channel_;
};
} // namespace dart
#endif // RUNTIME_VM_VERSION_H_