Documentation ¶
Overview ¶
Package haxegoruntime is automatically included in every TARDIS Go transpilation. This Go code is used by the Haxe runtime, it must be entirely self-sufficent. This Go code is always in the runtime. TODO consider how to slim it down...
Index ¶
- Variables
- func AddHaxeType(ptr unsafe.Pointer)
- func BrowserMain(mainFN func(), msInvocationInterval, runLimit int)
- func GetURL(url string) (string, error)
- func HaxeTimer(up unsafe.Pointer)
- func HaxeWait(target *int64, whileTrue *bool)
- func Raw2Runes(s []uint) []rune
- func Rune2Raw(oneRune rune) []uint
- func Runes2Raw(r []rune) []uint
- func RunesToUTF16(r []rune) []uint16
- func RunesToUTF8(r []rune) []byte
- func RuntimeNano() int64
- func StartTimer(up unsafe.Pointer)
- func StopTimer(up unsafe.Pointer) bool
- func UTF16toRunes(s []uint16) []rune
- func UTF8toRunes(s []byte) []rune
- type Kind
Constants ¶
This section is empty.
Variables ¶
var JScallbackOK = false
var TypeTable = make([]*rtype, hx.GetInt("", "TypeInfo.nextTypeID"))
TypeTable provides a mapping between used type numbers (the index) to their reflect definitions but reflect is not used here in order to avoid pulling it into every build
var ZiLen int
ZiLen is the runtime native string length of the chinese character "字", meaning "written character", which is pronounced "zi" in Mandarin. It is initialised by the haxe Go.init() code generated by goclass.go because otherwise the string will be escaped and always be 3 long
Functions ¶
func AddHaxeType ¶
func BrowserMain ¶
func BrowserMain(mainFN func(), msInvocationInterval, runLimit int)
Main allows code that might be targeted to broser-based JS code to schedule TARDISgo code periodically, separate from call-backs. For non-JS targets it simply calls the given mainFN. This should be the last function called in main.main()
func HaxeWait ¶
TODO optimize to use the Timer call-back methods for the targets - flash, java, js, python
func Raw2Runes ¶
Raw2Runes takes the UTF-8 contents of a string and returns the equivalent rune slice TODO review if this can be optimized away
func Rune2Raw ¶
Rune2Raw takes an individual rune and returns the UTF-8 integer slice representing it
func Runes2Raw ¶
Runes2Raw takes a rune slice and returns a UTF-8 integer slice representing the underlying string TODO review if this can be optimized away
func RunesToUTF16 ¶
RunesToUTF16 is a wrapper for utf16.Encode TODO review if this can be optimized away
func RunesToUTF8 ¶
RunesToUTF8 takes a rune slice and returns the equivalent utf8 byte slice
func RuntimeNano ¶
func RuntimeNano() int64
RuntimeNano returns the current value of the runtime clock in nanoseconds.
func StartTimer ¶
func UTF16toRunes ¶
UTF16toRunes is a wrapper for utf16.Decode TODO review if this can be optimized away
func UTF8toRunes ¶
UTF8toRunes takes a utf8 byte slice and returns the equivalent rune slice