aboutsummaryrefslogtreecommitdiffhomepage
path: root/testdata
diff options
context:
space:
mode:
authorJaden Weiss <[email protected]>2019-11-16 19:37:35 -0500
committerAyke <[email protected]>2019-11-17 15:14:51 +0100
commit81199da3f1123af5d0759e15211fbce3abbdbf13 (patch)
tree372ff011662fbae25715da144ce6147a5eb85a3a /testdata
parent3cedebd2990a645222b5aa8493f7ad8b9e671a87 (diff)
downloadtinygo-81199da3f1123af5d0759e15211fbce3abbdbf13.tar.gz
tinygo-81199da3f1123af5d0759e15211fbce3abbdbf13.zip
add code to handle programs which use heap allocations but never hit the GC
Diffstat (limited to 'testdata')
-rw-r--r--testdata/zeroalloc.go7
-rw-r--r--testdata/zeroalloc.txt0
2 files changed, 7 insertions, 0 deletions
diff --git a/testdata/zeroalloc.go b/testdata/zeroalloc.go
new file mode 100644
index 000000000..53c6fa0bc
--- /dev/null
+++ b/testdata/zeroalloc.go
@@ -0,0 +1,7 @@
+package main
+func main() {
+ p := []byte{}
+ for len(p) >= 1 {
+ p = p[1:]
+ }
+}
diff --git a/testdata/zeroalloc.txt b/testdata/zeroalloc.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/testdata/zeroalloc.txt