File tree Expand file tree Collapse file tree 2 files changed +2
-21
lines changed Expand file tree Collapse file tree 2 files changed +2
-21
lines changed Original file line number Diff line number Diff line change 33
44function is_valid_ir_argument (ctx, ex)
55 k = kind (ex)
6- if is_simple_atom (ctx, ex) || k == K " inert" || k == K " top" || k == K " core"
6+ if is_simple_atom (ctx, ex) || k in KSet " inert top core quote "
77 true
88 elseif k == K " BindingId"
99 binfo = lookup_binding (ctx, ex)
1010 bk = binfo. kind
1111 # TODO : Can we allow bk == :local || bk == :argument || bk == :static_parameter ???
1212 # Why does flisp seem to allow (slot) and (static_parameter), but these
1313 # aren't yet converted to by existing lowering??
14- if bk == :global
15- # Globals are nothrow when they are defined - we assume a previously
16- # defined global can never be set to undefined. (TODO : This could be
17- # broken when precompiling a module `B` in the presence of a badly
18- # behaved module `A`, which inconsistently defines globals during
19- # `A.__init__()`??)
20- is_defined_nothrow_global (binfo. mod, Symbol (binfo. name))
21- else
22- false
23- end
14+ (bk == :slot || bk == :static_parameter )
2415 else
2516 false
2617 end
Original file line number Diff line number Diff line change @@ -375,16 +375,6 @@ function is_defined_and_owned_global(mod, name)
375375 ! isnothing (b) && isdefined (b, :owner ) && b. owner === b
376376end
377377
378- # Return true if `name` is defined in `mod`, the sense that accessing it is nothrow.
379- # Has no side effects, unlike isdefined()
380- #
381- # (This should do what fl_nothrow_julia_global does for flisp lowering)
382- function is_defined_nothrow_global (mod, name)
383- b = _get_module_binding (mod, name)
384- ! isnothing (b) && isdefined (b, :owner ) || return false
385- isdefined (b. owner, :value )
386- end
387-
388378# "Reserve" a binding: create the binding if it doesn't exist but do not assign
389379# to it.
390380function reserve_module_binding (mod, name)
You can’t perform that action at this time.
0 commit comments