|
@@ -1302,6 +1302,19 @@ Class Translator_CPP Extends Translator
|
|
|
|
|
|
End
|
|
End
|
|
|
|
|
|
|
|
+ Method AssignsTo( type:Type )
|
|
|
|
+
|
|
|
|
+ Uses( type )
|
|
|
|
+
|
|
|
|
+ Local ctype:=TCast<ClassType>( type )
|
|
|
|
+ If ctype And ctype.IsStruct
|
|
|
|
+ For Local vvar:=Eachin ctype.fields
|
|
|
|
+ AssignsTo( vvar.type )
|
|
|
|
+ Next
|
|
|
|
+ Endif
|
|
|
|
+
|
|
|
|
+ End
|
|
|
|
+
|
|
Method EmitStmt( stmt:AssignStmt )
|
|
Method EmitStmt( stmt:AssignStmt )
|
|
|
|
|
|
Local op:=stmt.op
|
|
Local op:=stmt.op
|
|
@@ -1315,20 +1328,11 @@ Class Translator_CPP Extends Translator
|
|
If vvar And vvar.vdecl.kind="param" FindGCTmp( vvar )
|
|
If vvar And vvar.vdecl.kind="param" FindGCTmp( vvar )
|
|
End
|
|
End
|
|
|
|
|
|
|
|
+ AssignsTo( stmt.lhs.type )
|
|
|
|
+
|
|
Local lhs:=Trans( stmt.lhs )
|
|
Local lhs:=Trans( stmt.lhs )
|
|
Local rhs:=Trans( stmt.rhs )
|
|
Local rhs:=Trans( stmt.rhs )
|
|
|
|
|
|
- Local type:=stmt.lhs.type
|
|
|
|
-
|
|
|
|
- Uses( type )
|
|
|
|
-
|
|
|
|
- Local ctype:=TCast<ClassType>( type )
|
|
|
|
- If ctype And ctype.IsStruct
|
|
|
|
- For Local vvar:=Eachin ctype.fields
|
|
|
|
- If IsGCType( vvar.type ) Marks( vvar.type )
|
|
|
|
- Next
|
|
|
|
- Endif
|
|
|
|
-
|
|
|
|
Emit( lhs+op+rhs+";" )
|
|
Emit( lhs+op+rhs+";" )
|
|
End
|
|
End
|
|
|
|
|