Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upStore function linkage in the ir #1091
Conversation
highfive
added
the
S-awaiting-review
label
Oct 22, 2017
emilio
approved these changes
Oct 23, 2017
src/ir/function.rs
Outdated
| @@ -49,6 +49,12 @@ impl FunctionKind { | |||
| } | |||
| } | |||
|
|
|||
| #[derive(Debug, Clone, Copy)] | |||
| pub enum Linkage { | |||
This comment has been minimized.
This comment has been minimized.
emilio
Oct 23, 2017
Collaborator
Could you document this enum and the variants, please? Travis is complaining because of that.
src/ir/function.rs
Outdated
| @@ -69,6 +75,9 @@ pub struct Function { | |||
|
|
|||
| /// The kind of function this is. | |||
| kind: FunctionKind, | |||
|
|
|||
| // The linkage of the function. | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@bors-servo delegate+ |
This comment has been minimized.
This comment has been minimized.
|
|
jrmuizel
force-pushed the
jrmuizel:linkage
branch
from
e9dded3
to
fa67a7d
Oct 24, 2017
emilio
approved these changes
Oct 24, 2017
src/codegen/mod.rs
Outdated
| @@ -3127,6 +3127,13 @@ impl CodeGenerator for Function { | |||
| debug!("<Function as CodeGenerator>::codegen: item = {:?}", item); | |||
| debug_assert!(item.is_enabled_for_codegen(ctx)); | |||
|
|
|||
| // We can't currently do anything with Internal functions so just | |||
| // them. | |||
This comment has been minimized.
This comment has been minimized.
emilio
Oct 24, 2017
Collaborator
So just avoid generating them?
Also I wonder if it looks nicer to just do self.linkage() != Linkage::Internal.
emilio
force-pushed the
jrmuizel:linkage
branch
from
fa67a7d
to
02dc2bf
Oct 24, 2017
This comment has been minimized.
This comment has been minimized.
|
I just addressed my previous comment too. @bors-servo r+ |
This comment has been minimized.
This comment has been minimized.
|
|
highfive
assigned
emilio
Oct 24, 2017
highfive
added
S-awaiting-merge
and removed
S-awaiting-review
labels
Oct 24, 2017
This comment has been minimized.
This comment has been minimized.
bors-servo
added a commit
that referenced
this pull request
Oct 24, 2017
This comment has been minimized.
This comment has been minimized.
|
|
bors-servo
merged commit 02dc2bf
into
rust-lang:master
Oct 24, 2017
highfive
removed
the
S-awaiting-merge
label
Oct 24, 2017
jrmuizel
referenced this pull request
Oct 24, 2017
Open
Generate C code to export static inline functions #1090
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
jrmuizel commentedOct 22, 2017
This lets us capture 'static inline' functions in the ir and filter them
later down the pipeline. This is the first step on the way to handling
these functions better.