p2
0.0
|
non-API internal parts More...
Go to the source code of this file.
Data Structures | |
struct | PNBHeader |
.pnb binary dump header More... | |
Macros | |
#define | PN_ALLOC(V, T) (T *)potion_gc_alloc(P, V, sizeof(T)) |
#define | PN_ALLOC_N(V, T, C) (T *)potion_gc_alloc(P, V, sizeof(T)+C) |
#define | PN_CALLOC_N(V, T, C) (T *)potion_gc_calloc(P, V, sizeof(T)+C) |
#define | PN_REALLOC(X, V, T, N) (X)=(T *)potion_gc_realloc(P, V, (struct PNObject *)(X), sizeof(T) + N) |
#define | PN_DALLOC_N(T, N) potion_data_alloc(P, sizeof(T)*N) |
#define | PN_STRDUP(S) PN_STR(S) |
#define | PN_MEMZERO(X, T) memset((X), 0, sizeof(T)) |
#define | PN_MEMZERO_N(X, T, N) memset((X), 0, sizeof(T)*(N)) |
#define | PN_MEMCPY(X, Y, T) memcpy((void *)(X), (void *)(Y), sizeof(T)) |
#define | PN_MEMCPY_N(X, Y, T, N) memcpy((void *)(X), (void *)(Y), sizeof(T)*(N)) |
#define | PN_MEMMOVE_N(DST, SRC, T, N) memmove((void *)(DST), (void *)(SRC), sizeof(T)*(N)) |
#define | min(a, b) ((a) <= (b) ? (a) : (b)) |
#define | max(a, b) ((a) >= (b) ? (a) : (b)) |
#define | TYPE_BATCH_SIZE 4096 |
#define | PN_FLEX_NEW(N, V, T, S) |
#define | PN_FLEX_NEEDS(X, N, V, T, S) |
#define | PN_ATOI(X, N, B) |
#define | PN_ALLOC_FUNC(size) potion_mmap(size, 1) |
#define | PN_SAVED_REGS 3 |
#define | POTION_ESP(p) __asm__("mov %%esp, %0" : "=r" (*p)) |
#define | POTION_EBP(p) __asm__("mov %%ebp, %0" : "=r" (*p)) |
#define | O_BINARY 0 |
#define | GC_PROTECT(P) P->mem->protect = (void *)P->mem->birth_cur |
Typedefs | |
typedef unsigned char | u8 |
Functions | |
size_t | potion_cp_strlen_utf8 (const char *) |
wonderful utf-8 counting trickery by colin percival More... | |
void * | potion_mmap (size_t, const char) |
int | potion_munmap (void *, size_t) |
PN | potion_vm_eq (Potion *, PN, PN) |
PN | potion_vm_neq (Potion *, PN, PN) |
non-API internal parts
(c) 2008 why the lucky stiff, the freelance professor
Definition in file internal.h.
#define PN_ALLOC | ( | V, | |
T | |||
) | (T *)potion_gc_alloc(P, V, sizeof(T)) |
Definition at line 12 of file internal.h.
#define PN_ALLOC_N | ( | V, | |
T, | |||
C | |||
) | (T *)potion_gc_alloc(P, V, sizeof(T)+C) |
Definition at line 13 of file internal.h.
#define PN_CALLOC_N | ( | V, | |
T, | |||
C | |||
) | (T *)potion_gc_calloc(P, V, sizeof(T)+C) |
Definition at line 14 of file internal.h.
#define PN_REALLOC | ( | X, | |
V, | |||
T, | |||
N | |||
) | (X)=(T *)potion_gc_realloc(P, V, (struct PNObject *)(X), sizeof(T) + N) |
Definition at line 15 of file internal.h.
#define PN_DALLOC_N | ( | T, | |
N | |||
) | potion_data_alloc(P, sizeof(T)*N) |
Definition at line 16 of file internal.h.
#define PN_STRDUP | ( | S | ) | PN_STR(S) |
Definition at line 17 of file internal.h.
#define PN_MEMZERO | ( | X, | |
T | |||
) | memset((X), 0, sizeof(T)) |
Definition at line 19 of file internal.h.
Definition at line 20 of file internal.h.
#define PN_MEMCPY | ( | X, | |
Y, | |||
T | |||
) | memcpy((void *)(X), (void *)(Y), sizeof(T)) |
Definition at line 21 of file internal.h.
Definition at line 22 of file internal.h.
Definition at line 23 of file internal.h.
#define min | ( | a, | |
b | |||
) | ((a) <= (b) ? (a) : (b)) |
Definition at line 26 of file internal.h.
#define max | ( | a, | |
b | |||
) | ((a) >= (b) ? (a) : (b)) |
Definition at line 30 of file internal.h.
#define TYPE_BATCH_SIZE 4096 |
Definition at line 33 of file internal.h.
#define PN_FLEX_NEW | ( | N, | |
V, | |||
T, | |||
S | |||
) |
Definition at line 35 of file internal.h.
#define PN_FLEX_NEEDS | ( | X, | |
N, | |||
V, | |||
T, | |||
S | |||
) |
Definition at line 40 of file internal.h.
#define PN_ATOI | ( | X, | |
N, | |||
B | |||
) |
Definition at line 51 of file internal.h.
#define PN_ALLOC_FUNC | ( | size | ) | potion_mmap(size, 1) |
Definition at line 88 of file internal.h.
#define PN_SAVED_REGS 3 |
Definition at line 108 of file internal.h.
#define POTION_ESP | ( | p | ) | __asm__("mov %%esp, %0" : "=r" (*p)) |
Definition at line 115 of file internal.h.
#define POTION_EBP | ( | p | ) | __asm__("mov %%ebp, %0" : "=r" (*p)) |
Definition at line 118 of file internal.h.
#define O_BINARY 0 |
Definition at line 128 of file internal.h.
#define GC_PROTECT | ( | P | ) | P->mem->protect = (void *)P->mem->birth_cur |
Definition at line 137 of file internal.h.
typedef unsigned char u8 |
Definition at line 8 of file internal.h.
size_t potion_cp_strlen_utf8 | ( | const char * | _s | ) |
wonderful utf-8 counting trickery by colin percival
http://www.daemonology.net/blog/2008-06-05-faster-utf8-strlen.html