MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / pass2

Method pass2

src/dsql/ExprNodes.cpp:482–516  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

480}
481
482ExprNode* ExprNode::pass2(thread_db* tdbb, CompilerScratch* csb)
483{
484 NodeRefsHolder holder(csb->csb_pool);
485 getChildren(holder, false);
486
487 for (auto i : holder.refs)
488 {
489 if (!*i)
490 continue;
491
492 doPass2(tdbb, csb, i);
493
494 ExprNode* node = *i;
495
496 // Bind values of invariant nodes to top-level RSE (if present)
497 if (node && (node->nodFlags & ExprNode::FLAG_INVARIANT))
498 {
499 if (csb->csb_current_nodes.hasData())
500 {
501 RseNode* topRseNode = nodeAs<RseNode>(csb->csb_current_nodes[0]);
502 fb_assert(topRseNode);
503
504 if (!topRseNode->rse_invariants)
505 {
506 topRseNode->rse_invariants =
507 FB_NEW_POOL(*tdbb->getDefaultPool()) VarInvariantArray(*tdbb->getDefaultPool());
508 }
509
510 topRseNode->rse_invariants->add(node->impureOffset);
511 }
512 }
513 }
514
515 return this;
516}
517
518
519//--------------------

Callers

nothing calls this directly

Calls 15

pass2Function · 0.85
getDescFunction · 0.85
CMP_formatFunction · 0.85
DTYPE_IS_DECFLOATFunction · 0.85
CVT_get_dec64Function · 0.85
CVT_get_dec128Function · 0.85
CVT_get_int128Function · 0.85
CMP_pass2_validationFunction · 0.85
GdsClass · 0.85
CMP_post_rseFunction · 0.85
makeTextMethod · 0.80
isInvariantMethod · 0.80

Tested by

no test coverage detected