mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 03:27:39 +00:00
Release redbean 2.0.1
This commit is contained in:
parent
8b13e1acc8
commit
42b34c26f8
7 changed files with 67 additions and 101 deletions
|
@ -967,7 +967,7 @@ DLLEXE = DLLSTD
|
|||
// ││││││││ │ │┌6:Contains Initialized Data
|
||||
// ││││││││ o │ ││┌5:Contains Code
|
||||
// ││││││││┌┴─┐rrrr│ ooror│││rorrr
|
||||
PETEXT = 0b01110000000000000000000001100000
|
||||
PETEXT = 0b01100000000000000000000001100000
|
||||
PEDATA = 0b11000000000000000000000011000000
|
||||
PEIMPS = 0b11000000000000000000000001000000
|
||||
|
||||
|
|
|
@ -17,29 +17,7 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/fmt/itoa.h"
|
||||
|
||||
static const uint64_t kTens[] = {
|
||||
1ull,
|
||||
10ull,
|
||||
100ull,
|
||||
1000ull,
|
||||
10000ull,
|
||||
100000ull,
|
||||
1000000ull,
|
||||
10000000ull,
|
||||
100000000ull,
|
||||
1000000000ull,
|
||||
10000000000ull,
|
||||
100000000000ull,
|
||||
1000000000000ull,
|
||||
10000000000000ull,
|
||||
100000000000000ull,
|
||||
1000000000000000ull,
|
||||
10000000000000000ull,
|
||||
100000000000000000ull,
|
||||
1000000000000000000ull,
|
||||
10000000000000000000ull,
|
||||
};
|
||||
#include "libc/nexgen32e/nexgen32e.h"
|
||||
|
||||
static const unsigned char kTensIndex[] = {
|
||||
0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, //
|
||||
|
|
61
libc/nexgen32e/ktens.S
Normal file
61
libc/nexgen32e/ktens.S
Normal file
|
@ -0,0 +1,61 @@
|
|||
/*-*- mode:unix-assembly; indent-tabs-mode:t; tab-width:8; coding:utf-8 -*-│
|
||||
│vi: set et ft=asm ts=8 tw=8 fenc=utf-8 :vi│
|
||||
╞══════════════════════════════════════════════════════════════════════════════╡
|
||||
│ Copyright 2022 Justine Alexandra Roberts Tunney │
|
||||
│ │
|
||||
│ Permission to use, copy, modify, and/or distribute this software for │
|
||||
│ any purpose with or without fee is hereby granted, provided that the │
|
||||
│ above copyright notice and this permission notice appear in all copies. │
|
||||
│ │
|
||||
│ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL │
|
||||
│ WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED │
|
||||
│ WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE │
|
||||
│ AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL │
|
||||
│ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR │
|
||||
│ PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER │
|
||||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/macros.internal.h"
|
||||
|
||||
// static const uint64_t kTens[] = {
|
||||
// 1ull,
|
||||
// 10ull,
|
||||
// 100ull,
|
||||
// 1000ull,
|
||||
// 10000ull,
|
||||
// 100000ull,
|
||||
// 1000000ull,
|
||||
// 10000000ull,
|
||||
// 100000000ull,
|
||||
// 1000000000ull,
|
||||
// 10000000000ull,
|
||||
// 100000000000ull,
|
||||
// 1000000000000ull,
|
||||
// 10000000000000ull,
|
||||
// 100000000000000ull,
|
||||
// 1000000000000000ull,
|
||||
// 10000000000000000ull,
|
||||
// 100000000000000000ull,
|
||||
// 1000000000000000000ull,
|
||||
// 10000000000000000000ull,
|
||||
// };
|
||||
|
||||
.initbss 201,_init_kTens
|
||||
kTens: .rept 20
|
||||
.quad 0
|
||||
.endr
|
||||
.endobj kTens,globl
|
||||
.previous
|
||||
|
||||
.init.start 201,_init_kTens
|
||||
push $20
|
||||
pop %rcx
|
||||
push $10
|
||||
pop %r8
|
||||
push $1
|
||||
pop %rax
|
||||
1: stosq
|
||||
mul %r8
|
||||
.loop 1b
|
||||
.init.end 201,_init_kTens
|
|
@ -4,6 +4,7 @@
|
|||
COSMOPOLITAN_C_START_
|
||||
|
||||
extern long kHalfCache3;
|
||||
extern const uint64_t kTens[20];
|
||||
|
||||
void imapxlatab(void *);
|
||||
void insertionsort(int32_t *, size_t);
|
||||
|
|
|
@ -3253,63 +3253,6 @@ imp 'DDCCISetVCPFeature' DDCCISetVCPFeature gdi32 1320
|
|||
imp 'DPtoLP' DPtoLP gdi32 1321
|
||||
imp 'DdCreateFullscreenSprite' DdCreateFullscreenSprite gdi32 1322
|
||||
imp 'DdDestroyFullscreenSprite' DdDestroyFullscreenSprite gdi32 1323
|
||||
imp 'DdEntry0' DdEntry0 gdi32 1324
|
||||
imp 'DdEntry1' DdEntry1 gdi32 1325
|
||||
imp 'DdEntry10' DdEntry10 gdi32 1326
|
||||
imp 'DdEntry11' DdEntry11 gdi32 1327
|
||||
imp 'DdEntry12' DdEntry12 gdi32 1328
|
||||
imp 'DdEntry13' DdEntry13 gdi32 1329
|
||||
imp 'DdEntry14' DdEntry14 gdi32 1330
|
||||
imp 'DdEntry15' DdEntry15 gdi32 1331
|
||||
imp 'DdEntry16' DdEntry16 gdi32 1332
|
||||
imp 'DdEntry17' DdEntry17 gdi32 1333
|
||||
imp 'DdEntry18' DdEntry18 gdi32 1334
|
||||
imp 'DdEntry19' DdEntry19 gdi32 1335
|
||||
imp 'DdEntry2' DdEntry2 gdi32 1336
|
||||
imp 'DdEntry20' DdEntry20 gdi32 1337
|
||||
imp 'DdEntry21' DdEntry21 gdi32 1338
|
||||
imp 'DdEntry22' DdEntry22 gdi32 1339
|
||||
imp 'DdEntry23' DdEntry23 gdi32 1340
|
||||
imp 'DdEntry24' DdEntry24 gdi32 1341
|
||||
imp 'DdEntry25' DdEntry25 gdi32 1342
|
||||
imp 'DdEntry26' DdEntry26 gdi32 1343
|
||||
imp 'DdEntry27' DdEntry27 gdi32 1344
|
||||
imp 'DdEntry28' DdEntry28 gdi32 1345
|
||||
imp 'DdEntry29' DdEntry29 gdi32 1346
|
||||
imp 'DdEntry3' DdEntry3 gdi32 1347
|
||||
imp 'DdEntry30' DdEntry30 gdi32 1348
|
||||
imp 'DdEntry31' DdEntry31 gdi32 1349
|
||||
imp 'DdEntry32' DdEntry32 gdi32 1350
|
||||
imp 'DdEntry33' DdEntry33 gdi32 1351
|
||||
imp 'DdEntry34' DdEntry34 gdi32 1352
|
||||
imp 'DdEntry35' DdEntry35 gdi32 1353
|
||||
imp 'DdEntry36' DdEntry36 gdi32 1354
|
||||
imp 'DdEntry37' DdEntry37 gdi32 1355
|
||||
imp 'DdEntry38' DdEntry38 gdi32 1356
|
||||
imp 'DdEntry39' DdEntry39 gdi32 1357
|
||||
imp 'DdEntry4' DdEntry4 gdi32 1358
|
||||
imp 'DdEntry40' DdEntry40 gdi32 1359
|
||||
imp 'DdEntry41' DdEntry41 gdi32 1360
|
||||
imp 'DdEntry42' DdEntry42 gdi32 1361
|
||||
imp 'DdEntry43' DdEntry43 gdi32 1362
|
||||
imp 'DdEntry44' DdEntry44 gdi32 1363
|
||||
imp 'DdEntry45' DdEntry45 gdi32 1364
|
||||
imp 'DdEntry46' DdEntry46 gdi32 1365
|
||||
imp 'DdEntry47' DdEntry47 gdi32 1366
|
||||
imp 'DdEntry48' DdEntry48 gdi32 1367
|
||||
imp 'DdEntry49' DdEntry49 gdi32 1368
|
||||
imp 'DdEntry5' DdEntry5 gdi32 1369
|
||||
imp 'DdEntry50' DdEntry50 gdi32 1370
|
||||
imp 'DdEntry51' DdEntry51 gdi32 1371
|
||||
imp 'DdEntry52' DdEntry52 gdi32 1372
|
||||
imp 'DdEntry53' DdEntry53 gdi32 1373
|
||||
imp 'DdEntry54' DdEntry54 gdi32 1374
|
||||
imp 'DdEntry55' DdEntry55 gdi32 1375
|
||||
imp 'DdEntry56' DdEntry56 gdi32 1376
|
||||
imp 'DdEntry6' DdEntry6 gdi32 1377
|
||||
imp 'DdEntry7' DdEntry7 gdi32 1378
|
||||
imp 'DdEntry8' DdEntry8 gdi32 1379
|
||||
imp 'DdEntry9' DdEntry9 gdi32 1380
|
||||
imp 'DdNotifyFullscreenSpriteUpdate' DdNotifyFullscreenSpriteUpdate gdi32 1381
|
||||
imp 'DdQueryVisRgnUniqueness' DdQueryVisRgnUniqueness gdi32 1382
|
||||
imp 'DeleteColorSpace' DeleteColorSpace gdi32 1383
|
||||
|
@ -3441,22 +3384,6 @@ imp 'GdiDllInitialize' GdiDllInitialize gdi32 1514
|
|||
imp 'GdiDrawStream' GdiDrawStream gdi32 1515
|
||||
imp 'GdiEndDocEMF' GdiEndDocEMF gdi32 1516
|
||||
imp 'GdiEndPageEMF' GdiEndPageEMF gdi32 1517
|
||||
imp 'GdiEntry1' GdiEntry1 gdi32 1518
|
||||
imp 'GdiEntry10' GdiEntry10 gdi32 1519
|
||||
imp 'GdiEntry11' GdiEntry11 gdi32 1520
|
||||
imp 'GdiEntry12' GdiEntry12 gdi32 1521
|
||||
imp 'GdiEntry13' GdiEntry13 gdi32 1522
|
||||
imp 'GdiEntry14' GdiEntry14 gdi32 1523
|
||||
imp 'GdiEntry15' GdiEntry15 gdi32 1524
|
||||
imp 'GdiEntry16' GdiEntry16 gdi32 1525
|
||||
imp 'GdiEntry2' GdiEntry2 gdi32 1526
|
||||
imp 'GdiEntry3' GdiEntry3 gdi32 1527
|
||||
imp 'GdiEntry4' GdiEntry4 gdi32 1528
|
||||
imp 'GdiEntry5' GdiEntry5 gdi32 1529
|
||||
imp 'GdiEntry6' GdiEntry6 gdi32 1530
|
||||
imp 'GdiEntry7' GdiEntry7 gdi32 1531
|
||||
imp 'GdiEntry8' GdiEntry8 gdi32 1532
|
||||
imp 'GdiEntry9' GdiEntry9 gdi32 1533
|
||||
imp 'GdiFixUpHandle' GdiFixUpHandle gdi32 1534
|
||||
imp 'GdiFlush' GdiFlush gdi32 1535
|
||||
imp 'GdiFullscreenControl' GdiFullscreenControl gdi32 1536
|
||||
|
|
|
@ -2551,7 +2551,6 @@ UNIX MODULE
|
|||
ip, port = assert(unix.getsockname(sock))
|
||||
print("listening on ip", FormatIp(ip), "port", port)
|
||||
assert(unix.listen(sock))
|
||||
assert(unix.accept(sock))
|
||||
while true do
|
||||
client, clientip, clientport = assert(unix.accept(sock))
|
||||
print("got client ip", FormatIp(clientip), "port", clientport)
|
||||
|
|
|
@ -137,7 +137,7 @@ STATIC_YOINK("zip_uri_support");
|
|||
#define REDBEAN "redbean"
|
||||
#endif
|
||||
|
||||
#define VERSION 0x020000
|
||||
#define VERSION 0x020001
|
||||
#define HEARTBEAT 5000 /*ms*/
|
||||
#define HASH_LOAD_FACTOR /* 1. / */ 4
|
||||
#define MONITOR_MICROS 150000
|
||||
|
@ -918,8 +918,8 @@ static void ProgramCache(long x) {
|
|||
}
|
||||
|
||||
static void SetDefaults(void) {
|
||||
ProgramBrand(
|
||||
gc(xasprintf("%s/%hhd.%hhd", REDBEAN, VERSION >> 020, VERSION >> 010)));
|
||||
ProgramBrand(gc(xasprintf("%s/%hhd.%hhd.%hhd", REDBEAN, VERSION >> 020,
|
||||
VERSION >> 010, VERSION >> 000)));
|
||||
__log_level = kLogInfo;
|
||||
maxpayloadsize = 64 * 1024;
|
||||
ProgramCache(-1);
|
||||
|
|
Loading…
Reference in a new issue