[ResidentFrontendServer] Remove explicit getters from the `ResidentCompilerInfo` class
CoreLibraryReviewExempt: This CL does not include any core library API
changes, only VM Service implementation changes within
sdk/lib/vmservice/running_isolates.dart.
Change-Id: Icbd3a8fe6c10c2c1ef3d1f4737639f32227239c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/401644
Reviewed-by: Ben Konyi <bkonyi@google.com>
diff --git a/pkg/frontend_server/lib/resident_frontend_server_utils.dart b/pkg/frontend_server/lib/resident_frontend_server_utils.dart
index 20efd4d..04a1600 100644
--- a/pkg/frontend_server/lib/resident_frontend_server_utils.dart
+++ b/pkg/frontend_server/lib/resident_frontend_server_utils.dart
@@ -8,21 +8,17 @@
import 'package:path/path.dart' as path;
final class ResidentCompilerInfo {
- final String? _sdkHash;
- final InternetAddress _address;
- final int _port;
-
/// The SDK hash that kernel files compiled using the Resident Frontend
/// Compiler associated with this object will be stamped with.
- String? get sdkHash => _sdkHash;
+ final String? sdkHash;
/// The address that the Resident Frontend Compiler associated with this
/// object is listening from.
- InternetAddress get address => _address;
+ final InternetAddress address;
/// The port number that the Resident Frontend Compiler associated with this
/// object is listening on.
- int get port => _port;
+ final int port;
/// Extracts the value associated with a key from [entries], where [entries]
/// is a [String] with the format '$key1:$value1 $key2:$value2 ...'.
@@ -47,12 +43,10 @@
}
ResidentCompilerInfo._({
- required String? sdkHash,
- required int port,
- required InternetAddress address,
- }) : _sdkHash = sdkHash,
- _port = port,
- _address = address;
+ required this.sdkHash,
+ required this.port,
+ required this.address,
+ });
}
/// Returns the absolute path to the cached kernel file associated with
diff --git a/sdk/lib/vmservice/running_isolates.dart b/sdk/lib/vmservice/running_isolates.dart
index e6b8ca7..a03f632 100644
--- a/sdk/lib/vmservice/running_isolates.dart
+++ b/sdk/lib/vmservice/running_isolates.dart
@@ -86,21 +86,17 @@
// `package:frontend_server`.
final class _ResidentCompilerInfo {
- final String? _sdkHash;
- final InternetAddress _address;
- final int _port;
-
/// The SDK hash that kernel files compiled using the Resident Frontend
/// Compiler associated with this object will be stamped with.
- String? get sdkHash => _sdkHash;
+ final String? sdkHash;
/// The address that the Resident Frontend Compiler associated with this
/// object is listening from.
- InternetAddress get address => _address;
+ final InternetAddress address;
/// The port number that the Resident Frontend Compiler associated with this
/// object is listening on.
- int get port => _port;
+ final int port;
/// Extracts the value associated with a key from [entries], where [entries]
/// is a [String] with the format '$key1:$value1 $key2:$value2 $key3:$value3 ...'.
@@ -126,12 +122,10 @@
}
_ResidentCompilerInfo._({
- required String? sdkHash,
- required int port,
- required InternetAddress address,
- }) : _sdkHash = sdkHash,
- _port = port,
- _address = address;
+ required this.sdkHash,
+ required this.port,
+ required this.address,
+ });
}
/// Class that knows how to orchestrate expression evaluation in dart2 world.