Skip to content

FieldError: type OptimizationState has no field optresult #639

@jishnub

Description

@jishnub

On nightly,

julia> using Cthulhu

julia> @descend sin(2)
ERROR: FieldError: type OptimizationState has no field `optresult`, available fields: `linfo`, `src`, `result`, `stmt_info`, `mod`, `sptypes`, `slottypes`, `inlining`, `cfg`, `unreachable`, `bb_vartables`, `insert_coverage`
Stacktrace:
  [1] getproperty(x::Compiler.OptimizationState{Cthulhu.CthulhuInterpreter}, f::Symbol)
    @ Base ./Base_compiler.jl:54
  [2] create_cthulhu_source(result::Compiler.InferenceResult, effects::Compiler.Effects)
    @ Cthulhu ~/.julia/packages/Cthulhu/w24bH/src/interpreter.jl:123
  [3] set_cthulhu_source!
    @ ~/.julia/packages/Cthulhu/w24bH/src/interpreter.jl:135 [inlined]
  [4] finish!
    @ ~/.julia/packages/Cthulhu/w24bH/src/interpreter.jl:140 [inlined]
  [5] finish_nocycle(::Cthulhu.CthulhuInterpreter, frame::Compiler.InferenceState, time_before::UInt64)
    @ Compiler ./../usr/share/julia/Compiler/src/typeinfer.jl:208
  [6] typeinf(interp::Cthulhu.CthulhuInterpreter, frame::Compiler.InferenceState)
    @ Compiler ./../usr/share/julia/Compiler/src/abstractinterpretation.jl:4448
  [7] do_typeinf!(interp::Cthulhu.CthulhuInterpreter, mi::Core.MethodInstance)
    @ Cthulhu ~/.julia/packages/Cthulhu/w24bH/src/CthulhuBase.jl:644
  [8] mkinterp(interp::Compiler.NativeInterpreter, args::Any)
    @ Cthulhu ~/.julia/packages/Cthulhu/w24bH/src/CthulhuBase.jl:656
  [9] #_descend#111
    @ ~/.julia/packages/Cthulhu/w24bH/src/CthulhuBase.jl:678 [inlined]
 [10] __descend_with_error_handling(args::Any; terminal::Any, kwargs...)
    @ Cthulhu ~/.julia/packages/Cthulhu/w24bH/src/CthulhuBase.jl:133
 [11] top-level scope
    @ ~/.julia/packages/Cthulhu/w24bH/src/CthulhuBase.jl:122
 [12] top-level scope
    @ ~/.julia/packages/Cthulhu/w24bH/src/CthulhuBase.jl:114
 [13] top-level scope
    @ ~/.julia/packages/Cthulhu/w24bH/src/CthulhuBase.jl:147
 [14] top-level scope
    @ ~/.julia/packages/Cthulhu/w24bH/src/CthulhuBase.jl:147
 [15] descend(::Any, ::Vararg{Any}; kwargs...)
    @ Cthulhu ~/.julia/packages/Cthulhu/w24bH/src/Cthulhu.jl:111
 [16] top-level scope
    @ ~/.julia/packages/Cthulhu/w24bH/src/Cthulhu.jl:110
 [17] top-level scope
    @ REPL[3]:1

julia> VERSION
v"1.13.0-DEV.429"

(@devtools) pkg> st Cthulhu
Status `~/.julia/environments/devtools/Project.toml`
  [f68482b8] Cthulhu v2.17.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions