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

Add namespaces #734

Merged
merged 1 commit into from
Apr 3, 2024
Merged

Add namespaces #734

merged 1 commit into from
Apr 3, 2024

Conversation

vbgl
Copy link
Member

@vbgl vbgl commented Feb 21, 2024

No description provided.

@vbgl vbgl force-pushed the namespaces branch 4 times, most recently from 804890a to 81dd057 Compare February 22, 2024 11:56
Copy link
Contributor

@bgregoir bgregoir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I don't like the ::, but it seems to be more rust compatible, so ...
Should we add also feature like "use A::B::c" of rust ? (not necessary for this PR).

@@ -33,6 +33,7 @@ let pp_gens (fmt : Format.formatter) xs =

(* -------------------------------------------------------------------- *)
let string_of_label name (p : label) =
let name = String.map (fun c -> if c = '.' || c = ':' then '_' else c) name in
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that we have twice the same function, maybe we should share them.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. There is already a comment about this in the code. Your contribution (as a separate PR) is welcome.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved my addition to the PrintCommon module but left the duplication of string_of_label. I believe that the two asm-printers could be refactored to share their common functionality and make it easier to add new targets.

@bgregoir bgregoir merged commit 9bb6340 into main Apr 3, 2024
1 check passed
@bgregoir bgregoir deleted the namespaces branch April 3, 2024 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants