forked from JuliaLang/julia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
coreimg.jl
74 lines (59 loc) · 1.61 KB
/
coreimg.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# This file is a part of Julia. License is MIT: https://julialang.org/license
Main.Core.eval(Main.Core, :(baremodule Inference
using Core.Intrinsics
import Core: print, println, show, write, unsafe_write, STDOUT, STDERR
ccall(:jl_set_istopmod, Void, (Bool,), false)
eval(x) = Core.eval(Inference,x)
eval(m,x) = Core.eval(m,x)
include = Core.include
## Load essential files and libraries
include("essentials.jl")
include("generator.jl")
include("reflection.jl")
include("options.jl")
# core operations & types
typealias Cint Int32
typealias Csize_t UInt
include("promotion.jl")
include("tuple.jl")
include("range.jl")
include("expr.jl")
include("error.jl")
# core numeric operations & types
include("bool.jl")
include("number.jl")
include("int.jl")
include("operators.jl")
include("pointer.jl")
const checked_add = +
const checked_sub = -
if !isdefined(Main, :Base)
# conditional to allow redefining Core.Inference after base exists
(::Type{T}){T}(arg) = convert(T, arg)::T
end
# Symbol constructors
Symbol(s::String) = Symbol(s.data)
Symbol(a::Array{UInt8,1}) =
ccall(:jl_symbol_n, Ref{Symbol}, (Ptr{UInt8}, Int32), a, length(a))
# core array operations
include("abstractarray.jl")
include("array.jl")
#TODO: eliminate Dict from inference
include("hashing.jl")
include("nofloat_hashing.jl")
# map-reduce operators
macro simd(forloop)
esc(forloop)
end
include("reduce.jl")
## core structures
include("intset.jl")
include("dict.jl")
include("iterator.jl")
# core docsystem
include("docs/core.jl")
# compiler
include("inference.jl")
ccall(:jl_set_typeinf_func, Void, (Any,), typeinf_ext)
end # baremodule Inference
))