Skip to content

Commit

Permalink
Merge pull request #72 from JuliaDebug/teh/more_28
Browse files Browse the repository at this point in the history
More like #28
  • Loading branch information
timholy authored Feb 26, 2019
2 parents 6b78715 + 3ab4639 commit 2c8ca6e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ version = "0.1.1"

[deps]
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"

[extras]
Expand Down
9 changes: 9 additions & 0 deletions src/JuliaInterpreter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ using Core: CodeInfo, SSAValue, SlotNumber, TypeMapEntry, SimpleVector, LineInfo
GeneratedFunctionStub, MethodInstance, NewvarNode, TypeName

using UUIDs
# The following are for circumventing #28, memcpy invalid instruction error,
# in Base and stdlib
using Random.DSFMT
using InteractiveUtils

export @enter, @make_stack, @interpret, Compiled, JuliaStackFrame

Expand Down Expand Up @@ -1065,6 +1069,11 @@ function set_compiled_methods()
push!(compiled_methods, which(vcat, (Vector,)))
push!(compiled_methods, first(methods(Base._getindex_ra)))
push!(compiled_methods, first(methods(Base._setindex_ra!)))
push!(compiled_methods, which(Base.decompose, (BigFloat,)))
push!(compiled_methods, @eval DSFMT which(dsfmt_jump, (DSFMT_state, GF2X)))
if Sys.iswindows()
push!(compiled_methods, which(InteractiveUtils.clipboard, (AbstractString,)))
end
end

function __init__()
Expand Down
6 changes: 5 additions & 1 deletion test/juliatests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,17 @@ function test_path(test)
end

nstmts = 10^4 # very quick, aborts a lot
outputfile = "results.md"
i = 1
while i <= length(ARGS)
global i
a = ARGS[i]
if a == "--nstmts"
global nstmts = parse(Int, ARGS[i+1])
deleteat!(ARGS, i:i+1)
elseif a == "--output"
global outputfile = ARGS[i+1]
deleteat!(ARGS, i:i+1)
else
i += 1
end
Expand Down Expand Up @@ -136,7 +140,7 @@ move_to_node1("Distributed")
foreach(wait, all_tasks)
end

open("results.md", "w") do io
open(outputfile, "w") do io
versioninfo(io)
println(io, "Test run at: ", now())
println(io)
Expand Down

0 comments on commit 2c8ca6e

Please sign in to comment.