go fmt
Этот коммит содержится в:
родитель
574c7ec047
коммит
62c4c5e90b
19 изменённых файлов: 28 добавлений и 45 удалений
|
@ -1,9 +1,7 @@
|
|||
|
||||
package main
|
||||
|
||||
import (
|
||||
"go/types"
|
||||
|
||||
"golang.org/x/tools/go/ssa"
|
||||
)
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ type __reg uint32
|
|||
type RegValue = __reg
|
||||
|
||||
type __asm string
|
||||
|
||||
func Asm(s __asm)
|
||||
|
||||
const (
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package main
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package main
|
||||
|
||||
type Thing struct {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package machine
|
||||
|
||||
type GPIOConfig struct {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
// +build avr
|
||||
|
||||
package machine
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
// +build !avr,!nrf
|
||||
|
||||
package machine
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
// +build nrf
|
||||
|
||||
package machine
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
// +build !linux
|
||||
|
||||
package runtime
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package runtime
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package runtime
|
||||
|
||||
const Compiler = "tgo"
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
// +build avr
|
||||
|
||||
package runtime
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
// +build nrf
|
||||
|
||||
package runtime
|
||||
|
@ -29,7 +28,8 @@ func initUART() {
|
|||
func initLFCLK() {
|
||||
nrf.CLOCK.LFCLKSRC = nrf.CLOCK_LFCLKSTAT_SRC_Xtal
|
||||
nrf.CLOCK.TASKS_LFCLKSTART = 1
|
||||
for nrf.CLOCK.EVENTS_LFCLKSTARTED == 0 {}
|
||||
for nrf.CLOCK.EVENTS_LFCLKSTARTED == 0 {
|
||||
}
|
||||
nrf.CLOCK.EVENTS_LFCLKSTARTED = 0
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,8 @@ func initRTC() {
|
|||
|
||||
func putchar(c byte) {
|
||||
nrf.UART0.TXD = nrf.RegValue(c)
|
||||
for nrf.UART0.EVENTS_TXDRDY == 0 {}
|
||||
for nrf.UART0.EVENTS_TXDRDY == 0 {
|
||||
}
|
||||
nrf.UART0.EVENTS_TXDRDY = 0
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
// +build linux
|
||||
|
||||
package runtime
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package runtime
|
||||
|
||||
// This file implements the Go scheduler using coroutines.
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package runtime
|
||||
|
||||
// TODO: use the time package for this.
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package syscall
|
||||
|
||||
// dummy
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package unsafe
|
||||
|
||||
// dummy
|
||||
|
|
2
tgo.go
2
tgo.go
|
@ -1,4 +1,3 @@
|
|||
|
||||
package main
|
||||
|
||||
import (
|
||||
|
@ -1718,7 +1717,6 @@ func Compile(pkgName, runtimePath, outpath, target string, printIR, dumpSSA bool
|
|||
return nil
|
||||
}
|
||||
|
||||
|
||||
func main() {
|
||||
outpath := flag.String("o", "", "output filename")
|
||||
printIR := flag.Bool("printir", false, "print LLVM IR")
|
||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче