Skip to content

Commit

Permalink
refactor: remove unused CallGraph class
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-makerx committed Dec 14, 2023
1 parent 2982680 commit 5fe5c03
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 40 deletions.
3 changes: 0 additions & 3 deletions src/puya/codegen/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import structlog

from puya.codegen import ops
from puya.codegen.callgraph import CallGraph
from puya.codegen.context import ProgramCodeGenContext
from puya.codegen.emitprogram import CompiledContract, CompiledProgram
from puya.codegen.stack_assignment import (
Expand Down Expand Up @@ -410,13 +409,11 @@ def lower_program_ir_to_memory_ir(
def compile_program_to_teal(
context: CompileContext, contract: models.Contract, program: models.Program
) -> CompiledProgram:
call_graph = CallGraph.build(program)
cg_context = attrs_extend(
ProgramCodeGenContext,
context,
contract=contract,
program=program,
call_graph=call_graph,
)
subroutines = list(lower_program_ir_to_memory_ir(cg_context))
global_stack_assignment(cg_context, subroutines)
Expand Down
35 changes: 0 additions & 35 deletions src/puya/codegen/callgraph.py

This file was deleted.

2 changes: 0 additions & 2 deletions src/puya/codegen/context.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import attrs

from puya.codegen.callgraph import CallGraph
from puya.context import CompileContext
from puya.ir import models as ir

Expand All @@ -9,4 +8,3 @@
class ProgramCodeGenContext(CompileContext):
contract: ir.Contract
program: ir.Program
call_graph: CallGraph

0 comments on commit 5fe5c03

Please sign in to comment.