[nem-bug] [Nemerle 0000701]: [0.9.3] Empty structs have $PLACE_HOLDER$ field

feedback at nemerle.org feedback at nemerle.org
Sat Jul 1 21:26:59 CEST 2006


A NOTE has been added to this issue.
======================================================================
<http://nemerle.org/bugs/view.php?id=701> 
======================================================================
Reported By:                Snaury
Assigned To:                
======================================================================
Project:                    Nemerle
Issue ID:                   701
Category:                   Compiler
Reproducibility:            always
Severity:                   feature
Priority:                   normal
Status:                     new
======================================================================
Date Submitted:             07-01-2006 16:05 CEST
Last Modified:              07-01-2006 21:26 CEST
======================================================================
Summary:                    [0.9.3] Empty structs have $PLACE_HOLDER$ field
Description: 
The following code:

  public struct EmptyStruct { }

produces empty structure with the following IL:

.class public sequential ansi sealed beforefieldinit EmptyStruct
       extends [mscorlib]System.ValueType
{
  .pack 0
  .size 1
} // end of class EmptyStruct

Nemerle's generated structure has no the following IL:

.class public auto ansi sealed EmptyStruct
       extends [mscorlib]System.ValueType
{
  .field private specialname uint8 $PLACE_HOLDER$
} // end of class EmptyStruct


As you can see, they differ and Nemerle's IL has strange $PLACE_HOLDER$
field. If possible, it would be good if generated code would be without
this $PLACE_HOLDER$ field...
======================================================================

----------------------------------------------------------------------
 nazgul - 07-01-06 21:26 
----------------------------------------------------------------------
AFAIR as added this field to mimick the C# compiler. But maybe has changed
after .NET 1.1 or it was mono compiler's behaviour. It must be checked if
this is still needed.

Issue History
Date Modified  Username       Field                    Change              
======================================================================
07-01-06 16:05 Snaury         New Issue                                    
07-01-06 20:30 Snaury         File Added: bug-placeholder.patch                 
  
07-01-06 21:26 nazgul         Note Added: 0001331                          
======================================================================




More information about the bugs mailing list