aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/runtime.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/runtime/runtime.h')
-rw-r--r--src/pkg/runtime/runtime.h58
1 files changed, 44 insertions, 14 deletions
diff --git a/src/pkg/runtime/runtime.h b/src/pkg/runtime/runtime.h
index 9324ef76bb..4aade25fe7 100644
--- a/src/pkg/runtime/runtime.h
+++ b/src/pkg/runtime/runtime.h
@@ -43,7 +43,6 @@ typedef int32 intptr;
*/
typedef uint8 bool;
typedef uint8 byte;
-typedef struct Alg Alg;
typedef struct Func Func;
typedef struct G G;
typedef struct Gobuf Gobuf;
@@ -260,13 +259,6 @@ struct Stktop
uintptr free; // if free>0, call stackfree using free as size
bool panic; // is this frame the top of a panic?
};
-struct Alg
-{
- uintptr (*hash)(uint32, void*);
- uint32 (*equal)(uint32, void*, void*);
- void (*print)(uint32, void*);
- void (*copy)(uint32, void*, void*);
-};
struct SigTab
{
int32 flags;
@@ -356,6 +348,13 @@ struct Timer
/*
* known to compiler
*/
+enum {
+ Structrnd = sizeof(uintptr)
+};
+
+/*
+ * type algorithms - known to compiler
+ */
enum
{
AMEM,
@@ -376,11 +375,45 @@ enum
ANOEQ128,
Amax
};
+typedef struct Alg Alg;
+struct Alg
+{
+ void (*hash)(uintptr*, uintptr, void*);
+ void (*equal)(bool*, uintptr, void*, void*);
+ void (*print)(uintptr, void*);
+ void (*copy)(uintptr, void*, void*);
+};
+extern Alg runtime·algarray[Amax];
-enum {
- Structrnd = sizeof(uintptr)
-};
+void runtime·memhash(uintptr*, uintptr, void*);
+void runtime·nohash(uintptr*, uintptr, void*);
+void runtime·strhash(uintptr*, uintptr, void*);
+void runtime·interhash(uintptr*, uintptr, void*);
+void runtime·nilinterhash(uintptr*, uintptr, void*);
+
+void runtime·memequal(bool*, uintptr, void*, void*);
+void runtime·noequal(bool*, uintptr, void*, void*);
+void runtime·strequal(bool*, uintptr, void*, void*);
+void runtime·interequal(bool*, uintptr, void*, void*);
+void runtime·nilinterequal(bool*, uintptr, void*, void*);
+
+void runtime·memprint(uintptr, void*);
+void runtime·strprint(uintptr, void*);
+void runtime·interprint(uintptr, void*);
+void runtime·nilinterprint(uintptr, void*);
+
+void runtime·memcopy(uintptr, void*, void*);
+void runtime·memcopy8(uintptr, void*, void*);
+void runtime·memcopy16(uintptr, void*, void*);
+void runtime·memcopy32(uintptr, void*, void*);
+void runtime·memcopy64(uintptr, void*, void*);
+void runtime·memcopy128(uintptr, void*, void*);
+void runtime·memcopy(uintptr, void*, void*);
+void runtime·strcopy(uintptr, void*, void*);
+void runtime·algslicecopy(uintptr, void*, void*);
+void runtime·intercopy(uintptr, void*, void*);
+void runtime·nilintercopy(uintptr, void*, void*);
/*
* deferred subroutine calls
@@ -410,7 +443,6 @@ struct Panic
/*
* external data
*/
-extern Alg runtime·algarray[Amax];
extern String runtime·emptystring;
G* runtime·allg;
G* runtime·lastg;
@@ -498,8 +530,6 @@ bool runtime·ifaceeq_c(Iface, Iface);
bool runtime·efaceeq_c(Eface, Eface);
uintptr runtime·ifacehash(Iface);
uintptr runtime·efacehash(Eface);
-uintptr runtime·nohash(uint32, void*);
-uint32 runtime·noequal(uint32, void*, void*);
void* runtime·malloc(uintptr size);
void runtime·free(void *v);
bool runtime·addfinalizer(void*, void(*fn)(void*), int32);