From ed467db6d8db16dcc2956d85f0ce114635e12f06 Mon Sep 17 00:00:00 2001 From: Keith Randall Date: Thu, 29 Aug 2013 12:36:59 -0700 Subject: 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 --- src/pkg/runtime/hashmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/pkg/runtime/hashmap.c') 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) -- cgit v1.3