Skip to content

Commit e041bb0

Browse files
authored
Merge branch 'master' into Compiler_abstract_calls_type_assert_Int
2 parents 3bfc3a6 + 502612e commit e041bb0

File tree

136 files changed

+2704
-1493
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+2704
-1493
lines changed

CONTRIBUTING.md

+41-20
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,40 @@ Hi! If you are new to the Julia community: welcome, and thanks for trying Julia.
44

55
If you are already familiar with Julia itself, this blog post by Katharine Hyatt on [Making your first Julia pull request](https://kshyatt.github.io/post/firstjuliapr/) is a great way to get started.
66

7-
## Learning Julia
8-
9-
[The learning page](https://julialang.org/learning) has a great list of resources for new and experienced users alike.
10-
11-
## Before filing an issue
12-
13-
- Reporting a potential bug? Please read the "[How to file a bug report](https://github.com/JuliaLang/julia/blob/master/CONTRIBUTING.md#how-to-file-a-bug-report)" section to make sure that all necessary information is included.
147

15-
- Contributing code? Be sure to review the [contributor checklist](https://github.com/JuliaLang/julia/blob/master/CONTRIBUTING.md#contributor-checklist) for helpful tips on the tools we use to build Julia.
8+
# Table of Contents
169

17-
- Library feature requests are generally not accepted on this issue tracker. New libraries should be developed as [packages](https://julialang.github.io/Pkg.jl/v1/creating-packages/). Discuss ideas for libraries at the [Julia Discourse forum](https://discourse.julialang.org). Doing so will often lead to pointers to existing projects and bring together collaborators with common interests.
10+
1. [Learning Julia](#learning-julia)
11+
2. [Filing an issue](#filing-an-issue)
12+
- [Before filing an issue](#before-filing-an-issue)
13+
- [How to file a bug report](#how-to-file-a-bug-report)
14+
3. [Submitting contributions](#submitting-contributions)
15+
- [Contributor Checklist](#contributor-checklist)
16+
- [Writing tests](#writing-tests)
17+
- [Improving documentation](#improving-documentation)
18+
- [Contributing to core functionality or base libraries](#contributing-to-core-functionality-or-base-libraries)
19+
- [Contributing to the standard library](#contributing-to-the-standard-library)
20+
- [Contributing to patch releases](#contributing-to-patch-releases)
21+
- [Code Formatting Guidelines](#code-formatting-guidelines)
22+
- [Git Recommendations For Pull Requests](#git-recommendations-for-pull-requests)
23+
4. [Resources](#resources)
1824

19-
## Contributor Checklist
20-
21-
* Create a [GitHub account](https://github.com/signup/free).
2225

23-
* [Fork Julia](https://github.com/JuliaLang/julia/fork).
26+
## Learning Julia
2427

25-
* Build the software and libraries (the first time takes a while, but it's fast after that). Detailed build instructions are in the [README](https://github.com/JuliaLang/julia/tree/master/README.md). Julia depends on several external packages; most are automatically downloaded and installed, but are less frequently updated than Julia itself.
28+
[The learning page](https://julialang.org/learning) has a great list of resources for new and experienced users alike.
2629

27-
* Keep Julia current. Julia is a fast-moving target, and many details of the language are still settling out. Keep the repository up-to-date and rebase work-in-progress frequently to make merges simpler.
30+
## Filing an issue
2831

29-
* Learn to use [git](https://git-scm.com), the version control system used by GitHub and the Julia project. Try a tutorial such as the one [provided by GitHub](https://try.GitHub.io/levels/1/challenges/1).
32+
### Before filing an issue
3033

31-
* Review discussions on the [Julia Discourse forum](https://discourse.julialang.org).
34+
- Reporting a potential bug? Please read the "[How to file a bug report](https://github.com/JuliaLang/julia/blob/master/CONTRIBUTING.md#how-to-file-a-bug-report)" section to make sure that all necessary information is included.
3235

33-
* For more detailed tips, read the [submission guide](https://github.com/JuliaLang/julia/blob/master/CONTRIBUTING.md#submitting-contributions) below.
36+
- Contributing code? Be sure to review the [contributor checklist](https://github.com/JuliaLang/julia/blob/master/CONTRIBUTING.md#contributor-checklist) for helpful tips on the tools we use to build Julia.
3437

35-
* Relax and have fun!
38+
- Library feature requests are generally not accepted on this issue tracker. New libraries should be developed as [packages](https://julialang.github.io/Pkg.jl/v1/creating-packages/). Discuss ideas for libraries at the [Julia Discourse forum](https://discourse.julialang.org). Doing so will often lead to pointers to existing projects and bring together collaborators with common interests.
3639

37-
## How to file a bug report
40+
### How to file a bug report
3841

3942
A useful bug report filed as a GitHub issue provides information about how to reproduce the error.
4043

@@ -56,6 +59,24 @@ A useful bug report filed as a GitHub issue provides information about how to re
5659

5760
## Submitting contributions
5861

62+
### Contributor Checklist
63+
64+
* Create a [GitHub account](https://github.com/signup/free).
65+
66+
* [Fork Julia](https://github.com/JuliaLang/julia/fork).
67+
68+
* Build the software and libraries (the first time takes a while, but it's fast after that). Detailed build instructions are in the [README](https://github.com/JuliaLang/julia/tree/master/README.md). Julia depends on several external packages; most are automatically downloaded and installed, but are less frequently updated than Julia itself.
69+
70+
* Keep Julia current. Julia is a fast-moving target, and many details of the language are still settling out. Keep the repository up-to-date and rebase work-in-progress frequently to make merges simpler.
71+
72+
* Learn to use [git](https://git-scm.com), the version control system used by GitHub and the Julia project. Try a tutorial such as the one [provided by GitHub](https://try.GitHub.io/levels/1/challenges/1).
73+
74+
* Review discussions on the [Julia Discourse forum](https://discourse.julialang.org).
75+
76+
* For more detailed tips, read the [submission guide](https://github.com/JuliaLang/julia/blob/master/CONTRIBUTING.md#submitting-contributions) below.
77+
78+
* Relax and have fun!
79+
5980
### Writing tests
6081

6182
There are never enough tests. Track [code coverage at Codecov](https://codecov.io/github/JuliaLang/julia), and help improve it.

Compiler/extras/CompilerDevTools/src/CompilerDevTools.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ end
4747

4848
function Compiler.optimize(interp::SplitCacheInterp, opt::Compiler.OptimizationState, caller::Compiler.InferenceResult)
4949
@invoke Compiler.optimize(interp::Compiler.AbstractInterpreter, opt::Compiler.OptimizationState, caller::Compiler.InferenceResult)
50-
ir = opt.ir::Compiler.IRCode
50+
ir = opt.result.ir::Compiler.IRCode
5151
override = GlobalRef(@__MODULE__(), :with_new_compiler)
5252
for inst in ir.stmts
5353
stmt = inst[:stmt]

Compiler/src/Compiler.jl

+16-21
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ using Core: ABIOverride, Builtin, CodeInstance, IntrinsicFunction, MethodInstanc
4949

5050
using Base
5151
using Base: @_foldable_meta, @_gc_preserve_begin, @_gc_preserve_end, @nospecializeinfer,
52-
BINDING_KIND_GLOBAL, BINDING_KIND_UNDEF_CONST, BINDING_KIND_BACKDATED_CONST, BINDING_KIND_DECLARED,
53-
BINDING_FLAG_DEPWARN,
52+
PARTITION_KIND_GLOBAL, PARTITION_KIND_UNDEF_CONST, PARTITION_KIND_BACKDATED_CONST, PARTITION_KIND_DECLARED,
53+
PARTITION_FLAG_DEPWARN,
5454
Base, BitVector, Bottom, Callable, DataTypeFieldDesc,
5555
EffectsOverride, Filter, Generator, IteratorSize, JLOptions, NUM_EFFECTS_OVERRIDES,
5656
OneTo, Ordering, RefValue, SizeUnknown, _NAMEDTUPLE_NAME,
@@ -69,7 +69,7 @@ using Base: @_foldable_meta, @_gc_preserve_begin, @_gc_preserve_end, @nospeciali
6969
structdiff, tls_world_age, unconstrain_vararg_length, unionlen, uniontype_layout,
7070
uniontypes, unsafe_convert, unwrap_unionall, unwrapva, vect, widen_diagonal,
7171
_uncompressed_ir, maybe_add_binding_backedge!, datatype_min_ninitialized,
72-
partialstruct_undef_length, partialstruct_init_undef
72+
partialstruct_init_undefs, fieldcount_noerror
7373
using Base.Order
7474

7575
import Base: ==, _topmod, append!, convert, copy, copy!, findall, first, get, get!,
@@ -83,10 +83,6 @@ const modifyproperty! = Core.modifyfield!
8383
const replaceproperty! = Core.replacefield!
8484
const _DOCS_ALIASING_WARNING = ""
8585

86-
function _getundef(p::PartialStruct)
87-
Base.getproperty(p, :undef)
88-
end
89-
9086
ccall(:jl_set_istopmod, Cvoid, (Any, Bool), Compiler, false)
9187

9288
eval(x) = Core.eval(Compiler, x)
@@ -197,23 +193,22 @@ end
197193
module IRShow end # relies on string and IO operations defined in Base
198194
baremodule TrimVerifier end # relies on IRShow, so define this afterwards
199195

200-
function load_irshow!()
201-
if isdefined(Base, :end_base_include)
202-
# This code path is exclusively for Revise, which may want to re-run this
203-
# after bootstrap.
204-
Compilerdir = Base.dirname(Base.String(@__SOURCE_FILE__))
205-
include(IRShow, Base.joinpath(Compilerdir, "ssair/show.jl"))
206-
include(TrimVerifier, Base.joinpath(Compilerdir, "verifytrim.jl"))
207-
else
196+
if isdefined(Base, :end_base_include)
197+
# When this module is loaded as the standard library, include these files as usual
198+
include(IRShow, "ssair/show.jl")
199+
include(TrimVerifier, "verifytrim.jl")
200+
else
201+
function load_irshow!()
202+
Base.delete_method(Base.which(verify_typeinf_trim, (IO, Vector{Any}, Bool)),)
208203
include(IRShow, "ssair/show.jl")
209204
include(TrimVerifier, "verifytrim.jl")
210205
end
211-
end
212-
if !isdefined(Base, :end_base_include)
213-
# During bootstrap, skip including this file and defer it to base/show.jl to include later
214-
else
215-
# When this module is loaded as the standard library, include this file as usual
216-
load_irshow!()
206+
function verify_typeinf_trim(io::IO, codeinfos::Vector{Any}, onlywarn::Bool)
207+
# stub implementation
208+
msg = "--trim verifier not defined"
209+
onlywarn ? println(io, msg) : error(msg)
210+
end
211+
# During bootstrap, skip including these files and defer to base/show.jl to include it later
217212
end
218213

219214
end # baremodule Compiler

0 commit comments

Comments
 (0)