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

support for directCounterMap #7

Merged
merged 2 commits into from
May 3, 2017
Merged

support for directCounterMap #7

merged 2 commits into from
May 3, 2017

Conversation

cc10512
Copy link

@cc10512 cc10512 commented May 3, 2017

There is one other place where i saw this used. jsonconverter was looking it up in the map:

                } else if (eb->type->name == v1model.directCounter.name) {
                    auto it = directCountersMap.find(name);
                    if (it == directCountersMap.end()) {
                        ::warning("%1%: Direct counter not used; ignoring", c);
                    } else {

That went out with the different handling of externs i suppose. In any case, it looks like the backend was not generating code for the extern if it was not used. How are we handling this case?

Calin Cascaval added 2 commits May 2, 2017 19:57
…lang#555)

* adds an unimplemented exception and exception catching in drivers

Adds a new type of P4Exception: CompilerUnimplemented to replace
instances where we use BUG/BUG_CHECK as a placeholder for features
that we have not yet implemented.

Also adds exception catching in the compiler drivers, such that the
compiler exits cleanly.

* fix unit test to account for escape sequences

And address reviewer's comments + prettify.
Also converts control and externs to use the backend.
@hanw hanw merged commit 8e0337f into hanw:hanw/psa May 3, 2017
hanw pushed a commit that referenced this pull request May 4, 2017
hanw pushed a commit that referenced this pull request May 11, 2017
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