feat/8-ast-datastructures #11
No reviewers
Labels
No labels
IncrementalParsing
Kind
Bug
Kind
Documentation
Kind
Enhancement
Kind
Feature
Kind
OtherCompilersCompliance
Kind
StandardCompliance
Performance
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Scope/Lexer
Scope/Parser
Scope/PreProcessor
Scope/PublicApi
Scope/Sema
Status
Abandoned
Status
Blocked
Status
Need More Info
Testing
UserExperience
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
click-project/click!11
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/8-ast-datastructures"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Example usage:
closes #8
@ -50,2 +69,4 @@typedef int click_exitcode;#define click_borrow /* borrow ownership for lifetime */#define click_move /* permanently move ownership */what do you plan on doing here?
just improve code readability; also there are ownership specifiers in c23 I thnk? didn't look at it yet
I'm merging all of this but I'm going to take the time to document it all as really only you can read it
@ -199,0 +292,4 @@} while (0)#define click_dup_impl(/* borrow */ obj) \click_debug_assert(((click_obj_header*) (obj))->_rc++ != 0);what does it mean for
_rcto be -1this just makes sure we aren't overflowing refcount
but actually that should be a pre increment
sob
just patch it into main I guess I can't be bothered
but merge conflicts with the header PR
I'll open an issue instead and we do it after header PR merged
@ -199,0 +303,4 @@#define click_as_obj(t, ptr) \((click_obj_header*) &( \(t*) click_obj_forward_ptr_and_assert(t, (t*) ptr)) \->_obj)_objis only really explained once you get toclick_ast.h, might wanna check that@ -0,0 +33,4 @@// this or any of the children had parser errorbool contains_parser_error : 1;// this had parser error itselfbool is_parser_error : 1;"this"
(would replace with "this node", assuming everything here is, in fact, the header for a node. granted, I still have no idea what the point of an obj is)
@ -0,0 +49,4 @@#define click_ast_header_children(ast_header) \((click_ast**) (((char*) (void*) (click_ast*) (ast_header)) + \click_ast_kindinfo[(ast_header)->kind].children_offset))oh my god
@ -235,0 +238,4 @@void click_check_impl_fail(void){click_panic("click object generational reference fail -> reference was kept longer than object lifetime");}any reason this needs to be a separate impl function?
yes because performance