add •internal.Properties for better build parameter detecting
This commit is contained in:
parent
5329a40815
commit
03fc22662b
@ -110,6 +110,7 @@ Namespace of various internal functions. May change at any time.
|
|||||||
| `•internal.Unshare` | Get a unique, reference count 1 version of the argument; recursively unshares array items, doesn't touch namespaces |
|
| `•internal.Unshare` | Get a unique, reference count 1 version of the argument; recursively unshares array items, doesn't touch namespaces |
|
||||||
| `•internal.EEqual` | exactly equal (NaN equals NaN, 0 equals ¯0) |
|
| `•internal.EEqual` | exactly equal (NaN equals NaN, 0 equals ¯0) |
|
||||||
| `•internal.Temp` | place to test new features or temporarily expose some internal function |
|
| `•internal.Temp` | place to test new features or temporarily expose some internal function |
|
||||||
|
| `•internal.Properties` | various build properties |
|
||||||
|
|
||||||
# FFI
|
# FFI
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
/*internal.c*/M(itype,"•internal.Type") M(elType,"•internal.ElType") M(refc,"•internal.Refc") M(isPure,"•internal.IsPure") A(info,"•internal.Info") \
|
/*internal.c*/M(itype,"•internal.Type") M(elType,"•internal.ElType") M(refc,"•internal.Refc") M(isPure,"•internal.IsPure") A(info,"•internal.Info") \
|
||||||
/*internal.c*/M(heapDump,"•internal.HeapDump") M(internalGC,"•internal.GC") M(heapStats,"•internal.HeapStats") A(iObjFlags,"•internal.ObjFlags") \
|
/*internal.c*/M(heapDump,"•internal.HeapDump") M(internalGC,"•internal.GC") M(heapStats,"•internal.HeapStats") A(iObjFlags,"•internal.ObjFlags") \
|
||||||
/*internal.c*/D(eequal,"•internal.EEqual") M(squeeze,"•internal.Squeeze") M(deepSqueeze,"•internal.DeepSqueeze") \
|
/*internal.c*/D(eequal,"•internal.EEqual") M(squeeze,"•internal.Squeeze") M(deepSqueeze,"•internal.DeepSqueeze") \
|
||||||
/*internal.c*/A(internalTemp,"•internal.Temp") M(iHasFill,"•internal.HasFill") M(iKeep,"•internal.Keep") \
|
/*internal.c*/A(internalTemp,"•internal.Temp") M(iHasFill,"•internal.HasFill") M(iKeep,"•internal.Keep") D(iProperties,"•internal.Properties") \
|
||||||
/*internal.c*/D(variation,"•internal.Variation") A(listVariations,"•internal.ListVariations") M(clearRefs,"•internal.ClearRefs") M(unshare,"•internal.Unshare") \
|
/*internal.c*/D(variation,"•internal.Variation") A(listVariations,"•internal.ListVariations") M(clearRefs,"•internal.ClearRefs") M(unshare,"•internal.Unshare") \
|
||||||
/* arithd.c*/D(hypot,"•math.Hypot") D(comb,"•math.Comb") D(gcd,"•math.GCD") D(lcm,"•math.LCM") D(atan2,"•math.Atan2") D(atan2ix,"•math.Atan2⁼") D(atan2iw,"•math.Atan2˜⁼") \
|
/* arithd.c*/D(hypot,"•math.Hypot") D(comb,"•math.Comb") D(gcd,"•math.GCD") D(lcm,"•math.LCM") D(atan2,"•math.Atan2") D(atan2ix,"•math.Atan2⁼") D(atan2iw,"•math.Atan2˜⁼") \
|
||||||
/* arithm.c*/M(sin,"•math.Sin") M(cos,"•math.Cos") M(tan,"•math.Tan") M(asin,"•math.Asin") M(acos,"•math.Acos") M(atan,"•math.Atan") \
|
/* arithm.c*/M(sin,"•math.Sin") M(cos,"•math.Cos") M(tan,"•math.Tan") M(asin,"•math.Asin") M(acos,"•math.Acos") M(atan,"•math.Atan") \
|
||||||
|
|||||||
@ -383,6 +383,15 @@ B iHasFill_c1(B t, B x) {
|
|||||||
B iPureKeep_c1(B t, B x) { return x; }
|
B iPureKeep_c1(B t, B x) { return x; }
|
||||||
B iKeep_c1(B t, B x) { return x; }
|
B iKeep_c1(B t, B x) { return x; }
|
||||||
|
|
||||||
|
B iProperties_c2(B t, B w, B x) {
|
||||||
|
if (w.u!=m_c32(0).u || x.u != m_c32(0).u) thrM("•internal.Properties: bad arg");
|
||||||
|
i32* rp;
|
||||||
|
B r = m_i32arrv(&rp, 2);
|
||||||
|
rp[0] = sizeof(usz)*8;
|
||||||
|
rp[1] = PROPER_FILLS;
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
B unshare_c1(B t, B x) {
|
B unshare_c1(B t, B x) {
|
||||||
if (!isArr(x)) thrM("•internal.Unshare: Argument must be an array");
|
if (!isArr(x)) thrM("•internal.Unshare: Argument must be an array");
|
||||||
B r = unshare(x);
|
B r = unshare(x);
|
||||||
@ -404,8 +413,8 @@ B getInternalNS(void) {
|
|||||||
#undef F
|
#undef F
|
||||||
|
|
||||||
#define F(X) incG(bi_##X),
|
#define F(X) incG(bi_##X),
|
||||||
Body* d = m_nnsDesc("type","eltype","refc","squeeze","ispure","info", "keep", "purekeep","listvariations","variation","clearrefs", "hasfill","unshare","deepsqueeze","heapdump","eequal", "gc", "temp","heapstats", "objflags");
|
Body* d = m_nnsDesc("type","eltype","refc","squeeze","ispure","info", "keep", "purekeep","listvariations","variation","clearrefs", "hasfill","unshare","deepsqueeze","heapdump","eequal", "gc", "temp","heapstats", "objflags", "properties");
|
||||||
internalNS = m_nns(d,F(itype)F(elType)F(refc)F(squeeze)F(isPure)F(info)F(iKeep)F(iPureKeep)F(listVariations)F(variation)F(clearRefs)F(iHasFill)F(unshare)F(deepSqueeze)F(heapDump)F(eequal)F(internalGC)F(internalTemp)F(heapStats)F(iObjFlags));
|
internalNS = m_nns(d,F(itype)F(elType)F(refc)F(squeeze)F(isPure)F(info)F(iKeep)F(iPureKeep)F(listVariations)F(variation)F(clearRefs)F(iHasFill)F(unshare)F(deepSqueeze)F(heapDump)F(eequal)F(internalGC)F(internalTemp)F(heapStats)F(iObjFlags)F(iProperties));
|
||||||
#undef F
|
#undef F
|
||||||
gc_add(internalNS);
|
gc_add(internalNS);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -39,7 +39,9 @@ o ← {
|
|||||||
heapverify ⇐ ∨´i=6
|
heapverify ⇐ ∨´i=6
|
||||||
debug ⇐ ∨´i=7
|
debug ⇐ ∨´i=7
|
||||||
noCatch ⇐ ∨´i=8
|
noCatch ⇐ ∨´i=8
|
||||||
properFills ⇐ {noerr? 0; 1 0∘↑⎊1 ⟨⟩}
|
|
||||||
|
pr ← {⟨P⇐Properties⟩: @P@; 32‿0} •internal
|
||||||
|
properFills ⇐ 1⊑pr
|
||||||
noerr∨↩ heapverify
|
noerr∨↩ heapverify
|
||||||
update∧↩ ¬heapverify
|
update∧↩ ¬heapverify
|
||||||
files ⇐ (i=≠named)/args
|
files ⇐ (i=≠named)/args
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user