You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry for the undescriptive title but I don't understand what's happening here at all.
I was trying to do the llvm Kaleidoscope tutorial in julia and in the middle of writing the parser I was met with a very confusing behaviour. Here is the smallest code I could reproduce the problem with (sorry if it's still too big). What happens seems to change, sometimes it crashes, sometimes things like this happen:
julia> include("c:/github/kaleidoscope/src/old/error_test.jl")
WARNING: replacing module ErrorTest
expr
primary 1
primary 4
identifier 1
args
expr
primary 1
primary 2
Should return: ErrorTest.AST.Numeric{Int64}(1)
EX: args
TYPE: args
ERROR: LoadError: MethodError: `convert` has no method matching convert(::Type{ErrorTest.AST.Expression}, ::ASCIIString)
This may have arisen from a call to the constructor ErrorTest.AST.Expression(...),
since type constructors fall back to convert methods.
Closest candidates are:
call{T}(::Type{T}, ::Any)
convert{T}(::Type{T}, ::T)
in push! at array.jl:419
in parse_args! at c:\github\kaleidoscope\src\old\error_test.jl:98
in parse_identifier! at c:\github\kaleidoscope\src\old\error_test.jl:82
in parse_primary! at c:\github\kaleidoscope\src\old\error_test.jl:72
in parse_expr! at c:\github\kaleidoscope\src\old\error_test.jl:53
in include at boot.jl:259
in include_from_node1 at loading.jl:266
while loading c:\github\kaleidoscope\src\old\error_test.jl, in expression starting on line 115
expr through primary 2 are the functions being called, Should return is the value that should be returned to here, EX is the value actually returned, and TYPE is the type of the value, and somehow they're the same...? A few times EX was blank and julia crashes before TYPE is printed, but I couldn't reproduce that anymore.
Other inputs to parse_expr! seemed to work fine. "f()" works, "1" works, "x" works, only when it's called from within parse_args! does this happen.
I tried this both on linux and windows, and on 0.4 and 0.3, and the same thing happened.
For 0.4 I am using:
Version 0.4.0-dev+6859 (2015-08-20 19:38 UTC)
Commit 92ddae7 (0 days old master)
Am I missing something obvious? I really don't understand this.
The text was updated successfully, but these errors were encountered:
Sorry for the undescriptive title but I don't understand what's happening here at all.
I was trying to do the llvm Kaleidoscope tutorial in julia and in the middle of writing the parser I was met with a very confusing behaviour. Here is the smallest code I could reproduce the problem with (sorry if it's still too big). What happens seems to change, sometimes it crashes, sometimes things like this happen:
expr
throughprimary 2
are the functions being called,Should return
is the value that should be returned to here,EX
is the value actually returned, andTYPE
is the type of the value, and somehow they're the same...? A few timesEX
was blank and julia crashes beforeTYPE
is printed, but I couldn't reproduce that anymore.Other inputs to
parse_expr!
seemed to work fine."f()"
works,"1"
works,"x"
works, only when it's called from withinparse_args!
does this happen.I tried this both on linux and windows, and on 0.4 and 0.3, and the same thing happened.
For 0.4 I am using:
Am I missing something obvious? I really don't understand this.
The text was updated successfully, but these errors were encountered: