Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Refactor
  • Loading branch information
egiptipavel committed Aug 5, 2023
commit 7acd40d7616cf5f679e4578ba225e2c875fdbc16

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package org.jacoco.core.internal.instr

import org.jacoco.core.internal.flow.ClassProbesAdapter
import org.jacoco.core.internal.flow.MethodProbesCollector
import org.jacoco.core.internal.flow.TraceClassProbesAdapter
import org.objectweb.asm.ClassWriter
import org.objectweb.asm.util.TraceClassVisitor
import org.utbot.instrumentation.Settings
Expand Down Expand Up @@ -32,14 +31,13 @@ fun createClassVisitorForTracingBranchInstructions(
className: String,
storage: ProcessingStorage,
writer: ClassWriter
): TraceClassProbesAdapter {
): ClassProbesAdapter {
val strategy = TraceStrategy()
val tcv = TraceClassVisitor(writer, PrintWriter(sw)) // TODO: remove
return TraceClassProbesAdapter(
TraceClassInstrumenter(strategy, tcv) { id ->
return ClassProbesAdapter(
TraceClassInstrumenter(className, storage, strategy, tcv) { id ->
storage.computeId(className, id)
},
className,
storage
false
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ package org.jacoco.core.internal.instr

import org.jacoco.core.internal.flow.MethodProbesVisitor
import org.objectweb.asm.ClassVisitor
import org.utbot.instrumentation.instrumentation.et.ProcessingStorage

class TraceClassInstrumenter(
private val className: String,
private val storage: ProcessingStorage,
private val probeArrayStrategy: IProbeArrayStrategy,
cv: ClassVisitor,
private val nextIdGenerator: (id: Int) -> Long
Expand All @@ -19,9 +22,10 @@ class TraceClassInstrumenter(
val mv = cv.visitMethod(access, name, desc, signature, exceptions)

val frameEliminator = DuplicateFrameEliminator(mv)
val probeVariableInserter = TraceProbeInserter(access,
name, desc, frameEliminator, probeArrayStrategy, nextIdGenerator)
return MethodInstrumenter(probeVariableInserter, probeVariableInserter)
val probeVariableInserter = TraceProbeInserter(
access, name, desc, frameEliminator, probeArrayStrategy, nextIdGenerator
)
return TraceMethodInstrumenter(className, storage, name, desc, probeVariableInserter, probeVariableInserter)
}

}
Loading