1
0
mirror of https://github.com/golang/go synced 2024-09-25 09:10:14 -06:00

delete hack for interface equality now that it supported by the 6g compiler

R=rsc
DELTA=21  (0 added, 21 deleted, 0 changed)
OCL=17123
CL=17136
This commit is contained in:
Rob Pike 2008-10-14 16:33:11 -07:00
parent 75df21ceff
commit 5933dbda3a
3 changed files with 0 additions and 21 deletions

View File

@ -81,4 +81,3 @@ export func stringtorune(string, int32) (int32, int32); // convert bytes to rune
export func exit(int32); export func exit(int32);
export func BUG_intereq(a, b interface{}) bool; // should not be necessary

View File

@ -69,6 +69,5 @@ char *sysimport =
"export func sys.bytestorune (? *sys.uint8, ? sys.int32, ? sys.int32) (? sys.int32, ? sys.int32)\n" "export func sys.bytestorune (? *sys.uint8, ? sys.int32, ? sys.int32) (? sys.int32, ? sys.int32)\n"
"export func sys.stringtorune (? sys.string, ? sys.int32) (? sys.int32, ? sys.int32)\n" "export func sys.stringtorune (? sys.string, ? sys.int32) (? sys.int32, ? sys.int32)\n"
"export func sys.exit (? sys.int32)\n" "export func sys.exit (? sys.int32)\n"
"export func sys.BUG_intereq (a interface { }, b interface { }) (? sys.bool)\n"
"\n" "\n"
"$$\n"; "$$\n";

View File

@ -132,22 +132,3 @@ TEXT cas(SB), 7, $0
RET RET
MOVL $1, AX MOVL $1, AX
RET RET
// func BUG_intereq(a, b interface{}) bool {
// return a == b
// }
// TODO: delete once 6g can compile a == b on interfaces.
TEXT sys·BUG_intereq(SB),7,$0
// First interface at 8(SP) and 16(SP)
// Second interface at 24(SP) and 32(SP)
// Answer at 40(SP)
MOVQ 8(SP), AX
CMPQ AX, 24(SP)
JNE 6(PC)
MOVQ 16(SP), AX
CMPQ AX, 32(SP)
JNE 3(PC)
MOVQ $1, 40(SP)
RET
MOVQ $0, 40(SP)
RET