@@ -299,8 +299,8 @@ Optional Arguments:
299
299
300
300
All Symbol arguments can be used to set default values, i.e. `psym=[:K=>1, :p]`.
301
301
"""
302
- VertexModel (; kwargs... ) = _construct_comp (VertexModel, Base . inferencebarrier ( kwargs) )
303
- VertexModel (v:: VertexModel ; kwargs... ) = _reconstruct_comp (VertexModel, v, Base . inferencebarrier ( kwargs) )
302
+ VertexModel (; kwargs... ) = _construct_comp (VertexModel, kwargs)
303
+ VertexModel (v:: VertexModel ; kwargs... ) = _reconstruct_comp (VertexModel, v, kwargs)
304
304
305
305
struct EdgeModel <: ComponentModel
306
306
name:: Symbol
@@ -357,8 +357,8 @@ Optional Arguments:
357
357
358
358
All Symbol arguments can be used to set default values, i.e. `psym=[:K=>1, :p]`.
359
359
"""
360
- EdgeModel (; kwargs... ) = _construct_comp (EdgeModel, Base . inferencebarrier ( kwargs) )
361
- EdgeModel (v:: EdgeModel ; kwargs... ) = _reconstruct_comp (EdgeModel, v, Base . inferencebarrier ( kwargs) )
360
+ EdgeModel (; kwargs... ) = _construct_comp (EdgeModel, kwargs)
361
+ EdgeModel (v:: EdgeModel ; kwargs... ) = _reconstruct_comp (EdgeModel, v, kwargs)
362
362
363
363
"""
364
364
compf(c::ComponentModel)
598
598
Internal function to construct a component model from keyword arguments.
599
599
Fills up kw arguments with default values and performs sanity checks.
600
600
"""
601
- function _construct_comp (:: Type{T} , @nospecialize (kwargs)) where {T}
602
- dict = _fill_defaults (T, Base . inferencebarrier ( kwargs) )
601
+ Base . @nospecializeinfer function _construct_comp (:: Type{T} , @nospecialize (kwargs)) where {T}
602
+ dict = _fill_defaults (T, kwargs)
603
603
604
604
# check signature of f
605
605
# if !_valid_signature(T, dict[:f])
@@ -625,7 +625,7 @@ function _construct_comp(::Type{T}, @nospecialize(kwargs)) where {T}
625
625
return c
626
626
end
627
627
628
- function _reconstruct_comp (:: Type{T} , cf:: ComponentModel , kwargs) where {T}
628
+ Base . @nospecializeinfer function _reconstruct_comp (:: Type{T} , cf:: ComponentModel , @nospecialize ( kwargs) ) where {T}
629
629
fields = fieldnames (T)
630
630
dict = Dict {Symbol, Any} ()
631
631
for f in fields
643
643
Fill up keyword arguments `kwargs` for type T with default values.
644
644
Also perfoms sanity check some properties like mass matrix, depth, ...
645
645
"""
646
- function _fill_defaults (T, @nospecialize (kwargs))
646
+ Base . @nospecializeinfer function _fill_defaults (T, @nospecialize (kwargs))
647
647
dict = Dict {Symbol, Any} (kwargs)
648
648
allow_output_sym_clash = pop! (dict, :allow_output_sym_clash , false )
649
649
0 commit comments