Browse Source

[cs/java] use spliceVoid instead of splice for structure field set/delete to avoid unnecessary array allocation

Dan Korostelev 10 years ago
parent
commit
3c1da0558e
1 changed files with 4 additions and 4 deletions
  1. 4 4
      gencommon.ml

+ 4 - 4
gencommon.ml

@@ -7173,10 +7173,10 @@ struct
 				*)
 				*)
 				let mk_splice arr at_pos = {
 				let mk_splice arr at_pos = {
 					eexpr = TCall(
 					eexpr = TCall(
-						mk_field_access gen arr "splice" pos,
+						mk_field_access gen arr "spliceVoid" pos,
 						[at_pos; { eexpr = TConst(TInt Int32.one); etype = basic.tint; epos = pos }]
 						[at_pos; { eexpr = TConst(TInt Int32.one); etype = basic.tint; epos = pos }]
 					);
 					);
-					etype = arr.etype;
+					etype = basic.tvoid;
 					epos = pos
 					epos = pos
 				} in
 				} in
 
 
@@ -7250,10 +7250,10 @@ struct
 			} in
 			} in
 			let mk_splice arr at_pos = {
 			let mk_splice arr at_pos = {
 				eexpr = TCall(
 				eexpr = TCall(
-					mk_field_access gen arr "splice" pos,
+					mk_field_access gen arr "spliceVoid" pos,
 					[at_pos; { eexpr = TConst(TInt Int32.one); etype = basic.tint; epos = pos }]
 					[at_pos; { eexpr = TConst(TInt Int32.one); etype = basic.tint; epos = pos }]
 				);
 				);
-				etype = arr.etype;
+				etype = basic.tvoid;
 				epos = pos
 				epos = pos
 			} in
 			} in
 			(*
 			(*