Re: [Mono-dev] unixOdbc System.Data.Obdc and Output parameters

2009-02-16 Thread Bartolomeo Nicolotti

Hi,

it seems that IBM iseries access odbc driver doesn't support named
parameters:

http://www.windows-tech.info/15/20db2419a40d67ff.php

at least in a version.

Could you please give me an example of named parameter?

Many thanks,

Best regards



Daniel Morgan-3 wrote:
 
 ODBC can use named parameters.  
 Does the IBM DB2 odbc driver support named parameters?
 
 If yes, then try using a named parameter instead of a question mark?
 
 
 --- On Fri, 2/13/09, Bartolomeo Nicolotti bnicolo...@siapcn.it wrote:
 
 From: Bartolomeo Nicolotti bnicolo...@siapcn.it
 Subject: Re: [Mono-dev] unixOdbc System.Data.Obdc and Output parameters
 To: mono-devel-list@lists.ximian.com
 Date: Friday, February 13, 2009, 1:16 PM
 With this code:
 
  string comandoAS2={CALL GIANLUCA.provacs( ?
 )};
  OdbcCommand command2 = conn.CreateCommand();
  command2.CommandText= comandoAS2;
  
 command2.CommandType=CommandType.StoredProcedure;
 
  OdbcParameter param1 =
 command2.Parameters.Add(@PAR1, OdbcType.Char,
 2);
  param1.Direction= 
 ParameterDirection.InputOutput;
  param1.Value=AA;
  
  System.Console.WriteLine(Eseguo:+comandoAS2);
  command2.ExecuteNonQuery();
 
 and this OdbcCommand.Prepare:
 
  void Prepare()
  {
  System.Console.WriteLine(OdbcCommand.Prepare:
 begins!);
  ReAllocStatment ();
  
  OdbcReturn ret;
 
  System.Console.WriteLine(OdbcCommand.Prepare: Just
 before
 libodbc.SQLPrepare);
  ret = libodbc.SQLPrepare(hstmt, CommandText,
 CommandText.Length);
  System.Console.WriteLine(OdbcCommand.Prepare: Just
 after
 libodbc.SQLPrepare);
 
  if ((ret!=OdbcReturn.Success) 
 (ret!=OdbcReturn.SuccessWithInfo)){
  System.Console.WriteLine(OdbcCommand.Prepare:
 Throwing
 connection.CreateOdbcException);
  throw connection.CreateOdbcException
 (OdbcHandleType.Stmt, hstmt);
  }
  prepared = true;
  System.Console.WriteLine(OdbcCommand.Prepare:
 ends!);
  }
 
 when running I get:
 
 s...@lxpc54:~/dwn/src/test$ mono helloODBCCommand.exe
 Dunkel siapbn siapbn75
 GIANLUCA
 Hello, Dunkel
 Eseguo:CALL QGPL.WBC022(9)
 ExecuteNonQuery
 ExecSQL.Parameters.Count:0
 ExecSQL not prepared || Parameters.Count 0 
 Eseguo:{CALL GIANLUCA.provacs( ? )}
 ExecuteNonQuery
 ExecSQL.Parameters.Count:1
 Just before Prepare
 OdbcCommand.Prepare: begins!
 OdbcCommand.Prepare: Just before libodbc.SQLPrepare
 OdbcCommand.Prepare: Just after libodbc.SQLPrepare
 OdbcCommand.Prepare: Throwing
 connection.CreateOdbcException
 System.Data.Odbc.OdbcException: ERROR [42S02]
 [unixODBC][IBM][iSeries Access
 ODBC Driver][DB2 UDB]SQL0204 - PROVACS in GIANLUCA di tipo
 *N non trovato.
   at System.Data.Odbc.OdbcCommand.Prepare () [0x0] 
   at (wrapper remoting-invoke-with-check)
 System.Data.Odbc.OdbcCommand:Prepare ()
   at System.Data.Odbc.OdbcCommand.ExecSQL (System.String
 sql) [0x0] 
   at System.Data.Odbc.OdbcCommand.ExecuteNonQuery (Boolean
 freeHandle)
 [0x0] 
   at System.Data.Odbc.OdbcCommand.ExecuteNonQuery ()
 [0x0] 
   at (wrapper remoting-invoke-with-check)
 System.Data.Odbc.OdbcCommand:ExecuteNonQuery ()
   at helloODBC.Main (System.String[] args) [0x0] 
 
 The message means that libodbc.SQLPrepare searches for a no
 parameters
 PROVACS stored procedure
 
 If I use
 
 string comandoAS2={CALL GIANLUCA.provacs(
 'AA' )};
 
 the program is executed correctly
 
 
 Daniel Morgan-3 wrote:
  
  Did you forget the curly braces surrounding the call?
  
  cmd.CommandText = {? = call usp_TestParameters
 (?, ?)};
  
  You also have to manually add your own parameters.
  
  
  
  
  --- On Fri, 2/13/09, Bartolomeo Nicolotti
 bnicolo...@siapcn.it wrote:
  
  From: Bartolomeo Nicolotti
 bnicolo...@siapcn.it
  Subject: Re: [Mono-dev] unixOdbc System.Data.Obdc
 and Output parameters
  To: mono-devel-list@lists.ximian.com
  Date: Friday, February 13, 2009, 11:46 AM
  Hi,
  
  yes, I'm trying that way, adding some
 debugging
  System.Console.WriteLine in
  the OdbcCommand.cs and I got:
  
  s...@lxpc54:~/dwn/src/test$ mono
 helloODBCCommand.exe 
  Hello, Dunkel
  Eseguo:CALL QGPL.WBC022(9)
  ExecuteNonQuery
  ExecSQL.Parameters.Count:0
  ExecSQL not prepared || Parameters.Count 0 
  Eseguo:CALL GIANLUCA.PROVACS(?)
  ExecuteNonQuery
  ExecSQL.Parameters.Count:1
  Just before Prepare
  OdbcCommand.Prepare: begins!
  OdbcCommand.Prepare: Just before
 libodbc.SQLPrepare
  OdbcCommand.Prepare: Just after libodbc.SQLPrepare
  OdbcCommand.Prepare: Throwing
  

[Mono-dev] Updating the ICSharpCode.SharpZipLib shipped with Mono

2009-02-16 Thread Leszek Ciesielski
Hi,

would it be possible to update the ICSharpCode.SharpZipLib Mono
bundles? There's a lot of bugfixes (
http://wiki.sharpdevelop.net/Default.aspx?Page=SharpZipLib_ReleaseHistoryAspxAutoDetectCookieSupport=1
) in 0.85.5.452 since version 0.84 which Mono provides, including Seek
support which seems to be broken in 0.84. The current source download
available from SharpZipLib compiles fine on Mono, and they have tests
which could get included in Mono build as well (currently mono svn
version has not tests for SharpZipLib).

Regards,

skolima
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Win32 sockets regression on trunk.

2009-02-16 Thread Lucas Meijer
Hey.

While upgrading our mono to get all the latest bugfixes, I'm running into the 
following, which looks like a win32 socket regression.
When the program below is executed on mono trunk (r126917)
it outputs:

error on socket s
error on socket s2
available data on socket s
available data on socket s2

When run on a previous mono. (Mono2.0ish don't have the exact svn for this one, 
but around november 29, 2008), this program outputs:

available data on socket s2

Which seems to me like the correct output.

Reported as: https://bugzilla.novell.com/show_bug.cgi?id=476138

Here's the program. you need to make sure to actually have something listening 
on port 1234.


using System;
using System.Collections.Generic;
using System.Net.Sockets;
using System.Net;

class Program
{
static void Main(string[] args)
{
var s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, 
ProtocolType.Tcp);

var ep = new IPEndPoint(IPAddress.Parse(127.0.0.1), 5655);
s.Blocking = false;
s.Bind(ep);
s.Listen(5);

var s2 = new Socket(AddressFamily.InterNetwork, SocketType.Stream, 
ProtocolType.Tcp);
s2.Bind(new IPEndPoint(IPAddress.Any, 0));
s2.Blocking = false;

try
{
//You actally need to be running something on port 1234. 
s2.Connect(IPAddress.Parse(127.0.0.1), 1234); 
}
catch (SocketException se)
{
// ignore blocking connect exception. shouldn't there be some other 
way to do this...
if (se.ErrorCode != 10035)
throw se;
}

var errorList = new ListSocket();
var readList = new ListSocket();
var writeList = new ListSocket();

readList.Add(s);
readList.Add(s2);
errorList.Add(s);
errorList.Add(s2);
Socket.Select(readList, null, errorList, 100);

if (errorList.Contains(s))
Console.WriteLine(error on socket s);
if (errorList.Contains(s2))
Console.WriteLine(error on socket s2);
if (readList.Contains(s))
Console.WriteLine(available data on socket s);
if (readList.Contains(s2))
Console.WriteLine(available data on socket s2);
}
}





-- Lucas Meijer | GameDev  Unity3D Consulting 
-- Blog: http://lucasmeijer.com/blog
-- twitter: lucasmeijer

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Generic Variance

2009-02-16 Thread Scott Peterson
Can someone give this patch a look?
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Bugzilla Bug 475860, or, the wrong patch for the right job

2009-02-16 Thread Marek Safar
Hi,
 I'm investigating http://bugzilla.novell.com/show_bug.cgi?id=475860; I've
 come up with a patch that addresses the issue, but I'm certain that it's the
 wrong way to solve the problem. Here's the patch:

 ---
 Index: ecore.cs
 ===
 --- ecore.cs  (revision 126868)
 +++ ecore.cs  (working copy)
 @@ -4027,6 +4027,12 @@
   Methods [j++] = m;
   }
   nmethods = j;
 +
 + if (nmethods == 0  candidate_overrides != 
 null) {
 + foreach (MethodBase m in 
 candidate_overrides)
 + Methods [j++] = m;
 + nmethods = j;
 + }
   }
  
   //
 @@ -4291,11 +4297,11 @@
   // If the method is a virtual function, pick an 
 override closer to the
 LHS type.
   //
   if (!IsBase  best_candidate.IsVirtual) {
 - if (TypeManager.IsOverride (best_candidate))
 +/*   if (TypeManager.IsOverride (best_candidate))
   throw new InternalErrorException (
 - Should not happen.  An 
 'override' method took part in overload
 resolution:  + best_candidate);
 + Should not happen.  An 
 'override' method took part in overload
 resolution:  + best_candidate);*/
  
 - if (candidate_overrides != null) {
 + if (!TypeManager.IsOverride (best_candidate)  
 candidate_overrides !=
 null) {
   Type[] gen_args = null;
   bool gen_override = false;
   if (TypeManager.IsGenericMethod 
 (best_candidate))
 ---

 The reason that the code listed in the Bugzilla bug fails to compile is that
 at the time of overload resolution, the method table for the family of
 Reference classes has not been completely initialized. Because of this, when
 TypeManager.TryGetBaseDefinition is called, it fails, and no candidates are
 added to the list of method overloads.

 The patch included above addresses this problem by allowing overrides to be
 added to the list of candidates if no other candidates have been found.
 While this allows the example code to compile and even produces correct
 results at runtime, I'm pretty sure that the most appropriate way to solve
 this problem would be to instead make sure that the method table is
 appropriately populated before we even get to this code (also, a comparison
 of the IL produced by gmcs and the IL produced by csc reveals that csc
 produces virtual calls to Reference::CompareTo(), while gmcs produces
 virtual calls to ReferencePoint::CompareTo() and
 ReferenceRange::CompareTo()).

 I'm afraid that fixing this bug will require a deeper knowledge of the
 compiler than I currently possess. Can anyone suggest a more appropriate way
 of solving this problem?
   
The right fix is to change how MemberCache is populated in such 
scenarios, we have several similar bugs reported and they are all 
related to missing members/types in type's MemberCache.

Marek
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Generic Variance

2009-02-16 Thread Rodrigo Kumpera
Hi Scott, your patch now is now pretty close to been ok, only a few
remaining details are left.

@@ -2128,6 +2129,36 @@
 return (key-interface_id - element-interface_id);
 }

+static gboolean
+mono_class_is_variant_of (MonoClass *klass, MonoClass *vklass) {

This function takes arguments in the opposite order of
mono_class_is_assignable_from.
I notices now while reviewing the details of the check. It's better keep the
same ordering
of (target, source) for type query like functions [1].


+if (container-type_params [i].flags 
GENERIC_PARAMETER_ATTRIBUTE_VARIANCE_MASK) {
+if ((container-type_params [i].flags 
GENERIC_PARAMETER_ATTRIBUTE_CONTRAVARIANT)  !mono_class_is_assignable_from
(param_class, vparam_class))
+return FALSE;
+if ((container-type_params [i].flags 
GENERIC_PARAMETER_ATTRIBUTE_COVARIANT)  !mono_class_is_assignable_from
(vparam_class, param_class))
+return FALSE;
+} else if (param_class != vparam_class)
+return FALSE;

Good call to change from the broken named we had internally to something
readable.


+++ mono/mini/ChangeLog(working copy)
@@ -1,3 +1,13 @@
+2009-02-13  Scott Peterson  lunchtimem...@gmail.com
+
+Contributed under the MIT/X11 license.
+
+* mini-trampolines.cs: Use the
+new mono_class_interface_offset_with_variance method to find interface
+offsets.

It's better to error on the side of been to verbose than the opposite when
witting
changelog entries. Please mention that this change is required because
callsites
of variant interfaces may do through a different interface than the one the
target
implements but due to variance it's valid.

Oh, and you mention the wrong file name ;)


+2009-02-13  Scott Peterson  lunchtimem...@gmail.com
+
+This adds runtime generic variance support for reference types.
+This patch is contributed under the MIT/X11 license.
+
+* class.c: Added mono_class_has_variant_generic_params which determins
+if a generic class has a variant type parameter.

mono_class_has_variant_generic_params is already there.


Besides this minor issues, your patch looks great. Thanks for contributing
to mono.


Cheers,
Rodrigo



[1] It's easier to read F(A,B) a a test for the A =? B relation, where =?
could be things like
type assignable or generics variance assignable.




On Fri, Feb 13, 2009 at 1:07 AM, Scott Peterson lunchtimem...@gmail.comwrote:

 This patch syncs with SVN.

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] On what platform|cpu-arch|mono-version does full AOT actually work?

2009-02-16 Thread mobbe

I compiled the Mono framework (the unmanaged pieces) so that I could run it
on my iPhone. I was successful in doing that and thought that I would try to
do AOT on the iPhone...transfer the temporary asm output to my Mac to
assemble and link it and from there keep going... however when performing
the AOT compilation of mscorlib.dll Mono hit another assert... something
with inst-sreg1 being negative 1 (-1) (Don't remember right now what
funtion it stopped in..will have to supply that information when I get to my
Mac later tonight). 

If I commented out the assert it went on a bit further but stopped on a
another assert when trying to emit the op-code saying that it was expecting
0 bytes for the op-code ld_loadmembase but got 4... 

Anyone out there have an ideas of where I should be looking next in order to
try to solve this? It seems like the instruction set it is using for ARM
doesn't match the source codes assumptions. I am sure that I am doing
something wrong but don't know where to begin to look for the issue. Maybe
someone out there has a cpu-arm.h file that they know works that I can
compare with mine? Are there any other generated files regarding the
instruction set that I should double check? 

Thanks for your help in advance. 



Hi,

 full-aot currently only works on amd64/arm.

 Zoltan


-- 
View this message in context: 
http://www.nabble.com/On-what-platform%7Ccpu-arch%7Cmono-version-does-full-AOT-actually-work--tp21988583p22038601.html
Sent from the Mono - Dev mailing list archive at Nabble.com.

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] On what platform|cpu-arch|mono-version does full AOT actually work?

2009-02-16 Thread Zoltan Varga
Hi,

  You might be trying to use full-aot with the 2.0 profile. Currently,
only the 1.0 mscorlib can
be full-aot-ed, altough 2.0 should work when using mono SVN.

  Zoltan

On Mon, Feb 16, 2009 at 3:48 PM, mobbe peter.mob...@gmail.com wrote:

 I compiled the Mono framework (the unmanaged pieces) so that I could run it
 on my iPhone. I was successful in doing that and thought that I would try to
 do AOT on the iPhone...transfer the temporary asm output to my Mac to
 assemble and link it and from there keep going... however when performing
 the AOT compilation of mscorlib.dll Mono hit another assert... something
 with inst-sreg1 being negative 1 (-1) (Don't remember right now what
 funtion it stopped in..will have to supply that information when I get to my
 Mac later tonight).

 If I commented out the assert it went on a bit further but stopped on a
 another assert when trying to emit the op-code saying that it was expecting
 0 bytes for the op-code ld_loadmembase but got 4...

 Anyone out there have an ideas of where I should be looking next in order to
 try to solve this? It seems like the instruction set it is using for ARM
 doesn't match the source codes assumptions. I am sure that I am doing
 something wrong but don't know where to begin to look for the issue. Maybe
 someone out there has a cpu-arm.h file that they know works that I can
 compare with mine? Are there any other generated files regarding the
 instruction set that I should double check?

 Thanks for your help in advance.



 Hi,

  full-aot currently only works on amd64/arm.

 Zoltan


 --
 View this message in context: 
 http://www.nabble.com/On-what-platform%7Ccpu-arch%7Cmono-version-does-full-AOT-actually-work--tp21988583p22038601.html
 Sent from the Mono - Dev mailing list archive at Nabble.com.

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Long term fix for load hook deadlocks

2009-02-16 Thread Rodrigo Kumpera
Hey,

I've spent some time last week on this subject trying to see how this could
be fixed.

My initial idea was to remove the loader lock from all paths that lead to
managed code
been called. Thou it's possible, it would require some very complex changes
to class loading
to support System F recursive type definitions (F : TF) in a way to do
safe publishing.

It would buy us more trouble than anything else. Which turned my attention
into fixing ther
other locks instead. Besides the loader lock, only two other are held during
complex interactions
with the system: the domain and domain jit code hash locks.

My idea is to change the locking rules to make the loader lock the bottom
one, this would
make it safe to call managed code while holding it and it's not much
different than what currently
happens.

Both other locks, domain and domain jit code hash are used most of the time
just to protect
resources that are part of MonoDomain.

The issue then would be to rework the part of the runtime that hold the
loader lock together with
the others. All code in metadata can be changed pretty easily as it acquires
one after the other.
The trouble is in mini.c where the interaction between those locks is pretty
complex but changing
it isn't that that hard.

This approach would require us to split all the uses of the loader lock to
protect resources such as the
the uiid table as this is a task for simple locks and might have a bad
interactions with other parts of the
runtime.

Comments?

Cheers,
Rodrigo
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] On what platform|cpu-arch|mono-version does full AOT actually work?

2009-02-16 Thread mobbe

I am indeed trying to compile a 2.0 version of the mscorlib. I will grab the
1.0 version instead and see if I have better luck with that one...if I can
get that to work then I will migrate to use the code from SVN and try with
the 2.0 profile. 

Thanks,


Zoltan Varga wrote:
 
 Hi,
 
   You might be trying to use full-aot with the 2.0 profile. Currently,
 only the 1.0 mscorlib can
 be full-aot-ed, altough 2.0 should work when using mono SVN.
 
   Zoltan
 
 On Mon, Feb 16, 2009 at 3:48 PM, mobbe peter.mob...@gmail.com wrote:

 I compiled the Mono framework (the unmanaged pieces) so that I could run
 it
 on my iPhone. I was successful in doing that and thought that I would try
 to
 do AOT on the iPhone...transfer the temporary asm output to my Mac to
 assemble and link it and from there keep going... however when performing
 the AOT compilation of mscorlib.dll Mono hit another assert... something
 with inst-sreg1 being negative 1 (-1) (Don't remember right now what
 funtion it stopped in..will have to supply that information when I get to
 my
 Mac later tonight).

 If I commented out the assert it went on a bit further but stopped on a
 another assert when trying to emit the op-code saying that it was
 expecting
 0 bytes for the op-code ld_loadmembase but got 4...

 Anyone out there have an ideas of where I should be looking next in order
 to
 try to solve this? It seems like the instruction set it is using for ARM
 doesn't match the source codes assumptions. I am sure that I am doing
 something wrong but don't know where to begin to look for the issue.
 Maybe
 someone out there has a cpu-arm.h file that they know works that I can
 compare with mine? Are there any other generated files regarding the
 instruction set that I should double check?

 Thanks for your help in advance.



 Hi,

  full-aot currently only works on amd64/arm.

 Zoltan


 --
 View this message in context:
 http://www.nabble.com/On-what-platform%7Ccpu-arch%7Cmono-version-does-full-AOT-actually-work--tp21988583p22038601.html
 Sent from the Mono - Dev mailing list archive at Nabble.com.

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list
 
 

-- 
View this message in context: 
http://www.nabble.com/On-what-platform%7Ccpu-arch%7Cmono-version-does-full-AOT-actually-work--tp21988583p22039018.html
Sent from the Mono - Dev mailing list archive at Nabble.com.

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Generic Variance

2009-02-16 Thread Scott Peterson
Latest patch. Thanks for the feedback.
Index: mono/metadata/ChangeLog
===
--- mono/metadata/ChangeLog	(revision 127036)
+++ mono/metadata/ChangeLog	(working copy)
@@ -1,3 +1,16 @@
+2009-02-17  Scott Peterson  lunchtimem...@gmail.com
+
+	This adds runtime generic variance support for reference types.
+	This patch is contributed under the MIT/X11 license.
+
+	* class.c: Added mono_class_is_variant_of which determins if the second
+	class is a legal variant of the first. Added
+	mono_class_interface_offset_with_variance to look for interfaces in a
+	variance-aware fashion. Modified mono_class_is_assignable_from to use
+	mono_class_is_variant_of.
+
+	* class-internals.h: Added mono_class_interface_offset_with_variance.
+
 2009-02-16 Rodrigo Kumpera  rkump...@novell.com
 
 	* loader.c (method_from_memberref): Don't abort if the array
Index: mono/metadata/class-internals.h
===
--- mono/metadata/class-internals.h	(revision 127036)
+++ mono/metadata/class-internals.h	(working copy)
@@ -407,6 +407,7 @@
 
 #define MONO_CLASS_IMPLEMENTS_INTERFACE(k,uiid) (((uiid) = (k)-max_interface_id)  ((k)-interface_bitmap [(uiid)  3]  (1  ((uiid)7
 int mono_class_interface_offset (MonoClass *klass, MonoClass *itf);
+int mono_class_interface_offset_with_variance (MonoClass *klass, MonoClass *itf) MONO_INTERNAL;
 
 typedef gpointer MonoRuntimeGenericContext;
 
Index: mono/metadata/class.c
===
--- mono/metadata/class.c	(revision 127036)
+++ mono/metadata/class.c	(working copy)
@@ -67,6 +67,7 @@
 static void setup_generic_array_ifaces (MonoClass *class, MonoClass *iface, MonoMethod **methods, int pos);
 
 static MonoMethod* mono_class_get_virtual_methods (MonoClass* klass, gpointer *iter);
+static gboolean mono_class_has_variant_generic_params (MonoClass *klass);
 
 void (*mono_debugger_class_init_func) (MonoClass *klass) = NULL;
 void (*mono_debugger_class_loaded_methods_func) (MonoClass *klass) = NULL;
@@ -2124,6 +2125,36 @@
 	return (key-interface_id - element-interface_id);
 }
 
+static gboolean
+mono_class_is_variant_of (MonoClass *klass, MonoClass *oklass) {
+	int i;
+	MonoClass *generic = klass-generic_class-container_class;
+	MonoClass *ogeneric = oklass-generic_class-container_class;
+	MonoGenericContainer *container = ogeneric-generic_container;
+
+	if (generic != vgeneric)
+		return FALSE;
+
+	for (i = 0; i  container-type_argc; i++) {
+		MonoClass *param_class = mono_class_from_mono_type (klass-generic_class-context.class_inst-type_argv [i]);
+		MonoClass *oparam_class = mono_class_from_mono_type (oklass-generic_class-context.class_inst-type_argv [i]);
+
+		// FIXME this is incorrect
+		if (param_class-valuetype || oparam_class-valuetype)
+			return FALSE;
+
+		if (container-type_params [i].flags  GENERIC_PARAMETER_ATTRIBUTE_VARIANCE_MASK) {
+			if ((container-type_params [i].flags  GENERIC_PARAMETER_ATTRIBUTE_CONTRAVARIANT)  !mono_class_is_assignable_from (param_class, oparam_class))
+return FALSE;
+			if ((container-type_params [i].flags  GENERIC_PARAMETER_ATTRIBUTE_COVARIANT)  !mono_class_is_assignable_from (oparam_class, param_class))
+return FALSE;
+		} else if (param_class != oparam_class)
+			return FALSE;
+	}
+
+	return TRUE;
+}
+
 int
 mono_class_interface_offset (MonoClass *klass, MonoClass *itf) {
 	MonoClass **result = bsearch (
@@ -2139,6 +2170,21 @@
 	}
 }
 
+int
+mono_class_interface_offset_with_variance (MonoClass *klass, MonoClass *itf) {
+	int i = mono_class_interface_offset (klass, itf);
+	if (i = 0) {
+		return i;
+	} else if (mono_class_has_variant_generic_params (itf)) {
+		for (i = 0; i  klass-interface_offsets_count; i++) {
+			if (mono_class_is_variant_of (klass-interfaces_packed[i], itf)) {
+return klass-interface_offsets_packed [i];
+			}
+		}
+	}
+	return -1;
+}
+
 static void
 print_implemented_interfaces (MonoClass *klass) {
 	GPtrArray *ifaces = NULL;
@@ -5948,38 +5994,8 @@
 	if ((container_class2-interfaces_packed [i] == container_class1) || (container_class2-interfaces_packed [i]-generic_class  (container_class2-interfaces_packed [i]-generic_class-container_class == container_class1)))
 		match = TRUE;
 
-if (match) {
-	MonoGenericContainer *container;
-
-	container = klass-generic_class-container_class-generic_container;
-
-	match = TRUE;
-	for (i = 0; i  container-type_argc; ++i) {
-		MonoClass *param1_class = mono_class_from_mono_type (klass-generic_class-context.class_inst-type_argv [i]);
-		MonoClass *param2_class = mono_class_from_mono_type (oklass-generic_class-context.class_inst-type_argv [i]);
-
-		if (param1_class-valuetype != param2_class-valuetype) {
-			match = FALSE;
-			break;
-		}
-		/*
-		 * The _VARIANT and _COVARIANT constants should read _COVARIANT and
-		 * _CONTRAVARIANT, but they are in a public 

[Mono-dev] ASP.NET MVC

2009-02-16 Thread Dan Cirnat
I see that the MVC implementation is planned for june.
I'd like to know if there is someone responsible for this and if any
progress is made.
Thank you
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] correction for Compiling Mono on WIn dows' page.

2009-02-16 Thread Miha Vrhovnik
Miguel de Icaza mig...@novell.com wrote on 16.2.2009 5:14:03:

We now have a Visual Studio script that will build the runtime, and  
hopefully we will soon have msbuild scripts for the rest of the Mono  
class libraries and we should be able to have a fully native build  
setup that does not require Cygwin in the future.

I bow to those who implemented this.

Regards,
Miha

-- 
It's time to get rid of your current e-mail client ...
... and start using si.Mail.

It's small  free. ( http://www.simail.si/ )
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] correction for Compiling Mono on WIndows' page.

2009-02-16 Thread Adar Wesley
Hi Miguel,

Good to hear about the Visual Studio script.  Where can we see instructions
on how to use it?

---
Adar Wesley


On Mon, Feb 16, 2009 at 6:14 AM, Miguel de Icaza mig...@novell.com wrote:

 Aha.  The dot at the beginning off the line threw me off. Since I'm used
 to run shell scripts just like /tmp/whatever.sh.  I'm guessing this will
 happen to other users as well, especially since the how to make this work
 on
 windows guide is likely to be read by people not intimately fermiliar
 with linux
 customs.


 I updated the Wiki page with this information.

 We now have a Visual Studio script that will build the runtime, and
 hopefully we will soon have msbuild scripts for the rest of the Mono class
 libraries and we should be able to have a fully native build setup that does
 not require Cygwin in the future.

 Miguel.

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Updating the ICSharpCode.SharpZipLib shipped with Mono

2009-02-16 Thread Mirco Bauer
On Mon, 16 Feb 2009 12:48:33 +0100
Leszek Ciesielski skol...@gmail.com wrote:

 Hi,
 
 would it be possible to update the ICSharpCode.SharpZipLib Mono
 bundles? There's a lot of bugfixes (
 http://wiki.sharpdevelop.net/Default.aspx?Page=SharpZipLib_ReleaseHistoryAspxAutoDetectCookieSupport=1
 ) in 0.85.5.452 since version 0.84 which Mono provides, including Seek
 support which seems to be broken in 0.84. The current source download
 available from SharpZipLib compiles fine on Mono, and they have tests
 which could get included in Mono build as well (currently mono svn
 version has not tests for SharpZipLib).

Is that version ABI compatible? ilcontrast can show ABI breakages...

 
 Regards,
 
 skolima

-- 
Regards,

Mirco 'meebey' Bauer

PGP-Key ID: 0xEEF946C8

FOSS Developermee...@meebey.net  http://www.meebey.net/
PEAR Developermee...@php.net http://pear.php.net/
Debian Developer  mee...@debian.org  http://www.debian.org/
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] correction for Compiling Mono on WIndows' page.

2009-02-16 Thread Jonathan Chambers
There are some instructions here:
http://www.mono-project.com/Compiling_Mono_VSNET
You should basically be able to open the .sln file in Visual Studio 2005 and
hit build. If you build the Debug/Release targets you'll need your glib
dependencies correctly setup (by using the described MONO_DEPENDENCIES_PREFIX
evironment variable). If you build the *_eglib targets, you should be able
to just hit build. This uses the not quite supported eglib library. This has
to be used for a Win64 build (as there is no glib on Win64 easily
available). You should then be able to use the built runtime with
corresponding class libraries. They need to be in sync. So, use cygwin to
build them, get runtime code that corresponds to a released mono and use the
class libs from the install, or build class libs on Linux (and copy or
access via a samba share). The last option is what I (and many others do).

Thanks,
Jonathan

2009/2/16 Adar Wesley adar.wes...@gmail.com

 Hi Miguel,

 Good to hear about the Visual Studio script.  Where can we see instructions
 on how to use it?

 ---
 Adar Wesley


 On Mon, Feb 16, 2009 at 6:14 AM, Miguel de Icaza mig...@novell.comwrote:

  Aha.  The dot at the beginning off the line threw me off. Since I'm used
 to run shell scripts just like /tmp/whatever.sh.  I'm guessing this will
 happen to other users as well, especially since the how to make this
 work on
 windows guide is likely to be read by people not intimately fermiliar
 with linux
 customs.


 I updated the Wiki page with this information.

 We now have a Visual Studio script that will build the runtime, and
 hopefully we will soon have msbuild scripts for the rest of the Mono class
 libraries and we should be able to have a fully native build setup that does
 not require Cygwin in the future.

 Miguel.



 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] bug not quite squashed

2009-02-16 Thread Bas Smit
Hi,

a couple of hours ago bug
https://bugzilla.novell.com/show_bug.cgi?id=475823got fixed. However a
very similar scenario still fails. Submitted here:
https://bugzilla.novell.com/show_bug.cgi?id=476295

Regards, Bas

using System;
using System.Linq.Expressions;

public class Program
{
static void Main()
{
ExpressionActionIHelper e = (helper = helper.DoIt(new Foo()));

var mce = e.Body as MethodCallExpression;
var et = mce.Arguments[0].NodeType;
if (et == ExpressionType.Convert)
Console.WriteLine(Hi from gmcs);
else
Console.WriteLine(Hi from csc);
}
}

public class FooBase { }
public class Foo : FooBase { }

public interface IHelper
{
void DoIt(FooBase foo);
}
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] gmcs and The Future

2009-02-16 Thread Stefan Noack
Hi,



 Anyway, am not completely against the idea, I already wrote about how
 I'd like to have a more extensible mcs, but in the current state of
 affairs, again, I'd very cautious.



Some time ago, I had the idea of an extensible compiler. One with kind of a
plugin system. Or even better, a keyword keyword that allows you to define
new keywords by providing classes that implement certain Interfaces that
allow the compiler to parse and emit your new language feature. I already
have a name for that language - it would be Sugar (lot's of syntactic
sugar included ;-)

How do you think about that idea? (I wish I had more time for such stuff :-/
)

Stefan
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] On what platform|cpu-arch|mono-version does full AOT actually work?

2009-02-16 Thread mobbe

Nope...same results with a mscorlib.dll from the 1.0 folder. It gets stuck in
the mono_local_regalloc method on the assert  checking for ins-sreg !=
-1... Exactly the same message as before. It is trying to compile the Equals
method

The inst op code is 633 and both sreg1 and sreg2 is -1.. .

I am running the system with build 125709 and compiling the mscorlib.dll
from the 1.0 folder... 




mobbe wrote:
 
 I am indeed trying to compile a 2.0 version of the mscorlib. I will grab
 the 1.0 version instead and see if I have better luck with that one...if I
 can get that to work then I will migrate to use the code from SVN and try
 with the 2.0 profile. 
 
 Thanks,
 
 
 Zoltan Varga wrote:
 
 Hi,
 
   You might be trying to use full-aot with the 2.0 profile. Currently,
 only the 1.0 mscorlib can
 be full-aot-ed, altough 2.0 should work when using mono SVN.
 
   Zoltan
 
 On Mon, Feb 16, 2009 at 3:48 PM, mobbe peter.mob...@gmail.com wrote:

 I compiled the Mono framework (the unmanaged pieces) so that I could run
 it
 on my iPhone. I was successful in doing that and thought that I would
 try to
 do AOT on the iPhone...transfer the temporary asm output to my Mac to
 assemble and link it and from there keep going... however when
 performing
 the AOT compilation of mscorlib.dll Mono hit another assert... something
 with inst-sreg1 being negative 1 (-1) (Don't remember right now what
 funtion it stopped in..will have to supply that information when I get
 to my
 Mac later tonight).

 If I commented out the assert it went on a bit further but stopped on a
 another assert when trying to emit the op-code saying that it was
 expecting
 0 bytes for the op-code ld_loadmembase but got 4...

 Anyone out there have an ideas of where I should be looking next in
 order to
 try to solve this? It seems like the instruction set it is using for ARM
 doesn't match the source codes assumptions. I am sure that I am doing
 something wrong but don't know where to begin to look for the issue.
 Maybe
 someone out there has a cpu-arm.h file that they know works that I can
 compare with mine? Are there any other generated files regarding the
 instruction set that I should double check?

 Thanks for your help in advance.



 Hi,

  full-aot currently only works on amd64/arm.

 Zoltan


 --
 View this message in context:
 http://www.nabble.com/On-what-platform%7Ccpu-arch%7Cmono-version-does-full-AOT-actually-work--tp21988583p22038601.html
 Sent from the Mono - Dev mailing list archive at Nabble.com.

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/On-what-platform%7Ccpu-arch%7Cmono-version-does-full-AOT-actually-work--tp21988583p22049003.html
Sent from the Mono - Dev mailing list archive at Nabble.com.

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] On what platform|cpu-arch|mono-version does full AOT actually work?

2009-02-16 Thread Zoltan Varga
Try updating to mono HEAD. SVN versions sometimes have bugs like that,
but SVN HEAD
works for me when using AOT on ARM.

 Zoltan

On Tue, Feb 17, 2009 at 2:45 AM, mobbe peter.mob...@gmail.com wrote:

 Nope...same results with a mscorlib.dll from the 1.0 folder. It gets stuck in
 the mono_local_regalloc method on the assert  checking for ins-sreg !=
 -1... Exactly the same message as before. It is trying to compile the Equals
 method

 The inst op code is 633 and both sreg1 and sreg2 is -1.. .

 I am running the system with build 125709 and compiling the mscorlib.dll
 from the 1.0 folder...




 mobbe wrote:

 I am indeed trying to compile a 2.0 version of the mscorlib. I will grab
 the 1.0 version instead and see if I have better luck with that one...if I
 can get that to work then I will migrate to use the code from SVN and try
 with the 2.0 profile.

 Thanks,


 Zoltan Varga wrote:

 Hi,

   You might be trying to use full-aot with the 2.0 profile. Currently,
 only the 1.0 mscorlib can
 be full-aot-ed, altough 2.0 should work when using mono SVN.

   Zoltan

 On Mon, Feb 16, 2009 at 3:48 PM, mobbe peter.mob...@gmail.com wrote:

 I compiled the Mono framework (the unmanaged pieces) so that I could run
 it
 on my iPhone. I was successful in doing that and thought that I would
 try to
 do AOT on the iPhone...transfer the temporary asm output to my Mac to
 assemble and link it and from there keep going... however when
 performing
 the AOT compilation of mscorlib.dll Mono hit another assert... something
 with inst-sreg1 being negative 1 (-1) (Don't remember right now what
 funtion it stopped in..will have to supply that information when I get
 to my
 Mac later tonight).

 If I commented out the assert it went on a bit further but stopped on a
 another assert when trying to emit the op-code saying that it was
 expecting
 0 bytes for the op-code ld_loadmembase but got 4...

 Anyone out there have an ideas of where I should be looking next in
 order to
 try to solve this? It seems like the instruction set it is using for ARM
 doesn't match the source codes assumptions. I am sure that I am doing
 something wrong but don't know where to begin to look for the issue.
 Maybe
 someone out there has a cpu-arm.h file that they know works that I can
 compare with mine? Are there any other generated files regarding the
 instruction set that I should double check?

 Thanks for your help in advance.



 Hi,

  full-aot currently only works on amd64/arm.

 Zoltan


 --
 View this message in context:
 http://www.nabble.com/On-what-platform%7Ccpu-arch%7Cmono-version-does-full-AOT-actually-work--tp21988583p22038601.html
 Sent from the Mono - Dev mailing list archive at Nabble.com.

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list





 --
 View this message in context: 
 http://www.nabble.com/On-what-platform%7Ccpu-arch%7Cmono-version-does-full-AOT-actually-work--tp21988583p22049003.html
 Sent from the Mono - Dev mailing list archive at Nabble.com.

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] On what platform|cpu-arch|mono-version does full AOT actually work?

2009-02-16 Thread Peter Moberg
Will try to do that...

Regarding the files in mono/arch/arm... Do I have to regenerate these  
files or can I use the h-files that are present? Since I am compiling  
on a Mac OS X I would need to fake being on an ARM if I need to run  
anything in the arch folder...


On Feb 16, 2009, at 8:01 PM, Zoltan Varga wrote:

 Try updating to mono HEAD. SVN versions sometimes have bugs like that,
 but SVN HEAD
 works for me when using AOT on ARM.

 Zoltan

 On Tue, Feb 17, 2009 at 2:45 AM, mobbe peter.mob...@gmail.com wrote:

 Nope...same results with a mscorlib.dll from the 1.0 folder. It  
 gets stuck in
 the mono_local_regalloc method on the assert  checking for ins- 
 sreg !=
 -1... Exactly the same message as before. It is trying to compile  
 the Equals
 method

 The inst op code is 633 and both sreg1 and sreg2 is -1.. .

 I am running the system with build 125709 and compiling the  
 mscorlib.dll
 from the 1.0 folder...




 mobbe wrote:

 I am indeed trying to compile a 2.0 version of the mscorlib. I  
 will grab
 the 1.0 version instead and see if I have better luck with that  
 one...if I
 can get that to work then I will migrate to use the code from SVN  
 and try
 with the 2.0 profile.

 Thanks,


 Zoltan Varga wrote:

 Hi,

  You might be trying to use full-aot with the 2.0 profile.  
 Currently,
 only the 1.0 mscorlib can
 be full-aot-ed, altough 2.0 should work when using mono SVN.

  Zoltan

 On Mon, Feb 16, 2009 at 3:48 PM, mobbe peter.mob...@gmail.com  
 wrote:

 I compiled the Mono framework (the unmanaged pieces) so that I  
 could run
 it
 on my iPhone. I was successful in doing that and thought that I  
 would
 try to
 do AOT on the iPhone...transfer the temporary asm output to my  
 Mac to
 assemble and link it and from there keep going... however when
 performing
 the AOT compilation of mscorlib.dll Mono hit another assert...  
 something
 with inst-sreg1 being negative 1 (-1) (Don't remember right now  
 what
 funtion it stopped in..will have to supply that information when  
 I get
 to my
 Mac later tonight).

 If I commented out the assert it went on a bit further but  
 stopped on a
 another assert when trying to emit the op-code saying that it was
 expecting
 0 bytes for the op-code ld_loadmembase but got 4...

 Anyone out there have an ideas of where I should be looking next  
 in
 order to
 try to solve this? It seems like the instruction set it is using  
 for ARM
 doesn't match the source codes assumptions. I am sure that I am  
 doing
 something wrong but don't know where to begin to look for the  
 issue.
 Maybe
 someone out there has a cpu-arm.h file that they know works that  
 I can
 compare with mine? Are there any other generated files regarding  
 the
 instruction set that I should double check?

 Thanks for your help in advance.



 Hi,

 full-aot currently only works on amd64/arm.

Zoltan


 --
 View this message in context:
 http://www.nabble.com/On-what-platform%7Ccpu-arch%7Cmono-version-does-full-AOT-actually-work--tp21988583p22038601.html
 Sent from the Mono - Dev mailing list archive at Nabble.com.

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list





 --
 View this message in context: 
 http://www.nabble.com/On-what-platform%7Ccpu-arch%7Cmono-version-does-full-AOT-actually-work--tp21988583p22049003.html
 Sent from the Mono - Dev mailing list archive at Nabble.com.

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] On what platform|cpu-arch|mono-version does full AOT actually work?

2009-02-16 Thread Rodrigo Kumpera
Svn head was broken for a big part of the day during a brain dead commit I
did.
Please try again.

On Mon, Feb 16, 2009 at 10:45 PM, mobbe peter.mob...@gmail.com wrote:


 Nope...same results with a mscorlib.dll from the 1.0 folder. It gets stuck
 in
 the mono_local_regalloc method on the assert  checking for ins-sreg !=
 -1... Exactly the same message as before. It is trying to compile the
 Equals
 method

 The inst op code is 633 and both sreg1 and sreg2 is -1.. .

 I am running the system with build 125709 and compiling the mscorlib.dll
 from the 1.0 folder...




 mobbe wrote:
 
  I am indeed trying to compile a 2.0 version of the mscorlib. I will grab
  the 1.0 version instead and see if I have better luck with that one...if
 I
  can get that to work then I will migrate to use the code from SVN and try
  with the 2.0 profile.
 
  Thanks,
 
 
  Zoltan Varga wrote:
 
  Hi,
 
You might be trying to use full-aot with the 2.0 profile. Currently,
  only the 1.0 mscorlib can
  be full-aot-ed, altough 2.0 should work when using mono SVN.
 
Zoltan
 
  On Mon, Feb 16, 2009 at 3:48 PM, mobbe peter.mob...@gmail.com wrote:
 
  I compiled the Mono framework (the unmanaged pieces) so that I could
 run
  it
  on my iPhone. I was successful in doing that and thought that I would
  try to
  do AOT on the iPhone...transfer the temporary asm output to my Mac to
  assemble and link it and from there keep going... however when
  performing
  the AOT compilation of mscorlib.dll Mono hit another assert...
 something
  with inst-sreg1 being negative 1 (-1) (Don't remember right now what
  funtion it stopped in..will have to supply that information when I get
  to my
  Mac later tonight).
 
  If I commented out the assert it went on a bit further but stopped on a
  another assert when trying to emit the op-code saying that it was
  expecting
  0 bytes for the op-code ld_loadmembase but got 4...
 
  Anyone out there have an ideas of where I should be looking next in
  order to
  try to solve this? It seems like the instruction set it is using for
 ARM
  doesn't match the source codes assumptions. I am sure that I am doing
  something wrong but don't know where to begin to look for the issue.
  Maybe
  someone out there has a cpu-arm.h file that they know works that I can
  compare with mine? Are there any other generated files regarding the
  instruction set that I should double check?
 
  Thanks for your help in advance.
 
 
 
  Hi,
 
   full-aot currently only works on amd64/arm.
 
  Zoltan
 
 
  --
  View this message in context:
 
 http://www.nabble.com/On-what-platform%7Ccpu-arch%7Cmono-version-does-full-AOT-actually-work--tp21988583p22038601.html
  Sent from the Mono - Dev mailing list archive at Nabble.com.
 
  ___
  Mono-devel-list mailing list
  Mono-devel-list@lists.ximian.com
  http://lists.ximian.com/mailman/listinfo/mono-devel-list
 
  ___
  Mono-devel-list mailing list
  Mono-devel-list@lists.ximian.com
  http://lists.ximian.com/mailman/listinfo/mono-devel-list
 
 
 
 

 --
 View this message in context:
 http://www.nabble.com/On-what-platform%7Ccpu-arch%7Cmono-version-does-full-AOT-actually-work--tp21988583p22049003.html
 Sent from the Mono - Dev mailing list archive at Nabble.com.

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] On what platform|cpu-arch|mono-version does full AOT actually work?

2009-02-16 Thread Zoltan Varga
Hi,

  mono on iphone is not really a supported configuration right now, it
works for some people,
but expect to run into lots of problems. Cross compiling mono for arm
is especially fraught
with problems, better to compile on the device itself.

Zoltan

On Tue, Feb 17, 2009 at 3:12 AM, Peter Moberg peter.mob...@gmail.com wrote:
 Will try to do that...

 Regarding the files in mono/arch/arm... Do I have to regenerate these files
 or can I use the h-files that are present? Since I am compiling on a Mac OS
 X I would need to fake being on an ARM if I need to run anything in the arch
 folder...


 On Feb 16, 2009, at 8:01 PM, Zoltan Varga wrote:

 Try updating to mono HEAD. SVN versions sometimes have bugs like that,
 but SVN HEAD
 works for me when using AOT on ARM.

Zoltan

 On Tue, Feb 17, 2009 at 2:45 AM, mobbe peter.mob...@gmail.com wrote:

 Nope...same results with a mscorlib.dll from the 1.0 folder. It gets
 stuck in
 the mono_local_regalloc method on the assert  checking for ins-sreg !=
 -1... Exactly the same message as before. It is trying to compile the
 Equals
 method

 The inst op code is 633 and both sreg1 and sreg2 is -1.. .

 I am running the system with build 125709 and compiling the mscorlib.dll
 from the 1.0 folder...




 mobbe wrote:

 I am indeed trying to compile a 2.0 version of the mscorlib. I will grab
 the 1.0 version instead and see if I have better luck with that one...if
 I
 can get that to work then I will migrate to use the code from SVN and
 try
 with the 2.0 profile.

 Thanks,


 Zoltan Varga wrote:

 Hi,

  You might be trying to use full-aot with the 2.0 profile. Currently,
 only the 1.0 mscorlib can
 be full-aot-ed, altough 2.0 should work when using mono SVN.

 Zoltan

 On Mon, Feb 16, 2009 at 3:48 PM, mobbe peter.mob...@gmail.com wrote:

 I compiled the Mono framework (the unmanaged pieces) so that I could
 run
 it
 on my iPhone. I was successful in doing that and thought that I would
 try to
 do AOT on the iPhone...transfer the temporary asm output to my Mac to
 assemble and link it and from there keep going... however when
 performing
 the AOT compilation of mscorlib.dll Mono hit another assert...
 something
 with inst-sreg1 being negative 1 (-1) (Don't remember right now what
 funtion it stopped in..will have to supply that information when I get
 to my
 Mac later tonight).

 If I commented out the assert it went on a bit further but stopped on
 a
 another assert when trying to emit the op-code saying that it was
 expecting
 0 bytes for the op-code ld_loadmembase but got 4...

 Anyone out there have an ideas of where I should be looking next in
 order to
 try to solve this? It seems like the instruction set it is using for
 ARM
 doesn't match the source codes assumptions. I am sure that I am doing
 something wrong but don't know where to begin to look for the issue.
 Maybe
 someone out there has a cpu-arm.h file that they know works that I can
 compare with mine? Are there any other generated files regarding the
 instruction set that I should double check?

 Thanks for your help in advance.



 Hi,

 full-aot currently only works on amd64/arm.

   Zoltan


 --
 View this message in context:

 http://www.nabble.com/On-what-platform%7Ccpu-arch%7Cmono-version-does-full-AOT-actually-work--tp21988583p22038601.html
 Sent from the Mono - Dev mailing list archive at Nabble.com.

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list





 --
 View this message in context:
 http://www.nabble.com/On-what-platform%7Ccpu-arch%7Cmono-version-does-full-AOT-actually-work--tp21988583p22049003.html
 Sent from the Mono - Dev mailing list archive at Nabble.com.

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list



___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] On what platform|cpu-arch|mono-version does full AOT actually work?

2009-02-16 Thread Miguel de Icaza
Hello,

  mono on iphone is not really a supported configuration right now, it
 works for some people,

Additionally, due to the way applications are distributed on the  
iPhone (end-user has no choice to relink the application with newer  
Mono versions that the LGPL requires) you would have to obtain a  
commercial license from Novell for Mono.

Alternatively, you can use Unity3d which is a licensor of Mono.

Miguel.


 but expect to run into lots of problems. Cross compiling mono for arm
 is especially fraught
 with problems, better to compile on the device itself.

Zoltan

 On Tue, Feb 17, 2009 at 3:12 AM, Peter Moberg  
 peter.mob...@gmail.com wrote:
 Will try to do that...

 Regarding the files in mono/arch/arm... Do I have to regenerate  
 these files
 or can I use the h-files that are present? Since I am compiling on  
 a Mac OS
 X I would need to fake being on an ARM if I need to run anything in  
 the arch
 folder...


 On Feb 16, 2009, at 8:01 PM, Zoltan Varga wrote:

 Try updating to mono HEAD. SVN versions sometimes have bugs like  
 that,
 but SVN HEAD
 works for me when using AOT on ARM.

   Zoltan

 On Tue, Feb 17, 2009 at 2:45 AM, mobbe peter.mob...@gmail.com  
 wrote:

 Nope...same results with a mscorlib.dll from the 1.0 folder. It  
 gets
 stuck in
 the mono_local_regalloc method on the assert  checking for ins- 
 sreg !=
 -1... Exactly the same message as before. It is trying to compile  
 the
 Equals
 method

 The inst op code is 633 and both sreg1 and sreg2 is -1.. .

 I am running the system with build 125709 and compiling the  
 mscorlib.dll
 from the 1.0 folder...




 mobbe wrote:

 I am indeed trying to compile a 2.0 version of the mscorlib. I  
 will grab
 the 1.0 version instead and see if I have better luck with that  
 one...if
 I
 can get that to work then I will migrate to use the code from  
 SVN and
 try
 with the 2.0 profile.

 Thanks,


 Zoltan Varga wrote:

 Hi,

 You might be trying to use full-aot with the 2.0 profile.  
 Currently,
 only the 1.0 mscorlib can
 be full-aot-ed, altough 2.0 should work when using mono SVN.

Zoltan

 On Mon, Feb 16, 2009 at 3:48 PM, mobbe peter.mob...@gmail.com  
 wrote:

 I compiled the Mono framework (the unmanaged pieces) so that I  
 could
 run
 it
 on my iPhone. I was successful in doing that and thought that  
 I would
 try to
 do AOT on the iPhone...transfer the temporary asm output to my  
 Mac to
 assemble and link it and from there keep going... however when
 performing
 the AOT compilation of mscorlib.dll Mono hit another assert...
 something
 with inst-sreg1 being negative 1 (-1) (Don't remember right  
 now what
 funtion it stopped in..will have to supply that information  
 when I get
 to my
 Mac later tonight).

 If I commented out the assert it went on a bit further but  
 stopped on
 a
 another assert when trying to emit the op-code saying that it  
 was
 expecting
 0 bytes for the op-code ld_loadmembase but got 4...

 Anyone out there have an ideas of where I should be looking  
 next in
 order to
 try to solve this? It seems like the instruction set it is  
 using for
 ARM
 doesn't match the source codes assumptions. I am sure that I  
 am doing
 something wrong but don't know where to begin to look for the  
 issue.
 Maybe
 someone out there has a cpu-arm.h file that they know works  
 that I can
 compare with mine? Are there any other generated files  
 regarding the
 instruction set that I should double check?

 Thanks for your help in advance.



 Hi,

 full-aot currently only works on amd64/arm.

  Zoltan


 --
 View this message in context:

 http://www.nabble.com/On-what-platform%7Ccpu-arch%7Cmono-version-does-full-AOT-actually-work--tp21988583p22038601.html
 Sent from the Mono - Dev mailing list archive at Nabble.com.

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list





 --
 View this message in context:
 http://www.nabble.com/On-what-platform%7Ccpu-arch%7Cmono-version-does-full-AOT-actually-work--tp21988583p22049003.html
 Sent from the Mono - Dev mailing list archive at Nabble.com.

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list



 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] On what platform|cpu-arch|mono-version does full AOT actually work?

2009-02-16 Thread Peter Moberg
Looks like you are right regarding the fact that I will be running  
into a lot of problems...

Going to sound like a broken record...but I did get latest from SVN...  
compiled everything for the iPhone ARM...Successfully started up Mono  
on the iPhone device...started to compile mscorlib (profile 1 as well  
as profile 2) in AOT mode.BAM!...same assert as mentioned below  
triggered.

Since I am able to run Mono on the iPhone and I am performing the AOT  
compilation on the iPhone with its ARM processor I am bit surprised  
that it still doesn't work... the only thing I can think of is that  
there are a few files that are generated before compilation... e.g.  
cpu-arm.h and a few others in the arch folder..and that they are not  
correct on my side... if anyone have those files and are able to run  
on the ARM processor I would love to take a look at them to compare


On Feb 16, 2009, at 8:19 PM, Zoltan Varga wrote:

 Hi,

  mono on iphone is not really a supported configuration right now, it
 works for some people,
 but expect to run into lots of problems. Cross compiling mono for arm
 is especially fraught
 with problems, better to compile on the device itself.

Zoltan

 On Tue, Feb 17, 2009 at 3:12 AM, Peter Moberg  
 peter.mob...@gmail.com wrote:
 Will try to do that...

 Regarding the files in mono/arch/arm... Do I have to regenerate  
 these files
 or can I use the h-files that are present? Since I am compiling on  
 a Mac OS
 X I would need to fake being on an ARM if I need to run anything in  
 the arch
 folder...


 On Feb 16, 2009, at 8:01 PM, Zoltan Varga wrote:

 Try updating to mono HEAD. SVN versions sometimes have bugs like  
 that,
 but SVN HEAD
 works for me when using AOT on ARM.

   Zoltan

 On Tue, Feb 17, 2009 at 2:45 AM, mobbe peter.mob...@gmail.com  
 wrote:

 Nope...same results with a mscorlib.dll from the 1.0 folder. It  
 gets
 stuck in
 the mono_local_regalloc method on the assert  checking for ins- 
 sreg !=
 -1... Exactly the same message as before. It is trying to compile  
 the
 Equals
 method

 The inst op code is 633 and both sreg1 and sreg2 is -1.. .

 I am running the system with build 125709 and compiling the  
 mscorlib.dll
 from the 1.0 folder...




 mobbe wrote:

 I am indeed trying to compile a 2.0 version of the mscorlib. I  
 will grab
 the 1.0 version instead and see if I have better luck with that  
 one...if
 I
 can get that to work then I will migrate to use the code from  
 SVN and
 try
 with the 2.0 profile.

 Thanks,


 Zoltan Varga wrote:

 Hi,

 You might be trying to use full-aot with the 2.0 profile.  
 Currently,
 only the 1.0 mscorlib can
 be full-aot-ed, altough 2.0 should work when using mono SVN.

Zoltan

 On Mon, Feb 16, 2009 at 3:48 PM, mobbe peter.mob...@gmail.com  
 wrote:

 I compiled the Mono framework (the unmanaged pieces) so that I  
 could
 run
 it
 on my iPhone. I was successful in doing that and thought that  
 I would
 try to
 do AOT on the iPhone...transfer the temporary asm output to my  
 Mac to
 assemble and link it and from there keep going... however when
 performing
 the AOT compilation of mscorlib.dll Mono hit another assert...
 something
 with inst-sreg1 being negative 1 (-1) (Don't remember right  
 now what
 funtion it stopped in..will have to supply that information  
 when I get
 to my
 Mac later tonight).

 If I commented out the assert it went on a bit further but  
 stopped on
 a
 another assert when trying to emit the op-code saying that it  
 was
 expecting
 0 bytes for the op-code ld_loadmembase but got 4...

 Anyone out there have an ideas of where I should be looking  
 next in
 order to
 try to solve this? It seems like the instruction set it is  
 using for
 ARM
 doesn't match the source codes assumptions. I am sure that I  
 am doing
 something wrong but don't know where to begin to look for the  
 issue.
 Maybe
 someone out there has a cpu-arm.h file that they know works  
 that I can
 compare with mine? Are there any other generated files  
 regarding the
 instruction set that I should double check?

 Thanks for your help in advance.



 Hi,

 full-aot currently only works on amd64/arm.

  Zoltan


 --
 View this message in context:

 http://www.nabble.com/On-what-platform%7Ccpu-arch%7Cmono-version-does-full-AOT-actually-work--tp21988583p22038601.html
 Sent from the Mono - Dev mailing list archive at Nabble.com.

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list





 --
 View this message in context:
 http://www.nabble.com/On-what-platform%7Ccpu-arch%7Cmono-version-does-full-AOT-actually-work--tp21988583p22049003.html
 Sent from the Mono - Dev mailing list