mirror of
https://github.com/golang/go
synced 2024-11-26 05:57:58 -07: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:
parent
75df21ceff
commit
5933dbda3a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user