@@ -6196,8 +6196,8 @@ export class Compiler extends DiagnosticEmitter {
61966196 if ( flow . isAnyLocalFlag ( localIndex , LocalFlags . ANY_RETAINED ) ) {
61976197 valueExpr = this . makeReplace (
61986198 valueExpr ,
6199- module . local_get ( localIndex , type . toNativeType ( ) ) ,
62006199 type ,
6200+ module . local_get ( localIndex , type . toNativeType ( ) ) ,
62016201 valueType ,
62026202 alreadyRetained
62036203 ) ;
@@ -6256,8 +6256,8 @@ export class Compiler extends DiagnosticEmitter {
62566256 valueExpr = module . global_set ( global . internalName ,
62576257 this . makeReplace (
62586258 valueExpr ,
6259- module . global_get ( global . internalName , nativeType ) ,
62606259 type ,
6260+ module . global_get ( global . internalName , nativeType ) ,
62616261 valueType ,
62626262 alreadyRetained
62636263 )
@@ -6330,11 +6330,11 @@ export class Compiler extends DiagnosticEmitter {
63306330 module . local_tee ( tempThis . index , thisExpr ) ,
63316331 this . makeReplace (
63326332 module . local_tee ( tempValue . index , valueExpr ) ,
6333+ fieldType ,
63336334 module . load ( fieldType . byteSize , fieldType . is ( TypeFlags . SIGNED ) ,
63346335 module . local_get ( tempThis . index , nativeThisType ) ,
63356336 nativeFieldType , field . memoryOffset
63366337 ) ,
6337- fieldType ,
63386338 valueType , // TODOFIX
63396339 alreadyRetained
63406340 ) ,
@@ -6349,12 +6349,12 @@ export class Compiler extends DiagnosticEmitter {
63496349 module . local_tee ( tempThis . index , thisExpr ) ,
63506350 this . makeReplace (
63516351 valueExpr ,
6352+ fieldType ,
63526353 module . load ( fieldType . byteSize , fieldType . is ( TypeFlags . SIGNED ) ,
63536354 module . local_get ( tempThis . index , nativeThisType ) ,
63546355 nativeFieldType , field . memoryOffset
63556356 ) ,
6356- fieldType ,
6357- fieldType , // TODOFIX
6357+ valueType ,
63586358 alreadyRetained
63596359 ) ,
63606360 nativeFieldType , field . memoryOffset
@@ -7274,10 +7274,10 @@ export class Compiler extends DiagnosticEmitter {
72747274 makeReplace (
72757275 /** New value being assigned. */
72767276 newExpr : ExpressionRef ,
7277- /** Old value being replaced. */
7278- oldExpr : ExpressionRef ,
72797277 /** The type of the new expression. */
72807278 newType : Type ,
7279+ /** Old value being replaced. */
7280+ oldExpr : ExpressionRef ,
72817281 /** The type of the old expression. */
72827282 oldType : Type ,
72837283 /** Whether the new value is already retained. */
@@ -8642,7 +8642,7 @@ export class Compiler extends DiagnosticEmitter {
86428642 ? module . i64 ( 0 )
86438643 : module . i32 ( 0 )
86448644 ] , expression ) ,
8645- program . options . isWasm64 ? Type . i64 : Type . i32
8645+ arrayType
86468646 )
86478647 )
86488648 ) ;
@@ -8775,7 +8775,7 @@ export class Compiler extends DiagnosticEmitter {
87758775 ? module . i64 ( i64_low ( bufferAddress ) , i64_high ( bufferAddress ) )
87768776 : module . i32 ( i64_low ( bufferAddress ) )
87778777 ] , expression ) ,
8778- isWasm64 ? Type . i64 : Type . i32
8778+ program . arrayBufferInstance . type
87798779 ) ;
87808780 if ( arrayType . isManaged ) {
87818781 if ( constraints & Constraints . WILL_RETAIN ) {
@@ -8813,7 +8813,7 @@ export class Compiler extends DiagnosticEmitter {
88138813 : module . i32 ( bufferSize ) ,
88148814 module . i32 ( arrayInstance . id )
88158815 ] , expression ) ,
8816- isWasm64 ? Type . i64 : Type . i32
8816+ program . arrayBufferInstance . type
88178817 )
88188818 )
88198819 ) ;
0 commit comments