Test script that gives an error:
using LLVM
ctx = Context()
mod = parse(LLVM.Module, """
%jl_value_t = type opaque
define i64 @fun() {
top:
Test script that gives an error:
using LLVM
ctx = Context()
mod = parse(LLVM.Module, """
%jl_value_t = type opaque
define i64 @fun() {
top:
using LLVM | |
using LLVM.Interop | |
using TypedCodeUtils | |
import TypedCodeUtils: reflect, filter, lookthrough, canreflect, | |
DefaultConsumer, Reflection, Callsite, | |
identify_invoke, identify_call, identify_foreigncall, | |
process_invoke, process_call | |
using MacroTools | |
I'm trying to replace inttoptr
uses that happen when ccall
s are generated. I've gotten as far as drilling down to the operand with inttoptr
, but I can't figure out the next step.
using LLVM
ctx = Context()
mod = parse(LLVM.Module, """
define double @fun() {
top:
%0 = call double inttoptr (i32 -137186077 to double ()*)()
function fun(a, b) | |
# hello World | |
return a + b # hi | |
end | |
""" | |
Hello World | |
""" | |
############################################################### |
I'm attempting to make an LLVM.jl pass that removes address spaces. I'm doing this because LLVM's WebAssembly backend has errors because of the use of address spaces.
The pass removes addrspacecast
instructions and removes address spaces in arguments of function declarations.
To fix the arguments of function declarations, first create a new function with fixed arguments, then replace the original with that.
The pass currently fails verify()
.
using LLVM
ctx = Context()
Julia's runtime provides a lot of functionality used by base Julia code. A subset of this is needed to support basic data structures like arrays, dicts, and strings. Here is a list of the ccall
's used by base Julia code. The most important ones for basic wasm support are:
# most important
abstractdict.jl
:jl_eqtable_get
:jl_eqtable_nextind
:jl_eqtable_pop
:jl_eqtable_put
:jl_idtable_rehash
Run the Julia code below, and it'll pop up a window with an image.
Select the window. Move the mouse around, and hit the f
key.
A red marker should appear.
I used the keyboard with the mouse because my application had several different features I wanted to pick out. You could adapt this to use the mouse buttons.
julia> using OpenDSSDirect | |
julia> using OpenDSSDirect.DSS | |
shell> cd C:\\PortableApps\\OpenDSS\\electricdss-git\\Distrib\\IEEETestCases\\13Bus | |
C:\PortableApps\OpenDSS\electricdss-git\Distrib\IEEETestCases\13Bus | |
julia> dss("redirect IEEE13Nodeckt.dss") | |
"" |
var config = { | |
port: 8080, | |
ipWhitelist: [], // Set [] to allow all IP addresses. | |
language: "en", | |
timeFormat: 12, | |
units: "imperial", | |
modules: [ | |
{ | |
module: 'MMM-ProfileSwitcher', |
using JuMP | |
function Base.real{T <: JuMP.JuMPTypes}(x::Matrix{T}) | |
@assert size(x,1) == 2 | |
vec(x[1,:]) | |
end | |
function Base.imag{T <: JuMP.JuMPTypes}(x::Matrix{T}) | |
@assert size(x,1) == 2 | |
vec(x[2,:]) | |
end |