Skip to content

Commit

Permalink
Deterministic System.identityHashCode for Trace Debugger. This is an …
Browse files Browse the repository at this point in the history
…adapted version of #430.
  • Loading branch information
ndkoval committed Jan 21, 2025
1 parent d0510ae commit 687083c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ internal class LincheckClassVisitor(
if (methodName == "<init>" || ideaPluginEnabled && methodName == "toString" && desc == "()Ljava/lang/String;") {
mv = ObjectCreationTransformer(fileName, className, methodName, mv.newAdapter())
if (TRACE_DEBUGGER_MODE) {
mv = InvokeDynamicTransformer(fileName, className, methodName, mv.newAdapter())
mv = DeoptimizeInvokeDynamicTransformer(fileName, className, methodName, mv.newAdapter())
}
mv = run {
val st = ConstructorArgumentsSnapshotTrackerTransformer(fileName, className, methodName, mv.newAdapter(), classVisitor::isInstanceOf)
Expand Down Expand Up @@ -154,7 +154,7 @@ internal class LincheckClassVisitor(
mv = DeterministicHashCodeTransformer(fileName, className, methodName, mv.newAdapter())
}
if (TRACE_DEBUGGER_MODE) {
mv = InvokeDynamicTransformer(fileName, className, methodName, mv.newAdapter())
mv = DeoptimizeInvokeDynamicTransformer(fileName, className, methodName, mv.newAdapter())
}
mv = DeterministicTimeTransformer(mv.newAdapter())
mv = DeterministicRandomTransformer(fileName, className, methodName, mv.newAdapter())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ import java.lang.invoke.MethodHandles
import java.lang.invoke.MethodType


internal class InvokeDynamicTransformer(
// TODO explain what this transformer does
internal class DeoptimizeInvokeDynamicTransformer(
fileName: String,
className: String,
methodName: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

package org.jetbrains.kotlinx.lincheck_test.trace_debugger
package org.jetbrains.kotlinx.lincheck_test.native_calls

import org.jetbrains.kotlinx.lincheck.ExceptionResult
import org.jetbrains.kotlinx.lincheck.checkImpl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

package org.jetbrains.kotlinx.lincheck_test.trace_debugger
package org.jetbrains.kotlinx.lincheck_test.native_calls

import org.jetbrains.kotlinx.lincheck.annotations.Operation
import org.jetbrains.kotlinx.lincheck.check
Expand Down

0 comments on commit 687083c

Please sign in to comment.