core: reduce code duplication in codegen/extern_fns #453

Merged
sb10q merged 2 commits from refactor-extern_fns into master 2024-07-09 16:31:12 +08:00
Collaborator

Used macros to reduce code duplication in codegen/extern_fns

Used macros to reduce code duplication in `codegen/extern_fns`
abdul124 added 1 commit 2024-07-08 15:10:11 +08:00
abdul124 requested review from sb10q 2024-07-08 15:18:41 +08:00
sb10q reviewed 2024-07-09 04:51:00 +08:00
@ -11,3 +7,1 @@
name: Option<&str>,
) -> FloatValue<'ctx> {
const FN_NAME: &str = "tan";
/// Macro to conveniently generate extern function call
Owner

Again, this is generating functions, not function calls.

Again, this is generating functions, not function calls.
Author
Collaborator

Updated comments.

Updated comments.
sb10q reviewed 2024-07-09 04:52:37 +08:00
@ -101,0 +80,4 @@
/// The default attributes are "mustprogress", "nofree", "nounwind", "willreturn", and "writeonly"
/// These will be used unless other attributes are specified
///
macro_rules! generate_extern_binary_fn_call {
Owner

It's rather confusing what is "helper" and what is not. Can you find a better name, or remove "helper" entirely?

It's rather confusing what is "helper" and what is not. Can you find a better name, or remove "helper" entirely?
Author
Collaborator

Removed helper entirely and merged the macros into generate_extern_fn macro

Removed helper entirely and merged the macros into `generate_extern_fn` macro
abdul124 added 1 commit 2024-07-09 11:59:28 +08:00
sb10q merged commit eeb474f9e6 into master 2024-07-09 16:31:12 +08:00
sb10q deleted branch refactor-extern_fns 2024-07-09 16:31:44 +08:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/nac3#453
No description provided.