[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[dotgnu-pnet-commits] pnet ChangeLog ilalink/link_method.c cscc/cshar...
From: |
Klaus Treichel |
Subject: |
[dotgnu-pnet-commits] pnet ChangeLog ilalink/link_method.c cscc/cshar... |
Date: |
Sun, 05 Oct 2008 16:35:41 +0000 |
CVSROOT: /cvsroot/dotgnu-pnet
Module name: pnet
Changes by: Klaus Treichel <ktreichel> 08/10/05 16:35:41
Modified files:
. : ChangeLog
ilalink : link_method.c
cscc/csharp : cs_grammar.y
Log message:
Handle the implied constructor constraint with the struct constraint
propperly.
Revert my change in ilalink/link_method.c.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pnet/ChangeLog?cvsroot=dotgnu-pnet&r1=1.3574&r2=1.3575
http://cvs.savannah.gnu.org/viewcvs/pnet/ilalink/link_method.c?cvsroot=dotgnu-pnet&r1=1.33&r2=1.34
http://cvs.savannah.gnu.org/viewcvs/pnet/cscc/csharp/cs_grammar.y?cvsroot=dotgnu-pnet&r1=1.84&r2=1.85
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ChangeLog,v
retrieving revision 1.3574
retrieving revision 1.3575
diff -u -b -r1.3574 -r1.3575
--- ChangeLog 5 Oct 2008 14:21:49 -0000 1.3574
+++ ChangeLog 5 Oct 2008 16:35:40 -0000 1.3575
@@ -1,8 +1,13 @@
2008-10-05 Klaus Treichel <address@hidden>
+ * cscc/csharp/cs_grammar.y: Handle the implied constructor constraint
+ with the struct constraint propperly.
+
* ilalink/link_method.c (_ILLinkerConvertMemberRef): Use
ILTypeSpecGetClassWrapper instead of ILTypeSpecGetClassRef to avoid
creating a synthetic class here.
+ Revert this one for now because it raises a problem with
multidimensional
+ arrays.
* ilalink/link_type.c (ConvertClassRef): Handle synthetic classes that
are actually TypeSpecs and create a wrapper class for them after the
Index: ilalink/link_method.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ilalink/link_method.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- ilalink/link_method.c 5 Oct 2008 14:21:50 -0000 1.33
+++ ilalink/link_method.c 5 Oct 2008 16:35:40 -0000 1.34
@@ -907,9 +907,11 @@
return 0;
}
- /* Create a wrapper class for the TypeSpec that can serve as
owner
- for the imported MemberRef. */
- owner = ILTypeSpecGetClassWrapper(spec);
+ /* Import the synthetic class and assign a TypeRef token
+ to it. We give this TypeRef the same token as the
+ TypeSpec, which will cause it to be removed from the
+ final table during metadata compaction */
+ owner = ILTypeSpecGetClassRef(spec);
if(!owner)
{
_ILLinkerOutOfMemory(linker);
Index: cscc/csharp/cs_grammar.y
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/csharp/cs_grammar.y,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -b -r1.84 -r1.85
--- cscc/csharp/cs_grammar.y 2 Oct 2008 14:23:37 -0000 1.84
+++ cscc/csharp/cs_grammar.y 5 Oct 2008 16:35:40 -0000 1.85
@@ -3355,14 +3355,29 @@
;
TypeParameterConstraints
- : PrimaryConstraint { $$.constraint
= $1; $$.typeConstraints = 0; }
+ : PrimaryConstraint {
+ $$.constraint = $1;
+ if($1 ==
IL_META_GENPARAM_VALUETYPE_CONST)
+ {
+ $$.constraint |=
IL_META_GENPARAM_CTOR_CONST;
+ }
+ $$.typeConstraints = 0;
+ }
| SecondaryConstraints { $$.constraint = 0;
$$.typeConstraints = $1; }
| ConstructorConstraint { $$.constraint = $1;
$$.typeConstraints = 0; }
| PrimaryConstraint ',' SecondaryConstraints {
$$.constraint = $1;
+ if($1 ==
IL_META_GENPARAM_VALUETYPE_CONST)
+ {
+ $$.constraint |=
IL_META_GENPARAM_CTOR_CONST;
+ }
$$.typeConstraints = $3;
}
| PrimaryConstraint ',' ConstructorConstraint {
+ if($1 ==
IL_META_GENPARAM_VALUETYPE_CONST)
+ {
+ CCError(_("new() can't
be used together with struct because new() is implied by struct"));
+ }
$$.constraint = ($1 | $3);
$$.typeConstraints = 0;
}
@@ -3371,10 +3386,13 @@
$$.typeConstraints = $1;
}
| PrimaryConstraint ',' SecondaryConstraints ',' ConstructorConstraint
{
+ if($1 ==
IL_META_GENPARAM_VALUETYPE_CONST)
+ {
+ CCError(_("new() can't
be used together with struct because new() is implied by struct"));
+ }
$$.constraint = ($1 | $5);
$$.typeConstraints = $3;
}
-
;
SecondaryConstraints
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [dotgnu-pnet-commits] pnet ChangeLog ilalink/link_method.c cscc/cshar...,
Klaus Treichel <=