fix •file.MapBytes
This commit is contained in:
parent
09bdeb7fd8
commit
79b0bda0d3
@ -830,7 +830,7 @@ B select_rows_direct(B x, ux csz, ux cam, void* inds, ux indn, u8 ie) { // ⥊ (
|
||||
|
||||
generic_int:;
|
||||
assert(ie!=el_bit && generic_allowed);
|
||||
B indo = taga(arr_shVec(m_tyslice(inds, a(emptyIVec()), ie, indn)));
|
||||
B indo = taga(arr_shVec(m_tyslice(inds, a(emptyIVec()), t_i8arr + ie-el_i8, indn)));
|
||||
return select_cells_base(indo, x, csz, cam);
|
||||
|
||||
decG_ret:;
|
||||
|
||||
@ -96,9 +96,9 @@ SHOULD_INLINE u8 kCellWidthLog(B x, ur k) {
|
||||
}
|
||||
SHOULD_INLINE u8 cellWidthLog(B x) { return kCellWidthLog(x, 1); }
|
||||
|
||||
static Arr* m_tyslice(void* data, Arr* parent, u8 eltype, ux ia) {
|
||||
assert(eltype!=el_bit && eltype!=el_B);
|
||||
Arr* a = m_arr(sizeof(TySlice), t_i8slice + eltype-el_i8, ia);
|
||||
static Arr* m_tyslice(void* data, Arr* parent, u8 type, ux ia) {
|
||||
assert(IS_ANY_ARR(type) && IS_SLICE(type));
|
||||
Arr* a = m_arr(sizeof(TySlice), type, ia);
|
||||
((TySlice*) a)->p = parent;
|
||||
((TySlice*) a)->a = data;
|
||||
return a;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# not tested here: •Out •Show •Exit •GetLine •Cmp •CurrentError •FFI •internal.HeapDump •file.MapBytes
|
||||
# not tested here: •Out •Show •Exit •GetLine •Cmp •CurrentError •FFI •internal.HeapDump
|
||||
|
||||
%DEF var V←•internal.Variation ⋄ LV←•internal.ListVariations ⋄ CLR←•internal.ClearRefs
|
||||
%DEF tvar %USE var ⋄ _tvar ← {F _𝕣 x: (CLR@) ⊢ {F 𝕩 V x}¨ LV 𝕩; w F _𝕣 x: (CLR@) ⊢ (LV 𝕨) {(𝕨 V w) F 𝕩 V x}⌜ LV 𝕩}
|
||||
@ -129,6 +129,7 @@ f←•ReBQN{primitives⇐⋈'÷'‿- ⋄ system⇐⟨"primitives", "foo"‿⋈,
|
||||
•FChars "testfile.bqn" %% "abc"∾(@+10)∾"def𝕩"
|
||||
•FBytes "testfile.bqn" %% @+97‿98‿99‿10‿100‿101‿102‿240‿157‿149‿169
|
||||
•FLines "testfile.bqn" %% "abc"‿"def𝕩"
|
||||
! 97‿98‿99‿10‿100‿101‿102‿240‿157‿149‿169 ≡ @-˜ •file.MapBytes "testfile.bqn"
|
||||
|
||||
•file.Name "testfile3B.bqn" •file.Rename "testfile3.bqn" %% "testfile3B.bqn"
|
||||
!"•file.Rename: Failed to rename file" % "testfile3B.bqn" •file.Rename "testfile.bqn"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
!"Out of memory" % a←(2⋆20) ⥊ 1e9 ⋄ {𝕊: a}˘ a
|
||||
!"⥊: 𝕨 too large" % a←(2⋆20) ⥊ 1e9 ⋄ a˘ a
|
||||
!"Out of memory" % (2⋆25)/(2⋆10)⥊10
|
||||
!"Out of memory" % k←16384 ⋄ n←k÷˜2⋆32 ⋄ (n⥊k) / n⥊1
|
||||
!"Out of memory" % k←64 ⋄ n←k÷˜2⋆32 ⋄ (n⥊k) / n⥊1 # %SLOW
|
||||
!"Out of memory" % ∾˜⍟31 ↕2 # %SLOW
|
||||
!"Out of memory" % a←(2⋆20) ⥊ 1e9 ⋄ ≠•internal.Keep {𝕊: a}˘ a
|
||||
!"⥊: 𝕨 too large" % a←(2⋆20) ⥊ 1e9 ⋄ ≠•internal.Keep a˘ a
|
||||
!"Out of memory" % ≠•internal.Keep (2⋆25)/(2⋆10)⥊10
|
||||
!"Out of memory" % k←16384 ⋄ n←k÷˜2⋆32 ⋄ ≠•internal.Keep (n⥊k) / n⥊1
|
||||
!"Out of memory" % k←64 ⋄ n←k÷˜2⋆32 ⋄ ≠•internal.Keep (n⥊k) / n⥊1 # %SLOW
|
||||
!"Out of memory" % ≠•internal.Keep ∾˜⍟31 ↕2 # %SLOW
|
||||
|
||||
Loading…
Reference in New Issue
Block a user