Skip to content

Commit

Permalink
Merge pull request #281 from UnitTestBot/saloed/fix-simplifier
Browse files Browse the repository at this point in the history
  • Loading branch information
Saloed authored Dec 11, 2024
2 parents 8b8750d + 52750de commit 4583dba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ class RawInstListBuilder(
val localTypeRefinementExprMap = localTypeRefinement as Map<JcRawExpr, JcRawExpr>
val localsNormalizedInstructionList = originalInstructionList.map(ExprMapper(localTypeRefinementExprMap))

return Simplifier().simplify(method.enclosingClass.classpath, localsNormalizedInstructionList)
return Simplifier().simplify(localsNormalizedInstructionList)
}

private fun MutableList<JcRawInst>.ensureFirstInstIsLineNumber() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package org.jacodb.impl.cfg

import org.jacodb.api.jvm.JcClasspath
import org.jacodb.api.jvm.cfg.AbstractFullRawExprSetCollector
import org.jacodb.api.jvm.cfg.JcInstList
import org.jacodb.api.jvm.cfg.JcRawAssignInst
Expand All @@ -41,7 +40,7 @@ import org.jacodb.impl.cfg.util.InstructionFilter
* the frames merging)
*/
internal class Simplifier {
fun simplify(jcClasspath: JcClasspath, instList: JcInstList<JcRawInst>): JcInstList<JcRawInst> {
fun simplify(instList: JcInstList<JcRawInst>): JcInstList<JcRawInst> {
// clear the assignments that are repeated inside single basic block
var instructionList = cleanRepeatedAssignments(instList)

Expand Down

0 comments on commit 4583dba

Please sign in to comment.