don't do useless copies in initialization
This commit is contained in:
parent
e49fcd3449
commit
3e9093af7b
11
cc.bqn
11
cc.bqn
@ -30,15 +30,16 @@ OAny ← ≡◶⟨@⊸≤◶ONum‿OChr, OStr, ⊑⟩
|
||||
List ← (0<≠)◶⟨"",1↓·∾","⊸∾¨⟩
|
||||
ShortList ← {"m_lv"∾𝕨∾"_"∾(F≠𝕩)∾"("∾(List𝕩)∾")"}
|
||||
LongList ← {"m_ca"∾𝕨∾"("∾(F≠𝕩)∾",("∾𝕨∾"[]){"∾(List𝕩)∾"})"}
|
||||
MakeList ← (≠∘⊢>4˙)◶ShortList‿LongList
|
||||
Li ← {"i32" MakeList F¨𝕩}
|
||||
_Lo ← {"B" MakeList 𝔽¨𝕩}
|
||||
ConstList ← {"m_ca"∾𝕨∾"("∾(F≠𝕩)∾",({static "∾𝕨∾" l_[]={"∾(List𝕩)∾"};l_;}))"}
|
||||
_makeList ← {𝕨 (≠∘⊢>4˙)◶⟨ShortList,𝕗⊑LongList‿ConstList⟩ 𝕩}
|
||||
Li ← {"i32" 1 _makeList F¨𝕩}
|
||||
_Lo ← {"B" 0 _makeList 𝔽¨𝕩}
|
||||
|
||||
|
||||
glyphs ← Import "glyphs.bqn"
|
||||
_getComp ← { (4+2×useInd)↑ <∘⊢∾˜ 5↑ (𝕗 Import "c.bqn"){𝔽} }
|
||||
useInd ← "-i"≡⊑args ⋄ args↓˜↩useInd
|
||||
Comp ← ((<"inc(runtime["∾F∾"])"˙)¨↕≠∾glyphs) glyphs _getComp ⊢
|
||||
Comp ← ((<"incG(runtime["∾F∾"])"˙)¨↕≠∾glyphs) glyphs _getComp ⊢
|
||||
J ← ∾∾⟜(@+10)¨
|
||||
|
||||
Fout ← {((≠𝕩)↑⟨Li ⋄ OAny _Lo ⋄ =◶⟨ONum,Li _Lo⟩ _Lo _Lo ⋄ (Li 2⊸↑) _Lo ⋄ Li _Lo ⋄ OStr⟩) {𝕎𝕩}¨ 𝕩}
|
||||
@ -48,7 +49,7 @@ LFC ← Long∘Fout∘Comp
|
||||
|
||||
RT ← {
|
||||
src‿need‿inputs←𝕩Import"pr.bqn"
|
||||
pr←"runtime_0"‿"provide"{(∾𝕨<⊸(<∘{∾"inc("‿𝕨‿"["‿𝕩‿"])"}⟜F¨)⟜(↕≠)¨𝕩)⊏˜(∾𝕩)⊐∾need}○((-1+1=𝕩)⊸↑)inputs
|
||||
pr←"runtime_0"‿"provide"{(∾𝕨<⊸(<∘{∾"incG("‿𝕨‿"["‿𝕩‿"])"}⟜F¨)⟜(↕≠)¨𝕩)⊏˜(∾𝕩)⊐∾need}○((-1+1=𝕩)⊸↑)inputs
|
||||
Long Fout pr need _getComp src
|
||||
}
|
||||
CArg ← {J (¯5⊸↓∾𝕩˙)⌾⊑ FLines "c.bqn"}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user