Commit 40fe970
wasmparser: improve visit_operator performance (#2228)
* wasmparser: improve visit_operator performance
- The BinaryReader can visit_operator by itself again,
with no need for OperatorsReader or extra state, when
the visitor implements the FrameStack trait. Validation
uses this to avoid duplicating the frame stack.
- OperatorsReader keeps an internal FrameStack and can be created
from its allocations (and turned back into them), avoiding
the need to allocate a stack of frames.
* Don't require handling OperatorsReaderAllocations
Make it a non-default API that other various locations can optionally
use but aren't required to do so.
* More test fixes
* Even more test fixes
* Simplify some adapter definitions
* Simplify definition of `OperatorFactory`
* Minor doc updates
* Fix doc link
---------
Co-authored-by: Alex Crichton <[email protected]>1 parent 641b571 commit 40fe970
File tree
11 files changed
+1536
-1336
lines changed- crates/wasmparser
- benches
- src
- readers/core
- validator
- src
11 files changed
+1536
-1336
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
| |||
80 | 84 | | |
81 | 85 | | |
82 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
83 | 98 | | |
84 | 99 | | |
85 | 100 | | |
| |||
114 | 129 | | |
115 | 130 | | |
116 | 131 | | |
117 | | - | |
118 | | - | |
119 | | - | |
| 132 | + | |
120 | 133 | | |
121 | 134 | | |
122 | 135 | | |
| |||
128 | 141 | | |
129 | 142 | | |
130 | 143 | | |
131 | | - | |
132 | | - | |
133 | | - | |
| 144 | + | |
134 | 145 | | |
135 | 146 | | |
136 | 147 | | |
| |||
150 | 161 | | |
151 | 162 | | |
152 | 163 | | |
153 | | - | |
154 | | - | |
155 | | - | |
| 164 | + | |
156 | 165 | | |
157 | 166 | | |
158 | 167 | | |
| |||
161 | 170 | | |
162 | 171 | | |
163 | 172 | | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
| 173 | + | |
169 | 174 | | |
170 | 175 | | |
171 | 176 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
| 18 | + | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | 73 | | |
83 | 74 | | |
84 | 75 | | |
| |||
0 commit comments