Skip to content

Instantly share code, notes, and snippets.

@JoshRosen
Created October 21, 2021 22:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoshRosen/d270f70c593a4284686998a97cdb18e6 to your computer and use it in GitHub Desktop.
Save JoshRosen/d270f70c593a4284686998a97cdb18e6 to your computer and use it in GitHub Desktop.
Bytecode diff related to https://github.com/apache/spark/pull/34351 where I see what happens if I just change protected to private
diff --git a/OpenHashMap.class.asm b/OpenHashMap.class.asm
index aa713d0..b684cf3 100644
--- a/OpenHashMap.class.asm
+++ b/OpenHashMap.class.asm
@@ -1375,10 +1375,10 @@
MAXSTACK = 1
MAXLOCALS = 1
- // access flags 0x1
+ // access flags 0x2
// signature (Lscala/Function1<Ljava/lang/Object;Lscala/runtime/BoxedUnit;>;)V
// declaration: void org$apache$spark$util$collection$OpenHashMap$$grow_$eq(scala.Function1<java.lang.Object, scala.runtime.BoxedUnit>)
- public org$apache$spark$util$collection$OpenHashMap$$grow_$eq(Lscala/Function1;)V
+ private org$apache$spark$util$collection$OpenHashMap$$grow_$eq(Lscala/Function1;)V
// parameter final x$1
ALOAD 0
ALOAD 1
@@ -1415,10 +1415,10 @@
MAXSTACK = 1
MAXLOCALS = 1
- // access flags 0x1
+ // access flags 0x2
// signature (Lscala/Function2<Ljava/lang/Object;Ljava/lang/Object;Lscala/runtime/BoxedUnit;>;)V
// declaration: void org$apache$spark$util$collection$OpenHashMap$$move_$eq(scala.Function2<java.lang.Object, java.lang.Object, scala.runtime.BoxedUnit>)
- public org$apache$spark$util$collection$OpenHashMap$$move_$eq(Lscala/Function2;)V
+ private org$apache$spark$util$collection$OpenHashMap$$move_$eq(Lscala/Function2;)V
// parameter final x$1
ALOAD 0
ALOAD 1
diff --git a/OpenHashMap.class.scalap b/OpenHashMap.class.scalap
index 237f21c..44c8204 100644
--- a/OpenHashMap.class.scalap
+++ b/OpenHashMap.class.scalap
@@ -13,6 +13,6 @@
def update(k: K, v: V): scala.Unit = { /* compiled code */ }
def changeValue(k: K, defaultValue: => V, mergeValue: scala.Function1[V, V]): V = { /* compiled code */ }
override def iterator: scala.Iterator[scala.Tuple2[K, V]] = { /* compiled code */ }
- protected var grow: scala.Function1[scala.Int, scala.Unit] = { /* compiled code */ }
- protected var move: scala.Function2[scala.Int, scala.Int, scala.Unit] = { /* compiled code */ }
+ private var grow: scala.Function1[scala.Int, scala.Unit] = { /* compiled code */ }
+ private var move: scala.Function2[scala.Int, scala.Int, scala.Unit] = { /* compiled code */ }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment