go/usr/r/reflect/gencast.sh
Rob Pike 265e73ee14 beginnings of reflection values.
R=rsc
DELTA=421  (357 added, 17 deleted, 47 changed)
OCL=17388
CL=17401
2008-10-17 18:06:29 -07:00

37 lines
680 B
Bash
Executable File

#!/bin/bash
# Copyright 2009 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
awk '
BEGIN {
print("// Conversion operators - really just casts")
print("// *** Created by gencast.sh - Do Not Edit ***\n")}
{
print("TEXT reflect·AddrToPtr" $0 "(SB),7,$-8")
print("\tMOVQ 8(SP), AX")
print("\tMOVQ AX, 16(SP)")
print("\tRET")
print("")
print("TEXT reflect·Ptr" $0 "ToAddr(SB),7,$-8")
print("\tMOVQ 8(SP), AX")
print("\tMOVQ AX, 16(SP)")
print("\tRET")
print("")
}
' > cast_$GOARCH.s << '!'
Addr
Int8
Int16
Int32
Int64
Uint8
Uint16
Uint32
Uint64
Float32
Float64
Float80
String
!