Simple way to reduce the code size: check for common pattern...
Ah thanks for pointing this out! Indeed I should have noticed this one.
The reason I do this is because python allows slice indecies to be out-of-bound:
Python 3.9.6 (default, Jun 28 2021, 08:57:49)
[GCC 10.3.0] on linux
Type "help", "copyright", "credits"…
I just have a quick look at this. One problem I see is the use of conditions, zext it and do multiplication to implement something like
c if cond else 0
. Please use the…
This fast path handles this 2 cases:
a[::] = b[::]
(both lhs and rhs are list slices)a[::] = [..]
(lhs is list slice and rhs is a new list).
Without this fast path, all the list slice…
tbh do we really need 700+ lines for this feature? it doesn't make sense to me... I thought it would be relatively simple to implement those functions in (multiple) memmove.
Sure, the core is…
Since there are metadata and attributes inside the function body
Even with wasm32 target?
Yes, the attached file is the output from running unwrapped clang:
clang --target=wasm32…
Yes this gets a bit ugly.. I just found that the enum in rust can be numeric, so I can write the indecies like this. But I…
Oh sure I can delete this. But I think this should be ok since cargo will just ignore all the printed out lines that are not started with cargo:
in build scripts.
I think including only the parts we want (the function definitions) instead of removing the others might be more robust. That
awk
command does that. Later LLVM versions could add other unwanted…
In fact we really just want the functions...
clang --target=wasm32 ./slice_assign.c -emit-llvm -S -o -
Oh I see, you mean that it doesn't like the included raw bitcode when targeting rv32.
Yes.