mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-07-27 23:28:42 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 730da698a3 | |||
| 073862ee92 | |||
| c820d83ae2 |
@@ -577,7 +577,7 @@ func (r *runner) run(fn *function, params []value, parentMem *memoryView, indent
|
||||
// runtime instead of at compile time. But we need to
|
||||
// revert any changes made by the call first.
|
||||
if r.debug {
|
||||
fmt.Fprintln(os.Stderr, indent+"!! revert because of error:", callErr.Err)
|
||||
fmt.Fprintln(os.Stderr, indent+"!! revert because of error:", callErr.Error())
|
||||
}
|
||||
callMem.revert()
|
||||
err := r.runAtRuntime(fn, inst, locals, &mem, indent)
|
||||
|
||||
@@ -15,8 +15,8 @@ const (
|
||||
P09 Pin = 9
|
||||
P10 Pin = 10
|
||||
P11 Pin = 11
|
||||
P12 Pin = 12
|
||||
P13 Pin = 13
|
||||
P12 Pin = 12 // peripherals: I2C0 SDA
|
||||
P13 Pin = 13 // peripherals: I2C0 SCL
|
||||
P14 Pin = 14
|
||||
P15 Pin = 15
|
||||
P16 Pin = 16
|
||||
|
||||
@@ -159,6 +159,7 @@ func (b *B) ReportAllocs() {
|
||||
|
||||
// runN runs a single benchmark for the specified number of iterations.
|
||||
func (b *B) runN(n int) {
|
||||
b.runCleanup() // start fresh in the next iteration
|
||||
b.N = n
|
||||
runtime.GC()
|
||||
b.ResetTimer()
|
||||
@@ -457,6 +458,7 @@ func (b *B) Run(name string, f func(b *B)) bool {
|
||||
// Only process sub-benchmarks, if any.
|
||||
sub.hasSub = true
|
||||
}
|
||||
defer sub.runCleanup() // make sure all cleanups are run, even when panicking
|
||||
if sub.run1() {
|
||||
sub.run()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user