Make fixes, improvements, and chibicc python bindings

- python now mixes audio 10x faster
- python octal notation is restored
- chibicc now builds code 3x faster
- chibicc now has help documentation
- chibicc can now generate basic python bindings
- linenoise now supports some paredit-like features

See #141
This commit is contained in:
Justine Tunney 2021-10-08 08:11:51 -07:00
parent 28997f3acb
commit 7061c79c22
121 changed files with 5272 additions and 1928 deletions

View file

@ -17,11 +17,27 @@
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/nexgen32e/nexgen32e.h"
#include "libc/runtime/gc.internal.h"
#include "libc/str/str.h"
#include "libc/testlib/ezbench.h"
#include "libc/testlib/hyperion.h"
#include "libc/testlib/testlib.h"
#include "libc/x/x.h"
TEST(strsak32, test) {
EXPECT_EQ(0, wcslen(L""));
EXPECT_EQ(1, wcslen(L"1"));
EXPECT_EQ(5, wcslen(L"hello"));
}
BENCH(strsak32, bench) {
size_t wcslen_(const wchar_t *) asm("wcslen");
wchar_t *p = gc(utf8toutf32(kHyperion, kHyperionSize, 0));
EZBENCH_N("wcslen", kHyperionSize, wcslen_(p));
for (int i = 128; i >= 2; i /= 2) {
p[i - 0] = 0;
EZBENCH_N("wcslen", i - 0, wcslen_(p));
p[i - 1] = 0;
EZBENCH_N("wcslen", i - 1, wcslen_(p));
}
}