aboutsummaryrefslogtreecommitdiffhomepage
path: root/testdata/map.txt
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2021-04-20 23:40:16 +0200
committerRon Evans <[email protected]>2021-04-21 07:37:22 +0200
commit768a15c1dd83a462f77a835581357572e3962dbc (patch)
tree15d691556290be170a3ee88ef23a02db90ab48fd /testdata/map.txt
parentc1c3be1aa7b4fbfeaddb7bf29857efcf77819623 (diff)
downloadtinygo-768a15c1dd83a462f77a835581357572e3962dbc.tar.gz
tinygo-768a15c1dd83a462f77a835581357572e3962dbc.zip
interp: remove map support
The interp package is in many cases able to execute map functions in the runtime directly. This is probably slower than adding special support for them in the interp package and also doesn't cover all cases (most importantly, map keys that contain pointers) but removing this code also removes a large amount of code that needs to be maintained and is susceptible to hard-to-find bugs. As a side effect, this resulted in different output of the testdata/map.go test because the test relied on the existing iteration order of TinyGo maps. I've updated the test to not rely on this test, making the output compatible with what the Go toolchain would output.
Diffstat (limited to 'testdata/map.txt')
-rw-r--r--testdata/map.txt46
1 files changed, 23 insertions, 23 deletions
diff --git a/testdata/map.txt b/testdata/map.txt
index e6141addc..309881081 100644
--- a/testdata/map.txt
+++ b/testdata/map.txt
@@ -7,45 +7,45 @@ map read: data = 3
data = 3
map length: 12
map read: three = 3
- one = 1
- two = 2
- three = 3
- four = 4
- five = 5
- six = 6
- seven = 7
eight = 8
+ eleven = 11
+ five = 5
+ four = 4
nine = 9
+ one = 1
+ seven = 7
+ six = 6
ten = 10
- eleven = 11
+ three = 3
twelve = 12
+ two = 2
map length: 12
map read: ten = 10
- one = 1
- two = 2
- three = 3
- four = 4
- five = 5
- six = 6
- seven = 7
eight = 8
+ eleven = 11
+ five = 5
+ four = 4
nine = 9
+ one = 1
+ seven = 7
+ six = 6
ten = 10
- eleven = 11
+ three = 3
twelve = 12
+ two = 2
map length: 11
map read: seven = 7
- one = 1
- two = 2
- three = 3
- four = 4
- five = 5
- seven = 7
eight = 8
+ eleven = 11
+ five = 5
+ four = 4
nine = 9
+ one = 1
+ seven = 7
ten = 10
- eleven = 11
+ three = 3
twelve = 12
+ two = 2
lookup with comma-ok: eight 8 true
lookup with comma-ok: nokey 0 false
false true 2