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

Method pass1

src/dsql/StmtNodes.cpp:322–361  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

320}
321
322AssignmentNode* AssignmentNode::pass1(thread_db* tdbb, CompilerScratch* csb)
323{
324 ValueExprNode* sub = asgnFrom;
325 FieldNode* fieldNode;
326 StreamType stream;
327 CompilerScratch::csb_repeat* tail;
328
329 if ((fieldNode = nodeAs<FieldNode>(sub)))
330 {
331 stream = fieldNode->fieldStream;
332 jrd_fld* field = MET_get_field(csb->csb_rpt[stream].csb_relation, fieldNode->fieldId);
333
334 if (field)
335 missing2 = field->fld_missing_value;
336 }
337
338 sub = asgnTo;
339
340 if ((fieldNode = nodeAs<FieldNode>(sub)))
341 {
342 stream = fieldNode->fieldStream;
343 tail = &csb->csb_rpt[stream];
344 jrd_fld* field = MET_get_field(tail->csb_relation, fieldNode->fieldId);
345
346 if (field && field->fld_missing_value)
347 missing = field->fld_missing_value;
348 }
349
350 doPass1(tdbb, csb, asgnFrom.getAddress());
351
352 { // scope
353 AutoSetRestore<ExprNode*> autoCurrentAssignTarget(&csb->csb_currentAssignTarget, asgnTo);
354 doPass1(tdbb, csb, asgnTo.getAddress());
355 }
356
357 doPass1(tdbb, csb, missing.getAddress());
358 // ASF: No idea why we do not call pass1 for missing2.
359
360 return this;
361}
362
363AssignmentNode* AssignmentNode::pass2(thread_db* tdbb, CompilerScratch* csb)
364{

Callers

nothing calls this directly

Calls 15

CMP_post_resourceFunction · 0.85
raiseFunction · 0.85
GdsClass · 0.85
CMP_post_accessFunction · 0.85
preprocessAssignmentsFunction · 0.85
pass1ValidationsFunction · 0.85
CMP_csb_elementFunction · 0.85
getAddressMethod · 0.80
isSubRoutineMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected