Commit 334c7ec
authored
program-entrypoint: Add a BumpAllocator constructor (#284)
* program-entrypoint: Add a BumpAllocator constructor
#### Problem
The current version of program-entrypoint doesn't work because the
allocator can't be instantiated in the macros. The start and len fields
are private, and so can't be written to in the macro, which exists in
the scope of the program.
#### Summary of changes
Add a new constructor that can be used by the macro.
* Make function const, call from unsafe block
* Rename1 parent d47ab5a commit 334c7ec
1 file changed
+18
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | | - | |
225 | | - | |
226 | | - | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
227 | 229 | | |
228 | 230 | | |
229 | 231 | | |
| |||
333 | 335 | | |
334 | 336 | | |
335 | 337 | | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
336 | 351 | | |
337 | 352 | | |
338 | 353 | | |
| |||
0 commit comments