Commit 5933dbda authored by Rob Pike's avatar Rob Pike

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
parent 75df21ce
......@@ -81,4 +81,3 @@ export func stringtorune(string, int32) (int32, int32); // convert bytes to rune
export func exit(int32);
export func BUG_intereq(a, b interface{}) bool; // should not be necessary
......@@ -69,6 +69,5 @@ char *sysimport =
"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.exit (? sys.int32)\n"
"export func sys.BUG_intereq (a interface { }, b interface { }) (? sys.bool)\n"
"\n"
"$$\n";
......@@ -132,22 +132,3 @@ TEXT cas(SB), 7, $0
RET
MOVL $1, AX
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment