From dca825686fa9c2e0ba6ad240a98f6b0a16e2c89b Mon Sep 17 00:00:00 2001 From: Lyndon White Date: Wed, 5 Oct 2016 20:11:43 +0800 Subject: [PATCH] =haul in master (something went wrong in rebase?) --- base/sysimg.jl | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/base/sysimg.jl b/base/sysimg.jl index 01ac383882973..8e5dd922b6594 100644 --- a/base/sysimg.jl +++ b/base/sysimg.jl @@ -4,7 +4,19 @@ baremodule Base using Core.Intrinsics ccall(:jl_set_istopmod, Void, (Bool,), true) -include = Core.include +function include(path::AbstractString) + local result + if INCLUDE_STATE === 1 + result = Core.include(path) + elseif INCLUDE_STATE === 2 + result = _include(path) + elseif INCLUDE_STATE === 3 + result = include_from_node1(path) + end + result +end +INCLUDE_STATE = 1 # include = Core.include + include("coreio.jl") eval(x) = Core.eval(Base,x) @@ -68,9 +80,9 @@ end Symbol(x...) = Symbol(string(x...)) # array structures +include("array.jl") include("abstractarray.jl") include("subarray.jl") -include("array.jl") # Array convenience converting constructors (::Type{Array{T}}){T}(m::Integer) = Array{T,1}(Int(m)) @@ -102,7 +114,6 @@ include("multinverses.jl") using .MultiplicativeInverses include("abstractarraymath.jl") include("arraymath.jl") -include("float16.jl") # SIMD loops include("simdloop.jl") @@ -205,7 +216,7 @@ include("permuteddimsarray.jl") using .PermutedDimsArrays let SOURCE_PATH = "" - global include = function(path) + global function _include(path) prev = SOURCE_PATH path = joinpath(dirname(prev),path) SOURCE_PATH = path @@ -213,6 +224,7 @@ let SOURCE_PATH = "" SOURCE_PATH = prev end end +INCLUDE_STATE = 2 # include = _include (from lines above) # reduction along dims include("reducedim.jl") # macros in this file relies on string.jl @@ -375,7 +387,7 @@ function __init__() init_threadcall() end -include = include_from_node1 +INCLUDE_STATE = 3 # include = include_from_node1 include("precompile.jl") end # baremodule Base