Skip to content

Commit 60dd16b

Browse files
committed
[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 <[email protected]>
1 parent 26fdfab commit 60dd16b

File tree

2 files changed

+14
-26
lines changed

2 files changed

+14
-26
lines changed

pkg/frontend_server/lib/resident_frontend_server_utils.dart

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,17 @@ import 'dart:io' show Directory, File, InternetAddress, Socket;
88
import 'package:path/path.dart' as path;
99

1010
final class ResidentCompilerInfo {
11-
final String? _sdkHash;
12-
final InternetAddress _address;
13-
final int _port;
14-
1511
/// The SDK hash that kernel files compiled using the Resident Frontend
1612
/// Compiler associated with this object will be stamped with.
17-
String? get sdkHash => _sdkHash;
13+
final String? sdkHash;
1814

1915
/// The address that the Resident Frontend Compiler associated with this
2016
/// object is listening from.
21-
InternetAddress get address => _address;
17+
final InternetAddress address;
2218

2319
/// The port number that the Resident Frontend Compiler associated with this
2420
/// object is listening on.
25-
int get port => _port;
21+
final int port;
2622

2723
/// Extracts the value associated with a key from [entries], where [entries]
2824
/// is a [String] with the format '$key1:$value1 $key2:$value2 ...'.
@@ -47,12 +43,10 @@ final class ResidentCompilerInfo {
4743
}
4844

4945
ResidentCompilerInfo._({
50-
required String? sdkHash,
51-
required int port,
52-
required InternetAddress address,
53-
}) : _sdkHash = sdkHash,
54-
_port = port,
55-
_address = address;
46+
required this.sdkHash,
47+
required this.port,
48+
required this.address,
49+
});
5650
}
5751

5852
/// Returns the absolute path to the cached kernel file associated with

sdk/lib/vmservice/running_isolates.dart

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -86,21 +86,17 @@ class RunningIsolates implements MessageRouter {
8686
// `package:frontend_server`.
8787

8888
final class _ResidentCompilerInfo {
89-
final String? _sdkHash;
90-
final InternetAddress _address;
91-
final int _port;
92-
9389
/// The SDK hash that kernel files compiled using the Resident Frontend
9490
/// Compiler associated with this object will be stamped with.
95-
String? get sdkHash => _sdkHash;
91+
final String? sdkHash;
9692

9793
/// The address that the Resident Frontend Compiler associated with this
9894
/// object is listening from.
99-
InternetAddress get address => _address;
95+
final InternetAddress address;
10096

10197
/// The port number that the Resident Frontend Compiler associated with this
10298
/// object is listening on.
103-
int get port => _port;
99+
final int port;
104100

105101
/// Extracts the value associated with a key from [entries], where [entries]
106102
/// is a [String] with the format '$key1:$value1 $key2:$value2 $key3:$value3 ...'.
@@ -126,12 +122,10 @@ final class _ResidentCompilerInfo {
126122
}
127123

128124
_ResidentCompilerInfo._({
129-
required String? sdkHash,
130-
required int port,
131-
required InternetAddress address,
132-
}) : _sdkHash = sdkHash,
133-
_port = port,
134-
_address = address;
125+
required this.sdkHash,
126+
required this.port,
127+
required this.address,
128+
});
135129
}
136130

137131
/// Class that knows how to orchestrate expression evaluation in dart2 world.

0 commit comments

Comments
 (0)