Skip to content

Commit 18b1ce7

Browse files
author
Artyom Abakumov
committed
Use better names for TypeClause gen blr functions and make putField private
1 parent f360f39 commit 18b1ce7

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

src/dsql/DsqlCompilerScratch.cpp

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -241,16 +241,16 @@ void DsqlCompilerScratch::putBlrMarkers(ULONG marks)
241241
void DsqlCompilerScratch::putType(const dsql_fld* field, bool useSubType)
242242
{
243243
fb_assert(field);
244-
putType(*field, useSubType, field->explicitCollation);
244+
putField(*field, useSubType, field->explicitCollation);
245245
}
246246

247247
void DsqlCompilerScratch::putType(const TypeClause* type, bool useSubType)
248248
{
249249
fb_assert(type);
250-
putType(*type, useSubType, type->collate.object.hasData());
250+
putField(*type, useSubType, type->collate.object.hasData());
251251
}
252252

253-
void DsqlCompilerScratch::putType(const TypeClause& type, bool useSubType, bool useExplicitCollate)
253+
void DsqlCompilerScratch::putField(const TypeClause& type, bool useSubType, bool useExplicitCollate)
254254
{
255255
#ifdef DEV_BUILD
256256
// Check if the field describes a known datatype
@@ -259,7 +259,7 @@ void DsqlCompilerScratch::putType(const TypeClause& type, bool useSubType, bool
259259
{
260260
SCHAR buffer[100];
261261

262-
sprintf(buffer, "Invalid dtype %d in DsqlCompilerScratch::putType", type.dtype);
262+
sprintf(buffer, "Invalid dtype %d in DsqlCompilerScratch::putField", type.dtype);
263263
ERRD_bugcheck(buffer);
264264
}
265265
#endif
@@ -272,20 +272,20 @@ void DsqlCompilerScratch::putType(const TypeClause& type, bool useSubType, bool
272272
{
273273
if (type.typeOfTable.object.hasData())
274274
{
275-
putTypeNameBlr<true>(type, useExplicitCollate);
275+
putFieldName<true>(type, useExplicitCollate);
276276
}
277277
else
278278
{
279-
putTypeNameBlr<false>(type, useExplicitCollate);
279+
putFieldName<false>(type, useExplicitCollate);
280280
}
281281
return;
282282
}
283283

284284
// Maybe it is possible to use GEN_descriptor here?
285-
putDTypeBlr(type, useSubType);
285+
putFieldType(type, useSubType);
286286
}
287287

288-
void DsqlCompilerScratch::putDTypeBlr(const TypeClause& type, const bool useSubType)
288+
void DsqlCompilerScratch::putFieldType(const TypeClause& type, const bool useSubType)
289289
{
290290
switch (type.dtype)
291291
{
@@ -331,9 +331,8 @@ void DsqlCompilerScratch::putDTypeBlr(const TypeClause& type, const bool useSubT
331331
}
332332
}
333333

334-
335334
template<bool THasTableName>
336-
void DsqlCompilerScratch::putTypeNameBlr(const TypeClause& type, const bool useExplicitCollate)
335+
void DsqlCompilerScratch::putFieldName(const TypeClause& type, const bool useExplicitCollate)
337336
{
338337
struct BlrNameSet
339338
{
@@ -426,7 +425,7 @@ void DsqlCompilerScratch::putLocalVariableDecl(dsql_var* variable, DeclareVariab
426425
appendUShort(variable->number);
427426
DDL_resolve_intl_type(this, field, collationName);
428427

429-
putDtype(field, true);
428+
putType(field, true);
430429

431430
if (variable->field->fld_name.hasData()) // Not a function return value
432431
putDebugVariable(variable->number, variable->field->fld_name);

src/dsql/DsqlCompilerScratch.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ class DsqlCompilerScratch : public BlrDebugWriter
178178
// blr_column_name2/blr_domain_name2 for explicit collate
179179
// blr_column_name/blr_domain_name for regular field
180180
void putType(const TypeClause* type, bool useSubType);
181-
void putType(const TypeClause& type, bool useSubType, bool useExplicitCollate);
182181
void putLocalVariableDecl(dsql_var* variable, DeclareVariableNode* hostParam, QualifiedName& collationName);
183182
void putLocalVariableInit(dsql_var* variable, const DeclareVariableNode* hostParam);
184183

@@ -296,10 +295,12 @@ class DsqlCompilerScratch : public BlrDebugWriter
296295
bool pass1RelProcIsRecursive(RecordSourceNode* input);
297296
BoolExprNode* pass1JoinIsRecursive(RecordSourceNode*& input);
298297

299-
void putDTypeBlr(const TypeClause& type, const bool useSubType);
298+
void putField(const TypeClause& type, bool useSubType, bool useExplicitCollate);
300299

301300
template<bool THasTableName>
302-
void putTypeNameBlr(const TypeClause& type, const bool useExplicitCollate);
301+
void putFieldName(const TypeClause& type, const bool useExplicitCollate);
302+
303+
void putFieldType(const TypeClause& type, const bool useSubType);
303304

304305
dsql_dbb* dbb = nullptr; // DSQL attachment
305306
jrd_tra* transaction = nullptr; // Transaction

0 commit comments

Comments
 (0)