mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-09-10 06:29:32 +00:00
reflect: implement a number of stub functions
These stub functions are necessary for the encoding/json package. They don't seem to be called in trivial cases, so leave them as simple stubs for now.
This commit is contained in:
committed by
Ron Evans
parent
c849bccb83
commit
9f3dcf3733
@@ -539,6 +539,14 @@ func maskAndShift(value, offset, size uintptr) uintptr {
|
|||||||
return (uintptr(value) >> (offset * 8)) & mask
|
return (uintptr(value) >> (offset * 8)) & mask
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (v Value) NumMethod() int {
|
||||||
|
return v.typecode.NumMethod()
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v Value) OverflowFloat(x float64) bool {
|
||||||
|
panic("unimplemented: (reflect.Value).OverflowFloat()")
|
||||||
|
}
|
||||||
|
|
||||||
func (v Value) MapKeys() []Value {
|
func (v Value) MapKeys() []Value {
|
||||||
panic("unimplemented: (reflect.Value).MapKeys()")
|
panic("unimplemented: (reflect.Value).MapKeys()")
|
||||||
}
|
}
|
||||||
@@ -662,6 +670,18 @@ func (v Value) SetString(x string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (v Value) SetBytes(x []byte) {
|
||||||
|
panic("unimplemented: (reflect.Value).SetBytes()")
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v Value) SetCap(n int) {
|
||||||
|
panic("unimplemented: (reflect.Value).SetCap()")
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v Value) SetLen(n int) {
|
||||||
|
panic("unimplemented: (reflect.Value).SetLen()")
|
||||||
|
}
|
||||||
|
|
||||||
func (v Value) checkAddressable() {
|
func (v Value) checkAddressable() {
|
||||||
if !v.isIndirect() {
|
if !v.isIndirect() {
|
||||||
panic("reflect: value is not addressable")
|
panic("reflect: value is not addressable")
|
||||||
|
|||||||
Reference in New Issue
Block a user