We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
create_result
AbstractDict
1 parent a25cef4 commit 765ca33Copy full SHA for 765ca33
src/Compiler.jl
@@ -623,17 +623,27 @@ function create_result(
623
)
624
625
if !haskey(result_cache, tocopy)
626
- ar = create_result(pairs(tocopy), path, args...)
627
sym = Symbol("result", var_idx[])
628
var_idx[] += 1
629
630
push!(
631
resultgen_code,
632
quote
633
- $sym = $D($ar)
+ $sym = $D()
634
end,
635
+
636
result_cache[tocopy] = sym
637
638
+ for (k, v) in pairs(tocopy)
639
+ subexpr = create_result(v, append_path(path, k), args...)
640
+ push!(
641
+ resultgen_code,
642
+ quote
643
+ @inbounds $sym[$k] = $subexpr
644
+ end,
645
+ )
646
+ end
647
end
648
649
return quote
0 commit comments