Parse routine BLR and debug info.
| 150 | |
| 151 | // Parse routine BLR and debug info. |
| 152 | void Routine::parseBlr(thread_db* tdbb, CompilerScratch* csb, bid* blob_id, bid* blobDbg) |
| 153 | { |
| 154 | Jrd::Attachment* attachment = tdbb->getAttachment(); |
| 155 | |
| 156 | if (blobDbg) |
| 157 | DBG_parse_debug_info(tdbb, blobDbg, *csb->csb_dbg_info); |
| 158 | |
| 159 | UCharBuffer tmp; |
| 160 | |
| 161 | if (blob_id) |
| 162 | { |
| 163 | blb* blob = blb::open(tdbb, attachment->getSysTransaction(), blob_id); |
| 164 | ULONG length = blob->blb_length + 10; |
| 165 | UCHAR* temp = tmp.getBuffer(length); |
| 166 | length = blob->BLB_get_data(tdbb, temp, length); |
| 167 | tmp.resize(length); |
| 168 | } |
| 169 | |
| 170 | parseMessages(tdbb, csb, BlrReader(tmp.begin(), (unsigned) tmp.getCount())); |
| 171 | |
| 172 | flags &= ~Routine::FLAG_RELOAD; |
| 173 | |
| 174 | Statement* statement = getStatement(); |
| 175 | PAR_blr(tdbb, NULL, tmp.begin(), (ULONG) tmp.getCount(), NULL, &csb, &statement, false, 0); |
| 176 | setStatement(statement); |
| 177 | |
| 178 | if (csb->csb_g_flags & csb_reload) |
| 179 | flags |= FLAG_RELOAD; |
| 180 | |
| 181 | if (!blob_id) |
| 182 | setImplemented(false); |
| 183 | } |
| 184 | |
| 185 | // Parse the messages of a blr request. For specified message, allocate a format (Format) block. |
| 186 | void Routine::parseMessages(thread_db* tdbb, CompilerScratch* csb, BlrReader blrReader) |
nothing calls this directly
no test coverage detected