| 59 | |
| 60 | |
| 61 | BoolExprNode* BoolExprNode::pass2(thread_db* tdbb, CompilerScratch* csb) |
| 62 | { |
| 63 | pass2Boolean(tdbb, csb, [=] { ExprNode::pass2(tdbb, csb); }); |
| 64 | |
| 65 | if (nodFlags & FLAG_INVARIANT) |
| 66 | { |
| 67 | // Bind values of invariant nodes to top-level RSE (if present) |
| 68 | |
| 69 | if (csb->csb_current_nodes.hasData()) |
| 70 | { |
| 71 | RseNode* topRseNode = nodeAs<RseNode>(csb->csb_current_nodes[0]); |
| 72 | fb_assert(topRseNode); |
| 73 | |
| 74 | if (!topRseNode->rse_invariants) |
| 75 | { |
| 76 | topRseNode->rse_invariants = |
| 77 | FB_NEW_POOL(*tdbb->getDefaultPool()) VarInvariantArray(*tdbb->getDefaultPool()); |
| 78 | } |
| 79 | |
| 80 | topRseNode->rse_invariants->add(impureOffset); |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | return this; |
| 85 | } |
| 86 | |
| 87 | |
| 88 | //-------------------- |
nothing calls this directly
no test coverage detected