Skip to content

Commit

Permalink
Squashed 'packages/JuliaInterpreter/' changes from b2ebd69..96ed09c
Browse files Browse the repository at this point in the history
96ed09c version 0.9.32
0a8da3a minimum adjustments to make JuliaInterpreter work with v1.12 (#631)
397ea70 `public` as an identifier is deprecated (#612)
ce6e341 update builtins.jl (#628)
1024848 Merge pull request #629 from JuliaDebug/avi/54678
5700dcc adjustments to JuliaLang/julia#54428
ea522b8 adjustments to JuliaLang/julia#54678
eae3b4c Some more 1.12 compat (#625)
fc4aeca version 0.9.31
a265c14 [incomplete] changes needed to adapt to compressed line table format in Julia (#606)
31253a0 version 0.9.30
1b1b6d6 adjustments for Julia v1.11 (#615)
8043dbc add support for preset `current_scope` (#619)
55e33d0 use child `@testset` to get nicer test summary (#618)
e0e34be adapt to implicit leave change in Julia (#614)
f7138f9 v0.9.29
82b1552 Adjust to upcoming compiler change (#611)
011edf9 improve test code
78f766b minor improvements
713c768 implement support for `current_scope` (#605)
580b95c version 0.9.28
d7d4ced Fix revise#718 (#609)
0089e4b update docs and convert `jldoctest` to `@repl` blocks (#607)
d319168 Remove buggy linearization pass (#604)
1efae18 remove `AbstractFrameInstance` (#608)
0138e60 update CI.yml
6b1c476 version 0.9.27
ce20820 adjust to the `:enter` IR changes made in JuliaLang/julia#52300 (#599)
9afdf71 follow up #596 (#600)
9d50726 adapt to array changes in Julia base (#596)
68fa8be NFC: harden some internal ccalls (#595)
ccc1c95 remove old compats (#598)
15ad1c7 set CI timeout (#597)
7beca92 version 0.9.26
a0d0d33 Adjust to upcoming julia lowering change (#592)
a3cf18e Add a second link to the docs from the README (#589)
6da0b26 version 0.9.25
c8d1ef7 adjust to JuliaLang/julia#50943 (#585)
c93dedf adjust tests for latest Julia master (#584)
910cb6f Align arguments number in breakpoints hook docstring (#583)
7849d4a Bump actions/checkout from 2 to 3 (#576)
0169df2 Version 0.9.24
14e454b Ignore `:aliasscope` and `:popaliasscope` (#581)
3ab2674 Bump codecov/codecov-action from 1 to 3 (#577)
cc1bace Bump actions/cache from 1 to 3 (#578)
1d87867 Update some failing doctests (#579)
43f2041 enable dependabot for GitHub actions (#575)
aefaa30 use an explicit Any comprehension (#572)
475512b Version 0.9.23
8fecf35 Fix kw pattern matching, other changes on 1.9+ (#568)
cf7f437 also test on 1.9
57dbc98 version 0.9.22
d7a3dd4 fixup
b4d133d adjust to JuliaLang/julia#48693 (#566)
9026819 fix test on nightly (#564)
9c5454c Protect `error` calls from invalidation (#565)
da3fee2 remove unused import
2a1c076 bump version
6d2fbaf rejigger the code to compute the method instance in stacktraces (#563)

git-subtree-dir: packages/JuliaInterpreter
git-subtree-split: 96ed09c7127475d391b1a4f20906072f482278eb
  • Loading branch information
davidanthoff committed Jul 3, 2024
1 parent 13830bf commit 31e0ba0
Show file tree
Hide file tree
Showing 35 changed files with 1,248 additions and 751 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docs/Manifest.toml linguist-generated=true
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/" # Location of package manifests
schedule:
interval: "monthly"
42 changes: 29 additions & 13 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,44 @@ jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
version:
- '1.6' # LTS
- '1' # current stable
- 'nightly'
os:
- ubuntu-latest
- macOS-latest
- windows-latest
arch:
- x64
include:
- version: '1.6' # old LTS
os: ubuntu-latest
arch: x64
- version: '1.10' # current stable
os: ubuntu-latest
arch: x64
- version: '~1.11.0-0' # next release
os: ubuntu-latest
arch: x64
- version: 'nightly' # dev
os: ubuntu-latest
arch: x64
#- version: '1' # x86 ubuntu -- disabled since PyCall/conda is broken on this platform
# os: ubuntu-latest
# arch: x86
- version: '1' # x86 windows
os: windows-latest
arch: x86
- version: '1' # x64 windows
os: windows-latest
arch: x64
- version: '1' # x64 macOS
os: macos-latest
arch: x64
env:
PYTHON: ""
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v1
- uses: actions/cache@v3
env:
cache-name: cache-artifacts
with:
Expand All @@ -43,6 +59,6 @@ jobs:
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
- uses: codecov/codecov-action@v3
with:
file: lcov.info
7 changes: 6 additions & 1 deletion .github/workflows/Documenter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ jobs:
Documenter:
name: Documentation
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: '1'
show-versioninfo: true # print versioninfo in the action log
- uses: actions/checkout@v3
- uses: julia-actions/julia-buildpkg@latest
- uses: julia-actions/julia-docdeploy@latest
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/check_builtins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
name: 'Check builtins.jl consistency'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: julia-actions/setup-julia@v1
with:
version: nightly
arch: x64
- uses: actions/cache@v1
- uses: actions/cache@v3
env:
cache-name: cache-artifacts
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ deps/build.log
docs/build/
test/results.md
Manifest.toml
Manifest-*.toml
!/test/code_coverage/coverage_example.jl.cov
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "JuliaInterpreter"
uuid = "aa1ae85d-cabe-5617-a682-6adf51b2e16a"
version = "0.9.20"
version = "0.9.32"

[deps]
CodeTracking = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2"
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
]add JuliaInterpreter
```

## Usage

See the [documentation][docs-stable-url].

[docs-stable-img]: https://img.shields.io/badge/docs-stable-blue.svg
[docs-stable-url]: https://JuliaDebug.github.io/JuliaInterpreter.jl/stable

Expand Down
78 changes: 58 additions & 20 deletions bin/generate_builtins.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@
# Should be run on the latest Julia nightly
using InteractiveUtils

# All bultins added since 1.6. Needs to be updated whenever a new builtin is added
const RECENTLY_ADDED = Core.Builtin[
Core._call_in_world_total, Core.donotdelete,
Core.get_binding_type, Core.set_binding_type!,
Core.getglobal, Core.setglobal!,
Core.modifyfield!, Core.replacefield!, Core.swapfield!,
Core.finalizer, Core._compute_sparams, Core._svec_ref,
Core.compilerbarrier
# All builtins present in 1.6
const ALWAYS_PRESENT = Core.Builtin[
(<:), (===), Core._abstracttype, Core._apply_iterate, Core._apply_pure,
Core._call_in_world, Core._call_latest, Core._equiv_typedef, Core._expr,
Core._primitivetype, Core._setsuper!, Core._structtype, Core._typebody!,
Core._typevar, Core.apply_type, Core.ifelse, Core.sizeof, Core.svec,
applicable, fieldtype, getfield, invoke, isa, isdefined, nfields,
setfield!, throw, tuple, typeassert, typeof
]
# Builtins present from 1.6, not builtins (potentially still normal functions) anymore
const RECENTLY_REMOVED = GlobalRef.(Ref(Core), [
:arrayref, :arrayset, :arrayset, :const_arrayref, :memoryref,
])
const kwinvoke = Core.kwfunc(Core.invoke)

function scopedname(f)
Expand All @@ -33,11 +37,10 @@ function nargs(f, table, id)
minarg = 0
maxarg = typemax(Int)
end
# Specialize arrayref and arrayset for small numbers of arguments
if f == Core.arrayref
# Specialize ~arrayref and arrayset~ memoryrefnew for small numbers of arguments
# TODO: how about other memory intrinsics?
if (@static isdefined(Core, :memoryrefnew) ? f == Core.memoryrefnew : f == Core.memoryref)
maxarg = 5
elseif f == Core.arrayset
maxarg = 6
end
return minarg, maxarg
end
Expand Down Expand Up @@ -183,13 +186,13 @@ function maybe_evaluate_builtin(frame, call_expr, expand::Bool)
print(io,
"""
$head f === $fstr
if !expand
argswrapped = getargs(args, frame)
return Some{Any}($fstr(argswrapped...))
end
# This uses the original arguments to avoid looking them up twice
# See #442
return Expr(:call, invoke, args[2:end]...)
if !expand
argswrapped = getargs(args, frame)
return Some{Any}($fstr(argswrapped...))
end
# This uses the original arguments to avoid looking them up twice
# See #442
return Expr(:call, invoke, args[2:end]...)
""")
continue
elseif f === Core._call_latest
Expand All @@ -207,11 +210,27 @@ function maybe_evaluate_builtin(frame, call_expr, expand::Bool)
end
return maybe_recurse_expanded_builtin(frame, new_expr)
""")
continue
elseif f === Core.current_scope
print(io,
"""
elseif @static isdefined(Core, :current_scope) && f === Core.current_scope
if nargs == 0
currscope = Core.current_scope()
for scope in frame.framedata.current_scopes
currscope = Scope(currscope, scope.values...)
end
return Some{Any}(currscope)
else
return Some{Any}(Core.current_scope(getargs(args, frame)...))
end
""")
continue
end

id = findfirst(isequal(f), Core.Compiler.T_FFUNC_KEY)
fcall = generate_fcall(f, Core.Compiler.T_FFUNC_VAL, id)
if f in RECENTLY_ADDED
if !(f in ALWAYS_PRESENT)
print(io,
"""
$head @static isdefined($(ft.name.module), $(repr(nameof(f)))) && f === $fname
Expand Down Expand Up @@ -246,6 +265,25 @@ function maybe_evaluate_builtin(frame, call_expr, expand::Bool)
return Some{Any}(Core.eval(moduleof(frame), call_expr))
end
""")
# recently removed builtins
for (; mod, name) in RECENTLY_REMOVED
minarg = 1
if name in (:arrayref, :const_arrayref, :memoryref)
maxarg = 5
elseif name === :arrayset
maxarg = 6
elseif name === :arraysize
maxarg = 2
end
_scopedname = "$mod.$name"
fcall = generate_fcall_nargs(_scopedname, minarg, maxarg)
rname = repr(name)
print(io,
"""
elseif @static (isdefined($mod, $rname) && $_scopedname isa Core.Builtin) && f === $_scopedname
$fcall
""")
end
# Extract any intrinsics that support varargs
fva = []
minmin, maxmax = typemax(Int), 0
Expand Down
Loading

0 comments on commit 31e0ba0

Please sign in to comment.