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

Store function linkage in the ir #1091

Merged
merged 1 commit into from Oct 24, 2017

Conversation

Projects
None yet
4 participants
@jrmuizel
Copy link
Contributor

jrmuizel commented Oct 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.

@emilio

emilio approved these changes Oct 23, 2017

@@ -49,6 +49,12 @@ impl FunctionKind {
}
}

#[derive(Debug, Clone, Copy)]
pub enum Linkage {

This comment has been minimized.

@emilio

emilio Oct 23, 2017

Collaborator

Could you document this enum and the variants, please? Travis is complaining because of that.

@@ -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.

@emilio

emilio Oct 23, 2017

Collaborator

Let's use a doc comment here too for consistency.

@emilio

This comment has been minimized.

Copy link
Collaborator

emilio commented Oct 23, 2017

@bors-servo delegate+

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Oct 23, 2017

✌️ @jrmuizel can now approve this pull request

@jrmuizel jrmuizel force-pushed the jrmuizel:linkage branch from e9dded3 to fa67a7d Oct 24, 2017

@emilio

emilio approved these changes Oct 24, 2017

@@ -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.

@emilio

emilio Oct 24, 2017

Collaborator

So just avoid generating them?

Also I wonder if it looks nicer to just do self.linkage() != Linkage::Internal.

Store function linkage in the ir
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.

@emilio emilio force-pushed the jrmuizel:linkage branch from fa67a7d to 02dc2bf Oct 24, 2017

@emilio

This comment has been minimized.

Copy link
Collaborator

emilio commented Oct 24, 2017

I just addressed my previous comment too.

@bors-servo r+

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Oct 24, 2017

📌 Commit 02dc2bf has been approved by emilio

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Oct 24, 2017

⌛️ Testing commit 02dc2bf with merge 36aa5f4...

bors-servo added a commit that referenced this pull request Oct 24, 2017

Auto merge of #1091 - jrmuizel:linkage, r=emilio
Store function linkage in the ir

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.
@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Oct 24, 2017

☀️ Test successful - status-travis
Approved by: emilio
Pushing 36aa5f4 to master...

@bors-servo bors-servo merged commit 02dc2bf into rust-lang:master Oct 24, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.