@@ -118,7 +118,7 @@ type ElementMeta = {
118118 elementSize ?: number ; // known uniform stride when consistent
119119} ;
120120
121- /** The piece your host delegates to for readValue/writeValue. */
121+ // The piece your host delegates to for readValue/writeValue.
122122export class MemoryHost {
123123 private cache = new ValidatingCache < MemoryContainer > ( ) ;
124124 private endianness : Endianness ;
@@ -152,7 +152,7 @@ export class MemoryHost {
152152 return this . cache . ensure ( varName , ( ) => new MemoryContainer ( varName ) , false ) ;
153153 }
154154
155- /** Read a value, using byte-only offsets and widths. */
155+ // Read a value, using byte-only offsets and widths.
156156 public async readValue ( ref : RefContainer ) : Promise < EvalValue > {
157157 const variableName = ref . anchor ?. name ;
158158 const widthBytes = ref . widthBytes ?? 0 ;
@@ -200,7 +200,7 @@ export class MemoryHost {
200200 return raw . slice ( ) ;
201201 }
202202
203- /** Read raw bytes without interpretation. */
203+ // Read raw bytes without interpretation.
204204 public async readRaw ( ref : RefContainer , size : number ) : Promise < Uint8Array | undefined > {
205205 const variableName = ref . anchor ?. name ;
206206 if ( ! variableName || size <= 0 ) {
@@ -211,7 +211,7 @@ export class MemoryHost {
211211 return container . read ( byteOff , size ) . slice ( ) ;
212212 }
213213
214- /** Write a value, using byte-only offsets and widths. */
214+ // Write a value, using byte-only offsets and widths.
215215 public async writeValue ( ref : RefContainer , value : EvalValue , virtualSize ?: number ) : Promise < void > {
216216 const variableName = ref . anchor ?. name ;
217217 const widthBytes = ref . widthBytes ?? 0 ;
@@ -425,20 +425,20 @@ export class MemoryHost {
425425 this . cache . clear ( ) ;
426426 }
427427
428- /** Number of array elements recorded for `name`. Defaults to 1 when unknown. */
428+ // Number of array elements recorded for `name`. Defaults to 1 when unknown.
429429 public getArrayElementCount ( name : string ) : number {
430430 const m = this . elementMeta . get ( name ) ;
431431 const n = m ?. offsets . length ?? 0 ;
432432 return n > 0 ? n : 1 ;
433433 }
434434
435- /** All recorded target base addresses (per append) for `name`. */
435+ // All recorded target base addresses (per append) for `name`.
436436 public getArrayTargetBases ( name : string ) : ( number | undefined ) [ ] {
437437 const m = this . elementMeta . get ( name ) ;
438438 return m ? m . bases . slice ( ) : [ ] ;
439439 }
440440
441- /** Target base address for element `index` of `name` (number | undefined). */
441+ // Target base address for element `index` of `name` (number | undefined).
442442 public getElementTargetBase ( name : string , index : number ) : number | undefined {
443443 const m = this . elementMeta . get ( name ) ;
444444 if ( ! m ) {
@@ -452,7 +452,7 @@ export class MemoryHost {
452452 return m . bases . at ( index ) ;
453453 }
454454
455- /** Optional: repair or set an address later. */
455+ // Optional: repair or set an address later.
456456 public setElementTargetBase ( name : string , index : number , base : number ) : void {
457457 const m = this . elementMeta . get ( name ) ;
458458 if ( ! m ) {
0 commit comments