Skip to content

Comments

Add LINKsystem, remove dependency on Target from the parser#6764

Merged
WalterBright merged 2 commits intodlang:masterfrom
ibuclaw:linksystem
May 11, 2017
Merged

Add LINKsystem, remove dependency on Target from the parser#6764
WalterBright merged 2 commits intodlang:masterfrom
ibuclaw:linksystem

Conversation

@ibuclaw
Copy link
Member

@ibuclaw ibuclaw commented May 9, 2017

As requested by @yebblies - I don't think this should leak to the glue, if it does, then that should be plugged.

super(decl);
//printf("LinkDeclaration(linkage = %d, decl = %p)\n", p, decl);
linkage = p;
linkage = (p != LINKsystem) ? p : Target.systemLinkage();
Copy link
Member

Choose a reason for hiding this comment

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

This would flow better as:

(p == LINKsystem) ? Target.systemLinkage() : p;

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I did, but then I remembered some obscure optimization detail that dmd considers the first branch as hot. Maybe that's one micro-optimization too far though. ;-)

@ibuclaw
Copy link
Member Author

ibuclaw commented May 10, 2017

Rebased.

@yebblies
Copy link
Contributor

I don't like that we're discarding information as we build the parse tree, but it is the same with the current version.

@ibuclaw
Copy link
Member Author

ibuclaw commented May 10, 2017

I don't like that we're discarding information as we build the parse tree

Mehhh... At least two errors have improved.

If I were thinking about having the frontend as a library, you would have a point though.

@ibuclaw
Copy link
Member Author

ibuclaw commented May 10, 2017

Is someone going to fix Jenkins, or...

@WalterBright WalterBright merged commit ac0f9fb into dlang:master May 11, 2017
@ibuclaw ibuclaw deleted the linksystem branch May 11, 2017 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants