Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++ codegen of structs and unions #2707

Merged
merged 26 commits into from
Jul 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
11fbd27
Codegen structs
emilk Jul 17, 2023
83d0bf7
Fix includes
emilk Jul 17, 2023
9de84fc
Allow `unimplemented!` macro (it is used a lot already so…)
emilk Jul 17, 2023
45dfdab
Add docstrings
emilk Jul 17, 2023
650d55f
Start implementing union types
emilk Jul 17, 2023
000453d
Start work on static constructors for unions, and then give up
emilk Jul 17, 2023
1252962
avoid typo
emilk Jul 17, 2023
c58151d
Implement enum destructors
emilk Jul 17, 2023
fa1a280
Ignore destructors for Plain Old Data
emilk Jul 17, 2023
9c20275
Simplify union destructor
emilk Jul 17, 2023
4ba938d
Start working on move semantics for enum types
emilk Jul 17, 2023
fd96244
More work towards move-semantics
emilk Jul 17, 2023
dbe9366
Implement move constructor and move-assignment
emilk Jul 17, 2023
ef1a992
Static constructors
emilk Jul 17, 2023
47e04fd
Implicit enum constructors
emilk Jul 17, 2023
8d0a669
Minimal example of constructing a Transform3D
emilk Jul 17, 2023
be2b520
Implicit constructors for single-field structs (newtype wrappers)
emilk Jul 18, 2023
71a7257
Use more idiomatic `Index` instead of `get` which cannot fail
emilk Jul 18, 2023
ec42d63
Better naming of our special hack tokens
emilk Jul 18, 2023
bed653c
Better explanation of the NONE state
emilk Jul 18, 2023
40634ea
Only include <new> if needed
emilk Jul 18, 2023
8636354
Explain why the bitwise swap is safe
emilk Jul 18, 2023
4592baf
Clean up code by breaking up long function
emilk Jul 18, 2023
b8a18a5
Code cleanup
emilk Jul 18, 2023
bbe4a58
Simplify the code
emilk Jul 18, 2023
138fa3a
Rename `is_pod` to `has_default_destructor`
emilk Jul 18, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ AlwaysBreakBeforeMultilineStrings: true
BinPackArguments: false
ColumnLimit: 100
ContinuationIndentWidth: 4
EmptyLineBeforeAccessModifier: LogicalBlock
IndentWidth: 4
IndentWrappedFunctionNames: true
InsertTrailingCommas: Wrapped
MaxEmptyLinesToKeep: 1
NamespaceIndentation: All
PointerAlignment: Left
SeparateDefinitionBlocks: Always
SpacesBeforeTrailingComments: 1
2 changes: 1 addition & 1 deletion crates/re_types/source_hash.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This is a sha256 hash for all direct and indirect dependencies of this crate's build script.
# It can be safely removed at anytime to force the build script to run again.
# Check out build.rs to see how it's computed.
d5ccdc80e148c8058d3885418f9c701fbae4a5fbb92defb9bd625ad27ed97a25
289571cd5bcef516a43ead1678f39054c300890396d13933dc26d9294a07dffe
2 changes: 1 addition & 1 deletion crates/re_types_builder/src/arrow_registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ impl From<DataType> for LazyDatatype {
DataType::Extension(name, datatype, metadata) => {
LazyDatatype::Extension(name, Box::new((*datatype).into()), metadata)
}
_ => unimplemented!("{datatype:#?}"), // NOLINT
_ => unimplemented!("{datatype:#?}"),
}
}
}
Expand Down
Loading