diff options
| author | Keith Randall <khr@golang.org> | 2013-08-29 12:36:59 -0700 |
|---|---|---|
| committer | Keith Randall <khr@golang.org> | 2013-08-29 12:36:59 -0700 |
| commit | ed467db6d8db16dcc2956d85f0ce114635e12f06 (patch) | |
| tree | 2cae5751925bdc6138cebd7a8c6c4d2380330420 /src/pkg/runtime/hashmap.c | |
| parent | f5f0e40e803125e47c64372fc7d808cbd8b9577a (diff) | |
| download | go-ed467db6d8db16dcc2956d85f0ce114635e12f06.tar.xz | |
cmd/cc,runtime: change preprocessor to expand macros inside of
#pragma textflag and #pragma dataflag directives.
Update dataflag directives to use symbols instead of integer constants.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/13310043
Diffstat (limited to 'src/pkg/runtime/hashmap.c')
| -rw-r--r-- | src/pkg/runtime/hashmap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/runtime/hashmap.c b/src/pkg/runtime/hashmap.c index a721d4a535..36cbda5abe 100644 --- a/src/pkg/runtime/hashmap.c +++ b/src/pkg/runtime/hashmap.c @@ -8,6 +8,7 @@ #include "hashmap.h" #include "type.h" #include "race.h" +#include "../../cmd/ld/textflag.h" // This file contains the implementation of Go's map type. // @@ -524,7 +525,7 @@ hash_lookup(MapType *t, Hmap *h, byte **keyp) } // When an item is not found, fast versions return a pointer to this zeroed memory. -#pragma dataflag 16 // no pointers +#pragma dataflag RODATA static uint8 empty_value[MAXVALUESIZE]; // Specialized versions of mapaccess1 for specific types. @@ -593,7 +594,6 @@ static uint8 empty_value[MAXVALUESIZE]; #define SLOW_EQ(x,y) runtime·memeq((x).str, (y).str, (x).len) #define MAYBE_EQ(x,y) (*(CHECKTYPE*)(x).str == *(CHECKTYPE*)(y).str && *(CHECKTYPE*)((x).str + (x).len - sizeof(CHECKTYPE)) == *(CHECKTYPE*)((y).str + (x).len - sizeof(CHECKTYPE))) #include "hashmap_fast.c" -#include "../../cmd/ld/textflag.h" static void hash_insert(MapType *t, Hmap *h, void *key, void *value) |
