Bug 314189 (MONO55937) - [PATCH] When initing an array we emit a temp when a dup would suffice
Summary: [PATCH] When initing an array we emit a temp when a dup would suffice
Status: RESOLVED FIXED
Alias: MONO55937
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Enhancement
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-23 06:37 UTC by Ben Maurer
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Patch (1.85 KB, patch)
2004-03-23 06:37 UTC, Thomas Wiest
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 18:31:19 UTC


---- Reported by bmaurer@users.sf.net 2004-03-22 23:37:24 MST ----

In array initilization, we create a temporary variable, when we could just
use `dup' and avoid the local.

This reduces the size of the code.



---- Additional Comments From bmaurer@users.sf.net 2004-03-22 23:37:50 MST ----

Created an attachment (id=165783)
Patch




---- Additional Comments From bmaurer@users.sf.net 2004-03-22 23:39:00 MST ----

THe attached patch makes us use a pattern like:
newarr
dup
// set 1

dup
// set 2

dup
// set 3

// set 4

rather than

newarr
stloc.x

ldloc.x
// set 1

ldloc.x
// set 2

...



---- Additional Comments From bmaurer@users.sf.net 2004-03-23 11:41:46 MST ----

Miguel, can you review?



---- Additional Comments From bmaurer@users.sf.net 2004-03-23 11:56:57 MST ----

In cvs.

Imported an attachment (id=165783)

Unknown operating system unknown. Setting to default OS "Other".