Skip to content

Commit bdf019a

Browse files
committed
Update SizeDependency_oct_str_containing signature
Modified the function `SizeDependency_oct_str_containing` to include a new parameter, `sLocalVarType`, for specifying the local variable type. Adjusted the function's definition and its usage throughout the codebase. Updated the assignment of variable `<v>` to utilize `sLocalVarType`, enhancing type specificity. Context surrounding function calls has also been updated to align with the new signature.
1 parent e3a6332 commit bdf019a

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

BackendAst/DAstACN.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1463,8 +1463,8 @@ let rec handleSingleUpdateDependency (r:Asn1AcnAst.AstRoot) (deps:Asn1AcnAst.Acn
14631463
| None -> ""
14641464
| Some a -> a.funcBody
14651465
| None -> ""
1466-
1467-
let updateStatement = sizeDep_oct_str_containing (lm.lg.getParamValue o.resolvedType pSizeable.arg Encode) baseFncName sReqBytesForUperEncoding v (match o.encodingOptions with Some eo -> eo.octOrBitStr = ContainedInOctString | None -> false) sInner
1466+
let sLocalVarType = child.typeDefinitionBodyWithinSeq
1467+
let updateStatement = sizeDep_oct_str_containing (lm.lg.getParamValue o.resolvedType pSizeable.arg Encode) baseFncName sReqBytesForUperEncoding v (match o.encodingOptions with Some eo -> eo.octOrBitStr = ContainedInOctString | None -> false) sInner sLocalVarType
14681468
match checkPath with
14691469
| [] -> updateStatement
14701470
| _ -> checkAccessPath checkPath updateStatement v (initExpr r lm m child.Type)

CommonTypes/AbstractMacros.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ Generated by the C stg macros with the following command
467467
abstract member MultiAcnUpdate_checkEqual_str : sV0:string -> sVi:string -> sChPath:string -> bIsAlwaysInit:bool -> string;
468468
abstract member MultiAcnUpdate : v:string -> sV0:string -> sErrCode:string -> arrsLocalDeclarations:seq<string> -> arrsLocalUpdateStatements:seq<string> -> arrsGetFirstIntValue:seq<string> -> bIsFirstIntValueSingle:bool -> arrsLocalCheckEquality:seq<string> -> sDefaultExpr:string -> string;
469469
abstract member checkAccessPath : arrsCheckPaths:seq<string> -> sUpdateStatement:string -> v:string -> sInitExpr:string -> string;
470-
abstract member SizeDependency_oct_str_containing : p:string -> sFuncName:string -> sReqBytesForUperEncoding:string -> v:string -> bIsOctet:bool -> sInner:string -> string;
470+
abstract member SizeDependency_oct_str_containing : p:string -> sFuncName:string -> sReqBytesForUperEncoding:string -> v:string -> bIsOctet:bool -> sInner:string -> sLocalVarType:string -> string;
471471
abstract member octet_string_containing_ext_field_func : p:string -> sFuncName:string -> sReqBytesForUperEncoding:string -> sExtField:string -> sErrCode:string -> soInner:string option -> codec:Codec -> string;
472472
abstract member bit_string_containing_ext_field_func : p:string -> sFuncName:string -> sReqBytesForUperEncoding:string -> sReqBitsForUperEncoding:string -> sExtField:string -> sErrCode:string -> codec:Codec -> string;
473473
abstract member rtlModuleName : unit -> string;

StgAda/acn_a.stg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,7 +1292,7 @@ end if;
12921292

12931293

12941294

1295-
SizeDependency_oct_str_containing(p, sFuncName, sReqBytesForUperEncoding, v, bIsOctet, sInner) ::= <<
1295+
SizeDependency_oct_str_containing(p, sFuncName, sReqBytesForUperEncoding, v, bIsOctet, sInner, sLocalVarType) ::= <<
12961296
--first encode containing type to a temporary bitstream. That's the only way to learn in advance the size of the encoding octet string
12971297
declare
12981298
bs : adaasn1rtl.encoding.Bitstream := tmpBs;
@@ -1301,7 +1301,7 @@ begin
13011301
tmpBs := bs;
13021302
end;
13031303
if result.success then
1304-
<v> := <rtlModuleName()>.Asn1UInt(<if(bIsOctet)>adaasn1rtl.encoding.BitStream_current_length_in_bytes(tmpBs)<else>tmpBs.Current_Bit_Pos<endif>);
1304+
<v> := <sLocalVarType>(<if(bIsOctet)>adaasn1rtl.encoding.BitStream_current_length_in_bytes(tmpBs)<else>tmpBs.Current_Bit_Pos<endif>);
13051305
<v>_is_initialized := True;
13061306
end if;
13071307
>>

StgC/acn_c.stg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1126,7 +1126,7 @@ if (<arrsCheckPaths; separator=" && ">) {
11261126
>>
11271127

11281128

1129-
SizeDependency_oct_str_containing(p, sFuncName, sReqBytesForUperEncoding, v, bIsOctet, sInner) ::= <<
1129+
SizeDependency_oct_str_containing(p, sFuncName, sReqBytesForUperEncoding, v, bIsOctet, sInner, sLocalVarType) ::= <<
11301130
{
11311131
/*first encode containing type to a temporary bitstream. That's the only way to learn in advance the size of the encoding octet string*/
11321132
BitStream_Init(&bitStrm, arr, sizeof(arr));

StgScala/acn_scala.stg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1039,7 +1039,7 @@ val <v> =
10391039
>>
10401040

10411041

1042-
SizeDependency_oct_str_containing(p, sFuncName, sReqBytesForUperEncoding, v, bIsOctet, sInner) ::= <<
1042+
SizeDependency_oct_str_containing(p, sFuncName, sReqBytesForUperEncoding, v, bIsOctet, sInner, sLocalVarType) ::= <<
10431043
{
10441044
/*first encode containing type to a temporary bitstream. That's the only way to learn in advance the size of the encoding octet string*/
10451045
val pBitStrm_save: BitStream = pBitStrm

0 commit comments

Comments
 (0)