Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ import org.jacodb.api.common.CommonMethod

interface CommonInst {
val location: CommonInstLocation

val method: CommonMethod
get() = location.method
}

interface CommonInstLocation {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ interface JcInst : CommonInst {
override val location: JcInstLocation
val operands: List<JcExpr>

override val method: JcMethod
get() = location.method
val lineNumber: Int
get() = location.lineNumber

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ class JcBlockGraphImpl(
(block.start.index..block.end.index).map { jcGraph.instructions[it] }

override fun block(inst: JcInst): JcBasicBlock {
assert(inst.method == jcGraph.method) {
"required method of instruction ${jcGraph.method} but got ${inst.method}"
assert(inst.location.method == jcGraph.method) {
"required method of instruction ${jcGraph.method} but got ${inst.location.method}"
}
for (basicBlock in entries) {
if (basicBlock.contains(inst)) {
Expand Down
3 changes: 0 additions & 3 deletions jacodb-ets/src/main/kotlin/org/jacodb/ets/model/Stmt.kt
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ import org.jacodb.api.common.cfg.CommonReturnInst
interface EtsStmt : CommonInst {
override val location: EtsStmtLocation

override val method: EtsMethod
get() = location.method

interface Visitor<out R> {
fun visit(stmt: EtsNopStmt): R
fun visit(stmt: EtsAssignStmt): R
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ fun InterproceduralCfg.toHighlightedDotWithCalls(
val h = sanitize(stmt.hashCode())
val clusterName = "cluster_${h}_B${parentBlock}"
// method signature label
val methodSig = cfg.entries.first().method.signature
val methodSig = cfg.entries.first().location.method.signature
// open subgraph
lines += " subgraph \"$clusterName\" {"
lines += " label=\"$methodSig\";"
Expand Down