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

Make side-effect order explicit #86

Merged
merged 3 commits into from
Sep 24, 2016
Merged

Make side-effect order explicit #86

merged 3 commits into from
Sep 24, 2016

Conversation

mihaibudiu
Copy link
Contributor

Other features in this pull request:

  • support for boolean locals in bmv2 back-end
  • moved several passes to front-end
  • several bug fixes in type-checking
  • removed pass that checks aliasing - made obsolete by the side-effect pass
  • added annotations to BlockStatements
  • simplified the grammar: allow control-flow statements in actions
  • compiler may generate temporarily control-flow statements in parsers (a lowering pass to be written will remove them)

}
if (left->is<IR::Type_Table>()) {
auto la = left->to<IR::Type_Table>();
auto ra = right->to<IR::Type_Table>();
return equivalent(la->getApplyMethodType(), ra->getApplyMethodType());
Copy link
Contributor

@ChrisDodd ChrisDodd Sep 22, 2016

Choose a reason for hiding this comment

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

Why change this code? The new code is identical in effect to the old code, just more verbose and harder to read.

if (lm->returnType == nullptr) {
if (rm->returnType != nullptr)
return false;
} else if (rm->returnType == nullptr) {
return false;
Copy link
Contributor

@ChrisDodd ChrisDodd Sep 22, 2016

Choose a reason for hiding this comment

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

@have equivalent check for nullptr args as the first thing it does, and you could eliminate all these (and other) nullptr checks.

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.

2 participants