Olivier Goffart
1b748792ad
Visit the item as Pin
...
A preparation to have Property::get to take Pin<Self>
2020-06-25 18:50:20 +02:00
Simon Hausmann
c18861125d
Small typo fix :-)
2020-06-25 14:22:10 +02:00
Olivier Goffart
f50a705e00
Add the #[pin] attribute to be able to project to the pinned item
2020-06-25 12:18:09 +02:00
Olivier Goffart
caca0d0ba4
Put the component in a Pin<>
...
Removed the drop and create from the ComponentVTable:
since we are not using VBox<ComponentVTable>, this simplifies a bit
the code of the interpreter and everything else.
But there is still a lot of changes everywhere to support that the Component
is pinned.
This is just for the component. Which would be required if later we want
to access the properties as Pin<Property<_>>. But we have not yet ability
to do projections
2020-06-24 14:13:27 +02:00
Olivier Goffart
30b201d946
Reduce the use of unsafe in corelib and in the rust backend
2020-06-12 19:03:15 +02:00
Olivier Goffart
bbb2b487b9
Implement a way to create a VRef for non static vtable
2020-06-12 17:09:51 +02:00
Olivier Goffart
34931e58c0
Polishing of the documentation
2020-06-08 17:57:18 +02:00
Simon Hausmann
5e7c6372fd
Fix cross-compilation of vtable
...
syn/quote/proc-macro are not needed at run-time for the vtable use.
2020-06-08 13:00:55 +02:00
Olivier Goffart
0a48252702
Interpreter: implement the ComponentVTable properly
...
with the drop and construct function
2020-06-03 17:33:26 +02:00
Olivier Goffart
9c3dbe1a81
Small doc fixup to workaround rustdoc bug
...
https://github.com/rust-lang/rust/issues/45939
https://github.com/rust-lang/rust/issues/60543
2020-05-31 16:20:22 +02:00
Olivier Goffart
5f01ec30ee
Fix the viewer using generated rtti from a macro
...
One thing that needed to change is that we needed the vtable to be unique
2020-05-30 15:08:51 +02:00
Olivier Goffart
8c39ada671
Add downcast method to VRef and VRefMut
2020-05-28 09:18:28 +02:00
Olivier Goffart
0f977cbb25
Some documentation fixes for item generated with #[vtable]
2020-05-22 12:38:55 +02:00
Olivier Goffart
bf3a0878b5
Add documentation for the vtable crate
2020-05-22 11:17:45 +02:00
Olivier Goffart
f4714f2f5b
Add missing file
2020-05-18 16:00:18 +02:00
Olivier Goffart
07942da4bb
vtable: introduce VOffset
2020-05-18 11:06:44 +02:00
Olivier Goffart
1addcad615
vtable: Fix the repr
2020-05-18 11:06:44 +02:00
Olivier Goffart
5a9cbaae66
vtable add support for field offset in the vtable
2020-05-18 11:06:44 +02:00
Olivier Goffart
aff3d7e14b
vtable: add safe way to construct references
2020-05-18 11:06:44 +02:00
Olivier Goffart
810a3905a7
Add VBox::new
2020-05-18 11:06:44 +02:00
Olivier Goffart
b745c616f7
Add a trait to get the vtable for a type
2020-05-18 11:06:44 +02:00
Olivier Goffart
4ca45ca4da
vtable crate: Some refactoring and simplifications
2020-05-18 11:06:44 +02:00
Olivier Goffart
903fc513de
vtable: make sure one cannot call the function with the wrong type
2020-05-18 11:06:44 +02:00
Olivier Goffart
0a973f65d5
vtable: Some more safety fix
2020-05-18 11:06:44 +02:00
Olivier Goffart
f74cfe73cd
Use the vtable crate for the ItemVTable
2020-05-18 11:06:44 +02:00
Olivier Goffart
49fc23224e
vtable: Remove the TraitType wrapper, and allow Option<fn>
2020-05-18 11:06:44 +02:00
Olivier Goffart
8d9a64d249
vtable: add a macro to create a static vtable
2020-05-18 11:06:44 +02:00
Olivier Goffart
62010be72e
vtable: support associated consts
2020-05-18 11:06:44 +02:00
Olivier Goffart
4988fcb543
More fix to use vtable for component. All rust code compiles
2020-05-18 11:06:31 +02:00
Olivier Goffart
686f4c9591
More work on the vtable macro to adapt the Component
...
This does not work yet
2020-05-18 11:04:54 +02:00
Olivier Goffart
1ced4224b5
More work on the vtable crate
2020-05-18 11:04:54 +02:00
Olivier Goffart
aa27fceb8c
vtable: move the macro in its own macro crate so we can have a runtime
2020-05-18 11:04:54 +02:00
Olivier Goffart
fb691e0808
Implement Component using vtable
...
(the C++ part not yet ported)
2020-05-18 11:04:54 +02:00
Olivier Goffart
4b19818f6c
WIP: port Component to vtable
2020-05-18 11:04:54 +02:00
Olivier Goffart
5c5df6b8e3
Macro to generate trait and safe abstraction for a vtable
2020-05-13 23:07:59 +02:00