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

Fixing bug in parserUnroll #3503

Merged
merged 4 commits into from
Sep 9, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
update
  • Loading branch information
VolodymyrPeschanenko committed Sep 1, 2022
commit 81cacba6411d52e95738f73d9856ed66514e07f6
5 changes: 3 additions & 2 deletions midend/parserUnroll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ class ParserStateRewriter : public Transform {
newExpression->right = res;
if (!res->fitsInt64()) {
// we need to leave expression as is.
::warning(ErrorType::ERR_EXPRESSION, "Index can't be concretized : %1%",
::warning(ErrorType::ERR_EXPRESSION, "Index can't be concretized : %1%",
expression);
return expression;
}
Expand Down Expand Up @@ -511,7 +511,8 @@ class ParserSymbolicInterpreter {
}
catch (...) {
// Ignore throws from evaluator.
// If an index of a header stack is not substituted then we should leave a state as is.
// If an index of a header stack is not substituted then
// we should leave a state as is.
}
ParserStateRewriter rewriter(structure, state, valueMap, refMap, typeMap, &ev,
visitedStates);
Expand Down
3 changes: 2 additions & 1 deletion midend/parserUnroll.h
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,8 @@ class RewriteAllParsers : public Transform {
for (auto& i : rewriter->current.result->states) {
for (auto& j : *i.second)
if (j->newState) {
if (rewriter->hasOutOfboundState && j->newState->name.name == "stateOutOfBound") {
if (rewriter->hasOutOfboundState &&
j->newState->name.name == "stateOutOfBound") {
continue;
}
newParser->states.push_back(j->newState);
Expand Down