Commit 96ca30c
authored
Make
* add HandleAndCache::cast_* methods
* use new HandleAndCache::cast_* methods
* make HandleAndCache::handle private
* turn InstanceEntity into dynamically sized type
* adjust StoreInner to store Box<InstanceEntity>
* update Handle trait to allow ?Sized Entity
* relax const assert
* add ThinPtr utility type
* rename InstanceHeader -> InstanceEntityHeader
also make it private
* make all InstanceEntityHeader methods private
* add ThinPtr<InstanceEntity> API
* add missing HANDLES_OFFSET const for new API
* use ThinPtr<InstanceEntity> in the executor
* remove no longer needed InstanceEntity APIs
* introduce typed CacheAndEntity<T> type
* adjust executor usage
* remove unnecessary InstanceHandle trait again
* rename HandleAndCache -> AnyHandleAndEntity
* rename ThinPtr<InstanceEntity> APIs
* return Option from ThinPtr<InstanceEntity>::entry APIs
* use names from std for ThinPtr API
* add validity doc section to Inst
* re-design ThinPtr::as_byte_ptr -> cast<U>
* fix some minor doc issues
* improve InstanceEntity[Header] docs
* add AnyHandle::assert_kind
* re-design AnyHandleAndEntity conversions to typed wrapper
* elaborate comment in InstanceEntity::alloc
* use new typed conversion APIs in
* update API impl of ThinPtr<InstanceEntity>
* apply improvements to InstanceEntity::alloc from code review
* remove unused imports
* add new instantiation tests
* add new test to guard dangling Inst pointer
* remove superflous comma
* move ptr.rs -> instance/thin_ptr.rs
* elaborate on the safety comment for a Sync impl
* use crate imports
* add cfg-guards for release builds
* use public APIs in tests
* move InstanceEntity defs/impls into entity.rs submodule
* clean-ups for StoreInner
* improve HANDLES_OFFSET computation
* add another const assert
* use HANDLES_OFFSET to verify Layout usage
* carve out manual handles_offset checker
* remove ExactSizeIterator bounds from alloc
* clean-up alloc methodInstanceEntity dynamically sized to drop one indirection in the executor (#2005)1 parent 5bd5081 commit 96ca30c
14 files changed
Lines changed: 1151 additions & 447 deletions
File tree
- crates/wasmi
- src
- engine/executor/handler
- func
- instance
- store
- tests/integration
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
| 31 | + | |
39 | 32 | | |
40 | 33 | | |
41 | 34 | | |
| |||
151 | 144 | | |
152 | 145 | | |
153 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
154 | 163 | | |
155 | 164 | | |
156 | 165 | | |
| |||
166 | 175 | | |
167 | 176 | | |
168 | 177 | | |
169 | | - | |
| 178 | + | |
170 | 179 | | |
171 | 180 | | |
172 | 181 | | |
| |||
185 | 194 | | |
186 | 195 | | |
187 | 196 | | |
188 | | - | |
189 | | - | |
| 197 | + | |
190 | 198 | | |
191 | 199 | | |
192 | 200 | | |
193 | | - | |
| 201 | + | |
194 | 202 | | |
195 | | - | |
196 | | - | |
197 | | - | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
198 | 209 | | |
199 | 210 | | |
200 | 211 | | |
201 | 212 | | |
202 | 213 | | |
203 | 214 | | |
204 | | - | |
| 215 | + | |
205 | 216 | | |
206 | 217 | | |
207 | 218 | | |
208 | 219 | | |
209 | 220 | | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
| 221 | + | |
229 | 222 | | |
230 | | - | |
| 223 | + | |
231 | 224 | | |
232 | | - | |
| 225 | + | |
| 226 | + | |
233 | 227 | | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
| 228 | + | |
239 | 229 | | |
240 | | - | |
241 | | - | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
242 | 235 | | |
243 | 236 | | |
244 | 237 | | |
| |||
269 | 262 | | |
270 | 263 | | |
271 | 264 | | |
272 | | - | |
273 | | - | |
| 265 | + | |
| 266 | + | |
274 | 267 | | |
275 | 268 | | |
276 | 269 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
539 | 539 | | |
540 | 540 | | |
541 | 541 | | |
542 | | - | |
| 542 | + | |
| 543 | + | |
543 | 544 | | |
544 | | - | |
| 545 | + | |
545 | 546 | | |
546 | 547 | | |
547 | 548 | | |
548 | 549 | | |
549 | 550 | | |
550 | | - | |
551 | | - | |
| 551 | + | |
| 552 | + | |
552 | 553 | | |
553 | 554 | | |
554 | | - | |
555 | | - | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
556 | 559 | | |
557 | 560 | | |
| 561 | + | |
558 | 562 | | |
559 | 563 | | |
560 | 564 | | |
| |||
583 | 587 | | |
584 | 588 | | |
585 | 589 | | |
586 | | - | |
| 590 | + | |
587 | 591 | | |
588 | 592 | | |
589 | 593 | | |
| |||
592 | 596 | | |
593 | 597 | | |
594 | 598 | | |
595 | | - | |
596 | | - | |
597 | | - | |
598 | | - | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
599 | 602 | | |
600 | 603 | | |
601 | 604 | | |
| |||
604 | 607 | | |
605 | 608 | | |
606 | 609 | | |
607 | | - | |
| 610 | + | |
608 | 611 | | |
609 | 612 | | |
610 | 613 | | |
611 | 614 | | |
612 | 615 | | |
613 | | - | |
614 | | - | |
615 | | - | |
616 | | - | |
617 | | - | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
618 | 621 | | |
619 | 622 | | |
620 | 623 | | |
621 | 624 | | |
622 | | - | |
| 625 | + | |
623 | 626 | | |
624 | 627 | | |
625 | 628 | | |
| |||
637 | 640 | | |
638 | 641 | | |
639 | 642 | | |
640 | | - | |
641 | | - | |
642 | | - | |
643 | | - | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
644 | 646 | | |
645 | 647 | | |
646 | 648 | | |
647 | 649 | | |
648 | 650 | | |
649 | 651 | | |
650 | 652 | | |
651 | | - | |
| 653 | + | |
652 | 654 | | |
653 | 655 | | |
654 | 656 | | |
655 | 657 | | |
656 | 658 | | |
657 | | - | |
658 | | - | |
659 | | - | |
660 | | - | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
661 | 663 | | |
662 | 664 | | |
663 | 665 | | |
| |||
666 | 668 | | |
667 | 669 | | |
668 | 670 | | |
669 | | - | |
670 | 671 | | |
671 | | - | |
672 | | - | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
673 | 676 | | |
674 | | - | |
| 677 | + | |
675 | 678 | | |
676 | 679 | | |
677 | 680 | | |
678 | 681 | | |
679 | | - | |
| 682 | + | |
680 | 683 | | |
681 | 684 | | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | | - | |
686 | | - | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
687 | 689 | | |
688 | 690 | | |
689 | 691 | | |
690 | 692 | | |
691 | 693 | | |
692 | 694 | | |
693 | 695 | | |
694 | | - | |
| 696 | + | |
695 | 697 | | |
696 | 698 | | |
697 | 699 | | |
698 | 700 | | |
699 | 701 | | |
700 | | - | |
701 | | - | |
702 | | - | |
703 | | - | |
704 | | - | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
705 | 714 | | |
| 715 | + | |
706 | 716 | | |
707 | 717 | | |
708 | 718 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
| |||
0 commit comments