]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: export PCDATA value reader
authorCarl Shapiro <cshapiro@google.com>
Tue, 17 Sep 2013 02:03:19 +0000 (19:03 -0700)
committerCarl Shapiro <cshapiro@google.com>
Tue, 17 Sep 2013 02:03:19 +0000 (19:03 -0700)
This interface is required to use the PCDATA interface
implemented in Go 1.2.  While initially entirely private, the
FUNCDATA side of the interface has been made public.  This
change completes the FUNCDATA/PCDATA interface.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/13735043

src/pkg/runtime/runtime.h
src/pkg/runtime/symtab.c

index 920e86c3120964d8687827e61c128f493bdc75e9..66e87d5c27c62caa6c230d95c6efd756c9dcdc32 100644 (file)
@@ -802,6 +802,7 @@ int32       runtime·funcline(Func*, uintptr, String*);
 int32  runtime·funcarglen(Func*, uintptr);
 int32  runtime·funcspdelta(Func*, uintptr);
 int8*  runtime·funcname(Func*);
+int32  runtime·pcdatavalue(Func*, int32, uintptr);
 void*  runtime·stackalloc(uint32);
 void   runtime·stackfree(void*, uintptr);
 MCache*        runtime·allocmcache(void);
index bdf96a1b6ea42636267a7f514ebcb51b8e651089..dd0015aeeced76d0f068c1b0b51aa830b831a556 100644 (file)
@@ -208,8 +208,8 @@ runtime·funcspdelta(Func *f, uintptr targetpc)
        return x;
 }
 
-static int32
-pcdatavalue(Func *f, int32 table, uintptr targetpc)
+int32
+runtime·pcdatavalue(Func *f, int32 table, uintptr targetpc)
 {
        if(table < 0 || table >= f->npcdata)
                return -1;
@@ -221,7 +221,7 @@ runtime·funcarglen(Func *f, uintptr targetpc)
 {
        if(targetpc == f->entry)
                return 0;
-       return pcdatavalue(f, PCDATA_ArgSize, targetpc-PCQuantum);
+       return runtime·pcdatavalue(f, PCDATA_ArgSize, targetpc-PCQuantum);
 }
 
 void