Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix method overwrites during build #25212

Closed
wants to merge 2 commits into from
Closed
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
2 changes: 0 additions & 2 deletions base/boot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,6 @@ macro _noinline_meta()
Expr(:meta, :noinline)
end

function postfixapostrophize end

struct BoundsError <: Exception
a::Any
i::Any
Expand Down
4 changes: 2 additions & 2 deletions base/operators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -739,8 +739,8 @@ fldmod1(x::T, y::T) where {T<:Real} = (fld1(x,y), mod1(x,y))
# efficient version for integers
fldmod1(x::T, y::T) where {T<:Integer} = (fld1(x,y), mod1(x,y))

# postfix apostophre
Core.postfixapostrophize(x) = Adjoint(x)
# postfix apostrophe
apostrophe(x) = Adjoint(x)

"""
adjoint(A)
Expand Down
9 changes: 2 additions & 7 deletions base/reflection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1089,13 +1089,8 @@ end
Make method `m` uncallable and force recompilation of any methods that use(d) it.
"""
function delete_method(m::Method)
ccall(:jl_method_table_disable, Cvoid, (Any, Any), MethodTable(m), m)
end

function MethodTable(m::Method)
ft = ccall(:jl_first_argument_datatype, Any, (Any,), m.sig)
ft == C_NULL && error("Method ", m, " does not correspond to a function type")
(ft::DataType).name.mt
ft = ccall(:jl_first_argument_datatype, Any, (Any,), m.sig) # should not be NULL
ccall(:jl_method_table_disable, Cvoid, (Any, Any), (ft::DataType).name.mt, m)
end

"""
Expand Down
2 changes: 1 addition & 1 deletion src/julia-syntax.scm
Original file line number Diff line number Diff line change
Expand Up @@ -2378,7 +2378,7 @@
,.(apply append rows)))
`(call (top typed_vcat) ,t ,@a)))))

'|'| (lambda (e) (expand-forms `(call (core postfixapostrophize) ,(cadr e))))
'|'| (lambda (e) (expand-forms `(call (top apostrophe) ,(cadr e))))
'|.'| (lambda (e) (begin (deprecation-message (string "The syntax `.'` for transposition is deprecated, "
"and the special lowering of `.'` in multiplication "
"(`*`), left-division (`\\`), and right-division (`/`) "
Expand Down