Rename methods of CiderByteStore.

Change-Id: Ief2d3308f1284a2c0529758beeb6776e3ef8bb8f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247935
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
diff --git a/pkg/analyzer/lib/src/dart/micro/cider_byte_store.dart b/pkg/analyzer/lib/src/dart/micro/cider_byte_store.dart
index 92cb27c..ea0c573 100644
--- a/pkg/analyzer/lib/src/dart/micro/cider_byte_store.dart
+++ b/pkg/analyzer/lib/src/dart/micro/cider_byte_store.dart
@@ -26,18 +26,18 @@
   /// count.
   ///
   /// Return `null` if the association does not exist.
-  Uint8List? get2(String key);
+  Uint8List? get(String key);
 
   /// Associate [bytes] with [key].
   /// Return an internalized version of [bytes], the reference count is `1`.
   ///
   /// This method will throw an exception if there is already an association
-  /// for the [key]. The client should either use [get2] to access data,
-  /// or first [release2] it.
-  Uint8List putGet2(String key, Uint8List bytes);
+  /// for the [key]. The client should either use [get] to access data,
+  /// or first [release] it.
+  Uint8List putGet(String key, Uint8List bytes);
 
   ///  Decrement the reference count for every key in [keys].
-  void release2(Iterable<String> keys);
+  void release(Iterable<String> keys);
 }
 
 class CiderByteStoreTestView {
@@ -53,7 +53,7 @@
   CiderByteStoreTestView? testView;
 
   @override
-  Uint8List? get2(String key) {
+  Uint8List? get(String key) {
     final entry = map[key];
     if (entry == null) {
       return null;
@@ -64,7 +64,7 @@
   }
 
   @override
-  Uint8List putGet2(String key, Uint8List bytes) {
+  Uint8List putGet(String key, Uint8List bytes) {
     if (map.containsKey(key)) {
       throw StateError('Overwriting is not allowed: $key');
     }
@@ -75,7 +75,7 @@
   }
 
   @override
-  void release2(Iterable<String> keys) {
+  void release(Iterable<String> keys) {
     for (final key in keys) {
       final entry = map[key];
       if (entry != null) {
diff --git a/pkg/analyzer/lib/src/dart/micro/library_graph.dart b/pkg/analyzer/lib/src/dart/micro/library_graph.dart
index 7fe936e..f740eb1 100644
--- a/pkg/analyzer/lib/src/dart/micro/library_graph.dart
+++ b/pkg/analyzer/lib/src/dart/micro/library_graph.dart
@@ -770,7 +770,7 @@
     // TODO(migration): should not be nullable
     Uint8List? unlinkedBytes;
     {
-      unlinkedBytes = location._fsState._byteStore.get2(unlinkedKey);
+      unlinkedBytes = location._fsState._byteStore.get(unlinkedKey);
 
       if (unlinkedBytes == null || unlinkedBytes.isEmpty) {
         isUnlinkedFromCache = false;
@@ -792,7 +792,7 @@
           unlinkedBytes = unlinkedUnit.toBytes();
           performance.getDataInt('length').add(unlinkedBytes!.length);
           unlinkedBytes =
-              location._fsState._byteStore.putGet2(unlinkedKey, unlinkedBytes!);
+              location._fsState._byteStore.putGet(unlinkedKey, unlinkedBytes!);
           testData?.unlinkedKeyPut.add(unlinkedKey);
         });
 
diff --git a/pkg/analyzer/lib/src/dart/micro/resolve_file.dart b/pkg/analyzer/lib/src/dart/micro/resolve_file.dart
index 6e30935..ea109b6 100644
--- a/pkg/analyzer/lib/src/dart/micro/resolve_file.dart
+++ b/pkg/analyzer/lib/src/dart/micro/resolve_file.dart
@@ -447,12 +447,12 @@
     );
 
     // Release the linked data, the reference count is `>= 1`.
-    byteStore.release2(linkedKeysToRelease);
+    byteStore.release(linkedKeysToRelease);
   }
 
   /// Releases from the cache and clear [removedCacheKeys].
   void releaseAndClearRemovedIds() {
-    byteStore.release2(removedCacheKeys);
+    byteStore.release(removedCacheKeys);
     removedCacheKeys.clear();
   }
 
@@ -903,7 +903,7 @@
       }
 
       var resolutionKey = '${cycle.signatureStr}.resolution';
-      var resolutionBytes = byteStore.get2(resolutionKey);
+      var resolutionBytes = byteStore.get(resolutionKey);
 
       var unitsInformativeBytes = <Uri, Uint8List>{};
       for (var library in cycle.libraries) {
@@ -976,7 +976,7 @@
         librariesLinked += cycle.libraries.length;
 
         resolutionBytes = linkResult.resolutionBytes;
-        resolutionBytes = byteStore.putGet2(resolutionKey, resolutionBytes);
+        resolutionBytes = byteStore.putGet(resolutionKey, resolutionBytes);
         performance.getDataInt('bytesPut').add(resolutionBytes.length);
         testData?.forCycle(cycle).putKeys.add(resolutionKey);