Compare commits

...
2799 Commits
Author SHA1 Message Date
Atsushi Eno 675dc5b693 support UdpTranspoerSettings.MulticastInterfaceId. This should fix bug #669328. 2011-02-15 01:57:02 +09:00
Veerapuram Varadhan 881d960b29 backport of r1012ab0b
Fixes 667236 - Handle numeric types appropriately
2011-02-14 21:18:04 +05:30
Miguel de Icaza 6c161687ea [670974] Use the underlying BaseStream to read bytes instead of trying to peek a character.
Peeking a character as it turns out is a really bad idea as it involves the encoder
to pull characters.   If the PeekChar happens to read a byte that is part of a
UTF8 string that needs more characters to process we would end up with the reported
crash.

Atsushi Enomoto tracked this down, and the fix is to use the binaryreader.BaseStream
to directly call into ReadByte and Read without ever probing with PeekChar ().   It
is not really possible to use BinaryReader.ReadByte since this one can throw on
end-of-buffer conditions instead of returning -1
2011-02-14 09:41:31 -05:00
Marek Safar 7acea3000f [671552] Use correct emit method for stobj type 2011-02-14 13:21:44 +00:00
Gonzalo Paniagua Javier a615812280 [HttpWebRequest] Avoid nullref on empty cookie header.
If the Set-Cookie header is empty, the cookie instance is not created.
	Fixes bug #670189.
2011-02-13 14:54:27 -05:00
Alexandre Mutel 7ec51b02e9 Fix sizeof(T) in non-gshared code. Fixes #580189. 2011-02-13 16:17:12 +01:00
Mark Probst 9b5ca2f366 Merge branch 'bugfix-main-thread-root' into mono-2-10 2011-02-13 16:10:37 +01:00
Zoltan Varga f4edc478f0 Add an assembly version to Mono.Debugger.Soft. Fixes #671536. 2011-02-13 16:06:57 +01:00
Mark Probst 586f777ec2 [sgen] Register the main_thread as a GC root. Fixes shutdown crashes. 2011-02-13 15:50:13 +01:00
Gonzalo Paniagua Javier ba0fbbe133 [HttpListenre] Avoid multiple calls to Close()
HttpListenerResponse could be calling HttpConnection.Close() more than
	once.
2011-02-13 07:08:34 -05:00
Zoltan Varga 86fdd99f9e Fix reading of cattr arguments of type Type[]. Fixes #670331. 2011-02-13 04:24:58 +01:00
Gonzalo Paniagua Javier 6390cf3b64 [gzip] Allow partial flush
When Flush() is called explicitly, do a Z_PARTIAL_FLUSH to force gzip
	into giving us whatever is available. Less efficient, but compatible
	with MS.
2011-02-12 00:05:35 -05:00
Gonzalo Paniagua Javier fcdb18822c [Socket] Fix invalid cast
Fix invalid cast when canceling pending operations due to socket.Close.
2011-02-11 18:36:54 -05:00
Zoltan Varga 79fddfa11d Fix token generation for TypeBuilder's in another assembly. Fixes #671245. 2011-02-12 00:15:59 +01:00
Miguel de Icaza 32f616acfb [fix] changing Form.Enabled sometimes can change the list of OpenForms, fixes 671098 2011-02-11 17:34:23 -05:00
Zoltan Varga 52e0febfe6 Add Mono.XBuild.Utilities/MSBuildUtils.cs to the build. 2011-02-11 21:58:02 +01:00
Zoltan Varga 4246c386a0 Pretty print MonoString* too in xdb. 2011-02-11 21:54:44 +01:00
Sebastien Pouliot d4ed08b5b4 Continue X509Chain processing even if the local machine directory does not exists
* corlib/Mono.Security.X509/X509Store.cs:
* Mono.Security/Mono.Security.X509/X509Store.cs:
	Fix key pair persistence to load key pairs from the same location
	(machine or user) as the requested certificate. This avoids an
	internal exception (on missing local machine directory) that stop
	the evaluation of the certificate validity (i.e. no user store
	check)
* System/System.Security.Cryptography.X509Certificates/X509Chain.cs:
Ensure that a missing local machine directory does not result in a NRE
while loading CRL (which would fail the certificate being validated)
2011-02-11 13:41:33 -05:00
Hib Eris e43d097f7c Earlier undefine HAVE_GETPROCESSID when cross compiling 2011-02-11 15:42:29 +01:00
Rodrigo Kumpera 1066c2c1b5 Make maxStackSize behavior compatible with MS.
* Thread.cs (.ctor): Check if maxStackSize is negative
	and raise and AOORE. Silently use a saner minimum size
	of 128k as mono can't really run with much less than that.
2011-02-11 14:58:12 +01:00
Zoltan Varga efa462d684 Make the wait in the finalizer thread alertable to fix sdb on windows. Fixes #670619. 2011-02-11 05:55:06 +01:00
Zoltan Varga 6a77ef2687 Change some Sleep(0)'s to Sleep(1) in the soft-debugger code to avoid 100% cpu utilization on windows. 2011-02-11 01:34:43 +01:00
Gonzalo Paniagua Javier 1829c15ee9 [HttpWebRequest] Can't ignore erros here 2011-02-10 17:26:09 -05:00
Gonzalo Paniagua Javier c214cd9488 [HttpWebRequest] Error handling for POST/PUT
When we get an error from the server before writing an entire
	unbuffered response, the server might close the connection leading to
	write errors. Ignore those and return the actual HTTP status code from
	the original server error.
2011-02-10 17:26:09 -05:00
Ankit Jain d08d05e197 [xbuild] Update Utilities.FromMSBuildPath from monodevelop.
Updating FromMSBuildPath also fixes a bug on windows.

* Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Utilities.cs:
Move to..
* Microsoft.Build.Utilities/Mono.XBuild.Utilities/MSBuildUtils.cs:
.. this. Also, update FromMSBuildPath from monodevelop.
* Update Engine/* and Tasks/* to track the new api.
2011-02-11 02:57:58 +05:30
Andrew Jorgensen 0793c8ecae Mono.Debugger.Soft.dll is installed for 4.0 also. 2011-02-10 07:36:52 -07:00
Atsushi Eno 2031d77d6b Fix a couple of addressing namespace fixes (found in April2005 version). 2011-02-10 22:07:16 +09:00
Atsushi Eno 916479ff8a Fix wrong async completion handling in UDP channel receive.
After AsyncWaitHandle.Set(), order of filling results and WaitOne() are
undefined.
2011-02-10 21:19:02 +09:00
Marek Habersack 1630b8ecb9 [asp.net] Fix for bug #669048. Fix up virtual precompiled app virtual paths with the virtual root of the current app 2011-02-09 22:02:36 +01:00
Rodrigo Kumpera 1316be56bb Handle assignment check of variant type and its gtd.
* clas.c (mono_class_is_variant_compatible): Return
	FALSE if checking a variant type and its gtd instead
	of crashing.

	Fixes #668506
2011-02-09 16:42:17 +01:00
Zoltan Varga e61f3b7278 Install Mono.Debugger.Soft in the 4.0 profile as well. 2011-02-09 16:25:02 +01:00
Atsushi Eno b6b34d1051 Recent ContractDescription fix uncovered wrong contracts in discovery. 2011-02-09 20:06:07 +09:00
Rodrigo Kumpera c5cbc7e8e2 Cleanup the reference queue on domain unload.
* gc.c (finalize_domain_objects): Clear reference
	queues on domain unload after running all finalizers.
2011-02-09 11:22:23 +01:00
Atsushi Eno 3aad1fb2cf Support ServiceKnownTypes. Fixed another case on bug #652331. 2011-02-09 15:44:19 +09:00
Zoltan Varga c3cd3eb877 Disable OP_INEG cfolding on 32 bit arches, as it breaks the LNEG decomposition. The previous special casing didn't work as the spill pass could insert a store between the ineg and the adc_imm. Fixes #670479. 2011-02-09 05:11:43 +01:00
Gonzalo Paniagua Javier 610f8d77c9 [SmtpClient] Don't send empty display name.
If there's no display name, don't send '""'.
	Fixes bug #670475.
2011-02-08 21:02:33 -05:00
Miguel de Icaza 18efb9a9e2 Update docs 2011-02-08 20:19:02 -05:00
Miguel de Icaza 11b3ead24e Add prototype to .h file 2011-02-08 20:18:55 -05:00
Lucas Meijer dfcd93df2a implement mono_set_assemblies_path for platforms that cannot set MONO_PATH environment variable. 2011-02-08 20:18:39 -05:00
Atsushi Eno ee701df195 Fix bug #661400 - fix complicated namespace resolution issue.
Namespaces in nested external schemas have to be validated against
immediately-containing schema. If there is a schema A with urn:x
targetNamespace imports a schema B with urn:y targetNamespace which
in turn includes another schema C, then C must be validated its namespace
against B, not A.
2011-02-08 20:18:32 -05:00
Marek Habersack 142676a516 [asp.net] Be more careful with errors collection when compilation fails. 2011-02-09 01:26:17 +01:00
Marek Habersack 02f2fe8204 [asp.net] Implemented CustomErrorsRedirectMode 2011-02-09 01:26:10 +01:00
Miguel de Icaza be6ba4038a Fix Enum.HasValue, previous version crashed with negative values 2011-02-08 15:52:38 -05:00
Marek Habersack 9d4e229c2e [cross-compilation] Added some flexibility regarding the location of development packages
The script now supports an extra cross-compilation directory in which you can unpack the
library and development packages necessary for the build to succeed (glib, zlib etc). Also
supported now is specifying the location at which Mono will be installed on Windows.
Replaced SVN and GIT-SVN version checks with git checks.
2011-02-08 20:47:15 +01:00
Rodrigo Kumpera 9177ddc384 Fix reference queue under boehm.
* gc.c (finalizer_thread): Clean reference queues
	after finalizers are called to give boehm a chance
	to resurrect it.
2011-02-08 18:30:09 +01:00
Hib Eris b9c4865b04 Fix build-mingw32.sh for CROSS_PKG_CONFIG_DIR without *.pc files 2011-02-08 14:56:26 +01:00
Hib Eris 83c2b73c8c No longer include glib binaries in build-mingw32.sh builds.
By default, Mono now uses an embedded glib implementation, so there
is no need to ship external glib libraries anymore.
2011-02-08 14:55:51 +01:00
Hib Eris 77b6d414b9 Let build-mingw32.sh script also work on dist tarballs 2011-02-08 14:55:10 +01:00
Hib Eris cb8913217e Use winternl.h instead of ddk (when available)
These changes are nescessary for compiling with a mingw-w64 compiler.
2011-02-08 14:45:12 +01:00
Hib Eris c45dd61269 Remove implementation details from public header io-layer.h
The macro HAVE_GETPROCESSID is defined in config.h and should not be
exposed in public headers.
2011-02-08 14:44:52 +01:00
Marek Safar 2990e2e271 [657099] Fix cloning of remapped blocks 2011-02-08 12:53:05 +00:00
Atsushi Eno 7e69d0aa77 Simple content restriction was not validated when it is in further reference.
Fixed bug #595947. It was complexType [base]-> complexType [base]-> simpleType.
2011-02-08 20:55:16 +09:00
Marek Safar cf0928b53e Fix remapping of cloned block parent when already in cloned context 2011-02-08 11:23:46 +00:00
Atsushi Eno b2525e0cb0 For complexType simpleContent restriction, fill attributes from base type.
Part of bugfix #595947.
2011-02-08 18:32:53 +09:00
Atsushi Eno 38fe929b9f There's a tricky namespace-mismatching deserialization in .NET implementation.
Fixed bug #666333.
2011-02-08 17:11:15 +09:00
Atsushi Eno f5ef8da8e5 Contract-based type must ensure that the base type is also contract-based.
Fixed bug #661987 on WCF side.

Conflicts:

	mcs/class/System.Runtime.Serialization/Test/System.Runtime.Serialization/XmlObjectSerializerTest.cs
2011-02-08 12:13:57 +09:00
Atsushi Eno 20453fcb9c Open and close client/service runtime channels in chains. Fixed bug #663278. 2011-02-08 12:08:10 +09:00
Atsushi Eno f3ddd9df63 handle IsTerminating. 2011-02-08 12:07:57 +09:00
Atsushi Eno 68ce0748e5 Duplex client has its own listener loop, so special care on reply is needed. 2011-02-08 12:07:45 +09:00
Atsushi Eno 34fad98bf0 Callback contract should be distinguished from others for DispatchOperation. 2011-02-08 12:07:33 +09:00
Atsushi Eno 176c92c21d Now operations are collected per corresponding ContractDescription.
This fixes naming of MessageDescription Action URI from its type.
2011-02-08 12:07:22 +09:00
Atsushi Eno a303481db4 Implement GetInheritedContracts(), towards bugfix #668089. 2011-02-08 12:07:11 +09:00
Atsushi Eno e2884a6c57 standard endpoint and protocol mapping support were lacking at client side.
Turned out that they had nothing to do with #668089..
2011-02-08 12:07:00 +09:00
Atsushi Eno be19163ffe Members in the base type in different namespace are serialized in base ns.
When the serializer serializes a Type B which is derived from A, it used to
serialize member M in A as in namespace_of_B, not in namespace_of_A.

This should fix bug #652331.
2011-02-08 12:06:50 +09:00
Atsushi Eno 44a9e7eef7 Manage opened proxy channels and close them when ChannelFactory is closed. 2011-02-08 12:06:39 +09:00
Atsushi Eno ab26a0788e Implemented a couple of async methods in InstanceContext as well as disposing. 2011-02-08 12:06:29 +09:00
Atsushi Eno 0870ad290d Avoid possible list modification error during close process. 2011-02-08 12:06:18 +09:00
Atsushi Eno c4c9b57b9d Make sure to close session once the client opened one. 2011-02-08 12:06:07 +09:00
Atsushi Eno 184d565783 Fix regression, avoid null key. 2011-02-08 12:05:55 +09:00
Atsushi Eno 84c27ca818 And rename source file name. 2011-02-08 12:05:44 +09:00
Atsushi Eno 561ec9f0e6 Rename InstanceBhavior, too ambiguous among IXxxBehavior interfaces. 2011-02-08 12:05:34 +09:00
Atsushi Eno cf586923d5 Sessions should not be keyed by MessageId but be done by channel SessionId. 2011-02-08 12:05:24 +09:00
Atsushi Eno be5559c59f Read body content if required. Fixed all issues in bug #656020.
Now it considers message content format and IsWrapped[Request|Response] to
retrieve XmlObjectSerializer.
2011-02-08 12:05:13 +09:00
Atsushi Eno 97a48b0eab Enable duplicate "UriMatched" error check, with couple of FIXMEs.
.NET is very unclear about those UriTemplate behavior. Too minor to mind.
2011-02-08 12:05:03 +09:00
Atsushi Eno fbc54c3de5 Fix template match logic to first check HTTP-method-matching ones.
Part of the fix for bug #656020.
2011-02-08 12:04:53 +09:00
Atsushi Eno e99c8b5a77 Serialize non-mapped message parameter as body content. Part of bug #656020 fix. 2011-02-08 12:04:43 +09:00
Marek Habersack 6eca3e53ed [crypto] Added missing 4.0 algorithm names 2011-02-08 00:34:33 +01:00
Hib Eris d1ef6f2e4b Do not distribute eglib-config.h
The file eglib-config.h is generated when running configure.
Distributing eglib-config.h in tarballs causes errors when building
out of the source tree.
2011-02-07 23:55:47 +01:00
Hib Eris 0ab1c82223 Use _vscprintf() for mingw-w64 compilers
The mingw-w64 compilers implement a vsnprintf() function that do not
conform to the C99 standard (just like MSVC).
2011-02-07 23:43:37 +01:00
Hib Eris dd8a1f2831 Include config.h in mono-profiler-aot.c
This change is nescessary for compiling with a mingw-w64 compiler.
2011-02-07 23:41:28 +01:00
Zoltan Varga 632a3c70c7 Cast the result of MONO_CONTEXT_GET_SP () to an int to fix the windows build. 2011-02-07 23:36:41 +01:00
Zoltan Varga 6b9347a35b Include sys/types.h for pid_t on mingw. Fixes #670076. 2011-02-07 23:33:11 +01:00
Zoltan Varga ccedbc64dc Use mono_method_get_vtable_slot () instead of accessing method->slot directly. Fixes #669808. 2011-02-07 16:11:47 +01:00
Zoltan Varga a962434e90 Fix the ia64 build. 2011-02-06 00:08:16 +01:00
Rodrigo Kumpera 129cfd47ee Fixes ldfnt to ldvtftn conversion.
* mini-trampolines.c (mono_delegate_trampoline): The ldftn
	to ldvtftn conversion must check if the method is abstract,
	otherwise it breaks delegate to base classes.

	Fixes #666008
2011-02-05 13:38:42 +01:00
Zoltan Varga 1c51463ed0 Print a normal stack trace even if a hard stack overflow happens in unmanaged code. 2011-02-04 12:55:47 +01:00
Zoltan Varga 719afa9b59 Print a normal stack trace on a hard stack overflow. 2011-02-03 23:04:47 +01:00
Zoltan Varga 8f45703547 Fix the handling of CompareExchange icalls in AOT, we were using the 'object' versions for everything, which broke with 64 bit types on 32 bit platforms. 2011-02-03 21:59:34 +01:00
Ankit Jain d47a028ed4 [webservices] Extensions can be unknown XmlElements also, fix.
* class/System.Web.Services/System.Web.Services.Description/BasicProfileChecker.cs:
Extensions can be XmlElement or ServiceDescriptionFormatExtension.
* class/System.Web.Services/System.Web.Services.Description/ServiceDescription.cs:
(AddExtensionNamespaces): Likewise. Also, ignore namespaces from
XmlElement, as we retain and write them out as-is.
(WriteExtension): Emit the XmlElement as-is.
* class/System.Web.Services/Test/System.Web.Services.Description/ServiceDescriptionTest.cs:
Update to write out the wsdl also.
2011-02-04 01:03:45 +05:30
Marek Habersack 568f9ab996 [asp.net] HttpRuntimeSection.RequestPathInvalidCharacters default value is different 2011-02-03 17:43:31 +01:00
Marek Habersack c7f2fda73d [xml] XmlReaderSettings.{DtdProcessing,MaxCharactersFromEntities,MaxCharactersInDocument} are present in 3.5+
With the exception of DtdProcessing, the properties are part of .NET 3.5+. DtdProcessing appeared in 4.0.
2011-02-03 17:43:02 +01:00
Marek Safar c139a0e52d Don't even try to import type when its context is wrong 2011-02-03 15:21:38 +00:00
Marek Safar 320645f312 Add handling of broken Convert callsite from Orchard Project 2011-02-03 15:21:13 +00:00
Marek Safar 8b1e1255e6 Fix importing of private types under dynamic context 2011-02-03 15:16:50 +00:00
Zoltan Varga a96d068321 Fix the passing of vtype arguments for methods which return floats in soft-float mode. Fixes #668905. 2011-02-03 16:06:25 +01:00
Marek Safar a5f9b5d9c6 Allow any expression to be used in where clause. Some custom linq implementations use non-predicate version of where 2011-02-03 13:55:28 +00:00
Marek Habersack fe7386298f [reflection] Default binder's AdjustArguments method treats ParamArray parameters which are already arrays properly
Such parameters are not adjusted as it would lead to an InvalidCastException whenever an attempt to set an array
index's value would be made.
2011-02-03 02:23:15 +01:00
Zoltan Varga db64c7f8f1 Add support for --debug=casts to Array:SetValue (). Fixes #668851. 2011-02-03 00:37:45 +01:00
Zoltan Varga 63f4b4cdd4 Fix a warning. 2011-02-03 00:36:41 +01:00
Rodrigo Kumpera 0efd1e04f6 Fix dynamic method cleanup at shutdown.
* gc.c (mono_gc_cleanup): Cleanup all reference
	queues after regular finalization.

	* reflection.c: The dynamic method ref queue is finalized
	by the runtime itself.

	* runtime.c: Ditto.
2011-02-02 20:28:30 +01:00
Miguel de Icaza b4e49b89b4 [csharp] Change the signature for print 2011-02-02 13:09:53 -05:00
Marek Safar bf12c6eb03 Implement support for implicit user conversion for DefaultParameterValue (very odd) 2011-02-02 17:25:22 +00:00
Ankit Jain 15514b1b26 [xbuild] Warn for unknown toolsVersion only on build.
Emit warning for unknown toolsversion only on a build, and
*not* everytime the project file is parsed.

* class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Project.cs
(GetToolsVersionToUse): Add a 'emitWarning' bool param.
(Build): Call GetToolsVersionToUse () to ensure that a warning is
emitted in case of a unknown tools version.
2011-02-02 18:26:43 +05:30
Rodrigo Kumpera 8dba556993 Align call instructions to make code patching SMP safe.
* mini-x86.c (emit_call): Align call instructions on
	3 mod 4 so the address is 4 bytes aligned and can't span
	two cache lines. This is required for proper SMP support
	as CAS is not atomic across cache lines.

	Fixes one of the crashes due to #667921.
2011-02-02 13:03:04 +01:00
Geoff Norton a40312f1c1 Avoid a stack overflow when deactivating a window 2011-02-01 23:54:06 -05:00
Lucas Meijer ca201f3478 make mono_print_thread_dump output to the visualstudio debugger window, for better debugger experience 2011-02-01 21:55:57 +01:00
Rodrigo Kumpera e7785a27ab Don't use finalization to cleanup dynamic methods.
* reflection.c: Use a reference queue to cleanup
	dynamic methods instead of finalization.

	* runtime.c: Shutdown the dynamic method queue
	before runtime cleanup begins.

	* DynamicMethod.cs: No longer finalizable.

	* icall-def.h: Remove unused dynamic method icall.

	Fixes #660422
2011-02-01 17:35:11 +01:00
Rodrigo Kumpera fd57b963ad Implement a reference queue API.
* gc.c: A reference queue allows one to queue
	callbcks for when objects are collected.
	It allows for safe cleanup of objects that can
	only be done when it is effectively collected.
	The major difference with regular finalization
	is that the collector makes sure the object
	was collected - and can't be resurrected.

	* gc-internal.h: Export entrypoints for the
	new API.
2011-02-01 17:35:11 +01:00
Zoltan Varga 88bfc71d89 Make caching in mono_marshal_get_virtual_stelemref () thread-safe. Fixes #668489. 2011-02-01 17:09:45 +01:00
Marek Safar efcd37f730 Fix empty cast conversion from dynamic type object type argument 2011-02-01 14:29:49 +00:00
Marek Habersack b27182bd5d [asp.net] FormsAuthenticationTicket.FromByteArray stops early if it is passed a null parameter 2011-02-01 09:21:13 +01:00
Marek Habersack e44310c079 [runtime] AddWatcher icall must look up the path in an IOMAP-aware way 2011-02-01 09:21:07 +01:00
Atsushi Eno 5d7723bc37 Members in the base type in different namespace are serialized in base ns.
When the serializer serializes a Type B which is derived from A, it used to
serialize member M in A as in namespace_of_B, not in namespace_of_A.

This should fix bug #652331.
2011-02-01 15:59:00 +09:00
Atsushi Eno 157111dbb5 quick build workaround. 2011-02-01 13:01:50 +09:00
Atsushi Eno 38bdb82f95 in NET_4_0, remove types that went into System.Xaml.dll. Change build order. 2011-02-01 11:05:11 +09:00
Bit Diff 0a8a210791 Fixes #527447 whereby it was not possible to pass additional arguments to mono-service2 (if your executable required command-line arguments of it's own). 2011-01-31 17:59:03 -05:00
Zoltan Varga ca0ededdc6 Fix stack walks on sparc. 2011-01-31 22:40:11 +01:00
Gonzalo Paniagua Javier 79633ee3d1 Handle wrapped ThreadAbortException
Third party ProcessRequest() like the one from Razor can wrap a
	ThreadAbortException originated from response.Redirect().
2011-01-31 16:36:16 -05:00
Jonathan Pryor 0577648c00 Fix the basic-profile build. 2011-01-31 15:16:05 -05:00
Jonathan Pryor 8cc7997a69 Fix the MonoDroid build.
Most System.TimeZoneInfo members weren't being included.
2011-01-31 14:05:19 -05:00
Gonzalo Paniagua Javier 1258d11fc3 Allow forcing HTTP protocol version
If the version is manually set, ignore the version from the service
	point when set.

	Fixes bug #668199.
2011-01-31 10:49:40 -05:00
Lluis Sanchez b5da420c28 Handle possible exceptions thrown by Socket.Close 2011-01-31 16:34:17 +01:00
Marek Habersack 879cb82456 [asp.net] Implemented 4.0 types System.Web.Security.{MachineKey,MachineKeyProtection} plus tests 2011-01-31 15:20:57 +01:00
Zoltan Varga 15aed192fb When using xdebug, allocate all code from the code manager of the root domain. Hopefully fixes #666152. 2011-01-31 14:02:29 +01:00
Marek Habersack 789c5a7f91 [asp.net] Ignore directories that don't exist instead of throwing. 2011-01-31 11:08:33 +01:00
Marek Habersack 684266d2b3 [runtime] Use IOAMP-aware method of looking for domain configuration file 2011-01-31 09:47:20 +01:00
Jo Shields c5302b7b52 Really fix sgen on PowerPC Linux. Assembler on Linux requires that register names are just bare numbers, unlike OSX, i.e. "r0" must be "0" on Linux. 2011-01-31 07:47:05 +01:00
Atsushi Eno fc0ec2635d Do not return DocumentFragment from AppendChild() etc. Fixed bug #666249. 2011-01-31 13:48:00 +09:00
Atsushi Eno 2d13b63f4e Fixed bug #666872; XElement.Changed and .Changing were not triggered. 2011-01-31 13:46:55 +09:00
Atsushi Eno b057032956 add public NetTcpSecurity .ctor() and close #667429. 2011-01-30 23:38:57 -05:00
Miguel de Icaza a11120ae36 [repl] Fix running specified scripts from command line, allow #! syntax, add print command
We were calling the Reset () method after we had initialized the driver
with the new command line arguments, clearing the list of files to execute
before we executed them.

Added support for #! in the csharp repl, and added the print() command to
the InteractiveBase

Add a better way of dealing with -e, without adding hacks to the core that wont work
in the future
2011-01-30 17:43:44 -05:00
Miguel de Icaza b56b8ad2c3 [repl] Add support for -e EXPRESSION to the csharp command 2011-01-30 12:06:10 -05:00
Miguel de Icaza 0b17f7feab Document csharp #! support 2011-01-30 11:41:09 -05:00
Miguel de Icaza abf855afe1 [repl] Fix running specified scripts from command line, allow #! syntax, add print command
We were calling the Reset () method after we had initialized the driver
with the new command line arguments, clearing the list of files to execute
before we executed them.

Added support for #! in the csharp repl, and added the print() command to
the InteractiveBase
2011-01-30 11:33:00 -05:00
Zoltan Varga af6065a810 Fix some quadratic behavior in the AOT compiler. 2011-01-30 09:13:51 +01:00
Zoltan Varga 9cffdf6cf4 Improve hashing of MONO_PATCH_INFO_TYPE_FROM_HANDLE. 2011-01-30 09:13:36 +01:00
Zoltan Varga 5a862ae52a Mark a newly added test as !FULLAOT. 2011-01-30 09:13:05 +01:00
Zoltan Varga 07b052d9c6 Don't crash when inlining static methods called using callvirt. Fixes #668170. 2011-01-30 07:00:30 +01:00
Zoltan Varga 70adac78be Clear the 'need_rgctx_tramp' flag when creating a synchronized wrapper. Fixes 2011-01-29 20:52:23 +01:00
Geoff Norton 51a4f125d1 Typo 2011-01-29 11:37:17 -05:00
Geoff Norton 8e4b73cb4a Avoid a crash when shutting down jit attached threads 2011-01-28 19:05:21 -05:00
Geoff Norton e0dd2115d6 Ensure we setup the vtable before accessing it 2011-01-28 01:08:57 -05:00
Zoltan Varga 54fe90cf1c Add an AtLeast version to sdb's VersionInfo class. 2011-01-28 06:28:55 +01:00
Geoff Norton abc793ffbd Bump SDB protocol so MonoDevelop can guard IL inspection of dynamic methods 2011-01-28 00:26:12 -05:00
Geoff Norton d23601d20b Dont leak loader errors in the aot compiler, as it could cause later methods to not get compiled erroneously 2011-01-27 23:23:27 -05:00
Gonzalo Paniagua Javier 2151a961f8 [HttpListener] Set each cookie in its own header
Send a Set-Cookie header per cookie instead of a Set-Cookie2 with
	multiple cookies.

	Fixes bug #667550.
2011-01-27 15:47:53 -05:00
Zoltan Varga b8bf630538 Fix AOT support for types in the EXPORTEDTYPE table. 2011-01-27 19:28:18 +01:00
Zoltan Varga 77f13bc288 Increase an aot buffer size again. 2011-01-27 17:25:07 +01:00
Marek Habersack dead19bc1e [asp.net] A bunch of fixes related to the default VirtualPathProvider (needed for Orchard)
* DefaultVirtualDirectory is now more careful when snipping off parts of the path passed to
  its constructor. Before removing the file part it checks whether the file indeed exists.
  Also sealed the class and made it use generic List instead of ArrayList
* HttpRequest does not normalize mapped paths when converting them to absolute ones. This is
  to avoid errors when path like "~/bin/../../file.txt" is passed to MapPath.
* VirtualPathUtility.ToAbsolute overload with normalize parameter really doesn't normalize
  the resulting path now.
2011-01-27 15:36:45 +01:00
Marek Habersack ef2c84591a [machine.config] Added the <system.transactions> section definition 2011-01-27 15:36:45 +01:00
Zoltan Varga 30f5e30bc4 Applied patch from Burkhard Linke <[email protected]>. Add support for newer boehm-gc versions. 2011-01-27 15:35:25 +01:00
Jérémie Laval cdd5b3f397 Leave db connection opened until requested to close it and add more unit tests 2011-01-27 13:18:19 +00:00
Zoltan Varga 4512ede1a0 Fix compilation of tests/assemblyresolve with newer mcs-es. 2011-01-27 11:06:35 +01:00
Marek Safar fb6c06445f [667261] Fixes overload resolution of an optional parameter followed by a params parameter of the same type 2011-01-27 09:06:10 +00:00
Zoltan Varga d2fddf5062 Fix dist issues in Mono.Debugger.Soft. 2011-01-27 07:16:44 +01:00
Gonzalo Paniagua Javier ae3683b3c2 Prevent abort
When cleaning up the sockets we no longer have access to Tls.
2011-01-26 23:09:50 -05:00
Zoltan Varga 36d4336429 Add AOT support for castclass_with_cache wrappers. 2011-01-27 01:44:47 +01:00
Kyle Ambroff 51a47770f2 version tolerant serialization fails with missing primitive members
Modifies ObjectReader so that when it encounters a primitive typed member in
an object stream which has no corresponding member in the app domain, it will
read the value anyway and throw it away. That way it can read the next block
from the stream.

Added a unit test which passes with the changes to ObjectReader.

Fixes bug #641821.
2011-01-26 18:07:42 -05:00
Kenneth Bell c0a4dd98cf Implement RawSecurityDescriptor.
* Marshals to/from SDDL and binary form.

 * Supports 'Common' ACEs and 'Object' ACEs
2011-01-26 17:58:57 -05:00
Kenneth Bell 27729c4b20 Implement SecurityIdentifier and improve NTAccount.
* Only translates between SecurityIdentifier and NTAccount for
    well-known accounts.

  * NTAccount changed to not upper-case values to match behaviour
    observed in Microsoft's .NET (see also unit tests)

  * Add unit tests for both classes
2011-01-26 17:46:28 -05:00
Antoine Cailliau c7f33c1904 Implements System.ComponentModel.DataAnnotations.RegularExpressionAttribute 2011-01-26 17:28:56 -05:00
Geoff Norton eb3626b925 Include operands when emitting the IL stream to sdb clients 2011-01-26 12:34:48 -05:00
Geoff Norton acba62755d Ensure we properly align the stack before resuming from breakpoint signal handlers 2011-01-26 12:13:52 -05:00
Andrew Jorgensen e62983964b Add 2.0 and 4.0 S.D.S.C 2011-01-26 09:48:47 -07:00
Geoff Norton 93966536b5 Dynamic methods are classes already here 2011-01-26 11:24:38 -05:00
Rodrigo Kumpera 9aa0d0ba0b Fix freeing of delegate wrappers.
* marshal.c (mono_marshal_get_delegate_invoke): If
	the target is a static method with first arg bound
	and it belongs to a different assembly than the delegate
	we might end up with a freed signature in the hashtable.

	Fix a moonlight crash.
2011-01-26 12:37:39 +01:00
Marek Safar e984af0443 Optimized constructor readonly access has to be inside same declarting type 2011-01-26 09:04:50 +00:00
Geoff Norton 97c46a7be6 MonoTouch doesnt support SRE, so we need to disable this code on MT 2011-01-25 23:04:33 -05:00
Zoltan Varga 7d5fce6c1b Add a 'suspend-on-unhandled' MONO_DEBUG option to help track down the random build failures on ia64. 2011-01-26 04:17:08 +01:00
Geoff Norton 3d19f5b624 Further .NET 4.0 ification of the mobile profile 2011-01-25 20:11:19 -05:00
Ankit Jain 16669c9944 [xbuild] Improve error messages for condition evaluation.
Also, add new ExpressionEvaluationException class.
Wrap Expression*Exceptions in InvalidProjectFileException with
info about the full condition being evaluated.
2011-01-26 05:03:16 +05:30
Ankit Jain a8f4de0f37 [xbuild] Support short-circuiting in conditions. 2011-01-26 05:03:14 +05:30
Ankit Jain ad8508c148 [xbuild] Correctly set CscToolExe if TargetFrameworkVersion is not set.
* tools/xbuild/xbuild/Microsoft.CSharp.targets: $(CscToolExe)
is set depending on the value of $(TargetFrameworkVersion).
Since, $(TargetFrameworkVersion)'s default value is set
by MS.Common.targets, set $(CscToolExe) *after* importing
MS.Common.targets .
2011-01-26 05:03:13 +05:30
Ankit Jain 081dc45b72 [xbuild] Fix bug #665637.
Pass $(WarningsNotAsErrors) to Csc task.
2011-01-26 05:03:11 +05:30
Ankit Jain b0f9fd65a1 [xbuild] Fix bug #665004. Honor /nologo option.
* tools/xbuild/Parameters.cs (DisplayVersion): Remove, not required.
2011-01-26 05:03:10 +05:30
Ankit Jain f995310582 [xbuild] Update Novell copyright. 2011-01-26 05:03:08 +05:30
Ankit Jain 5789f96b3c [xbuild] Error out, if no target is found in a project. 2011-01-26 05:03:07 +05:30
Jb Evain e413cf2327 [linq] Fix Reverse for IList implementors 2011-01-26 00:10:55 +01:00
Jb Evain bbd7f83168 [linq] Fix overflow check for Count 2011-01-26 00:10:41 +01:00
Jb Evain dcad2f1b22 [linq] fix Range extreme boundaries 2011-01-26 00:10:30 +01:00
Miguel de Icaza e9f180be6a Restoring some of the formal beauty of this text document as
we carefully restore the missing tabs that helped carefully
align the continuation characters in a list of assemblies.

As we align these newline separators, suddenly, a new form
emerges from the chaos, something that gives us the illusion
that this stream of bytes is indeed almost like a dawn of a
new day as we breathe the air in a valley overlooking a beautiful
mountain at the beginning of the spring.
2011-01-25 17:56:00 -05:00
Geoff Norton 8c3c6c4b54 Fix the mobile build 2011-01-25 14:16:11 -05:00
Mark Probst f97c2388cb Merge branch 'sgen-android' into mono-2-10
Conflicts:
	mono/metadata/sgen-gc.c
2011-01-25 16:35:16 +01:00
Marek Habersack 1e0d0e7c4c [corlib,crypto] RandomNumberGenerator implements IDisposable in 4.0 2011-01-25 15:49:24 +01:00
Marek Habersack f96a9873cc [system] SmtpClient implements IDisposable on 4.0 (a no-op for now) 2011-01-25 15:49:19 +01:00
Marek Habersack b10086345e [wcf] Install the System.Data.Services.Client properly. 2011-01-25 15:49:13 +01:00
Marek Safar 77a05371b4 Degrade wrong override member to virtual instead of non-virtual 2011-01-25 10:46:43 +00:00
Geoff Norton ff1caafd97 Add pfx to the mobile profile 2011-01-25 01:52:17 -05:00
Geoff Norton d1eb847ef2 Work around a full-aot issue for monotouch System.Json 2011-01-25 01:52:12 -05:00
Zoltan Varga 6e268ac849 Fix up CAS tests a bit. 2011-01-25 03:01:48 +01:00
Andrew Jorgensen 8f69b0e0e0 Add WebMatrix.Data to spec 2011-01-24 15:17:16 -07:00
Mark Probst ff955b463f [sgen] Don't assert when on Android. 2011-01-24 22:00:36 +01:00
Mark Probst af995f3d82 [sgen] Make the second bridge DFS pass use an implicit stack to avoid stack overflow. 2011-01-24 21:58:57 +01:00
Mark Probst ff37030fd1 [sgen] Use an explicit stack instead of recursion for the first DFS pass in the bridge code. 2011-01-24 21:58:56 +01:00
Mark Probst bf225c5c81 [build] pkg-config support for libmonosgen. 2011-01-24 21:58:55 +01:00
Mark Probst fe369d8746 [sgen] Bridge cross references pass.
This is an extension for the benefit of the Mono/Java bridge on
MonoDroid.  We go through all finalizable objects and report the
strongly connected components of bridge objects and their
connections between each other.
2011-01-24 21:58:54 +01:00
Tomasz Kubacki d70c578fc4 [Mono.CSharp] Improve error reporting 2011-01-24 15:44:42 -05:00
Geoff Norton 7ee94c1ca3 Avoid leaking the vmmap allocated by the kernel for the thread_act_array_t 2011-01-24 12:07:24 -05:00
Geoff Norton 8db070aae1 Fix a mach port leak 2011-01-24 11:39:19 -05:00
Jérémie Laval bc326d8e73 Add unit test for Database 2011-01-24 15:06:00 +00:00
Jérémie Laval 7c3bd246b6 Add unit tests for DynamicRecord 2011-01-24 15:05:58 +00:00
Jérémie Laval 1f40d73cdf Just fixup comment 2011-01-24 15:05:58 +00:00
Jérémie Laval b364173319 Add GetLastInsertId 2011-01-24 15:05:55 +00:00
Jérémie Laval f1acca540b Foobar trigger connection 2011-01-24 15:05:54 +00:00
Jérémie Laval 98c4b8992d Add Close method 2011-01-24 15:05:53 +00:00
Jérémie Laval 591be8a33f Add ConnectionOpened event to Database 2011-01-24 15:05:53 +00:00
Jérémie Laval f5b9efc784 Fix up compilation of Database and DynamicRecord 2011-01-24 15:05:52 +00:00
Jérémie Laval d607d23767 Add Dispose calls to Database 2011-01-24 15:05:52 +00:00
Jérémie Laval 1b4eee0534 Add Database type 2011-01-24 15:05:51 +00:00
Jérémie Laval 784198d66a Complete base DynamicRecord API 2011-01-24 15:05:50 +00:00
Jérémie Laval 77908fc88a Stub DynamicRecord 2011-01-24 15:04:53 +00:00
Jérémie Laval 9bcbd52f03 Add WebMatrix.Data assembly skeleton 2011-01-24 15:01:20 +00:00
Jérémie Laval b57515aa5a Make sure a synchronous continuation get executed synchronously in all cases 2011-01-24 14:33:57 +00:00
Marek Habersack 2d2834e4bc [asp.net] Global.asax assembly must be passed as reference when compiling. BuildManager.GetType improvements.
When user has their own global application class (global.asax is present) the assembly produced from it must
be passed as reference to the compiler.
BuildManager.GetType now supports fully-qualified type names for 'typeName' and searches for the type in the
top-level assemblies, the global.asax assembly and in the assemblies specified in as references in web.config.

All of this fixes certain MVC3+Razor applications.
2011-01-24 15:30:53 +01:00
Marek Habersack a87db25252 [asp.net] Avoid passing duplicate assemblies on mcs command line. 2011-01-24 15:30:47 +01:00
Marek Safar 450b15885d [666476] Use correct parameter count when checking ambiguous params methods 2011-01-24 14:04:41 +00:00
Marek Safar 3fc9d42ca0 Use byte array as underlying storage for AttributeEncoder 2011-01-24 13:59:33 +00:00
Zoltan Varga e50fc47fd5 Dist finally_guard.cs. 2011-01-24 04:15:05 +01:00
Gonzalo Paniagua Javier 234a2d72e8 Fix Dispose() 2011-01-22 13:30:22 -05:00
Marek Habersack 38e5ecca9f [asp.net,routing] Fix for bug #651966. Regular expression constraints must be treated as absolute regexps. 2011-01-22 12:44:25 +01:00
Gonzalo Paniagua Javier 7dabffd212 [HttpListener] Fix incorrect 411 error
Don't send a 411 for unknown methods without content length.
	No need to assign input_stream until requested.

	Fixes bug #666251.
2011-01-21 23:53:51 -05:00
Zoltan Varga 9e14e62935 Fix an assert which happens when a call is made to Nullable.Unbox from gshared code in AOT. 2011-01-22 03:08:26 +01:00
Bassam Tabbara 54b00f3630 Fix for 666225 2011-01-21 21:00:49 -05:00
Miguel de Icaza 6e81152a98 [getline] Fix history search in the cmdline editor 2011-01-21 20:48:51 -05:00
Miguel de Icaza 6593ea7a5e [Mono.CSharp] Fix bug where overwriting variables cleared the wrong value
This fixes #641910
2011-01-21 20:19:38 -05:00
Miguel de Icaza 70feb6a2b3 [csharp] repl using statement fix + support for --fatal
Fixes #638585 which kept reporting the same error on the using statements over and over
Added support for the --fatal flag to the REPL
2011-01-21 19:56:41 -05:00
Zoltan Varga 93f8f61c8a Transition non perf-critical users of klass->has_finalize over to mono_class_has_finalizer (). 2011-01-21 22:32:00 +01:00
Zoltan Varga cef819966a Obsolete VirtualMachine.GetNextEvent () as it is impossible to determine when to resume after an event, since the debuggee suspends only once per event-set. 2011-01-21 21:54:31 +01:00
Zoltan Varga 8b52311dfd Initialize klass->has_finalizer lazily. This allows us to remove the find_method_in_metadata () optimization without a perf cost which is broken in the presence of overrides. Fixes #665769. 2011-01-21 21:54:12 +01:00
Andrew Jorgensen faac64a083 Oops, Microsoft.Web.Infrastructure, not System. 2011-01-21 12:54:13 -07:00
Andrew Jorgensen 0e29d1e39b add Microsoft.Web.Infrastructure 2011-01-21 10:44:36 -07:00
Sebastien Pouliot ef3bdc76c2 Allow RSACryptoServiceProvider.SignHash to work with SHA-2 family
* System.Security.Cryptography/CryptoConfig.cs: Add OID for RIPEMD160
* System.Security.Cryptography/RSACryptoServiceProvider.cs: Update
GetHashNameFromOID to include SHA2-family OIDs. Remove historical
comments about 1.x FX behavior.

* Test/System.Security.Cryptography/CryptoConfigTest.cs: Add test cases
wrt RIPEMD160 OID
* Test/System.Security.Cryptography/RSACryptoServiceProviderTest.cs: Add
test case for SignHash with all FX-provided hash implementations (all
working except RIPEMD160). Remove some NET_2_0/NET_1_1 defines.
* Test/System.Security.Cryptography/RSAPKCS1SignatureFormatterTest.cs:
Remove hacks that were needed for running the tests under FX 1.x. Remove
some NET_2_0/NET_1_1 defines.
2011-01-21 08:39:32 -05:00
Zoltan Varga ec98a692a1 Add NET 4.0 Assembly.UnsafeLoadFrom () method. 2011-01-21 07:27:30 +01:00
Zoltan Varga a1681e5ee3 Fix the previous aot fix. 2011-01-21 05:58:29 +01:00
Miguel de Icaza 962fedd1e6 Do not build the Socket passing on Mobile systems 2011-01-20 22:50:08 -05:00
Atsushi Eno 5920237751 backport JavaScriptObjectDeserializer encoding detection fix. 2011-01-21 12:13:52 +09:00
Gonzalo Paniagua Javier 788535030b [System.Web] Razor works now (modulo DB) 2011-01-20 21:59:47 -05:00
Zoltan Varga 48f3edb3cd Add a test for infinite generic recursion + AOT. 2011-01-21 02:07:57 +01:00
Zoltan Varga e235e72884 Only add imt items whose is_equal flag is set to the array passed to the full-aot imt thunk. 2011-01-21 02:06:47 +01:00
Zoltan Varga 3a1ae308b8 Avoid emitting .note.GNU-stack on arm. 2011-01-21 01:52:51 +01:00
Zoltan Varga f1c1e02c38 Detect inifinite generic recursion differently in the AOT compiler. 2011-01-21 01:50:35 +01:00
Marek Habersack 43937146ac [asp.net] Don't throw NREX when a cache item to be removed is null 2011-01-20 23:39:12 +01:00
Miguel de Icaza c618dfe519 [sockets] Implement DuplicateAndClose and Socket (SocketInformation) constructor for in-process socket passing (AppDomains) 2011-01-20 16:52:49 -05:00
Andrew Jorgensen 42afbbaaa4 remove conflict marker 2011-01-20 11:24:24 -07:00
Jb Evain 730898592e [bug] Prevent a GetMethodBody call on a dynamic method. Fixes 665788 2011-01-20 16:45:43 +01:00
Marek Habersack 0a63027390 [asp.net,mvc] Make unobtrustive request validation in MVC v3 possible
Validation is enabled early in the pipeline during request. ValidationUtility makes sure that validation is indeed enabled and
replaces the default form and query string collections with a lazy version which will validate values only when an existing key
is found and requested.
2011-01-20 14:38:46 +01:00
Marek Habersack 61aa41abb7 [asp.net] Do not throw NREX when firstError is null in ErrorMessage getter 2011-01-20 14:38:37 +01:00
Marek Habersack 66818bb2b6 [asp.net] ValidationUtility implementation 2011-01-20 14:38:21 +01:00
Marek Habersack 1d180c57e1 [asp.net] Introduced unvalidated versions of Form and QueryString properties for MVC3 2011-01-20 14:38:12 +01:00
Marek Habersack 5119b6ef08 [asp.net] Implemented dynamic HTTP module registration 2011-01-20 14:38:02 +01:00
Marek Habersack 14698a4fbf [asp.net] Implemented BuildManager.GetObjectFactory
This method is not used by Mono internally but is called by MVC v3.
2011-01-20 14:37:53 +01:00
Marek Habersack bbca7f5660 [asp.net] Added internal property InputValidationEnabled to report whether the user enabled validation for current request. 2011-01-20 14:37:42 +01:00
Marek Habersack a0c987053d [asp.net] System.Web and Microsoft.Web.Infrastructure are now friends 2011-01-20 14:37:33 +01:00
Marek Habersack 61f6558eae [asp.net] Added the Microsoft.Web.Infrastructure assembly 2011-01-20 14:37:17 +01:00
Marek Safar ba139553af [665333] Encode Length of Public Key correctly 2011-01-20 08:36:02 +00:00
Zoltan Varga 15ead88bf2 Properly align the stack in the arm generic trampoline. 2011-01-20 05:36:20 +01:00
Zoltan Varga 626711d3ac Add a TID field to ThreadMirror which returns the system thread id. 2011-01-20 02:14:22 +01:00
Andrew Jorgensen 51d92f3a6a Dist more files needed by MSVC build 2011-01-19 15:43:12 -07:00
Rodrigo Kumpera 3914fd479a Document precise marking 2011-01-19 15:02:25 +01:00
Rodrigo Kumpera a3d0d6916e Properly clear weak refs that don't track resurrection.
* sgen-gc.c (finish_gray_stack): We must clear
	weak refs that don't track resurrection before
	processing finalizable objects otherwise we'll
	copy/mark them and the weak ref won't be cleared
	until after finalization.

	Fixes #657408
2011-01-19 15:02:09 +01:00
Gonzalo Paniagua Javier 347ad09426 Happy new year. 2011-01-18 22:44:15 -05:00
Zoltan Varga 744c3e2c5b Make the stacks of aot image non-executable. 2011-01-18 18:12:47 +01:00
Marek Safar ca11993157 Checking skd path for is not enough, add check for mscorlib as well 2011-01-18 17:11:07 +00:00
Marek Safar 132f745176 Fallback to corlib location when sdk path cannot be found 2011-01-18 17:10:46 +00:00
Zoltan Varga 001ea99047 Disable some of the FastCopy fast paths since they are racy. 2011-01-18 17:17:42 +01:00
Zoltan Varga 74d5f80e4a Allow only primitive types/enums in RuntimeHelpers.InitializeArray (). 2011-01-18 16:42:22 +01:00
Marek Safar 8e600e2290 Remove devirtualization for Type members 2011-01-18 13:32:34 +00:00
Zoltan Varga fe6c36df0a Make runtime invoke wrappers use cdecl cconv on windows. 2011-01-17 23:18:17 +01:00
Zoltan Varga fe3cd893f7 OP_LCOMPARE_IM has type 'L', not 'I'. Fixes #664630.
This is the same as 6c02c15153, but only for ia64, to avoid destabilizing the
branch.
2011-01-17 22:46:43 +01:00
Rodrigo Kumpera 7dfbfce2c4 Don't check for brokeness when verifying contraints.
* verify.c (is_valid_generic_instantiation): Don't
	check if any argument is broken during constraint check
	as an instance should be valid, but not realizable, even
	if it has broken arguments.

	Fixes one of the issues with #664612
2011-01-17 20:05:16 +01:00
Marek Safar fd66549c35 Add new mcs -sdk option 2011-01-17 17:22:12 +00:00
Zoltan Varga 61b183faa3 Avoid another case of infinite recursion in AOT. 2011-01-17 16:15:10 +01:00
Jb Evain 029c168ffb Fix pdb2mdb when a pdb has a method with no seq points.
Patch by Thad Thompson <[email protected]>
2011-01-17 15:55:11 +01:00
Marek Safar 2ec8c50752 Update to the latest mcs version 2011-01-17 14:15:43 +00:00
Marek Safar 322bc4c9c2 Update IKVM.Reflection 2011-01-17 14:13:26 +00:00
Marek Habersack 8341dc023d [asp.net] (4.0) Validate the form data in Form getter 2011-01-17 14:03:09 +01:00
Zoltan Varga 52ac70bd71 Fix the previous marshalling change so it only applies to chars, not structures which contain char fields. 2011-01-17 00:09:39 +01:00
Zoltan Varga 3229ba977b Pass the string encoding to emit_struct_conv () so marshalling of char arrays works on big-ending machines like s390/ppc64. 2011-01-16 21:11:45 +01:00
Zoltan Varga 02c5d6df68 Make OP_CHECK_THIS do a byte load on arm, since the source argument might point to a vtype if a vtype method is inlined. 2011-01-14 22:29:29 +01:00
Marek Habersack 10ed451a10 [asp.net] Make StopRoutingHandler actually stop the routing instead of throwing an exception
Patch from Damir Simunic <[email protected]>, thanks!
2011-01-14 21:37:18 +01:00
Ankit Jain 31458593f0 [xbuild] Use the backing field directly to avoid evaluating again.
* Microsoft.Build.BuildEngine.Project.cs (InitializeProperties): Use
evaluatedProperties field instead of EvaluatedProperties property,
to avoid invoking a Reevaluate, since it is already in progress.
2011-01-14 04:11:23 +05:30
Ankit Jain 4a914ca1bf [xbuild] Fix bug #664349 .
* Microsoft.Build.BuildEngine/Project.cs (BuildInternal): Set needToReevaluate to
false, when reevaluating.
2011-01-14 04:11:18 +05:30
Ankit Jain 66a2165e37 [xbuild] Add $(TargetDir) property.
Add $(TargetDir) and set TargetPath only if its not set already.
2011-01-14 04:11:12 +05:30
Ankit Jain 035f96e4f8 [xbuild] Clear the built targets cache on project unload.
Remove the entries for a project from the built targets cache, on
project unload.

* Microsoft.Build.BuildEngine/Engine.cs (ClearBuiltTargetsForProject): New.
* Microsoft.Build.BuildEngine/Project.cs (BuiltTargetKeys): Remove.
(RemoveBuiltTargets): Use Engine.ClearBuiltTargetsForProject .
* Microsoft.Build.BuildEngine/Target.cs: Track api changes.
*
2011-01-14 04:11:00 +05:30
Ankit Jain 88b0d19f8b [xbuild] Copy metadata from Project items to target outputs.
Copy metadata from Project items to the corresponding target
outputs in MSBuild task.

Fix the corresponding test also.
2011-01-14 04:10:46 +05:30
Ankit Jain ca46b25e6a [xbuild] Ensure trailing slash on some properties.
Ensure trailing slash on $(BaseIntermediateOutputPath) and
$(IntermediateOutputPath).
2011-01-14 04:10:37 +05:30
Ankit Jain 6140b9ca09 [xbuild] ConsoleLogger - Correctly indent multi-line messages.
Split and correctly indent multi-line messages in ConsoleLogger.
2011-01-14 04:10:29 +05:30
Geoff Norton 5ed112e660 Fix the win32 build 2011-01-13 12:38:44 -07:00
Geoff Norton 318ddb4924 Fix win32 build 2011-01-13 12:38:34 -07:00
Andrew Jorgensen b073713bfa Add vcxproj files for msbuild 2011-01-13 12:37:39 -07:00
Marek Habersack 4085f52f2c [data-annotations] Added some missing 4.0 members 2011-01-13 20:23:36 +01:00
Marek Habersack 71d78c2ceb [asp.net] Implemented the 4.0 type, FileLevelMasterPageControlBuilder 2011-01-13 20:23:26 +01:00
Zoltan Varga 7d25fb2f5e Add null check to stelem_ref_check () jit icall. Fixes #664297. 2011-01-13 18:42:52 +01:00
Jérémie Laval 6418ad41d2 Make use of the wait changes in the internal TaskScheduler -> IScheduler proxy. 2011-01-13 17:19:13 +00:00
Jérémie Laval 6a8c4a6220 Rework internal wait mechanism in thread workers participation code 2011-01-13 17:18:58 +00:00
Andrew Jorgensen 97d18f0c32 2.10 2011-01-13 09:50:27 -07:00
Jb Evain 92b8771128 Remove custom ResolutionException now that Cecil is providing one 2011-01-13 16:09:42 +01:00
Jb Evain 4689cde2f6 Update cecil from upstream 2011-01-13 16:09:17 +01:00
Jérémie Laval 7132ff6bc1 Fix continuation not being scheduled because of too early and too greedy disposing. 2011-01-13 14:40:02 +00:00
Rodrigo Kumpera e159ffb746 Fix 2.0 remapping of System.Transations to 2.0 and not 3.5. 2011-01-13 11:40:42 +01:00
Rodrigo Kumpera 882fad8a8e Fix array assignability to one of its generic interfaces.
* verify.c: mono_class_is_assignable_from can't handle
	IList<GTD<T>> x GTD[] since GTD[] won't have the right
	iface slots set. This isn't a problem for the runtime
	since GTD[] will never happen as it's an unrealizable type.

	Fixes #663815
2011-01-12 18:32:48 +01:00
Rodrigo Kumpera 6c6008506f Handle more cases of gtd encoded as ginst over itself.
* verify.c (mono_type_is_valid_type_in_context_full):
	The trick of encoding the GTD as an instantiation over its
	own arguments is also valid for component types such as GTD[]
	GTD[,] and Foo<GTD>.
2011-01-12 18:32:35 +01:00
Atsushi Eno 403346372f Fix cygwin build. 2011-01-12 20:05:08 +09:00
Marek Safar 4ae2b5037d Update copyright years 2011-01-12 09:28:03 +00:00
Marek Safar a67eb7f224 Use base type parameters to extract params modifier of virtual method 2011-01-12 09:27:39 +00:00
Marek Safar d9619cbfa9 Install new ikvm based C# compiler as mcs 2011-01-12 09:26:46 +00:00
Marek Safar c098d0d842 [662222] Import dynamic attribute using attribute type reader 2011-01-12 09:26:20 +00:00
Christian Hergert b2823262ba Fix broken g_int_hash/g_int_equal semantics
Both g_int_hash and g_int_equal used the semantics that an
integer is stored directly in the pointer. This is incorrect
as the pointer actually points to a location containing an
integer.

For those wanting the previous (incorrect) implementation,
they should look at g_direct_hash and g_direct_equal.
2011-01-11 19:46:05 -05:00
Marek Habersack 42d8b111ec [asp.net] Fix for bug #662918. Do not create the HtmlTitle child control for HtmlHead if <title> wasn't used in the page code. 2011-01-11 23:23:58 +01:00
Zoltan Varga cfa37dc27d Disable system AOT when using the loaded llvm, as it seems to cause crashes on the x86 buildbot. 2011-01-11 20:56:15 +01:00
Zoltan Varga 2be48ab1fa Dump the AOT log upon a failure. 2011-01-11 20:44:22 +01:00
Geoff Norton cd6a73c07f Fix AOT on OSX/x86 2011-01-11 10:34:03 -05:00
Geoff Norton 4264916df5 Fixed loadedllvm on OSX
The default build of libmono-llvm.dylib includes libmono and all its dependencies,
but our statically compiled mono binary does as well.  OSX can actually load both
into its process space, and get confused as to which symbol it should call, leading
to non-deterministic crashes.  We'll remove all the mono dependencies, and use
-undefined suppress to mitigate this on OSX.
2011-01-11 00:55:52 -05:00
Jonathan Pryor 32b1aa404a [monodoc/osx] Look for docs in additional directories.
Fixes #663182.

OSX allows multiple framework versions to be installed side-by-side,
and the current version is available through
/Library/Frameworks/Mono.framework/Versions/Current.

However, documentation installed into /L/F/M.f/V/C/lib/monodoc/sources
is specific for that Mono version; upgrade Mono.framework, and the
documentation is "lost," not visible to the newly installed version.

To fix this, we're creating an *unversioned* directory to contain
documentation, which will thus be persistent across Mono.framework
upgrades: /Library/Frameworks/Mono.framework/External/monodoc

This will allow Mono.framework to be upgraded without "losing" the
documentation visible within monodoc.
2011-01-10 21:09:26 -05:00
Zoltan Varga 1302702ad5 Fix a regression introduced by db4299a1. 2011-01-11 01:12:47 +01:00
Ankit Jain 3fb44e93e2 [xbuild] Update man page, new search paths for extensions and .pc files. 2011-01-11 05:19:12 +05:30
Rodrigo Kumpera 666d378293 Move coree functionality under a specific define.
* assembly.c:
	* domain.c:
	* image.c:
	* coree.c: Coree funcionality is now under the
	ENABLE_COREE define that is not set by default. The
	current code breaks the verification infrastructure.
2011-01-10 23:24:52 +01:00
Marek Safar e6d990d8fa Fix IKVM float encoding on big-endian 2011-01-10 22:17:11 +00:00
Ankit Jain eac08ba026 [xbuild] Fix bug #663180, second part.
Fix the way RunningOnMac is detected (use `uname`=="Darwin"), thanks
to Michael Hutchinson.
And use "/Library/Frameworks/Mono.framework/External/pkgconfig" as a
search path for pkg-config files on MacOSX.

	* Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Import.cs:
	Change the order of paths.
	* Microsoft.Build.Engine/Microsoft.Build.Engine.dll.sources:
	Use MS.Build.Tasks/Utilities.cs, for using RunningOnMac .
	* Microsoft.Build.Tasks/Microsoft.Build.Tasks/PcFileCache.cs:
	Look in "/Library/Frameworks/Mono.framework/External/pkgconfig"
	for .pc files, on Mac.
	* Microsoft.Build.Tasks/Microsoft.Build.Tasks/Utilities.cs
	(RunningOnMac): New.
2011-01-11 03:44:14 +05:30
Marek Habersack 4421a52c48 Fix for bug #659064. Resource URLs must always be the same. UpdatePanel triggers must always be initialized.
String hash cache must not be thread-local. Hashes computed for a string once must be shared by
all the threads or different URLs may be generated for the same assembly+resource pair.
UpdatePanel triggers must be initialized not only during the Load event but also when they are
inserted after that point.
2011-01-10 22:19:12 +01:00
Zoltan Varga 8cf300a21b Force a build. 2011-01-10 21:39:17 +01:00
Zoltan Varga d40b79b2b0 Implement all SIMD intrinsics in LLVM used by basic-simd.exe. 2011-01-10 20:27:51 +01:00
Marek Safar c1a042dff6 Fixed another missing protected internal modifier 2011-01-10 17:27:00 +00:00
Zoltan Varga 7a34addfd0 Fix the loadable llvm build. 2011-01-10 17:49:32 +01:00
Martin Baulig 1c92979d55 Fix short trampoline branch. 2011-01-10 17:24:59 +01:00
Zoltan Varga 4d17d8d8e2 Add another bunch of SIMD intrinsics to the LLVM backend. 2011-01-10 16:45:36 +01:00
Ankit Jain 97e2778d37 [xbuild] Fix bug #663159 .
Emit location information in error messages for condition parsing
errors.

	* Microsoft.Build.BuildEngine/Token.cs: Add position information.
	* Microsoft.Build.BuildEngine/ConditionParser.cs: Track api changes.
	Improve error messages.
	(ExpectToken): Rename to ..
	(IsAtToken): .. this, to better reflect its behavior.
	* Microsoft.Build.BuildEngine/ConditionTokenizer.cs: Track api
	changes and improve error messages.
	* Microsoft.Build.BuildEngine/ConditionFactorExpresion.cs: Track api
	changes
2011-01-10 20:24:09 +05:30
Ankit Jain f64bfd6929 [xbuild] Sync *PcFileCache.cs changes from monodevelop. 2011-01-10 20:24:09 +05:30
Marek Safar ddee741f56 Fixed more protected internal modifiers 2011-01-10 14:38:48 +00:00
Marek Safar e7ce660267 Report correct base modifier for inaccessible protected internal members 2011-01-10 14:38:48 +00:00
Rodrigo Kumpera 7b610f0a26 Couple with missing methods in MonoClass::methods.
* class.c (mono_class_get_virtual_methods): Handle missing
	methods in the methods array.

	Fixes #572223

	Patch by Sebastien Pouliot <[email protected]>
2011-01-10 15:36:05 +01:00
Rodrigo Kumpera 0b7cc0f0ab Fix a deadlock on the interrupt guard machinery.
* mini-exceptions.c (mono_walk_stack): Change the do_il_offset
	parameter into unwind_options which is an enum that allows
	multiple options to be passed.

	* mini-exceptions.c (mono_jit_walk_stack_from_ctx): Ditto.

	* mini.h: Introduce MonoUnwindOptions which allow stack
	unwinding callers to specify that they don't want precise
	method lookup (IOW, no need to deal with  gsharing) which
	allow those functions to be signal safe.

	* mini-exceptions.c (mono_install_handler_block_guard): Ask
	mono_walk_stack to perform signal safe unwinding.

	Fixes #662741
2011-01-10 14:37:54 +01:00
Zoltan Varga 556e665840 Mark mono_print_method_from_ip () with __attribute__((used)) to prevent the linker from optimizing it away in embedding setups. 2011-01-10 14:09:23 +01:00
Rodrigo Kumpera d6c47b1a62 Implement mono.simd new conversion ops on amd64 2011-01-10 10:55:19 +00:00
Marek Habersack df3af8d7ec [asp.net,mcs] Fixed 'protected internal' build errors and removed System.Web-specific hack from mcs 2011-01-10 11:16:44 +01:00
Rodrigo Kumpera a2ee24ee50 Implement a few conversion operations.
Add conversion operations between 4f, 2d and 4i.
	Implemented only on x86 for now.
2011-01-10 10:42:00 +01:00
Rodrigo Kumpera 7d3a6b23ce Fix 64bits Shuffle/3 when simd intrinsics are disabled 2011-01-10 10:42:00 +01:00
Marek Safar d82dda826c Fixed more missing protected internal modifiers 2011-01-10 08:45:01 +00:00
Ankit Jain 70ecdaea7e [xbuild] Fix bug #663180 .
Add "/Library/Frameworks/Mono.framework/External/xbuild" to
MSBuildExtensionsPath on MacOSX.

From the bug report:
The purpose of this directory is to provide a place for third-party
installers to place extensions where they will not be removed by Mono
upgrades. MonoDevelop patches this into the xbuild MSBuildExtensionsPath
for builds within MD but it would be useful to have it work outside of MD.
2011-01-10 02:48:13 +05:30
Jérémie Laval ed19acd65f [System.Web] Add web fonts mimetypes to let browser do caching on client-side 2011-01-09 19:27:27 +00:00
Sebastien Pouliot fd7b7a2b89 Add NIE stubs for new 4.0 methods to ease running IronPython test suite
* SecurityManager.cs: Add new stubs for 4.0 methods. Add [Obsolete]
attributes on most methods (new in 4.0)
2011-01-09 10:57:45 -05:00
barkerm fec01b5d11 Ignore files ending in '~' 2011-01-08 23:13:06 -05:00
barkerm b899701aca Fix for running against RabbitMQ 2.2 2011-01-08 23:12:40 -05:00
Miguel de Icaza 6fd6faecec [eglib] Another bug fix for g_shell_parse
We do not create a new string after a quotation, unless the next
character after a closing quote is a space.   This allows parsing
the string:
	"foo","bar"

As:
	foo,bar

This fixes #655896

1# Explicit paths specified without -i nor -o; assuming --only paths...
2011-01-08 23:10:27 -05:00
Miguel de Icaza 53be988d65 [eglib] Add more tests for the g_shell_parse 2011-01-08 23:10:27 -05:00
Zoltan Varga 9bea20ddfe Pass -relocation-model=static to llc in static mode. 2011-01-08 21:44:54 +01:00
Geoff Norton 7ce78ae3c1 Add CPSR to Apple arm ucontext macros as well 2011-01-08 15:13:34 -05:00
Marek Safar db5af0e429 [663059] Add check for protected modifier in InternalsVisibleTo assembly 2011-01-08 19:26:53 +00:00
Marek Safar aeb5ba7f5a Test update 2011-01-08 19:26:53 +00:00
Marek Safar c8c8fc7769 Fixed missing protected internal modifier 2011-01-08 19:26:53 +00:00
Marek Safar 526e61c3f0 Update System.ServiceModel.Discovery version info 2011-01-08 19:26:52 +00:00
Marek Safar 108fbf32c3 Allow trailing comma for resource argument 2011-01-08 19:26:52 +00:00
Zoltan Varga 0bb51ab602 Apply .no_dead_strip to all symbols. Unify __APPLE__/__MACH__ defines. 2011-01-08 20:22:41 +01:00
Zoltan Varga 0c3ba8cc5f Emit .no_dead_strip directives for all LLVM methods on OSX. 2011-01-08 18:13:52 +01:00
Zoltan Varga 886ab6007f Emit .no_dead_strip directives for all LLVM methods on OSX. 2011-01-08 18:11:30 +01:00
Zoltan Varga 79782da93c Avoid an assert if System.Diagnostics.DebuggableAttribute is linked away. 2011-01-08 17:16:29 +01:00
Zoltan Varga 475888ee63 Fix the arm dyncall code after the this passing changes. 2011-01-08 14:12:33 +01:00
Zoltan Varga 577517c3bc Disallow loading of non-llvm compiled aot modules into llvm runtimes on arm. 2011-01-08 14:12:15 +01:00
Zoltan Varga d89c5f6c2c Tidy up AOT trace messages a bit more. 2011-01-08 12:51:29 +01:00
Zoltan Varga f6b25e5a66 Generate an icall wrapper for CompareExchange<object> into the mscorlib image. 2011-01-08 12:49:02 +01:00
Zoltan Varga bf074880da Make an AOT trace message shorter. 2011-01-08 12:37:16 +01:00
Zoltan Varga 06bb9cebb1 Fix the previous fix. 2011-01-08 04:40:40 +01:00
Zoltan Varga 29b2379762 Fix the apple aot problem. 2011-01-08 04:33:53 +01:00
Zoltan Varga 5b39881f00 Include the assembly name in AOT symbol names in static mode to avoid duplicate symbol errors. 2011-01-08 04:23:30 +01:00
Zoltan Varga aebcc775e7 Change how double/long alignment is saved in the AOT image on arm to support cross-compilation. 2011-01-08 04:06:53 +01:00
Zoltan Varga c6c47bf337 Various changes to make thumb work under osx. 2011-01-08 04:04:16 +01:00
Zoltan Varga f463e1669e Emit thumb unbox trampolines for thumb functions. 2011-01-08 03:38:55 +01:00
Zoltan Varga 24c8fac0ba Use 'globals' instead of '.Lglobals' to name an aot symbol. 2011-01-08 02:21:07 +01:00
Zoltan Varga 7107df48c8 Add 'no-write-symbols' aot option. 2011-01-07 21:05:20 +01:00
Zoltan Varga 2794dbdce4 Add an 'llvm-path' aot option. 2011-01-07 21:03:32 +01:00
Zoltan Varga 068f65893d Avoid 0b notation, older gcc's can't handle it. 2011-01-07 20:48:45 +01:00
Thomas Goldstein 22c53124ae Merge branch 'master' of github.com:mono/mono 2011-01-07 20:27:12 +01:00
Thomas Goldstein 10441bad4c Add new NumericUpDown tests. 2011-01-07 20:18:12 +01:00
Thomas Goldstein 3019106f0a Add unit test for bug 661750. 2011-01-07 20:15:26 +01:00
Zoltan Varga 0c524e988d Use emit_zero_bytes () instead of .skip directive. 2011-01-07 20:06:18 +01:00
Thomas Goldstein 7296434d2b Remove NumericUpDownTest.cs from the -crlf list (file line-ending encoding converted by mistake) 2011-01-07 19:48:47 +01:00
Rodrigo Kumpera 87abb9a1a5 Remove debug spew 2011-01-07 18:23:36 +01:00
Jonathan Pobst 67c6168c75 Add __default_codegen__ to *all* msvc profiles. 2011-01-07 11:20:34 -06:00
Jonathan Pryor 825512bff9 [monodroid] Look for zlib support functions from __Internal.
Partial fix for #660928; the rest of the fix will require embedding
the zlib functions within libmonodroid.so.
2011-01-07 11:59:44 -05:00
Jonathan Pobst 63ad747700 Add __default_codegen__ define to fix the msvc build. 2011-01-07 10:46:34 -06:00
Zoltan Varga 181922c94f Make 'mono_aot_assembly_name' a local symbol as well. 2011-01-07 17:41:31 +01:00
Zoltan Varga 976bc4da85 Fix the DISABLE_JIT build. 2011-01-07 17:38:01 +01:00
Marek Safar 2b11233fd8 Ignore more files 2011-01-07 16:20:40 +00:00
Marek Safar e854848231 Tests update 2011-01-07 16:20:40 +00:00
Zoltan Varga 795ab85d8a Reorganize the static AOT support a bit more: the 'mono_aot_.._info' symbol will now point the MonoAotFileInfo structure itself, not to a table of globals. 2011-01-07 16:17:13 +01:00
Rodrigo Kumpera 13c8ad0f1a Properly search overwrites for custom attributes.
* MonoCustomAttr.cs (GetBase): For the purpoise of
	searching for custom attributes we need to use the
	immediate overwritee and not the base definition.

	Fixes #662867 and possibly more.
2011-01-07 16:13:36 +01:00
Zoltan Varga 2856a08e71 Add sanity check to AOT for long/double alignment. 2011-01-07 15:05:07 +01:00
Jérémie Laval 011503ddaf Remove now unused internal classes 2011-01-07 13:50:32 +00:00
Zoltan Varga fd3c66a2e0 Disallow the 'soft-debug' aot option when compiling using LLVM. 2011-01-07 14:37:21 +01:00
Zoltan Varga de2ff8ad17 Use symbolic constants and sizeof(mgreg_t) instead of 4/sizeof(gpointer)/sizeof(gulong) in the arm backend. 2011-01-07 13:38:12 +01:00
Jérémie Laval 4dfafb9da5 Add bigger unit test for Intersect and Union 2011-01-07 11:18:23 +00:00
Jérémie Laval 6471d38ea2 Directly use ConcurrentDictionary with PLinq set operations 2011-01-07 11:18:23 +00:00
Marek Safar 71318ceb31 Better anonymous methods require same parameter types 2011-01-07 09:58:14 +00:00
Rodrigo Kumpera 997a9efb97 AMD64 version of the new mono.simd ops 2011-01-07 00:19:03 +00:00
Rodrigo Kumpera a0ec721f84 remove stupid debug spew 2011-01-06 22:03:42 +01:00
Gonzalo Paniagua Javier cf7b685e40 Revert 2011-01-06 16:02:43 -05:00
Gonzalo Paniagua Javier ae259d8393 [windows] Improve drive search
Windows allows "A", "A:", @"a:\"... as synonyms for the same drive.
	Patch by Vincent Povirk that fixes bug #660911.
2011-01-06 15:54:48 -05:00
Rodrigo Kumpera f677e5ad57 Implement Shuffle for 64bits types.
* x86-codegen.h: Add macro and define to emit pshufpd.

	* mini-ops.h: Add OP_SHUPD.

	* cpu-x86.md:
	* mini-x86.h: Implement x86 support.

	* simd-intrinsics.c: Handle shuffle on 64bit types.

	* VectorOperations.cs: Add new methods.
2011-01-06 21:52:12 +01:00
Rodrigo Kumpera 46fc923e6a Implement Shuffle/3 2011-01-06 21:52:11 +01:00
Rodrigo Kumpera 4896cf0447 Implement runtime support (x86 only) for 3 args Shuffle.
* cpu-x86.md: Add shufps.

	* mini-ops.h: Add OP_SHUFPS.

	* mini-x86.c (mono_arch_output_basic_block): Emit
	OP_SHUFPS.

	* simd-intrinsics.c (simd_intrinsic_emit_shuffle): Handle
	3 args variant.
2011-01-06 21:52:11 +01:00
Rodrigo Kumpera d80ff97931 Add SHUFPS and macro to emit it. 2011-01-06 21:52:10 +01:00
Rodrigo Kumpera c8867682ed Add test for call clobbering of XMM regs 2011-01-06 21:52:10 +01:00
Rodrigo Kumpera 9b8c19352d Properly free xmm hregs.
* mini-codegen.c (free_up_hreg): Use the bank argument instead of
	a hardcoded one.
2011-01-06 21:52:10 +01:00
Gonzalo Paniagua Javier 7c8a36f5ca [Windows] Implement GetDrives.
Drive names are ok, but the type is always 'Fixed'.
	Fixes bug #660907.
2011-01-06 15:44:28 -05:00
Thomas Goldstein 0753e79bf8 Replace decimal to hex string conversion code with a much more simple alternative (suggested by Oliver Thimm). Fixes bug 661750. 2011-01-06 21:24:55 +01:00
Thomas Goldstein 056a0023db Remove #if NET_2_0. 2011-01-06 21:07:02 +01:00
Zoltan Varga d6b1f611b5 Re-enable and fix the nacl changes. 2011-01-06 20:29:02 +01:00
Zoltan Varga b9f5ff1fe0 Put back a macro definition accidently removed by the nacl changes. 2011-01-06 19:36:27 +01:00
Jérémie Laval 093ed98316 Fix .NET 4 API 2011-01-06 16:08:31 +00:00
Jérémie Laval 4ce910052b Add missing Debugger and ReliabilityContract attributes to .NET 4 types 2011-01-06 16:07:48 +00:00
Jérémie Laval 907cba59ec Avoid random failure in CountdownEvent unit test 2011-01-06 15:17:24 +00:00
Rodrigo Kumpera abb1dbc5e6 Fail nice if the current profiler doesn't support ICustomMarshaler.
* marshal.c (emit_marshal_custom): If the lookup for ICustomMarshaler
	fails, emit code to raise an exception instead of asserting.

	Fixes #560334
2011-01-06 15:52:45 +01:00
Jérémie Laval 4b446ed05a Use while loop instead of if for removing as much stalled tickets as possible 2011-01-06 14:43:12 +00:00
Jérémie Laval b712c20362 Fix comments 2011-01-06 14:42:26 +00:00
Jérémie Laval 10f99bac05 Protect SpinLock's Enter method against asynchronous exception 2011-01-06 14:37:49 +00:00
Rodrigo Kumpera c3ff5bf8e9 Check if the method signature has type parameters when it shouldn't.
* verify.c (mono_method_verify): If neither the method or
	its class is generic a signature can't have type parametets.

	Fixes #662238
2011-01-06 15:29:54 +01:00
Zoltan Varga b99bbf419f Change some usages of ArrayList to List<T> to avoid calls to the slow ArrayList.ToArray(Type) method. 2011-01-06 13:17:01 +01:00
Zoltan Varga 836840b008 Fix x86 build. 2011-01-06 13:11:56 +01:00
Zoltan Varga 9899a5f249 Change some usages of ArrayList to List<T> to avoid calls to the slow ArrayList.ToArray(Type) method. 2011-01-06 13:11:56 +01:00
Jérémie Laval 65b8ba493d Add unit test for nested Parallel.For execution 2011-01-06 11:57:38 +00:00
Jérémie Laval 76b4f31bd7 Explicitely attach loop underlying tasks to their eventual parent 2011-01-06 11:42:55 +00:00
Jérémie Laval 9ccdd58415 Use wider acceptance criteria to cope with nested child Task waiting and external task waiting 2011-01-06 11:42:55 +00:00
Zoltan Varga 0287445999 Revert a nacl change which is causing crashes. 2011-01-06 12:42:09 +01:00
Zoltan Varga a3631fb7b8 Fix warnings introduced by the NACL merge. 2011-01-06 11:49:32 +01:00
Zoltan Varga e4d9a7a2e9 Merge remote branch 'google-nacl/master' 2011-01-06 11:33:54 +01:00
Marek Habersack ec3fd3ea70 [xml] Out of range errors should be swallowed when doing string -> datetime conversion 2011-01-06 10:37:49 +01:00
Marek Safar 94f1209fff Tests update 2011-01-06 09:21:07 +00:00
Marek Safar 6f7e5c5a9c More global state hacking 2011-01-06 09:21:06 +00:00
Thomas Goldstein 4d5451a61c Remove #if NET_2_0 flags. 2011-01-05 23:13:33 -08:00
Geoff Norton 05f6fc799e Bump winconfig version 2011-01-05 21:31:23 -05:00
Zoltan Varga 88d676ffd4 Fix an uninitialized memory error in the aot compiler. 2011-01-06 01:56:56 +01:00
Elijah Taylor 5b558abeeb Merge remote branch 'upstream/master' 2011-01-05 16:02:57 -08:00
Gonzalo Paniagua Javier 45890e8b46 [sockets] Fixed reading blocking flag
Calling ioctlsocket() would set the flag...
	Thanks to Thad Thompson for finding this.
2011-01-05 13:36:16 -05:00
Mark Probst f9fb2cff03 [sgen] Always use the GC descriptor instead of MonoClass.has_references.
has_references can be set even though the class has no references
registered by the GC.  One case is Ephemeron.  Now we always go by the
GC descriptor which holds the information relevant to SGen.

This fixes a crash in the 4.0 corlib testsuite.
2011-01-05 18:16:17 +01:00
Jérémie Laval 70485027b5 Ensure task wait chain isn't executed out of order in scheduler 2011-01-05 15:53:18 +00:00
Marek Safar 744039ce74 [662440] Don't expand nested type builders of non-generic types 2011-01-05 15:45:53 +00:00
Rodrigo Kumpera f63ceee13b Handle the case when the parent fails to inflate.
* class.c (mono_generic_class_get_class): Use the checked
	version of mono_class_inflate_generic_class to avoid
	aborting on error.

	Fixes #560327
2011-01-05 16:44:41 +01:00
Zoltan Varga 7853d84434 Add missing files to dist. 2011-01-05 16:13:34 +01:00
Mark Probst 6bc00aabc1 Don't assert in mono_get_lmf() if there is no LMF.
This function is called from mini-gc.c when a collection is triggered,
which can happen before any managed call is executed by the thread.
At least the allocation of the thread object happens in unmanaged code.
2011-01-05 15:40:38 +01:00
Marek Safar a4a5e6f338 Fixed WinFormsTest System.Drawing namespace reference 2011-01-05 13:33:15 +00:00
Elijah Taylor 1c4ffb7584 Replace SIZEOF_REGISTER with sizeof(mgreg_t) for consistency with sizeof(gpointer) 2011-01-04 16:25:42 -08:00
Elijah Taylor e0075e6461 more ilp32 defines 2011-01-04 15:44:00 -08:00
Elijah Taylor 5300f18603 change first batch of __native_client_codegen__ && TARGET_AMD64 to __mono_ilp32__ where appropriate 2011-01-04 14:38:57 -08:00
Elijah Taylor 4141e0007f fix IMT_REG assignments that got switched for non-nacl builds, provide no-op versions of nacl routines to avoid #ifdef's all over 2011-01-04 13:12:00 -08:00
Rodrigo Kumpera 0ced0b3f67 Fix win32 build 2011-01-05 02:23:55 +08:00
Marek Safar 99c26525e4 Add mcs solution file 2011-01-05 12:37:25 +00:00
Rodrigo Kumpera 4f590cb41a Fix operator != handling of LHS null 2011-01-05 00:15:18 +08:00
Rodrigo Kumpera 6fbb313683 Fix test suite as boehm doesn't support ephemerons 2011-01-05 00:15:18 +08:00
Marek Habersack 92df0458c0 [runtime] Include the al script in temporary installation directory
This is needed as the 4.0 profile calls 'al' (which is defaults to 4.0) and not
'al2' and if Mono older than 2.8 is installed on the machine, 'al' coming from it
will fail to work with the current Mono and thus some tests will fail.

The commit should fix the 300+ failing tests on the build bots.
2011-01-05 12:06:30 +01:00
Marek Habersack 1b67522d98 [asp.net] Disabled a racy test 2011-01-05 12:06:30 +01:00
Marek Safar b64ce512d0 Unify naming convention for all 2.0 files 2011-01-05 10:36:07 +00:00
Marek Safar 3b042a2c6c Fix invalid test constraint 2011-01-05 10:36:06 +00:00
Marek Safar da59d7e8ed Add missing Accessibility reference 2011-01-05 10:36:06 +00:00
Marek Safar ee09a3a9e5 Build mcs before docs 2011-01-05 10:36:05 +00:00
Marek Habersack 028b4edbc0 [asp.net] Rewrote CacheItemPriorityQueue tests generator to produce simpler test case.
The new test case uses arrays and postpones creation of CacheItemPriorityQueueTestItem and TestCacheItem
instances till the actual test is ran. This reduces complexity of the CacheItemPrioritQueueTest class
constructor and allows the code to run successfully on 32 bit machines.
2011-01-05 10:30:08 +01:00
Atsushi Eno 8fd76fb60d Fix ToDateTime() with serialization mode to not mess hour based on timezone.
Fixed bug #661787.
2011-01-05 17:00:58 +09:00
Marek Safar f9033582b7 Set build-in types modifiers 2011-01-05 07:33:27 +00:00
Marek Safar e6ec440228 New test 2011-01-05 07:33:27 +00:00
Atsushi Eno d466b52029 AssemblyPath support, patch by Michel Faucault. 2011-01-05 16:17:20 +09:00
Ankit Jain 84c1749c0c [xbuild] Fix failing test in msbuild.tasks . 2011-01-05 06:14:20 +05:30
Ankit Jain fb535c288e [xbuild] Fix bug #662355.
Support reference aliases in Csc task.
2011-01-05 06:09:48 +05:30
Rodrigo Kumpera 5cc54ad830 Make test messages more usefull 2011-01-04 11:13:35 +08:00
Rodrigo Kumpera 3b0cc12bb6 Fix guard interrupt protection.
* mini.h: Introduce a new MonoContext variable to be used
	by the interrupt protection code.

	* mini-exceptions.c: Use new field.

	* mini-trampolines.c: Ditto.

	This fixes finally_guard.exe on OSX.
2011-01-04 11:13:34 +08:00
Rodrigo Kumpera 3a53bd834e Fix alignment of the block guard trampoline.
* tramp-x86.c (mono_arch_create_handler_block_trampoline): Make
	sure we call the target with a properly aligned frame.
2011-01-04 11:13:34 +08:00
Zoltan Varga a41700e69e Eliminate the first PLT entry, it is no longer used. 2011-01-04 22:07:39 +01:00
Zoltan Varga c5be9038a5 Emit separate thumb2 plt entries called by LLVM code. 2011-01-04 22:04:37 +01:00
Sebastien Pouliot 74314129d2 [moon] String.Join needs 'params' on MOONLIGHT profile too
* String.cs: Silverlight 4 use the same API as FX4 for Join
2011-01-04 15:38:06 -05:00
Zoltan Varga f58d8447e4 Avoid thumb->arm trampolines when calling between llvm methods. 2011-01-04 20:01:13 +01:00
vvaradhan 6a8077e7c5 Fixes #635335 - map System.Transactions to 4.0 framework assemblies. 2011-01-04 23:49:15 +05:30
Marek Safar f0564d5543 Type correctly implicit as expression 2011-01-04 17:58:22 +00:00
Jérémie Laval 1e9443a9b6 Use correct exception when a key is not found in ConcurrentDictionary 2011-01-04 17:37:49 +00:00
Jérémie Laval 2ac2887700 Use proper pattern for executing synchronous Task 2011-01-04 16:53:03 +00:00
Zoltan Varga a457e88362 Remove glib dependencies from the embed samples. Fixes #660117. 2011-01-04 16:38:33 +01:00
Zoltan Varga 2d3d933497 Add AssemblyLoadEventRequest () type to the sdb api, and use it to fix the test suite. 2011-01-04 15:30:36 +01:00
Rodrigo Kumpera 68bbe747df Fixes the Monitor.Enter race on x86.
* mini-x86.h: Define MONO_ARCH_MONITOR_ENTER_ADJUSTMENT to
	cover the whole stack adjustment add that comes after call.

	* mini.c (create_jit_info): Use an ARCH define for how
	big the try block adjustment needs to be as x86 is more
	spacy than amd64.
2011-01-04 02:47:55 +08:00
Marek Habersack ef87ecaf87 [system] Unbreak a 4.0 System.ServiceModel test.
This type is instantiated by one of the tests for the System.ServiceModel.Channels.HttpTransportBindingElement type.
2011-01-04 14:29:18 +01:00
Marek Safar 0cfd931542 Cleanup isinst expression resolver 2011-01-04 13:06:59 +00:00
Marek Safar 4277590f54 Use reduced expression for transparent is check 2011-01-04 13:06:58 +00:00
Marek Habersack 6005f0a7df [wcf] UriTemplate must trim the first leading slash in the rendered template.
When using BindBy{Name,Position} UriTemplate must remove the the first slash from
the rendered URI. This fixes the 4 failing tests.
2011-01-04 13:56:12 +01:00
Marek Habersack 950369e856 [asp.net] The test must always run with the en-US locale 2011-01-04 13:13:01 +01:00
Marek Safar 6c59d190bb Use one routine for type argument scan for type parameter 2011-01-04 11:30:40 +00:00
Jérémie Laval 8f1768e2de Update ThreadLocal to use default(T) for initialization with parameterless ctor following comment on https://connect.microsoft.com/VisualStudio/feedback/details/630350/threadlocal-documentation-and-actual-behavior-mismatch 2011-01-04 11:14:25 +00:00
Marek Habersack 23691dacd6 [system.runtime.caching] Do not test the invalid behavior 2011-01-04 10:22:22 +01:00
Marek Habersack 3939f4ddf6 [asp.net] Failing tests fixes. 2011-01-04 10:03:11 +01:00
Zoltan Varga 0f64ab01a6 Fix ia64 build. 2011-01-04 09:37:10 +01:00
Marek Habersack 39fac8ab1c [asp.net] Added code to handle local resources copying in the test suite 2011-01-04 08:22:21 +01:00
Marek Habersack ed34e652c7 [asp.net] Don't attempt to use System.Web resources in System.Web.Extensions test build
WebTest is now a partial class and every code outside System.Web that uses it can copy its own
resources in addition to the common ones by implementing the CopyResourcesLocal partial method.
2011-01-04 08:21:20 +01:00
Luke Halliwell c135c68bf6 Fix for bug 349053 - unable to serialize SortedDictionary 2011-01-03 21:43:27 -05:00
Gonzalo Paniagua Javier 91a69045c9 Socket is not connected after error 2011-01-03 21:09:29 -05:00
Gonzalo Paniagua Javier 4043ebef2c Add a case-insensitive hashtable
Use a hashtable instead of a loop when 'ignoreCase' is set.
	Based on a patch by Curtis Wensley.
2011-01-03 17:20:21 -05:00
Zoltan Varga 9452f17016 Implement VBByRefStr marshalling. Fixes #661917. 2011-01-03 22:24:15 +01:00
Rodrigo Kumpera c7ee414015 Get rid of mymono_metadata_type_(equal|hash).
* reflection.c: The copy versions of type/hash functions
	is no longer needed. Just get rid of them which brings
	some niceties such such as support for FNPTR.
2011-01-03 10:10:26 +08:00
Zoltan Varga c432e6f917 Fix a warning. 2011-01-03 21:32:46 +01:00
Zoltan Varga a326c54730 Add more comments for the fields of MonoAotFileInfo. 2011-01-03 19:26:05 +01:00
Zoltan Varga d526cdf821 Don't make the 'thumb_end' symbol global. 2011-01-03 19:10:40 +01:00
Zoltan Varga 3b3f1c9674 Reorganize the AOT file format once more, get rid of most globals, store them as pointers inside MonoAotFileInfo instead. 2011-01-03 18:55:52 +01:00
Rodrigo Kumpera 44651e524b Ignore non-realizable reflection types.
* class.c (mono_class_implement_interface_slow): If the reflection
	type has not been realized, ignore it since can't affort
	to do it from here.

	Fixes #656262
2011-01-03 05:53:44 +08:00
Zoltan Varga b9c8b83774 Avoid mixing llvm aot code and non-llvm code on arm. Clean up the printing of AOT messages. 2011-01-03 17:14:37 +01:00
Zoltan Varga caea684258 Implement support for llvm+thumb2+aot on arm. 2011-01-03 16:47:17 +01:00
Zoltan Varga 2313946694 Add thumb2 support for ARM EH code. 2011-01-03 16:47:17 +01:00
Zoltan Varga c8761953ee Implement support for NULL pointers in the bin_writer_emit_pointer (). 2011-01-03 16:47:17 +01:00
Paolo Molaro 027f5b085c Allow the special ECMA key when parsing assembly names (bug#660570). 2011-01-03 16:01:09 +01:00
Zoltan Varga 489ec324d3 Avoid computing GC maps if precise stack marking is disabled. 2011-01-03 15:52:11 +01:00
Zoltan Varga 53c76f5069 Merge branch 'precise-gc-maps' 2011-01-03 15:45:14 +01:00
Zoltan Varga 63181a0a3f .gitignore 2011-01-03 15:42:44 +01:00
Zoltan Varga f97b92d9c8 Make conservative stack marking the default for now. 2011-01-03 15:42:44 +01:00
Zoltan Varga 8316b58261 Fix an assert which can be hit for types unloadable types. 2011-01-03 15:42:44 +01:00
Zoltan Varga 805d849534 Add 'save_locations' to mono_arch_find_jit_info () signature on all platforms. 2011-01-03 15:42:44 +01:00
Zoltan Varga f10a56c333 Fix a warning. 2011-01-03 15:42:44 +01:00
Zoltan Varga 65086bcaa8 Fix some merge problems. 2011-01-03 15:42:44 +01:00
Zoltan Varga 50a089e652 Don't set 'last' after emitting the OP_GC_SPILL_SLOT_LIVENESS_DEF () opcode. 2011-01-03 15:42:43 +01:00
Zoltan Varga 211234aaab Fix a merge problem. 2011-01-03 15:42:43 +01:00
Zoltan Varga 9609a25c23 Properly copy the contexts for FRAME_TYPE_MANAGED_TO_NATIVE. 2011-01-03 15:42:43 +01:00
Zoltan Varga 6f21673a21 Remove obsolete conservative-stack-mark MONO_GC_DEBUG option, it is superseded by a MONO_GC_PARAMS option. 2011-01-03 15:42:43 +01:00
Zoltan Varga faa029089c Fix some merge problems. 2011-01-03 15:42:42 +01:00
Zoltan Varga 108bc307e3 Implement AOT support. 2011-01-03 15:42:42 +01:00
Zoltan Varga e78b0b96bf Add stats for the number of pinned objects during all collections. Avoid scanning the frames above the start_wrapper () frame. Rework start_wrapper () to avoid references to the Thread object, so hopefully it won't get pinned. 2011-01-03 15:42:42 +01:00
Zoltan Varga 7c6f28015f Fix formatting. 2011-01-03 15:42:42 +01:00
Zoltan Varga 2ccc0288a7 Implement x86 support. 2011-01-03 15:42:42 +01:00
Zoltan Varga 7621facfef Remove unused DEBUG_GC_MAP macros. 2011-01-03 15:42:42 +01:00
Zoltan Varga 6b9a7d2771 Log to stdout by default, so it matches up with the output of the program. 2011-01-03 15:42:41 +01:00
Zoltan Varga 5b883fd5cf Share the log file between sgen and the stack marking code. 2011-01-03 15:42:40 +01:00
Zoltan Varga 443376d9cd Don't crash in one place if logging is turned on. Add some FIXMEs. 2011-01-03 15:42:40 +01:00
Zoltan Varga e9f5884277 Revert "Flush the actual file too in binary_protocol_flush_buffers ()."
This reverts commit 27bb69444433cd4eda1fccfcd45fcc619559a29d.
2011-01-03 15:42:40 +01:00
Zoltan Varga 255f33195f Flush the actual file too in binary_protocol_flush_buffers (). 2011-01-03 15:42:40 +01:00
Zoltan Varga 1b62e48689 Use sizeof (mgreg_t) in a few more places. 2011-01-03 15:42:39 +01:00
Zoltan Varga bc25b85939 Print frame info during the precise pass as well. 2011-01-03 15:42:39 +01:00
Zoltan Varga 2bed7c52da Add a MONO_GCMAP_DEBUG env variable. Redirect debug messages to a logfile. Fix tracking of registers through managed-to-native transitions. 2011-01-03 15:42:39 +01:00
Zoltan Varga 7dbca1a110 Allow an argument to collect-before-allocs to force sgen to do a minor collection every N allocations. Implement major_ptr_is_in_non_pinned_space (). 2011-01-03 15:42:39 +01:00
Zoltan Varga 5a627626f2 Allocate a few more vregs as REF/MP. 2011-01-03 15:42:39 +01:00
Zoltan Varga b751822baf Improve logging even more. Fix a crash which happened when tls->nframes was not initialized in a code path. 2011-01-03 15:42:39 +01:00
Zoltan Varga 2dea3e89fe Improve logging, really set vtype slots without liveness info to PIN. 2011-01-03 15:42:38 +01:00
Zoltan Varga 2fc876e3b4 Don't treat arguments in registers live for the whole method. 2011-01-03 15:42:38 +01:00
Zoltan Varga ceadbfc5cb Make gshared variables GC tracked. 2011-01-03 15:42:38 +01:00
Zoltan Varga 466ecc03a6 Add stats for the size of the scanned native stacks. 2011-01-03 15:42:38 +01:00
Zoltan Varga eb6a4cf66e Fix the computation of frame start so some areas are not scanned twice. 2011-01-03 15:42:38 +01:00
Zoltan Varga 5bff6dbd91 Log if the frame stack is full. 2011-01-03 15:42:38 +01:00
Zoltan Varga a25c00f445 Move the handling of finally clauses into a separate function. Treat the frame pointer as a precise reg. 2011-01-03 15:42:37 +01:00
Zoltan Varga b9254a1ae5 Make a log statement depend on cfg->verbose_level. 2011-01-03 15:42:37 +01:00
Zoltan Varga 2ffdeb28f9 Fix the handling of methods with finally clauses so it is correct and reasonable efficient: only callsites inside finally blocks are treated conservatively. 2011-01-03 15:42:37 +01:00
Zoltan Varga 0b217846fe Mark the dreg of OP_NEWARR as a ref. 2011-01-03 15:42:36 +01:00
Zoltan Varga e4aad9b3d3 Add an option to turn on CLEAR_AT_GC. 2011-01-03 15:42:36 +01:00
Zoltan Varga 49a3fcb431 Improve logging. Treat the result of an LDIND.REF as a ref. Treat methods with finally clauses very conservatively again. 2011-01-03 15:42:36 +01:00
Zoltan Varga 45fa8e6955 Rename a few fields. 2011-01-03 15:42:36 +01:00
Zoltan Varga 6aa1e6c83c Make GC maps for methods with finally clauses more precise. 2011-01-03 15:42:35 +01:00
Zoltan Varga b572f321c7 Optimize the frames with finally clauses a bit so at least the non-ref slots are scanned precisely. 2011-01-03 15:42:35 +01:00
Zoltan Varga 52f235d3df Don't assert in describe_ptr () for oldspace pointers. 2011-01-03 15:42:35 +01:00
Zoltan Varga f4f69ed08f Allow wrapper frames to be precisely tracked. 2011-01-03 15:42:35 +01:00
Zoltan Varga 3525050661 Fix regressions introduced by the last few changes. Mark THROW/RETHROW as call sites. 2011-01-03 15:42:35 +01:00
Zoltan Varga 42c7efebcc Treat the frame reg as precisely tracked. 2011-01-03 15:42:35 +01:00
Zoltan Varga a5195b7697 Encode regmasks compactly. 2011-01-03 15:42:35 +01:00
Zoltan Varga 543957a72c Registers are now NOREF by default outside their live range. 2011-01-03 15:42:34 +01:00
Zoltan Varga 229186d620 Remove a debug printf. 2011-01-03 15:42:34 +01:00
Zoltan Varga d3412dca27 Fix a warning. 2011-01-03 15:42:34 +01:00
Zoltan Varga 70f6c172f5 Disable heavy logging. 2011-01-03 15:42:34 +01:00
Zoltan Varga 67cf39e67f Fix logging and add more logging to the liveness pass. 2011-01-03 15:42:33 +01:00
Zoltan Varga bfed9a164e Create GC maps for methods with nono-finally clauses. 2011-01-03 15:42:33 +01:00
Zoltan Varga 1e85870e69 Add comments about reducing the size of the GC maps. 2011-01-03 15:42:33 +01:00
Zoltan Varga 4d662ad4a5 Fix some FIXMEs. 2011-01-03 15:42:32 +01:00
Zoltan Varga f27f39b221 Add a free callback to sgen, use it to free our TLS data. 2011-01-03 15:42:32 +01:00
Zoltan Varga a3e238ad7a Optimize the size of TlsData. 2011-01-03 15:42:32 +01:00
Zoltan Varga 75693ca9c1 Optimize GC map memory usage a bit more, add more memory usage stats. 2011-01-03 15:42:32 +01:00
Zoltan Varga 757e667d87 Update some comments. 2011-01-03 15:42:31 +01:00
Zoltan Varga 0211f6e5c8 Rename StackSlotType to GCSlotType. 2011-01-03 15:42:31 +01:00
Zoltan Varga ce547c6cb1 Add the conservative-stack-mark option to the MONO_GC_DEBUG help. 2011-01-03 15:42:31 +01:00
Zoltan Varga a85ad9923a Refactor mini_gc_create_gc_map () into smaller functions. 2011-01-03 15:42:31 +01:00
Zoltan Varga 1ac3696a9e Implement precise scanning of param area slots. Fix lots of bugs. 2011-01-03 15:42:28 +01:00
Zoltan Varga 8fddd132d8 Don't treat the saved ebp slot as pinned. Fix support for noref structs smaller than a pointer. Don't treat 'this' in gshared methods as pinned. Fix the handling of volatile variables. 2011-01-03 15:42:28 +01:00
Zoltan Varga ecff485f2b Fix order of entries in GCEncodedMap. 2011-01-03 15:42:27 +01:00
Zoltan Varga 88a6d5637f Update comments. 2011-01-03 15:42:27 +01:00
Zoltan Varga 84a63a959d Split the marking function into two functions, save information during the conservative pass to avoid doing a stack walk during the precise pass. 2011-01-03 15:42:27 +01:00
Zoltan Varga 797071a861 Omit empty columns from the register bitmaps. 2011-01-03 15:42:27 +01:00
Zoltan Varga 97084c133b Fix a typo. 2011-01-03 15:42:27 +01:00
Zoltan Varga 81178f773d Embed the callsite table after the gc map. 2011-01-03 15:42:27 +01:00
Zoltan Varga 800d8a53f4 Implement compression of the fixed fields in the GCMap struct. 2011-01-03 15:42:27 +01:00
Zoltan Varga c506516683 Compute the GC bitmap offsets instead of storing them inside the GCMap structure, to reduce its size. 2011-01-03 15:42:26 +01:00
Zoltan Varga 5c62420f05 First pass at reducing the memory usage of GC Maps.
Remove constants fields, embed the bitmap array after the structure, use
offsets into the bitmap array instead of pointers, encode the callsites
table using i8/i16 if possible.
2011-01-03 15:42:26 +01:00
Zoltan Varga 2583ced590 Rewrite everything. Instead of computing liveness intervals, compute the set of live variables at each call site, and use this to create gc bitmaps which are only precise at call sites. 2011-01-03 15:42:26 +01:00
Zoltan Varga 9b5bc0d08c Trim starting and ending NOREF columns from the GC bitmaps. 2011-01-03 15:42:26 +01:00
Zoltan Varga 21e6c0c7a9 Merge process_locals () and process_arguments (). 2011-01-03 15:42:26 +01:00
Zoltan Varga 835528495f Don't treat 'this' as byref. Don't treat ref regs as pinned. 2011-01-03 15:42:25 +01:00
Zoltan Varga b40ab69453 Add a new regbank for spill slots holding managed pointers. Treat those as PIN.
Make LDELEMA return an MP.
2011-01-03 15:42:21 +01:00
Zoltan Varga 12219d0944 Generate liveness info for non-ref variables allocated to registers. 2011-01-03 15:42:19 +01:00
Zoltan Varga 4b7d66097f Update comments. 2011-01-03 15:42:19 +01:00
Zoltan Varga 9fb57e5c04 Implement precise scanning of registers by scanning the stack slots where they are saved. 2011-01-03 15:42:19 +01:00
Zoltan Varga 7c322dc9a5 Mark some LMF fields as NOREF. 2011-01-03 15:42:19 +01:00
Zoltan Varga 2df4781927 Mark non-ref spill slots as NOREF. Mark copies of ref vregs as ref during SSA construction. Treat 'this' as a ref. 2011-01-03 15:42:18 +01:00
Zoltan Varga 6759a0ef89 Add support for GC tracking of some spill slots. 2011-01-03 15:42:18 +01:00
Zoltan Varga d0ccd0ed10 Mark stack slots allocated to dead locals as noref. 2011-01-03 15:42:18 +01:00
Zoltan Varga b919a3e55a Rename locals_start/end to frame_start/end. 2011-01-03 15:42:18 +01:00
Zoltan Varga d67901b25d Add more logging code. 2011-01-03 15:42:18 +01:00
Zoltan Varga 9f73fe2522 Add infrastructure for marking the whole frame, not just the locals. Mark arguments plus a few stack slots initialized in the prolog precisely. 2011-01-03 15:42:18 +01:00
Zoltan Varga 78ee2047f3 Use mono_find_jit_info_ext (). 2011-01-03 15:42:17 +01:00
Zoltan Varga 943bc73210 Align 'nslots' properly. 2011-01-03 15:42:17 +01:00
Zoltan Varga bf3b6365b9 Fix an uninitialized memory bug. 2011-01-03 15:42:17 +01:00
Zoltan Varga 6668409bbb Fix the computation of the stack space statistics. 2011-01-03 15:42:17 +01:00
Zoltan Varga 432d8721a5 Mark only the ref slots of a vtype with uncertain liveness as pinned. 2011-01-03 15:42:17 +01:00
Zoltan Varga 4a42deafdb Use two bitmaps instead of the 'slots' array, this makes it possible for a slot to start out as 'pin' and later change to 'ref' after it was defined. 2011-01-03 15:42:17 +01:00
Zoltan Varga 1530d74728 Compute approximate liveness intervals for vtypes and volatile variables. 2011-01-03 15:42:17 +01:00
Zoltan Varga 213199c92c Add infrastructure for marking vregs as holding a GC refs. Use this to avoid pinning variables of type I. Add more GC map stats. 2011-01-03 15:42:16 +01:00
Zoltan Varga 28eea2f411 Add a test for JIT temporaries. 2011-01-03 15:42:16 +01:00
Zoltan Varga 1141cbff4b Disable GC maps for methods with causes for now. 2011-01-03 15:42:16 +01:00
Zoltan Varga 2da5ccb82f Add a [NotWorking] test for liveness + finally clauses. 2011-01-03 15:42:16 +01:00
Zoltan Varga 4305fe15c3 Don't treat U/PTR as a managed ref. 2011-01-03 15:42:16 +01:00
Zoltan Varga fc9f01be19 Add further comments/fixmes. 2011-01-03 15:42:16 +01:00
Zoltan Varga 8a9f1e953a Really fix the computation of statistics. 2011-01-03 15:42:15 +01:00
Zoltan Varga 7136d68a9a Update 'Problems' section. 2011-01-03 15:42:15 +01:00
Zoltan Varga d122f2e7f9 Compute the stack scanning stats correctly, handle threads without a saved
context.
2011-01-03 15:42:15 +01:00
Zoltan Varga f0bbe430ff Update comments. 2011-01-03 15:42:15 +01:00
Zoltan Varga f8a1d28e8d Store the liveness information in a two dimensional bitmap in the GC map. Fix a few problems in the liveness calculation. Turn on precise stack scanning by default. 2011-01-03 15:42:15 +01:00
Zoltan Varga 694223ac7c Add a MONO_INST_GC_TRACK inst flag to mark variables needing GC tracking, use it in various places to avoid inserting and processing GC_LIVENESS instructions. 2011-01-03 15:42:15 +01:00
Zoltan Varga 4e35fc5c81 Add a modified liveness analysis pass to compute precise liveness intervals for variables which need GC tracking. 2011-01-03 15:42:14 +01:00
Zoltan Varga e725621c34 Ongoing work. 2011-01-03 15:42:14 +01:00
Miguel de Icaza 35969b2043 [mscorlib/getfolderpath] Special-case MacOS X.
The following changes were done to specially support OSX:
* MyMusic on OSX is ~/Music
* MyPictures on OSX is ~/Pictures
* Fonts on OSX is ~/Library/Fonts
* Favorites on OSX is ~/Library/Favorites
* ProgramFiles on OSX is /Applications
* InternetCache on OSX is ~/Library/Caches

The documentation has been updated accordingly.
2011-01-03 09:02:34 -05:00
Miguel de Icaza d224fe524c [mscorlib] New Path.Combine methods are exposed internally on pre 4.0 profiles
This allows our mscorlib code to be cleaner
2011-01-03 08:50:53 -05:00
Miguel de Icaza 9d7cff663c [mscorlib/getfolderpath] Remove MonoTODO 2011-01-03 08:41:33 -05:00
Miguel de Icaza d2a367e0a2 [GetFolderPath] Handful of .NET 4 changes
* Actually use the SpecialFolderPathOptions where we need them
  -> Create is acknowledged
  -> DoNotVerify is ignored, as Mono historically did not throw an
     exception on missing directories.
* Rename InternalGetFolderPath to UnixGetFolderPath as this is what it is.
* Fix existing references to the code
* Fix indentation in routine that was never properly formatted (ReadXdgUserDir)
2011-01-03 08:37:31 -05:00
Miguel de Icaza 411fb0a0a2 [mscorlib] inside mscorlib Platform's value will be correct for OSX, but userland still gets Unix.
This change allows mscorlib to get the real PlatformID, to split code between
OSX and general Unix.   We continue to expose the value 4 (Unix) to usercode
as changing this might break user applications.
2011-01-03 08:12:36 -05:00
Marek Habersack d2066b9583 [corlib] Fix for bug #659061. Adjust size of the last group when formatting numbers with group separators.
When the number format includes several groups make sure that the last (leftmost) one is adjusted
so that its width is not larger than the number of remaining characters.
2011-01-03 13:15:49 +01:00
Zoltan Varga 86aba52e0c .gitignore. 2011-01-03 12:57:16 +01:00
Zoltan Varga d313dc902c Use a more compact encoding for references to icall/ptr-to-struct/struct-to-ptr
wrappers, this saves about 50k from the full-aot mscorlib image size.
2011-01-03 11:42:53 +01:00
Zoltan Varga 5ad1115d9e Fix the fullaotcheck target. 2011-01-03 11:42:53 +01:00
Thomas Goldstein a421a02dde Add unit tests for bug 661753. 2011-01-01 04:35:27 -08:00
Thomas Goldstein f148c54da8 Add missing properties that should be copied when cloning a TreeNode. Fixes bug 661753. 2011-01-01 04:28:55 -08:00
Jb Evain 812c108cd3 [LINQ] Fix non generic AsQueryable issue #661462 2010-12-30 16:21:40 +01:00
Jb Evain beb2696811 Add test for bug #661462 2010-12-30 16:20:44 +01:00
Jonathan Pobst dec5ac4085 Update for moving \mcs to \mono\mcs. 2010-12-29 16:05:21 -06:00
Jonathan Pobst 81de891e90 mono.dll -> mono-2.0.dll 2010-12-29 15:19:57 -06:00
Jonathan Pobst e85dee8a74 Do previous SKEL_DIRECTORY change for Release profile as well. 2010-12-29 15:04:17 -06:00
Jonathan Pobst f6179677be Escape SKEL_DIRECTORY define. 2010-12-29 14:58:22 -06:00
Jonathan Pobst 2a4822d4d6 All the other vcxproj files seem to be build to $(Platform) instead of $(Platform)_$(Configuration), so make this one match. 2010-12-29 14:45:23 -06:00
Jonathan Pobst d0c01c51be Remove obsolete files from MSVC build. 2010-12-29 14:39:32 -06:00
Jonathan Pobst 9d819a4133 Build 'eglib' in the Win32|Release profile. 2010-12-29 14:23:31 -06:00
Miguel de Icaza 751eeba04a [monodoc] Use points instead of relative-sizing, so that we render the same on web browsers and on WebKit 2010-12-29 15:05:18 -05:00
Marek Safar 38d9849d6d Another missing System.Windows.Forms reference 2010-12-29 17:50:39 +00:00
Marek Safar defa75dda9 Update issues error list 2010-12-29 17:50:15 +00:00
Marek Safar ef6c88b09e Implements checking of referenced members with missing references 2010-12-29 17:16:40 +00:00
Marek Safar f71ceb0e0e Add few more missing references 2010-12-29 17:03:17 +00:00
Marek Safar e35b0995a6 Removed 1.1 version of Mono.Data.Sqlite 2010-12-29 16:50:23 +00:00
Marek Safar a73bda3b22 Fixed Mono.Data.Sqlite dependencies 2010-12-29 16:46:05 +00:00
Marek Safar 0aef583a13 Build culevel in basic as well 2010-12-29 14:16:56 +00:00
Marek Safar e6c5285ece [661642] Fixed v4 resgen compilation 2010-12-29 12:56:54 +00:00
Marek Safar d84d7c7eb9 Remove no longer used BOOTSTRAP conditionals 2010-12-29 12:41:12 +00:00
Marek Safar d86fc07959 Remove no longer used bootstrap profiles 2010-12-29 10:00:08 +00:00
Marek Safar fea8332dcd New tests 2010-12-29 10:00:07 +00:00
Miguel de Icaza 102e30651a Revert accidental patch 2010-12-28 20:57:33 -05:00
Miguel de Icaza da43dacd43 [monodoc] Update the stylesheets to use Jonathan Pobst's UI design.
This is a temporary measure, as we only use 1/10th of Jonathan's
icons and style, but will do while we get Kipunji deployed.

The major benefit is that the native Linux and MacOS Monodoc
clients when using Gecko or WebKit can render something that is not
hideous.
2010-12-28 20:56:13 -05:00
Miguel de Icaza 027af8e474 [monodoc] Header no longer needed, we now keep it on the top 2010-12-28 20:56:12 -05:00
Miguel de Icaza a4e17dba01 [monodoc] Fix the root display once and for all: web does not do editing 2010-12-28 20:56:11 -05:00
Miguel de Icaza 965f3be81a Update README 2010-12-28 20:56:11 -05:00
Atsushi Eno 3f94471b5a Actually we have almost what we need on mobile profiles. 2010-12-28 22:02:08 +09:00
Zoltan Varga f59335471f Update sdb API documentation. 2010-12-26 01:10:10 +01:00
Zoltan Varga 53d80e3d29 Partially revert 759ebbb3df: pass the 'err'
argument to mono_dl_open () again. Fixes #661356.
2010-12-24 15:06:40 +01:00
Zoltan Varga 65d5055e87 Remove an obsolete comment. 2010-12-24 05:29:17 +01:00
Marek Safar b4706d358e Fixed wrong AttributeUsageAttribute 2010-12-23 16:13:07 +00:00
Marek Safar bc05e36a09 Implement missing v4 attribute types 2010-12-23 16:03:19 +00:00
Marek Safar 64054760c4 Add new tests 2010-12-23 14:11:06 +00:00
Marek Safar 802949550b Update mono-api-info to work with latest cecil. Updated to latest SL4 2010-12-23 13:55:51 +00:00
Marek Safar ff805322f6 Report obsolete warning for generic methods which base implementation constraints are obsolete 2010-12-23 11:00:50 +00:00
Marek Safar fb125bbd00 Fixed corlib tests to run on en-gb 2010-12-23 11:00:50 +00:00
Andrew Jorgensen 5d40ea706b Package the new mcs.exe instead of gmcs.exe 2010-12-22 15:21:28 -07:00
Alan McGovern bc80a7e283 [mono-api-info] Do not ignore finalizers
Finalizer chaining is done at compile time, so if you compile
against a lib with no finalizer and then run against one with
a finalizer, you'll end up ignoring the finalizer in the second
lib and it will never be run. Therefore we need to take these
into account.
2010-12-22 20:59:20 +00:00
Thomas Goldstein fe1f59426d Remove null check in ComboBox.SelectedText setter (now handled in TextBoxBase). 2010-12-22 10:30:54 -08:00
Thomas Goldstein a40a91ad5e If SelectedText is given a null value, set it to String.Empty. 2010-12-22 10:28:45 -08:00
Geoff Norton 5ae40c0119 Add some missing files needed for windows to the tarball 2010-12-22 12:05:18 -05:00
Marek Safar b4a5ea2985 Fixed NumberFormatInfo.InvariantInfo currency symbol 2010-12-22 12:48:55 +00:00
Marek Safar a9afb00c93 [660553] Fixed delegate name hiding. 2010-12-22 11:55:08 +00:00
Kenneth Bell 4ac6a56d98 Add block device support to file_getfilesize on Linux
FileStream.Length for a block device (such as '/dev/sr0') now returns actual size, rather than Zero on Linux.
2010-12-21 17:49:15 -05:00
Thomas Goldstein 9ec33796d2 Add unit test for bug 660294. 2010-12-21 13:05:38 -08:00
Thomas Goldstein a57e44b5a9 When ComboBox.SelectedText is given a null value, set it to String.Empty. Fixes bug 660294. 2010-12-21 12:45:26 -08:00
Elijah Taylor 24134641fe fix comment 2010-12-21 10:49:09 -08:00
Atsushi Eno 090b3d89ab Fix incorrect internal node cleanup in MoveToRoot(). Fixed bug #654433. 2010-12-22 02:08:58 +09:00
Atsushi Eno 9cc9294607 Add tests from XPathNavigatorEvaluateTests. 2010-12-22 01:39:23 +09:00
Atsushi Eno a76bbbe698 Add another bunch of tests from XPathNavigatorTests. 2010-12-22 01:29:52 +09:00
Atsushi Eno e41225ef4c Several fixes in XNodeNavigator to pass XPath tests from System.Xml. 2010-12-22 00:41:09 +09:00
Jb Evain c628dfee43 Fix cecil update script 2010-12-21 10:35:58 +01:00
Jb Evain 5931d4ccc0 update cecil from upstream 2010-12-21 09:53:18 +01:00
Gonzalo Paniagua Javier 26459b1b2c Previous patch was wrong. 2010-12-20 21:54:48 -05:00
Gonzalo Paniagua Javier bb34699508 [OSX] semaphore_timedwait might return > 0 for errors
Errors, including timeout, are reported with a positive return in
	semaphore_timedwait.
2010-12-20 20:46:18 -05:00
Elijah Taylor 7f11a9e501 Merge selective files from fsa branch 2010-12-20 17:13:21 -08:00
Andreia Gaita 217c16b39f Moonlight build fixes and cleanup 2010-12-21 01:06:44 +00:00
Zoltan Varga 04c9550a92 Pass -verbose-asm=false to llc, since verbose assembly slows it down greatly. 2010-12-21 01:59:12 +01:00
Mark Probst cf5e8bf2ca [sgen] Make Mark&Sweep compile without card tables. 2010-12-20 21:00:33 +01:00
Elijah Taylor 1201863c1b Add back SHARED_MONO line that got deleted accidentally, always enable shared mono for NaCl 2010-12-20 11:55:27 -08:00
Marek Safar 2bbb93851b Enable fixed ikvm exception mode 2010-12-20 19:13:33 +00:00
Marek Safar 975afa580f Emit constant data type using compiler type containers 2010-12-20 19:13:32 +00:00
Marek Safar 95db77b7c5 Import ikvm fixes 2010-12-20 19:13:32 +00:00
Elijah Taylor 9ad2f519c9 Changes to get NaCl builds working minimally 2010-12-20 11:04:02 -08:00
Elijah Taylor 43c6ad37bc NaCl build and test scripts 2010-12-20 10:55:00 -08:00
Ankit Jain 73ed1253ad [xbuild] Fix bug #660508 .
Use correctly escaped project+target names when
specifying project dependencies in the project
file generated from a .sln file.
2010-12-20 20:33:58 +05:30
Marek Safar a4de65fd00 Add a workaround for ikvm unfixed baked method tokens 2010-12-20 12:37:39 +00:00
Marek Safar 636d65a48f Disable ikvm exception optimization until it's fixed 2010-12-20 12:17:46 +00:00
Marek Safar 983c39adbe Keep looking for references assembly after first lib path fails 2010-12-20 11:51:58 +00:00
Marek Safar b0f20458aa Replace initial eval Reset with PartialReset 2010-12-20 11:51:02 +00:00
Marek Safar bedfdae806 Add missing files to Mono.CSharp.csproj 2010-12-20 11:50:09 +00:00
Marek Safar e07dd12e9f [660260] A static method is inaccessible from a nested type with explicit generic args 2010-12-20 10:50:58 +00:00
Marek Safar de4a87e245 [660255] Keep inflated non-inflated method info independently 2010-12-20 10:50:58 +00:00
Atsushi Eno 7977b08ae8 Use DateTime ToBinary() and FromBinary() for DateTime serialization. 2010-12-20 17:17:57 +09:00
Atsushi Eno 544cfd1db7 Implemented support for attached properties in xamlreaders and xamlwriters. 2010-12-20 11:25:53 +09:00
Zoltan Varga 0fc50cf3a6 Add support for accessing ThreadStatic fields in sdb. Fixes #645217. 2010-12-19 23:13:04 +01:00
Zoltan Varga cf1d488517 Add functions to access values of ThreadStatic fields from another threads. 2010-12-19 23:13:03 +01:00
Marek Safar 56c5f3c396 Add aot-compiler to dist list 2010-12-18 10:20:34 +00:00
Zoltan Varga 0070661268 Fix a buffer overflow in the aot compiler. 2010-12-18 03:51:20 +01:00
Zoltan Varga 69d5baed9f Name the llvm methods using the debug symbol by default, instead of using the cryptic m_<token> name. 2010-12-18 03:39:35 +01:00
Zoltan Varga 256afe8374 Support passing vtypes on llvm/arm. 2010-12-18 02:59:17 +01:00
Marek Safar 1b30134ae7 Add more files to mcs dist 2010-12-17 22:55:19 +00:00
Zoltan Varga 01715c3d97 Support methods returning vtypes by addr on arm/LLVM. 2010-12-17 23:06:18 +01:00
Zoltan Varga 43ff0aa594 Add support for OP_SETFRET to the llvm backend. 2010-12-17 22:29:15 +01:00
Zoltan Varga 6cf2d84622 Fix OP_LCONV_TO_OVF_I4 under LLVM. Don't use the Mono LLVM calling convention for pinvoke calls. 2010-12-17 22:07:38 +01:00
Zoltan Varga f55bc7d06d Allow decomposition of some complex 64 bit opcodes on 32 bit platforms when running with llvm. 2010-12-17 21:48:37 +01:00
Gonzalo Paniagua Javier 44a043e5d1 Mach uses wait_time not abs_time
The time to wait is relative in the Mac functions.
2010-12-17 15:08:07 -05:00
Andreia Gaita 52aac691d9 Fix moonlight build 2010-12-17 20:04:48 +00:00
Andreia Gaita 68032088ce Document the new --with-moon-gc flag on the README 2010-12-17 18:27:42 +00:00
Andreia Gaita db5d050444 Add --with-moon-gc to select the gc to use with moon (boehm/sgen) 2010-12-17 17:57:47 +00:00
Paolo Molaro 66efe2cc38 Log profiler: fix statistical mode on linux amd64. 2010-12-17 17:40:44 +01:00
Jonathan Pobst 0df612b813 Reverse #elif check since 4.0 profile defines NET_2_0. Fixes broken test. 2010-12-17 10:30:52 -06:00
Andrew Jorgensen e704c1eb97 get-monolite-latest now pulls a versioned archive
In order to ensure that monolite actually works you need to ensure that
the corlib in it has the same version as your runtime.  Monolite
archives are now versioned monolite-MONO_CORLIB_VERSION-DATE.
2010-12-17 09:10:54 -07:00
Jérémie Laval 82264df085 Remove a leftover debugging scwl 2010-12-17 16:09:37 +00:00
Marek Safar fc940fba4a Update mcs name for monolite build 2010-12-17 15:58:31 +00:00
Marek Safar c1d41511b8 [660077] Setup class interfaces for defined types in same way as for imported types 2010-12-17 11:58:26 +00:00
Marek Safar 4029237c92 Made SecurityAction predefined type 2010-12-17 09:36:10 +00:00
Marek Safar 510289542e Add an error to obsolete attribute to get consistent compiler error code 2010-12-17 09:36:09 +00:00
Marek Safar 093d9ef448 [657601] Fixes parsing pragma warning when encounter eof 2010-12-17 09:36:09 +00:00
Gonzalo Paniagua Javier b5ba5bfb20 [ThreadPool] Reset the abort state when unloading a domain
Properly reset the abort state of threadpool threads that processed
	domain unloading or were running in a domain that was being unloaded.

	Thanks go to Kumpera for finding this out.
2010-12-17 00:37:02 -05:00
Jonathan Pobst 9bc4f0d82f Fix some broken tests that check for assembly version 2.0.0.0 on the 4.0 profile. 2010-12-16 22:19:30 -06:00
Zoltan Varga 01e4a7c9c2 Convert the new NO_SEQ_POINT_AT_IL_OFFSET sdb error code into an exception. 2010-12-17 04:45:09 +01:00
Zoltan Varga 5b0a74c1c7 Send back an error instead of asserting when a breakpoint cannot be set at an il offset because it has no seq point. Fixes #620099. 2010-12-17 04:39:49 +01:00
Zoltan Varga f7ad295d05 Reserve r7 on arm/darwin even if iphone_abi is disabled. 2010-12-17 03:33:50 +01:00
Elijah Taylor 06fa666aee Merged in rest of Native Client changes, untested 2010-12-16 16:26:34 -08:00
Sebastien Pouliot 0cf8705abf Fix access policy when more than one scheme is present #659791
* ClientAccessPolicy.cs: Remove special case for scheme
* ClientAccessPolicyParser.cs: Add scheme-only entries like full URI
2010-12-16 16:29:56 -05:00
Zoltan Varga b3dce5c637 Don't put llvm type infos into the text segment, it is no longer needed. 2010-12-16 22:31:13 +01:00
Zoltan Varga 8609775f13 Null out trace_ips after freeing it to avoid crashes. 2010-12-16 22:26:00 +01:00
Jonathan Pobst bfb617e863 Move line inside if () to fix 2 tests.
Broke by 9aa23d8ebe.
2010-12-16 14:43:32 -06:00
Marek Safar 3455cf823e Set ImageRuntimeVersion based on mscorlib version when available 2010-12-16 19:07:03 +00:00
Martin Baulig bfb5bf16b8 Add documentation for my new exception filter code. 2010-12-16 19:46:42 +01:00
Marek Safar 89587c475a [659970] Close anonymous method scope also for top-level blocks 2010-12-16 18:24:28 +00:00
Martin Baulig 1fe8f7eca5 Improve support for exception filters.
* mini-exceptions.c (mono_handle_exception_internal_first_pass): Store the
  exception object in bp + ei->exvar_offset before invoking an exception
  filter.  Use mono_debugger_agent_exception_filter().

* debugger-agent.c: Add mono_debugger_agent_exception_filter(); stores
  the original context in `tls->filter_ctx' while invoking the filter.

* Mono.Debugger.Soft/Test: Add test cases.
2010-12-16 19:22:42 +01:00
Jonathan Pryor 8a263984e9 [monodroid] Add support for the Android TimeZone file format.
Fixes #657609.

Android uses "ye standard" timezone file format, but instead of using
a directory + file structure as libc uses, they throw everything into
two files, a "zoneinfo.dat" and a "zoneinfo.idx", where "zoneinfo.dat"
is the concatenation of all the TZIF files and "zoneinfo.idx" contains
the timezone names and offsets into "zoneinfo.dat".  From the
ZoneInfoDB documentation:

	However, to conserve disk space the data for all time zones
	are concatenated into a single file, and a second file is
	used to indicate the starting position of each time zone
	record.  A third file indicates the version of the zoneinfo
	databse used to generate the data.

TimeZoneInfo.Android.cs is a C# port of the corresponding Android
ZoneInfoDB type so that Mono can use Android's timezone DB.
2010-12-16 13:17:38 -05:00
Miguel de Icaza 8c686c3e13 Update instructions 2010-12-16 13:01:37 -05:00
Miguel de Icaza 77af6420b9 Undo adding of README2 test file 2010-12-16 12:59:50 -05:00
Miguel de Icaza 9aa23d8ebe [winforms] undo accidental removal of a line 2010-12-16 12:58:44 -05:00
Miguel de Icaza a791cfc164 [winforms] revert patch, it regresses the test suite: https://github.com/mono/mono/commit/8334fe3a56c978ffe7f8cb199536f9b3234afdbe 2010-12-16 12:56:55 -05:00
Atsushi Eno 7a49c5d397 Add attachable event support in XamlType (not yet in readers and writers). 2010-12-17 01:32:49 +09:00
Miguel de Icaza 5fc671180e Update COPYING file with MS-PL and Apache2 texts 2010-12-16 11:10:43 -05:00
Miguel de Icaza 36fbacfe85 Add README2 2010-12-16 11:10:43 -05:00
Jérémie Laval 15e3272b1c Clean and finish TaskFactory 2010-12-16 14:45:44 +00:00
Jérémie Laval 09185b9e81 Add support for storing elements with the same hashcode in ConcurrentDictionary. Add corresponding unit test. 2010-12-16 13:39:32 +00:00
Marek Safar 4657d0ac34 Build po files from cs-parser.jay and not cs-parser.cs 2010-12-16 13:33:49 +00:00
Marek Safar 9b61c27be8 Updated mcs translations, added Brazilian Portuguese 2010-12-16 13:04:10 +00:00
Marek Safar 4eaa975aa3 Don't build aot symbols on make dist 2010-12-16 12:42:29 +00:00
Marek Safar de462599f2 Adjust MONO_PATH, it's still needed for all profiles 2010-12-16 12:16:23 +00:00
Marek Safar 8bb7d1d7b3 Monolite mcs compiler 2010-12-16 12:06:53 +00:00
Marek Safar 1fef6badac Fix resgen build order 2010-12-16 11:44:06 +00:00
Marek Safar de0d03146a Add dist only Makefile 2010-12-16 10:05:48 +00:00
Marek Safar 49b0253a7f Switch to single mcs compiler for all managed code build 2010-12-16 09:59:39 +00:00
Marek Safar f9d82bd990 dist IKVM.Reflection 2010-12-16 09:30:32 +00:00
Marek Safar 82579609f6 Add IKVM.Reflection 2010-12-16 09:29:45 +00:00
Marek Safar 6954973148 Some 4.0 API tweaks 2010-12-16 09:25:47 +00:00
Marek Safar db16de1527 Cleanup references in static mode 2010-12-16 09:25:47 +00:00
Marek Safar 5eea47a4e1 New test 2010-12-16 09:25:46 +00:00
Marek Safar 6c1d871040 Add more attribute arguments checks 2010-12-16 09:25:46 +00:00
Atsushi Eno 3f71818dcd Implement XamlType.GetAllAttachableProperties() and family, except for events. 2010-12-16 18:13:22 +09:00
Atsushi Eno c84f6ede0d For IXmlSerializable/XData, Instance property returns null (!) 2010-12-16 16:27:19 +09:00
Marek Habersack ecd103fe4e Fix the build 2010-12-16 07:17:08 +01:00
Zoltan Varga 446ab2fafe Modify the Mono EH Frame decoding so it handles the LSDA+type_info embedded into the FDE. 2010-12-16 02:14:22 +01:00
Bojan Rajkovic 50278f2555 Correct LDFLAGS on the Darwin platform so the profiler will build. 2010-12-15 16:41:09 -05:00
Jérémie Laval 5976833aee Sys.Core parameters fixup 2010-12-15 17:43:55 +00:00
Jb Evain c0b19d1afc Make sure AppdDomain.PermissionSet doesn't return null 2010-12-15 18:35:29 +01:00
Marek Safar a24ada6a4e Fixed cloning of default switch case 2010-12-15 17:25:43 +00:00
Marek Safar 78d78bc466 New tests. 2010-12-15 17:25:42 +00:00
Marek Safar 7b27c2f3f3 [659536] Don't re-create array expressions when infering implicit array type 2010-12-15 17:25:42 +00:00
Marek Safar 1b5c2e4dd9 [659528] Fixed cloning of switch sections 2010-12-15 17:25:41 +00:00
Jérémie Laval edef0d70bc Add missing members in AggregateException 2010-12-15 17:10:17 +00:00
Jérémie Laval 1a29dfd260 Add prototype for Parallel.For long overloads 2010-12-15 17:09:47 +00:00
Jérémie Laval 89fecf7d97 Yet more parameter manual fixup 2010-12-15 17:09:19 +00:00
Jérémie Laval ed404a7b74 More parameter renaming 2010-12-15 16:39:58 +00:00
Sebastien Pouliot c3e7a90fa5 [moon] Return true for IsolatedStorageFile.IsEnabled
* MoonIsolatedStorageFile.cs: Return true, instead of throwing a NIE,
for IsEnabled since this is the behavior for Silverlight 3 (i.e. always
enabled) even if the call is new in SL4 (but part of ML3 ;-)
2010-12-15 11:36:29 -05:00
Sebastien Pouliot ba688ff8b9 Test case for security issue 2010-12-15 11:06:41 -05:00
Jérémie Laval 80502502e1 Update Task parameter names 2010-12-15 14:13:33 +00:00
Marek Safar 0a0e04ba13 [656150] Fix repl recovery after invalid expression. 2010-12-15 13:26:20 +00:00
Marek Safar 073a0e3051 Fix comment typo 2010-12-15 12:18:08 +00:00
Marek Safar 2fad7a53fa Workaround problem when compiling many resource files references 2010-12-15 12:06:10 +00:00
Marek Safar 25b26705a4 Add existing class to System.Net build 2010-12-15 11:40:59 +00:00
Marek Safar 6391925927 Keep only single Dispose implementation in ResourceReader 2010-12-15 11:36:24 +00:00
Marek Safar 754b331640 Switch to resizeable array when adding second item to base member cache 2010-12-15 11:35:22 +00:00
Marek Safar bd05c6c836 Some .net 4.0 api compatibility fixes 2010-12-15 11:12:07 +00:00
Marek Safar d615165879 Emit delegate constructor parameter names 2010-12-15 11:12:07 +00:00
Marek Safar 4384daff77 Recover from invalid linq block syntax 2010-12-15 11:12:06 +00:00
Elijah Taylor 9e73759b4d Merge mono/io-layer, mono/metadata, mono/arch/x86 and configure.in for Native Client 2010-12-14 16:03:45 -08:00
Elijah Taylor e9d089527d Changes to mono/arch/amd64 for Native Client 2010-12-14 14:37:36 -08:00
Zoltan Varga 6a8e4e51fc Add llvm_label_prefix to a few symbols. 2010-12-14 22:39:20 +01:00
Jeffrey Stedfast ee5160d55d Fixed AesManaged parameter names to make gui-compare happy 2010-12-14 16:20:35 -05:00
Zoltan Varga fbd6a1b09a Put llvm type infos into the .text section. 2010-12-14 21:34:57 +01:00
Zoltan Varga 2b83ff4fd6 Add support for an additional TType encoding. 2010-12-14 21:34:57 +01:00
Rodrigo Kumpera 002317f5d4 Release per-appdomain binding information.
* appdomain.c (unload_thread_main): Call function
	bindings cleanup.

	* assembly.c (mono_assembly_apply_binding): Dupe the
	content of per-domain bindings. Assign a domain_id on
	such entries to be possible to track them later.

	* assembly.c (mono_assembly_cleanup_domain_bindings):
	New function that removes per-domain bindings on
	unload.

	* metadata-internals.h (MonoAssemblyBindingInfo): Add
	domain_id field so it's possible to track if an entry
	is appdomain bound.
2010-12-14 18:41:55 -02:00
Rodrigo Kumpera ccc16fe531 Merge branch 'master' of github.com:mono/mono 2010-12-14 18:41:53 -02:00
Jeffrey Stedfast 094962c7bf Add TypeForwardedTo for Aes on MOONLIGHT and BOOTSTRAP_NET_4_0 2010-12-14 15:08:55 -05:00
Michael Hutchinson 32d328ef78 Socket.Dispose is public in 4.0. 2010-12-14 14:20:23 -05:00
Rodrigo Kumpera e400d3bc23 Add one more test for marshaling of char arrays 2010-12-14 14:34:45 -02:00
Rodrigo Kumpera db4299a192 Fix marshaling of chars on structs.
* marshal.c (emit_struct_conv): Take the native type of
	the field to decide what kind of conv to use if field
	is of type char.

	* marshal.c (mono_pinvoke_is_unicode): Unify auto
	and default.

	* marshal.c (emit_struct_conv_full): Kill this variant
	that doesn't make any sense as structures are marshaled
	in the same way regardless of the charset of the method.

	* metadata.c (mono_type_to_unmanaged): Handle marshalspec
	for char.

	Fixes the regression on MD caused by 1f3cfba.
2010-12-14 14:34:45 -02:00
Marek Safar 32fd52c54c [653710] Check type parameter reference type constraint recursively 2010-12-14 16:32:05 +00:00
Marek Safar 4de18f97cb [656918] Implement expression tree access to hoisted variable reference 2010-12-14 16:05:47 +00:00
Atsushi Eno 0de2ef480c Add experimental "#if NET_2_1" mode (it builds w/o s.x.permissions). 2010-12-15 00:15:20 +09:00
Marek Safar bc7cc6c935 [656918] Emit instance expression for ET delegate creation 2010-12-14 14:11:20 +00:00
Marek Safar c14f0bebfa Reject automatic version number at major and minor positions 2010-12-14 13:36:42 +00:00
Marek Safar 6b05daa743 [655284] Implemented automatic assembly version numbers 2010-12-14 13:06:39 +00:00
Marek Safar 8d25ac7be3 [655770] Emit unused members warning for nested types as well 2010-12-14 11:26:53 +00:00
Marek Safar df576a3b2e [657623] Fix incorrect logic in value type parameter `is' check 2010-12-14 11:26:52 +00:00
Marek Safar 45d00032c7 Add more restrictions to custom attribute encoding 2010-12-14 11:26:52 +00:00
Marek Safar f0b234748e [657797] Expand type member cache using secondary constraints as well. 2010-12-14 11:26:51 +00:00
Marek Habersack 833aab4906 [asp.net] Fix for bug #467221. Properly match location sub-paths for security trimming
When security trimming is requested for sub-path of a location specified in the config file,
make sure that we match such a request to its parent location.

Based on patch from Mike Morano <[email protected]>, thanks!
2010-12-14 10:07:24 +01:00
Marek Habersack 149ff0a30b [asp.net] Added verbose mode to the standalone test runner 2010-12-14 10:06:48 +01:00
Atsushi Eno eabd497033 add missing method in IAmbientProvider. 2010-12-14 13:50:43 +09:00
Zoltan Varga 12b8c6eb71 Don't prepend llvm_label_prefix to plt symbol names. 2010-12-14 03:19:15 +01:00
Gonzalo Paniagua Javier 98532db21b Don't throw in EndReceive/EndSend + out error
The overloads of EndReceive and EndSend that have an out SocketError
	parameter do not throw.

	Patch by Sven Groot that fixes bug #659056.
2010-12-13 18:56:52 -05:00
Gonzalo Paniagua Javier 4186a1455a Change parameter name.
Fixes bug #659123.
2010-12-13 17:00:49 -05:00
Andrew Jorgensen 86e618a14a Simplify the profiler line in the spec file
Stuff sometimes appears or disappears here, just use a wildcard.
2010-12-13 13:57:46 -07:00
Zoltan Varga fa9b02b8be Emit a seq_point after OP_START_HANDLER, not before. 2010-12-13 20:42:59 +01:00
Zoltan Varga ca1a219141 Avoid passing a name to mono_register_jit_icall () which is later freed. 2010-12-13 20:21:41 +01:00
Michael Hutchinson 50f8314921 Fixi soft debugger dll crash on Windows w/redirected console
Windows socket behaviour seems to be slightly different from
Linux/Mac, and Mono.Debugger.Soft was trying to disconnect a socket
that that doesn't get connected, causing an exception at launch.

For some reason it did check the main debugger socket before trying
to disconnect it, but not the console socket, so only apps with
redirected console output would crash.
2010-12-13 13:51:30 -05:00
Michael Hutchinson 920563b6b3 Remove default arg usage from sdb dll so it can be compiled with csc 3.5 2010-12-13 13:51:30 -05:00
Zoltan Varga 286e819e9c Implement support for the .mono_eh_frame created by llc on LLVM mono branch. 2010-12-13 19:23:10 +01:00
Zoltan Varga 8bfda40a8a Fix full-aot+llvm support on arm. 2010-12-13 19:23:10 +01:00
Marek Safar bf0e87ed65 Remove duplicate checks 2010-12-13 18:08:54 +00:00
Marek Safar c019be7d88 New test. 2010-12-13 18:00:56 +00:00
Marek Safar 082873782a [659038] Check interface hierarchy before reporting ambiguous errors 2010-12-13 18:00:56 +00:00
Marek Safar d80ea6c37b [657862] Correctly scan for parent of base method override 2010-12-13 18:00:55 +00:00
Marek Safar 4c54d54be6 [658722] Don't require arity symbol to be part of the typename 2010-12-13 18:00:55 +00:00
Zoltan Varga fb702c0e2e Avoid registering sequence points in the per-domain hash when AOT compiling. 2010-12-13 18:23:23 +01:00
Lluis Sanchez 0943712481 Fix several issues in the code generator
Issues include: casts not being properly generated for nullable
types, missing cast when the type of a member does not match
the forced serialization type, and incorrect code generated
for handling [XmlText] members.
2010-12-13 16:51:44 +01:00
Bojan Rajkovic 9dc2ec91e8 Add FreeBSD to the list of supported platforms for SGen on i386 and x86_64. 2010-12-13 10:53:26 -05:00
Bojan Rajkovic 7418206816 Update build-csproj2k5 script to use /bin/sh, since there are no obvious bash-isms in the script. 2010-12-13 10:53:26 -05:00
Bojan Rajkovic f5de47c516 Use SIGXFSZ on FreeBSD too by checking for the __FreeBSD__ define. Like Apple and OpenBSD, it doesn't have SIGPWR. 2010-12-13 10:53:26 -05:00
Atsushi Eno 1d2fc1166f Fix enum serialization too. 2010-12-14 00:11:33 +09:00
Jérémie Laval 98d5dfb35e Increment Count even on single-processor in SpinWait. Fix #624849. 2010-12-13 13:41:31 +00:00
Marek Habersack 6567b6c320 [asp.net] Test suite configuration updates for 4.0
When running the tests on the 4.0 profile, the configuration must no longer include
the System.Web.Extensions section declarations as they are merged with machine.config right now.
2010-12-13 14:40:37 +01:00
Marek Safar 20f08e15cb [659022] Resolve reduced expressions 2010-12-13 13:32:22 +00:00
Lluis Sanchez 0dcc87e549 Fix code generation issue with nested generic types
The type argument list for generic nested types include
all types arguments for the whole declaring type chain.
When generating the C# name of the class, each type
argument has to be assigned to the correct class in
the chain.
2010-12-13 13:49:35 +01:00
Lluis Sanchez 6eb0ebd56c Fix flags enum deserialization
Flag enums values can be a composition of several
values separated by spaces. The deserializer now
properly handles this case.
2010-12-13 13:49:34 +01:00
Lluis Sanchez 3dc10b0fd1 Throw correct exceptions when using generated serializer
Invocations to generated serializers are done through
reflection, so exceptions are masked by TargetInvocationException.
The inner exception has to be rethrown so that the client
code gets the correct exception.
2010-12-13 13:49:34 +01:00
Marek Safar 71c948128d Re-enable EmbedResourceFile overload used by al.exe 2010-12-13 12:10:54 +00:00
Marek Habersack a1a3235872 [asp.net] Fix for bug #658278. Panels render children only when parent is present and ChildrenAsTriggers is enabled
Fix from Avior Computing <[email protected]>, thanks!
2010-12-13 12:59:28 +01:00
Marek Habersack f222bb2a46 [asp.net] .NET 4.0 declares the <system.web.extensions> section in machine.config 2010-12-13 08:59:41 +01:00
Marek Habersack de1e6a882c [asp.net] Implmeneted the System.Web.Configuration.ScriptingRoleServiceSection type 2010-12-13 08:58:33 +01:00
Miguel de Icaza 869fd0336e [winforms] Pass 4 of removing NET_2_0 from winforms 2010-12-12 23:32:36 -05:00
Miguel de Icaza 60ca042c3b [winforms] Pass 3 of removing NET_2_0 from winforms 2010-12-12 23:32:36 -05:00
Miguel de Icaza 8f9dbbc286 [winforms] Pass 3 of removing NET_2_0 from winforms 2010-12-12 23:32:35 -05:00
Miguel de Icaza 51c01f5aa0 [winforms] Pass 2 of removing NET_2_0 from winforms 2010-12-12 23:32:35 -05:00
Miguel de Icaza 63103537a8 [winforms] Pass 2 of removing NET_2_0 from winforms 2010-12-12 23:32:35 -05:00
Miguel de Icaza e4f22a9c91 Pass 1 of removing NET_2_0 from winforms 2010-12-12 23:32:35 -05:00
Zoltan Varga 1146f40c27 Fix ARM build. 2010-12-13 05:14:16 +01:00
Zoltan Varga 6c657df861 Fix full-aot+llvm support on amd64. 2010-12-13 03:03:49 +01:00
Zoltan Varga 074b762ef7 Add targets to run aot/full-aot tests with LLVM. 2010-12-13 03:03:14 +01:00
Zoltan Varga 23b2ee07fa Add a patch each time a plt entry is requested in the llvm backend, so wrappers can be generated in full aot. 2010-12-13 03:02:29 +01:00
Zoltan Varga e8a21b1811 Add a Make variable to run the aot tests using --llvm. 2010-12-13 01:08:17 +01:00
Zoltan Varga ec8b2a401b Don't make the mtriple argument mandatory, clean up processing of llc arguments. 2010-12-12 21:03:49 +01:00
Jonathan Pryor d7925c318b [mdoc] Fix code formatting.
The expression in `if(expr)`, if overly-long and spanning mulitple
lines, should be indented beyond the normal indent so that the
expression is more easily distinguished from the `if` body:

	if (expr &&
			expr2 &&
			expr3)
		body;

not:

	if (expr &&
		expr2 &&
		expr3)
		body;
2010-12-11 22:57:31 -05:00
Jonathan Pryor 3fffcf65ae Merge branch 'master' of https://github.com/XTZGZoReX/mono into XTZGZoReX-master 2010-12-11 22:53:27 -05:00
XTZGZoReX 92918b0599 [Monodoc] add GetDeclaringType(this CustomAttribute) extension method. 2010-12-12 04:42:12 +01:00
XTZGZoReX 07cf519f25 [monodoc] don't display methods with ContractInvariantMethodAttribute. 2010-12-12 04:33:39 +01:00
XTZGZoReX 48b6e0948a [Monodoc] eliminate a few warnings. 2010-12-12 04:33:26 +01:00
Thomas Goldstein 9f69887d40 [winforms] Small optimizations, use properties that do not compute values 2010-12-11 22:18:29 -05:00
Zoltan Varga 502b70362f Add an 'mtriple' aot option to set the target triple used by the AOT compiler in LLVM mode. 2010-12-11 22:27:17 +01:00
Zoltan Varga 09768e2fa7 Add a mono_arch_set_target () function to set the target triple which should
be targeted by the JIT in AOT mode on ARM.
2010-12-11 22:27:17 +01:00
Miguel de Icaza a22c4b9689 [winforms] Style, braces 2010-12-10 23:34:22 -05:00
Miguel de Icaza 855f654bea [winforms] Use conditional attributes, not ifdefs to insert conditional code 2010-12-10 23:32:36 -05:00
Miguel de Icaza 79d63d526b [winforms] Use conditional attributes, not ifdefs to insert conditional code 2010-12-10 23:25:52 -05:00
Gonzalo Paniagua Javier 588fb657fb Line endings 2010-12-10 23:19:06 -05:00
Ralph Leckett 80253e7210 [System.Drawing] Remove unnecessary verbosity 2010-12-10 23:07:07 -05:00
Ralph Leckett fcd9f10f29 [System.Drawing] On image load from stream errors, return null, not an exception 2010-12-10 23:05:55 -05:00
Ralph Leckett 858dc2e7ec [winforms] Fix graphics leak 2010-12-10 23:02:51 -05:00
Ralph Leckett e335b1e2ee [winforms] Fix graphics leak 2010-12-10 23:01:54 -05:00
Ralph Leckett 23d072b4ca [winforms] For what it appeared to be a crasher from the JumboPatch 2010-12-10 23:01:08 -05:00
Ralph Leckett 49493982d2 [winforms] Reorder code a bit 2010-12-10 22:59:05 -05:00
Ralph Leckett c5334a0c71 [winforms] Avoid leaking the Graphics 2010-12-10 22:53:53 -05:00
Ralph Leckett a78861b259 [winforms] Avoid leaking the Graphics + style 2010-12-10 22:53:07 -05:00
Ralph Leckett fe185d14b6 [winforms] Cope with null current regions 2010-12-10 22:51:01 -05:00
Ralph Leckett 6a0140ef05 [winforms] Cope with small windows 2010-12-10 22:49:21 -05:00
Ralph Leckett 986e5a1948 [winforms] Style 2010-12-10 22:45:52 -05:00
Ralph Leckett c918b2eb02 [winforms] Style 2010-12-10 22:43:59 -05:00
Ralph Leckett 97783cbb02 [winforms] Style, reduce full sizes of common types 2010-12-10 22:43:03 -05:00
Ralph Leckett 3035ae4756 [winforms] Do not leak Graphics in Invalidate + some Style 2010-12-10 22:41:16 -05:00
Miguel de Icaza e8bce62f47 [winforms] style, and NET_2_0 dropped 2010-12-10 22:35:52 -05:00
Ralph Leckett a0a65a6fa3 [winforms] Style 2010-12-10 22:26:51 -05:00
Ralph Leckett efc9d3ed8b [winforms] Cope with null Hwnd value from Hwnd.ObjectFromHandle 2010-12-10 22:25:41 -05:00
Ralph Leckett 60c8bfaeac [winforms] Win32 fixes for window class name
This is extracted from Ralph Leckett's jumbo-patch to winforms
2010-12-10 22:23:33 -05:00
Thomas Goldstein 8805219da5 [winforms] quick cleanup patches for a few WinForms classes 2010-12-10 22:09:04 -05:00
Thomas Goldstein 770af47e2c [winforms] Small optimization 2010-12-10 22:05:48 -05:00
Miguel de Icaza 4b0981d3d7 [winforms] Prepare for Gnome 3, by not depending on libgnomeui 2010-12-10 22:00:05 -05:00
joncham d8d703fbe2 Use 2.0 instead of 1.0 when probing install dirs. 2010-12-10 20:27:11 -05:00
Tom Hindle 6169e99a3d [winforms] Fix ContextMenuStrip vertical position can be wrong.
Fixes #658945

This can lead to the top of the context menu being off the screen.
This only happens with context menus with lots of items.
2010-12-10 19:54:13 -05:00
Tom Hindle 0c5085f5bc [winforms] WM_SETFOCUS is sent before Keyboard Focus is changed.
Switches Keyboard focus so that it occurs before WM_SETFOCUS is sent.

This means that the wrong keyboard im is selected while process winform events
caused by WM_SETFOCUS.

Attaching patch that changes this so that keyboard im is focused before
WM_SETFOCUS is sent.

Fixes: #557277
2010-12-10 19:54:13 -05:00
Tom Hindle 1436ec9426 [winforms] Allow WinForm controls to use on-the-spot XIM input methods
Attached Patch allows WinForms controls to get preedit notifications (by
overriding WndProc) when mono is run with  MONO_WINFORMS_XIM_STYLE=on-the-spot
mono

Changelog from attach patch:

2009-11-20    Tom Hindle <[email protected]>
    * XplatUIStructs.cs: Added user messages WM_XIM_PREEDITSTART,
    WM_XIM_PREEDITDONE, WM_XIM_PREEDITDRAW, WM_XIM_PREEDITCARET
    * X11Keyboard.cs: Changed preedit callbacks to emit WM_XIM_* messages
    * X11Structs.cs: Added XIMFeedbackStruct and XIMFeedback enum.

Here is some sample code which make use of this feature:

/// <summary>
/// Proof on concept implementation of a user defined TextBox that does on-the-spot
/// input method editing.
/// There is a number of know flaws - eg. doesn't end preedit when user moves cursor with mouse.
/// Need to run with MONO_WINFORMS_XIM_STYLE=on-the-spot mono
/// </summary>
public class OnTheSpotTextBox : TextBox, XIM.IPreedit
{
    // store text before preedit.
    string backup;

    #region IPreedit implementation
    public int PreeditStart (IntPtr clientData, IntPtr callData)
    {
        Console.WriteLine ("PreeditStart");
        backup = Text;
        return 100;
    }

    public int PreeditDone (IntPtr clientData, IntPtr callData)
    {
        Clear ();
        AppendText (backup);
        return 0;
    }

    public int PreeditDraw (IntPtr clientData, IntPtr callData)
    {
        XIM.PreeditDrawInfo info = new XIM.PreeditDrawInfo (callData);
        Console.WriteLine ("PreeditDraw PreeditDrawInfo {0}", info);
        if (info.ChangeLength > 0) {
            Clear ();
            AppendText (backup);
        }
        if (info.Caret > 0)
            AppendText (info.Text);
        return 0;
    }

    public int PreeditCaret (IntPtr clientData, IntPtr callData)
    {
        XIM.PreeditCaretInfo info = new XIM.PreeditCaretInfo (clientData);
        Console.WriteLine ("PreeditCaret PreeditCaretInfo {0}", info);
        return 0;
    }

    protected override void WndProc (ref Message m)
    {
        switch (m.Msg) {

        case         /*WM_USER*/0x400 + 0x1d00:
            // WM_XIM_PREEDITSTART
            // The WParam value identifies what is occurring.
            PreeditStart (m.WParam, m.LParam);
            break;
        case         /*WM_USER*/0x400 + 0x1d01:
            // WM_XIM_PREEDITDONE
            PreeditDone (m.WParam, m.LParam);
            break;
        case         /*WM_USER*/0x400 + 0x1d02:
            // WM_XIM_PREEDITDRAW
            PreeditDraw (m.WParam, m.LParam);
            break;
        case         /*WM_USER*/0x400 + 0x1d03:
            // WM_XIM_PREEDITCARET
            PreeditCaret (m.WParam, m.LParam);
            break;
        }
        base.WndProc (ref m);
    }

    #endregion

}
2010-12-10 19:54:12 -05:00
Tom Hindle a1db6a7798 [winforms] Add modal support to Forms
This fixes 614850 "Modal dialogs should prevent closing their parent windows."
2010-12-10 19:54:12 -05:00
Tom Hindle bedd606171 [winforms] DataGridView.cs : Made MoveCurrentCell not attempt access Column index -1.
Fixes #516960
2010-12-10 19:54:12 -05:00
Tom Hindle 21e662c237 [winforms,fix] Prevent Clipboard APIs from running any Idle handlers
Fixes: 641756

This prevents idle methods to be invoked when calling the Clipboard
APIs on X11, which is not the expected behavior.

The description from the bug report is:

Mono X11 Clipboard handling calls UpdateMessageQueue, which has the side affect
of potentially calling Idle handlers.

If any Idle handlers call Clipboard functions, this can cause idle handler
reentry.

See attached test case.

Incidentally removing the reentry check from the idle handler will actually
cause mono to segfault.

I will attach a patch shortly which fixes this by overloading
UpdateMessageQueue to allow Clipboard methods to call a version that doesn't
run idle processing.
2010-12-10 19:54:12 -05:00
Thomas Goldstein a253347e36 [winforms, fix] Keep the carret in sync with changes to the text entry value
Patch from Thomas Goldstein for bug #621475

The IndexOutOfRangeException is apparently a caret position bug. As a
workaround, doing textbox.SelectionStart = 0; before resetting the Text avoids
the bug.

Here's a patch to fix the bug. Basically, it applies the same caret updates
whether the Text is null/empty or not.
I hope I can get away with the minor style updates without having to submit
them as a separate patch...
2010-12-10 19:54:11 -05:00
Andy Hume fe46434c38 [fix, winforms] Fix the ProgressBar speed in Marquee situations
This issue was identified as:

 Marquee speed is very weird, changing between very very fast and very very
very very fast, and in inverse to the speed setting?

In https://bugzilla.novell.com/show_bug.cgi?id=440220

Also fixes this bug which was the test case isolated:

https://bugzilla.novell.com/show_bug.cgi?id=655797
2010-12-10 19:54:11 -05:00
Nagappan Alagappan 8334fe3a56 [winforms, datagrid, fix] fixes crasher reported in 416111 2010-12-10 19:54:11 -05:00
Miguel de Icaza 8850735c06 Update docs 2010-12-10 19:54:11 -05:00
Sebastien Pouliot 7321eb428b Ensure types are resolved when checking fields under coreclr
* security-core-clr.c: call mono_field_get_type_checked to ensure the
field's type is resolved since coreclr checks can occurs before the
"normal" check done by mono. Fix crashes in DRT#8005
2010-12-10 15:08:33 -05:00
Rodrigo Kumpera 39a820b041 Fix marshaling of Ansi strings.
* marshal.c (emit_struct_conv): Add _full variant that
	takes an extra boolean argument to tell if char is to be
	marshaled with one or two bytes.

	* marshal.c (emit_marshal_array): Use emit_struct_conv_full
	to correctly marshal ansi char arrays.
2010-12-10 15:54:20 -02:00
Alex 9a1075956e [monodoc] display setter after the getter 2010-12-10 10:27:24 -05:00
Zoltan Varga 5320848ddf Fix handling of gshared methods declared in generic superclasses of nongeneric classes in stack traces. Fixes #658645. 2010-12-10 16:12:39 +01:00
Marek Safar 1b5faeaf7a Revert unwanted makefile change 2010-12-10 13:20:45 +00:00
Marek Safar 55907ab262 Add v1 runtime target (broken by design) 2010-12-10 13:14:34 +00:00
Marek Safar 29662496fe Resolve entire base initializer block in correct context 2010-12-10 13:14:33 +00:00
Marek Safar 45f1c6f872 Removed compiler generated attributes 2010-12-10 13:14:33 +00:00
Marek Safar 2c7b380a13 Base constructor method calls have to be static 2010-12-10 13:14:32 +00:00
Marek Safar 76dd12142a Report missing types (some of them for now) 2010-12-10 13:14:32 +00:00
Marek Safar cec1fce68b Add missing dependency 2010-12-10 13:14:32 +00:00
Marek Safar 6dcfb495a6 Try to handle missing generic type definition 2010-12-10 13:14:31 +00:00
Zoltan Varga 02d1d7b65b Use the mono calling convention for all LLVM methods, not just ones with rgctx/imt arguments. 2010-12-10 01:37:35 +01:00
Gonzalo Paniagua Javier 5ab786b5b4 Get system.web/httpRuntime only once
Get that section only once and keep it in HttpRuntime.
2010-12-09 19:01:41 -05:00
Rodrigo Kumpera ed8e4e2cb9 Add a few more undocumented bits to allowed AssemblyFlags
Fixes #657516
2010-12-09 17:59:37 -02:00
Rodrigo Kumpera 08aee85f36 Check for coded token with zero index for typedef::parent.
* metadata-verify.c (verify_typedef_table): Fail if the token
	index is encoded as zero.

	Fixes #651682
2010-12-09 17:28:13 -02:00
Jérémie Laval dd36115a4b Fix semantic of CountdownEvent Reset methods. Fix #658244. 2010-12-09 17:32:04 +00:00
Jérémie Laval c4d8a92388 Implement CreateSetComparer method in HashSet 2010-12-09 16:00:15 +00:00
Jérémie Laval a4ce700a64 Refactor Add/Take/TryAdd/TryTake methods into a common block in BlockingCollection 2010-12-09 16:00:15 +00:00
Jérémie Laval 4a43b8e34d Fix GetConsumingEnumerable exception handling in BlockingCollection 2010-12-09 16:00:15 +00:00
Jérémie Laval 6c7937ec44 [PLinq] Detect when AsParallel is called multiple time in a query and simply reuse the existing ParallelQuery object 2010-12-09 16:00:14 +00:00
Marek Safar 007ca74e9a New test 2010-12-09 14:58:05 +00:00
Marek Safar fbfb86eb9e Read custom attribute name without resolving attribute type if possible 2010-12-09 14:58:05 +00:00
Marek Safar 46e8ec1f32 Redirect all mscorlib loads into assembly builder when compiling corlib 2010-12-09 14:58:04 +00:00
Marek Safar baa1ae6757 Fix parameter name 2010-12-09 14:58:04 +00:00
Marek Safar 6fe779611c Add initial handling of missing assemblies 2010-12-09 14:58:03 +00:00
Marek Safar e7edddeccb Add internal --runtime option 2010-12-09 14:58:03 +00:00
Marek Safar bb09e094af Add references loading trace 2010-12-09 14:58:02 +00:00
Marek Safar 35e872d116 Removed check for generics on 1.1 runtime 2010-12-09 14:58:02 +00:00
Zoltan Varga 3e02c096ec Unify the rgctx/non-rgctx call emission functions in the JIT. 2010-12-09 15:15:03 +01:00
Jérémie Laval c6927845e9 Fix behavior of Partitioner.Create when more than one partition is requested and used 2010-12-09 10:56:13 +00:00
Geoff Norton e9c765654f Ensure we always save the GState, not just when the context is flipped 2010-12-09 00:46:48 -05:00
Geoff Norton ee545525d2 Avoid leaking our unwind ops when not populating the trampoline info 2010-12-08 17:16:41 -05:00
Geoff Norton c78a8e3c57 Avoid leaking the name buffer since we already resolve this below 2010-12-08 16:24:00 -05:00
Rodrigo Kumpera 649aa95659 Fix some memleaks under -v
* mini.c: A monomac leak detector depends on -v
	not leaking memory, so lets fix some of those.
2010-12-08 19:19:46 -02:00
Rodrigo Kumpera 84c22bbb8d Fix a memleak when returning SRE cattrs.
* reflection.c (lookup_custom_attr): Since we memdup
	the returned cattr, we better mark it as not cached.
2010-12-08 18:51:00 -02:00
Rodrigo Kumpera b5721bf652 Handle GTDs used as element or type arguments.
* verify.c (mono_type_is_valid_type_in_context):
	Refuse a GTD if not at a root positision.

	Fixes #656913
2010-12-08 18:50:59 -02:00
Zoltan Varga 08f0bcaad8 Mark runtime invoke wrappers as pinvoke, since they are called from native code. 2010-12-08 21:36:53 +01:00
Zoltan Varga dd5f537bde Get rid of the 'is_pinvoke' argument to get_call_info (), use sig->pinvoke instead. 2010-12-08 21:36:53 +01:00
Gonzalo Paniagua Javier 1551f0279a InitOnce does not throw 2010-12-08 14:37:25 -05:00
Gonzalo Paniagua Javier 6f597d378c Fixes problem with exceptions on init
Multiple threads might be waiting on the lock and the modules get
	loaded and initialized multiple times, leading to an error. This patch
	fixes it and always returns the right initialization exception, if any,
	to the client.
2010-12-08 14:11:39 -05:00
Zoltan Varga 70808e944c Update a comment. 2010-12-08 12:37:24 +01:00
Mark Probst a3b69ea9f2 [sgen] Have an allocated block list for fixed-heap M&S, too.
It turns out we iterate over all allocated blocks often enough that
the way we did it for fixed-heap Mark&Sweep (iterating over all blocks
and jumping over the non-allocated ones) slows us down considerably.
So, use the same allocated block list as "regular" Mark&Sweep, which
also unifies the code a bit.
2010-12-08 10:49:13 +01:00
Mark Probst 71bae261fe [sgen] Don't increase degraded_mode in alloc_degraded().
Mature allocation uses the degraded allocation machinery to allocate
objects in the major space.  Modifying degraded_mode in those cases
will actually put us into degraded mode which slows us down immensely.
2010-12-08 09:39:41 +01:00
Zoltan Varga b8dde493c7 Tidy up the assembly loading log messages a bit. 2010-12-08 01:40:16 +01:00
Zoltan Varga 769e981372 Clean up the appdomain at the end of the remoting4 test. 2010-12-08 01:18:20 +01:00
Marek Safar 6f6128c2a4 Put back actual save of module target 2010-12-07 22:59:54 +00:00
Marek Safar 6e3ef38a81 Revert ordering of compiler tests 2010-12-07 22:58:06 +00:00
Marek Safar 8a8dfa0c5b Check file extension manually 2010-12-07 22:28:27 +00:00
Marek Safar cc07d797a1 Symbol writer has to use 4.0 methods in static mode 2010-12-07 22:28:27 +00:00
Gonzalo Paniagua Javier cdc65357fa Delete end local endpoint when stopping the server
Fixes bug #647204.
2010-12-07 17:04:44 -05:00
Zoltan Varga 9e2b41afe1 Log images still loaded during shutdown. 2010-12-07 22:41:51 +01:00
Zoltan Varga f613ad6248 Fix some small memory leaks. 2010-12-07 21:13:14 +01:00
Rodrigo Kumpera 96c3489edf Fix memberref method signature verification.
* metadata-verify.c (mono_verifier_verify_memberref_method_signature):
	Memberref method signatures allow sentinels.
2010-12-07 16:07:49 -02:00
Rodrigo Kumpera 993f259629 Correctly check for ptr compatibility.
* verify.c (mono_delegate_type_equal): Properly check
	if candidate is a pointer type.

	Fixes #657746
2010-12-07 15:54:18 -02:00
Rodrigo Kumpera e07951bd15 Set a default element class for failed enums.
* class.c (mono_class_create_from_typedef): Set failed enums
	to extends int32 as the whole runtime can't handle this been
	null.

	Fixes #657745
2010-12-07 15:33:25 -02:00
Marek Safar 3abe771dfe Add IKVM.Reflection support 2010-12-07 17:03:57 +00:00
Marek Safar 71aa7f6715 Test update 2010-12-07 17:03:57 +00:00
Marek Safar bb45cd47e2 Sort the files manually to always get same order 2010-12-07 17:03:57 +00:00
Marek Safar b60a137215 New test 2010-12-07 17:03:56 +00:00
Marek Safar 7be5aad8e4 Extract reflection specific assembly builder 2010-12-07 17:03:56 +00:00
Marek Safar 8a6ea72ad5 Re-use existing code path 2010-12-07 17:03:56 +00:00
Rodrigo Kumpera 688ca714e3 Honor skip visibility in more places.
* verify.c (do_newobj): Honor skip visibility request.

	* verify.c (do_load_function_ptr): Ditto.

	Fixes #657694
2010-12-07 15:00:20 -02:00
Rodrigo Kumpera c3222f061b Do separate checking of field and method memberref.
* loader.c: Use new split functions.

	* metadata-verify.c (parse_custom_mods): Make sure encoded
	type tokens are not zero.

	* metadata-verify.c (parse_generic_inst): Ditto.

	* metadata-verify.c (parse_type): Ditto.

	* metadata-verify.c (mono_verifier_verify_memberref_signature):
	Replace this function with a pair that does field or method
	verification.

	Fixes #656914
2010-12-07 13:32:48 -02:00
vvaradhan 455b2f894a Merge branch 'master' of github.com:mono/mono into masterwork 2010-12-07 20:43:28 +05:30
vvaradhan 367fe78d52 2010-12-07 Veerapuram Varadhan <[email protected]>
** Fixes #456234 - Patch by [email protected]
	* OdbcDataReader.cs (GetValue): Handle SQL_NO_TOTAL sanely and
	use corresponding Decoder.GetChars instead of Encoding.GetString.
2010-12-07 20:39:47 +05:30
Guillaume Pouillet 0d98fbbe29 Fix bug in BlockingCollection<T>.TryTake Add corresponding unit test 2010-12-07 11:24:03 +01:00
Atsushi Eno 44ceb84e44 Implemented XData support in XamlObjectWriter. 2010-12-07 18:09:56 +09:00
Atsushi Eno c807359587 Implement XData support in XamlXmlReader. 2010-12-07 17:08:49 +09:00
Atsushi Eno b202524c5d XData support in XamlXmlWriter. 2010-12-07 16:46:53 +09:00
Atsushi Eno dacee05e27 Implemented XData object reader support. Add missing test files. 2010-12-07 16:23:53 +09:00
Atsushi Eno c3ac00fbd9 Add another couple of IXmlSerializable tests. 2010-12-07 15:32:58 +09:00
Gonzalo Paniagua Javier 86b5d36c9d Fix Process.HasExited regression
When we have a pseudo handle, we can at least check whether the process
	is alive or not, instead of always returning FALSE.

	Fixes bug #650979.
2010-12-06 19:54:21 -05:00
Geoff Norton a76b4352ab Ensure we save and restore the gstate 2010-12-06 14:40:25 -05:00
Zoltan Varga 132ac62026 Fix a few SRE memory leaks. 2010-12-06 19:50:45 +01:00
Gonzalo Paniagua Javier 608fb833b3 Workaround bug in AcquireWriterLock
AcquireWriteLock should be the same as UpgradeToWriterLock when the
	thread is already a reader.

	Fixes bug #656850.
2010-12-06 13:18:33 -05:00
Zoltan Varga 67b98dce9f Remove some #ifdef HAVE_SGEN_GC deps, centralize others to gc-internal.h. 2010-12-06 18:00:40 +01:00
Jérémie Laval be41cdb078 [System.Xml] Enable existing API under 4.0 profile too 2010-12-06 16:07:27 +00:00
Marek Safar 0296eeab1c Refactor assemblies loading into a base class 2010-12-06 15:40:15 +00:00
Marek Safar 256d7bf69f Move more fields to RootContext 2010-12-06 15:40:15 +00:00
Marek Safar c0aa5eb5da Removed obsolete files 2010-12-06 15:40:14 +00:00
Marek Safar 0604d35f7f Use type definition for generic type forwarders 2010-12-06 15:40:14 +00:00
Marek Safar c526008a23 Don't close same type twice when base call closes this declaration 2010-12-06 15:40:13 +00:00
Jonathan Pryor 42d1957cfc [mono.options] Ensure that IEnumerators are disposed.
It's possible that the IEnumerable<string> that
OptionSet.ArgumentEnumerator is enumerating may be generated via
'yield return', in which case any method `finally` blocks are moved
into the IDisposable.Dispose() method.

To ensure proper resource cleanup, we need to make sure that Dispose()
is called on the IEnumerator<string>s.
2010-12-06 08:11:03 -05:00
Atsushi Eno 491de14adb Add missing xml file. 2010-12-06 21:52:59 +09:00
Atsushi Eno cb14a2be9a Finally got XData tests that make sense. Implemented IsXData. 2010-12-06 21:52:06 +09:00
Atsushi Eno cd1f840f10 Enable another test. 2010-12-06 20:36:24 +09:00
Marek Safar fe29d17c48 Use Version type instead of string value 2010-12-06 11:19:28 +00:00
Marek Safar d53b2fe21a Use decimal optional parameter value decoded by System.Reflection 2010-12-06 11:19:28 +00:00
Marek Safar e5d8bddb52 Extract reflection specific code from extended builder 2010-12-06 11:19:27 +00:00
Marek Safar 4774e3e459 Move assembly security declaration to extened builder 2010-12-06 11:19:27 +00:00
Marek Safar 395db913f9 Don't call module symbol writer methods when we are not using it 2010-12-06 11:19:27 +00:00
Atsushi Eno 18ce69f876 Add missing files. 2010-12-06 20:17:48 +09:00
Atsushi Eno ddda7df985 Implemented Reference resolution in XamlObjectWriter. 2010-12-06 20:16:41 +09:00
Geoff Norton 9bf59d4882 Ensure we properly translate the CTM for NSView's when dealing with flipped views
Patch from James Clancey <[email protected]>
2010-12-05 14:22:00 -05:00
Zoltan Varga 872235153f Make sgen-protocol.c into its own module. 2010-12-05 17:53:03 +01:00
Zoltan Varga 56aeb59b9b Call mini_parse_debug_options () earlier. 2010-12-05 17:18:42 +01:00
Zoltan Varga 226f73e539 Add more logging to the soft debugger code. 2010-12-05 12:17:49 +01:00
Zoltan Varga 82e184a141 Fix a debug log message in the soft debugger. 2010-12-05 10:42:57 +01:00
Gonzalo Paniagua Javier e5074473d6 Handle closed sockets in the callbacks
Accept returns a Socket in AcceptSocket even when the listener is closed.
	Handle ObjectDisposedException for the other callbacks.

	Fixes bug #657593.
2010-12-04 23:29:14 -05:00
Jonathan Pryor 4c1daa9b8c [mdoc] Response file cleanup.
Use Mono.Options.ResponseFileSource instead of implementing response
file parsing manually.
2010-12-04 23:09:41 -05:00
Miguel de Icaza 43dba6d2a5 Add part3 of the Google GCI 2010 contributions 2010-12-04 18:01:54 -05:00
Joe Dluzen c740b96462 Fix for #656021. 2010-12-04 17:27:15 -05:00
Zoltan Varga 2d9639a029 Remove a dead variable. 2010-12-04 12:15:15 +01:00
Zoltan Varga cb5c7bd1ad Set MONO_PATH while running the profiler tests. 2010-12-04 10:53:58 +01:00
Zoltan Varga 0deed69d16 Disable a test which breaks under AOT. 2010-12-04 10:19:40 +01:00
Zoltan Varga e267deacc0 Fix a warning. 2010-12-04 09:36:35 +01:00
Zoltan Varga 9b401295ce Really fix the ia64 build. 2010-12-04 09:35:26 +01:00
Zoltan Varga 095f5317ba Fix ia64 build. 2010-12-04 09:24:15 +01:00
Zoltan Varga 76aeccbcfa Hopefully fix the ia64 libgc build. 2010-12-04 09:18:57 +01:00
Zoltan Varga 4945c44282 Fix make check in profiler/. 2010-12-04 08:41:25 +01:00
Rodrigo Kumpera 2cca6f16e4 Fix dynamic type string validation.
* verify.c (do_ldstr): We encode string tokens in a weird
	way in dynamic modules.
2010-12-03 19:43:21 -02:00
Rodrigo Kumpera d8e2846754 Handle one more case we cmods can appear in odd places. 2010-12-03 18:43:18 -02:00
Rodrigo Kumpera 64314629be Merge branch 'master' of github.com:mono/mono 2010-12-03 18:17:43 -02:00
Andreia Gaita cbeaf9a556 [Moon] include cecil when building mono for moon 2010-12-03 18:12:44 +00:00
Zoltan Varga bc9b369713 Remove unused lmf->ebp field on ia64. 2010-12-03 18:59:43 +01:00
Rodrigo Kumpera 5b26dcb28d Fix validation of cmods in some odd places.
* metadata-verify.c (parse_generic_inst): A ginst
	param can have a cmod.

	* metadata-verify.c (parse_param): We can have a cmod
	after the byref.

	* metadata-verify.c (parse_property_signature): A property
	signature can have a cmod on the parameters.

	Fixes the verifier for #656787
2010-12-03 15:31:20 -02:00
Jérémie Laval d0bc2ba835 Fixicate some unit test 2010-12-03 16:59:44 +00:00
Jérémie Laval a85f4ab07d [Task scheduler] Change waiting layout/wakeup point and use adaptative deep sleeping 2010-12-03 16:59:43 +00:00
Jérémie Laval 890702e6c9 [Task Scheduler] Revisit Task waiting in Scheduler using ManualResetEventSlim 2010-12-03 16:59:43 +00:00
Jérémie Laval 306a286962 [Task Scheduler] Track re-entrant call to WorkerMethod from normal ThreadWorker and make them use their deque 2010-12-03 16:59:42 +00:00
Zoltan Varga 082354743d Remove unused nunit.key file. 2010-12-03 15:00:50 +01:00
Zoltan Varga 443fd47847 Add a 'check' target to mcs/tests. 2010-12-03 14:32:48 +01:00
Mark Probst e6bf58477f Merge branch 'concurrent-sweep' 2010-12-03 13:51:38 +01:00
Mark Probst 08c58ba733 [sgen] Make concurrent sweep user-selectable.
It's off by default for now.
2010-12-03 13:51:31 +01:00
Mark Probst 641acd60b1 [sgen] Compute allowance when sweeping is finished.
Before sweeping hasn't finished we don't know how many major blocks
are in use, so we delay computing the minor collection allowance until
sweeping is done.  In the mean time we use the minimum allowance.
2010-12-03 13:51:31 +01:00
Mark Probst bc00e94e01 [sgen] Concurrent sweep. 2010-12-03 13:51:30 +01:00
Marek Safar f75c7bad75 Delay initialization of missing methods needed by symbol writer 2010-12-03 12:31:39 +00:00
Marek Safar 31f1a2a1ff Apply implicit parameter attributes using standard path to avoid any duplicates 2010-12-03 12:31:38 +00:00
Jérémie Laval 2a90fa3856 [Task] Slight tweak of WaitAny unit test 2010-12-03 12:07:19 +00:00
Jérémie Laval 587c9336fc [Task] Add an extra check in Task.WaitAny to make sure the index returned is valid 2010-12-03 12:07:18 +00:00
Jérémie Laval 72e6e904a5 [Task] Dumb bugfix when checking timeout in Task.WaitAny 2010-12-03 12:07:18 +00:00
Zoltan Varga e672d0b45b Fix another AOT crash if a signature cannot be loaded. 2010-12-03 12:18:49 +01:00
Zoltan Varga 9d422eaf8b Parse custom modifiers in mono_type_create_from_typespec (). 2010-12-03 11:32:27 +01:00
Marek Safar 578e0521a6 Don't throw an obsolete exception 2010-12-03 10:13:03 +00:00
Marek Safar 7f9de67b68 More symbol writer clean-up 2010-12-03 10:13:02 +00:00
Marek Safar 7a64aa0a6c Test files update 2010-12-03 10:13:01 +00:00
Zoltan Varga 6a3135719c Revert a warning fix as it breaks the windows build. 2010-12-03 11:07:19 +01:00
Zoltan Varga 750b664908 Fix a crash in the AOT compiler if a method cannot be loaded. 2010-12-03 10:32:52 +01:00
Atsushi Eno af690f806a name resolver could also be name provider. 2010-12-03 18:24:38 +09:00
Atsushi Eno 4c3566e2cc Split internal base class into new file. 2010-12-03 18:24:16 +09:00
Atsushi Eno 005843a956 Rename source. 2010-12-03 16:56:56 +09:00
Atsushi Eno 4e6a0acd83 Now object reader returns PositionalParameters for non-root Reference objects. 2010-12-03 13:13:52 +09:00
Zoltan Varga 269cd91b37 Fix warnings. 2010-12-02 21:27:08 +01:00
Zoltan Varga 5f346ea87f Disale logging profiler. 2010-12-02 21:23:42 +01:00
Atsushi Eno 50f1efa781 Implemented reference support (almost working, except for Reference contents).
There are several refactorings as well as some hacky workarounds to avoid
wrong saving of names. References should return PositionalParameters, but
in the standalone tests they don't return it, so I have to sort both out.
Enabled xml writer tests as they are working.
2010-12-03 03:30:22 +09:00
Atsushi Eno 7bffa51bb0 Members are not ordered by collection kind. 2010-12-03 03:16:45 +09:00
Jérémie Laval 01a0ef45a8 [PLinq] Wrap PLinq processing task body in a try/finally so that endAction is always called no matter what happen. 2010-12-02 14:02:56 +00:00
Jérémie Laval 96bf5ac961 [PLinq] Cleanup and prettify code from earlier commit 2010-12-02 14:02:56 +00:00
Zoltan Varga 73e34fb96c Include alloca.h into glib.h if needed. 2010-12-02 14:32:29 +01:00
Zoltan Varga efee7a14a8 Make the debugger agent at least compile on the ps3. 2010-12-02 14:32:29 +01:00
Mark Probst b00b16d5dd [sgen] Remove skip_size in sgen-scan-object.h.
Dead code.
2010-12-02 14:07:54 +01:00
Mark Probst 9b1da29cff [sgen] Handle forwarding in mono_gc_scan_for_specific_ref().
This function is used for debugging purposes only.  Previously it
didn't handle forwarding which meant that it couldn't be used during a
collection.
2010-12-02 14:07:53 +01:00
Mark Probst a0512964fa [sgen] Zero freed blocks in fixed heap Mark&Sweep.
Fresh blocks must be zeroed, which means that when we free blocks we
must ensure that they are zeroed before they are used again.
2010-12-02 14:06:54 +01:00
Jb Evain e445dde4c4 [ilasm] fix the metadata version for v4 assemblies 2010-12-02 13:21:16 +01:00
Marek Safar c0825e5b1a Don't try to parse invalid namespace declarations, it does more harm than good 2010-12-02 12:10:28 +00:00
Marek Safar 89d372ff9f Update setting of buildin internal types 2010-12-02 12:10:27 +00:00
Marek Safar 420704e733 Removed InitOptionalCoreTypes 2010-12-02 12:10:27 +00:00
Marek Safar ba80f08479 Clean-up module indirections 2010-12-02 12:10:26 +00:00
Marek Safar 34bcf18ec1 Move all predefined types to module to work with any mscorlib 2010-12-02 12:10:26 +00:00
Marek Safar f46d143602 Move references loading into a new class 2010-12-02 12:10:25 +00:00
Marek Safar 99aa664204 Move AssemblyResource to assembly.cs 2010-12-02 12:10:25 +00:00
Zoltan Varga 25e2360f3c Fix a typo. 2010-12-02 12:10:00 +01:00
Atsushi Eno 0970775137 Make room for XamlNameResolver in XamlObjectReader, and some related changes. 2010-12-02 19:51:00 +09:00
Jérémie Laval 599332d0e9 [SafeHandle] Fixing docs 2010-12-02 10:40:09 +00:00
Zoltan Varga a34f2115de Allow breakpoints set using --break in wrappers. 2010-12-02 10:53:57 +01:00
Zoltan Varga 4ad39d8a8e Move the identical MonoLMFExt declarations to mini.h. 2010-12-02 10:53:34 +01:00
Zoltan Varga 0413d434af Split the exception handling code into test_only and !test_only passes, ending up with two simpler/shorter functions. 2010-12-02 08:23:10 +01:00
Zoltan Varga dc02f96de9 Revert "Fix the OSC build breakage by only compiling mach_dep.c on openbsd."
This reverts commit 103450e4a2.
2010-12-02 07:06:49 +01:00
Jérémie Laval 2c5ff41b8b [SafeHandle] Add bits of documentation 2010-12-01 20:00:53 +00:00
Jérémie Laval 4f56dfeaa3 [SafeHandle] Make success parameter setting atomic wrt async exception in DangerousAddRef 2010-12-01 20:00:52 +00:00
Jérémie Laval 0597ee873f [SafeHandle] Protect Close against asynchronous exceptions 2010-12-01 20:00:52 +00:00
Miguel de Icaza 92537e6841 Documentation for Mono.Cairo contributed by knairda from Google GCI 2010 2010-12-01 15:00:17 -05:00
Zoltan Varga 103450e4a2 Fix the OSC build breakage by only compiling mach_dep.c on openbsd. 2010-12-01 17:53:48 +01:00
Paolo Molaro 3be9f5a036 Log profiler: fixed allocation and call frames end detection in test runner. 2010-12-01 17:20:26 +01:00
Zoltan Varga a89bde9974 Save the original throw context into TLS so stack walks done from profiler functions work during exception handling. 2010-12-01 17:05:30 +01:00
Jb Evain 9aa0e189bf Update Mono.Cecil 2010-12-01 16:46:46 +01:00
Jb Evain e8312cb428 Add script to update Cecil from upstream 2010-12-01 16:46:22 +01:00
Paolo Molaro 5c80e3f0b9 Fixed env path setting. 2010-12-01 15:46:45 +01:00
Jérémie Laval ff80eb8f67 [ReaderWriterLockSlim] Fix for #656353. Add corresponding unit test.
When in SupportsRecursion mode, a test was not including proper state check for short-circuiting.
2010-12-01 14:38:28 +00:00
Zoltan Varga 5f99c02058 Add an asm (""); to the body of __jit_debug_register_code () to prevent gcc from
eliminating calls to it.
2010-12-01 15:34:12 +01:00
Paolo Molaro 0dd2944adc Log profiler: added test suite. 2010-12-01 15:16:23 +01:00
Zoltan Varga c92c8ca51a Export mono_xdebug_flush (). 2010-12-01 14:38:58 +01:00
Zoltan Varga 0422028f37 Make sgen-los.c into a proper C module. 2010-12-01 14:04:48 +01:00
Rodrigo Kumpera a8967d719a Fix thread attaching 2010-12-01 09:55:42 -02:00
Zoltan Varga fc41d5457f Move the DEBUG() macro to sgen-gc.h and resurrect debug logging in the major collectors. 2010-12-01 06:21:56 +01:00
Jonathan Pryor 08fb9274e6 Add response file suport to Mono.Options.
Response file support is an "opt-in" feature, performed by adding a
ResponseFileSource to the OptionSet initialization logic:

	var p = new OptionSet () {
		// normal options here...
		new ResponseFileSource (),
	};

Response files make use of the new "ArgumentSource" support, which
acts as a low-level argument pre-processor, allowing processing of
arguments _before_ Option processing is performed.
2010-12-01 00:09:02 -05:00
Zoltan Varga 94d81ebabe Fix some warnings. 2010-12-01 05:55:57 +01:00
Zoltan Varga 4a6436228a Emit write barriers for multi-dim Array.Set (). Fixes #656128. 2010-12-01 05:53:04 +01:00
Zoltan Varga f53f97f17e Handle LOS objects in describe_ptr (). 2010-12-01 05:53:04 +01:00
Rodrigo Kumpera efb1035d49 Fix a few more cases of bad token verification.
* verify.c (do_load_function_ptr): Handle wrappers
	correctly.

	* verify.c (do_sizeof): Remove superfluous check.

	* verify.c (do_ldstr): Handle wrappers correctly.
2010-12-01 01:28:00 -02:00
Rodrigo Kumpera 3cec452ea0 Add regression test for #647267 2010-12-01 01:10:13 -02:00
Rodrigo Kumpera 1f3cfba319 Marshal char taking Charset into account.
* metadata.c (mono_type_to_unmanaged): Return
	the appropriate type for char based on unicode option.

	* marshal.c (emit_marshal_array): Calculate char size
	based on marshaling preferences.

	Fixes #647267
2010-12-01 01:10:13 -02:00
Marek Safar 5a0a50c4e6 Tests update 2010-11-30 19:09:59 +00:00
Marek Safar ff24d36495 Import parameter default values using TypeCode 2010-11-30 18:07:36 +00:00
Marek Safar 0e929b2901 Remove remaining typeof 2010-11-30 18:07:35 +00:00
Marek Safar 458d211f26 Read dynamic attribute using CustomAttributeData 2010-11-30 18:07:35 +00:00
Rodrigo Kumpera cb34f150bd Add mono_gc_alloc_mature and use it for threads.
* gc.c: Implement mono_gc_alloc_mature
	for boehm and null-gc.

	* sgen-gc.c (mono_gc_alloc_mature): Alloc
	using the degrated machinery.

	* threads.c (create_internal_thread_object):
	Alloc using mono_gc_alloc_mature instead of
	mono_gc_alloc_pinned_obj as the later requires
	explicit freeing and we don't do it.

	* threads.c (create_thread_object): Ditto.
2010-11-30 15:24:48 -02:00
Rodrigo Kumpera 80e7e4d92b Check for null and valuetypes.
* CustomAttributeBuilder.cs (Initialize): Check if we are
	not passing null as values to valuetypes as this is invalid.

	Fixes #515938
2010-11-30 14:54:27 -02:00
Atsushi Eno 2dbfcf82b3 Add name reference tests to all readers/writers. 2010-12-01 01:15:03 +09:00
Rodrigo Kumpera f021e2d50c Fix a crash when signature decoding fails.
* class.c (check_interface_method_override): Check if
	signatures decoded correctly before comparing them.

	Fixes #541815
2010-11-30 14:19:16 -02:00
Rodrigo Kumpera 8329b73d6a Fix the ldftn to ldvirtftn feature.
* mini-trampolines.c (mono_delegate_trampoline): A ldftn
	is only to be promoted to a ldvirtftn if the target method
	belongs to an abstract class. This fixes mcs/test/test-283.
2010-11-30 14:06:53 -02:00
Rodrigo Kumpera fc623f7976 Merge branch 'master' of github.com:mono/mono 2010-11-30 14:06:26 -02:00
Rodrigo Kumpera 829bbe716b Fix token checking for dynamic methods. 2010-11-30 14:05:54 -02:00
Atsushi Eno c69f828983 Add test xml files. 2010-12-01 00:30:56 +09:00
Atsushi Eno dfe010dd6b Add name reference test (not working). 2010-12-01 00:30:23 +09:00
Marek Safar 5509a08459 Emit optional default value-type parameter using nullref 2010-11-30 13:27:11 +00:00
Marek Safar 8bd95230a0 Move core predefined types into a new class 2010-11-30 13:27:10 +00:00
Marek Safar cb893c6e02 Add initial reflection dependant code 2010-11-30 13:27:09 +00:00
Marek Safar 58d5ce4740 Move metadata importer out of compiler context finally 2010-11-30 13:27:09 +00:00
Marek Safar 3f2369465d New test 2010-11-30 13:27:08 +00:00
Atsushi Eno 85b1b8fe4c Add another XData test case.
Though I wonder how to serialize XData then... :-?
2010-11-30 20:06:58 +09:00
Atsushi Eno 750111da31 empty namespace should be successfully parsed. 2010-11-30 20:03:38 +09:00
Paolo Molaro 30cba27527 Log profiler: BSD/win32 portability fixes. 2010-11-30 11:05:18 +01:00
Atsushi Eno f0f0363306 Call GetObject only once per current member.
Previous code was errorneous if there is an array inside a collection.
2010-11-30 18:22:11 +09:00
Atsushi Eno 584bf41795 Fill List's implementation details gap. 2010-11-30 15:45:43 +09:00
Atsushi Eno b548698ac7 Do not retrive properties with get parameters (indexers). 2010-11-30 15:40:19 +09:00
Atsushi Eno 4c473e946d Add another test xml file. 2010-11-30 15:20:03 +09:00
Atsushi Eno 7fddb7b82d Add another reader/writer test, for List of Array. 2010-11-30 15:19:09 +09:00
Atsushi Eno 8e68020156 Renamed test files. 2010-11-30 14:48:47 +09:00
Atsushi Eno 09f8e62fdb Extract XamlObjectReaderTest class into another file. Files are to be renamed. 2010-11-30 14:45:17 +09:00
Sebastien Pouliot bc1786b120 Fix randomly failing unit test
* MachineKeySectionUtilsTest.cs: Do not assume xor will change a byte
2010-11-29 22:21:52 -05:00
Jb Evain d368e0a10a Add MakeBinary test for ArrayIndex expressions 2010-11-29 22:51:55 +01:00
Daniel Sell 16a8d26971 Fix Expression.MakeBinary so it can return ArrayIndex nodes 2010-11-29 22:51:55 +01:00
Rodrigo Kumpera 698a624756 Don't allow zero index tokens on IL streams.
* verify.c (token_bounds_check): Check if token index is zero.

	Fixes #651682
2010-11-29 19:59:00 -02:00
Marek Safar 703f261159 Check imported custom attributes based on name only 2010-11-29 21:39:51 +00:00
Marek Safar 0957822510 Made type member kind logic more flexible 2010-11-29 21:39:50 +00:00
Marek Safar 088b9fe91b Don't special case value type constraint 2010-11-29 21:39:50 +00:00
Marek Safar 54414050be Add sanity check for imported static fixed buffer 2010-11-29 21:39:50 +00:00
Rodrigo Kumpera 893e7e86ea Remove some junk I left by accident 2010-11-29 19:25:57 -02:00
Rodrigo Kumpera ec3898cea2 Fix crasher in core clr security.
* security-core-clr.c (get_default_ctor): Handle nulls in
	MonoClass::methods.

	Fixes #569542
2010-11-29 19:20:42 -02:00
Rodrigo Kumpera f56e8be2b8 Don't mono_class_init when creating a token.
* reflection.c (mono_image_create_token): Don't mono_class_init
	here as it's not needed and break mcs for cases doing
	typeof() over broken types.

	Fixes a TLE in #653211
2010-11-29 19:06:54 -02:00
Rodrigo Kumpera 1e92545179 WIP 2010-11-29 18:13:44 -02:00
Mark Probst 9cd7fe19b4 [sgen] Recompute heap boundaries at each major collection.
Previously we updated heap boundaries when a new block was allocated,
but no updates were performed for freed blocks, resulting in a
constant increase in the heap boundaries which can lead to unnecessary
work during pinning.

Now we recompute the heap boundaries during the sweep phase at each
major collection.
2010-11-29 18:02:32 +01:00
Zoltan Varga 8d27217915 Fix amd64 build. 2010-11-29 17:34:10 +01:00
Paolo Molaro eaa896a4ee Forgot old header file in profiler.c. 2010-11-29 17:17:12 +01:00
Paolo Molaro ac5079864b Make dist fixed in profiler. 2010-11-29 17:17:11 +01:00
Rodrigo Kumpera 24ea1f06e8 Fix a crash on MassTransit.
* class.c (make_generic_param_class): Don't assert if parent
	is broken.

	Fixes #653211
2010-11-29 14:23:24 -02:00
Robert Nagy 065506369b Add support for the internal boehm-gc on OpenBSD 2010-11-29 17:05:46 +01:00
Robert Nagy f2e095f92c Add support for the internal boehm-gc on OpenBSD 2010-11-29 17:05:46 +01:00
Paolo Molaro 9360ad43cd Profiler: reomved the old builtin default profiler.
The new log profiler is now used automatically instead of the old
default profiler.
2010-11-29 16:17:10 +01:00
Paolo Molaro 09c883c9bb M linux performance counters.
Added missing file for
2010-11-29 16:17:10 +01:00
Atsushi Eno 1a5e666592 Support attribute validation. 2010-11-30 00:10:36 +09:00
Atsushi Eno 960484aa14 Use AttributeSchemaType as it is 2.0 API. This fixes incorrectly skipped type validation. 2010-11-30 00:09:13 +09:00
Atsushi Eno d0f2492f2b Handle more type conversion. 2010-11-30 00:08:40 +09:00
Paolo Molaro deb5bf02c9 Log profiler: portability checks. 2010-11-29 15:44:56 +01:00
Paolo Molaro 015ecaf0a9 Log profiler: added statistical sampling mode.
* man/mprof-report.1, log-profiler.txt: updated the documentation.
* decode.c: added jit report and sample report.
* proflog.h, proflog.c: implemented statistical sampling mode, using
either the mono built-in signal based sampling and the Linux
perforamnce counters perf subsystem. Unmanaged symbols are
currently available for ELF systems implementing dl_iterate_phdr()
or systems implementing dladdr().
2010-11-29 15:44:55 +01:00
Atsushi Eno 487f4c0518 Implemented XDocument.Validate(). 2010-11-29 21:39:16 +09:00
Atsushi Eno 26eaa08958 Return different instances of XmlSchemaInfo for each validated node in XmlSchemaValidatingReader. 2010-11-29 21:36:50 +09:00
Atsushi Eno 960aaaecbb TypeExtension and StaticExtension should now be correctly written and read. 2010-11-29 20:33:55 +09:00
Atsushi Eno c3f95e8ad2 Refactoring Instance handling for consistent MarkupExtension reading.
Removed tricky GetWrappedValue() while attempting to reduce its use (could
totally remove it out) to identify which parts these readers and writers need
it. Now It is in TypeExtensionMethods. Still needs fix for StaticExtension.

Add another tricky test case: List of Array (not working) which also involves
MarkupExtension.
2010-11-29 16:13:46 +09:00
Miguel de Icaza 10cae3d65c Awesome doc contributions from Adrian Kummerlaender 2010-11-28 11:14:52 -05:00
Miguel de Icaza 830f830936 Awesome doc contributions from Adrian Kummerlaender 2010-11-28 11:12:38 -05:00
Rodrigo Kumpera 3138b27d0c Enable test for #318677 2010-11-27 16:12:07 -02:00
Rodrigo Kumpera 98656625d3 Handle fallthru to out of line blocks.
* mini.c (mini_method_compile): Add a BR to all basic blocks
	that fallthru blocks that are out of line.

	* branch-opts.c (mono_optimize_branches): Don't eliminate
	a BR to the next block if is out of line.

	Fixes #318677
2010-11-27 16:12:07 -02:00
Zoltan Varga 9959e8193d Disable finally_guard.exe on amd64 until it is fixed. 2010-11-27 09:17:54 +01:00
Rodrigo Kumpera 9d15836e9e Fix corlib regression 2010-11-27 03:20:29 -02:00
Rodrigo Kumpera 96c8bf1560 Remove some culture caching dead code 2010-11-27 03:05:50 -02:00
Rodrigo Kumpera 0a609bf3de Move culture handling to Thread from InternalThread.
* Thread.cs: Move culture data from InternalThread to Thread
	and thus completely avoid the whole caching and serialization
	nightmare. Even thou this is a cleanup it should speed up
	multi-appdomain setups.

	* threads.c: Remove culture caching machinery.

	* icall-def.h: Ditto.

	Fixes #318750 as a byproduct.
2010-11-27 02:56:37 -02:00
Zoltan Varga 2cb7171648 Fix an aot crash if field->type is not initialized. 2010-11-27 04:00:21 +01:00
Rodrigo Kumpera 7da662cbf1 Add regression test for #317488 2010-11-27 00:13:52 -02:00
Rodrigo Kumpera 37f76dda09 Handle another extension to delegates.
* mini-trampolines.c (mono_delegate_trampoline): Handle the
	case of a delegate created with ldftn on which the method token
	points to an abstract method. This case behaves in the same way
	as ldvirtftn.

	Fixes #317488
2010-11-27 00:13:52 -02:00
Zoltan Varga 26cd7771a3 Throw an exception if a custom attr cannot be decoded. Fixes #656058. 2010-11-27 02:31:05 +01:00
Zoltan Varga 6e096b6424 Update the help message for --verify-all. 2010-11-27 01:53:58 +01:00
Zoltan Varga 187071319e Define MONO_ARCH_INIT_TOP_LMF_ENTRY for all architectures. 2010-11-26 22:43:52 +01:00
Zoltan Varga 3878943126 Merge branch 'master' of github.com:mono/mono 2010-11-26 16:28:09 -05:00
Zoltan Varga 5833e55fde Remove unused lmf->ebp field on arm. 2010-11-26 16:24:23 -05:00
Rodrigo Kumpera a5a1271ae2 Fix typo 2010-11-26 15:42:05 -02:00
Rodrigo Kumpera 5206bfdb3f Fix those tests so they are verifiable. 2010-11-26 15:30:16 -02:00
Rodrigo Kumpera a450df6584 Check TOS for compatibility with return type.
* method-to-ir.c (mono_method_to_ir): Check if TOS
	is store compatible with the return type of the
	current method.

	Fixes #655497
2010-11-26 15:30:15 -02:00
Rodrigo Kumpera af989eedd7 Handle dynamic methods inside the verifier.
* verify.c (mono_verifier_is_enabled_for_method):
	A dynamic method has a different wrapper kind than regular
	methods.

	* verify.c (mono_verifier_is_method_full_trust): Dynamic
	methods can't be handled as fulltrust since they don't
	store proper origin for verifying it.

	* mini.c (mini_assembly_can_skip_verification): Dynamic
	methods have a different wrapper kind than regular
	methods.

	FIxes #655497 under sandbox.
2010-11-26 15:30:15 -02:00
Jérémie Laval 057b5e88d7 [Task] In every TaskFactory method accepting a Task array, we have to make a private copy to avoid changes to the array content from the moment we register the continuation to when we call the callback 2010-11-26 16:54:38 +00:00
Jérémie Laval 8543749882 [Task] Check if Task isn't finished before going into the Scheduler for Wait 2010-11-26 16:54:37 +00:00
Jérémie Laval db76564321 [Task] Set continuation status to WaitingForActivation in ContinueWithCore 2010-11-26 16:54:37 +00:00
Jérémie Laval 14d5a91386 [Task] Only launch continuation synchronously when the corresponding option in TaskContinuationOptions is set 2010-11-26 16:54:37 +00:00
Marek Safar de057f1261 Removed few custom attribute IsDefined calls 2010-11-26 16:29:22 +00:00
Marek Safar b600deb8ac Import constants using their raw values only 2010-11-26 16:29:21 +00:00
Jérémie Laval 34f14e5178 [PLinq] Split long running test in two 2010-11-26 14:10:04 +00:00
Jérémie Laval 7e01c4b1be Adjust sleeping values 2010-11-26 14:10:04 +00:00
Jérémie Laval b1a85944f4 [PLinq] Remove double delegate cost when non indexed in SelectMany query node 2010-11-26 14:10:04 +00:00
Jérémie Laval a7cdfb1717 Remove debugging spew wrongly introduced by earlier commit 2010-11-26 14:10:03 +00:00
Zoltan Varga 0b61d882f8 Avoid parsing of /proc entries on ppc when cross-compiling. 2010-11-26 12:04:23 +01:00
Zoltan Varga e428a72101 Avoid emitting uninitialized memory into the AOT image. 2010-11-26 12:04:23 +01:00
Marek Safar b5814de79b New test 2010-11-26 10:27:27 +00:00
Marek Safar 11ee375aa0 [655766] Encode string null attribute argument 2010-11-26 10:21:23 +00:00
Marek Safar d27d548298 Cleanup typed constants 2010-11-26 09:48:50 +00:00
Marek Safar 5e61ba899a Switch symbol writer to public api 2010-11-26 09:08:12 +00:00
Marek Safar a153d37792 More using cleanup 2010-11-26 09:08:11 +00:00
Marek Safar 0b1c3915fb Remove TypeBuilder from DefineType 2010-11-26 09:08:11 +00:00
Marek Safar 9e7dfae4e0 Unify System.Reflection usings 2010-11-26 09:08:11 +00:00
Atsushi Eno d488e78c06 Add missing test xml files. 2010-11-26 17:39:41 +09:00
Atsushi Eno 65309c4336 Add List of Type test case, and some FIXMEs. 2010-11-26 17:38:54 +09:00
Atsushi Eno ab1b6bb932 Add not-working tets for some MarkupExtension wrapper types. 2010-11-26 16:31:48 +09:00
Zoltan Varga baab2d8f6e Make Int32.MinValue/-1 throw OverflowException on ppc too. 2010-11-26 08:08:27 +01:00
Zoltan Varga 9a339cd1a6 Fix the DISABLE_REFLECTION_EMIT build. 2010-11-26 07:46:28 +01:00
Zoltan Varga db95700614 Fix crashes inside find_method_in_metadata (). Fixes #561728. 2010-11-26 07:27:34 +01:00
Atsushi Eno f166d738ba Do not add 'zzz' to all DateTime formats blindly. Fixed bug #655089. 2010-11-26 14:36:31 +09:00
Zoltan Varga c9b1c06718 Update a http link. 2010-11-26 04:09:29 +01:00
Zoltan Varga 204e0b693a Use $build instead of $target in a few places in configure.in, $target is about building cross compilers, not cross compiling itself. 2010-11-26 03:44:44 +01:00
Zoltan Varga 55525710c5 Commit the iphone abi support changes for ARM. 2010-11-26 03:41:29 +01:00
Zoltan Varga c3a36eac1f Simplify the arm prolog/epilog generation by not saving the sp to the stack, its not needed. 2010-11-26 03:09:19 +01:00
Zoltan Varga 907cf62694 Implement frame pointer elimination for arm. 2010-11-26 01:25:22 +01:00
Zoltan Varga b8aabd1d8e Fix stack alignment when resuming from a signal handler in the soft debugger. Fixes #647464. 2010-11-25 23:32:20 +01:00
Rodrigo Kumpera 5ca6fa9e22 Add regression test for #655741 2010-11-25 20:23:16 -02:00
Rodrigo Kumpera eac32c3cb1 Handle abstract methods in Delegate::CreateDelegate.
* icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
	CreateDelegate can be called with an abstract method in a
	similar fashion to how ldvirtftn works.

	Fixes #655741
2010-11-25 20:23:16 -02:00
Zoltan Varga c34cc3d465 Fix another place. 2010-11-25 22:50:12 +01:00
Zoltan Varga 6a033df32c Throw an OverflowException on Int32.MinValue/-1 when using the JIT icall too. 2010-11-25 22:48:20 +01:00
Zoltan Varga 1b679bc5aa Fix a bug introduced by the last change to mono_marshal_get_virtual_stelemref () in r038598e503d3db631224288ca5295988c3d22288. 2010-11-25 22:37:04 +01:00
Rodrigo Kumpera eb2fd8e1f0 Add regression test for #655847 2010-11-25 14:25:18 -02:00
Rodrigo Kumpera cf1ec146f7 Handle invalid instantiation of generic methods.
* verify.c: Add new function to internal verifier API to check
	method instantiations.

	* reflection.c (mono_reflection_bind_generic_method_parameters):
	Check the instantiation before returning it.

	Fixes #655847
2010-11-25 14:23:31 -02:00
Rodrigo Kumpera 1ea8e3951f Fix argument name on the exception 2010-11-25 14:23:11 -02:00
Rodrigo Kumpera aef40673ca Add regression test for #655669 2010-11-25 12:28:01 -02:00
Rodrigo Kumpera 5f29a18825 Store the domain id of weak references.
* gc.c (alloc_handle): Set domain_ids if it's a weak ref handle.

	* gc.c (mono_gchandle_set_target): Ditto.

	Fixes #655669
2010-11-25 12:28:01 -02:00
Atsushi Eno 33b3d8e04e Remove extra CWL. 2010-11-25 12:26:50 +09:00
Atsushi Eno 7638efab1a Add refresh XamlObjectWriter implementation.
This writer can process a lot more xaml inputs. It is now unified to
XamlXmlWriter, sharing some internals (already existed in XamlXmlWriter.cs).

Had to disable a few minor tests that used to pass for invalid inputs.
2010-11-25 12:24:35 +09:00
Atsushi Eno c7343a4dab More changes for XamlObjectWriter unification. 2010-11-25 12:24:06 +09:00
Atsushi Eno 49ccd46080 Eliminate XamlObjectWriter-dependent test lines. 2010-11-25 12:23:33 +09:00
Atsushi Eno 43a09ea661 ParseNameList() failed to parse nested generic type names. 2010-11-25 11:29:35 +09:00
Marek Safar 01e525697b Recover from broken for statement 2010-11-24 20:25:34 +00:00
Marek Safar 9940f0880a Inflate imported type arguments types with type definition type arguments 2010-11-24 18:29:59 +00:00
Jb Evain 040767a806 Port mcs/tests to cecil-light 2010-11-24 18:32:59 +01:00
Jérémie Laval 93c081c5ee Add a fast path in EnumerablePartitioner for strip partitioning 2010-11-24 17:21:57 +00:00
Jérémie Laval 4c3c83de9c [PLinq] Remove layer of unneeded indirections in OrderingEnumerator 2010-11-24 17:21:57 +00:00
Jérémie Laval f3b15f2ab8 [PLinq] Fix the mess out of SelectMany node and speed it up (avoid Tuples creation) 2010-11-24 17:21:57 +00:00
Jérémie Laval 2aca100d01 [PLinq] Improve Where query node speed by avoiding creation of dozen of Tuples everytime and instead use static struct 2010-11-24 17:21:57 +00:00
Rodrigo Kumpera 9235c738e8 Fix broken free call.
* class.c (mono_class_setup_interfaces): Don't free
	MonoClass::interfaces on failure since this is now
	allocated from a mempool.

	Fixes #655749
2010-11-24 15:07:29 -02:00
Jb Evain 8f4a229a7a [Linker] fix the moonlight tuning wrt debug symbols 2010-11-24 17:13:40 +01:00
Jb Evain 77a2711e07 [Linker] properly read symbols 2010-11-24 16:27:56 +01:00
Atsushi Eno f1d78d1afd Merge branch 'master' of github.com:mono/mono 2010-11-25 00:16:30 +09:00
Jb Evain b116ebd84e [Linker] fix custom AssemblyResolver 2010-11-24 16:15:20 +01:00
Atsushi Eno d616bc5953 Parse() and ToString() array type name correctly. 2010-11-25 00:15:10 +09:00
Jb Evain cb595ef82b [Linker] refactorize how symbols are loaded 2010-11-24 15:28:44 +01:00
Jb Evain 7073ada69c Add overloads to IAssemblyResolver.Resolve which take a ReaderParameters for better control 2010-11-24 15:21:52 +01:00
Gonzalo Paniagua Javier ba9d007624 [Sockets] Support Remote/LocalEndPoint for AF_UNIX
We were not handling correctly the AF_UNIX family when getting the
	socket name or the peer name.

	Fixes bug #655637.
2010-11-24 00:49:01 -05:00
Andreia Gaita 23f5d3a41e [Moon] Speed up the moonlight build by stripping it down to the bare basics 2010-11-24 04:17:58 +00:00
Zoltan Varga ab6b3727ed Make some changes to the stack overflow handling code so it works to some degree even if the kernel doesn't give us the fault address. 2010-11-24 04:51:14 +01:00
Zoltan Varga c164f11b3b Disable a test which exposes mcs bug #646744. 2010-11-24 04:51:14 +01:00
Rodrigo Kumpera bcdbd24355 Handle another case of binding to first arg of static method.
* Delegate.cs (CreateDelegate): Fix visibility and make
	sure that we fail to bind to first argument of static
	arguments to overloads that don't pass it.

	* DelegateTest.cs: Add tests for the previous change.

	Fixes #655439
2010-11-23 18:52:13 -02:00
Rodrigo Kumpera a2be3fa309 Fix corlib testsuite crash.
* icall.c (ves_icall_Type_MakeGenericType): We can inflate
	into the gtd and the verifier function is not able to handle
	it.
2010-11-23 18:51:22 -02:00
Rodrigo Kumpera 4d2e8b9e93 Fix typo. 2010-11-23 16:45:43 -02:00
Rodrigo Kumpera 27f0404c5b Fix some array overflow bugs 2010-11-23 16:24:11 -02:00
Marek Safar d3ad34299b Remove typeof comparisons 2010-11-23 17:35:25 +00:00
Marek Safar 41ba5828ad Remove typeof usage from DefaultCharSet 2010-11-23 17:35:25 +00:00
Rodrigo Kumpera c66e414be1 Check generic instantions for constraint violations.
* class.c (mono_class_init): Check instantiations of generic
	instances.

	* icall.c (ves_icall_Type_MakeGenericType): Ditto.

	* verify.c: Add mono_verifier_class_is_valid_generic_instantiation
	to the internal API so generic instances can be checked.

	Fixes #654136
2010-11-23 12:38:40 -02:00
Jb Evain 3f96ed7adb Remove the processing of the Cecil docs 2010-11-23 15:02:23 +01:00
Jb Evain b3bb12705b More linker fixes for moonlight 2010-11-23 12:14:43 +01:00
Jérémie Laval 4016c03e34 Fix ReaderWriterLockSlim Exit methods in SupportsRecursion mode and add corresponding unit tests 2010-11-23 10:59:07 +00:00
Jb Evain a520998b6a Remove dead code 2010-11-23 11:17:06 +01:00
Jb Evain 6068950ead Fix sweeping of nested types 2010-11-23 11:13:00 +01:00
Jb Evain 25e8720598 Fix corlib type lookup 2010-11-23 11:13:00 +01:00
Zoltan Varga aa832fdafb Disable a PS3 test, fix up the argument processing in the Test Driver. 2010-11-23 01:21:26 +01:00
Jb Evain 58fdac7b8a Merge branch 'cecil-light' 2010-11-23 00:37:13 +01:00
Jb Evain 480893c953 Facilitate the merge 2010-11-23 00:28:22 +01:00
Jonathan Pryor 5f90f7a8e4 Remove IVT from System.ServiceModel on MonoDroid, MonoTouch profiles.
This is ~identical to commit a3ba2ab7a0,
just applied to the MonoDroid and MonoTouch profiles.

Furthermore, without this patch the MonoDroid & MonoTouch profiles fail to
build, as current versions of mcs (nicely) attempt to verify that the output
assembly name matches the IVT of a referenced assembly, which isn't possible
when System.Xml.dll has an IVT entry for System.ServiceModel.Web.dll which
differs from System.ServiceModel.dll's IVT entry for
System.ServiceModel.Web.dll.
2010-11-22 17:30:15 -05:00
Sebastien Pouliot a3ba2ab7a0 Remove IVT from System.ServiceModel on Moonlight profile
* AssemblyInfo.cs: Remove IVT from System.ServiceModel on Moonlight
profile since SL use a different public key and it is not required
for the limited build provided by SL.
2010-11-22 14:54:56 -05:00
Jérémie Laval 28bea32383 Improve fallback SpinWait to include the initial logic of SpinWait 2010-11-22 18:05:20 +00:00
Jérémie Laval 8e89861961 Plug SplitOrderedList inside TemplateControl. 2010-11-22 18:05:20 +00:00
Jérémie Laval 9024c24431 Define more correctly 2010-11-22 18:05:20 +00:00
Jérémie Laval 68fab8082c Add a default implementation of SpinWait when SplitOrderedList is built with Sys.Web 2.0 and add it to the build 2010-11-22 18:05:19 +00:00
Zoltan Varga 198518eadb Fix a memory leak. 2010-11-22 18:48:36 +01:00
Marek Safar 4e519c3a22 Don't multiply fixed buffer size (it's done by runtime). Fixes #654058 2010-11-22 17:37:12 +00:00
Marek Safar 311e2d637f Removed SetCharSet 2010-11-22 16:50:33 +00:00
Marek Safar 1a525eb46e Emit fixed buffers using standard api only 2010-11-22 16:49:47 +00:00
Marek Safar 7efaa11c51 Fix retrieving of StructLayoutAttribute.Pack 2010-11-22 16:37:36 +00:00
Marek Safar d3faa17314 group all fixed buffer tests 2010-11-22 15:18:12 +00:00
Marek Safar f47f73e852 Tweak async modifier constant value 2010-11-22 12:07:56 +00:00
Alexander Corrado 282c5e6f67 Added 'async' as a recognized method modifier. 2010-11-22 12:01:55 +00:00
Jérémie Laval 623280c5bc Use a custom-wrapper for Aggregate operation invocation 2010-11-22 11:47:51 +00:00
Jérémie Laval ef8c50f4d1 Remove AreTasksFinished in Scheduler and directly use a non volatile version of IsCompleted 2010-11-22 11:47:51 +00:00
Jérémie Laval 21dafe0edb Increase the deepSleepTime of ThreadWorker 2010-11-22 11:47:51 +00:00
Marek Safar ea6c9f5408 Comment out no longer used code 2010-11-22 11:36:46 +00:00
Marek Safar f794a4339f Updated mcs tests failures 2010-11-22 11:28:51 +00:00
Marek Safar a5641afb29 Add comment details to DefineUnmanagedResource 2010-11-22 11:00:58 +00:00
Marek Safar 42effb5b9b Define embeded resources using standard API 2010-11-22 09:52:56 +00:00
Marek Safar 574321e1ee Move entry point handling to AssemblyDefinition 2010-11-22 09:52:56 +00:00
Marek Safar fa1270407a Make generated assembly attributes container name unique 2010-11-22 09:52:55 +00:00
Marek Safar 97cd13b1d8 Don't sign netmodules. 2010-11-22 09:52:55 +00:00
Marek Safar afa3ae21f3 Put back private key handling 2010-11-22 09:52:54 +00:00
Marek Safar f1aa6dcba5 Improve handling of netmodules. Fixes #504085 2010-11-22 09:52:54 +00:00
Marek Safar 137a691d0b Add AssemblySpec to handle all assembly attributes in same way. 2010-11-22 09:52:54 +00:00
Marek Safar 6d9ff98c89 Add missing file 2010-11-22 09:52:53 +00:00
Zoltan Varga fc9df1eacf Allocate memory for generic instances from the mempool of the image set they belong to. Use this to simplify the freeing of these instances. 2010-11-22 05:51:37 +01:00
Zoltan Varga ff2f169350 Fix g_hash_table_remove_all (). 2010-11-22 05:51:37 +01:00
Rodrigo Kumpera d6f47d2e55 Handle cattr with arrays of System.Type.
* metadata-verify.c (is_valid_fixed_param): Handle arrays
	of types. They can be encoded as 0x1B or 0x50.

	* metadata-verify.c (is_valid_cattr_content): Ditto.

	Fixes #655159
2010-11-22 01:07:57 -02:00
Jb Evain e0dbf35cfc internalize private cecil 2010-11-21 22:38:10 +01:00
Jb Evain 1e12848de3 Fix makefile 2010-11-21 22:29:28 +01:00
Jb Evain 29e9001a01 Preserve mono-cil-strip feature by embedding the old Cecil 2010-11-21 22:16:10 +01:00
Gonzalo Paniagua Javier c22160538c [File.ReadLines] Dispose the StreamReader in the right place.
The StreamReader was being disposed immediately after the call to
	ReadLines() causing the enumerator to fails.

	Fixes bug #649464.
2010-11-21 15:14:31 -05:00
Zoltan Varga 384ee20e85 Free the JIT tls data for the main thread. 2010-11-21 20:24:05 +01:00
Zoltan Varga e59fb23967 Allocate generic param constraint data from the image mempool. 2010-11-21 20:15:03 +01:00
Zoltan Varga 42464e8873 Unref all handles on shutdown so their memory is freed. 2010-11-21 19:06:45 +01:00
Jb Evain dc764b553d update cecil to upstream 2010-11-21 13:39:57 +01:00
Zoltan Varga 038598e503 Fix some small memory leaks. 2010-11-21 06:49:48 +01:00
Zoltan Varga c838c89eb2 Remove the AOT log files on 'clean'. 2010-11-21 05:32:15 +01:00
Zoltan Varga 07b5550e67 Link the iomap profiler against eglib. Fixes #627889. 2010-11-21 05:26:55 +01:00
Zoltan Varga e11fa34591 Fix a warning. 2010-11-21 01:48:59 +01:00
Gonzalo Paniagua Javier c416abafcc [HttpListener] Reduce the code inside lock {}
Avoid nesting locks when they are not needed.
2010-11-20 16:48:01 -05:00
Gonzalo Paniagua Javier 37a947e74e [HttpListener] Use RWL instead of lock()
Most of the time we just want to read the prefixes instead of
	adding/removing one.
2010-11-20 16:46:07 -05:00
Gonzalo Paniagua Javier fa67678aaf [Timer] Use a WaitHandle instead of Wait/Pulse
Notifications of changes were sent using Monitor.Pulse() while the
	scheduler thread was in a Monitor.Wait(). The way we handle
	Monitor.Wait() internally involves creating an manual-reset event and
	waiting on it each time Monitor.Wait() is called.

	With this change, one 1 event is created for the lifetime of the
	appdomain. These seems to help avoiding contention when there are a lot
	of timers in play.
2010-11-20 16:44:41 -05:00
Miguel de Icaza e1ff1ccc0a Remove experimental from the name 2010-11-20 13:09:16 -05:00
Geoff Norton 14f0ab6aa1 Fix a potential NRE when using bitmap contexts 2010-11-19 23:33:13 -05:00
Zoltan Varga 8dc590f85c Increase maximum size of ppc prolog. Fixes #654460. 2010-11-20 03:13:04 +01:00
Zoltan Varga cc36f2ba46 Add support for the processorArchitecture field in assembly names. Fixes #655096. 2010-11-20 03:09:49 +01:00
Mark Probst 9ce8f38edd [sgen] Implement evacuation for parallel mark. 2010-11-19 22:57:16 +01:00
Jackson Harper ea5741998a Parse RequestPathInvalidCharacters properly. Fixes urls with commas in them.
This fixes bug #654476. https://bugzilla.novell.com/show_bug.cgi?id=654476

These values are stored as a comma separated list, not just a list
of chars. So we need to parse out all the values, ignoring whitespace.
2010-11-19 15:48:55 -05:00
Gonzalo Paniagua Javier 4f3157b972 Web service help fix
Generate the wsdl document with UTF8 encoding.
2010-11-19 12:46:48 -05:00
Gonzalo Paniagua Javier 0dfbd6131c Fix the build. 2010-11-19 12:36:04 -05:00
Zoltan Varga 73f90bbab3 Fix the previous arm EH change. 2010-11-19 17:19:28 +01:00
Miguel de Icaza 8f7e4b7f29 Remove mentions of Logging and Heap Shot profilers from man page 2010-11-19 11:12:10 -05:00
Zoltan Varga 5d9a8ac05d Load dependent assemblies of an aot image from the assembly's basedir. Fixes #654850. 2010-11-19 17:08:48 +01:00
Atsushi Eno ba0496004f Implement XamlType.CanAssignTo(). Remove extra writer state members. 2010-11-19 21:24:36 +09:00
Atsushi Eno 534cecac54 Call OnWriteStratObject() after pushing current state. 2010-11-19 16:21:26 +09:00
Atsushi Eno bc4f3e7ebe Fix TypeValueSerializer and ValueSerializerContext to work fine with XamlObjectWriter. 2010-11-19 15:05:49 +09:00
Atsushi Eno 0b159f6300 Remove unnecessary code. String type check is only for XamlXmlWriter. 2010-11-19 13:31:03 +09:00
Atsushi Eno 4ceceaf50b The test is network dependent. 2010-11-19 13:04:58 +09:00
Atsushi Eno db1b970add Merge branch 'myeisha-xml-fixes' 2010-11-19 13:02:04 +09:00
Atsushi Eno 292eea651d Merge branch 'xml-fixes' of https://github.com/myeisha/mono into myeisha-xml-fixes 2010-11-19 12:28:01 +09:00
Marek Habersack 4b785e19d7 [asp.net] Disabled array clearing on heap resize in CacheItemPriorityQueue as it causes NREX to be thrown with > 8192 items in the queue.
- Rewrote the CacheItem priority queue test generator to generate better code.
- CacheItem in System.Web doesn't have the unused Guid field now (the field is used only for tests)
- Added a huge sequence to CacheItem priority queue tests (10k entries)
2010-11-19 02:30:16 +01:00
Marek Habersack 90768d5b2d [asp.net] Added a reminder comment about stack scanning in CacheItemPriorityQueue.ResizeHeap 2010-11-19 02:30:16 +01:00
Zoltan Varga 9458c05d90 Set the thumb bit in the CPSR when resuming from a signal handler to a thumb function on arm. 2010-11-19 01:38:36 +01:00
Zoltan Varga 9b9202012d Fix the thumb build. 2010-11-19 00:57:52 +01:00
Gonzalo Paniagua Javier 61742431c8 Hush cross-compilation warnings 2010-11-18 18:16:22 -05:00
Zoltan Varga 7284f5ac16 Improve tail call support on x86 too. 2010-11-19 00:02:56 +01:00
Gonzalo Paniagua Javier 93483a4b8f Don't throw when unable to write autogen keys
It is possible that the user running the ASP.NET application does not
	have permission to write to the registry. In this case, the auto
	generated keys will be created on every application start.
2010-11-18 17:39:01 -05:00
Zoltan Varga 9e681b8fa3 Fix an assert in single stepping if an IL offset doesn't correspond to a seq point. Fixes #654694. 2010-11-18 21:11:11 +01:00
Mark Probst 1e39ad6c61 [sgen] Use bit fields for the booleans in MSBlockInfo. 2010-11-18 20:50:43 +01:00
Zoltan Varga 7a203c1308 Fix infinite recursion in the CompareExchange aot code. 2010-11-18 18:59:08 +01:00
Gonzalo Paniagua Javier 57b3ddd7ab Fix g_dir_open et al for windows.
This was using the *A functiones instead of the *W ones and passing in UTF16.
	It was also opening and closing the directory just to check that it was
	there and then open it again !?.

	Fixes bug #645189.
2010-11-18 12:30:49 -05:00
Mark Probst ac9ddb5319 [fix] Fix build. 2010-11-18 18:01:33 +01:00
Sebastien Pouliot d917b2b12f Fix bugs in UriFormat.SafeUnescaped
* System/Uri.cs: Add support for 'safe' unescaping rules
* System/UriParser.cs: Add support for SafeUnescaped in Format. Avoid
escaping the # when adding a fragment at the end of the Uri

* Test/System/UriTest.cs: More test cases for GetComponents wrt
different UriFormat
2010-11-18 11:22:26 -05:00
Jonathan Pryor 7d4af82165 [mdoc export-html] Fixup href generation for nested generics.
In certain situations, the type-parameter counting code doesn't
skip tokens properly.  In some circumstances, this results in
invalid links (e.g. refing KeyValuePair`1, not KeyValuePair`2),
in others it results in an XSLT error with "!WTF 2".

The problem was we weren't properly checking for nested types.
2010-11-18 10:49:48 -05:00
Rodrigo Kumpera 47d16a9f29 Handle broken invalid generic instantiations.
* loader.c (method_from_methodspec): Don't crash
	if parsing of the generic instance fails.

	Fixed #560834
2010-11-18 11:52:32 -02:00
Rodrigo Kumpera e426a47d50 Add regression test for #562324 2010-11-18 11:52:32 -02:00
Jérémie Laval 72f264d0ab Revert the CER-like changes made to SpinLock.Enter method and document the problem. 2010-11-18 12:47:29 +00:00
Rodrigo Kumpera 338189c0d6 Verify the return value of called functions.
* verify.c (do_invoke_method): Make sure the returned
	value is valid in the caller's context.

	Fixes #562324
2010-11-18 10:35:04 -02:00
Jérémie Laval d687cbbd43 Another fix related to the rebase 2010-11-18 12:05:34 +00:00
Jérémie Laval d0623ba210 Fix compile error introduced by rebasing 2010-11-18 12:05:34 +00:00
Jérémie Laval c2638c0156 Protect TryEnter and Exit methods of SpinLock against asynchronous exceptions. 2010-11-18 12:05:33 +00:00
Jérémie Laval 50d7302246 Protect ExitUpgradeable part of ReaderWriterLockSlim against asynchronous exception.
This ensure that the lock state remains consistent even when it's interrupted by an async exception (such as ThreadAbortException).
2010-11-18 12:05:32 +00:00
Jérémie Laval 01a09fd9fe Protect Enter/Exit write part of ReaderWriterLockSlim against asynchronous exception.
This ensure that the lock state remains consistent even when it's interrupted by an async exception (such as ThreadAbortException).
2010-11-18 12:05:31 +00:00
Jérémie Laval ec9b7a2216 Protect Enter/Exit read part of ReaderWriterLockSlim against asynchronous exception.
This ensure that the lock state remains consistent even when it's interrupted by an async exception (such as ThreadAbortException).
2010-11-18 12:05:31 +00:00
Paolo Molaro 31df8dd714 Provide better coverage of jitted methods to the profiler.
Sometimes we use wrapper methods or other tricks under the hood,
but we provided to the profiler some inconsistent information,
for example the MonoMethod pointer in enter/leave events could be
different from the one used in reporting jit compilation.
This patch introduces a concept of aliased methods: more
than one MonoMethod pointer could correspond to the same jit info
and as such, more end_jit notifications can happen for the same
compiled code. This also means, in turn, that you can get a
end_jit notification for MonoMethod pointers that weren't reported
in a start_jit event.
This partially reverts the change in 2e0067422b, which doesn't
have an associated bug report anyway (this change instead fixes
the issue with unresolved methods in the log profiler).
2010-11-18 11:47:32 +01:00
Paolo Molaro 12de9e1cdd Log profiler: be more specific about unknown methods and classes. 2010-11-18 11:47:32 +01:00
Zoltan Varga 66075a788c Pop the arguments to the throw trampoline from the stack on x86. Fixes #654322. 2010-11-18 03:46:34 +01:00
joncham af340af428 Update vcxproj files. 2010-11-17 21:41:38 -05:00
joncham a410aa0a4b Undefine AF_INET6 on windows to disable IPv6 for now. 2010-11-17 21:41:37 -05:00
Jonathan Pryor d80fadfb44 [mdoc-update] Add C#4 dynamic support for method declarations. 2010-11-17 21:28:29 -05:00
Marek Habersack f0c2471465 [system] NameObjectCollections.Init clears the items container and array before reallocating them. 2010-11-18 02:21:47 +01:00
Marek Habersack d65749c571 [asp.net] A few memory usage optimizations.
* System.Web.Caching/CacheItemPriorityQueue.cs: when the heap is resized, the old heap memory
  is cleared.
* System.Web.SessionState_2.0/SessionInProcHandler.cs: the session items collection is cleared
  when the InProcSessionItem is destroyed
* System.Web/HttpApplicationState.cs: instantiate SessionObjects and StaticObjects collections
  only on demand.
  Replaced ReaderWriterLock with ReaderWriterLockSlim.
  Removed a few variables which aren't needed.
* System.Web/HttpStaticObjectsCollection.cs: replaced a Hashtable with a Dictionary <string, object>.
  The objects dictionary is created on demand only.
2010-11-18 02:21:47 +01:00
Gonzalo Paniagua Javier 3d5f9dedc7 Updated remove_wsq.
remove_wsq() should only clean up the queue when the runtime is shutting down.
	In any other case, removing a queue that still contains work items is an error.
2010-11-17 19:19:22 -05:00
Gonzalo Paniagua Javier 968c36409f Fix typo.
Thanks Rolf debugging this.
2010-11-17 18:52:28 -05:00
Gonzalo Paniagua Javier eef96ae0ef Wrong return value in mono_sem_timedwait()
The return value of mono_sem_timedwait() with a timeout 0 was incorrect
	(0=failure, !0=success instead of 0=success). This worked on
	non-Windows platforms because the only call with timeout 0 was
	expecting the incorrect return value, but it made the mono threadpool
	in Windows fail.

	Fixes bug #653928.
2010-11-17 16:35:56 -05:00
Atsushi Eno 4c8dd3f47b Support x:Arguments in XamlObjectWriter. 2010-11-18 05:52:55 +09:00
Atsushi Eno 57e7541ed4 Avoid examining converted type after using TypeConverter. Add ArgumentAttributed test for object writer. 2010-11-18 05:37:18 +09:00
Atsushi Eno 2219b5db9b Gave up finding "correct" way to deserialize XamlType and made it special case :( 2010-11-18 05:12:25 +09:00
Atsushi Eno 46ddb72741 Add TypeValueSerializer, as it does not seem to work fine with TypeConverter. And tests. 2010-11-18 05:11:45 +09:00
Gonzalo Paniagua Javier 926575ab50 User name and home directory initialization
User name and home directory are initialized at the same time from the
	information in /etc/passwd if possible.
2010-11-17 14:01:28 -05:00
Atsushi Eno 847225fd85 Rewrote ValueSerializer.GetSerializerFor() with couple of tests. 2010-11-18 02:36:33 +09:00
Atsushi Eno 369c0235ca Add missing test file. 2010-11-18 02:35:59 +09:00
Paolo Molaro c46bd7c4a7 Log profiler: implemented command server and ondemand heapshot. 2010-11-17 18:19:41 +01:00
Jérémie Laval 4870f96b08 [Task scheduler] Refactoring and cleanup. Removed a bunch of not-so needed lambdas to avoid delegate invocation cost. 2010-11-17 15:47:27 +00:00
Jérémie Laval 53d15eec62 [Partitioner] Use custom made enumerator for GetPartitions proxying from GetOrderablePartitions 2010-11-17 15:47:27 +00:00
Jérémie Laval 9f607944a4 [CancellationToken] Speed up ThrowIfCancellationRequested operation 2010-11-17 15:47:27 +00:00
Rodrigo Kumpera a68820dc31 Handle method load failure.
* loader.c (find_method_in_class): Properly
	handle failure of loading a method.

	* loader.c (find_method_in_class): Handle method load
	failure. We can't just bail out since working code
	depends on working while having broken methods in the
	mix.

	Fixes #562009
2010-11-17 13:03:56 -02:00
Marek Habersack 2ef160b5cf [asp.net] Part of fix for bug #653013. AsyncPostBackTrigger must react to events generated by the trigger control's children. 2010-11-17 14:20:23 +01:00
Marek Habersack 90248a3bd1 [asp.net] Part of fix for bug #653013. StateManagedCollection must perform a full clear in LoadViewState
If all the items in the collections were saved to the view state, the collection must call the Clear ()
method in order for the OnClear and OnClearComplete methods to be invoked. Telerik RadComboBox depends
on it to remove dynamically added entries before they are recreated when the view state is loaded by
the control.
2010-11-17 14:11:11 +01:00
Marek Habersack ff8730d74b [asp.net] Removed the DEBUG ifdefs, for the tests to compile.
This is temporary until the tests are rewritten (soon)
2010-11-17 14:11:11 +01:00
Jérémie Laval 16e87dee36 [PLinq] Use a custom loop for iterating in ProcessAndAggregate to avoid the if cost at each round. 2010-11-17 12:22:49 +00:00
Paolo Molaro 43bc11cf7d Log profiler: track GC time per thread so it's properly calculated. 2010-11-17 12:49:37 +01:00
Atsushi Eno e9c9454467 Add test for writing string and native Type value as PositionalParameters. 2010-11-17 19:08:56 +09:00
Atsushi Eno d0bce1c5c2 Get object instantiation correctly invoked when non-constructive StartMember is invoked. 2010-11-17 18:46:27 +09:00
Atsushi Eno 491fa8542c Consider PositionalParametesr in XamlObjectWriter. 2010-11-17 18:19:16 +09:00
Atsushi Eno 2e100c5e48 Made a couple of PositionalParameter related fixes, disabling test, etc. 2010-11-17 15:50:18 +09:00
Gonzalo Paniagua Javier 2370aa1ac7 Get the user name from the UID not the USER env
Fixes bug #653564.
2010-11-17 00:42:38 -05:00
Zoltan Varga 0d82272033 Bump the max size of the arm prolog to prevent overflows. 2010-11-16 23:30:14 +01:00
Zoltan Varga 508c201a19 Remove a debug printf. 2010-11-16 22:42:59 +01:00
Zoltan Varga a34456490c Fail LLVM compilation when using sgen + OP_STOREV_MEMBASE with structs with reference fields. Fixes #653842. 2010-11-16 21:33:25 +01:00
Rodrigo Kumpera 206370cb12 Better handle of loading the interfaces of a type.
* loader.c (find_method): Instead of asserting when
	a type has its interfaces missing, ignore them and
	keep searching.

	Fixes #560346
2010-11-16 18:31:46 -02:00
Rodrigo Kumpera e9a265ec75 Handle broken types in assignment test.
* class.c (mono_class_is_assignable_from): Simply
	return false if any of the arguments is broken.

	Fixes #651287
2010-11-16 17:59:00 -02:00
Zoltan Varga ff8921bb3d Special case Interlocked.CompareExchange<T> in the aot runtime. 2010-11-16 20:44:45 +01:00
Zoltan Varga f1d551d25b Improve tail call support on amd64 to support more methods, not just ones whose signature is equal to their caller. 2010-11-16 19:49:35 +01:00
Atsushi Eno a7dd42d725 Remove some illogical hacks in GetSerializerFor(). 2010-11-17 02:41:55 +09:00
Paolo Molaro c910858923 Log profiler: collect root information during GC. 2010-11-16 18:07:30 +01:00
Paolo Molaro b3378410e7 GC/Profiler: added API to enumerate roots.
* profiler-private.h, profiler.c, profiler.h: added API to
enumerate the roots used during a garbage collection.
* sgen-gc.c: enumerate roots if requested by the profiler.
2010-11-16 18:07:30 +01:00
Rodrigo Kumpera ac5ffb3fc7 Don't allow zero cattr type column.
* metadata-verify.c (verify_cattr_table): Type column
	can't have a zero index.

	Fixes #651682
2010-11-16 14:07:59 -02:00
joncham 5b91074865 Fix #ifdef to fix windows build. 2010-11-16 07:52:12 -05:00
myeisha 5150ffd9f3 Add testcase for multiple missing IDs 2010-11-16 13:04:30 +01:00
Atsushi Eno 8ea8f31dfb ContentProperty will just show up as an ordinal property, so no need to worry here. 2010-11-16 20:54:58 +09:00
Atsushi Eno acdfa36f4b Remove for-object-writer-only code from common non-object writer base. 2010-11-16 20:53:57 +09:00
KISHIMOTO Makoto 0a0ab739b5 Fix profiler build on freebsd. 2010-11-16 11:39:14 +01:00
Atsushi Eno 8f63d8bc6f Removed unused code / commented out unused test lines. 2010-11-16 17:44:50 +09:00
Atsushi Eno 4b92142df2 cleaning up some FIXMEs. 2010-11-16 13:17:57 +09:00
Marek Habersack 3b8cd7bbce [asp.net] New version of code to purge underused entries from the cache.
This version uses an LRU cache to hold the cache items. Priority is not taken into account
when removing the underused entries (with the exception of the CacheItemPriority.NotRemovable
- items with this priority are never purged), they are treated equally.
A separate thread is not used to perform purging, instead the collection happens in the current
requests's thread.
Minor improvements to cache item enumerator and to the CheckDependencies method.
2010-11-16 04:03:26 +01:00
Rodrigo Kumpera 7c6e535565 Properly encode GMD on a GTD.
* reflection.c (mono_reflection_method_on_tb_inst_get_handle):
	Ensure the typebuilder had it's generic arguments initialized.

	Fixes #652952
2010-11-15 23:17:09 -02:00
Marek Habersack bd2ff0ebde [asp.net] Remove unnecessary try/catch block from the old entries expiration code. 2010-11-15 22:57:11 +01:00
Zoltan Varga 729a4bfad4 Remove an unneccesary assert which is hit when a double is passed in split reg-stack in soft-float mode on non-EABI arm. 2010-11-15 19:42:13 +01:00
Marek Safar 6ce8dda488 Remove old accessibility check routine 2010-11-15 18:11:45 +00:00
Zoltan Varga 069ca834d2 Make libgc use dolt too. 2010-11-15 14:56:30 +01:00
Atsushi Eno 139958b3cf Make string convertibility check more strictly. 2010-11-15 21:35:46 +09:00
Atsushi Eno 04bd5a3d48 Use CanConvertTo(typeof(string)) before converting to string. Add Object writer tests. 2010-11-15 21:06:11 +09:00
Atsushi Eno 7d7d808cab Pass IValueSerializerContext as ITypeDescriptorContext. 2010-11-15 21:05:09 +09:00
Zoltan Varga 32340d1fe2 Remove the unused and incomplete CMake build scripts for now. 2010-11-14 01:21:43 +01:00
Vincent Povirk 579faaab5f Convert MONO_MARSHAL_CONV_LPSTR_STR to mono_string_to_utf16 on windows. 2010-11-13 17:00:20 +01:00
Zoltan Varga e6e56cebf5 Fix the DISABLE_JIT build. 2010-11-13 14:29:15 +01:00
Zoltan Varga 74718c80cd Fix the previous change. 2010-11-13 14:14:40 +01:00
Zoltan Varga 1cae8e2584 Fix build breakage on platforms without execvp. 2010-11-13 14:05:18 +01:00
Zoltan Varga 72745b14bb Fix a typo (DISABLE_SOCKET->DISABLE_SOCKETS). 2010-11-13 13:53:48 +01:00
Zoltan Varga 0cc9d6ecd0 Use CloseHandle () for closing process handles if HOST_WIN32 is defined, so it works on windows based cross compilers. 2010-11-13 13:29:48 +01:00
Marek Habersack 8940995fc8 [asp.net] Cache + SessionInProcHandler memory usage improvements
* Cache.cs: cache removes old/least recently used items when the item count exceeds 15000. Items
  are removed until they reach the count of 10000.
* SessionInProcHandler.cs: replaced ReaderWriterLock with ReaderWriterLockSlim and added a Dispose
  method to the InProcSessionItem type which disposes the associated lock and other resources.
2010-11-13 04:14:33 +01:00
Andrew Jorgensen 75fbdd231a Add new profiler to mono-devel package 2010-11-12 16:45:18 -07:00
Gonzalo Paniagua Javier 9c0c172c6e make -jX should work in libgc/ now. 2010-11-12 17:37:28 -05:00
Paolo Molaro 959e710559 Log profiler: removed the hsmode option, use heapshot=MODE instead. 2010-11-12 21:38:05 +01:00
Paolo Molaro 1c21bf5d8d Log profiler: updated to the new heap walk API.
The GC now provides also offset information for each referenced object
in the heap walk API: this info is saved in the profile data now.
Updated the data version for the file format change.
2010-11-12 21:38:05 +01:00
Paolo Molaro 328b795c2e GC: changed the heap walk API to also report the offset of referenced objects. 2010-11-12 21:38:05 +01:00
Paolo Molaro 5ea94df40f Log profiler: use the output value as a filename when report is specified.
* proflog.c: if the output option is used together with report, the report
is saved to the named file instead of being printed to stdout.
* decode.c: zlib seems to get confused with a non-compressed strem
coming from stdin: disable it in that case...
Also deal with reading 0 bytes from a buffer.
2010-11-12 21:38:04 +01:00
Paolo Molaro b2d330da2b Log profiler: allow overwriting data files and name them from date and pid.
* utils.h, utils.c: added getpid() wrapper.
* decode.c: display the program pid if available.
* proflog.c: added substitutions for the output name, change the default
behaviour to not overwrite a file and allow '-' at the start of the
file name to force overwrite.
2010-11-12 21:38:04 +01:00
Rodrigo Kumpera 1015aecfdd Improve tests.
* gc-oom-handling.cs: Modify this test to test major
	fragmentation too.

	* gc-oom-handling2.cs: Add tests for some heavy reflection
	allocators.
2010-11-12 17:14:24 -02:00
Rodrigo Kumpera bf60953f34 Handle OOM under evacuation.
* sgen-marksweep.c (major_copy_or_mark_object): Stop evacuating
	major objects if we fail to alloc them.
2010-11-12 17:14:24 -02:00
Andreia Gaita ba36a57d91 [Xml] duh, don't hide the stacktrace 2010-11-12 16:55:54 +00:00
Marek Safar b458997dcb Move an assembly declaration handling into a new file 2010-11-12 16:14:22 +00:00
Marek Safar aa50def326 Add local version of constructor info constants 2010-11-12 16:14:21 +00:00
Marek Safar af9193d9cc Remove unused namespaces 2010-11-12 16:14:21 +00:00
myeisha 73b53a30b0 Don't add IDREFs to set of missing IDs multiple times 2010-11-12 17:08:27 +01:00
Andreia Gaita 773b544db0 [Xml] Check if the underlying writer supports LookupPrefix and return empty
instead of blowing up.
2010-11-12 16:07:51 +00:00
Jérémie Laval 4a71197d1b Throw an an exception when Break and Stop are used in combination. 2010-11-12 14:02:41 +00:00
Jérémie Laval f50ff56d62 Simplify Parallel.ForEach loop execution 2010-11-12 14:02:12 +00:00
Jérémie Laval 248b261dfb Cleanup ForEach overloads in Parallel 2010-11-12 13:52:54 +00:00
Jérémie Laval 92e252135e Directory cleanup for System.Collections.Concurrent partitioners 2010-11-12 13:20:00 +00:00
Paolo Molaro 55e3f73ced Log profiler: prevent possible corruption from writing to the same file.
* proflog.c: we now unlink the output file before creating it to
prevent possible corruption from multiple processes writing to the
file. Added also extra checks for async events (which shouldn't happen).
* decode.c: fix file offset when using zlib.
2010-11-12 14:13:15 +01:00
Atsushi Eno 05410fca44 Return XamlLanguage.Items for dictionary and ContentProperty as implicit member. 2010-11-12 21:26:18 +09:00
Atsushi Eno 88a39fe25d Fix wrong attribute value string indexing. 2010-11-12 21:09:46 +09:00
Atsushi Eno 3c2a4fd608 XamlSchemaContext.GetXamlType(XamlTypeName) now resolves assemblies then types.
And use it in appropriate place.
Fixed part of XamlXmlReaderTest.PositionalParameters2().
2010-11-12 20:54:03 +09:00
Marek Safar 0962bce5e4 New tests 2010-11-12 11:21:34 +00:00
Atsushi Eno cbb6518d6a Extension types may have omitted "Extension" from XML name. 2010-11-12 19:56:28 +09:00
Marek Safar 9bc6016df0 Add MessageQueue::GetMessageEnumerator2 2010-11-12 10:32:42 +00:00
Marek Safar a73af072dc CRLF->LF conversion 2010-11-12 10:32:41 +00:00
Marek Safar 8e47d66933 Fix QueuePathDialog signature 2010-11-12 10:32:41 +00:00
Marek Safar 3e4eec4f0f Show more details for CS1061 eror 2010-11-12 10:32:40 +00:00
Marek Safar a45c289ac5 Inflate nested non-generic interfaces inside generic type 2010-11-12 10:32:40 +00:00
Daniel J Sell d53c11003d [asp.net] Fix for bug #653192. making MasterPageFile handle relative paths
MasterPageFile should be relative to the file being parsed, not the
request path
2010-11-12 11:21:40 +01:00
Atsushi Eno bdb3b93f2b Fix XamlMember comparison and get relevant tests working. 2010-11-12 17:51:38 +09:00
Marek Safar 240486239d [652390] Return type inference can inflate using type parameters out of the reach 2010-11-12 08:25:37 +00:00
Marek Safar 5058c01c80 New tests. 2010-11-12 08:25:37 +00:00
Atsushi Eno 99fd235718 Add support for MarkupExtension attribute in XamlXmlReader. 2010-11-12 15:11:19 +09:00
Gonzalo Paniagua Javier aea4443fcf Don't cache child nodes when security trimming is enabled.
When SecurityTrimmingEnabled is set to true for the node, the cached children
collection also depends on the IPrincipal set for the current context.

Fixes bug #641449.
2010-11-11 21:19:12 -05:00
Atsushi Eno c34c85ed4e Actually XamlXmlReader was already working for PropertyDefinition. 2010-11-12 10:02:25 +09:00
Atsushi Eno 56f65a39af Add test for writing PropertyDefinition. 2010-11-12 09:59:26 +09:00
Atsushi Eno 53c7ebac26 Add new ValueSerializerContext and use it everywhere appropriate.
This change was basically for string serialization of XamlTypeName, namely
PropertyDefinition serialization.
Turned out it should be used in a lot of places where IServiceProvider
and ITypeDescriptorContext is expected.
IServiceProvider implementations in XamlWriters are replaced.
2010-11-12 09:51:52 +09:00
Zoltan Varga 68b442aab9 Avoid 'sgen not supported' warnings when no --with-sgen=yes argument was passed to configure. 2010-11-12 01:41:01 +01:00
Zoltan Varga 968e5acaf3 Remove obsolete cygwin glib checks. 2010-11-12 01:36:50 +01:00
Zoltan Varga 7a3bf1d6fc Fix the definition of G_BREAKPOINT on x86 when cross compiling. 2010-11-12 01:34:58 +01:00
Zoltan Varga 3a6b4c58bd Fix a ppc cross compile problem. 2010-11-12 01:14:14 +01:00
Zoltan Varga a1ffc97d75 Use dolt for eglib too. 2010-11-12 00:04:13 +01:00
Zoltan Varga 1eedfc74ae Pass -mno-cygwin to eglib's configure. 2010-11-11 23:56:47 +01:00
Gonzalo Paniagua Javier 918cd627f3 Don't disable IPv6 if bulding with VS.
When building with Cygwin or a cross-compiler there are at least 4
	functions that are not present (inet_ntop, getaddrinfo, getnameinfo and
	freeaddringo) so in these cases we just disable IPv6. Note that
	Socket.OSSupportsIPv6 will still return true.

	When building with VS, IPv6 will be supported without a problem.
2010-11-11 16:39:40 -05:00
Sebastien Pouliot 90f76e6521 Query SupportsCookieContainer ini Moonlight build
* HttpRequestChannel.cs: Do not use CookieContainer unless we know its
supported (e.g. client stack) otherwise we'll throw (browser stack)
2010-11-11 15:28:54 -05:00
Sebastien Pouliot 4ca096f7a6 Add internal SetCompatibilitySwitch to AppDomain
* AppDomain.cs: Add internal SetCompatibilitySwitch so it is possible
to set values that will be returned by (public) IsCompatibilitySwitchSet
(needed by Moonlight)
2010-11-11 15:28:53 -05:00
Sebastien Pouliot 570ddb5097 [moon] Allow creating AES with the fully qualified name in S.Core
* CryptoConfig_2_1.cs: Add fully qualified name (to simple name) to
allow the creation of AES using (internal) CryptoConfig
2010-11-11 15:28:52 -05:00
Jérémie Laval 021deca604 Refine precedent algorithm for Parallel.For index stealing. 2010-11-11 18:12:48 +00:00
Jérémie Laval 8a37df630e Add a new lightweight stealing algorithm to Parallel.For 2010-11-11 18:12:48 +00:00
Jérémie Laval 92f611ac93 In Parallel.For, returns immediately if the initial bound is superior or equal to the upper bound. 2010-11-11 18:12:48 +00:00
Jérémie Laval f99729b759 Small logic fix in choosing step in Parallel.For 2010-11-11 18:12:48 +00:00
Marek Safar 195accd498 [650850] Inflate all hoisted type parameter constraints 2010-11-11 17:19:31 +00:00
Paolo Molaro 39ecc85b9c Added the mprof-report manpage. 2010-11-11 16:37:59 +01:00
Paolo Molaro c963609e64 Added a proper define for the external zlib and check for sched_getcpu(). 2010-11-11 15:56:33 +01:00
Paolo Molaro 92b0e3fe03 Log profiler: implemented the reverse reference feature in the heapshot report. 2010-11-11 14:35:39 +01:00
Zoltan Varga 3d4efed01d Remove one more compile-time dependency on sgen. 2010-11-11 13:03:20 +01:00
Marek Safar 7239b02c73 Synchronize event add/remove using CAS 2010-11-11 11:58:08 +00:00
Marek Safar f7f6e2675c Unwraped equality operators cannot use a user operator of different types 2010-11-11 11:58:08 +00:00
Zoltan Varga 96f6aafe12 Define mono_gc_get_card_table () for boehm/null gc too, to reduce the number of sgen dependencies in mini/. 2010-11-11 12:53:01 +01:00
Atsushi Eno 3e3804bd9d XamlMember.TypeConverter should return correct converter now.
Also adding usage of that member, but not perfectly working yet.

Disabled broken tests that depends on not-implemented XamlObjectWriter part.
2010-11-11 17:48:41 +09:00
Atsushi Eno 53f99680c9 When collection instance returned null, do not try to GetItems(). 2010-11-11 15:46:11 +09:00
Atsushi Eno 00ef616425 Remove old code (overwrite). 2010-11-11 12:24:30 +09:00
Atsushi Eno aa4cf49ae6 Remove extra copy lines. 2010-11-11 12:19:44 +09:00
Atsushi Eno 6e5eedaba4 Split XamlNode.cs to object-reader specific code and else. 2010-11-11 12:17:23 +09:00
Atsushi Eno eb818ee223 Fix readonly collection check (should use IsWritePublic). 2010-11-11 12:15:53 +09:00
Atsushi Eno d4659e7b67 removed xml output code (mostly harmless but could break xml files). 2010-11-11 12:14:04 +09:00
Marek Habersack 46997e25fd [corlib] Fix for bug #652807. Handle RegistryValueKind.QWord in Win32RegistryApi.{Get,Set}Value 2010-11-11 01:57:20 +01:00
Geoff Norton 461418d605 [OSX] Dont use nested functions to determine if we can use the system zlib 2010-11-10 14:32:42 -05:00
Rodrigo Kumpera d1d82af134 Merge branch 'gc_oom' 2010-11-10 17:36:27 -02:00
Rodrigo Kumpera bb52426c90 Assert if we OOM during major evacuation.
* sgen-marksweep.c (major_copy_or_mark_object): Until we
	figure out how to handle OOM while evacuating major objects
	lets assert.
2010-11-10 17:35:51 -02:00
Rodrigo Kumpera 0baf5312c0 Handle OOM on string intern icall. 2010-11-10 17:35:51 -02:00
Rodrigo Kumpera b5e3da7e58 Add test for string interning OOM. 2010-11-10 17:35:51 -02:00
Rodrigo Kumpera adc7a9ef17 Handle OOM with string interning. 2010-11-10 17:35:51 -02:00
Rodrigo Kumpera 68918326d5 Handle OOM with string interning. 2010-11-10 17:35:50 -02:00
Rodrigo Kumpera 030f348396 Add tests for OOM handling. 2010-11-10 17:35:50 -02:00
Rodrigo Kumpera 004b5bfd73 Make the parallel OOM handling code more resilient.
* sgen-marksweep.c (major_copy_or_mark_object): Use
	a loop around CAS'ng on failed memory allocation to make
	sure we have the right behavior in place.
2010-11-10 17:35:50 -02:00
Rodrigo Kumpera 572913bac4 Implement oom handling for MS.
* sgen-gc.c (collect_nursery): If any object was pinned
	after initial pinning, sort the queue so build_nursery_fragments
	will see the aditional objects.
	If pinning due to OOM happened ask for a major collection.

	* sgen-gc.c (major_do_collection): Adjust the pin queue if
	OOM happened. Here we have to clean discarded entries before
	optimizing the queue or we might end with interior pointers
	in the mix.

	* sgen-gc.c (sgen_collect_major_no_lock): New function so
	major collectors can trigger a collection. They can't
	use public API since the gc lock is not meant to be reentrant.

	* sgen-major-copy-object.h (copy_object_no_checks): Pin
	the object if we can't promote it.

	* sgen-marksweep.c (alloc_obj): Return null if we fail
	to allocate a block for a given freelist size.

	* sgen-marksweep.c (major_alloc_degraded): Ditto.

	* sgen-marksweep.c (major_copy_or_mark_object): Handle OOM.

	* sgen-marksweep.c (major_alloc_small_pinned_obj): If allocation
	fails, try a major collection since this is memory requested by
	the runtime and it's much harder to handle failure.
2010-11-10 17:35:50 -02:00
Rodrigo Kumpera 5692f8f465 Adjust major collection heuristics for OOM scenarios.
* sgen-gc.c (need_major_collection): Add a space_needed
	parameter that is checked against the available space
	quota.

	* sgen-gc.c (alloc_degraded): Adjust call to
	need_major_collection. Pass zero as space_needed since
	it's won't help to do a major gc if we're already doing
	degrated alloc and old gen is full.

	* sgen-gc.c (alloc_large_inner): Pass size to
	need_major_collection as shrinking major might be needed
	to meet the space quota for.
2010-11-10 17:35:49 -02:00
Rodrigo Kumpera fe152b5281 Add heap size accounting.
* sgen-gc.c: Simple accounting with no los/major reserve.

	* sgen-los.c:
	* sgen-marksweep.c: Account for allocation and release of
	memory. Fail to allocate if above alloc quota.
2010-11-10 17:35:49 -02:00
Rodrigo Kumpera c0831ab104 Handle failure on allocation functions.
* sgen-gc.c (mono_gc_alloc_obj_nolock):
	* sgen-gc.c (mono_gc_alloc_obj):
	* sgen-gc.c (mono_gc_alloc_vector):
	* sgen-gc.c (mono_gc_alloc_array):
	* sgen-gc.c (mono_gc_alloc_string):
	* sgen-gc.c (mono_gc_alloc_pinned_obj): Handle
	allocation failure.
2010-11-10 17:35:49 -02:00
Rodrigo Kumpera ea59d7d8bd Add max-heap-size parameter to MONO_GC_PARAMS
* sgen-gc.c (mono_gc_base_init): Added new parameter.
	Right now it is not used.
2010-11-10 17:35:49 -02:00
Rodrigo Kumpera e6ed0b60f0 Add boehm support for max-heap-size.
boehm-gc.c (mono_gc_base_init): Check MONO_GC_PARAMS environment
	variable for max-heap-size.
2010-11-10 17:35:48 -02:00
Rodrigo Kumpera 1ca5d68634 Move function from sgen to gc so boehm can use it too.
* sgen-gc.c (mono_sgen_parse_environment_string_extract_number):
	Move this function to gc.c and rename.
2010-11-10 17:35:48 -02:00
Rodrigo Kumpera 4aef74290d Handle OOM better.
* object.c (mono_print_unhandled_exception): We can't really
	do a ToString () during an OOM.
2010-11-10 17:35:48 -02:00
Marek Habersack 8a63927fd1 [wcf] .NET allows for service contract methods to be decorated only by Web{Get,Invoke}Attribute
Usually WCF requires that each service method is marked with the OperationContract attribute with the exception
of methods decorated with the Web{Get,Invoke}Attribute attributes which are defined in System.ServiceModel.Web.
This patch adds a simple way to extend the ContractDescriptionGenerator in order to provide this functionality
without circular dependency of System.ServiceModel on System.ServiceModel.Web. Several extenders can be registered
with the description generator and they will be invoked in the registration order until any of them returns 'true'.
Extenders are passed a reference to the OperationContract attribute with which the current method is decorated - if
the reference is null, the extender should create a default instance of the attribute so that the description generator
considers the method as one to be included in the contract description.
2010-11-10 19:22:26 +01:00
Marek Safar e152071d2a New test. 2010-11-10 17:57:08 +00:00
Marek Safar 55def591e2 Implement dynamic mutator over dynamic indexer 2010-11-10 17:57:08 +00:00
Marek Safar bdf6dee0fa More tweaks for nullable binary operation 2010-11-10 17:57:08 +00:00
Marek Safar e02fd2fdd6 False user-operator has priority over logical not user-operator 2010-11-10 17:57:07 +00:00
Zoltan Varga f75c08f2cf When single stepping from a exception throw site, single step to the catch site. Fixes #652590. 2010-11-10 18:24:39 +01:00
Andrew Jorgensen c308b2128b Remove compat-4.0 dir (nothing there anymore) 2010-11-10 10:18:04 -07:00
Jérémie Laval 0e22ba327d Simplify Parallel.For execution.
This commit remove the stealing path until a better solution for it is devised.
2010-11-10 16:32:28 +00:00
Zoltan Varga d1e798502f Allocate MonoInternalThread/MonoThread objects using mono_gc_alloc_pinned () when using sgen, since they will be pinned anyway. 2010-11-10 14:43:50 +01:00
Jérémie Laval fe0be24bea Final performance improvement on ReaderWriterLockSlim 2010-11-10 13:38:55 +00:00
Zoltan Varga a7aee37e52 Fix the --enable-shared=no build. 2010-11-10 13:55:36 +01:00
Zoltan Varga adb10f2ad9 Fix a warning. 2010-11-10 13:55:36 +01:00
Paolo Molaro 25002af4f6 Log profiler: fixed timeout heapshot mode and sorted heapshots.
* proflog.c: fixed heapshot timeout mode (setting the last time it was performed).
* decode.c: sort heap shot list according to the time sequence.
2010-11-10 10:50:54 +01:00
Paolo Molaro d1bf818a60 Log profiler: track thread names with the new profiler API. 2010-11-10 10:50:53 +01:00
Paolo Molaro 175ca9ba15 Set the name of some runtime threads.
* gc.c: set the name of the finalizer thread.
* threadpool.c: set the name of the threadpool worker threads.
2010-11-10 10:50:53 +01:00
Paolo Molaro 62dd77c10c Profiler: added new API for notification of thread names.
* profiler-private.h, profiler.c, profiler.h: users can now get a callback
when the name of a thread gets set when MONO_PROFILE_THREADS is enabled.
* threads.c: notify profilers about thread name changes.
2010-11-10 10:50:53 +01:00
Paolo Molaro 1ab70b5ea4 Log profiler: added support for GC handles tracking.
* proflog.c, proflog.h: added support for tracking GC handle creation
and destruction. Updated profiler version.
* decode.c: added support for GC handles in the GC report, including
backtraces.
2010-11-10 10:50:53 +01:00
Paolo Molaro 8fe4e8bdc0 Added profiler interface to track GC handles.
* profiler-private.h, profiler.c, profiler.h: new API to get notiffications
when GC handles are created or destroyed.
* gc.c: notify the profiler on GC handle creation/destruction.
2010-11-10 10:50:52 +01:00
Marek Safar b1abd92c2a Reorder logic in DMO type conversion 2010-11-10 09:05:44 +00:00
Marek Safar 7f078f05e3 Fixes a logic error in filtering out operators like methods 2010-11-10 09:05:43 +00:00
Marek Safar 2fcade7d5c Don't crash on liften null left/right shift 2010-11-10 09:05:43 +00:00
Marek Safar 57e7f36a44 Logical binary operarions with dynamic arguments have to be unfolded 2010-11-10 09:05:43 +00:00
Zoltan Varga 0682d4b4fd Add an AOT flag for aot images compiled with soft-debugging support, and avoid loading aot images without this flag when running with the soft debugger. 2010-11-10 09:25:33 +01:00
Ankit Jain ee5c9692cb [xbuild] Emit /platform: for *mcs
Emit /platform:foo for the *mcs. Based on patch from
technomage1972 <[email protected]> .
2010-11-10 10:59:18 +05:30
Geoff Norton e8c396cf57 [OSX] Prevent an invalid write to mono_lmf_addr
mono_set_lmf () calls *(mono_get_lmf_addr ()) = lmf, but
mono_get_lmf_addr could potentially point to the address we just
g_free'd.  Ensure that we clear the settings, before freeing the memory.
2010-11-09 23:46:58 -05:00
Geoff Norton 58396601cb [OSX] Disabled eglib tests build by default
On OSX our local system glib might be 32 or 64 bit, and we have
no simple way of testing wether it meeds the needs of the current
built, lets just disable tests by default for now
2010-11-09 23:46:58 -05:00
Alex Fort c68a4a0906 Add support for the CancelKeyPress event on Windows
Adds a call to the Win32 function SetConsoleCtrlHandler for Windows,
which adds the DoWindowsConsoleCancelEvent wrapper for
DoConsoleCancelEvent to the Ctrl-C handler when an event handler is
added, and removes the handler once all event handlers are removed.
2010-11-09 22:24:29 -05:00
Rodrigo Kumpera 726d23a523 Add test for transitive constraint validation. 2010-11-09 18:05:05 -02:00
Rodrigo Kumpera a8ab40d5d7 Fix banshee breakage with trunk.
* verify.c (mono_generic_param_is_constraint_compatible):
	Handle transitive constraints where one type can only satisfy
	the constraints required by means of the other types it's
	constainted to. For example:

	Bar<K> where K : IFace
	Foo<T, U> where T : U where U : IFace
		Bar<T>

	On the above example, T can only satisfy K constraint by means
	of the constraints that U has.
2010-11-09 18:05:05 -02:00
Zoltan Varga 150aa825d5 Fix the previous change. 2010-11-09 20:00:23 +01:00
Zoltan Varga 8e0d6b1111 Speed up Thread.ManagedThreadId. 2010-11-09 19:53:05 +01:00
Andreia Gaita 972005a311 [Xml] Only call Close on the base Writer if it hasn't been closed yet. Fixes #651647
The serialization classes provided by the SL toolkit
(System.Runtime.Serialization.dll) don't like having Close called more than
once, so it seems that they don't check their own state and we have to do it
to avoid making repeated Close calls.
2010-11-09 18:02:27 +00:00
Atsushi Eno 96bfef3d48 Add and/or altered a bunch of XamlXmlReader tests based on common reader tests.
Lots of tests are duplicate for the same XML inputs, so they are just removed.
2010-11-10 01:11:44 +09:00
Rodrigo Kumpera 586295c91d Fix handling of LastIndexOf and empty strings.
* String.cs (LastIndexOf): All all overloads to
	be compatible with MS with empty strings.

        * String.cs (LastIndexOfAny): Ditto.

	* StringTest.cs: Add tests for the above.

	Fixes #605340
2010-11-09 13:11:28 -02:00
Jérémie Laval 87f072d29c Remove CurrentLockState in ReaderWriterLockSlim and reuse ThreadLockState instance more often. 2010-11-09 14:57:14 +00:00
Jérémie Laval 1bd648c615 Use ulong to represent element hashes internally allowing full width 32bits hashes. Replace SpinLock+ManualResetEvent based bucket resize with a simpler reader-writer lock. Revert from two layers storage to a bare array storage for buckets temporarily as it causes a weird concurrency bug. 2010-11-09 14:57:14 +00:00
Jérémie Laval 5f71cbd7d6 Small condition fix in ReaderWriterLockSlim, avoid an extra loop pass. 2010-11-09 14:57:14 +00:00
Marek Habersack d5e6ca38d5 [wcf] AJAX GET requests work now.
HttpListenerManagerTable always looked up HttpListerManager instances using the full URI
while it should have disregarded the /operation?parameters part of the request in order
to match the service endpoint's base address.
2010-11-09 15:16:36 +01:00
Marek Safar d1c1958433 Import declaring type base type when walking up the tree 2010-11-09 11:33:02 +00:00
Atsushi Eno 984eea9774 Making XamlObjectReader tests for common basis to XamlXmlReader.
... as it turned out that their behaviors are almost the same.
2010-11-09 19:02:45 +09:00
Paolo Molaro b532e6cfb1 Log profiler: osx/win32 portability fixes. 2010-11-09 09:50:44 +01:00
Zoltan Varga 347312a440 Add a workaround for a failed assert in the amd64 EH code which happens when running under the soft debugger. 2010-11-09 09:27:25 +01:00
Zoltan Varga 1bf0502619 Fix the DISABLE_REFLECTION_EMIT build. Fixes #652188. 2010-11-09 08:53:40 +01:00
Zoltan Varga 816f10975c Tidy up the configure output a bit. 2010-11-09 08:53:40 +01:00
Zoltan Varga bc2c920306 Fix a warning. 2010-11-09 08:53:40 +01:00
Atsushi Eno 272a2cd18c Fix generic XamlTypeName output and GetType() to get some xml reader case working. 2010-11-09 15:41:01 +09:00
Marek Habersack 2f5f1984ec [asp.net] Don't instantiate the hash algorithm used to encrypt resource URLs on each request if it can be reused.
The algorithm instance is kept in a thread-local variable.
2010-11-09 02:15:11 +01:00
Marek Habersack be6b0eeb9b [asp.net] Optimize buffer reuse in HttpWriter.
When HttpWriter requests a byte buffer to send data to the output stream it now uses
a thread-local static buffer pre-allocated to at most 128KB (all threads' buffers should
not exceed 4MB). If a buffer exceeding the static buffer size is requested, a transient
one is allocated.
2010-11-09 01:40:59 +01:00
Marek Habersack 218262b92a [asp.net] A micro-optimization to not call String.Format too much in a loop. 2010-11-09 01:39:49 +01:00
Paolo Molaro 78b8d385fc Log profiler: disable zlib support on windows.
Someone on windows needs to look at this: it defines HAVE_ZLIB but
doesn't actually have it (missing zlib.h or not linking to -lz).
2010-11-08 21:02:46 +01:00
Zoltan Varga cdb7d98fc0 Revert "Avoid building the log profiler on windows, it has no libz."
This reverts commit 3d81ea258f.
2010-11-08 21:02:08 +01:00
Zoltan Varga 3d81ea258f Avoid building the log profiler on windows, it has no libz. 2010-11-08 21:01:22 +01:00
Rodrigo Kumpera 5d07d2934a Add regression test for ##595044 2010-11-08 17:40:25 -02:00
Rodrigo Kumpera 0d9fa0fd59 IL can't reference literal fields.
* verify.c (verifier_load_field): Fail if the
	field is literal.

	Fixes #595044
2010-11-08 17:40:25 -02:00
Marek Safar 1b0ef80b2f API compatibility work 2010-11-08 19:29:49 +00:00
Marek Safar 13760ac52b Emit correctly EndInvoke parameters attributes and names 2010-11-08 19:29:49 +00:00
Marek Safar 873ab79586 Fixed ambiguity for overload resolution between params and optional parameter of same type 2010-11-08 19:29:48 +00:00
Marek Safar ee6616c94e Clean up event expression assigning error reporting 2010-11-08 19:29:48 +00:00
Marek Safar 1c3c785592 New test 2010-11-08 19:29:47 +00:00
Marek Safar 4d1c0d945c [651547] Check definitely assigned struct this access correctly. 2010-11-08 19:29:47 +00:00
Marek Safar a1f9dbc5f6 Removed platform attributes 2010-11-08 19:29:47 +00:00
Marek Safar 9d179ba4a7 Report error duplicate only when expected error has been found 2010-11-08 19:29:46 +00:00
Marek Safar 2282e20cc1 Add missing default ctor call 2010-11-08 19:29:46 +00:00
Zoltan Varga c992c14413 Fix a typo in process_breakpoint_inner which doesn't break our tests for some reason. 2010-11-08 20:23:20 +01:00
Paolo Molaro a3f7f33f6b Log profiler: better object tracking.
* decode.c: the --track option can now take more than one object address to track.
Added the --find option to automatically track objects of a given size and/or
type name. When backtrace and heapshot information is present, we can now, for
example, find when and where all the byte[] arrays bigger than a certain size
have been created and which other heap objects reference them.
2010-11-08 20:03:38 +01:00
Paolo Molaro 3be51e2a0e Log profiler: more timer compatibility fixes. 2010-11-08 17:36:34 +01:00
Paolo Molaro 672f4a3fb2 Log profiler: track and display contended monitor wait times. 2010-11-08 17:36:33 +01:00
Paolo Molaro 618a1271e5 Log profiler: fill and display a few more data fields in the header. 2010-11-08 17:36:33 +01:00
Paolo Molaro 2700046738 More log profiler doc clarifications. 2010-11-08 17:36:33 +01:00
Rodrigo Kumpera bc21b3eafa Don't allow zero local var tokens.
* metadata-verify.c (is_valid_method_header): The local
	token cannot have a zero index.

	* metadata.c (mono_metadata_parse_mh_full): Fail if locals
	token index is zero.

	Fixes #651682
2010-11-08 13:32:09 -02:00
Zoltan Varga 0aa5299876 Transition ves_icall_get_frame_info () to use find_jit_info_ext (), remove the managed->native wrapper hacks. 2010-11-08 16:01:11 +01:00
Marek Habersack 1ed35b4740 [asp.net] Optimize memory usage a bit. String hashes are cached in thread-local storage. 2010-11-08 15:42:14 +01:00
Rodrigo Kumpera 9bb741408e Work with classes been loaded.
* metadata.c (do_mono_metadata_parse_type): It's possible
	that we're decoding a reference to a class that it's currently
	been loaded so byval_arg.type will be zero.
2010-11-08 12:40:01 -02:00
Rodrigo Kumpera 1a7a15a7c2 Fix FieldInfo::GetFieldFromHandle signature. 2010-11-08 12:40:00 -02:00
Paolo Molaro a8b78ff188 Fixed make dist for log profiler. 2010-11-08 14:45:22 +01:00
Paolo Molaro 158c0a4fd9 Emit object heap sizes for allocations and heap-shot in the log profiler. 2010-11-08 14:45:22 +01:00
Atsushi Eno 46fde0a06b Forgot to add a test xml. 2010-11-08 20:37:37 +09:00
Atsushi Eno 8e87c03a72 Fix positional parameter argument output location check.
MarkupExtension with multiple arguments are prohibited at top level.
2010-11-08 20:35:12 +09:00
Paolo Molaro d65e2eedb3 Added a check for a corner case of a stack walk during thread startup.
* mini-exceptions.c: sometimes an allocation happens at thread startup
where the data structures are not yet setup to allow stack walking.
If we request a stack trace there, we'd crash. To reproduce the crash
without this change, just run xsp with the log profiler with the nocalls
option.
2010-11-08 12:33:14 +01:00
Atsushi Eno 9bff0f7ab4 Fix attribute state management to handle x:Key inside MarkupExtension correctly.
Namely TypeExtension (it got working).
2010-11-08 20:22:09 +09:00
Paolo Molaro 5fc8a5719a More log profiler portability and warning fixes. 2010-11-08 11:23:30 +01:00
Paolo Molaro 38cb5187d3 Integrated the log profiler in the build, warning and portability fixes. 2010-11-08 11:23:30 +01:00
Paolo Molaro 6c06f55291 Log profiler: added copyright header and comments. 2010-11-08 11:23:30 +01:00
Paolo Molaro 7f93becb13 Ported log profiler to windows (untested) and OSX time factor fix. 2010-11-08 11:23:29 +01:00
Paolo Molaro f67923665f Documented the current version for the log profiler data format. 2010-11-08 11:23:29 +01:00
Zoltan Varga 68ab07d8df Make frames of type FRAME_TYPE_MANAGED_TO_NATIVE act as a marker, i.e. the caller should ignore them and unwind once more to get the last managed frame and its associated context. 2010-11-08 11:20:48 +01:00
Atsushi Eno a7458b3b37 Fix PositionalParameter serialization in collections.
Dictionary still needs another fix.
2010-11-08 17:46:38 +09:00
Atsushi Eno f84b250c5e Forgot to remove old internal stuff. 2010-11-08 16:51:32 +09:00
Atsushi Eno 4aeba5a662 Fixed member order in Dictionary key and item in XamlObjectReader.
This requires messy and complicated change and sort of illogical member ordering!
2010-11-08 16:41:43 +09:00
Zoltan Varga 7a467ce886 Fix llvm build with LLVM 2.8. 2010-11-08 08:04:22 +01:00
Mark Probst 3d84063923 Merge branch 'marksweep-evacuate' 2010-11-07 02:46:11 +01:00
Mark Probst 620491fbeb [sgen] Don't compile evacuation for parallel mark.
Parallel Mark doesn't yet support evacuation, so don't compile
it in.
2010-11-07 02:45:59 +01:00
Mark Probst 45a572c7f8 [sgen] User-settable evacuation threshold.
A MONO_GC_PARAMS option for setting the evacuation
threshold.
2010-11-07 02:45:59 +01:00
Mark Probst 6bb3054454 [sgen] Mark&Sweep evacuation.
When the occupancy for some block size falls below a certain
threshold the objects in that block size will be evacuated in
the next major collection, resulting in optimal occupancy.
2010-11-07 02:45:58 +01:00
Mark Probst dde29351d5 [sgen] Function for querying current collection generation.
This lets the major collector query whether the current collection
is a minor or a major one.
2010-11-07 02:45:58 +01:00
Mark Probst 7660facdde [sgen] Dump Mark&Sweep heap occupancy.
For each block size dump the occupancy to the heap-dump
file.
2010-11-07 02:45:57 +01:00
Mark Probst 73f1564d9d [sgen] Flush the binary protocol file when protocol is flushed. 2010-11-07 02:45:57 +01:00
Zoltan Varga 3d6867b8a5 Remove the s390 hacks from the EH code by decreasing the ip stored into ctx->ip by 1, as it is done on all other platforms. 2010-11-06 19:27:03 +01:00
Zoltan Varga 5fcd60cb2b Add another assert to the amd64 EH code. 2010-11-06 16:00:25 +01:00
Zoltan Varga 5828db2141 Add a few exceptions to the EH code to determine whenever they hold on all platforms in all cases. 2010-11-06 15:57:49 +01:00
Zoltan Varga 6a8f8293b6 Reorganize mono_handle_exception_internal ():
* Use mono_find_jit_info_ext ()
	* Avoid putting the main body of code inside two if's.
2010-11-06 15:16:25 +01:00
Zoltan Varga 78cab86f88 Rework an if () inside an #ifdef since it confuses emacs. 2010-11-06 10:14:14 +01:00
Zoltan Varga 8c49ed4d49 Fix encode/decode_sleb128 () on 64 bit systems. 2010-11-06 08:26:14 +01:00
Marek Safar c1e37c3871 Add *.xml to ignore list 2010-11-05 23:03:29 +00:00
Marek Safar d03341dbdd Merge branch 'marek' 2010-11-05 22:56:38 +00:00
Geoff Norton f647af4ec5 Implement the new logging profiler on OSX 2010-11-05 17:23:49 -04:00
Jb Evain 5c97b5844c Update Mono.Cecil from upstream 2010-11-05 21:59:16 +01:00
Atsushi Eno 1227d3d127 Dictionary key might be inappropriately serialized into an attribute. 2010-11-06 04:14:37 +09:00
Sebastien Pouliot e7b97d3d29 Add CookieParser to Moonlight's System.Net assembly
* moonlight_raw_System.Net.dll.sources: Add new CookieParser to the
build
2010-11-05 14:39:32 -04:00
Sebastien Pouliot 27c2fe35b0 Refactoring to ease fix cookie support in moonlight client stack
* System.Net/CookieParser.cs: Add more common/shared code
* System.Net/HttpWebResponse.cs: Move out CookieParser class and some
utility methods so they can be shared with Moonlight http client stack

* System.dll.sources:
* mobile_System.dll.sources:
* moonlight_shared_System.dll.sources:
	Add new CookieParser.cs to the build
2010-11-05 14:39:31 -04:00
Atsushi Eno e3ac503b2f Add support for ContentPropertyAttribute (e.g. Reference) in XamlXmlWriter. 2010-11-06 03:32:08 +09:00
Atsushi Eno 8bdc98daec Implement member pending at StartMember when it should be indeterminant. Lots of code cleanup. 2010-11-06 03:18:15 +09:00
Zoltan Varga d429e99ba1 Enlarge try-finally blocks preceeded by a Monitor.Enter () call to include the call itself, to avoid races inherent in such code. Fixes #651546. 2010-11-05 19:11:46 +01:00
Atsushi Eno 83d8b694f7 Add new XamlXmlWriter implementation. Marked some as NotWorking while removed a lot. 2010-11-06 02:11:17 +09:00
Atsushi Eno 3a2ac55105 MarkupExtension type xml names are omitted their "Extension" parts. 2010-11-06 02:10:18 +09:00
Atsushi Eno 77ff0df5c2 indent text xml. 2010-11-06 02:09:24 +09:00
U-monkeytimeline2\atsushi 119c076db1 A few refactoring for new XamlXmlWriter. Add tests for [ContentProperty]. 2010-11-06 00:50:51 +09:00
Paolo Molaro 6612c9b9fd First cut of the new log profiler and report generator.
This is the first preview version of the new log profiler.
It is not included in the build yet because it needs some
portability cleanups, see the top of proflog.c for compilation
instructions.
It currently works on Linux x86 (64 bit support may work but it
is untested).
The documentation is included in the log-profiler.txt file.
2010-11-05 16:40:18 +01:00
Zoltan Varga e9651677ae Fix DISABLE_REFLECTION_EMIT build. 2010-11-05 16:30:04 +01:00
Marek Safar 47e2203ea3 Better 843 error message 2010-11-05 15:01:38 +00:00
Marek Safar 80185a4ba2 Move 2.0 Monitor.Enter back out of the try block 2010-11-05 15:00:29 +00:00
Marek Safar 18fe51510d Only when importing nested types definition base type cannot be setup 2010-11-05 14:45:16 +00:00
Zoltan Varga da71d7b013 Get rid of gregs_from_ucontext (), use the normal UCONTEXT_REG_... macros instead. 2010-11-05 12:23:06 +01:00
Marek Habersack 69461167e7 [asp.net,routing] Fix for bug #651593. Don't match all-literal routes for URLs with excessive segments. 2010-11-05 11:36:49 +01:00
Marek Safar bf6d573cca Don't build obsolete Compat.ICSharpCode.SharpZipLib in 4.0 profile to avoid another version conflict 2010-11-05 09:59:57 +00:00
Zoltan Varga d9b81d69ce Unify stack walking functions:
* Rename mono_jit_walk_stack_from_ctx_in_thread to mono_walk_stack.
	  * Make the old stack walker use this one.
	  * Remove the old mono_walk_stack functions.
2010-11-05 09:55:21 +01:00
Zoltan Varga 91a8cbb014 Fix a bug introduced by the previous change to mono_jit_walk_stack_from_ctx_in_thread (). 2010-11-05 07:45:33 +01:00
Zoltan Varga 389dd714ae Fix crashes in the debugger stack walk code if a gshared method calls another using a managed-to-native translation. 2010-11-05 06:53:11 +01:00
Zoltan Varga 0df8863a69 Fix more gshared problems in the soft debugger. 2010-11-05 06:37:28 +01:00
Zoltan Varga b288c467f3 Fix gshared support in the soft debugger. Fixes #651251. 2010-11-05 05:20:54 +01:00
Carlos Alberto Cortez a55d4cde7d Add our new System.ServiceModel.Channel test files to the build.
* System.ServiceModel_test.dll.sources: Add
	MsmqTransportSecurityTest.cs,
	CustomPolicyConversionContext.cs,
	ConnectionOrientedTransportBindingElementTest.cs,
	and MsmqBindingElementBaseTest.cs to our test build.
2010-11-04 21:20:55 +01:00
Carlos Alberto Cortez 4ba9634043 Add IPolicyExportExtension tests for classes in System.ServiceModel.Channels.
* CustomPolicyConversionContext.cs: New file, containing a dummy
	child of PolicyConversionContext.
	* MsmqBindingElementBaseTest.cs: New test file.
	* ConnectionOrientedTransportBindingElementTest.cs: New test file.
	* HttpTransportBindingElementTest.cs: Add IPolicyExportExtension
	tests.
2010-11-04 21:20:54 +01:00
Carlos Alberto Cortez 1d6f9ec0cc Implement IPoliciExportExtension support for MsmqBindingElementBase.
* MsmqBindingElementBase.cs: Implement ExportPolicy.
2010-11-04 21:20:54 +01:00
Carlos Alberto Cortez 842e1ab9c5 Implement IPolicyExportExtension support for ConnectionOrientedTransportBindingElement.
* ConnectionOrientedTransportBindingElement.cs: Implement ExportPolicy.
2010-11-04 21:20:54 +01:00
Carlos Alberto Cortez 17b69cf278 Implement IPolicyExportExtension support for HttpTransportBindingElement.
* HttpTransportBindingElement.cs: Implement ExportPolicy.
2010-11-04 21:20:54 +01:00
Carlos Alberto Cortez 9566ef1777 Properly set the default values for MsmqTransportSecurity.
* MsmqTransportSecurity.cs: Use the proper default values for
	this class.
2010-11-04 21:20:53 +01:00
Carlos Alberto Cortez c2f7031954 Add MsmqTransportSecurityTest.cs to our test suite.
* MsmqTransportSecurityTest.cs: New test file.
2010-11-04 21:20:53 +01:00
Marek Habersack ff393a15e0 [asp.net] HttpContext.TimeoutReached - check whether timer != null before using it. 2010-11-05 00:35:56 +01:00
Marek Habersack c4b5cb7a86 [asp.net] Expire items must always check if the dequeued item is not null before using it. 2010-11-05 00:30:10 +01:00
Sebastien Pouliot 0e648f53f6 Move assignation earlier to ensure value is available for parameter checks
* FileStream.cs: Move anonymous assignation earlier so the value is
available when validation are made (and calls other methods)
2010-11-04 15:13:55 -04:00
Jonathan Pryor 4b60c1460d [mdoc-update] Explicitly order //Type children.
Unlike 03c231a585, this isn't needed for
'mdoc-validate', it's instead for "niceness" reasons.

For example, as with f6e4f65b, if we update docs generated by an older
version mdoc, we'll add a <TypeSignature/> for ILAsm.  However, the
added <TypeSignature/> is at the end of the file, nowhere near the
existing <TypeSignature/>s, which is...odd.  Not bad, per-se, but
"undesirable".

Thus, we order things for consistency during/after updates.
2010-11-04 15:23:33 -04:00
Marek Safar fbc0f47adc Allow liften null as a given number of bit positions for shift operator 2010-11-04 17:49:54 +00:00
Marek Safar e713418aa0 For some strange reason Console.Write(Line) allows null params formatter arguments 2010-11-04 17:49:53 +00:00
Jonathan Pryor 03c231a585 [mdoc] Explicitly order //Member children.
The problem is the intermixing of updating "old" documentation and
wanting the result to pass `mdoc validate`.

For example, mdoc-2.6 will only generate a <MemberSignature/> for C#,
while mdoc-2.8+ will generate two, one for C# and one for ILAsm.
Unfortunately, mdoc will _append_ the new <MemberSignature/> as the
_last_ child within <Member/>; result: 'mdoc validate' gives errors.

Oops.

Thus, we explicitly reorder //Member children so that the ordering
matches the order in monodoc-ecma.xsd.
2010-11-04 12:06:31 -04:00
Jérémie Laval e3e0486d54 ConcurrentDictionary performance improvements 2010-11-04 15:51:33 +00:00
Jérémie Laval 63ebd7b9d6 ReaderWriterLockSlim performance improvements 2010-11-04 15:51:33 +00:00
Jérémie Laval bf297d5546 ManualResetEventSlim performance improvements 2010-11-04 15:51:33 +00:00
Jérémie Laval 1068c0ee3e SpinLock performance improvements 2010-11-04 15:51:33 +00:00
Marek Safar c061169613 Fix SharpZipLib 4.0 profile version number to not overwrite non-4.0 version of same assembly in GAC 2010-11-04 15:36:49 +00:00
Geoff Norton 72156a2da9 [RUNTIME] Ensure that we initialize the cpu for every thread [Bug #650439]
It appears that on OSX the FPU settings on x86/amd64 are not inherited
to child threads of a process, leading to differences in precision between
the main thread and the sub thread.  We now call mono_arch_cpu_init
on every thread on every platform
2010-11-04 11:30:07 -04:00
Marek Safar 2615d87274 Add boxing for dynamic nullable conversion of coalescing operator 2010-11-04 14:57:46 +00:00
Marek Safar 0ebd360dd8 Reject inaccessible members based on declaring type in dynamic context 2010-11-04 14:57:45 +00:00
Marek Safar b50a97b65c Inflate also event backing field 2010-11-04 14:57:45 +00:00
Marek Safar bb3eee4ca5 Another missing full dynamic type equality check 2010-11-04 14:57:44 +00:00
Marek Habersack 515968a6f2 [asp.net] Part of fix for bug #649546. Better handling of nested UpdatePanels
Nested update panels don't ever output a script block in RenderChildren, they write to the passed
HtmlTextWriter instead.
2010-11-04 14:57:45 +01:00
Atsushi Eno 4f7f56a7a7 Move XamlType-generic PositionalParameter stuff from XamlObjectReader-specific source for writer support. 2010-11-04 16:49:44 +09:00
Rodrigo Kumpera 13585bc169 Handle incorrectly encoded types.
* metadata.c (do_mono_metadata_parse_type): Fail if
	a valuetype is encoded as MONO_TYPE_CLASS and vice-versa.
	This can't be done easily in the verifier since it requires
	resolving the destination type.

	Fixes #650936
2010-11-03 21:40:28 -02:00
Gonzalo Paniagua Javier b9e194af17 a5 2010-11-03 19:07:23 -04:00
Gonzalo Paniagua Javier bbb27444f1 a4 2010-11-03 19:05:30 -04:00
Gonzalo Paniagua Javier 3ed2932719 a3 2010-11-03 19:04:17 -04:00
Gonzalo Paniagua Javier c110be734c a2 2010-11-03 18:59:34 -04:00
Gonzalo Paniagua Javier c3ec9e6597 iii 2010-11-03 18:48:22 -04:00
Rodrigo Kumpera b8bdca9e16 Don't allow zero index token in signatures.
* metadata-verify.c (parse_type): Don't allow zero index type
	tokens.

	* metadata.c (mono_metadata_decode_row): Assert on negative
	indexes.

	Fixes #560359
2010-11-03 20:37:48 -02:00
Gonzalo Paniagua Javier fd4f48aec4 i 2010-11-03 18:05:33 -04:00
Gonzalo Paniagua Javier 20f1940f2c Last 2010-11-03 17:57:59 -04:00
Gonzalo Paniagua Javier 8c88b1da85 Test 5 2010-11-03 17:29:52 -04:00
Gonzalo Paniagua Javier b3e34f7c47 Last test 2010-11-03 16:58:36 -04:00
Gonzalo Paniagua Javier 63b6f2becf Test 3 2010-11-03 16:49:56 -04:00
Gonzalo Paniagua Javier 739189e9db Test 2 2010-11-03 16:45:24 -04:00
Gonzalo Paniagua Javier 57cce04631 TEST 2010-11-03 16:42:11 -04:00
Gonzalo Paniagua Javier fc51c16274 Avoid locking in WireupAutomaticEvents
Replace a big lock with a ReaderWriterLockSlim.
2010-11-03 16:29:05 -04:00
Jérémie Laval f46227866e Fixicate net_4_0_bootstrap build. 2010-11-03 20:27:14 +00:00
Jérémie Laval 0932636327 Add tiny bit of doc on ReaderWriterLockSlim. 2010-11-03 20:14:06 +00:00
Martin Baulig 31f7bc2fef Add mono_register_symfile_for_assembly() for bundles.
2010-11-03  Martin Baulig  <[email protected]>

	* mono-debug.c (mono_register_symfile_for_assembly): New method.
	This is used together with mono_register_bundled_assemblies() and
	mono_register_config_for_assembly() to support bundles.
2010-11-03 20:41:38 +01:00
Marek Habersack 355291ccc7 [asp.net] Use faster string comparison in caches in System.Web.Compilation 2010-11-03 20:35:51 +01:00
Rodrigo Kumpera 0d3c28c1a8 Init the right runtime version.
* pedump.c (verify_image_file): Finish initializing the
	runtime here since at this point we can safely query
	what version the supplied image requires.

	Fixes #650916
2010-11-03 17:43:05 -02:00
Sebastien Pouliot f136fb348b Fix condition so the new feature is available outside NET_2_1
* mcs/class/corlib/Mono.Security.X509/X509Store.cs:
* mcs/class/Mono.Security/Mono.Security.X509/X509Store.cs:
	Replace INSIDE_CORLIB by !NET_2_1 so the new feature is
	available to mono/full framework but not where CspParameters
	(or file system, or key persistance) might not be possible
2010-11-03 15:19:59 -04:00
Zoltan Varga 579af2445d Fix encoding of large strings in the soft debugger api. Fixes #648832. 2010-11-03 19:16:41 +01:00
Jérémie Laval 90e64cabf9 Implement Partitioner.Create int and long overloads. Add corresponding unit tests. 2010-11-03 17:41:06 +00:00
Marek Safar 8ab52d2f6a Implement lock statement over generic type parameter 2010-11-03 16:50:19 +00:00
Marek Safar 29fcd8ff32 Issue a warning about re-assigned locked local variable 2010-11-03 15:53:12 +00:00
Marek Safar 1f23474174 Fixes NRE in pre-4.0 compilation 2010-11-03 13:10:36 +00:00
Marek Safar bd5cdbbddf Reset lock_taken before entering Monitor.Enter 2010-11-03 12:51:47 +00:00
Marek Safar a1745900a8 ExclusiveOr is not nullable bitwise boolean operator 2010-11-03 12:51:47 +00:00
Marek Safar 410f44d05b A candidate method can use dynamic in expanded form at non-first position 2010-11-03 12:51:47 +00:00
Jérémie Laval 9539c3e471 Add TaskExtensions class and Unwrap extension methods 2010-11-03 11:51:04 +00:00
Jérémie Laval 0d685c5ea8 Refactor Task.Wait and Task.WaitAny methods and add support for scheduler-less waiting.
A scheduler-less waiting is useful for instance in case Tasks are waited upon without having being started (like in some continuation chaining case).
2010-11-03 11:51:04 +00:00
Jérémie Laval 3e487ef9fe Set more state on TaskCompletionSource inner Task<T> 2010-11-03 11:51:04 +00:00
Paolo Molaro aa765be136 Introduced a GC heap walk API.
This API is currently only implemented for the sgen GC.
It can be used to iterate over all the managed objects in the heap
and it allows to also easily track object references.
2010-11-03 11:42:29 +01:00
Marek Safar dfbc41a9d3 typeof expression does not need unsafe context for pointer types 2010-11-03 10:34:06 +00:00
Marek Safar 704f42f6ba Pass checked context to compound member access setters 2010-11-03 10:34:06 +00:00
Zoltan Varga be4313457f Remove extra whitespace from a Makefile. 2010-11-03 07:31:18 +01:00
Marek Habersack 70f77d14ac Fix mixed newlines 2010-11-03 03:26:26 +01:00
Marek Habersack a9cb57cc13 [asp.net] Part of fix for bug #649546. A partial rewrite of the web/script resource handler.
* System.Web/System.Web.Handlers/AssemblyResourceLoader.cs: AssemblyResourceLoader/ScriptResourceHandler must
  always generate the same URL for every assembly+resource pair, or otherwise the browser would re-fetch
  the resource in situations where it is not desired (e.g. during an async request to the server to update
  a panel).
  The generated URLs are not encrypted using real encryption, just hashed.
  In addition, the handler code got modernized a bit.

* System.Web.Extensions/System.Web.UI/ScriptManager.cs: scriptStartupBlock is a 3.5+ thing

* System.Web.Extensions_1.0/Makefile: use the 1.0 Microsoft AJAX library for this compat assembly

* System.Web/System.Web.Util/MachineKeySectionUtils.cs: made GetValidationKey public
2010-11-03 03:21:02 +01:00
Marek Habersack 34537d734b [runtime] System.Web.Extensions must not be remapped to the current framework.
The reason for this is applications which still use Sys.Web.Ext 1.0* (note: 1.0 does NOT
mean the assembly is for the 1.x runtime - it's for 2.0). Remapping would cause 1.0* not
to be loaded, instead a 3.5 or 4.0 assembly would be fetched.
2010-11-03 03:21:02 +01:00
Zoltan Varga 24643f58d0 Remove obsolete mcs/configure script. Fixes #650806. 2010-11-03 02:17:00 +01:00
Sebastien Pouliot 39446cdff3 Fix bootstrapping issue wrt moonlight profile
* mcs/class/corlib/Mono.Security.X509/X509Store.cs:
* mcs/class/Mono.Security/Mono.Security.X509/X509Store.cs:
	Add if !INSIDE_CORLIB around code that use CspParameters
	in order to allow compilation to work when bootstraping
	the moonlight profile
2010-11-02 19:26:22 -04:00
Pablo Ruiz Garcia 6276334d1b [API] X509 related enhacemnts to allow 1) associating keystore's private keys with their corresponding public certificates found at X509Stores, and 2) importing private keys to X509Stores along with certificates.
mcs/class/corlib/Mono.Security.X509/X509Store.cs:
mcs/class/Mono.Security/Mono.Security.X509/X509Store.cs:
mcs/class/corlib/Mono.Security.X509/X509StoreManager.cs:
mcs/class/Mono.Security/Mono.Security.X509/X509StoreManager.cs:
	Modified MSX.X509Store to allow importing privateKeys along certificates (by using RSACryptoServiceProvider and KeyPairPersister).
	Fixed X509Store to use certificate's hash as CspParameters.KeyContainerName.

mcs/tools/security/certmgr.cs:
	Added a new -importKey action to certmgr, which allows importing a PKCS12 contained key into our KeyPair store.
	Added a more (verbose) output to certmgr's -list action.

man/certmgr.1:
	Updated certmgr man page ti reflect -importKey addition.

mcs/class/corlib/System.Security.Cryptography/CspParameters.cs:
mcs/class/corlib/System.Security.Cryptography/RSACryptoServiceProvider.cs:
	Implemented RSACryptoServiceProvider.CspKeyContainerInfo getter
	RSACryptoServiceProvider will not take into account CspParameterFlags.UseExistingKey by throwing a CryptographicException if keyset identified by KeyContainerName does not exists.
2010-11-02 19:26:22 -04:00
Gonzalo Paniagua Javier fbba364ce6 Revert change in FromBinary 2010-11-02 18:57:33 -04:00
Andrew Jorgensen 11a6cf6d42 Map libcups for mac
Fixes bnc#649994
2010-11-02 15:02:41 -06:00
Gonzalo Paniagua Javier 356497b1dc Renaming a dangling symlink works now
Ditto.

	Fixes bug #650779.
2010-11-02 14:50:03 -04:00
Atsushi Eno 4559e7636f Extracted PrefixLookup to another file. Add more XamlTypeName.ToString() tests. 2010-11-03 02:31:28 +09:00
Marek Safar 846609d3e8 Emit lock statement using Monitor.Enter (object, ref bool) when available 2010-11-02 15:21:46 +00:00
Atsushi Eno 0de0024076 Move around some members (to correct/appropriate places) for isolated xaml writer implementation. 2010-11-02 22:39:34 +09:00
Marek Safar cefe597544 Updated to r54115 2010-11-02 13:33:59 +00:00
Marek Safar 19d94dd762 Implements indirect delegates invocation via dynamic member dispatch 2010-11-02 12:45:51 +00:00
Marek Safar 892abc6f3d Pass value type dynamic members as by-ref to persist member side effects 2010-11-02 12:45:51 +00:00
Jérémie Laval 4a059f12d4 Use Task helper methods in TaskCompletionSource instead of manual setting, allow continuation flow to happen smoothly and task status to be set accordingly. 2010-11-02 11:57:01 +00:00
Marek Habersack 06cdf56198 [asp.net] 4.0-only types don't need the NET_4_0 ifdef and should be in net_4_0_System.Web.dll.sources 2010-11-02 11:30:26 +01:00
Zoltan Varga 739dc3eee9 Fix the text of the Signatures size stat. 2010-11-02 00:33:32 +01:00
Zoltan Varga 545f445662 Add a stat for the memory occupied by MonoMethodSignature structures. 2010-11-02 00:32:28 +01:00
Zoltan Varga a9e2628014 Add a stat for the the memory occupied by MonoMethod structures. 2010-11-02 00:27:55 +01:00
Zoltan Varga 329f86d220 Print double stats with more precision. 2010-11-02 00:27:54 +01:00
Zoltan Varga ccacc0e999 Include JIT time in --stats output. 2010-11-02 00:27:54 +01:00
Gonzalo Paniagua Javier e71a9ba492 Avoid killing the thread if socket already null
In some weird cases socket is null when we try to close it.
2010-11-01 18:54:14 -04:00
Marek Safar 0ed510ff0c Convert dynamic assignment in checked context when set 2010-11-01 13:26:34 +00:00
Marek Safar 7cec033f70 Check for unfixed type arguments before calling overload resolution for inferred return type 2010-11-01 13:26:33 +00:00
Marek Safar 66d8595f37 Set correct result type for chained folded enum subtraction 2010-11-01 11:41:26 +00:00
Marek Safar 7bd9ba94d6 Check binary header using right methods. 2010-11-01 11:41:26 +00:00
Zoltan Varga 7b3ac641bf Avoid adding generic classes during non-full AOT, since it leads to a huge code blowup. 2010-11-01 01:16:07 +01:00
Zoltan Varga 2509e3f624 Don't save xdebug info during AOT compilation. 2010-11-01 00:44:21 +01:00
Zoltan Varga 158658b540 Cache the array of classes in find_typespec_for_class (). 2010-11-01 00:44:20 +01:00
Zoltan Varga b79a319c25 Avoid asserts if a forced inline fails. Fix typos. Fixes #650407. 2010-11-01 00:44:20 +01:00
Gonzalo Paniagua Javier b353b9cc84 Check that the default from is not empty
This should fix a bunch of tests failing since MailAddress parsing was
	fixed.
2010-10-31 17:29:21 -04:00
Gonzalo Paniagua Javier 604d5faa0b More StringComparison.Ordinal
Use StringComparison.Ordinal when calling IndexOf to find the index of
	an ASCII string.
2010-10-31 17:23:18 -04:00
Gonzalo Paniagua Javier 0a99fc98e7 Use ordinal comparison when looking for "::"
This should fix 650355, but it might just hide the actual problem which
	seems to be related to loading CJK encodings data.
2010-10-31 17:23:17 -04:00
Nikolaos Georgiou 023a11ba6c Changed new method back to private, it was accidentally public. 2010-11-01 04:06:28 +08:00
Nikolaos Georgiou b8c064a01c Modified ResXResourceWriter so that the comment of ResXNode is not lost.
Added unit test.
2010-11-01 04:06:27 +08:00
Miguel de Icaza 1147a41ac7 Expose some of our internals to the Mono.Winforms assembly 2010-10-31 15:59:40 -04:00
Miguel de Icaza 0a25f1b2c0 Fix broken patch 2010-10-31 15:54:51 -04:00
Miguel de Icaza ff0446f219 Allow this file to expose its types as public if needed 2010-10-31 15:50:47 -04:00
Zoltan Varga 397024490c Disable inlining if the assembly has a DebuggableAttribute with the IsJITOptimizerDisabled flag set. Fixes #604486. 2010-10-31 10:26:57 +01:00
Brian Luczkiewicz 1150dee5cc Enable --aot (but not --aot=full) on osx/x86 2010-10-31 03:16:58 +01:00
Zoltan Varga 0b67580d66 Fix the amd64 dyn call code after the this passing changes. 2010-10-31 02:53:16 +01:00
Zoltan Varga 7f5005289b Call mono_field_get_type () in one place to fix an aot problem. 2010-10-31 02:36:50 +01:00
Zoltan Varga 0de8e13cf8 Return information from decode_method_ref () in a MethodRef structure instead of a bunch of arguments. 2010-10-31 02:36:08 +01:00
Zoltan Varga 856bf105d7 Fix the generation of GenericEqualityComparer () instances in AOT. 2010-10-31 02:57:01 +02:00
Zoltan Varga 1a99c2d0f4 Rework decoding of method references in the AOT runtime.
* Improve the hashing of methods to include generic arguments
	   * Get rid of can_method_ref_match_method (), use a 'target' argument
	     to decode_method_ref () instead.
	   * Bump corlib file format version.
2010-10-31 02:46:00 +02:00
Geoff Norton 64fb66ca3a Fix the build 2010-10-30 18:21:53 -04:00
Zoltan Varga be23648c92 Fix some copyright messages. 2010-10-30 21:23:45 +02:00
Koushik Dutta 5c63fcc96b Fix Android build. MINI_THREAD_VAR_OFFSET needs to be defined as MONO_THREAD_VAR_OFFSET (which returns -1). 2010-10-30 21:03:18 +02:00
Marek Habersack 552458f072 [asp.net] Fix for bug #650050. HtmlSelect must render non-standard attributes of every ListItem. 2010-10-30 03:36:10 +02:00
Alex Fort f056dfcbd9 Don't use a buffer size of 1 for zero-length buffers
Using a size of 1 for zero length buffers causes (on linux) the last character to be eaten by the buffer until the next flush.
2010-10-30 08:49:58 +08:00
Alex Fort 1605e82860 [Fix] Don't enforce a minimum size for zero-length buffers, fixing #645193
InitBuffer was forcing the length of any buffer smaller than 8 to be 8, but for zero-size buffers, this isn't correct.
2010-10-30 08:49:57 +08:00
Zoltan Varga 9c48c696c0 Int32.MinValue/-1 should throw OverflowException, not ArithmeticException. Our tests didn't catch this because the former is a subclass of the latter. Fixes #649889. 2010-10-30 01:04:49 +02:00
Zoltan Varga d8ad9f9133 Update the LLVM backend to latest LLVM SVN. 2010-10-30 00:41:42 +02:00
Geoff Norton b51eba0323 [OSX] Reintroduce Cocoa System.Drawing support
The old Cocoa backend for System.Drawing appears to still work.  You must
pass in a NSView.Handle while in the DrawRect method, or with lockFocus
called to prepare the NSGraphicsContext.
2010-10-29 15:46:26 -04:00
Marek Safar 4f39070a86 Fix line endings. 2010-10-29 19:23:47 +01:00
Marek Safar f212360d70 Merge branch 'marek' 2010-10-29 19:17:29 +01:00
Marek Safar 313bb63cc0 Make dynamic array access index expresions in checked context 2010-10-29 19:15:50 +01:00
Rodrigo Kumpera dccf4cc6e5 Handle lazy field loading.
* icall.c (ves_icall_MonoField_SetValueInternal): Handle
	lazy field loading. Fixes buildbot crash.
2010-10-29 15:51:04 -02:00
Rodrigo Kumpera c22f608491 Make GetGenericTypeDefinitionImpl not init the class.
* icall.c (ves_icall_Type_GetGenericTypeDefinition_impl):
	Don't mono_class_init the type. Fixes test-792.
2010-10-29 14:00:25 -02:00
Rodrigo Kumpera ab6ed140dc Replace an assert with a nicer check.
* icall.c (ves_icall_get_method_info): Use _checked variant
	and avoid the assert.
2010-10-29 13:26:28 -02:00
Rodrigo Kumpera 5692054959 Fix vtable check that broke banshee compilation.
* class.c (mono_class_check_vtable_constraints): Only
	fetch the class of generic arguments as those are the only
	ones we care about. This fixes the case where a generic
	arguments has its container as a constraint and we crash
	with a stackoverflow.
2010-10-29 13:15:28 -02:00
Andreia Gaita 5f78cb8870 [JsonWriter] Fix JsonWriter yet again. Behaviour of WriteRaw on .net and sl is
different, so ifdef to make everyone happy!
2010-10-29 16:03:57 +01:00
Marek Habersack 19e5207189 [asp.net] Fix for bug #649551. The LosFormatter (bool, string) constructor does not expect a base64-encoded string.
Telerik controls pass the string "string" as the macKeyModifier parameter to the constructor. Tests show that .NET
accepts such input without throwing an error. The passed string is now converted into a byte array and passed to
the LosFormatter (bool, byte[]) constructor.
2010-10-29 15:53:19 +02:00
Marek Habersack 67ad55bc49 [asp.net] Fix for bug #649034. Control.FindControl continues to search for controls above itself if it's a naming container.
When a control is a naming container and an attempt to find a control with non-segmented id (e.g. 'myControl') is made,
the search continues to the control's naming container if pathOffset is 0, that is we're at the start of the search.
2010-10-29 14:44:56 +02:00
Atsushi Eno 70c7392f53 Add tests for all types that are tested for XamlObjectReader (mostly NotWorking). 2010-10-29 20:46:37 +09:00
Marek Safar beb87ce1ea Ignore private methods in batch import 2010-10-29 11:56:05 +01:00
Atsushi Eno c10b6198ca Remove old code. 2010-10-29 19:31:22 +09:00
Atsushi Eno 30c4562e33 (Finally) replace old XamlObjectReader implementation with new one. 2010-10-29 19:23:05 +09:00
Atsushi Eno 4d2f56704e Added some notes on how we can use and/or test this XamlReader under .NET. 2010-10-29 19:16:22 +09:00
Atsushi Eno 9ec578b7e3 Make it strict to apply PositionalParameters to limit to only simple arguments.
Simple arguments can be written as "{foobar}" markup string within an attribute.
2010-10-29 19:07:45 +09:00
Atsushi Eno afb8a42303 More compliant ordering of GetAllMembers() results. ConstructorArguments and PositionalParameters go first. 2010-10-29 18:32:18 +09:00
Atsushi Eno c90699d047 GetAllMSeveral fixes regarding property readability and writability.
XamlMember.IsReadOnly returns false if there is private get accessor.
This is used to filter nonpublic accessors out, so replaced its usage with
!IsWritePublic to check truly read-only members.

This fix also required some changes in markup types (as IsReadOnly value now
differs).
2010-10-29 16:50:19 +09:00
Geoff Norton 4e7462b7a3 [OSX] Fix DriveInfo.GetDrives on OSX [Bug #643910]
Merge a patch from John Labovitz <[email protected]> which
correctly populates the DriveInfo structure on OSX instead of returning
random values.
2010-10-29 00:38:20 -04:00
Atsushi Eno 5a406fd3a3 Fix JsonWriterTest.WriteRaw() regression. WriteRaw() is (looking) almost identical to WriteString() here. 2010-10-29 13:30:35 +09:00
Marek Habersack 8cedb72187 [asp.net] Fix for bug #646505. BoundField must not assume the sender of the OnDataBindField is DataControlFieldCell. 2010-10-29 02:25:25 +02:00
Marek Habersack 51bf1e84a9 [asp.net] HttpRequest.MapPath changes to match .NET
When MapPath is passed a rooted, absolute path which is not in the current application's virtual
root, it should throw an exception. If the path is rooted and within the current application, it
will be mapped as if it was relative to the root.
2010-10-29 00:06:21 +02:00
Atsushi Eno 9f00ccba9e Introduce new XamlObjectReader implementation.
Nodes are iterated in XamlNodeIterator which is used by XamlObjectReader.
It collects namespace declarations as it does in the reading the objects.
The new code is somewhat better, with less "special" hardcoded rules.

It can be even compiled with .NET (with TypeExtensionMethods).
2010-10-29 05:58:20 +09:00
Atsushi Eno f1d77de5c8 Add GetItems tests for collection invoker. 2010-10-29 05:56:18 +09:00
Geoff Norton 42c08bab07 [OSX] Fix debug=casts on OSX (Bug: 639172)
mono --debug=casts requires fast tls access and the jit tls intrinsic.
We already had support for OP_TLS_GET on darwin/x86, but we did not
expose the "tls offset (pthread_key_t)" from mini to the intrinsic,
instead falling back on the io-layer keys.  We now store mono_lmf_addr
in a pthread_key for darwin/x86 so that we can do fast-tls in the jit
and fix this feature.  X86 only for now.

r: kumpera
2010-10-28 16:07:08 -04:00
Atsushi Eno e2268cbf02 Collected tested types into a new file. 2010-10-29 03:24:13 +09:00
Atsushi Eno 6ccc7c3dd8 Add empty List<int> case. 2010-10-29 03:03:25 +09:00
Andrew Jorgensen d470131bdb Move version to 2.9 (next to be 2.10) 2010-10-28 11:49:41 -06:00
Atsushi Eno ed055f6d6b Add more object reader tests with corner cases. 2010-10-29 01:40:10 +09:00
Atsushi Eno 7d698bc65e Fix XamlType.Name to take TypeArguments into consideration. 2010-10-29 01:38:52 +09:00
Atsushi Eno 54bab18c9a Use ArrayList like .NET (no practical changes). 2010-10-29 01:36:54 +09:00
Marek Safar d9a6b2c266 Fix emitted code for predefined or/and operation between bool? and bool 2010-10-28 16:42:55 +01:00
Rodrigo Kumpera 6e3b1178b5 Better handle failure when loading types.
* class.c (mono_class_create_from_typedef): If the type
	fails due to a problem with the parent make sure we have
	byval_arg and this_arg are setup properly as the whole
	runtime requires those two to be setup even for broken
	types.
2010-10-28 12:25:03 -02:00
Rodrigo Kumpera 40a4ce020d Kill some loader leaks.
* class.c (mono_class_create_from_typedef): Avoid a loader leak
	on parent load.

	* class.c (mono_method_signature_checked): Avoid a loader leak
	if type parsing fails.
2010-10-28 12:25:03 -02:00
Marek Habersack 244ae1ff20 [asp.net] Fix for bug #646479. Do not call control's OnLoad twice when it is dynamically added.
Control.AddedControl will call the new control's LoadRecursive which would trigger its OnLoad
handler. OnLoad must be called only if control hasn't already been loaded.
2010-10-28 15:59:18 +02:00
Marek Habersack 66eab5d08e [asp.net] Cosmetics + dead code removal 2010-10-28 15:16:41 +02:00
Marek Habersack 3639946555 [asp.net] Fix for bug #646810. Implemented FormsAuthentication.EnableFormsAUthentication + tests 2010-10-28 14:57:31 +02:00
Marek Safar e1bc810225 Add more type parameter checks for inherited constraints. 2010-10-28 13:44:32 +01:00
Marek Safar 24630e8743 New test. 2010-10-28 13:44:31 +01:00
Marek Safar 304f7d04b2 Implement type inference of dynamic arguments used as unknown types 2010-10-28 13:44:31 +01:00
Marek Safar b2b95ef137 Use correct location for unexpected type parameter 2010-10-28 13:44:30 +01:00
Atsushi Eno 0019f8a9ab Add another couple of MarkupExtension related tests. 2010-10-28 21:06:01 +09:00
Atsushi Eno 1e4ea0c7a3 Add more complicated PositionalParameters test (which actually does not use it). 2010-10-28 17:58:51 +09:00
Atsushi Eno a38b96f783 Remove extra DateTime handling and add some rules for PositionalParameters. 2010-10-28 17:57:38 +09:00
Geoff Norton 0502ed902d Fix the profiler thread start/end hooks for threadpool threads 2010-10-27 16:47:27 -04:00
Andreia Gaita ef80c566af [Xml] Fix GetAttribute to handle null namespaces properly, add unit test. 2010-10-27 19:33:56 +01:00
Rodrigo Kumpera b34c251a36 Only set lockTaken to TRUE if it did not timeout. 2010-10-27 14:29:17 -02:00
Rodrigo Kumpera 698600df43 Don't crash with bad signatures.
* reflection.c (mono_param_get_objects_internal): Use checked
	variant of mono_method_signature.
2010-10-27 14:28:17 -02:00
Atsushi Eno 4358b4fe71 Some internal refactoring for new XamlObjectReader implementation. 2010-10-27 22:58:29 +09:00
Rodrigo Kumpera 699882da11 Make MonoType::GetField lazier.
* icall.c (ves_icall_Type_GetField): Use
	code path that lazy load the field type.

	Fixes #649522
2010-10-27 11:04:40 -02:00
Rodrigo Kumpera 2b6bf5fe94 Change a g_warning into a mono_trace call.
* loader.c (mono_loader_set_error_assembly_load): Don't
	g_warning on failure. Use our tracing facility instead.
2010-10-27 11:04:40 -02:00
Marek Safar 7e31b3942f Reorder MethodBase::Attributes usage 2010-10-27 13:37:44 +01:00
Marek Safar 46e844f36f More tests 2010-10-27 13:37:44 +01:00
Marek Safar 630f551d7f [649448] Compare original goto block for cloned blocks. 2010-10-27 13:37:43 +01:00
Rodrigo Kumpera 0bc59aeab2 Load less stuff when resolving MethodInfo::Attributes.
* MonoMethod.cs: Add new icall for ::Attributes.

	* icall.c: New icall to resolve ::Attributes so it can
	avoid loading the signature and work around methods with
	broken signatures.

	Fixes #649527
2010-10-27 10:39:44 -02:00
Marek Habersack 30bbf985d2 [asp.net] Fix for bug #646984. Theme stylesheets must be output in correct order.
This patch changes the way we output theme stylesheets to match .NET behavior. Theme
.css files are sorted using an ordinal and case-insensitive comparer and are output
to the page at the top of the <head> element's contents instead of at the end.
2010-10-27 14:23:21 +02:00
Atsushi Eno c20fc380bc Add a few more default value tests. 2010-10-27 19:34:45 +09:00
Atsushi Eno da9c060963 Move member ordering code to LookupAllMembers(). 2010-10-27 19:33:53 +09:00
Marek Habersack d0b8416d37 [asp.net] Fix for bug #643847. Membership.CreateUser overloads must check username and password for correctness. 2010-10-27 11:56:41 +02:00
Marek Safar a48ae5445c [648360] When inflating nested generic type use same type arguments to not inflate already inflated type 2010-10-27 10:41:30 +01:00
Atsushi Eno a0211617fc Uncommend code that prohibits XamlMemberInvoker.GetValue() on XamlDirective. 2010-10-27 18:05:19 +09:00
Atsushi Eno f874f479be Fix wrong lookup base call. 2010-10-27 18:04:13 +09:00
Marek Habersack 4b528bc0ed [asp.net] Fix a build-breaking typo introduced in ea730c5de2 2010-10-27 10:53:37 +02:00
Marek Safar b1bdd5d48c Make the static field readonly 2010-10-27 09:52:25 +01:00
Marek Safar 38be62a8d3 Make static fields readonly 2010-10-27 09:50:24 +01:00
Marek Safar 708a0fece0 crlf fix 2010-10-27 09:50:07 +01:00
Marek Safar b74ec136d3 Revert unwanted changes 2010-10-27 08:40:44 +01:00
Marek Safar 7ef9d2c493 Check nested declaring types when testing member overrides 2010-10-27 08:40:43 +01:00
Marek Safar a6d9b644a7 Delay expensive inflator construction for type parameter constraints 2010-10-27 08:40:43 +01:00
Marek Habersack ea730c5de2 [asp.net] Fix for bug #648407. HttpCachePolicy must use the value passed to AppendCacheExtension when generating the Cache-Control header 2010-10-27 01:27:45 +02:00
Marek Habersack 8af1840778 [asp.net] Added encryption notes to ObjectStateFormatter.{Serialize,Deserialize} 2010-10-27 01:09:13 +02:00
Marek Habersack a763ff40a4 [asp.net] Fix for bug #648432. HttpResponse.WriteFile maps file path if it isn't an absolute one.
Both on Linux and on Windows file paths starting with x:\\, x:// and //server don't have their
paths mapped. On Linux it may have weird (and unexpected for a Windows developer) effects since
we cannot treat those names in any special way - the are valid Unix file names. On Windows things
will work as expected.
2010-10-27 00:57:34 +02:00
Rodrigo Kumpera 1533b39ccd Fix some counters under 32bits. 2010-10-26 18:53:28 -02:00
Rodrigo Kumpera e07d43896e Implemenent v4 Monitor::TryEnter overloads.
* Monitor.cs (TryEnter): Implement v4 overloads that take
	a "ref book lookTaken" var. Setting this flag must be done
	in the runtime to avoid async exceptions.

	* Monitor.cs (Enter): Fix v4 overload to be async exception
	safe.

	* monitor.c: New icall for the above.

	Fixes #649159
2010-10-26 18:53:28 -02:00
Sebastien Pouliot 7b3f524735 Add missing 'same-module' check for GetConstructorToken
* ModuleBuilder.cs: Add missing 'same-module' check for GetConstructorToken
just like methods and fields already have
2010-10-26 16:26:25 -04:00
Rodrigo Kumpera ba585b5454 Properly encode field signatures created using gtds.
* reflection.c (field_encode_signature): If the field
	was constructed with a GTD, encode it as an open instance.

	Fixes #649233
2010-10-26 16:07:18 -02:00
Rodrigo Kumpera 8a828011d0 Fix exception message 2010-10-26 14:20:10 -02:00
Rodrigo Kumpera 53522f1963 Check for declaring type.
* TypeBuilder.cs (GetField): Check if the declaring type
	matches the supplied type gtd.

	* TypeBuilderTest.cs: Add regression test.

	Fixes #649237
2010-10-26 14:17:33 -02:00
Atsushi Eno 69bf97bca7 XamlLanguage.Items is not correctly supported in XamlObjectReader. 2010-10-27 01:00:59 +09:00
Atsushi Eno c46d53afd0 Add Dictionary related tests. 2010-10-27 00:19:01 +09:00
Atsushi Eno 452a1df964 ItemType returns Value item for Dictionary type. 2010-10-27 00:17:37 +09:00
Rodrigo Kumpera 31147ee679 Avoid initing the class for some array related methods in Type.
* icall.c (ves_icall_MonoType_GetArrayRank): Don't
	mono_class_init the class as it's not needed.

	* icall.c (ves_icall_Type_make_array_type): Ditto.

	Fixes #648833
2010-10-26 13:16:29 -02:00
Rodrigo Kumpera d7f6eeea6a Add regression test for #649014 2010-10-26 12:58:26 -02:00
Rodrigo Kumpera e718d3c4dc Casts must be to realizable types.
* verify.c (do_cast): The casted to type must be a boxable type.

	Fixes #649014
2010-10-26 12:42:21 -02:00
Sebastien Pouliot e1cc1b33a5 Fix moonlight build since [s]mcs now depends on System.Diagnostics.Stopwatch
* moonlight_shared_System.dll.sources: Add Stopwatch to fix the build
2010-10-26 09:28:16 -04:00
Marek Habersack b538ab1129 [asp.net] Cosmetics to make code a bit more efficient 2010-10-26 13:36:00 +02:00
Marek Habersack 0e0e9a334b [asp.net] Fix for bug #648439. Do not prefix HttpRequest.ServerVariables ["QUERY_STRING"] with a '?' 2010-10-26 13:16:25 +02:00
Marek Habersack 94d7d01269 [asp.net] Fix for bug #649198. Implement MasterPage.InstantiateInContentPlaceHolder
Code based on patch from Rikard Johansson <[email protected]>, thanks!
2010-10-26 12:00:29 +02:00
Zoltan Varga 63465fe9e2 Mark tls_get with clob:c on arm. 2010-10-26 04:35:02 +02:00
Carlos Alberto Cortez 360a4af131 [fix] #647689: Fire the Mouse* events on ComboBox when using the child TextBox.
* ComboBox.cs: Fire the Mouse* events when using the child
	TextBox.
	Fixes #647689.
2010-10-25 22:32:56 +02:00
Carlos Alberto Cortez dd3f5813b0 [fix] #648449: When updating Z-order for our controls add the scrollbars as well.
* ListView.cs:  When updating the Z-order for our controls don't
	forget to add the implicit scrollbars we well.
	Fixes #648449.
2010-10-25 22:32:56 +02:00
Gonzalo Paniagua Javier 1735719902 Send Keep-Alive when reusing
Send Keep-Alive headers when reusing a connection and limit reuses to
	100.
2010-10-25 20:28:38 -04:00
Gonzalo Paniagua Javier d20e427694 Add connection timers and reuses
Use a timer to handle read timeouts and extend reuses to regular
	connections, not just chunked. The timer is set to 90s for the first
	request and 15s for subsequent requests.
2010-10-25 20:27:48 -04:00
Gonzalo Paniagua Javier d0c0ed0788 Implemente HttpListenerRequest.KeepAlive
Ditto.
2010-10-25 20:27:47 -04:00
Gonzalo Paniagua Javier 224001610d Use SocketAsyncEventArgs
BeginAccept/EndAccept replaced by AcceptAsync.
2010-10-25 20:27:47 -04:00
Marek Habersack 967d70e50b [asp.net,routing] Fix for bug #648901. Matching engine must ignore trailing slash in the URLs. 2010-10-26 02:00:21 +02:00
Marek Habersack 7244e38c9f [asp.net] HttpRuntime.AppDomainAppPath may be null during tests, check it before using. 2010-10-26 02:00:21 +02:00
Rodrigo Kumpera 1f5fc722bb Add regression test for #649017. 2010-10-25 19:47:45 -02:00
Rodrigo Kumpera 9e3af35518 Rename create_methodspec to create_open_instance. 2010-10-25 19:47:44 -02:00
Rodrigo Kumpera ca01c95ed7 Encode all gtd as open instantiations by default.
* ILGenerator.cs (TokenGenerator): GetToken now taken an extra
	argument create_open_instance if it should encode a gtd as
	a generic instance.

	* ILGenerator.cs (ILGenerator): Ask TokenGenerator to create
	an open instance under all cases but if the opcode is ldtoken.

	* ModuleBuilder.cs: Adjust to signature change.

	* DynamicMethod.cs: Ditto.

	* Environment.cs: Since an icall signature has changed, we
	must bump corlib version.

	* appdomain.c: Ditto.

	* icall.c: Pass the new value forward to
	mono_image_create_token.

	* reflection.c (mono_image_create_token): Handle create_methodspec
	for TypeBuilder and MonoType.

	Fixes #649017
2010-10-25 19:47:44 -02:00
Marek Safar abd9a33306 Keep only 1 Dispose implementation 2010-10-25 18:55:05 +01:00
Marek Safar a0d7b20774 Recover from invalid implicit lambda block 2010-10-25 18:55:04 +01:00
Marek Safar 7495adfbd9 Add more details to timing debugging 2010-10-25 18:55:04 +01:00
Marek Safar 11811e9de3 Warnings cleanup. 2010-10-25 18:55:04 +01:00
Marek Safar 573f37c118 Make setting a position out of the buffer size actually work 2010-10-25 18:55:03 +01:00
Latif Khalifa 4bd17ff18d Avoid nullref when clearing TextBox that has not yet been displayed 2010-10-26 01:33:55 +08:00
Pablo Ruiz Garcia 47a7aa40fd [API] Fix for bug: https://bugzilla.novell.com/show_bug.cgi?id=648888 2010-10-26 01:31:34 +08:00
Atsushi Eno 92a36f40c5 Improve namespace collector implementation to prepare for positional parameters. 2010-10-26 01:35:15 +09:00
Zoltan Varga 572c0d6f4f Add a test for #632224. Fix dtest-app.exe dependencies. 2010-10-25 18:08:51 +02:00
Zoltan Varga 53b58abc55 Disable catchpoints when the DISABLE_BREAKPOINTS flag is used during an invoke. Fixes #632224. 2010-10-25 18:08:10 +02:00
Atsushi Eno 33c42bac10 checkin forgotten files. 2010-10-25 22:34:42 +09:00
Atsushi Eno 0c883c719d Add PositionalParameters tests (NotWorking).
Before hacking StaticExtension support, we need it working.
2010-10-25 22:33:01 +09:00
Marek Habersack a7bfa6b633 [corlib] added a few missing Environment.SpecialFolder definitions to InternalGetFolderPath (4.0) 2010-10-25 13:25:39 +02:00
Marek Habersack 4662d97427 [asp.net] Better handling of application's AppDomain restart
* HttpRuntime.cs: disable filesystem watchers on appdomain shutdown and refuse to process
  requests while the current AppDomain is unloading
* HttpApplicationFactory.cs: if the current AppDomain is unloading, ignore FileSystemWatcher
  notifications
* WebConfigurationManager.cs: work around a deadlock issue when entering a ReaderWriterLockSlim
  upgradeable read lock very early during ASP.NET runtime/AppDomain initialization. Every few runs
  the attempt would lock up and since adding a section to cache is not a critical operation we can
  afford timing the lock out in this case. The lockup is probably due to the fact that RWLS is using
  thread local storage to store the current thread's lock status and it may happen that the TLS is
  not cleared during thread object finalization (see metadata/threads.c, the start_wrapper function)
2010-10-25 13:25:39 +02:00
Atsushi Eno abd9cbfd72 Refactoring namespace declaration output for getting .NET-like attribute output. 2010-10-25 20:19:24 +09:00
Atsushi Eno 2d6b132f64 Write some special names back when writing xaml to XmlWriter. 2010-10-25 17:57:58 +09:00
Atsushi Eno 86e2fc2faa Add a couple of writer tests (NotWorking) and fixed XamlServices to not omit xmldecl. 2010-10-25 16:17:53 +09:00
Gonzalo Paniagua Javier f4f515fd0e Throw exceptions here instead of in DeflateStream
To get the same stack trace as in bug #647948, we need to set the
	underlying DeflateStream to null and throw the ObjectDisposedException
	from this class. Same applies to the NotSupportedException.
2010-10-24 18:44:33 -04:00
Gonzalo Paniagua Javier bf7c6cfc35 BinaryWriter.BaseStream calls Flush()
Before returning the base stream, BinaryWriter.BaseStream calls Flush
	on it. Added test for this.

	Fixes bug #647948.
2010-10-24 18:43:18 -04:00
Zoltan Varga 7dd94584f4 Add tests for the eglib remapper. 2010-10-24 19:30:08 +02:00
Zoltan Varga fc3b6c4641 Add a g_hash_iter symbols to the eglib remapper. 2010-10-24 19:30:07 +02:00
Marek Safar d3a30b68f8 Add missing v3 language version 2010-10-24 16:58:05 +01:00
Marek Safar c37022a015 New test. 2010-10-24 16:58:05 +01:00
Zoltan Varga fd036a2b56 Extract the default profiler into its own file. 2010-10-23 23:41:56 +02:00
Zoltan Varga bf338e5a43 Use int 3 as G_BREAKPOINT on x86-64 too. Hopefully fixes #648838. 2010-10-23 20:38:12 +02:00
Zoltan Varga 8e755d3501 Fix another regression in the Array.Sort () methods, allow keys and items to be of different length. Fixes #648828. 2010-10-23 16:47:30 +02:00
Zoltan Varga 4c883ffdd5 Implement memory barriers for amd64/x86. Fixes #648831. 2010-10-23 16:30:31 +02:00
Michael Hutchinson fbd6abac72 [SDB] Add BeginConnect/EndConnect to VirtualMachineManager
Launch and Listen methods had async version but Connect did not.
2010-10-23 04:06:29 -04:00
Rodrigo Kumpera e8a3aabb67 MonoType::GetGenericArguments don't need to mono_class_init.
* icall.c (ves_icall_MonoType_GetGenericArguments): Don't
	mono_class_init here since it's not needed.

	Fixes #648725
2010-10-22 19:18:01 -02:00
Rodrigo Kumpera 8f1e86cc79 Checks the constructor declaring type.
* TypeBuilder.cs (GetConstructor): Check if the ctor
	declaring type is the right one and the same as type.

	* TypeBuilderTest.cs: Add regression test.

	Fixes #648391
2010-10-22 17:57:00 -02:00
Rodrigo Kumpera 3d8030db17 Correctly encode fields with GTD types.
* reflection.c (mono_image_get_generic_field_token): If
	the field type is a GTD, ensure its generic_container is
	properly initialized.

	Fixes #648616
2010-10-22 17:15:16 -02:00
Marek Safar 4473fcc20e Use faster MemberKind when checking for a nested type 2010-10-22 19:32:11 +01:00
Marek Safar b5b838910c Include parent type parameters when inflating nested type parameter constraint of type parameter type 2010-10-22 19:32:10 +01:00
Marek Safar dc31abbde1 Move nested declaration looup to TypeContainer 2010-10-22 19:32:10 +01:00
Marek Safar 552c72c039 Add dynamic conversion to coalescing operator 2010-10-22 19:32:09 +01:00
Gonzalo Paniagua Javier fe9a8c3328 Unbreak the world 2010-10-22 14:20:38 -04:00
Gonzalo Paniagua Javier 4a183ff5d6 Remove 'web' directory 2010-10-22 12:53:17 -04:00
Gonzalo Paniagua Javier f8c9c87512 Sniff, sniff
Remove the old (really) stuff to generate the website from makefiles.
2010-10-22 12:52:19 -04:00
Gonzalo Paniagua Javier 231527ee62 Update mappings after latest changes to Mono.Posix
New mappings created for the epoll code.
2010-10-22 12:48:39 -04:00
Zoltan Varga b50141c93a Emit GenericEqualityComparer<T> instances for each EqualityComparer<T> instance in AOT, the former is created dynamically by the latter. 2010-10-22 17:57:57 +02:00
Zoltan Varga 9972d8c661 Use locale_charset() from iconv which will use nl_langinfo (CODESET) anyways but it will
do canonicalization so we will get the correct charset name, because nl_langinfo (CODESET)
can return different things on different systems. This at least fixes OpenBSD.
2010-10-22 17:57:57 +02:00
Jb Evain 981dc2505e simplify code 2010-10-22 16:38:26 +02:00
Jb Evain a99236c085 update cecil.pc 2010-10-22 16:38:11 +02:00
Jb Evain b0f727733d delete unused file 2010-10-22 16:37:55 +02:00
Jérémie Laval adedfedd00 Use test-and-test-and-set pattern in LazyInitializer::EnsureInitialized 2010-10-22 15:16:49 +01:00
Jérémie Laval 252741661e Fix a dodgy ReaderWriterLockSlim unit test 2010-10-22 15:16:49 +01:00
Atsushi Eno 8cbb38d404 We can use ImportAllEndpoints(). 2010-10-22 19:07:46 +09:00
Atsushi Eno a536dadf89 It should not have to import all schema elements, but those only used by contracts. 2010-10-22 19:06:20 +09:00
Atsushi Eno 4ef5d6daee Small refactoring on enumerating message schema element contents. 2010-10-22 17:58:16 +09:00
Zoltan Varga 5189834841 Fix test compilation with older glibs. 2010-10-22 09:28:47 +02:00
Atsushi Eno 85cc330c95 Don't put KnownTypeAttributes on enums. 2010-10-22 16:23:24 +09:00
Atsushi Eno 2e7af0d301 Make generated type names unique. 2010-10-22 15:49:51 +09:00
Gonzalo Paniagua Javier 656b38c2e1 Update 2010-10-22 00:24:47 -04:00
Gonzalo Paniagua Javier 46ad959976 Update zlib to version 1.2.5 2010-10-22 00:13:41 -04:00
Gonzalo Paniagua Javier 827a231ffc Remove arbitrary 1024 limit in GetProcesses
Reallocate the array of PIDs if EnumProcesses used all of it and try
	again.
2010-10-22 00:01:38 -04:00
Zoltan Varga 5d586feb86 Implement GHashTable iterators. 2010-10-22 03:00:19 +02:00
Gonzalo Paniagua Javier 7a19bf766e FromBinary does not need ToLocalTime
When converting to DateTime from a long, we don't need ToLocalTime().
	Setting the kind to Local is enough.
	Patch from Mig.

	Fixes bug #648252.
2010-10-21 16:00:56 -04:00
Zoltan Varga 92d916315a Fix building the logging profiler. 2010-10-21 21:57:03 +02:00
Miguel de Icaza 0b4e9ab8b9 Document server option to --debugger-agent 2010-10-21 14:14:33 -04:00
Zoltan Varga c64d81020c Fix an assert in the LLVM backend if a long value was passed to 'localloc'. 2010-10-21 19:01:02 +02:00
Zoltan Varga e3e5cb8415 Fix the assembly/class caching problems in the threadpool code too. 2010-10-21 18:50:33 +02:00
Marek Safar bb1590431e Update issues list 2010-10-21 16:07:48 +01:00
Marek Safar 46dd735d7f Implement closest override return type matching 2010-10-21 16:07:48 +01:00
Marek Safar 30f3fd3434 Forget to re-add this test file 2010-10-21 16:07:47 +01:00
Zoltan Varga 06bc6b0951 Add an assert to mono_class_from_name_cached () to make sure it is only called for mscorlib. 2010-10-21 16:37:48 +02:00
Zoltan Varga ec2da4e688 Avoid caching stuff in socket-io.c in static variables, since the socket assembly can be unloaded, cache them in MonoDomain instead. 2010-10-21 16:15:54 +02:00
Atsushi Eno 76af53ecff OnEndXxx() methods should not try to let void return to a local variable. 2010-10-21 20:53:00 +09:00
Atsushi Eno 21ff33fad9 Since event arg type name can be EventArgs1, do not match by type name. Check rather base type instead. 2010-10-21 20:27:48 +09:00
Atsushi Eno dec04b58f3 Void event should not have Result of type void. 2010-10-21 19:44:20 +09:00
Atsushi Eno ea6de3e520 Make generated type names unique. 2010-10-21 19:06:56 +09:00
Atsushi Eno 2886a0e567 Async end operation needs cast. 2010-10-21 18:28:02 +09:00
Atsushi Eno f7578006e6 Remove ExtensionData from moonlight proxy. 2010-10-21 16:54:19 +09:00
Gonzalo Paniagua Javier ee7711138d Replace EnumProcesses with OpenProcess
namedmutex_prewait was (partially) listing the running processes and
	then searching through them. Now we use OpenProcess to verify the owner
	of the mutex is still alive.

	Fixes bug #648133 (note that you need MONO_ENABLE_SHM for this to work)
2010-10-21 02:45:13 -04:00
Gonzalo Paniagua Javier 1387a9a93b No need to use a GArray in EnumProcesses
Use the provided array instead of creating a new one and then copying
	it to the result.
2010-10-21 02:45:13 -04:00
Gonzalo Paniagua Javier 7035bbc0e1 Fix typo
element_size is not a boolean.
2010-10-21 02:45:12 -04:00
Atsushi Eno 52f59ff363 Add some WCF types in moonlight_raw System.Xml.Serialization.dll. 2010-10-21 15:32:39 +09:00
Atsushi Eno 184e1e67e5 Add #if NET_2_1 and SupportFaults member for Silverlight SlSvcUtil proxy. 2010-10-21 15:30:23 +09:00
Gonzalo Paniagua Javier fe282179e7 Fix the collision handling code
After the fix for bug #605092, inserting timers with an equal due time
	was failing because searching in the list was also using a reference
	comparison. Now, when adding a new timer, we search using just the due
	time.
	Fixes bug #648130.
2010-10-21 00:08:54 -04:00
Marek Habersack 8aa83da53e [asp.net] ObjectStateFormatter.{De}serialize methods taking stream use a magic value to mark the stream. 2010-10-21 01:21:53 +02:00
Jb Evain f07b755ebb Polish monodocer port to cecil-light 2010-10-20 18:57:50 +02:00
Jb Evain ea14f3389a Fix tuner build 2010-10-20 18:57:33 +02:00
Jb Evain a141215525 Pass the appropriate defines for the net_4_0 profile 2010-10-20 18:00:40 +02:00
Jb Evain 0930250788 Port Mono.Cecil.Mdb to cecil-light 2010-10-20 18:00:04 +02:00
Andrew Jorgensen 3d877ae977 README.tests was deleted in d9c8bdf 2010-10-20 09:55:18 -06:00
Jb Evain 64d93fd000 Fix navigation of all types 2010-10-20 17:28:13 +02:00
Marek Safar d9c8bdff9a Clean up test files 2010-10-20 16:23:40 +01:00
Marek Safar b122bf1db7 [601801] Fixes for parsing nant documentation
Gleb Golubitsky <[email protected]>
2010-10-20 16:23:39 +01:00
Marek Safar b6b8428bd6 Check for name conflicts between parent members and child block variables 2010-10-20 16:23:39 +01:00
Marek Safar fe4774bb26 [647845] Don't skip parent types when looking for simple name 2010-10-20 16:23:38 +01:00
Jb Evain 662858c552 Fix resolving of events and properties 2010-10-20 17:05:15 +02:00
Jb Evain 08f129513b Fix MONO_PATH 2010-10-20 17:04:59 +02:00
Marek Habersack aec7b258f4 [asp.net,wcf] WCF proxies are generated using a slightly different mode of operation.
WCF proxies don't include full namespace of the contract.
2010-10-20 16:07:21 +02:00
Tak c5f606408f [Fix] Ensure correct stack pointer initialization on !POSIX
* metadata/threads.c: Ensure correct stack pointer initialization on !POSIX.
This fixes some random crashes with embedded, release-optimized binaries on windows.

License: MIT/X11
2010-10-20 15:43:30 +02:00
Marek Habersack d4bb1c86b7 [wcf] make /js and /jsdebug dispatchers work.
There were several issues here:

- The IChannelDispatcherBoundListener was defined twice, in two different namespaces, and it caused code in
  ChannelDispatcher.Attach not to set its associated listener's ChannelDispatcher property to the correct value.
  This, in turn, caused incorrect HttpListenerManagerTable operation, where it would put the "/js" and "/jsdebug"
  dispatchers in separate HttpListenerManagers, instead of in the main (base) service's one.
- After fixing the above, it turned out that SvcHttpHandler selected the manager based on the host's base address,
  when it should first try to find one whose URL matches the current request exactly.
2010-10-20 15:04:37 +02:00
Atsushi Eno 34becbfa45 Forgot #if NET_4_0. 2010-10-20 19:23:02 +09:00
Atsushi Eno 78ffa62836 Add ExtendedProtectionPolicy members. Required by .config files by .NET svcutil. 2010-10-20 18:06:02 +09:00
Atsushi Eno fec3b9c50b ExtendedProtection Configuration types are also used in WCF 4.0. 2010-10-20 17:24:51 +09:00
Marek Safar 3e86b47fd4 More work on ambiguous named arguments 2010-10-20 09:11:00 +01:00
Marek Safar 9fa1aa9f49 More optional parameter VB compatibility fixes 2010-10-20 09:10:59 +01:00
Atsushi Eno 82f4a20b24 Add System.Security.Authentication.ExtendedProtection stubs, referenced by WCF 4.0. 2010-10-20 16:26:07 +09:00
Gonzalo Paniagua Javier a171f3314b Able to read MS serialized nullable<primitive>
Handle boxed primitive types for nullable fields.
	Fixes bug #646556.
2010-10-20 01:36:46 -04:00
Rodrigo Kumpera 97fc739b1c Implement better explicit override checks.
* metadata-verify.c: Add mono_verifier_verify_methodimpl_row.

	* metadata.c (mono_class_get_overrides_full): Call in the
	verifier.

	* verify.c: Add mono_verifier_is_signature_compatible that
	does propery signature variance checking.
2010-10-20 01:44:09 -02:00
Rodrigo Kumpera 5047694e44 Merge branch 'master' of github.com:mono/mono 2010-10-20 01:39:48 -02:00
Rodrigo Kumpera b8964c415e Proper recursive vtable checking.
* class.c: Pass around a list of currently been built vtables
	to really avoid going into loop.

	* reflection.c: Adjust to extra arguments.

	* object.c: Ditto.
2010-10-20 01:25:27 -02:00
Zoltan Varga 1a6d1fc225 Avoid trying to read the gc name in the AOT runtime from older AOT images. Fixes #647918. 2010-10-20 05:09:14 +02:00
Rodrigo Kumpera 0e5ba14997 Temporarily disable iface check o generic instances 2010-10-19 16:38:19 -02:00
Zoltan Varga abaa053ecd Remove the duplicate assembly name->string code from two places, uses mono_stringify_assembly_name (). 2010-10-19 16:02:27 +02:00
Rodrigo Kumpera 4ebfe2e4b0 Add regression test for #640780 2010-10-19 11:47:03 -02:00
Rodrigo Kumpera 98a6891b5b Don't assign vtable slots to static iface methods.
* reflection.c (ensure_runtime_vtable): When recalculating
	method slots, ignore static methods.

	Fixes #640780
2010-10-19 11:47:02 -02:00
Sebastien Pouliot e10979e53a Remove dead code from BigInteger since it confuse some people
* corlib/Mono.Math/BigInteger.cs:
* Mono.Security/Mono.Math/BigInteger.cs:
	Remove Montgomery internal inner class since it's buggy, has not
	been used for years and confuse some people (seeing ghosts of
	CVE-2007-5197)
2010-10-19 08:57:38 -04:00
Zoltan Varga b8ffa9466d Avoid crashes in the assembly name->string code if aname->name is NULL. 2010-10-19 14:55:20 +02:00
Tak 9007fbdcbe Don't disconnect an unconnected socket. Fixes #606809.
* Mono.Debugger.Soft/VirtualMachineManager.cs: Don't disconnect an unconnected socket. Fixes #606809.

This patch is licensed MIT/X11.
2010-10-19 14:45:49 +02:00
Atsushi Eno ae22368d81 Add complicated dictionary state and support dictionary in XamlObjectReader. 2010-10-19 21:38:38 +09:00
Zoltan Varga b52908b969 [Fix] Turn off exception callback filtering on WoW64.
* mini/exceptions-x86.c: Turn off exception callback filtering on WoW64. This allows managed exceptions to actually work when using 32bit mono on 64bit Windows.

License: MIT/X11
2010-10-19 14:34:32 +02:00
Tak 41a0f72c4e [Fix] Ensure that exceptions are propagated when embedding
* metadata/object.c:
* mini/mini.c:
Ensure that exceptions get propagated back to the caller
when mono is being embedded.
License: MIT/X11
2010-10-19 14:17:56 +02:00
Atsushi Eno 037f21dae7 Make XamlType.GetMember() and XamlType.GetAllMembers() consistent. Return Items for Dictionary. 2010-10-19 20:08:51 +09:00
Atsushi Eno 71e2a8fbc2 Add Dictionary reader test and made some fixes towards it. 2010-10-19 18:39:02 +09:00
Marek Safar 393237d148 Restore altered arguments when overload resolution ends up in dynamic dispatch 2010-10-19 09:31:31 +01:00
Marek Safar a039eb38a0 Pass modifier when used with named argument 2010-10-19 09:31:30 +01:00
Atsushi Eno c63a9d5546 Array takes ArrayExtension shape and thus won't reach here, so remove NIE. 2010-10-19 17:20:53 +09:00
Atsushi Eno d9441e55ab Implement FactoryMethod and Arguments support in XamlObjectWriter. 2010-10-19 17:15:13 +09:00
Atsushi Eno 1df29691de Handle x:* attributes and look for standard directives in XamlXmlReader. Factory method got working. 2010-10-19 16:36:55 +09:00
Rodrigo Kumpera 1d0cba2c7b Handle cyclic interface definitions.
* class.c (collect_implemented_interfaces_aux): Fail if
	any of the collected interfaces is broken.

	* class.c (mono_class_init): Don't bother initing if the
	class is broken. Don't assert on cycles, fail the type
	instead.

	Fixes #568025
2010-10-18 21:54:31 -02:00
Marek Habersack 2a6bc369a3 [asp.net] make sure the string we pass to DecryptAssemblyResource is a valid Base64 string 2010-10-18 23:17:12 +02:00
Jonathan Pryor 9f264b8748 Don't load app.config when we're processing app.config
Fixes #605033.

'cause stack overflow is back, mkay?

  at System.Diagnostics.TraceImpl.InitOnce () <0x0005b>
  at System.Diagnostics.TraceImpl.get_IndentLevel () <0x0000b>
  at System.Diagnostics.TraceListenerCollection.InitializeListener (System.Diagnostics.TraceListener) <0x0000f>
  at System.Diagnostics.TraceListenerCollection.Add (System.Diagnostics.TraceListener) <0x00017>
  at System.Diagnostics.TraceListenerCollection..ctor (bool) <0x0007f>
  at System.Diagnostics.TraceListenerCollection..ctor () <0x00013>
  at System.Diagnostics.DiagnosticsConfigurationHandler.GetSharedListeners (System.Collections.IDictionary) <0x00083>
  at System.Diagnostics.DiagnosticsConfigurationHandler.Create (object,object,System.Xml.XmlNode) <0x003cf>
  at System.Configuration.ConfigurationSection.GetRuntimeObject () <0x0033d>
  at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection (string) <0x00041>
  at System.Configuration.ConfigurationManager.GetSection (string) <0x00030>
  at System.Configuration.ConfigurationSettings.GetConfig (string) <0x0000f>
  at System.Diagnostics.DiagnosticsConfiguration.get_Settings () <0x00043>
  at System.Diagnostics.TraceImpl.InitOnce () <0x0005b>

Thus, when we're getting the <sharedListeners/> element, we shouldn't call
the TraceListenerCollection default constructor, as that will attempt to add
the DefaultTraceListener (which isn't needed anyway, as the
DefaultTraceListener is explicitly added by TraceImplSettings).
2010-10-18 16:57:53 -04:00
Marek Habersack bc874337c2 [wcf] ServiceHost directive can span several lines. 2010-10-18 22:26:49 +02:00
Rodrigo Kumpera 1617d260cb Constructors signatures must be hasthis.
* verify.c (do_newobj): Check if the .ctor signature is
	hasthis. Even thou this is not a string 335 requirement
	our runtime asserts otherwise.

	Fixes #568004
2010-10-18 17:50:22 -02:00
Rodrigo Kumpera c8a1007ef5 Merge branch 'master' of github.com:mono/mono 2010-10-18 17:50:19 -02:00
Marek Habersack 3942f0720e [wcf] Don't close HTTP response prematurely.
Service is invoked in the context of the System.Web pipeline and closing the response before the final
output stream flush causes the generated response not to ever reach the client. This patch makes sure
the System.Web pipeline takes care of all the response housekeeping.
2010-10-18 20:55:22 +02:00
Rodrigo Kumpera bad3a468ec When creating the vtable of generic instances, check their arguments.
* class.c (mono_class_setup_vtable): Check generic instances
	using mono_class_check_vtable_constraints.

	* class (mono_class_check_vtable_constraints): A generic
	instance can't have a vtable if one of its generic arguments
	has a broken vtable. Otherwise we'll have a realized type
	that will go broken once one of its arguments gets initialized.

	* object.c (mono_class_create_runtime_vtable): Check generic
	instance arguments since creating the rumtime vtable doesn't
	require resolving the metadata one.

	Fixes #644915
2010-10-18 15:53:17 -02:00
Zoltan Varga 9adec0b88e Fix some warnings. 2010-10-18 19:49:58 +02:00
Atsushi Eno d0160a9fe1 StaticExtension also puts PositionalParameters (not sure why, but it's like TypeExtension). 2010-10-19 01:06:00 +09:00
Marek Safar 8a80ce7646 [512754] Overload resolution with named or optional arguments has to use closest member parameters 2010-10-18 16:40:27 +01:00
Marek Habersack 2bb017f21c [runtime] Fix for bug 646075. Added support for short version string in the <supportedRuntime> element
Starting from .NET 4.0, the <supportedRuntime/> 'version' attribute accepts a shorter
runtime version string - v4.0 - in addition to the previously accepted vX.Y.Z format.
2010-10-18 14:43:19 +02:00
Atsushi Eno 3169106f3a Enable working test (that was blocked just by XmlDocument API). 2010-10-18 21:06:03 +09:00
Atsushi Eno adf9e99a21 XmlDocument.InnerText is overriden to explicitly throw IOE in 4.0. 2010-10-18 21:04:02 +09:00
Atsushi Eno 74dfff7e80 Several fixes for types that include static members. 2010-10-18 18:23:16 +09:00
Atsushi Eno f3a90a355c Take TypeConverter into consideration in XamlObjectReader. 2010-10-18 16:39:31 +09:00
Atsushi Eno 0b4af104b8 XamlXmlWriter.WriteValue() accepts only string. 2010-10-18 16:20:52 +09:00
Zoltan Varga 257a08850a Avoid calling sem_post on a uninitialized semaphore during thread attach, it works under linux, but fails under *bsd. Fixes #647248. 2010-10-18 01:55:41 +02:00
Zoltan Varga aa53562093 Enable a more specialized version of the MONO_INST_FAULT removal optimization which is safe in the face of llvm optimizations. Flush stdout before dumping llvm methods since LLVM's outs () seems to use a different fd/stream. 2010-10-17 17:33:40 +02:00
Zoltan Varga 8884362975 Implement passing of this as the first argument for ia64 correctly. 2010-10-17 15:05:18 +02:00
Andreia Gaita 987ef9dbab [Json] Add support for calling external json (de)serialization methods
On Moonlight, ScriptObject types have custom (de)serialization methods that
need to be called whenever a user object includes properties of that type.
This patch creates a TypeMap subclass (ExternalTypeMap) and exposes a method
that can be called from moon's System.Windows.Browser to register custom
serialization and deserialization methods, keyed by type. These are called
whenever a property is found with a type (or base type) that has custom
methods registered.
2010-10-16 19:58:08 +01:00
Andreia Gaita ef2049a2b6 [Json] Fix decimal type serialization 2010-10-16 19:58:08 +01:00
Zoltan Varga 6ae4dc7406 Really fix the ia64 build. 2010-10-16 20:53:38 +02:00
Atsushi Eno 5152d56447 enable one more test. 2010-10-16 19:33:26 +09:00
Atsushi Eno f40383b06b For empty collection, do not put meaningless Items member and GetObject. 2010-10-16 19:28:28 +09:00
Atsushi Eno cc4b6fc49d Write null value as NullExtension regardless of its member type. 2010-10-16 19:06:48 +09:00
Zoltan Varga f4b0930ea8 Fix a warning. 2010-10-16 00:59:57 +02:00
Zoltan Varga aa09ed4f70 Fix a regression introduced by the assembly name parsing changes. 2010-10-15 22:22:02 +02:00
Zoltan Varga 23a734a10b Enable MONO_ARCH_HAVE_TLS_GET on arm platforms that support it. 2010-10-15 21:28:20 +02:00
Marek Safar 67a6907f33 [646997] Correctly emit platform ILOnly flag 2010-10-15 19:17:42 +01:00
Marek Safar cfd260225a Extension method argument cannot exercise numeric conversion 2010-10-15 18:14:09 +01:00
Marek Safar 496484305b Add more dynamic conversion restrictions 2010-10-15 17:32:33 +01:00
Zoltan Varga 8560b5d39f Add support for assembly names with embedded and starting spaces. 2010-10-15 18:22:17 +02:00
Zoltan Varga 26bb760238 Add support for assembly names with embedded and starting spaces. 2010-10-15 18:22:17 +02:00
Marek Safar 85bebe819e Don't be too verbose when building response files 2010-10-15 15:20:26 +01:00
Marek Safar aad016fd87 Clean up few more warnings 2010-10-15 15:20:25 +01:00
Marek Safar 894b26feca Warnings cleanup 2010-10-15 15:20:25 +01:00
Ankit Jain d6093401de [xbuild] Fix bug #646941. Add explicit System.Core for >=3.5 projects.
For projects targeting TargetFrameworkVersion >= 3.5, automatically
add a reference to System.Core . This can be controlled via two
properties:

 $(AddAdditionalExplicitAssemblyReferences) and
 $(AdditionalExplicitAssemblyReferences) .

This is used only for projects built with ToolsVersion=4.0 .
2010-10-15 18:49:13 +05:30
Ankit Jain 4b9311714b [xbuild] Set default TargetFrameworkVersion=4.0 for ToolsVersion=4.0 2010-10-15 18:48:20 +05:30
Frank Wilhelm 37329cdd7c Make Validate() less restrictive for contracts with explicit UriTemplate. 2010-10-15 19:41:33 +09:00
Marek Safar be75f24eec More tweaks to dynamic overload resolution 2010-10-15 11:18:35 +01:00
Marek Safar 6327b98a8c A conditional expression with either dynamic side is always of dynamic type 2010-10-15 11:18:35 +01:00
Marek Safar a179b0e10d Don't define same parameter more than once. 2010-10-15 11:18:34 +01:00
Zoltan Varga 5147c5c590 Fix LLVM backend build with latest LLVM SVN. 2010-10-15 11:22:25 +02:00
Zoltan Varga 61b281be10 Fix warnings by defining GNU_SOURCE in eglib's configure. 2010-10-15 11:21:26 +02:00
Atsushi Eno bc8a44b6c3 Remove wrong stack push of members. 2010-10-15 18:05:44 +09:00
Atsushi Eno 5076e0858e Differentiate Instance property and internal object stack to retrieve properties. 2010-10-15 17:50:00 +09:00
Zoltan Varga 23301c75f7 Fix ia64 build. 2010-10-15 10:27:20 +02:00
Atsushi Eno d8072b2060 Support ArrayExtension Items and GetObject node in XamlObjectReader. 2010-10-15 16:31:00 +09:00
Zoltan Varga 04d9dd844b Rename find_jit_info_no_ext to simply find_jit_info (). 2010-10-15 00:02:13 +02:00
Zoltan Varga 8112493a28 Get rid of the old mono_arch_find_jit_info functions + defines as all platforms support the new API now. 2010-10-15 00:02:12 +02:00
Zoltan Varga 3aeca7d7c7 Transition s390/mips/ia64 to use mono_arch_find_jit_info_ext. 2010-10-15 00:02:12 +02:00
Rodrigo Kumpera d2339157b0 Add tests for protected finally blocks. 2010-10-14 18:24:01 -03:00
Rodrigo Kumpera c9658fe44f Implement handle guard support for amd64.
* mini-amd64.c (mono_arch_install_handler_block_guard):
	Implement this is the same fashion as of x86.

	* tramp-amd64.c (mono_arch_create_handler_block_trampoline):
	Same as x86 just taking call conv into account.

	* mini-amd64.h: Enable guard support.
2010-10-14 17:59:59 -03:00
Gonzalo Paniagua Javier 3bc08c8e84 [ThreadPool] Clear the thread state
Clear the thread state after finishing a work item. We were only
	resetting the background state.
2010-10-14 16:49:10 -04:00
Zoltan Varga 5df1798685 Transition sparc to use mono_arch_find_jit_info_ext. 2010-10-14 22:38:12 +02:00
Zoltan Varga 12a3a084ab Fix crashes in the AOT compiler when the loaded LLVM module is used. Fixes #646314. 2010-10-14 22:19:08 +02:00
Zoltan Varga 13cc875a76 Add -g to eglib cflags. 2010-10-14 22:04:02 +02:00
Geoff Norton 52d3be5b30 Fix windows build 2010-10-14 16:00:53 -04:00
Zoltan Varga 0605b9e41f Update the IMT thunk creation code on sparc to support net 4.0. 2010-10-14 21:49:48 +02:00
Zoltan Varga 9e90ada9bc Avoid a crash in g_convert () if iconv_open () fails. 2010-10-14 21:49:48 +02:00
Atsushi Eno 75343153ae fixity fix. 2010-10-15 03:51:28 +09:00
Atsushi Eno 98d9cae751 Fix 2.1 build. 2010-10-15 03:36:40 +09:00
Atsushi Eno 7f16785b14 Enable SecurityBindingElement.CanBuildChannelListener implementation again with fix. 2010-10-15 02:48:24 +09:00
Geoff Norton 09ae7f243d [android] pthread_kill cannot be used safely on android
Android's fork() function does not properly update the
pthread_internal_t->threadid variable to point to the tid of the
fork()'d thread, and instead still points to the pid of zygote.
As a result we need to track the android tid's manually since
gettid() is sane, and use an alternate to pthread_kill on android
Additionally, disable sgen support on android until the same
work has been done there

r: kumpera, vargaz
2010-10-14 13:02:11 -04:00
Rodrigo Kumpera b638992e9b Make GTD an open type too.
* class.c (mono_class_is_open_constructed_type): Treat
	generic type definition as an open type too. All code that
	checks is_open does to make sure the generic instance is
	realizable.
2010-10-14 13:47:03 -03:00
Rodrigo Kumpera 000fab3262 Fix memory corruption in the cache cast wrappers.
* marshal.c (mono_marshal_get_castclass_with_cache):
	Use the right parameter for the cache.

	* marshal.c (mono_marshal_get_isinst_with_cache): Use
	the right parameter for the cache. In the negative case
	store the obj_vtable and not the cache address.
2010-10-14 13:47:03 -03:00
Atsushi Eno d1430afd5a The previous changes somehow regressed on olive samples, so give quick fixes. 2010-10-15 01:03:18 +09:00
Atsushi Eno 34e1278179 Implement NetTcpBinding.CanBuildChannelFactory/Listener and several related stuff.
SecurityTokenParameters.InitializeSecurityTokenRequirement() needs to become
protected internal, so changed all overrides as well.

Some implementation in WindowsStreamSecurityBindingElement is needed only for
NetTcpBinding implementation.

Had to disable a test in SymmetricSecurityBindingElement that depended on
OneWay support (which is not yet done).
2010-10-15 00:41:39 +09:00
Jb Evain 444243c522 Add pretty print support for null values in JsonObjects 2010-10-14 14:00:41 +02:00
Jb Evain 9112013354 Allow null values in JsonObjects 2010-10-14 13:58:03 +02:00
Atsushi Eno 1ee253f41b Fill NetTcpBinding security implementation a bit. 2010-10-14 19:40:48 +09:00
Marek Safar 2c810c3ed9 More conversion tweaks for dynamic in using statement 2010-10-14 10:52:02 +01:00
Marek Safar 59820ba2ac [646298] Compile multiple interface event declarators 2010-10-14 10:52:02 +01:00
Marek Safar b29264cddd Use 2 phase dynamic load only for compound operations 2010-10-14 10:52:01 +01:00
Ankit Jain b8c0561d2b [xbuild] Add ResolveAssemblyReferencesDependsOn .
Add GetFrameworkPaths and PrepareForBuild as dependencies for
the ResolveAssemblyReferences target. This is required when it is
invoked directly from MD.

Patch from Michael Hutchinson ([email protected]).
2010-10-14 14:52:41 +05:30
Atsushi Eno 858ceeebe0 Add SecurityDuplexSessionChannel, and making room for duplex channel, phase 2. 2010-10-14 17:47:29 +09:00
Atsushi Eno 54b0493b62 Eliminate IReplyChannel dependency in security support and make room for (TCP) duplex channel. 2010-10-14 16:31:41 +09:00
Gonzalo Paniagua Javier 3198658937 Misc. fixes
-Fix validation of display name and email.
	-Cache user, host and ToString() values.
	-Fix Equals and GetHashCode.

	Fixes bug 645871.
2010-10-13 17:18:09 -04:00
Rodrigo Kumpera 1770d9541b Open instantiation can have a GTD as parameter.
* verify.c (is_valid_generic_instantiation): If the
	generic instantiation is open, GTDs can appear in
	mutual types.
2010-10-13 16:50:14 -03:00
Rodrigo Kumpera 63e2e94d21 Generic instances can end up extending a GTD.
* verify.c (mono_verifier_verify_class): The generic instance
	over its parent generic arguments will end up extending a GTD.
	The check against not extending a GTD is only valid for not
	generic instance types.
2010-10-13 15:53:38 -03:00
Sebastien Pouliot e8de8115ad Remove outdated MonoTODO
* SocketAsyncEventArgs.cs: Remove TODO on SocketClientAccessPolicy
Protocol property
2010-10-13 13:03:40 -04:00
Marek Safar e31741d7fa New test 2010-10-13 15:57:14 +01:00
Marek Safar 31bdc45665 HasDynamicElement became available use it when building dynamic custom attributes 2010-10-13 15:57:13 +01:00
Marek Safar d63c2b624b [645992] When importing dynamic type arguments dynamic custom attribute flag has to be checked 2010-10-13 15:57:13 +01:00
Marek Safar 3b2b574dd3 Dynamic type is never better than other types in overload resolution 2010-10-13 15:57:12 +01:00
Jb Evain 9816af42ff Add support for hoisted variables in the ET interpreter
This fixes #645765.
2010-10-13 16:36:31 +02:00
Rolf Bjarne Kvinge 840feace6d The System.Net.Sockets.Socket type lives in both System.dll and System.Net.dll for moonlight 2010-10-13 10:49:44 +02:00
Ankit Jain 148ff89e73 [xbuild] Reset cache of built targets, on a new project build.
All targets that get built are tracked by the engine, to avoid
unnecessary builds of targets. This should be reset on engine.Build,
unless it is explicitly requested *not to* reset it, via BuildFlags.
2010-10-13 04:57:57 +05:30
Ankit Jain 010fd9b807 [xbuild] Reset ConsoleLogger when a build finishes.
MSBuild hosts like monodevelop, which use the same logger
for multiple builds, get errors/warnings from older builds.
So, reset them whenever the BuildFinished event is raised.

ILogger.Shutdown () is invoked when the host is about to quit,
according to msdn, so can't use that.
2010-10-13 04:57:57 +05:30
Jonathan Pryor ac277b3917 Add preliminary HTTPS handling support for Android.
The problem is that Android only exposes Java APIs for ~everything of
consequence, including/especially X509 Certificate validation.  Since
we want Mono-based HTTPS support to use the underlying platform
certificates, this requires some amount of Java-using glue.  However,
we don't want to pull in a ton of Java glue into System.dll (bleh!),
so we'll instead place the glue into Mono.Android.dll's
Android.Runtime.AndroidEnvironment.TrustEvaluateSsl(), and instead
create a delegate which will invoke TrustEvaluateSsl() when needed.
2010-10-12 17:47:53 -04:00
Gonzalo Paniagua Javier 936c28ad16 Handle special case when disposing a socket.
When disposing a socket that has more than one asynchronous read/write
	pending, one of the callbacks could call DisposeAllOnClose() while
	another one is waiting on the lock. Once the lock is acquired,
	queue.Count will be 0 and Dequeue would fail.
	This if fixed now.

	Fixes bug #645675.
2010-10-12 17:30:34 -04:00
Gonzalo Paniagua Javier 9f62005cd1 Updated notes on using get-monolite-latest 2010-10-12 15:25:04 -04:00
Jb Evain 30fb9a866e Fix parameterless Action case 2010-10-12 19:56:37 +02:00
Marek Safar 502c2e6631 More fixes for implicit conversions of nullable types with nullable arguments 2010-10-12 18:07:59 +01:00
Jb Evain 797b9b8282 [Fix] fix the ET interpreter to deal with user defined delegates.
The Expression Tree interpreter was previously limited to
	lambda expression for either an Action or a Func delegate.
	This fix removes this limitation. Fixes #645770.
2010-10-12 18:15:14 +02:00
Sebastien Pouliot 63535df6bd Adjust System.Web.Extensions[_1.0].dll.sources wrt MachineKeySectionUtils.cs move 2010-10-12 11:38:48 -04:00
Sebastien Pouliot 21d2c6aedb A few moves/changes following previous patch review
* Makefile: Compile tests with TEST defined (to include System.Web.Util.
MachineKeySectionUtils unit tests)
* System.Web.dll.sources: Move MachineKeySectionUtils.cs from System.
Web.Configuration_2.0 to System.Web.Util
* System.Web_test.dll.sources: Move MachineKeySectionUtilsTest.cs from
System.Web.Configuration_2.0 to System.Web.Util

* System.Web.Configuration_2.0/MachineKeySection.cs: Adjust using
clauses. Uncomment some code. Fix TripleDES versus 3DES for Validation
under NET_4_0. Remove 'private' on fields/methods.
* System.Web.Handlers/AssemblyResourceLoader.cs: Adjust using clauses
* System.Web.Security/MembershipHelper.cs: Adjust using clauses
* System.Web.Security/RolePrincipal.cs: Adjust using clauses
* System.Web.SessionState_2.0/SessionId.cs: Adjust using clauses
* System.Web.UI/LosFormatter.cs: Adjust using clauses.
* System.Web.Util/MachineKeySectionUtils.cs: Moved from System.Web.
Configuration_2.0. Rename namespace and remove 'internal' on type
declaration

* Test/System.Web.Util/MachineKeySectionUtilsTest.cs: Moved from Test/
System.Web.Configuration/MachineKeySectionTest.cs. Add test case for
TripleDES versus 3DES
2010-10-12 11:38:48 -04:00
Sebastien Pouliot a22389fde2 Normalization of cryptographic uses in asp.net
* System.Web.Configuration_2.0/MachineKeyRegistryStorage.cs:
Remove key length check and generic key generation.

* System.Web.Configuration_2.0/MachineKeySection.cs: Add support for 4.0
ValidationAlgorithm and the use of custom algorithms (validation and
decryption). Allow the use of any, valid, key length (based on the
algorithm). Let each algorithm creates its own key (e.g. special needs,
default length...)

* System.Web.Configuration_2.0/MachineKeySectionUtils.cs: Remove key
generation (from random) code and 192bits key length hack (won't work
with custom algorithms). Add support for new (4.0) algorithms, including
custom ones. Provide uniform/shared code to Encrypt/Decrypt, Sign/Verify
and EncryptSign/VerifyDecrypt using MachineKeySection data.

* System.Web.Configuration_2.0/MachineKeyValidation.cs: Add new (4.0)
values.

* System.Web.Configuration_2.0/MachineKeyValidationConverter.cs: Add
support for new (4.0) algorithms.

* System.Web.Handlers/AssemblyResourceLoader.cs: Use the new common
cryptographic code and base64 the encrypted data.

* System.Web.Security/FormsAuthentication.cs: Use the new common
cryptographic code and base64 the signed and/or encrypted data.

* System.Web.Security/MembershipHelper.cs: Use the new common
cryptographic code - this should be 100% compatible with existing data.

* System.Web.Security/RolePrincipal.cs: Use the new common cryptographic
code.

* System.Web.Security/SqliteMembershipProvider.cs: Adapt code for
internal API change.

* System.Web.UI/LosFormatter.cs: Adapt code for internal API change.
Fix some small behaviro changes wrt NET_4_0

* System.Web.UI/ObjectStateFormatter.cs: Use the new common cryptographic
code.

* System.Web.UI/Page.cs: Remove code that is now unneeded (with the new
common cryptogrraphic code).

* System.Web.Configuration_2.0/MachineKeyCompatibilityMode.cs: New.

* Test/System.Web.Configuration/MachineKeyValidationConverterTest.cs:
Add more, mostly 4.0, test cases.

* Test/System.Web.Security/FormsAuthenticationTest.cs: Add test case to
ensure HashPasswordForStoringInConfigFile is not case sensitive.

* Test/System.Web.UI/LosFormatterTest.cs: Add some rountrip test cases
with the different ctors
2010-10-12 11:38:47 -04:00
Paolo Molaro 96880dc3e7 Fixed the console sigint deadlock, by queuing execution in the finalizer thread.
* console-io.h, console-null.c, console-unix.c, console-win32.c,
gc.c: instead of executing tons of managed code in signal context,
we wake up the finalizer thread and any complex console-specific
code will be handled there. This can cause a (usually small) delay,
but it's much better than deadlocking.
2010-10-12 17:08:42 +02:00
Paolo Molaro d3985be4e4 Search for dllimported shared libs in the base directory, not cwd.
* loader.c: we don't search the current directory anymore for shared
libraries referenced in DllImport attributes, as it has a slight
security risk. We search in the same directory where the referencing
image was loaded from, instead. Fixes bug# 641915.
2010-10-12 15:57:34 +02:00
Marek Habersack 6a5b23824c [asp.net] HiddenFieldPageStatePersister must not attempt to deserialize an empty/null string 2010-10-12 15:33:19 +02:00
Zoltan Varga 78ff804e06 Load vtable->max_interface_id using LDIND_U2. 2010-10-12 15:01:39 +02:00
Zoltan Varga 6c5018fd88 Move the helper signatures along with their init function to method-to-ir.c. 2010-10-12 13:01:56 +02:00
Marek Safar 76701e14b7 Keep parsing after invalid contstructor declaration 2010-10-12 11:22:56 +01:00
Marek Safar 114aeec4b5 [645572] Import more type as possible dynamic types. 2010-10-12 11:22:56 +01:00
Marek Safar d2ba33592c Do not create a constant null value for runtime types. 2010-10-12 11:22:56 +01:00
Marek Safar a8e77cf3bd Report correct error message for compound lifted binary operations 2010-10-12 11:22:55 +01:00
Marek Safar 0151f09f01 Fold duplex conversion casts into a expression to emit single convert for expression trees 2010-10-12 11:22:55 +01:00
Rodrigo Kumpera 270ca2aa12 Fail the class if its method overloads are broken.
* class.c (mono_class_setup_vtable): Fail the class if
	we fail to load its overloads.

	Fixes #562156
2010-10-12 01:23:20 -03:00
Jonathan Pryor 9e2c5d2c14 Fix IsolatedStorageFile.GetUserStoreForApplication() for MOBILE.
IsolatedStorageFile.GetUserStoreForApplication() would previously throw an
IsolatedStorageException because no ApplicationIdentity was provided by the
AppDomain.

We would like to provide this method in a workable fashion to facilitate code
portability with Windows Phone 7, which exposes only this method for saving
files to stable storage.

Thus, skip the ApplicationIdentity and code identity checks for MOBILE
(MonoDroid, MonoTouch) so that IsolatedStorage Just Works.
2010-10-11 22:30:50 -04:00
Rodrigo Kumpera ee2edbad34 Add regression test for #562150 2010-10-11 17:02:54 -03:00
Rodrigo Kumpera f6097ae7b2 Check if parent is a valid type.
* verify.c (mono_verifier_verify_class): Don't allow parent to
	be a GTD.

	Fixes #562150
2010-10-11 17:00:59 -03:00
Rodrigo Kumpera 70b37a738b Move IL verifier test to the right folder. 2010-10-11 16:19:56 -03:00
Rodrigo Kumpera f14f021c03 Add regression test for #562771 2010-10-11 16:19:04 -03:00
Rodrigo Kumpera ed4fd3983a Don't allow a GTD to be used as a generic argument.
* verify.c (is_valid_generic_instantiation): A GTD cannot
	be used as generic argument. Check for those conditions
	even if the argument has no constraints.

	Fixes #562771
2010-10-11 16:07:36 -03:00
Rodrigo Kumpera 53419ebdc8 Handle dynamic methods as managed.
* mini-exceptions.c (mono_find_jit_info): Treat
	dynamic method wrappers as managed methods.

	* DynamicMethodTest.cs: Add test for GetCurrentMethod.

	Fixes #640702
2010-10-11 14:12:32 -03:00
Rodrigo Kumpera 498bd512d0 Add regression test for #644935 2010-10-11 13:43:53 -03:00
Rodrigo Kumpera 804ca36acf Check if generic constraint are valid generic instantiations.
* verify.c (verify_generic_parameters): If a generic constraint
	is a generic instance, it must respect the constraint of that
	type too.

	Fixes #644935
2010-10-11 13:43:53 -03:00
Marek Safar 6cb9d00591 Compound assignments over reference type array cannot use ldelema 2010-10-11 17:25:51 +01:00
Gonzalo Paniagua Javier e98d5e3345 Remove warnings 2010-10-11 11:28:14 -04:00
Zoltan Varga dd81a333f0 Set the wrapper info for the virtual stelemref wrappers to a non-NULL value. 2010-10-11 11:18:21 +02:00
Zoltan Varga 02527ead60 Fix full-aot support for the stelemref wrappers. 2010-10-11 11:15:06 +02:00
Ankit Jain fa501bf746 [xbuild] Log TaskFinished even when task fails to initialize. 2010-10-11 04:32:22 +05:30
Marek Safar 14902f25c9 [645232] Implement ITypeDefinition for internal types. 2010-10-10 17:14:44 +01:00
Atsushi Eno 0440378961 Add missing file. 2010-10-09 13:53:57 +09:00
Atsushi Eno eb0a82aa6c Add couple of (not-working) object reader testcases. Add some comments and commented code on XamlObjectReader. 2010-10-09 13:52:36 +09:00
Rodrigo Kumpera 742deba434 Add fast stelem.ref for interfaces too.
* marshal.c (mono_marshal_get_virtual_stelemref): Add a custom
	wrapper for interface casts.

	This was the most frequent array kind left without a fast
	stelem.ref wrapper. During testing the only easy target
	left was arrays of arrays, but those are so rare that
	won't make a different on any workload.
2010-10-08 22:17:05 -03:00
Rodrigo Kumpera 0c29256779 Implement fast stelemref.
* class.c (mono_class_setup_vtable_general): Inject
	the array stelemref method on vectors of reference types.

	* class.c (mono_class_init): Properly handle the fact
	that arrays have different vtable sizes.

	* marshal.c (mono_marshal_get_virtual_stelemref): New
	function that returns a better tailored stelemref wrapper
	for a given array type.

	* method-to-ir.c (mono_method_to_ir): Emit a virtual
	call to the new faster stelemref wrapper.

	This schema uses 4 wrappers instead of one and puts
	it into the vtable of vectors of reference types.

	This change improves a synthetic benchmark of an
	equal mix of stores as compiling corlib by 25%.

	It improves pystones by 3-4%.
2010-10-08 22:17:04 -03:00
Sebastien Pouliot 08ce0295db Remove unneeded 'using' clauses 2010-10-08 16:09:20 -04:00
Sebastien Pouliot e46106929b Remove unneeded 'using' clauses 2010-10-08 16:09:20 -04:00
Sebastien Pouliot 3152346712 Fix ASP.NET HttpResponse not to depend on a (fixed) bug in UriBuilder
* System.Web/System.Web/HttpResponse.cs: Ensure '?' is not encoded as
%3F while redirecting (e.g. aspxerrorpath) since this can cause a loop.
i.e. not found leading to not found...

* System/System/Test/System/UriBuilderTest.cs: Add test to confirm the
right behavior of UriBuilder wrt how it was used by Mono's ASP.NET
2010-10-08 16:09:19 -04:00
Gonzalo Paniagua Javier 7912621a54 Buffer sizes
workingBlock should be the InputBlockSize and currentBlock the
	OutputBlockSize. Allocate currentBlock lazily.

	Test contributed by Bassam Tabbara.
	Fixes bug #644740.
2010-10-08 15:31:43 -04:00
Gonzalo Paniagua Javier 8d29212331 [CryptoStream] Invalid enum in ctor
Throw on invalid enum value in the ctor.
2010-10-08 15:31:43 -04:00
Gonzalo Paniagua Javier 1ffb522d65 Dispose calls FlushFinalBlock
Dispose calls FlushFinalBlock (even for Read mode) and this in turn
	calls either FlushFinalBlock or Flush on the underlying stream.
2010-10-08 15:31:43 -04:00
Gonzalo Paniagua Javier ed74f971db Fix Marshal.SizeOf() for structs with explicit layout
Marshal.SizeOf is now returning the expected values for explicit layout
	in 32 and 64 bits systems.

	Fixes bug #641535.
2010-10-08 15:25:37 -04:00
Marek Safar ad115a8a26 Don't assume the system.object does not have any fields 2010-10-08 18:37:08 +01:00
Marek Safar 0fe5c11b95 [642975] Fix initializer of partially static multidimensional arrays 2010-10-08 17:26:34 +01:00
Marek Safar 6e5cb792ae [644673] Import of modules got broken 2010-10-08 17:26:34 +01:00
Gonzalo Paniagua Javier bd93ca6a5a Undo mach_dep change. 2010-10-08 11:55:51 -04:00
Jb Evain 0306c04736 Port mdoc to cecil-light 2010-10-08 16:55:31 +02:00
Marek Safar 3f2b01468b Allow imported members cache to be setup in 2 phases as compiled one is to deal with generics recursions 2010-10-08 15:48:18 +01:00
Gonzalo Paniagua Javier 5c4cdd9c3e Allow -jX when compiling libgc
Add mach_dep.c to the sources.
	Fixes bug #644933.
	Thanks to Mathias Ruediger.
2010-10-08 10:39:21 -04:00
Jb Evain 27eba6825c Add support generic arguments in ModuleBuilder.Resolve*Token icalls
For ResolveTypeToken, ResolveFieldToken and ResolveMethodToken,
	resolve definitions directly and try to instantiate only types
	that can be instantiated, such as MemberRef, MethodSpec and TypeSpec.
	Also validate the memberref token type for ResolveField and
	ResolveMethod when passing them a MemberRef token.
2010-10-08 14:22:04 +02:00
Jb Evain 5e1c4a34d2 Add tests for ModuleBuilder.ResolveMember on different kind of tokens 2010-10-08 14:22:04 +02:00
Zoltan Varga c919b7fa72 Fix a warning. 2010-10-08 11:47:37 +02:00
Atsushi Eno 0e7a3971a3 Do not reject contract from the same method, could happen by a type with multiple service contracts within the typie hierarchy.
For details, see: http://lists.ximian.com/pipermail/mono-devel-list/2010-September/035940.html
2010-10-08 15:55:12 +09:00
Kornél Pál 714812b6e5 [asp.net] Fix for bug #643763. BuildManager must not fail with BuildProviders lacking the BuildProviderAppliesTo attribute. 2010-10-08 08:41:39 +02:00
Gonzalo Paniagua Javier 97704e7322 Add support for EnableSsl in smtp config.
Ditto.
	Fixes bug #644816.
2010-10-08 00:40:18 -04:00
Zoltan Varga 0d283b6640 Fix the sparc build. 2010-10-08 05:16:01 +02:00
Rolf Bjarne Kvinge 7887b9511f eglib: Make g_malloc and friends abort in case of failure (like glib does)
* eglib/src/glib.h:
* eglib/src/gmem.c: Make g_malloc and friends abort in case of failure, like
  glib does.

* eglib/src/eglib-remap.h: Remap all allocation functions.
2010-10-07 23:16:33 +02:00
Rodrigo Kumpera 99f28ef920 Implement managed versions of the caching icalls.
* marshal.c: Add mono_marshal_get_isinst_with_cache
	and mono_marshal_get_castclass_with_cache.

        * marshal.h: Export those 2 new functions.

        * method-to-ir.c: Call those functions instead of their
        icall versions. This speeds up non gshared cases by up to 3x
        and gshared by up to 2x.

        Those wrappers are not inlined since the register allocator
        doesn't handle well so the minor speedup is not worth be
        significant bloat introduced.
2010-10-07 17:38:58 -03:00
Rodrigo Kumpera 96e48a63f6 Add gsharing support for cached casts.
* class-internals.h: Add new kind of rgctx slot.

	* method-to-ir.c (handle_castclass): Emit gsharing code
	for cast with caching.

	* method-to-ir.c (handle_isinst):

	* mini-generic-sharing.c: Implement MONO_RGCTX_INFO_CAST_CACHE
	slot type. It's a 2 word domain allocated memory block with the
	cache on the first word and the vtable on the second.

	This design does a single rgctx fetch instead of two. It's
	a bit faster and can potentialy save some slots.
2010-10-07 17:38:57 -03:00
Rodrigo Kumpera 5518da4d14 Add single entry cache to casts of types with variant generic arguments.
* jit-icall.c (mono_object_castclass_with_cache): Check
        single entry cache before calling mono_object_isinst.

        * jit-icall.c (mono_object_isinst_with_cache): Check
        single entry cache before calling mono_object_isinst.
        This uses a positive and negative cache as it is used
        for type queries quite often.

        * jit-icalls.h: Export new icalls.

        * mini.c (mini_init): Register new icalls.

        * method-to-ir.c: Call into cache aware version of type
        test ops for types with variant generic arguments.

        This patch replaces direct calls to mono_object_castclass
        mono_object_isisnt to functions that check a cache first.
        The cache is per managed code callsite so the hit ratio
        is very high.
2010-10-07 17:38:57 -03:00
Rodrigo Kumpera 21835debf9 Fast cast for some cases of generic variant types.
* method-to-ir.c: Casts to generic types with variant argument
	can use the regular fast path if all variant arguments are
	valuetypes.
2010-10-07 17:38:57 -03:00
Rodrigo Kumpera aa0c6fa806 Do the right check for arrays.
* marshal.c (mono_marshal_load_type_info): Properly check for
	array types.
2010-10-07 17:38:19 -03:00
Gonzalo Paniagua Javier 8fbfdf3790 Fix CryptoStream.Dispose
-Dispose will call TransformFinalBlock() for Read streams. Fixes bug #644648.
	-Dispose () will call Dispose (bool). Fixes bug #644654.
	-Stream.Close calls GC.SuppressFinalize(). Fixes bug #644660.
2010-10-07 14:59:52 -04:00
Marek Safar 28e9fa14f3 Fix compound event assigments with dynamic side effect 2010-10-07 19:15:52 +01:00
Jb Evain f0e9b848d8 Add tests for ModuleBuilder.ResolveMemberToken 2010-10-07 20:03:12 +02:00
Jb Evain b2c91487a7 Fix resolution of memberref tokens in the dynamic case.
mono_metadata_memberref_is_method: rename to mono_memberref_is_method
	and deal with the case where the assembly is dynamic. This prevents
	a runtime crash when calling ModuleBuilder.ResolveMemberToken with
	a MemberRef token pointing to a field.
2010-10-07 20:03:11 +02:00
Zoltan Varga 935c00d792 Add --debug=casts support for ArrayTypeMismatchException's. 2010-10-07 19:22:07 +02:00
Zoltan Varga 25d8493f58 Centralize the setting of cfg->exception_type and the branching to load_error to ease debugging. 2010-10-07 19:11:38 +02:00
Geoff Norton e1079b5e14 Expose ICredentialsByHost on NetworkCredential in the MOBILE profiles 2010-10-07 13:01:25 -04:00
Jb Evain 84ce102017 Fix test 2010-10-07 16:43:41 +02:00
Jb Evain 88a0e6946a [Test] Add test for ModuleBuilder.ResolveFieldToken on generic fields. 2010-10-07 16:40:40 +02:00
Jb Evain c4a000d3c0 [Fix] Properly compute the tokens for FieldBuilders.
mono_reflection_get_token: For FieldBuilders, now reuse the token
	computed when the FieldBuilder are instantiated, instead of
	re-creating them. This avoids registering field definitions
	as MemberRefs.
2010-10-07 16:40:39 +02:00
Jb Evain 9bf0d24072 [Fix] FieldBuilder.ctor: properly register FieldBuilder token.
We were previously relying on the runtime to register the token
	for FieldBuilders, but this has issues with fields on generics types
	as it would create a MemberRef token instead of a Field token.
2010-10-07 16:40:39 +02:00
Marek Safar d900315aeb [644507] Don't use nested type cache until declaring type is setup. 2010-10-07 15:28:04 +01:00
Atsushi Eno b0ffa90c3b Significant XamlObjectWriter rewrite for solid state transition. And now it supports Array(Extension) and other MarkupExtension types. 2010-10-07 22:43:10 +09:00
Zoltan Varga 38e92f5c27 Clear the domain before unloading assemblies in mono_domain_free (). 2010-10-07 15:28:01 +02:00
Zoltan Varga 2ebe9aa341 Fix more wrappers of dynamic methods. 2010-10-07 15:28:01 +02:00
Marek Safar ca9eb55850 Fix compound assigments with dynamic side effect 2010-10-07 13:45:30 +01:00
Zoltan Varga 27bc44578b Fix make test for corlib. 2010-10-07 13:50:34 +02:00
Zoltan Varga de97c0ec4d Re-enable the tests. 2010-10-07 13:50:21 +02:00
Zoltan Varga 990542583a Avoid clearing nursery fragments before pinning, instead place arrays at the start of each fragment which cover the whole fragment. 2010-10-07 13:43:07 +02:00
Zoltan Varga 4f80d74f0e Remove the MonoGenericContext/MonoMethod arguments from the get_this_arg () and get_unbox_trampoline () family of functions, they are no longer needed after the this parameter passing changes. 2010-10-07 12:01:24 +02:00
Gonzalo Paniagua Javier ef7aaf4ac5 Disabled test until ?mcs is fixed.
This test failed to compile (internal error). Large changes required in
	?mcs before this can be compiled.
2010-10-06 15:59:30 -04:00
Gonzalo Paniagua Javier 0240df3443 URL moved and use the raw format for certdata
The URL has been moved permanently. Use the raw format instead of
	downloading the HTML page.
2010-10-06 13:48:36 -04:00
Gonzalo Paniagua Javier ade7b804ad Avoid warning
_GNU_SOURCE was redefined
2010-10-06 11:31:08 -04:00
Gonzalo Paniagua Javier 4ea9676b39 Avoid a warning
Use MONO_TYPE_BOOLEAN instead of MONO_NATIVE_BOOLEAN. Same value,
	different enums.
2010-10-06 11:25:33 -04:00
Gonzalo Paniagua Javier 187319daef X509Chain always uses the LM store
X509Chain will now add the LM store certificates always, even when the
	CU store is selected.
2010-10-06 10:18:46 -04:00
Jb Evain c75fd9abb1 Port Mono.CodeContract to cecil-light 2010-10-06 15:37:49 +02:00
Jb Evain bc93359b36 Port corcompare to cecil-light 2010-10-06 14:38:31 +02:00
Marek Safar 4ef153d879 Fix CRLF 2010-10-06 12:09:57 +01:00
Marek Safar 9daa2e3f8c Verify type parameter constraints type parameters 2010-10-06 12:01:35 +01:00
Marek Safar d817185019 Verify type parameter constraints type parameters 2010-10-06 12:01:34 +01:00
Marek Safar 654dad1de8 Fixes allowed interface method modifiers 2010-10-06 12:01:32 +01:00
Atsushi Eno 1fb4fcf720 Add more complicated state transition to XamlXmlReader and now it can handle GetObject. 2010-10-06 19:31:02 +09:00
Atsushi Eno c3a2bb4011 Use MarkupExtension.ProvideValue() so that XamlObjectReader can return expected Result. Implement internal IXamlNameResolver for Reference resolution. 2010-10-06 16:31:18 +09:00
Atsushi Eno 595b58814f Add ContentProperty support in XamlXmlReader. Add some testcases. 2010-10-06 15:47:00 +09:00
Zoltan Varga f752b780c0 Fix a warning. 2010-10-06 01:05:37 +02:00
Marek Safar de1406f17a New test. 2010-10-05 21:07:25 +01:00
Marek Safar 315c26d779 Inflate imported nested type correctly. 2010-10-05 21:00:57 +01:00
Marek Safar 060cbffe80 Compare all type arguments for nested generic types. 2010-10-05 21:00:57 +01:00
Marek Safar bc30dd1a74 line ending 2010-10-05 21:00:57 +01:00
Geoff Norton 2b638808bf Fix the build on windows 2010-10-05 15:58:38 -04:00
Rodrigo Kumpera d8901bd4e7 The nested in type should not be inflated.
* class.c (mono_generic_class_get_class): Don't inflated
	nested_in since it's not the expected behavior from managed
	land. It's a safety issue as well since the outer type can
	have more generic arguments.

	* TypeTest.cs: Add regression test.

	Fixes #643890
2010-10-05 16:23:56 -03:00
Michael Hutchinson 1084c49a94 [io-layer] Cope with pids > 16 bits
Fixes an issue in Process where "pseudo-handles" for processes with
pids > 16 bits would overflow and start getting treated as normal
handles. This would frequently segfault MonoDevelop on MacOS.
2010-10-05 13:44:30 -04:00
Geoff Norton c0e770710b Its possible that we're calling Process_free_internal on a pseudo-handle.
When we are not using SHM we use psuedo handles to return processes from pids,
however we dont guard against pseudo-handles in CloseProcess, which could lead to
calling unref on a fake handle.
2010-10-05 13:00:42 -04:00
Ankit Jain 888e2921c4 [xbuild] Update regex to not require EndProject in a sln file.
In a solution file, a Project might not have a corresponding
EndProject. This seems to be supported by VS, so updating xbuild
to support that too. Updated the regex.
2010-10-05 22:05:45 +05:30
Rodrigo Kumpera 4219903c74 Implement asm monitor/enter exit for amd64-sgen. 2010-10-05 13:12:57 -03:00
Rodrigo Kumpera 82a95c8ee5 Implement x86 support for monitor enter/exit fastpaths under sgen 2010-10-05 13:12:57 -03:00
Rodrigo Kumpera e2a4ba52e1 Enable delegate .ctor optimization under sgen.
* method-to-ir.c (handle_delegate_ctor): Emit write barriers
	under sgen.

	* method-to-ir.c (mono_method_to_ir): Enable delegate .ctor
	optimization under sgen.
2010-10-05 13:12:57 -03:00
Jb Evain 2fc30c8cf8 Port Mono.Debugger.Soft to cecil-light 2010-10-05 17:58:15 +02:00
Jb Evain 89fc408479 Port pdb2mdb to cecil-light 2010-10-05 17:45:05 +02:00
Jb Evain 73cfdfb897 Port permview to cecil-light 2010-10-05 17:11:42 +02:00
Atsushi Eno a16debc2c7 When finding SerializationMap for resolved type, use type as the key rather than name.
Make the fixed WCF test show more specific failure details.
2010-10-05 23:59:01 +09:00
Jb Evain 2a3ffc1921 Update the tuner to cecil-light 2010-10-05 16:53:34 +02:00
Jb Evain 8562e81c87 Update the linker to cecil-light 2010-10-05 16:53:15 +02:00
Jb Evain 0c600670f0 Add Cecil 0.9.4 2010-10-05 16:48:33 +02:00
Atsushi Eno b38b69536f Do not overwrite properly configured ServiceBehaviorElement.Name. 2010-10-05 18:56:27 +09:00
Atsushi Eno 158d9db8a2 Fix DataContractResolver.ResolveName() support in deserializer. Add roundtrip test. 2010-10-05 17:43:32 +09:00
Atsushi Eno 97d273a5d5 Get List<int> working with XamlXmlReader and XamlObjectWriter.
XamlObjectWriter needs stack of content object list so that List can store items correctly with nested state.
XamlXmlReader now outputs Items, and to handle it I needed special reader states.
2010-10-05 15:37:00 +09:00
Marek Habersack 83876018b4 [asp.net] Fix for bug #643298. A typo prevented the EnableViewStateMac from being recognized in the Page directive. 2010-10-05 08:04:16 +02:00
Rodrigo Kumpera 42bb001795 Make cards_in_range more accurate 2010-10-04 23:15:40 -03:00
Rodrigo Kumpera bd0057bb7d Fix a bunch of issues with cardtable code.
* sgen-cardtable.c (sgen_card_table_is_range_marked): Use
	card_in_range here since this is used for objects that can
	start at the middle of a card.

	* sgen-cardtable.c (move_cards_to_shadow_table): Properly
	copy the tail bytes of an object that spam around the cardtable.
	Don't copy more bytes than required.

	* sgen-cardtable.c (sgen_cardtable_scan_object): Add extra_idx
	variable that tracks the card offset that we're scanning. This
	is required when we wrap around.

	* sgen-cardtable.c (sgen_cardtable_scan_object): Properly reset
	card_base when at wrap around.
2010-10-04 23:15:40 -03:00
Rodrigo Kumpera 137f604761 Kill some dead code and fix a function name 2010-10-04 23:15:40 -03:00
Rodrigo Kumpera 1d77fb52d5 Properly check the ImplMap table.
* loader.c (mono_lookup_pinvoke_call): Don't assert on bad
	row indexes.

	* metadata-verify.c (verify_implmap_table): Fix the bounds
	check for the module table.

	Fix #563956
2010-10-04 23:15:40 -03:00
Martin Baulig f05d036bf0 Fix again. 2010-10-05 02:35:35 +02:00
Martin Baulig 3d577e4060 Fix my previous commit. 2010-10-05 01:05:05 +02:00
Martin Baulig f17f424c84 Disable System.Configuration on the mobile profiles. 2010-10-05 01:01:11 +02:00
Gonzalo Paniagua Javier 512d3f295d Map SO_EXCLUSIVEADDRUSE to !SO_REUSEADDR
This will make windows app that use that property work on *nix.
	Fixes bug #643475.
2010-10-04 16:18:16 -04:00
Rodrigo Kumpera ef4cf45281 Fix #642130.
* MonoGenericClass.cs (.ctor): Only register with the runtime
	when the underlying TB is not finished.

	* MonoGenericClassTest.cs: Add regression test.

	* TypeTest.cs: Fix a test that had a broken assumption.

	Fix #642130
2010-10-04 15:58:22 -03:00
Sebastien Pouliot f9d87bdedd Fix (likely copy-paste) typo on FormsAuthPasswordFormat
* System.Web.Security/FormsAuthentication.cs: Fix typo (MD5->SHA1).
I suspect the later is not used very much by mono users

* Test/System.Web.Security/FormsAuthenticationTest.cs: Small change to
make sure the hash name is not case sensitive
2010-10-04 11:41:22 -04:00
Atsushi Eno 47fd1c3a33 Implement DataContractResolver support. At least TryResolveType in serializer should work. 2010-10-05 00:08:15 +09:00
Atsushi Eno 2e0e15d706 Adjust namespace prefix indexes as it is repeatedly used. (It could result in duplicate prefix.) 2010-10-05 00:05:37 +09:00
Marek Habersack fc73d187ab Merge branch 'bugfix'
* bugfix:
  [asp.net] Part of fix for bug #579837. AuthorizationRule.SerializeElement will not process unmodified elements.
  [configuration] Part of fix for bug #579837. CommaDelimitedStringCollection must properly note that it was modified.
2010-10-04 15:47:32 +02:00
Marek Habersack cba40249f9 [asp.net] Part of fix for bug #579837. AuthorizationRule.SerializeElement will not process unmodified elements.
* AuthorizationRule.cs: if the configuration save is not Full, SerializeElement checks whether the rule being
  serialized is modified. If it isn't, validation and serialization are not performed.
* AuthorizationRuleCollection.cs: there is no element name for the collection.
2010-10-04 15:43:54 +02:00
Marek Habersack 872c7d9a62 [configuration] Part of fix for bug #579837. CommaDelimitedStringCollection must properly note that it was modified.
When one manipulates the collection as an instance of StringCollection, the 'modified' field will not
be set (Add, Remove etc. from the underlying StringCollection type will be used). To work around it
a check has to be performed in IsModified whether the contents of the collection changed. It is done
by comparing string hash codes of the original vs current string.
CommaDelimitedStringCollectionConverter forces string hash code update on the new collection, so that IsModified
works correctly on collections converted from comma-delimited strings.
2010-10-04 15:39:29 +02:00
vvaradhan ce15f042af 2010-10-01 Veerapuram Varadhan <[email protected]>
** Fixes #582732 - Patch by Jeffrey Alvarez <[email protected]>
	* DataColumn.cs (Clone): Deep copy the ExtendedProperties
	collection.
	* XmlSchemaDataImporter.cs: Support import of extended
	properties.
	* XmlSchemaWriter.cs: Fix exception by writing the extended
	properties before simpletype element.
2010-10-04 16:44:44 +05:30
vvaradhan 029d67e3e2 Merge branch 'master' of github.com:mono/mono into masterwork 2010-10-04 15:32:49 +05:30
vvaradhan ceefad76f1 2010-10-01 Veerapuram Varadhan <[email protected]>
** Fixes #561667
	* SqlCommand.cs (Dispose): While Disposing, set connection's
	datareader to null so the connection can be reused with another datareader.
2010-10-04 15:27:52 +05:30
Atsushi Eno 759200b5b6 Handle Initialization correctly. 2010-10-04 18:30:11 +09:00
Gonzalo Paniagua Javier ce6effffda Set have_response
Set have_response to true when there's a protocol error or a previous
	exception for POST/PUT.
	Patch by Bassam Tabbara.
2010-10-04 02:44:40 -04:00
Gonzalo Paniagua Javier 3078d57a30 Check no longer needed.
The is_* function takes care of this check now.
2010-10-04 02:44:39 -04:00
Atsushi Eno dd10adfa71 Get constructor arguments (x:Arguments) working on XamlXmlWriter and XamlObjectReader. 2010-10-04 15:28:34 +09:00
Gonzalo Paniagua Javier a308e3e66b Fix line endings. 2010-10-04 00:54:47 -04:00
Zoltan Varga 15910f21ad Execute some specialized tests using the normal test infrastructure. 2010-10-04 02:32:06 +02:00
Zoltan Varga 019a36ef08 Fix the handling of varargs in g_set_error (). 2010-10-04 01:59:46 +02:00
Pablo Ruiz Garcia bcd18127a5 Fixed conding style and added license/copyright header to new files 2010-10-04 05:20:37 +08:00
Pablo Ruiz Garcia a2245c7f1b [FIX] Fixes https://bugzilla.novell.com/show_bug.cgi?id=643368 (Transaction.TransactionCompleted not firing 2010-10-04 05:20:36 +08:00
Pablo Ruiz Garcia 06fb4d387e [API] Implemented System.Transactions (tx preparation) timeout handling 2010-10-04 05:20:35 +08:00
Gonzalo Paniagua Javier 7698d421b2 Check class names in a better way
Verify image, nesting status, namespace and class for the types
	used in threadpool.c
2010-10-03 13:29:06 -04:00
Miguel de Icaza 4bf3aa7b3f Retval is not a reserved keyword, fixes 643345 2010-10-03 12:30:38 -04:00
Atsushi Eno 5d9ca64ed3 remove extraneous reference to sys.configuration. 2010-10-04 00:55:11 +09:00
Atsushi Eno a6746868f6 A couple of fixes around XamlSchemaContext.GetXamlType(XamlTypeName) and get XamlXmlReader pass with unknown type names. 2010-10-04 00:44:53 +09:00
Gonzalo Paniagua Javier 0a49cf466c The EndPoint cannot be null
The EndPoint argument in Begin/EndSendTo cannot be null.
2010-10-02 01:41:40 -04:00
Gonzalo Paniagua Javier b24939c61c Create only 1 callback instance for read/write
Read/Write were creating one callback instance per call. Now we keep
	the same delegate around for all the calls.
2010-10-02 01:41:40 -04:00
Gonzalo Paniagua Javier 2b1a3ea5b6 Handle error in BeginAcceptReceive
We were ignore possible errors when reading after a socket has been
	accepted.
2010-10-02 01:41:39 -04:00
Gonzalo Paniagua Javier 0f7fa8d0dd Schedule the user callback from unmanaged code
When possible, schedule the user callback from unmanaged code. We pass
	it from the IO pool to the regular pool after our internal callback is
	finished.
2010-10-02 01:41:39 -04:00
Zoltan Varga 195b8afd2e Check the debugger_thread_exited condition in a loop to guard against spurious wakeups. Fixes #642780. 2010-10-01 23:47:40 +02:00
Marek Safar 9a7ff1718b ref/out arguments are always of static type 2010-10-01 19:39:02 +01:00
Marek Safar 29281b99f9 Keep imported indexer parameters (they can contain non-inflated type parameters) 2010-10-01 19:39:02 +01:00
Marek Safar 76368b5259 Implement compound assignment over null value 2010-10-01 19:39:01 +01:00
Koushik Dutta c45cae8a26 Work around Android's pthread/kernel_id/fork bug to fix mono multithreading and GC_stop_world in processes that have been forked. 2010-10-01 12:33:18 -04:00
Geoff Norton 0e85792129 Fix a crash when using the embedding api
error_msg is null when passed into this function from a few places, so
lets not do a null deref here.
2010-10-01 11:58:17 -04:00
Zoltan Varga 986ee2362b Fix code buffer reallocation check for OP_SWITCH on arm. 2010-10-01 16:29:24 +02:00
vvaradhan b2285ad835 2010-09-29 Veerapuram Varadhan <[email protected]>
** Fixes failed test for smallmoney
	* Tds70.cs (WriteParameterInfo): Round money values to 4
	decimals, for smallmoney too.
2010-10-01 19:17:48 +05:30
Marek Safar a131031c43 New test 2010-10-01 14:23:59 +01:00
Marek Safar b226844cd7 Dynamic compound assignment breaks standard C# result conversion rules 2010-10-01 14:23:59 +01:00
Marek Safar c4fd3c1884 void is never of type object 2010-10-01 14:23:59 +01:00
Marek Safar 21ebed49f8 Null constant cannot be used for ref/out variables 2010-10-01 14:23:58 +01:00
Marek Safar b68e462766 Initialize both disposable and local variable for dynamic expressions. 2010-10-01 14:23:58 +01:00
Atsushi Eno 6f397f56c5 rename source file. 2010-10-01 15:33:11 +09:00
Atsushi Eno 742f259da5 Remove old code. 2010-10-01 15:30:07 +09:00
Zoltan Varga bf7e68c329 Fix a deadlock introduced by 5c2e3bf7 by using a separate low level lock to procect access to the file_share_hash hash table. Fixes #642985. 2010-10-01 04:49:02 +02:00
Atsushi Eno a2b7ad61cc [wcf] serialization member namespace was wrong when root namesp ace is given. Fixed possible infinite loop during DefaultTypeMap initialization.
MS Basic/Contract/Data/POCO sample got working fine.
2010-10-01 11:32:19 +09:00
Atsushi Eno ec2f12c8be Remove extra call to HttpResponse.Flush() which would crash. 2010-10-01 09:11:26 +09:00
Marek Habersack 0649fb4ad5 [asp.net] Handle closed responses gracefully.
If ReleaseResources or Flush (true) were called, a flag is set that causes
any subsequent Flush () calls to fail with an exception.
At the same time, ReleaseResources does not destroy the output stream completely -
it has to remain around to match .NET behavior.
2010-09-30 23:52:27 +02:00
Marek Habersack 07dd1d3790 Revert "[asp.net] Make sure output_stream is not null before using it"
This reverts commit a4ed8be697 since what we
do in ReleaseResources is not what .NET does - a better fix will follow.
2010-09-30 23:52:27 +02:00
Andreia Gaita 7cfce53c32 [Json] Fix uint type conversion when reading, should be mapped to long, not int 2010-09-30 21:03:12 +01:00
Gonzalo Paniagua Javier c1fa0ee105 Avoid a few warnings 2010-09-30 15:30:49 -04:00
Atsushi Eno 582a90e800 Add DataContractResolver stuff (dummy), and fix Id reference from inside the referenced object. 2010-09-30 20:56:00 +09:00
Marek Safar a4e77bda2c More awkward nullable binary expressions which are not lifted even though they should be 2010-09-30 10:21:38 +01:00
Marek Safar 6bf2dfac4a Implement binary user operators over nullable not lifted expressions. 2010-09-30 10:21:37 +01:00
Marek Safar 715628fe36 Dynamic compound assignment can be used as an expression as well. 2010-09-30 10:21:37 +01:00
Gonzalo Paniagua Javier 50a295ac1b Invoke the callback in separate threads
The callbacks need to be invoked in different threads to avoid clogging
	the IO pool.

	Fixes bug #639656.
2010-09-30 01:52:31 -04:00
Zoltan Varga 1443252b1c Disable the freeing of monitors again, it still crashes with sgen when running tests/async_read.exe. 2010-09-30 04:45:15 +02:00
Rodrigo Kumpera 8d9793865f Fix AOT support for delegates 2010-09-29 21:14:12 -03:00
Sebastien Pouliot 966a4e1990 Fix buffer checks on Socket.[Receive|Send]Async
* System.Net.Sockets/Socket_2_1.cs: Fix, by explicitely throwing an NRE,
the checks in [Receive|Send]Async methods - otherwise an exception would
occur later, on another thread and close the socket (leading to other,
unexpected, exceptions)

* Test/System.Net.Sockets/SocketTest.cs: Add parameter validation test
cases for both ReceiveAsync and SendAsync
2010-09-29 14:33:20 -04:00
Sebastien Pouliot 31485d3ee7 [moon] Move policy restriction / elevated trust check outside of loop
* System.Net.Sockets/SocketAsyncEventArgs.cs: Move policy restriction
and elevated trust check outside of loop since its value won't change
based on the ipaddress
2010-09-29 14:33:19 -04:00
Sebastien Pouliot 0999774377 Fix "4762b18c: Fix the moonlight build"
* System.Net.Sockets/Socket_2_1.cs: Do not #id-def out [Receive|Send]
Generic from moonlight build
2010-09-29 14:33:17 -04:00
Rodrigo Kumpera d7d6d66372 Fix arm and ppc builds 2010-09-29 14:37:20 -03:00
Gonzalo Paniagua Javier 3fcfa6d01b Handle error creating xdb.il
If creating the xdb.il file fails, disable the mono support for
	debugging in gdb. Managed symbol names won't be displayed in stack
	traces.

	Fixes bug #642625.
2010-09-29 12:26:58 -04:00
Rodrigo Kumpera 733ea88046 Remove "NotWorking" from a test that now works. 2010-09-29 12:22:56 -03:00
Rodrigo Kumpera 0c46b444fd ndle static methods with bound first arg.
* marshal.c (mono_marshal_get_delegate_invoke): Properly
	handle a static method that has it's first argument bound.

	* marshal.c (mono_marshal_free_inflated_wrappers): Free
	from the new hashtable too.

	* image.c (mono_image_close_except_pools): Free the new
	hash table.

	* metadata-internals.h (MonoImage): Add new hashtable
	to store the new kind of invoke wrappers.
2010-09-29 12:22:55 -03:00
Atsushi Eno 2ba9827975 Add missing members. 2010-09-29 23:34:49 +09:00
Jérémie Laval 8e3bbe1893 [ReaderWriterLockSlim] Fix state corruption and race in a special interleaving.
Fix possible state corruption in the case where Upgradeable wasn't reactivating its read bit after a downgrade and set events accordingly. Fix possible race where a write process wannabe could step in the middle of Upgradeable actually upgrading to write mode.
2010-09-29 14:52:20 +01:00
Atsushi Eno 7cfbbb0878 Add some missing StructLayoutAttributes. 2010-09-29 22:00:38 +09:00
Atsushi Eno e1bf67e050 [wcf-discovery] ExclusiveAddressUse won't work. AcceptChannel() should nreturn null when it is being closed. 2010-09-29 21:58:56 +09:00
Atsushi Eno 37f6746abc [wcf-discovery] Fix MessageEncoder retrieval, failure on EndReceive and ExclusiveAddressUse. 2010-09-29 20:47:10 +09:00
Atsushi Eno da0eaa1a1b [wcf discovery] Use appropriate MessageVersion defined in DiscoveryVersion. 2010-09-29 20:45:47 +09:00
Marek Habersack d718a17c96 [wcf] Make sure context exists in the dictionary getting its associated wait handle.
SvcHttpHandler maintains a mapping of HttpContext to ManualResetEvent. Entries are
removed from the cache in EndHttpRequest. The code makes sure the context exists in
the cache before attempting to access it.
2010-09-29 12:44:27 +02:00
Marek Habersack 9ddbf78ee5 Merge branch 'bugfix'
* bugfix:
  [asp.net] Make sure output_stream is not null before using it
2010-09-29 12:01:33 +02:00
Marek Habersack a4ed8be697 [asp.net] Make sure output_stream is not null before using it
It is possible that some code will still attempt to access the HttpResponse instance
after ReleaseResources got called. This patch prevents NREX in such cases.
2010-09-29 11:59:37 +02:00
Alan McGovern 08c8799a39 [System.ServiceModel] Fix a few potential exceptions in background threads
Pass the listener as it's own async state so that we avoid potential null derefs in the callback. Also wrap the BeginAccept and EndAccept calls in their own try/catches in case they throw an exception.
2010-09-29 10:37:56 +01:00
vvaradhan 2ff8ca98f1 2010-09-20 Veerapuram Varadhan <[email protected]>
* SqlDataReaderTest.cs: Add test for bug#613087
2010-09-29 14:39:01 +05:30
vvaradhan 57e6ec2bdb test fixes 2010-09-29 14:37:37 +05:30
Marek Safar 95350f424e New test. 2010-09-29 09:12:52 +01:00
Marek Safar 1499a690df [642437] Nested types have to check type arguments only and not full class 2010-09-29 09:12:52 +01:00
Marek Safar ff3a641aca New test. 2010-09-29 09:12:52 +01:00
Marek Safar 43143b0a55 Skip inaccessible nested types for member access expressions. 2010-09-29 09:12:51 +01:00
Marek Safar bd09196108 Inflate custom site container delegates correctly. 2010-09-29 09:12:51 +01:00
Marek Safar c96cc5d5e9 Optional parameters can be of a user value type 2010-09-29 09:12:50 +01:00
Marek Safar ba97300acd Ignore imported not visible internal types 2010-09-29 09:12:50 +01:00
Atsushi Eno 0c7a1a1f5c Fix the issue that callback contract often gets confused by picking unexpected contract type.
The problem is that DispatchRuntime.Type is a service implementation type
that could implement two or more contract interfaces, and it was in random
order how ServiceProxyGenerator picks up the contract type. Now it looks
for correct contract type instead of the service type by exactly looking
for the target contract in the endpoint (dispatcher).
2010-09-29 16:41:59 +09:00
Jonathan Pryor 957abaee41 Allow mono_install_assembly_preload_hook() to provide mscorlib.dll
In some embedding scenarios, mscorlib.dll may be present in a non-standard
location (outside of MONO_PATH) or with an alternate filename.

Use the installed assembly preload hooks to search for mscorlib.dll before
falling back to the default lookup strategy.
2010-09-28 22:45:41 -04:00
Zoltan Varga d9d750d79c Fix 'thread may have been prematurely finalized' warnings when a GC happens during thread attach in sgen. 2010-09-29 04:29:55 +02:00
Rolf Bjarne Kvinge 316f0fcb38 Remap more eglib symbols 2010-09-28 22:47:09 +02:00
Marek Habersack b91056243b [asp.net] Remove lock recursion in Cache.ExpireItems 2010-09-28 22:34:34 +02:00
Atsushi Eno af6fde94ef TCP channel listener: remove extra complication (threads) in the previous change. 2010-09-29 01:02:09 +09:00
vvaradhan f5d5778245 2010-09-16 Veerapuram Varadhan <[email protected]>
* SqlCommandTest.cs: Add test for bug#569543
2010-09-28 20:36:55 +05:30
vvaradhan 29db32e771 2010-09-16 Veerapuram Varadhan <[email protected]>
* SqlCommandTest.cs: Add test for bug#584833
2010-09-28 20:28:44 +05:30
Atsushi Eno 8c7cd3e190 Rework TCP listening model, and fix AcceptTcpClient() to not drop timed out requests that actually steals next requests in the air. 2010-09-28 23:05:26 +09:00
Sebastien Pouliot 6bf7db2ca6 WebResponse.Headers is not always available (e.g. moonlight browser stack)
* System.ServiceModel.Channels/HttpRequestChannel.cs: For Moonlight use
the WebResponse.SupportsHeaders before accessing the Headers collection.
This is needed because (the default) browser stack does not expose the
headers from its responses. Fix bug #642193
2010-09-28 08:43:05 -04:00
Jérémie Laval e0d372e7bf Turn Is*LockHeld properties into thread-specific values in ReaderWriterLockSlim. Add corresponding unit tests. 2010-09-28 13:23:05 +01:00
Marek Habersack ae23776616 [asp.net] Get rid of a possible (although unlikely) race condition when acquiring locks
The patch removes a small race condition where a boolean flag is set after acquiring a lock to
indicate to code executing in the finally {} block that it should release the lock. The boolean
variable is now removed and the lock is released unconditionally. It carries a potential to
throw an exception when the lock is not held, but it's better than to fail to release it and
lead the application to a deadlock.
2010-09-28 13:29:21 +02:00
Sebastien Pouliot 03e914971d Avoid a culture-specific check for the end of an URI
* System/Uri.cs: Avoid the culture-specific String.EndsWith when
reducing an URI
2010-09-27 21:55:59 -04:00
Sebastien Pouliot 383a5e711e Use same socket family as the endpoint when retrieving the policy
* System.Net.Policy/CrossDomainPolicyManager.cs: Use same socket family
as the endpoint when retrieving the policy. Also do not try to create a
policy out of an empty stream (avoid misleading exceptions in logs)
2010-09-27 20:20:24 -04:00
Sebastien Pouliot 7f2949053b Fix Socket.RemoteEndPoint after ConnectAsync on Moonlight
* System.Net.Sockets/SocketAsyncEventArgs.cs: Set the Socket
RemoteEndPoint to our RemoteEndPoint on Connect operation.
* System.Net.Sockets/Socket_2_1.cs: Return the 'candidate' EndPoint
provided by SocketAsyncEventArgs in ConnectAsync (intead of null)
until the connection is completed.
2010-09-27 20:10:38 -04:00
Marek Habersack c64178bd59 [wcf] Make simplified configuration for behaviors work (4.0)
* NamedServiceModelExtensionCollectionElement.cs: minimum length of the Name property value is 0 for 4.0
* ServiceBehaviorElementCollection.cs: added an override of BaseAdd which makes sure that the element being
  added has its Name set to String.Empty if the element's name is null
* ServiceHostBase.cs: support for simplified behavior configuration. Refactored behavior addition code to a
  separate method. Check whether behavior is not in the collection before adding it.
2010-09-28 00:36:38 +02:00
Rodrigo Kumpera 6e711f08d8 Add runtime test for delegates with null target. 2010-09-27 17:13:10 -03:00
Rodrigo Kumpera 5df232cd9f Add comment on the reason of a non obvious check. 2010-09-27 17:13:10 -03:00
Rodrigo Kumpera f70bcd664e Enable test that has been fixed in the runtime. 2010-09-27 17:13:09 -03:00
Rodrigo Kumpera 5cb38aff38 Raise ArgumentException for delegate on closed methods.
* method-to-ir.c (mono_method_to_ir): Check for null
	on delegate construction so closed-on-null is not allowed
	when using the delegate .ctor.

	If the delegate been constructed is open-on-target then
	the null check must not be applied as the IL pattern is:

	ldnull
	ldftn void Bla::Foo(int)
	newobj Bar (object, native int) // delegate void Bar(Bla,int)
2010-09-27 17:13:09 -03:00
Zoltan Varga 4f5889611c Mov the jit map generation code from tramp-x86.c to mini-trampolines.c, add amd64 support. 2010-09-27 21:55:02 +02:00
Rodrigo Kumpera 61da08a4d3 Ignore all non static fields.
* icall.c (ves_icall_get_enum_info): All instance fields
	should be ignored here.

	Fixes #604218
2010-09-27 12:06:19 -03:00
Rodrigo Kumpera 2391e9355b Record all trampolines to the jitmap. 2010-09-27 12:06:19 -03:00
Jb Evain 14843e1908 Fix the net_4_0 build 2010-09-27 16:20:40 +02:00
Jb Evain 4762b18c11 Fix the moonlight build 2010-09-27 16:12:08 +02:00
Carlos Alberto Cortez cc39d7ebf1 [fix] #631810: Form.DialogResult needs to call its close events *before* closing.
* Form.cs: When setting DialogResult call RaiseCloseEvents
	instead of directly setting 'closing', since we need to have our
	FormClosing event invoked *before* the form dissapears, so the
	user can properly cancel the close operation if desired.
	Fixes #631810.
2010-09-27 09:35:40 +02:00
Carlos Alberto Cortez b40709211a [fix] #639939: Manually and properly convert the bytes returned by XLookupString.
* X11Keyboard.cs: Manually handle the conversion of the string
	returned by XLookupString, just as we were already doing for XIM
	support - using StringBuilder directly was somehow returning a
	corrupt buffer from time to time.
	Fixes #639939.
2010-09-27 09:35:40 +02:00
Marek Habersack 43f7e0c457 [wcf] System.ServiceModel.Configuration.CustomBindignCollectionElement.GetDefault returns an instance of CustomBinding 2010-09-27 13:55:17 +02:00
Gonzalo Paniagua Javier 145726835e Set LastOperation properly
SocketAsyncEventArgs.LastOperation is set when the operation is
	invoked.
	Reset the error status before each new *Async() call.
2010-09-27 00:27:04 -04:00
Jonathan Pobst 460b08fdb6 Commit some stuff I had implemented in my SVN tree. 2010-09-26 19:51:45 -05:00
Jonathan Pobst 49d488b4d6 Merge branch 'master' of github.com:mono/mono 2010-09-26 19:44:34 -05:00
Marek Habersack 238062bfe8 [bug workaround] Fix the build of System.Web.Mvc by renaming internal StringComparer class to InternalStringComparer
The build fails because of what seems to be a bug in gmcs. The compiler reports that
the StringComparer.OrdinalIgnoreCase property doesn't exist and it does so because
gmcs loads the internal System.Collections.Generic.StringComparer from EqualitComparer.cs instead of the
System.StringComparer one.
2010-09-27 00:31:31 +02:00
Zoltan Varga ec3c7ded81 Update the comment explaining why the small_id_table uses conservative
GC tracking.
2010-09-26 23:18:00 +02:00
Gonzalo Paniagua Javier 430b2940bd Bypass BeginInvoke for asynch. operations
The code involved in a delegate BeginInvoke is too heavy and of no use
	for socket asynchronous operations. With these changes, we bypass all
	that and send the work items directly to the asynchronous IO queue,
	improving performance and lowering memory use.
2010-09-26 01:58:38 -04:00
Miguel de Icaza 1e20a9c660 Fix EqualityComparer for strings.
It turns out that Strings need to explicitly use a version that does
implement EqualityComparer<string> since string is an IEquatable.

Do this, and to avoid the reflection mess, cast to object, then cast
to the real type
2010-09-25 22:44:41 -04:00
Miguel de Icaza aca5a99057 Optimize EqualityComparer for strings
This shortcut prevents the reflection system to kick into action
for compiler generated string switch statements.
2010-09-25 21:08:53 -04:00
Gonzalo Paniagua Javier 2d0c85f412 ConnectAsync() security checks
-ConnectAsync() changed to make security checks for all endpoints before
	trying to connect for the first time.
	-Use the socket Connect() call instead of repeating the same stuff.
	Connect should be splitted in 2 pieces (DNS + Connection attempts).
2010-09-25 18:37:30 -04:00
Gonzalo Paniagua Javier 3ed061749e Added support for ArraySegment
-Removed NET_2_0
	-Implemented support for the Receive/Send overloads that take a list of
	ArraySegments.
2010-09-25 18:37:30 -04:00
Marek Habersack aea65531c0 [Messaging] Conditionally drop dependency on Wnforms
If you pass the option MESSAGING_NO_WINFORMS=1 to make, System.Messaging will be compiled
without the dependency to System.Windows.Forms. The dependency is needed just by the
System.Messaging.Design.QueuePathDialog class which is both a stub and not used anywhere
by Mono.
2010-09-26 00:14:21 +02:00
Zoltan Varga 04713a947f Enable support for wrapping non Exception subclasses in RuntimeWrappedException objects, implement support for RuntimeCompatibilityAttribute. 2010-09-25 20:48:36 +02:00
Gonzalo Paniagua Javier f3463e7232 Made the moonlight profile happy.
Disabled operations not allowed under moonlight.
2010-09-25 14:08:13 -04:00
Gonzalo Paniagua Javier 3419c3ffc8 Move async IO code to Socket_2_1
Moved internal classes to Socket_2_1.
2010-09-25 12:48:55 -04:00
Gonzalo Paniagua Javier 61d0f84376 Rework SocketAsyncEventArgs internals
-Removed #if NET_2_0
	-All the *Async() calls but ConnectAsync() are routed through the
	asynch IO threadpool instead of creating a new short-lived thread for
	every operation.
	-When reusing a SocketAsyncEventArgs only 1 new object, a delegate, is
	created.
2010-09-25 12:37:27 -04:00
Marek Safar 820c91d665 Implemented more combinations of nullable boolean logical operators 2010-09-25 10:48:33 +01:00
Marek Safar 35917fa067 Better error message for syntax error in namespace name 2010-09-25 10:48:33 +01:00
Miguel de Icaza 1228fd45c7 Improve the Uri parsing speed
This affects MonoTouch startup as our dictionaries are a little bit
slow to be created now that we use Dictionary<> hashes for switch
statements.

Some timings:

Using a simple block of if's is twice as slow as the compiler generated
switch statement.   But using this tuned code is faster than the
compiler generated code, with a million loops on x86-64:

With "http": .10 vs .51 (first check)
with "https": .16 vs .51 (second check)
with "foo": .22 vs .31 (never found)
with "mailto": .12 vs .51  (last check)
2010-09-25 00:04:24 -04:00
Andreia Gaita f485bd74bd Fix UriParser.GetComponents for the PathAndQuery case
PathAndQuery should always return the path starting with /,
even when it's empty
2010-09-24 18:11:24 +01:00
Zoltan Varga a5e13730a3 Fix AOT support for OP_GC_CARD_TABLE on amd64. 2010-09-24 17:27:14 +02:00
Zoltan Varga b07a3824f4 Fix the setting of pointer type fields using reflection. Fixes #641590. 2010-09-24 16:31:48 +02:00
Rodrigo Kumpera 502b8e2603 Implement amd64 support for OP_CARDTABLE.
* amd64-codegen.h (amd64_alu_reg_membase_size): Add support
	for RIP based addressing.

	* cpu-amd64.md: Add card_table_wbarrier.

	* mini-amd64.c (mono_arch_output_basic_block): Emit the
	new OP.

	* mini-amd64.c (mono_arch_emit_exceptions): Handle another
	kind of patch-info - GC_CARD_TABLE_ADDR. This is required
	because we can neither have 64bits immediates with amd64
	or 2 scratch regiters with current regalloc.

	* mini-amd64.h: Define MONO_ARCH_HAVE_CARD_TABLE_WBARRIER.
2010-09-24 11:29:48 -03:00
Atsushi Eno 31c5aeca32 Assign identical operation name for each contract version so that they don't conflict each other. 2010-09-24 21:26:53 +09:00
Atsushi Eno ce97296c9d Fix duplex proxy constructor arg names. 2010-09-24 21:26:27 +09:00
Rolf Bjarne Kvinge f7a0fde4c6 JsonSerializationWriter: handle char values 2010-09-24 12:11:36 +02:00
Atsushi Eno 9d66f85f1c Filter requests only by paths, excluding host and port. 2010-09-24 16:57:38 +09:00
Atsushi Eno a5043815da Override IsContentTypeSupported() in per-encoding-binding-element implementation to work as expected. 2010-09-24 16:26:28 +09:00
Zoltan Varga a76c652ffe Avoid making the small_id table precisely GC tracked, some runtime code can't handle MonoInternalThread's being moved. 2010-09-24 04:27:56 +02:00
Jackson Harper bb82041618 On 64bit this is turning into a 16 byte struct, this works around the issue. 2010-09-23 22:17:43 -04:00
Zoltan Varga 4dd641a3c4 Disable make_root_descr_all_refs () for now since it seems to cause crashes. 2010-09-24 03:21:36 +02:00
Zoltan Varga bd060c62c5 Use g_malloc0 in mono_gc_make_root-descr_all_refs (). 2010-09-24 01:07:12 +02:00
Zoltan Varga 81ffa155c4 Remove a debug printf. 2010-09-24 00:38:50 +02:00
Zoltan Varga 9f96b7fad1 Add a few variants of the MONO_GC_REGISTER_ROOT () to make most roots precisely tracked and to avoid registering locations pointing to memory allocated by mono_gc_alloc_fixed () as roots under SGEN. 2010-09-24 00:36:51 +02:00
Zoltan Varga 1b126f73bb Disable the wrapped exception code for now, it break some of our tests. 2010-09-24 00:30:03 +02:00
Rodrigo Kumpera 5516dc79fd Handle verification of types in non canonical forms.
* verify.c (mono_type_is_valid_type_in_context): Handle
	types such as VAR and MVAR encoded as CLASS or VALUETYPE.
	This encoding is not the canonical one, but works and
	must be properly verified.

	Fixes #601970
2010-09-23 18:33:53 -03:00
Rodrigo Kumpera 488dc81eba Remove unwanted debug spew. 2010-09-23 18:33:52 -03:00
Sebastien Pouliot fcdbcb49c7 Fix WebRequest.RegisterPrefix / Create to match SL in some corner cases
* System.Net/WebRequest_2_1.cs: (Create) Find the prefix that is the
closest match to the specified Uri and use it's associated creator.
(RegisterPrefix) We cannot register 'http[s]:' even if registering
'http[s]' is possible (but does not work as expected) as are the (fully)
valid 'http[s]:/[/]' values.
2010-09-23 17:10:06 -04:00
Sebastien Pouliot c3b5cb557e Add test case to show a different behavior (from Windows) wrt Socket buffers
* Test/System.Net.Sockets/SocketTest.cs: Add test case where buffers can
be set to 0 under Windows (but has a 256 bytes minimum on Linux)
2010-09-23 17:10:05 -04:00
Sebastien Pouliot 016a04eb84 [moonlight] Fully honor WebResponse.SupportsHeaders
* System.Net.Policy/CrossDomainPolicyManager.cs: Use InternalHeaders,
instead of Headers, since we always use the browser stack to download
the security policies.

* System.Net/WebClient_2_1.cs: Throw a NotImplementedException from
ResponseHeaders if the response does not support them.
* System.Net/WebResponse_2_1.cs: Make Headers property smart to throw a
NotImplementedException if SupportsHeaders return false. Add a new
InternalHeaders property since the response headers are needed,
internally (e.g. policies), even if not exposed to the outside world.
2010-09-23 17:10:04 -04:00
Andrew Jorgensen c1bb43c998 move DynamicData to mvc because it depends on Extensions 2010-09-23 14:15:01 -06:00
Zoltan Varga 06bfbd5d04 Fix the default exception message of RuntimeWrapperException. 2010-09-23 21:15:34 +02:00
Zoltan Varga e4cb5aec35 Wrap thrown objects which do not derive from Exception into a RuntimeWrappedException. Fixes #640687. 2010-09-23 21:15:34 +02:00
Gonzalo Paniagua Javier 2faabf871c epoll_ctl takes an int, not IntPtr
Ditto.
2010-09-23 15:02:58 -04:00
Marek Safar a572542567 [641146] Implemented IStructuralComparable.CompareTo 2010-09-23 16:22:11 +01:00
Marek Habersack 133b340ce9 [WCF] System.Data.Services.Client must be signed with the ECMA public key 2010-09-23 14:34:01 +02:00
Marek Habersack 2da7a29fb0 [WCF] Changes to System.Data.Services.Client to compile it for 4.0
It appears Microsoft didn't make any changes to the assembly in .NET 4.0 - they simply
changed its version number to 4.0.0.0 and added few assembly attributes.
2010-09-23 11:05:42 +02:00
Sebastien Pouliot d8fa9bbba0 Fix exceptions wrt IPAddress.ScopeId
* System.Net/IPAddress.cs: ScopeId can only be set on IPv6 or it throws
a SocketException (not an Exception). ScopeId is also limited from 0 to
2^32.
2010-09-22 21:30:00 -04:00
Sebastien Pouliot 61bf861afb Add some missing validations to Socket
* System.Net.Sockets/Socket_2_1.cs: Add checks for invalid AddressFamily,
SocketType and ProtocolType (to throw ArgumentException). Add negative
check for Ttl property. Add AddressFamily mismatch checks to ConnectAsync
methods
2010-09-22 21:29:59 -04:00
Sebastien Pouliot a4bfdabd83 Add missing SocketOptionName_HopLimit definition for IPv6
* socket-io.c|h: Add definition/case for SocketOptionName_HopLimit.
Note that this is already being used by managed code (to set the TTL
value on IPv6 sockets)
2010-09-22 21:29:59 -04:00
Sebastien Pouliot 46bb0b7cb8 Fix support of non-ASCII host names in System.Uri
* System/Uri.cs: Fix escaping non-ascii host names. Avoid memory
allocations (UTF8.GetBytes) when it is not necessary while escaping.

* Test/System/UriTest2.cs: Add test case where host name is β (beta)
2010-09-22 21:29:59 -04:00
Zoltan Varga 0cb943ae56 Don't allow EventType.Breakpoint in vm.EnableEvents (). 2010-09-23 02:52:25 +02:00
Zoltan Varga 7e7f7589da Avoid extracting tar.gz files in the get-cygwin-deps.sh script, we download only zip files now. 2010-09-23 00:23:53 +02:00
Zoltan Varga 3259effcbe Convert ERROR_PATH_NOT_FOUND to ENOENT too. 2010-09-23 00:23:25 +02:00
Hib Eris db41480279 Don't link against missing libiconv on windows.
* configure.ac: iconv check creates variable ICONV_LIBS
    * src/Makefile.am: only link eglib to iconv when iconv is found
2010-09-23 00:18:08 +02:00
Zoltan Varga 4099eddfcf Set errno correctly when loading an image fails on windows. Fixes #362607. 2010-09-22 23:55:25 +02:00
Gonzalo Paniagua Javier 1adad8a875 EpollEvent size adjustment
EpollEvent has to be one uint32 plus one int64, i.e. 12 bytes long.
	Manos libres now.
2010-09-22 18:14:34 -04:00
Jonathan Pryor f8f1213656 Do not build mcs/docs if the 4.0 build is disabled. 2010-09-22 16:15:19 -04:00
Jonathan Pryor aa76a302d9 Revert "mdoc 2.0-only profile build support, take 3!"
We'll instead just disable the docs build entirely if --with-profile4=no
is specified [future commit, not this one].
2010-09-22 16:06:16 -04:00
Jonathan Pryor 86cfbf948d mdoc 2.0-only profile build support, take 3!
Further discussion suggested that, even if mdoc 2.0 works, it hasn't gotten
widespread testing (as it's been a 4.0 app for months), so it would be
preferable to keep it as a 4.0 app.

However, it still needs to be built under 2.0 so that a --with-profile4=no
build can...build...without errors.

Thus, the compromise: build mdoc twice, once for each profile.  This will
ensure that *some* version of mdoc is around when mcs/docs is built.

Unfortunately we can't place mdoc into $(per_profile_dirs), as these are
built before $(net_2_0_dirs) (and thus before monodoc, which needs to be
built before mdoc).  Thus the compromise of listing mdoc in *both*
$(net_2_0_dirs) and $(net_4_0_dirs), allowing build dependencies to be met.
2010-09-22 13:50:33 -04:00
Gonzalo Paniagua Javier 884680ede3 LocalEndPoint works now for non-blocking connects
We didn't keep the endpoint around for non-blocking connects and later,
	when Poll() was called, we didn't have the information. Also 'isbound'
	wasn't being set in a few places and UDP sockets needed to be marked as
	not connected after a call to Connect() with an Any address.

	Removed an old test for Connect(Any) with UDP sockets, since this is
	used to disconnect them now.

	Fixes bug #640749.
2010-09-22 12:39:07 -04:00
Gonzalo Paniagua Javier 501bf45d67 The Hashtable is back
But this time it is using a hash code provider and a comparer that
	don't invoke the object's methods.
	Thanks to Paolo for pointing this out.
2010-09-22 11:42:35 -04:00
Zoltan Varga ef3b35bb20 Call the thread cleanup at the end as it was done before, call it even if handle_remove () fails. 2010-09-22 17:01:36 +02:00
Jérémie Laval 4b844f8105 Add tidbits of documentation to ReaderWriterLockSlim. 2010-09-22 11:33:55 +01:00
Jérémie Laval 65180d590b Also set readerDoneEvent when exiting an upgradeable lock and reader condition is correct.
It could cause a deadlock when a writer tested the rwlock value before RwRead was removed and another Upgradeable operation happened at the same time.
2010-09-22 11:04:03 +01:00
Marek Habersack 132695aa93 Revert "mdoc 2.0-only profile build support, take 2!"
This reverts commit 313633fc67 because it breaks the build.
2010-09-22 11:14:26 +02:00
Jonathan Pryor 313633fc67 mdoc 2.0-only profile build support, take 2!
Further discussion suggested that, even if mdoc 2.0 works, it hasn't gotten
widespread testing (as it's been a 4.0 app for months), so it would be
preferable to keep it as a 4.0 app.

However, it still needs to be built under 2.0 so that a --with-profile4=no
build can...build...without errors.

Thus, the compromise: build mdoc twice, once for each profile.  This will
ensure that *some* version of mdoc is around when mcs/docs is built.
2010-09-21 21:38:09 -04:00
Sebastien Pouliot a5e46da30c NET_4_0 fixes for System.Uri also apply to Moonlight (SL4)
* System/Uri.cs: Update some NET_4_0 to include MOONLIGHT too
2010-09-21 21:21:13 -04:00
Sebastien Pouliot fcfe00816b Do not allow + sign when specifying the port of an URI
* System/Uri.cs: A bit more strict when parsing the port number

* Test/System/UriTest2.cs: Add test cases with different, mostly
invalid, ports (e.g. negative, float, too big...)
2010-09-21 21:21:12 -04:00
Sebastien Pouliot 202156dfe2 Fix some host name checks, delay port check and fix some exceptions messages
* System/Uri.cs: Fix host name checks. Delay port check until the host
name is checked (compatibility). Fix exception messages to match the
expected values from the NCL tests.

* Test/System/UriTest2.cs: Add some test cases for host names
2010-09-21 21:21:12 -04:00
Gonzalo Paniagua Javier 22b0194255 Don't store objects in a Hashtable.
Storing the objects in Hashtable causes the GetHashCode() and may be
	Equals() methods to be called on the object, which MS does not do.
	I'm using a list holding WeakReferences. Not sure if hard references
	would be ok.

	Fixes bug #640688.
2010-09-21 17:28:03 -04:00
Andrés G. Aragoneses bbd182a095 [corlib] Prevent BinaryFormatter to throw on missing fields
This commit includes unit tests that were run in MS.NET > 2.0.
The old behaviour of MS.NET 1.1 is still included in the patch
as an ONLY_1_1 define, to be backport-friendly to other branches
(but can be removed from now on in next commits, as mono master
doesn't include this profile anymore). Fixes BNC#324144.
2010-09-22 03:09:17 +08:00
Rodrigo Kumpera 9f66121d0f Enable cardtable for parallel mark-sweep.
* sgen-marksweep.c (mono_sgen_marksweep_init): Enable
	cardtable for the parallel collector.

	This closes by 50% the gap in binary-tree against the
	serial collector.
2010-09-21 11:02:14 -03:00
Rodrigo Kumpera aa65ed7443 Add support for break on unverifiable for verifier failure.
* mini.c (mini_method_compile): Break on verification
	failure.
2010-09-21 11:02:14 -03:00
Marek Safar 5a34679f7e New tests. 2010-09-21 10:50:10 +01:00
Marek Safar 72f1e138de Don't restore unused flags 2010-09-21 10:50:10 +01:00
Marek Safar bc201ee584 [640722] Consider delegate parameters when checking member hiding 2010-09-21 10:50:09 +01:00
Marek Safar 9babecf161 [640709] Don't reuse method parameters for base proxy, they can be hoisted 2010-09-21 10:50:09 +01:00
Marek Safar 3b4f080364 [640699] Reduced compound expressions need explicit conversion too. 2010-09-21 10:50:08 +01:00
Marek Safar 6335383153 Implement postfix operations involving an implicit user operator. 2010-09-21 10:50:08 +01:00
Atsushi Eno 6dc63972bf Fix (isolate) internal namespace for Udp transport. 2010-09-21 16:46:07 +09:00
Atsushi Eno 25d38a793a Add missing Properties property. 2010-09-21 15:23:35 +09:00
Carlos Alberto Cortez dabad82cdf Implement IDesignerLoaderHost2 interface.
* IDesignerLoaderHost2.cs: New 4.0 interface.
2010-09-21 03:01:51 +02:00
Carlos Alberto Cortez b636af7f7c Add IDesignerLoaderHost2.cs to our build.
* System.dll.sources: Add IDesignerLoaderHost2.cs to our build.
2010-09-21 03:01:51 +02:00
Carlos Alberto Cortez 40702ce451 Add IDesignerHostTransactionState.cs and TypeDescriptionProviderService.cs to our build.
* System.dll.sources: Add IDesignerHostTransactionState.cs and
	TypeDescriptionProviderService.cs to our build.
2010-09-21 03:01:51 +02:00
Carlos Alberto Cortez 56422921df Implement IDesignerHostTransactionState.cs
* IDesignerHostTransactionState.cs: New 4.0 interface.
2010-09-21 03:01:51 +02:00
Carlos Alberto Cortez 697698de5c Implement TypeDescriptionProviderService.
* TypeDescriptionProviderService.cs: New class.
2010-09-21 03:01:50 +02:00
Carlos Alberto Cortez 5b9f6d2348 Implement AddProviderTransparent and RemoveProviderTransparent for TypeDescriptor.
* TypeDescriptor.cs: Implement AddProviderTransparent and
	RemoveProviderTransparent - we only call to the already existing
	AddProvider and RemoveProvider methods respectively.
2010-09-21 03:01:50 +02:00
Carsten Schlote 7e42d3474e [System.Configuration] Added check for SettingProviderAttribute on settings class
There is no checkfor the SettingProviderAttribute attached to a Settings class.
.NET uses this to replace the default LocalSettingsProvider with your
own SettingsProvider.

The patch adds this feature.

Signed-off-by: Carsten Schlote <[email protected]>
2010-09-20 20:53:45 -04:00
Carsten Schlote ee5a1d2a73 [System.Configuration] Fixed GetProductName() function
Added missing check for empty strongname. This case is now handled the
same way as a missing strongname.

GetProductName() now correctly uses _Url_ and assembly.EscapedCodeBase
for its output.

Signed-off-by: Carsten Schlote <[email protected]>
2010-09-20 20:53:45 -04:00
Carsten Schlote b26e26544c [System.Configuration] Fixed GetEvidenceHash() function to produce valid filenames
The previous implementation creates eventually invalid filenames in a
random fashion on linux, mac, windows by having '/' or '\' chars
in the base64 output. As a result you can't save or retrieve your settings
due to filesystem errors.

This patch changes the output to plain hex values. This is a bit longer
then a base64 string, but also 100% filesystem safe.

Might

Signed-off-by: Carsten Schlote <[email protected]>
2010-09-20 20:53:44 -04:00
acken f5f1f3fbbc Had an issue where the linklabel was clicked, the form was redrawn with some changes and some internal behavior called the OnGotFocus where sorted_links now was null and focused_index was 0. Don't know wheter that is wrong but solved the issue with a nullcheck 2010-09-21 07:51:46 +08:00
Andrew Jorgensen ea222251b7 put the x11 devel package back in buildrequires and a couple other spec fixes 2010-09-20 17:23:51 -06:00
Rodrigo Kumpera 16f059a763 Use new verifier function to lazily check.
* class.c: The typeref table is now lazily verified thanks
	to some awesome obfuscators that love to produce junk.
	So it has to be checked everytime before usage instead of
	at loading time.
2010-09-20 19:31:14 -03:00
Rodrigo Kumpera 8780c85f83 Add function to validate an individual row in the typeref table.
* metadata-verify.c: Add mono_verifier_verify_typeref_row
	that checks the metadata of a single row. Fix code around
	to couple with this new function.

	* verify-internals.h: Export it.
2010-09-20 19:31:13 -03:00
Sebastien Pouliot cdc8f661ab Uri.LocalPath is unescaped - even if original URI is escaped
* System/Uri.cs: Unescape LocalPath

* Test/System/UriTest2.cs: Add test case where an original URI contains
an escaped path.
2010-09-20 17:07:53 -04:00
Sebastien Pouliot ffc80ca37d Uri.OriginalString is a bit misleading since it's computed for merged URI
* System/Uri.cs: Compute the expected OriginalString when an absolute
URI is merged with a (String or Uri) relative Uri to create a new Uri
instance. Keep original fragment around for ToString

* Test/System/UriTest2.cs: Add test cases for Fragment and Query when
special characters are used. Most of them are not escaped in ToString
* Test/System/UriTest3.cs: Uncomment an Assert that is now fixed.
2010-09-20 17:07:52 -04:00
Sebastien Pouliot 03b24a9f61 Actual exception message vary wrt scheme
* System/Uri.cs: Exception message does not specify Authority when a
file:// URI is parsed
2010-09-20 17:07:52 -04:00
Sebastien Pouliot 97841ca329 Fix different between an empty Uri.UserInfo and the absence of username/password
* System/Uri.cs: An empty username/password is treated differently than
having none, i.e. the '@' character is kept present in the URI

* Test/System/UriTest2.cs: Add test case with an empty UserInfo
2010-09-20 17:07:51 -04:00
Sebastien Pouliot 7f06c7980e Only return true on Windows for Uri.IsUnc on file:// URI
* System/Uri.cs: IsUnc returns true for file:/// URI on Windows only.
This makes us closer to Mac-behavior (see NCL tests) since the other
properties, e.g. LocalPath, match this. Also fix some exception text
where the values are checked by some test cases.

* Test/System/UriTest.cs: Adjust some test cases wrt Win32
* Test/System/UriTest2.cs: Adjust a test case wrt Win32
2010-09-20 17:07:51 -04:00
Sebastien Pouliot 0d098aed04 Remove NET_2_0 and ONLY_1_1 from UriTest.cs (its already confusing enough ;-)
* Test/System/UriTest.cs: Remove NET_2_0 and ONLY_1_1
2010-09-20 17:07:50 -04:00
Sebastien Pouliot 6c8c8010fb Fix merging relative URI that looks like complete URI (e.g. scheme)
* System/Uri.cs: Fix merging URI where a relative URI contains a ':'
but no valid scheme

* Test/System/UriTest2.cs: Add test cases where some bad (if absolute)
URI are valid when merged (as relative) with an absolute URI
2010-09-20 17:07:50 -04:00
Rodrigo Kumpera 065699bb8c Report the broken type name instead of assembly's. 2010-09-20 14:53:39 -03:00
Rodrigo Kumpera a86cccf899 Use List<Exception> instead of ArrayList to make things prettier. 2010-09-20 14:44:20 -03:00
Rodrigo Kumpera e340fb6e79 Fix AssemblyBuilder::GetTypes () with unfinished types.
* AssemblyBuilder.cs (GetTypes): Raise ReflectionTypeLoadException
	if any type was not finished.

	* AssemblyBuilderTest.cs: Add test for GetTypes () and incomplete
	TypeBuilders'.

	Fixes #640288
2010-09-20 14:32:24 -03:00
Paolo Molaro 59fff042d1 First pass at profiler hooks in sgen.
* sgen-gc.c, sgen-los.c: added hooks for the important GC events.
Update some of the GC-related performance counters, too.
2010-09-20 19:05:43 +02:00
Geoff Norton 6d33469126 Include TargetFrameworkAttribute in monotouch and monodroid as well 2010-09-20 12:31:42 -04:00
Jonathan Pobst 82e945bea3 Merge branch 'master' of github.com:mono/mono 2010-09-20 11:28:39 -05:00
Marek Safar 8881d43ffd Don't check inferred dynamic type arguments against best candidate constraints. 2010-09-20 16:10:43 +01:00
Marek Safar f965a1facf More missing conversions between object and dynamic 2010-09-20 16:10:42 +01:00
Jb Evain c6cab1a6ca Ignor test since its fix has been reverted 2010-09-20 17:12:04 +02:00
Jb Evain e2a6360c09 Revert "[Fix] Fix the default binder when selecting params methods."
This reverts commit 6a7443d808.
2010-09-20 17:04:58 +02:00
Alan McGovern bab9782bb5 [monodis] Ensure we don't try to free uninitialized memory. 2010-09-20 14:05:17 +01:00
Marek Safar 1dee707951 [640285] Initialize this in current block instead of original block 2010-09-20 09:36:03 +01:00
Marek Safar de3ca24a49 Parse secondary static like expression as a non-cast 2010-09-20 09:36:02 +01:00
Rodrigo Kumpera be6cc4e4c7 Avoid a superfluous copy.
* sgen-marksweep.c (major_scan_card_table): Avoid an extra
        copy under overlapping card.
2010-09-19 16:39:09 -03:00
Rodrigo Kumpera 32a2b1c548 Cleanup definitions and clearly states what are the tunables.
* sgen-cardtable.h: Auto detect the need for
	SGEN_HAVE_OVERLAPPING_CARDS.

	* sgen-cardtable.h: Add CARD_TABLE_BITS and make CARD_COUNT_BITS
	depend on it.

	* sgen-cardtable.h: Document which and how each tunable affect
	runtime of sgen.
2010-09-19 16:39:09 -03:00
Rodrigo Kumpera 2849b865b8 Fix los scanning with overlapping cards.
* sgen-cardtable.c (sgen_cardtable_scan_object): If the
	card range overflows the cardtable, split the scanning in
	two steps.
2010-09-19 16:39:09 -03:00
Rodrigo Kumpera f4f98554b9 Use card pointer as induction variable.
* sgen-cardtable.c (sgen_cardtable_scan_object): Use
	the card pointer as the loop induction variable so
	it's easier handle overlapping cards and overflow.
2010-09-19 16:39:08 -03:00
Rodrigo Kumpera fe8ce3e209 Fix overlapping support for copy/clear functions.
* sgen-cardtable.c: The copy/clear functions may write
	into invalid memory if a block lives across the edges
	of the cardtable address range.
2010-09-19 16:39:08 -03:00
Rodrigo Kumpera 77f4b40c0a Fix OP_CARDTABLE to support overlapping cards.
* cpu-x86.md: Increase the max size of OP_CARDTABLE.

	* mini-x86.c (mono_arch_output_basic_block): If a mask
	is returned, emit code for it.
2010-09-19 16:39:08 -03:00
Rodrigo Kumpera 18b0d33170 Document some cardtable requirements and add an assert. 2010-09-19 16:39:08 -03:00
Zoltan Varga 5cd6380923 Add store_mem_imm to the x86 machine description. Fixes #640377. 2010-09-19 19:44:19 +02:00
Zoltan Varga 33c8ff1f05 Move the setting of mono_lmf, mono_lmf_addr and mono_jit_tls into separate functions to reduce the number of #ifdefs. 2010-09-18 07:50:19 +02:00
Zoltan Varga 8d2deaba77 Make MonoThreadCleanupFunc take an InternalThread instead of a Thread.
Move its definition to threads-types.h since it is not public API. Use this
to remove the workaround in thread_cleanup () so the JIT info for threads is
properly cleaned up at shutdown.
2010-09-18 07:50:01 +02:00
Sebastien Pouliot 28e93c38d0 Fix escaping on relative URI
* System/Uri.cs: While parsing only escape the path for absolute URI.
Do not unescape relative URI in ToString and avoid calling
AppendQueryAndFragment on them (relative) since both are not parsed as
such.

* Test/System/UriTest2.cs: Add test case to show that a relative URI is
NOT escaped by ToString
2010-09-17 17:25:37 -04:00
Sebastien Pouliot 6ad868a9a3 Add support for IPv6 in System.Uri.DnsSafeHost
* System/Uri.cs: Fix DnsSafeHost for IPv6 addresses, removing the []
brackets and adding, when available, the scope id

* Test/System/UriTest2.cs: Add DnsSafeHost test cases for IPv6 address,
one without scope id, another with a scope id
2010-09-17 17:25:37 -04:00
Sebastien Pouliot b3619d34a8 Fix Uri when a colon ':' is not followed by a port number
* System/Uri.cs: Fix parsing the port/host when a ':' is present without
a port number on non-file:// URI

* Test/System/UriTest2.cs: Add test cases where an URI contains a ':'
but is not followed by a port number
2010-09-17 17:25:36 -04:00
Sebastien Pouliot f75017f54f Fix typo (host vs hostName) in one of UriBuilder ctor
* System/UriBuilder.cs: Fix typo from previous change

* Test/System/UriBuilderTest.cs: Add regression test for that .ctor
2010-09-17 17:25:36 -04:00
Sebastien Pouliot 4a03d74fcd UriBuilder is more forgiving (than Uri) when parsing string uri
* System/UriBuilder.cs: Refactor constructors to share Initialization
methods. Allow a second chance to .ctor(string) to parse an URI by
assuming it's an HTTP URI

* Test/System/UriBuilderTest.cs: Add test case with string URI that do
not provide a scheme - UriBuilder will default them to http:// even if
Uri would not parse them
2010-09-17 17:25:35 -04:00
Sebastien Pouliot f8bc4bbfb8 Fix case where 'incomplete' IPv6 address are used in UriBuilder
* System/UriBuilder.cs: Fix Host property to add the missing brackets
on IPv6 address (if missing from input)

* Test/System/UriBuilderTest.cs: Add test cases with incomplete IPv6
addresses. Add test case with a relative Uri used in UriBuilder ctor
2010-09-17 17:25:35 -04:00
Sebastien Pouliot 3eef628453 Update UriBuilder.Path once the Uri has been created
* System/UriBuilder.cs: Update UriBuilder.Path once the Uri has been
created using Uri.AbsolutePath

* Test/System/UriBuilderTest.cs: Add test case with path missing the
initial / which shows the UriBuilder.Path property is being updated
after the creation of the Uri instance.
2010-09-17 17:25:34 -04:00
Andrew Jorgensen ea0b6a1b47 3.5 version of Sys.Web.Ext is gone 2010-09-17 12:21:44 -06:00
Atsushi Eno dbe6e11979 ProtocolMapping needed config section, default items and support in ServiceHostBase. 2010-09-18 00:23:37 +09:00
Gonzalo Paniagua Javier 0705817178 Revert my last patch
Not only it didn't fix anything but it broke a test.
2010-09-17 10:53:06 -04:00
Marek Safar 7759cad1dc User operators are resolved in a batch, pick up the foremost 2010-09-17 15:45:12 +01:00
Marek Safar 8291761235 Make the dynamic sites container name really unique 2010-09-17 15:41:19 +01:00
Marek Safar 0525cd57cb Fixes preference of a user-defined conversion operators over lifted conversion operators 2010-09-17 13:36:53 +01:00
Marek Safar 6f0c3ff391 Fixes cloning of a variable declarator. 2010-09-17 11:17:32 +01:00
Marek Safar af43208762 Implement predefined binary enum operators involving an implicit user conversion 2010-09-17 11:17:31 +01:00
Marek Safar b4dad08661 Recover wrong invalid character constants. 2010-09-17 11:17:31 +01:00
Marek Habersack ff6111c314 Changed mode of a few files from 755 to 644 2010-09-17 10:33:07 +02:00
Rolf Bjarne Kvinge fb722c9597 Fix typo in Makefile causing build breakage 2010-09-17 10:32:27 +02:00
Atsushi Eno fe3362a8f2 Add working .svc handler in 4.0 web.config, fix standard endpoint handling and get xsp4 working. 2010-09-17 16:00:16 +09:00
Atsushi Eno d1ef303ddd Merge branch 'master' of github.com:mono/mono 2010-09-17 12:34:58 +09:00
Andrew Jorgensen e14129134f More .spec reorgs 2010-09-16 17:12:12 -06:00
Rolf Bjarne Kvinge 767d08e56d Only build one version of libmonoruntimemoon.la (the convenience lib) 2010-09-17 00:20:41 +02:00
Rolf Bjarne Kvinge a9a74301d2 Add a configure option to disable building the shared libmono library 2010-09-17 00:20:40 +02:00
Rolf Bjarne Kvinge de7d1118de Disable assembly remapping for moonlight 2010-09-17 00:20:38 +02:00
Rolf Bjarne Kvinge 8ee8df3d1e Add configure option for disabling assembly remapping 2010-09-17 00:20:38 +02:00
Sebastien Pouliot c82563c465 Update UriBuilder.Host once the Uri has been created
* System/UriBuilder.cs: Update UriBuilder.Host once the Uri has been
created

* Test/System/UriBuilderTest.cs: Add test case with IPv6 host (address)
which shows the UriBuilder.Host property is being updated after the
creation of the Uri instance.
2010-09-16 17:32:21 -04:00
Sebastien Pouliot 81618b9d4c Fix known (NotWorking) test cases for UriBuilder and drop NET_2_0 defines
* System/Uri.cs: Add EscapeCommonHexBracketsQuery constant since ? also
needs to be escaped from UriBuilder
* System/UriBuilder.cs: Fix Equals (escaping '?') and UserInfo. Fix NRE
in ctor that was fixed in FX4. Drop NET_2_0 defines.

* Test/System/UriBuilderTest.cs: Drop NET_2_0 defines and add new ones
for NET_4_0. Add more asserts in the test cases that were failing.
2010-09-16 17:32:21 -04:00
Sebastien Pouliot 0c9bbbf34c Fix line endings
* System/UriBuilder.cs: Fix line endings
2010-09-16 17:32:20 -04:00
Sebastien Pouliot c42150e5f9 Fix path reduction when %2e are used in an URI
* System/Uri.cs (Reduce): Process %2E while reducing a path. Avoid, when
possible, the creation of StringBuilder and replace ArrayList with
generics

* Test/System/UriTest2.cs: Add test case where %2e and %2E are used
2010-09-16 17:32:20 -04:00
Sebastien Pouliot 262663d1f5 Fix (existing and) remaining NotWorking tests for System.Uri
* System/Uri.cs: Fix TryCreate overloads wrt NotWorking unit tests

* Test/System/UriTest2.cs: Remove NET_2_0 and ONLY_1_1 defines from tests
* Test/System/UriTest3.cs: Remove NET_2_0 and [Category("NotWorking")]
from tests. Merge MakeRelativeUri_Uri_Null_[MS|Mono] together since the
(reported) issue was fixed in NET_4_0
2010-09-16 17:32:19 -04:00
Sebastien Pouliot ad649a73e9 Fixes to System.Uri wrt 'file' scheme
* System/Uri.cs: Fix 'file' URI since they can't have a query

* Test/System/UriTest2.cs: Add new test case for 'file' URIs and
some asserts on "custom" URI (which do support queries)
2010-09-16 17:32:19 -04:00
Gonzalo Paniagua Javier ca4b4816fc Fix typo. It has been there for 4 years.
Why on earth this wasn't found earlier? $20 reward to whoever gives a
	plausible explanation.
2010-09-16 13:13:56 -04:00
Jonathan Pryor 461d03c07f Build monodoc before mdoc.
mdoc deps on monodoc.  Doh!
2010-09-16 13:09:56 -04:00
Jonathan Pryor dc3440293b Make mdoc a 2.0 app, not a 4.0 app.
The problem is build sanity: it's possible to disable the 4.0 profile
(--with-profile4=no) while not disabling documentation building
(--with-mcs-docs=yes is the default).  The result would be a 4.0-less
build, and thus no mdoc, and thus no mdoc to assemble the documentation,
and thus a build break as we attempted to use an app during the build
which didn't exist.

Oops.

mdoc doesn't need to be a 4.0 app anyway...
2010-09-16 12:31:11 -04:00
Miguel de Icaza c7349ea219 Reuse the same delegate for checking if the runtime is shutting down.
Instead of creating a new delegate every time that WaitAny is invoked,
reuse the same delegate.   We also keep a permanent reference to prevent
this delegate being collected.

Thsi should fix 592981
2010-09-16 11:58:45 -04:00
Atsushi Eno a78c92eb4b Add ProtocolMapping support. 2010-09-16 23:23:44 +09:00
Marek Safar b1de5e6ba5 [639603] Don't emit statements as expressions when they don't support it. 2010-09-16 12:32:16 +01:00
Marek Safar 5ec5860308 [639407] Clean up more static stuff to fix repl instances. 2010-09-16 12:32:16 +01:00
Atsushi Eno 3636f9866d Implement some additional logic around AddServiceEndpoint() to achive standard endpoint support. 2010-09-16 17:58:11 +09:00
Atsushi Eno 5aa2482e23 Return new instance. 2010-09-16 17:57:38 +09:00
Atsushi Eno be6342ff02 Contract is settable in 4.0. 2010-09-16 17:56:57 +09:00
Atsushi Eno d133ca7c6f Add the trickiest line that had me; AddElementName is not on ConfigurationProperty here. 2010-09-16 17:55:38 +09:00
Gonzalo Paniagua Javier aea9c2d57c Remove 2 extra calls to gettimeofday. 2010-09-15 23:53:04 -04:00
Mark Probst 95beb90b23 Remove weak links for monitors.
mono_runtime_cleanup() calls mono_monitor_cleanup(), which frees the
memory associated with monitors.  Some of them still have weak links
registered, which leads to a crash when calling mono_domain_free()
later on.
2010-09-16 01:42:22 +02:00
Mark Probst b800d8ef5a [sgen] Avoid doing an unnecessary gettimeofday(). 2010-09-16 01:34:42 +02:00
Andrew Jorgensen e79ba7b6e1 Add System.Net (4.0 and 2.0) to mono-core in .spec 2010-09-15 17:28:57 -06:00
Sebastien Pouliot a15378363d Fix System.Uri wrt 'ftp' scheme
* System/Uri.cs: Fix 'ftp' support, mostly same fixes as 'nntp'

* Test/System/UriTest2.cs: Add new test case for 'ftp' including
dealing with custom port and user/password data.
2010-09-15 17:31:21 -04:00
Sebastien Pouliot 37c9e1e52a Fix System.Uri wrt 'nntp://' URIs
* System/Uri.cs: Fix 'nntp' support which is close to 'news' (no query)
but still has an Host, Autority, Port...

* Test/System/UriTest2.cs: Add test cases for 'nntp://'
2010-09-15 17:31:21 -04:00
Sebastien Pouliot 15c86fc8c1 Remove more code (after shortcut) on 'news:' Uri
* System/Uri.cs: Remove condition/code wrt 'news:' that occurs after
the new "shortcut".
2010-09-15 17:31:20 -04:00
Sebastien Pouliot 89882a57f6 Multiple fixes for URI using 'news:' scheme
* System/Uri.cs: Make it easier to reuse EscapeString without adding new
boolean parameters. Shortcut parsing for 'news' since it's simpler (no
query, host, authority...) Avoid creating StringBuilder instance when
[un]escape-ing empty strings
* System/UriBuilder.cs: Adjust for EscapeString API change
* System/UriParser.cs: Fix default news port and adjust for EscapeString
API change

* Test/System/UriTest2.cs: Add test case for 'news:' showing the lack
of Query and Port (but support for Fragment) and the escape-ing
differences.
2010-09-15 17:31:20 -04:00
Sebastien Pouliot f69fac088c Fix Uri.Segments property so the internal, cached, array cannot be modified
* System/Uri.cs: Keep the cached 'segments' as a List<string> and return
a new array (ToArray) when the Segment propery is called.

* Test/System/UriTest.cs: Add test case to show that the segments cannot
be modified by accessing the elements of the Segment property.
2010-09-15 17:31:19 -04:00
Sebastien Pouliot 04cf7acf16 Fix Uri.ToString when forward slashes are used
* System/Uri.cs: Fix ToString (Unescape) to ignore '\\' and let it be
outputed as %5C
* Test/System/UriTest2.cs: Add test case for above
2010-09-15 17:31:19 -04:00
Sebastien Pouliot 6b98267cb0 Fix Uri/Segments wrt driver letters nad (forward) slashes
* System/Uri.cs: Reimplement Segment property to reduce copying and
string allocations. Fix case with slashes (separate, not single,
segments)

* Test/System/UriTest2.cs: Add test cases for segments on an URI that
contains a drive letter and (forward) slashes.
2010-09-15 17:31:19 -04:00
Miguel de Icaza 0085c16ada Revert 2010-09-15 17:18:18 -04:00
Ankit Jain ae1aee4439 [xbuild] Use files referenced by resx for dependency check.
For .resx resource files, check files referenced by the resx
file also, to determine whether to resgen it or not.

IsResgenRequired () has been taken from MonoDevelop
(main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MD1/MD1DotNetProjectHandler.cs)
2010-09-16 01:22:19 +05:30
Ankit Jain 4abf81bb05 [xbuild] Fix case sensitive environment variables for ToolTask.
Use ProcessStringDictionary in ToolTask for EnvironmentVariables,
as this retains the original case of the keys. Without this
environment vars would all be passed as lowercase!

This was removed in a previous patch by mistake.
2010-09-16 01:22:18 +05:30
Miguel de Icaza acfdccca84 Make the thread-id field be of the proper size on 64 bit machines.
This error was found by Gonzalo when he was looking at another problem
when thread IDs overflowed ints.

Currently we use gpointers in the io-layer for the threadid, but we were
only exposing the value as an int32.   The good news is that the code is
not really used right now, but could cause problems in the future as we
extend Process.
2010-09-15 14:28:23 -04:00
Ankit Jain 0a022f2c2d [xbuild] Fix references to Microsoft.Build.* assemblies for 3.5 . 2010-09-15 23:36:58 +05:30
Marek Safar 31e372f8c9 Remove copying of misplaced duplicate of System.Web.Extensions.Design.dll 2010-09-15 19:01:54 +01:00
Raja R Harinath a555eb2db5 Fix a few CRLF issues 2010-09-15 23:09:14 +05:30
Ankit Jain a4d4d765db [xbuild] Add ToolTask.EnvironmentVariables property.
* class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolTask.cs
	(EnvironmentVariables): New.
	(ExecuteTool): Merge EnvironmentVariables with
	EnvironmentOverride
	* class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GenerateResource.cs
	(Resgen.Execute): Use EnvironmentVariables to set MONO_IOMAP=drive .
2010-09-15 22:21:04 +05:30
Ankit Jain 2b3fc6859f [xbuild] Fix a race condition in ToolTask.
* class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolTask.cs
 (ExecuteTool): When StartProcess returns, the process has already .Start()'ed
 If we subscribe to the output events after that, then for processes that
 finish executing before we can subscribe, we won't get the output/error
 events at all! So, pass the handlers to StartProcess itself, so that
 they get added before the process is started.
2010-09-15 22:21:03 +05:30
Marek Safar 274a7b097a [637935] Fixed 3.5 version of msbuild dlls to reference 3.5 version of the engine
MONO_PATH does not work for subsequent dlls, so have to workaround it by
using full path for dlls in 3.5 profile which does not have it's own
mscorlib
2010-09-15 17:42:40 +01:00
Andrew Jorgensen c3963cd3ad mono-configuration-crypto is a 4.0 assembly, not 2.0 2010-09-15 10:31:39 -06:00
Geoff Norton 2168960458 Fix the embedded mono on OSX code to support a symlinked mono into the framework.
The embedding code looks at the executable name, and builds the embedding profile
from that, however the default install has a /usr/bin/mono symlink pointing to
/Library/Frameworks/Mono.framework.  We now resolve the symlink before allowing
the embedding code to proceed.
2010-09-15 12:24:24 -04:00
Marek Safar 6473a4b53d There are actually some 3.5 only dlls, thanks to ankit for poiting out. 2010-09-15 16:26:43 +01:00
Jonathan Pryor 8de03301b5 Ensure that the GC doesn't collect the delegate we pass off to native code.
(Hopefully) Fixes #592981.

This is esoteric, with no test case, so I can only assume that the cause for
the crash reported in #592981 is that Boehm is collecting the shutting_down
delegate reference while we're still in native code (which sounds more like a
Boehm bug, as it shouldn't be collecting memory while we're in a P/Invoke).

Hopefully making the delegate more explicit and using GC.KeepAlive() will keep
the delegate from being collected by the GC during the P/Invoke call.
2010-09-15 10:40:28 -04:00
Marek Safar 796300b06a Removed class from net_3_5 subdirs 2010-09-15 15:23:18 +01:00
Paolo Molaro c4e99417cd Documentation for a few garbage collector APIs. 2010-09-15 15:25:44 +02:00
Zoltan Varga 671551a7ca UCONTEXT_REG_RCX was defined twice on OpenBSD, and RBX was missing. Fix that. 2010-09-15 15:05:08 +02:00
Rodrigo Kumpera 7d1d464e64 Fix monotouch bootstrap.
* Type.cs (GetTypeCodeImpl): If the type is a TypeBuilder
	call into specific code.

	* TypeBuilder.cs (GetTypeCodeInternal): New method that
	handles enums correctly.

	This change is required because calling into the runtime
	with incomplete TypeBuilders cause the runtime to crash.
2010-09-15 09:58:17 -03:00
Marek Safar aff57d8d8e Recover wrong embedded statement syntax 2010-09-15 13:43:36 +01:00
Marek Safar 7c1484f554 New test. 2010-09-15 13:43:04 +01:00
Marek Safar df88ece9fa Remove net_3_5 dirs to fix 4.0 dependency and not to build some dlls twice 2010-09-15 13:04:23 +01:00
Rolf Bjarne Kvinge 81be63b52c mono_trace already adds a newline to trace messages, don't add another one 2010-09-15 12:16:12 +02:00
Marek Safar 78b80bc720 [639403] Fixes the endless recursion with hacked EOF 2010-09-15 10:26:38 +01:00
Marek Safar 55bd1d4360 Encode correctly all constants into a payload 2010-09-15 10:26:38 +01:00
Chris Toshok 7de7347c3c built a separate libmonoruntime for moonlight, so we can do -DMOONLIGHT just in the moonlight lib instead of globally. 2010-09-14 22:58:25 -07:00
Chris Toshok f4295a3be5 if we're building with moonlight enabled, don't build mdb. 2010-09-14 21:48:38 -07:00
Ankit Jain 82a3f04332 [xbuild] Fix handling of tool output.
The *StreamChanged event for ProcessWrapper may get parts of
long lines, so process the complete ones that we have (for matching
error/warning), and save rest for processing when the rest of it
is received.

Also, don't ignore empty lines.

* class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolTask.cs
2010-09-15 04:40:52 +05:30
Gonzalo Paniagua Javier 0ce58c9023 GetProcessById now works on the Mac too
Ditto.
	This should fix MD problems when SHM is disabled.
2010-09-14 18:24:49 -04:00
Sebastien Pouliot 05f6ad4301 Correctly handle the (uncommon) 4 slashes //// case in Uri
* System/Uri.cs: Handle multiple starting slash correctly
* Test/System/UriTest2.cs: Add test cases with multiple slashes
2010-09-14 17:43:09 -04:00
Sebastien Pouliot cac14bee27 Fix some (long standing) NotWorking test cases on Uri
* System/Uri.cs: Fix Segments and username/password (unsupported) on
file:// URI
* Test/System/UriTest.cs: Remove [Category("NotWorking")] from some
tests and add a few additional (helpful) asserts.
2010-09-14 17:43:09 -04:00
Sebastien Pouliot a11f9e17c4 Fix Uri Host when a drive letter is used
* System/Uri.cs: For most scheme a drive letter is converted into an
host name (minus the ':' character)

* Test/System/UriTest2.cs: Add test cases for drives versus hosts
2010-09-14 17:43:08 -04:00
Rodrigo Kumpera c8aa61eb46 Fix crash in pedump.
* pedump.c (verify_image_file): Setup the fake assembly before
	doing full metadata verification since it does type loading.

	Fixes #598228
2010-09-14 18:40:34 -03:00
Zoltan Varga 37e6ae59b1 Fix warnings caused by the profiler api changes. 2010-09-14 20:46:21 +02:00
Rodrigo Kumpera aa5cefa80c Fix 64bits build.
* sgen-cardtable.c (sgen_card_table_get_card_data): Start
        must be incremented with and without overlapping cards.
2010-09-14 15:25:56 -03:00
Atsushi Eno 6bc9abe0a7 add more NET_4_0. 2010-09-15 01:53:41 +09:00
Atsushi Eno 5eb0299fc1 Add NET_4_0. 2010-09-15 00:39:54 +09:00
Marek Safar c448d87abb Fixes mixed line ending. 2010-09-14 15:49:13 +01:00
Marek Safar 161ee3d54a Merge branch 'marek' 2010-09-14 15:43:43 +01:00
Marek Safar 6d57da0310 Recover wrong invalid initializer syntax. 2010-09-14 15:41:17 +01:00
Marek Safar 68cc37dcca Finish predefined attributes instance access to allow compile time dynamic support in repl. 2010-09-14 14:13:44 +01:00
Carlos Alberto Cortez 682e52541d In 4.0 the constructors of TypeConverter.SimplePropertyDescriptor are protected.
* TypeConverter.cs: The constructors of SimplePropertyDescriptor
	are protected in 4.0.
2010-09-14 10:14:34 +02:00
Carlos Alberto Cortez fc01f5d598 Add a new test for TypeDescriptor.InterfaceType.
* TypeDescriptorTests.cs: New test for InterfaceType.
2010-09-14 10:14:34 +02:00
Carlos Alberto Cortez 88d9cb44a1 Implement TypeDescriptor.InterfaceType.
* TypeDescriptor.cs: Implement 4.0 InterfaceType property, which
	seems to be a simple dummy and empty class in .Net, internally
	used to represent all interfaces.
2010-09-14 10:14:34 +02:00
Carlos Alberto Cortez 9c24d407cf Remove the NET_2_0 directives from TypeDescriptor.cs
* TypeDescriptor.cs: Remove the NET_2_0 directives, as we don't
	need them anymore.
2010-09-14 10:14:33 +02:00
Carlos Alberto Cortez 949d7305bb Remove the NET_2_0 and ONLY_1_1 directives from TypeDescriptorTests.cs
* TypeDescriptorTests.cs: Remove the NET_2_0 and ONLY_1_1
	directives, as we don't need them anymore.
2010-09-14 10:14:33 +02:00
Carlos Alberto Cortez 013a527a9a Include TypeDescriptionProviderTest.cs in our build.
* System_test.dll.sources: Include
	TypeDescriptionProviderTest.cs in our build.
2010-09-14 10:14:33 +02:00
Carlos Alberto Cortez 3d382ac842 Add new TypeDescriptionProviderTest.cs test file.
* TypeDescriptionProviderTest.cs: New test file.
2010-09-14 10:14:33 +02:00
Carlos Alberto Cortez 9b850f2e49 Implement IsSupportedType, GetExtenderProviders and GetRuntimeType for TypeDescriptionProvider.
* TypeDescriptionProvider.cs: Implement 4.0 IsSupportedType,
	GetExtenderProviders and GetRuntimeType methods.
2010-09-14 10:14:33 +02:00
Carlos Alberto Cortez b45d1da49d Remove the NET_2_0 directive from TypeDescriptionProvider.cs
* TypeDescriptionProvider.cs: Remove the NET_2_0 directive.
2010-09-14 10:14:32 +02:00
Atsushi Eno 19fee21615 ongoing standard endpoint configuration support work. 2010-09-14 21:14:00 +09:00
Jonathan Pryor 31190e15c3 Distribute DbmlSchema.xsd so that tarball builds work. 2010-09-14 06:39:57 -04:00
Atsushi Eno 395138f132 Add new properties in 4.0. 2010-09-14 16:43:56 +09:00
Atsushi Eno 56cc46da8c Avoid crash by missing config attributes. 2010-09-14 16:43:26 +09:00
Atsushi Eno 5d5be5a6fd Remove Console.WriteLine. 2010-09-14 16:32:31 +09:00
Marek Safar 9b916b2cbb Initialize all core types 2010-09-14 08:28:57 +01:00
Rodrigo Kumpera 09240fee8e Add v4.0 beta to runtime versions list. 2010-09-13 21:44:53 -03:00
Rodrigo Kumpera 9ae35b0139 Fix fallthru of EH block check.
* verify.c (mono_method_verify): Only skip dead code
	after checking for fallthru.

	* unverifiable_fallout_of_finally_block.il: Regression
	test for fallthru on dead code.

	Fixes #597072
2010-09-13 21:35:39 -03:00
Zoltan Varga 373a2f8170 Add casts to the macros on netbsd so the caller doesn't have to reference ucontext_t which is not available on some platforms like android. 2010-09-14 02:04:37 +02:00
Geoff Norton 4e5df169a5 The tid is passed around internally as a unsigned value.
We were having a crash on OSX due to thread->tid not equalling the
passed tid due to a signedness issue.
2010-09-13 18:43:32 -04:00
Sebastien Pouliot 60d5ffbd37 Fix URi tests (and class) to be omcpatible with both 2.0 and 4.0 (and SL4)
* System/Uri.cs: Fix some "bugs" that are not part of FX4 anymore.
Change how Query/Fragment are merged to match FX4 (while keeping it
compatible with buggy FX2 under the NET_2_0 profile)

* Test/System/UriTest.cs: Adjust test cases to work with 4.0. Mark with
NotDotNet two test cases that are Mono/Unix-specific
* Test/System/UriTest2.cs: Add new test cases where a relative Uri is
merged with an absolute Uri (some changes in SL4/FX4 wrt FX2)
* Test/System/UriTest3.cs: Adjust for bugs fixed after FX 2.0.
2010-09-13 17:38:42 -04:00
Zoltan Varga dea65b0a06 Bump minor version to 2 to be compatible with the runtime. 2010-09-13 23:21:52 +02:00
Marek Safar e812865ba6 Removed confusing catch error message. 2010-09-13 20:06:33 +01:00
Geoff Norton 7c1ad825bf Rename major -> major_collector and drop unguarded usage of ucontext_t.
Android defines a variable called "major" in its headers, lets rename
major -> major_collector to work around the conflict.

Not every architecture/platform has ucontext_t, so lets not strongly
type our contexts to that and let the macros do their job.
2010-09-13 14:39:41 -04:00
Geoff Norton dedbe0a079 Fix the build when compiling without shared handle support entirely
The wapi init functions call this even when shared is compiled out,
lets just return FALSE to get into the right codepaths.
2010-09-13 14:38:39 -04:00
Marek Safar 6d92a4f988 Add a test for arrays with dynamic elements. 2010-09-13 19:25:40 +01:00
Marek Safar fd1e37289c Implement foreach over nullable values. 2010-09-13 19:02:48 +01:00
Rodrigo Kumpera 1a1ccabce6 CompiledContext is no longer needed.
* MethodBuilder.cs (GetGenericArguments): No need to
	check for compiler context. It's gone.
2010-09-13 14:51:59 -03:00
Jonathan Pryor 7d8ee77c4a [sqlmetal] Fix /code from DBML file.
sqlmetal.exe is supposed to allow generating source code from a .dbml file:

	sqlmetal /code:foo.cs foo.dbml

However, this failed because the DbmlSchema.xsd file couldn't be found (so
that the DBML file could be validated).

Embed the DbmlSchema.xsd file so that the above `sqlmetal` command works.
2010-09-13 13:34:36 -04:00
Rodrigo Kumpera a0182452a3 MethodBuilder should return null for generic arguments of non generic method.
* MethodBuilder.cs (GetGenericArguments): Return null if not
	generic.

	* MethodBuilderTest.cs: Add test for #384127.

	Fixes bug #384127.
2010-09-13 14:26:30 -03:00
Marek Safar 705cfc4639 Keep only 1 using implementation and handle all nullable and dynamic cases there. 2010-09-13 17:53:42 +01:00
Marek Safar 63af9c8471 Better error reporting for missing identifiers. 2010-09-13 17:53:41 +01:00
Michael Hutchinson fbbffbcd74 [Embedding] Make mono-dl-fallback.h public-safe 2010-09-13 11:00:26 -04:00
Zoltan Varga 09e06783e4 Fix a problem in mono_arch_get_argument_info () introduced by the last change. 2010-09-13 15:56:40 +02:00
Zoltan Varga ffefb28b9b Fix a warning. 2010-09-13 15:45:59 +02:00
Atsushi Eno 5628b49a01 implemented large parts of WCF standard endpoints and configuration support. 2010-09-13 22:36:37 +09:00
Marek Habersack 28349ded65 [asp.net] Menu 4.0 List rendering mode JavaScript fixes
This makes the new script work correctly with IE, which has a different way of
hooking up of events and cancelling of their bubling. Previously the mouse-over
handler would be called for each and every submenu causing the leaf menus not
to appear. With this fix the handler is called only once.
2010-09-13 14:34:38 +02:00
Rodrigo Kumpera eb7a494efe Fix a warning.
* glib.h: Fix propotype.
2010-09-13 08:28:15 -03:00
Rodrigo Kumpera 321d7c1bdd Fix a sgen shutdown crash.
* threads.c (mono_thread_suspend_all_other_threads): wait_data
	must not be malloc'd since it holds managed pointers. Alloc
	it on stack since the struct is about 512/1024 bytes long.

	* threads.c (mono_thread_manage): Ditto.

	* threads.c (mono_threads_request_thread_dump): Ditto.
2010-09-13 08:11:55 -03:00
Geoff Norton 2f1c4b3a6c Implement GByteArray, g_hash_table_remove_all, g_queue_foreach and some missing byteswap macros. 2010-09-11 22:39:22 -04:00
Miguel de Icaza 8be892f4fa Do not install sample header, add to EXTRA_DIST 2010-09-11 15:32:29 -04:00
Ankit Jain f940df11fc [xbuild] Fix ConsoleLogger's output, extra blank lines etc. 2010-09-12 00:50:06 +05:30
Zoltan Varga 06ffc32e73 Remove -Werror from the eglib tests too. 2010-09-11 21:16:31 +02:00
Ankit Jain c3770263e0 [xbuild] Reduce ConsoleLogger's unnecessary output.
ConsoleLogger was emitting target names, even if they didn't have
any useful output, which resulted in lots of "Target foo:" in the
output, with no other related msgs.

 Target Foo:
 Target Bar:
 Target Xyz:

Emit project/target/task headers only if they result in a message,
error or warning. This results in much cleaner output.
2010-09-11 23:50:03 +05:30
Ankit Jain 0ec2760034 [xbuild] Log default msg for TargetSkipped if @reason is null or empty. 2010-09-11 23:50:02 +05:30
joncham fe0ebcfa51 Update mono.sln for 2010 2010-09-10 22:40:13 -04:00
joncham 66146c05b5 Add vcxproj files 2010-09-10 22:40:12 -04:00
joncham 8aa83b447c Migrate vcproj files to VS2010 2010-09-10 22:40:11 -04:00
unknown a6654bd366 [windows] Update Mono.def 2010-09-10 22:00:39 -04:00
Gonzalo Paniagua Javier 6334036a56 Fix the windows build
Avoid warnings in windows.
2010-09-10 20:52:09 -04:00
Marek Safar 4896adbd35 Always compare original block for cloned versions. 2010-09-10 22:44:52 +01:00
Marek Safar 76c18678c4 Tweak few error reports 2010-09-10 22:44:51 +01:00
Zoltan Varga d884317a28 Log the clearing of nursery fragments, avoid clearing small fragments twice. 2010-09-10 23:39:15 +02:00
Rodrigo Kumpera c543ac35a8 Rework major cardtable scan to have less active vars.
* sgen-marksweep.c (major_scan_card_table): Rework the small
        object size loop to have a single induction variable.
        In adition to that, add a fast initial card skip code.
2010-09-10 18:32:03 -03:00
Rodrigo Kumpera b8375e7411 Look for marked cards while copying them.
* sgen-cardtable.c (sgen_card_table_get_card_data): Check
	if any card is marked and return it.

	* sgen-marksweep.c (major_scan_card_table): Don't waste time
	scanning a block if no card was marked.
2010-09-10 18:32:02 -03:00
Rodrigo Kumpera de60b690e5 Manually hoist card lookup out of scan loops.
* sgen-cardtable.c (sgen_cardtable_scan_object): Lookup
	the card once and then bump over it. This saves a bunch
	of stores and opens up for later improvements.

	* sgen-marksweep.c (major_scan_card_table): Ditto.

	* sgen-cardtable.h: Add new inline function to return the
	card scan pointer of a given adddress.
2010-09-10 18:32:02 -03:00
Miguel de Icaza 6df4b5ac5e [Embedded] Add new fallback API to allow hooking up to the P/Invoke lookup system
This patch allows a developer to register a fallback for P/Invoke when
embedding Mono.   Typically this is done when you statically link all of your
libraries in some embedded systems and you need to dynamically resolve symbol
names.

There is a *sample* API included (but not compiled into Mono itself) called
mono-embed.c that shows a layman use of the API.   A full implementation would
mandate sorted tables, and would use a bsearch or a hashtable instead of having
linear searches.
2010-09-10 17:01:48 -04:00
Geoff Norton 26c1eb440c Forward port this change for MonoVS 2010-09-10 16:50:26 -04:00
Geoff Norton 82b7780781 fix typo
svn path=/branches/mono-2-6/mono/; revision=148851
2010-09-10 16:50:26 -04:00
Geoff Norton 2552cb04cd 2009-12-14 Geoff Norton <[email protected]>
* debugger-agent.c: The end_runtime_invoke guard isn't working
        on AMD64 as __builtin_frame_address (1) returns NULL.  Disable the
        behaviour by default, and make it runtime configurable.

svn path=/branches/mono-2-6/mono/; revision=148421
2010-09-10 16:50:26 -04:00
Marek Safar 345097fb05 Add comments. 2010-09-10 18:25:37 +01:00
Marek Safar 67a68cb18d New test. 2010-09-10 18:25:17 +01:00
Marek Safar 009c8b81ba Converting the switch statement into normal statement (the block part). 2010-09-10 18:20:04 +01:00
Andrew Jorgensen 217032f5c2 Dist the 2.0 resource files also 2010-09-10 10:55:20 -06:00
Andrew Jorgensen 5cab581fa9 Dist sgen-cardtable.h 2010-09-10 09:51:44 -06:00
Marek Safar 0e419dbf35 Update to the latest dmcs 2010-09-10 16:45:28 +01:00
Jb Evain b420eced14 Add test for #636939 2010-09-10 16:18:47 +02:00
Jb Evain 6a7443d808 [Fix] Fix the default binder when selecting params methods.
Use full assignability check instead of type equality
when selecting methods with a params array parameter.
Fixes #636939.
2010-09-10 16:18:47 +02:00
Marek Habersack ad75c45d76 [asp.net] Onobtrusive JavaScript for the 4.0 Menu control List mode 2010-09-10 15:36:09 +02:00
Marek Habersack f1d69fd4bc [asp.net] Menu 4.0 List mode rendering 2010-09-10 15:36:08 +02:00
Marek Habersack 50d0b513c7 [asp.net] Made GetExtension static and internal, so that it can be used from code outsude Unit 2010-09-10 15:36:08 +02:00
Marek Habersack a2d4e011e0 [asp.net] Added first test for Menu list rendering in 4.0 2010-09-10 15:36:08 +02:00
Marek Habersack c5e943e845 [asp.net] Standalone runner helper method to remove WebResource.axd from HTML now uses regexps 2010-09-10 15:36:08 +02:00
Atsushi Eno 1902671e15 Remove USE_DATA_CONTRACT_IMPORTER conditional compilation flag. 2010-09-10 22:26:44 +09:00
Atsushi Eno 9058a88120 Flush ongoing WCF Discovery configuration work. 2010-09-10 22:12:44 +09:00
Rolf Bjarne Kvinge c81152a0ab XmlFormatterDeserializer: handle ReflectionTypeLoadExceptions better 2010-09-10 12:44:35 +02:00
Marek Safar 2bded0cb1e When doing member access left side lookup the arity value is actually the exact value. 2010-09-10 11:37:29 +01:00
Marek Safar 667f95b865 Reject varianly implemented interface members. 2010-09-10 11:37:29 +01:00
Atsushi Eno 549e7b416e Add missing members and implement most of it. 2010-09-10 19:28:20 +09:00
Atsushi Eno e070ecd91e Cosmetic warning cleanups. 2010-09-10 18:49:35 +09:00
Atsushi Eno 869f5a07e2 Implement discovery version converter. 2010-09-10 18:48:14 +09:00
Atsushi Eno b15ed1c600 Add lacking property initializer. 2010-09-10 18:46:46 +09:00
Atsushi Eno d654648c71 Remove unnecessary common types (as they are imported from internal-visible ones). 2010-09-10 18:44:07 +09:00
Jb Evain da3532c006 Add another stub for the compatibility with the SL SDK 2010-09-10 11:40:50 +02:00
Jb Evain 1bf14c018e Fix the moonlight build 2010-09-10 11:22:05 +02:00
Atsushi Eno 9bf818f49a Ongoing WCF discovery configuration implementation. 2010-09-10 17:54:50 +09:00
Atsushi Eno 59de000b20 Avoid holding WebRequest. This should fix part of bug #636500. 2010-09-10 17:51:30 +09:00
Marek Safar 19c25f816c Merge branch 'marek' 2010-09-10 09:25:27 +01:00
Marek Safar 51b55628c9 Try to speep up the GetLocation by a bit. 2010-09-10 09:24:24 +01:00
Carlos Alberto Cortez 06921d30c2 Add a test case for DateTimeOffsetConverter converting to InstanceDescriptor.
* DateTimeOffsetConverterTests.cs: New test for conversions to
	InstanceDescriptor.
2010-09-10 04:55:30 +02:00
Carlos Alberto Cortez c7b2a29c8b Use the DateTimeOffset .ctor that .net uses when converting it to InstanceDescriptor.
* DateTimeOffsetConverter.cs: Use the same DateTimeOffset .ctor
	that .net uses when converting to a InstanceDescriptor.
2010-09-10 04:55:29 +02:00
Jb Evain 2f05148ec7 Add FileStream.Flush(bool) to the moonlight profile 2010-09-10 08:20:48 +02:00
Miguel de Icaza 55d8fccda4 [Fix] Correct fix for the g_shell_parse_argv bug
Simplifies the code a little bit by eliminating the in_quote variable,
but also fixes the rules to follow the requirements from the
"Shell Command Language" specification on the Unix03 site:

http://opengroup.org/onlinepubs/007908775/xcu/chap2.html#tag_001_002

In particular, the interpretation of the backslash inside double quotes
is limited to a handful of characters.   Notice that this differs from
the glib implementation which is not correct either.
2010-09-10 01:00:10 -04:00
Miguel de Icaza 0c7a8bc6a8 [Fix] Allow escape characters inside quoted text, and do not let nested quote reset the quoting state
This should fix #637680
2010-09-09 19:46:25 -04:00
Zoltan Varga 8e0aca7233 Fix x86 trace support after the callconv changes. 2010-09-10 00:37:18 +02:00
Marek Safar d81b893a07 Recover from broken single parameter 2010-09-09 20:14:54 +01:00
Chris Toshok 54e37da2c0 move the call to mono_gc_base_init into mono_debug_init
mono_debug_init is a public embedding interface and calls into
mono_debugger_initialize, which registers a GC root.  driver.c calls
mono_gc_base_init before calling mono_debug_init for this reason, but
that's not an option for embedding (as mono_gc_base_init is internal.)

since mono_gc_base_init is idempotent, just add a call to
mono_debug_init (and remove the driver.c call).  Document (in sgen-gc
and sgen-gc.h) the fact that although mono_gc_base_init is idempotent,
changing LOCK_INIT to something non-idempotent will break this.
2010-09-09 11:53:50 -07:00
Marek Safar 32d7907374 Report precise error about local variable hiding 2010-09-09 19:51:26 +01:00
Marek Safar 53fb1fbdb8 Do all possible mistaken empty statement checks in the parser 2010-09-09 17:41:04 +01:00
Marek Safar 0d51dfbe9e Don't recreate top-level destructor block, it carries precious stuff 2010-09-09 17:12:21 +01:00
Andrew Jorgensen 9fac441697 Various cleanup and addition 2010-09-09 09:59:15 -06:00
Gonzalo Paniagua Javier cfd88a0277 UDP sockets allow connections to Any
UDP sockets that call Connect() to set a default address for datagrams
	sent, can call Connect() again with IPv6Any or Any to 'disconnect'.

	Fixes bug #639098.
2010-09-09 11:48:08 -04:00
Marek Safar 98bc5739ec Try to recover after each wrong statement. 2010-09-09 15:58:13 +01:00
Marek Safar 679db6e456 __arglist can be used as an expression. 2010-09-09 15:00:50 +01:00
Marek Safar 1384869c80 The first push to make flow-analysis work for complex blocks.
All blocks are now strictly hierachical which greatly simplifies many
things and fixes many subtle bugs with local names. Removing the block
cross references helps scalling when compiling deeply nested blocks or
large method bodies including linq. Prepared possible dynamic statements
to work with variable declarators.
2010-09-09 14:01:00 +01:00
Atsushi Eno 8b8025e1d8 It should not fail to generate client proxy generation for having two "IsRequest=false" messages (it is set only in ContractDescriptionGenerator). 2010-09-09 21:51:31 +09:00
Jb Evain 6a121f6a36 add mono-abi-info to gitignore 2010-09-09 10:14:40 +02:00
Jb Evain 427b5a7a2d add ignore file 2010-09-09 10:14:01 +02:00
Jb Evain a24fee31e6 Fix System.Core usage of bootstrap .sources from the normal .sources 2010-09-09 10:13:10 +02:00
Jb Evain b5b728f0a2 Fix System usage of bootstrap .sources from the normal .sources 2010-09-09 10:12:47 +02:00
Jb Evain 571ee32937 Fix corlib usage of bootstrap .sources from the normal .sources 2010-09-09 10:12:29 +02:00
Zoltan Varga 4d63fe4542 Clean the aot log file too. 2010-09-09 05:42:11 +02:00
Zoltan Varga 2f6af2eb14 Avoid freeing the allocated monitors on shutdown, it seems to cause crashes
when running with SGEN, since SGEN writes to those arrays in:

==29095==    at 0x6844E5: add_or_remove_disappearing_link (sgen-gc.c:4143)
==29095==    by 0x6845F8: mono_gc_register_disappearing_link (sgen-gc.c:4167)
==29095==    by 0x67DE35: clear_domain_process_object (sgen-gc.c:1384)
==29095==    by 0x67DEA3: clear_domain_process_major_object_callback (sgen-gc.c:1400)
==29095==    by 0x6DE2DC: major_iterate_objects (sgen-marksweep.c:692)
==29095==    by 0x67E00B: mono_gc_clear_domain (sgen-gc.c:1459)
2010-09-09 01:13:28 +02:00
Jb Evain b2b1e43507 Fix the monodroid and monotouch profile builds 2010-09-08 18:48:36 +02:00
Jb Evain 48bd806f00 Fix the monodroid profile's defines 2010-09-08 18:48:36 +02:00
Jb Evain d0e34f2a14 Factorize the System.Core monotouch and monodroid sources into a mobile.sources 2010-09-08 18:48:35 +02:00
Jb Evain aaa0bc4c2d Factorize the System.Xml monotouch and monodroid sources into a mobile.sources 2010-09-08 18:48:35 +02:00
Jb Evain bd3580ecd8 Factorize the System.Runtime.Serialization monotouch and monodroid sources into a mobile.sources 2010-09-08 18:48:35 +02:00
Jb Evain 3f52624d8f Fix the mobile_System.ServiceModel.Web include 2010-09-08 18:48:35 +02:00
Jb Evain 06a360ed49 Fix the mobile_System.Data include 2010-09-08 18:48:34 +02:00
Jb Evain 53a48d5966 Factorize the System.Web.Services monotouch and monodroid sources into a mobile.sources 2010-09-08 18:48:34 +02:00
Jb Evain db99fdfa94 Factorize the System.Data monotouch and monodroid sources into a mobile.sources 2010-09-08 18:48:34 +02:00
Jb Evain 704d43d176 Factorize the System.ServiceModel.Web monotouch and monodroid sources into a mobile.sources 2010-09-08 18:48:33 +02:00
Jb Evain ec4dc684f1 Factorize the System.ServiceModel monotouch and monodroid sources into a mobile.sources 2010-09-08 18:48:33 +02:00
Jb Evain acb6984c61 Factorize the monotouch and monodroid sources into a mobile.sources 2010-09-08 18:48:33 +02:00
Jb Evain 3dc0642ef5 Enable the mcs monodroid build from mono's configure 2010-09-08 18:48:33 +02:00
Jb Evain cd6a8e3028 Orchestrate the monodroid build bootstrap 2010-09-08 18:48:32 +02:00
Jb Evain 2d49410bb1 Factorize the monotouch build into a mobile build for monodroid and monotouch 2010-09-08 18:48:32 +02:00
Jb Evain a2a1a0ffeb Enable the Mono.Data.Sqlite build for monodroid 2010-09-08 18:48:32 +02:00
Jb Evain bd1a50d903 Enable the Mono.Security build for monodroid 2010-09-08 18:48:31 +02:00
Jb Evain 25a5844dff Enable the System.Transactions build for monodroid 2010-09-08 18:48:31 +02:00
Jb Evain 45a8df4b7b Make HttpUtility compilable on MonoDroid as well as MonoTouch 2010-09-08 18:48:31 +02:00
Jb Evain 4f87b29b20 Enable the System.Runtime.Serialization build for monodroid 2010-09-08 18:48:31 +02:00
Jb Evain df235555ea Enable the System.ServiceModel.Web build for monodroid 2010-09-08 18:48:30 +02:00
Jb Evain ab2774a74c Enable the System.ServiceModel build for monodroid 2010-09-08 18:48:30 +02:00
Jb Evain 41f67f6409 Enable the System.Web.Services build for monodroid 2010-09-08 18:48:30 +02:00
Jb Evain 432d531126 Enable the System.Data build for monodroid 2010-09-08 18:48:29 +02:00
Jb Evain 0253e041a7 Enable the System.Xml build for monodroid 2010-09-08 18:48:29 +02:00
Jb Evain 804b3d42d0 Enable the System.Core build for monodroid 2010-09-08 18:48:28 +02:00
Jb Evain 9cb87907d7 Enable the System build for monodroid 2010-09-08 18:48:28 +02:00
Jb Evain a207498c05 Enable the corlib build for monodroid 2010-09-08 18:48:28 +02:00
Jb Evain 06030bfc20 Define MOBILE for the monotouch build as a shared symbol between MonoTouch and MonoDroid 2010-09-08 18:48:28 +02:00
Jb Evain 0ce3927964 Add the monodroid profile 2010-09-08 18:48:27 +02:00
Jb Evain 256bbe90bf Remove no-op code 2010-09-08 18:48:27 +02:00
Jb Evain b49cfe438a Simplify ifdefs specifics to MOONLIGHT 2010-09-08 18:48:27 +02:00
Jonathan Pryor b9e2cdf84c [mdoc-update] Delegate types should get <returns/>, not <value/>.
Oops, that's a long-standing bug...  Found by Joel Marcey from ECMA.
2010-09-08 08:21:54 -04:00
Gonzalo Paniagua Javier f70b5e18f9 Add tests for g_strdupv
Add test for g_strdupv and check for NULL in g_strdupv.
2010-09-07 18:30:53 -04:00
Zoltan Varga dcf27c2572 Add a few more remaps. 2010-09-07 23:42:57 +02:00
Zoltan Varga 4522b4f11b Remap g_strdupv too. 2010-09-07 23:26:56 +02:00
Marek Habersack 8fd3e7fae6 [asp.net] Fix for bug #636709. ClientID must be reset when ID is assigned. 2010-09-07 23:20:28 +02:00
Marek Habersack b7643fc22d [asp.net] Fix for bug #636475. A typo caused ads not to be matched in ChooseAd
The second loop over the ads hashtable must not reject an app if the keyword filter is empty.
2010-09-07 22:09:48 +02:00
Gonzalo Paniagua Javier dcdf9083e1 Add wsdl help generator to the 4.0 files
Ditto.

	Fixes bug #636841.
2010-09-07 14:20:31 -04:00
Miguel de Icaza 1fdf1789e0 Add profile docs 2010-09-07 11:07:58 -04:00
Jonathan Pobst 92f60fbffa Merge branch 'master' of github.com:mono/mono 2010-09-06 21:59:48 -05:00
Jonathan Pobst 59717d2292 Normalize line endings. 2010-09-06 21:59:26 -05:00
Carlos Alberto Cortez f2c30f6de9 Add DateTimeOffsetConverter.cs and DateTimeOffsetConverterTests.cs to our build.
* System.dll.sources: Add DateTimeOffsetConverter.cs.
	* System_test.dll.sources: Add DateTimeOffsetConverterTests.cs.
2010-09-07 04:48:40 +02:00
Carlos Alberto Cortez 9fdb1b7f73 Add new DateTimeOffsetConverterTests.cs test file.
* DateTimeOffsetConverterTests.cs: New file.
2010-09-07 04:48:40 +02:00
Carlos Alberto Cortez f14136e50f Implement System.ComponentModel.DateTimeOffsetConverter.
* DateTimeOffsetConverter.cs: Implement new 4.0 class.
2010-09-07 04:48:39 +02:00
Atsushi Eno 3a7d8b3a72 Avoid crash for use of deprecated InstallTrackingHandler in Snow Leopard. 2010-09-07 12:25:14 +09:00
Rodrigo Kumpera 224ad766ef Fix build.
* bug-348522.2.cs: gmcs now complains about a thinko here.
2010-09-06 18:16:32 -03:00
Rodrigo Kumpera 78d5597e11 Fix 64bits builds.
* sgen-cardtable.h (sgen_card_table_get_card_address): This
	needs marking under SGEN_HAVE_OVERLAPPING_CARDS too.
2010-09-06 18:16:32 -03:00
Rodrigo Kumpera e73810916c Check for a parent extending a generic instantiation of the child.
* class.c (mono_class_create_from_typedef): If if any parent
	doesn't extend the generic instantiation.

	Fixes #604270
2010-09-06 18:16:31 -03:00
Jonathan Pryor 768588fb43 [mdoc-update] Clean up System.Object craziness in ILAsm generation.
The problem: ILAsm has 'object' as a keyword alias for System.Object, and
99.99% of the time should use 'object'...except in 'extends' declarations,
where it remains System.Object and not 'object'.

The solution: Have an ILFullMemberFormatter.WithinExtends "flag" which
controls whether we generate System.Object or object.

The problem: this is flaky as hell, and results 'class A:List<object>'
generating:

	.class public auto ansi beforefieldinit MyList
	extends System.Collections.Generic.List`1<System.Object>

This is wrong, as it should be List`1<object>, not List`1<System.Object>.
(At least, monodis(1) produces List`1<object>...)

So, instead of the craziness that is WithinExtends, just check check for
System.Object as the base type immediately after the 'extends' generation.  If
it's System.Object, keep it, otherwise call full.GetName() (and remove the
leading "class " that's generated from GetName).
2010-09-06 16:19:26 -04:00
Rodrigo Kumpera 7c3cf50014 Add regression test for #633248 2010-09-06 15:41:15 -03:00
Rodrigo Kumpera 5f11e71627 Properly handle stack merges of leave.
* verify.c (do_leave): Set the target of leave.

	* verify.c (mono_method_verify): Merge the resulting empty
	stack of a leave instruction with it's target.

	Fixes #633248
2010-09-06 14:58:08 -03:00
Atsushi Eno ecd96c968a Fix NetworkInterface marshaling size on OSX and avoid crash. 2010-09-06 16:29:26 +09:00
Zoltan Varga 2ee94eab15 Fix the build. 2010-09-05 20:29:01 +02:00
Carlos Alberto Cortez 39cd458ad6 New test for CultureInfoConverter.GetCultureName.
* CultureInfoConverterTest.cs: New test for GetCultureName.
2010-09-05 05:53:24 +02:00
Carlos Alberto Cortez 59b6afce3c Implement CultureInfoConverter.GetCultureName.
* CultureInfoConverter.cs: Implement GetCultureName.
2010-09-05 05:53:24 +02:00
Carlos Alberto Cortez 9c69bf0aa1 Remove the NET_2_0 directives from CultureInfoConverter.cs
* CultureInfoConverter.cs: Remove the NET_2_0 directive.
2010-09-05 05:53:23 +02:00
Carlos Alberto Cortez a9897bfc49 Add AttributeCollectionTest.cs to System_test.dll.sources.
* System_test.dll.sources: Add AttributeCollectionTest.cs.
2010-09-05 05:53:23 +02:00
Carlos Alberto Cortez ea47a54561 Add new AttributeCollectionTest file.
* AttributeCollectionTest.cs: New test file.
2010-09-05 05:53:23 +02:00
Carlos Alberto Cortez a600dc6c0a Add 4.0 Attributes property and protected ctor to AttributeCollection.
* AttributeCollection.cs: Add 4.0 Attributes property as well
	as a new parameterless ctor.
2010-09-05 05:53:23 +02:00
Carlos Alberto Cortez 3b072eb567 Remove the NET_2_0 directives from AttributeCollection.cs.
* AttributeCollection.cs: Remove the NET_2_0 directives, as well
	as the else case for it (we are always NET_2_0 now).
2010-09-05 05:53:23 +02:00
Rodrigo Kumpera ddf6f6d9af Merge branch 'sgen_cardtable_optimization_work' 2010-09-04 17:33:39 -03:00
Rodrigo Kumpera 8d3625a3a6 Fix a race condition in barriers using cardtable.
* sgen-gc.c: Introduce dummy_use function that forces
	the compiler to keep a given value alive until the call
	to it.

	* sgen-gc.c (mono_gc_wbarrier_set_field): Use dummy_use to
	avoid race condition between the store and the barrier.

	* sgen-gc.c (mono_gc_wbarrier_set_arrayref): Ditto.

	* sgen-gc.c (mono_gc_wbarrier_arrayref_copy): Ditto.

	* sgen-gc.c (mono_gc_wbarrier_arrayref_copy): Ditto.

	* sgen-gc.c (mono_gc_wbarrier_generic_store): Ditto.

	This pattern of usage is the same we do with managed code
	write barrier. The race condition is extremely race and
	requires the thread to be interrupted in between the store
	and the barrier, which is a very tiny narrow window.
2010-09-04 17:30:45 -03:00
Rodrigo Kumpera 6830982e46 Optimize cardtable unmanaged array copy.
* sgen-gc.c (mono_gc_wbarrier_arrayref_copy): Avoid locking
	if using cardtables. Even thou the new code looks slower
	than a plain memmove, it has the advantage of not taking
	locks, which means it's much more scalable.

	Array copy under sgen/cardtables was 1.6x slower than with
	boehm. With this patch it reduces to 1.54x. The serial
	performance speedup is nice, but it is much more helpfull
	in multi-threaded workloads.
2010-09-04 17:30:45 -03:00
Rodrigo Kumpera a1457334c9 Fix a warning 2010-09-04 17:30:45 -03:00
Rodrigo Kumpera 6bff775ab3 Optimize the cardtable path a bit more.
* sgen-gc.c: Avoid taking locks for single pointer barriers.
2010-09-04 17:30:45 -03:00
Rodrigo Kumpera f78711ab87 Optimize major cardtable scanning by about 15%.
* sgen-cardtable.c: Move a bunch of stuff to new header.

	* sgen-cardtable.h: New header with functions meant to
	be inlined.

	* sgen-gc.c: Use new header.

	* sgen-marksweep.c (major_scan_card_table): Introduce fast
	version of some macros that avoid a few indirections.
2010-09-04 17:30:44 -03:00
Rodrigo Kumpera 60ce316b34 Better cardtable stats gathering codebase. 2010-09-04 17:30:44 -03:00
Rodrigo Kumpera 21153e5e10 Add notes when to use cardtable and remset. 2010-09-04 17:30:44 -03:00
Rodrigo Kumpera 37da7a177a Use los scanning function for big objects on major heap.
* sgen-cardtable.c (sgen_cardtable_scan_object): The
	source of the cardtable can now be supplied, this is needed
	since major blocks can't use regular card checking code here.

	* sgen-los.c (los_scan_card_table): Adjust to signature
	change in sgen_cardtable_scan_object.

	* sgen-marksweep.c (major_scan_card_table): If the block
	size is larger than a card it makes more sense to loop
	around objects and not cards since objects might be scanned
	twice since a card can be shared between two of them.

	In such case the cards of a block must be copied to a side
	buffer since we are no longer looping one by one. This ia
	a problem when two objects share a marked card as the first
	can cause it to be left cleared and not have the second one
	scanned.

	Another advantage of this patch is that it enables partial
	scanning of larger array in the major heap.
2010-09-04 17:30:44 -03:00
Rodrigo Kumpera 1d4a9f72df Move core of los scanning into cardtable codebase.
* sgen-los.c (los_scan_card_table): Move meat of
	this function into a separate one.

	* sgen-cardtable.c: New function sgen_cardtable_scan_object.

	* sgen-gc.h: Add sgen_cardtable_scan_object.
2010-09-04 17:30:43 -03:00
Rodrigo Kumpera 926f446479 Micro optimize cardtable scanning
* sgen-marksweep.c (major_scan_card_table): Don't load
	some fields if the block has no references.
2010-09-04 17:30:43 -03:00
Rodrigo Kumpera 7b3c9df864 Add stats for cardtable processing time 2010-09-04 17:30:43 -03:00
Gonzalo Paniagua Javier 25681a9374 Fix return value of items_read
items_read was not being initialized and it was not being set in the
	fast common case of g_utf8_to_utf16().
2010-09-04 14:24:54 -04:00
Gonzalo Paniagua Javier a40645b6af Fixed GetLogicalDriveString
When calling GetLogicalDriveString, icall.c was passing the
	length in the wrong units.

	GetLogicalDriveString now translates any octal sequence found
	into its corresponding byte. Use the UTF16 length
	('items_written') instead of the UTF8 input string length
	('items_read') when computing the total size.
2010-09-04 14:02:17 -04:00
Jonathan Pryor 64091c3d00 [mdoc-update] Properly map System.IntPtr to 'native int' for ILAsm.
Similarly, System.UIntPtr maps to 'native unsigned int'.
2010-09-04 12:57:42 -04:00
Jonathan Pryor ea3a42ff30 [mdoc-update] Add support ILAsm language output. 2010-09-03 22:03:33 -04:00
Jonathan Pryor f39388d78d [mdoc-update] Add support for multiple languages in type/member signatures.
We're planning on adding IL signature support for <TypeSignature/> and
<MemberSignature/>, so having arrays of MemberFormatters instead of having
single instances of them will make supporting IL output easier.
2010-09-03 22:03:32 -04:00
Gonzalo Paniagua Javier 46bd5cc8b4 Use UTF8 instead of ASCII when reading mount info
This allows for mount points with UTF8 characters in them.
2010-09-03 17:27:08 -04:00
Gonzalo Paniagua Javier cdf1247873 Linux /proc/mounts might have escaped characters
Translate escaped characters in mount paths.

	Fixes bug #637078.
2010-09-03 16:01:42 -04:00
Gonzalo Paniagua Javier ecb03f01e1 Allow ordinal entry points in windows.
Windows allows entry point names like "#10" which refer to the Nth
	function (n > 1 and less than the highest ordinal value in the .def
	file).

	Fixes bug #636966.
2010-09-03 14:58:50 -04:00
Zoltan Varga 87531b4eb2 Fix a crash when the signature of the Main method could not be loaded. Fixes #636794. 2010-09-03 19:18:25 +02:00
Atsushi Eno 24ec8bb6e3 Ongoing Discovery duplex (UDP) implementation (not working yet). 2010-09-03 18:45:15 +09:00
Jb Evain 5e32d42531 Remove workaround for moonlight now that System.dll's WebExceptionStatus is properly compiled 2010-09-03 11:31:17 +02:00
Jb Evain 89691c3243 Fix the visiblity of WebExceptionStatus for moonlight in the same way as WebException 2010-09-03 11:31:17 +02:00
Atsushi Eno 9adb6a368d Fix another non-null RemoteAddress dependency. 2010-09-03 16:18:59 +09:00
Atsushi Eno 3905366d74 Add some argument check. RemoteAddress could be null for callback client runtime channel. 2010-09-03 15:14:32 +09:00
Carlos Alberto Cortez 000bfb7c67 [fix] #512136: Invalidate the selection border in ListBox when scrolling.
* ListBox.cs: Invalidate the selection border when horizontally
	scrolling - the call to ScrollWindow is not enough, so we need
	to update by ourselves the new margin of the selection border by
	a quite small offset.
	Fixes #512136.
2010-09-03 01:50:22 +02:00
Carlos Alberto Cortez 8a9f3a108d [fix] #581287: Use menu color to paint the background of NotifyIcon.
* NotifyIcon.cs: Use SystemColors.Menu to paint the background
	of the control, since at least in gnome the menu and the panel
	share the back color (unfortunately we can't just leave the rectangle
	transparent, as some window managers use a default white).
	Fixes #581287.
2010-09-03 01:50:21 +02:00
Tom Hindle 364cfd0502 [fix] #624915: Check the valid range of the value of the vertical scroll in TreeView.
* TreeView.cs: Create a new method to check that the new valid
	for the vertical scroll is in the valid range - this is
	specially important when the size of the TreeView can show less
	than one element.
	Fixes #624915.
2010-09-03 01:50:21 +02:00
Atsushi Eno a5442470a2 Cosmetic exception type change and suppress test failures. 2010-09-03 10:12:13 +09:00
Jonathan Pryor 4ea7003915 [mdoc-update-ecma-xml] Assembly [CLSCompliant] shouldn't replace Type version.
If a type has e.g. [CLSCompliant(false)], then the Assembly's
[CLSCompliant(true)] shouldn't replace it.
2010-09-02 18:27:15 -04:00
Jonathan Pryor fe28f4ceef [mdoc-export-ecma-xml] Generate [CLSCompliant] attribute on types.
If the assembly has [CLSCompliant], then "forward" that to the type.
2010-09-02 18:27:14 -04:00
Jonathan Pryor 51d8575e72 [mdoc-update] Generate an index.xml file when --type is used.
(Yet another "Let's help ECMA!" fix...)

For performance reasons, I want to use this workflow:

	mdoc x-msitomsx -o slashdocs msidocs --type=A
	mdoc update -o docs -i slashdocs/mscorlib.xml mscorlib.dll --type=A
	mdoc update-ecma-xml -o CLILibraryTypes.xml --type=A

That is, have a consistent set of --type=TYPEs that are passed between the
three apps.  I want to do this because otherwise 'mdoc update' takes
12 minutes to process the assemblies I need; with this approach, it takes
12 seconds.

Unfortunately, 'mdoc update-ecma-xml' needs an index.xml so it can obtain
assembly-level custom attributes, and 'mdoc update --type...' wasn't creating
an index.xml file.

Doh!

Fix: IFF docs/index.xml is NOT present, create a docs/index.xml file which
contains ONLY the types & namespaces that were encountered.

If docs/index.xml IS present, it's unchanged.

This fix allows the above workflow to Just Work, while maintaining the other
"I know this type has been updated, let's not process the entire assembly"
workflow that --type allows.
2010-09-02 18:27:14 -04:00
Jonathan Pryor d1e12be746 [mdoc-update] Add -fignore-missing-types option.
This prevents an error if you specify a --type=TYPE and TYPE wasn't found
within the assembly you're updating.

I'm adding this so that I can have a single unified types.response file for
all types we're adding for ECMA (which contains types from several assemblies)
without getting an error when running 'mdoc update' against the source
assemblies.
2010-09-02 18:27:14 -04:00
Jonathan Pryor 49311d49fb [mdoc-update] Add --help text for --exceptions=added. 2010-09-02 18:27:13 -04:00
Jonathan Pryor d9eece9b5b [mdoc-x-msitomsx] Ignore <platformNotes/>, <sections/>, etc.
With this, we convert the mscorlib types that we care about w/o validation
errors.  Hurrah!
2010-09-02 18:27:13 -04:00
Jonathan Pryor 2bf7dabcea [mdoc-x-msitomsx] Support legacy and external links.
<externalLink/> is mapped to an HTML <a/> (and thus a
<format type="text/html"/> wrapper), while <legacyLink/> is just italicized.
2010-09-02 18:27:11 -04:00
Jonathan Pryor a691f85775 Fix <embeddedLabel/>, add <i/> as a valid <para/> child.
<embeddedLabel/> was skipping the content, resulting in <i>:</i>.  Oops.

And since <embeddedLabel/> generates <i/>, validation was failing within
<para/>, so add it.
2010-09-02 18:27:11 -04:00
Jonathan Pryor 17970c9ce4 [mdoc-x-msitomsx] Additional <token/> replacement values. 2010-09-02 18:27:11 -04:00
Jonathan Pryor 834097329c [mdoc-x-msitomsx] Support <embeddedLabel/>, additional <token/> values. 2010-09-02 18:27:10 -04:00
Jonathan Pryor 151a1e40ca [mdoc-x-msitomsx] Convert <notesForInheritors/> elements into <block/>s. 2010-09-02 18:27:10 -04:00
Jonathan Pryor 496a5503fb [mdoc-x-msitomsx] Improve <example/> generation so it validates.
We were getting a <description/> element which should be skipped.
2010-09-02 18:27:10 -04:00
Jonathan Pryor 0af725fe76 Place ignored elements together for consistency. 2010-09-02 18:27:08 -04:00
Jonathan Pryor 672de41476 [mdoc-x-msitomsx] Ignore <internalOnly/>. 2010-09-02 18:27:08 -04:00
Jonathan Pryor 382b69b281 [mdoc] Generate <threadsafe/> from <threadSafety/>.
We also need to update monodoc-ecma.xsd so that multiple <para/>s are valid
within <threadsafe/>; otherwise, we report validation errors on the
'mdoc x-msitomsx' output.
2010-09-02 18:27:08 -04:00
Jonathan Pryor e225e5e0e3 [mdoc-x-msitomsx] Add support for converting <list/>s. 2010-09-02 18:27:07 -04:00
Jonathan Pryor 426585a2a3 [mdoc-x-msitomsx] Import <notesForImplementers/> and <notesForCallers/>.
In the original XML, these are sibling elements to <remarks/>, but they need
to be imported as children of <remarks/> as <block/> is the closest matching
element, and <block/> is a child of <remarks/>.
2010-09-02 18:27:07 -04:00
Jonathan Pryor cd7101c438 [mdoc-x-msitomsx] Ignore <clsCompliantAlternative/> elements. 2010-09-02 18:27:06 -04:00
Jonathan Pryor d1e78d8c67 [mdoc-x-msitomsx] Replace <token/> with literal text. 2010-09-02 18:27:06 -04:00
Jonathan Pryor 75453711dc [mdoc-x-msitomsx] Mutate <permission/> elements. 2010-09-02 18:27:05 -04:00
Jonathan Pryor 32429153d6 [mdoc-x-msitomsx] Generate <block/> from <alert/>. 2010-09-02 18:27:05 -04:00
Jonathan Pryor 0f8d82d41f [mdoc-x-msitomsx] Generate <typeparam/> from <genericParameters/>. 2010-09-02 18:27:05 -04:00
Jonathan Pryor 998afc69c7 Make sure that Resources/msitomsx.xsl is distributed. 2010-09-02 18:27:04 -04:00
Jonathan Pryor 4e4d793c59 [mdoc-validate] Add support for validating 'csc /doc' XML.
This will help in determining which elements I'm not converting within
'mdoc x-msitomsx'.
2010-09-02 18:27:04 -04:00
Jonathan Pryor de25ba54d4 [mdoc-x-msitomsx] Ignore <changeHistory/>, <relatedTopics/>. 2010-09-02 18:27:03 -04:00
Jonathan Pryor a3e3360ae0 [mdoc-x-msitomsx] Map <codeInline/> to <c/>, <codeReference/> to <code/>. 2010-09-02 18:27:03 -04:00
Jonathan Pryor d063905058 [mdoc-x-msitomsx] Generate <seealso/> from <equivalentCodeEntity/>. 2010-09-02 18:27:03 -04:00
Jonathan Pryor 2500f6d343 [mdoc-x-msitomsx] Add <table/> conversion support. 2010-09-02 18:27:02 -04:00
Jonathan Pryor b835ae0dad [mdoc-x-msitomsx] Generate a /doc/assembly/name attribute.
This is so our generated XML files more closely match 'csc /doc' format.
2010-09-02 18:27:02 -04:00
Jonathan Pryor 5dd9d52ef3 [mdoc-update] Add --library=VALUE option.
This is so that we can share response files between 'mdoc x-msitomsx',
'mdoc update', and 'mdoc update-ecma-xml', thus ensuring that only
the types we care about are imported and processed.
2010-09-02 18:27:00 -04:00
Jonathan Pryor e5342b866a [mdoc-x-msitomsx] Flush --help documentation. 2010-09-02 18:26:59 -04:00
Jonathan Pryor 59e6e461df [mdoc] Add "internal" 'mdoc x-msitomsx' command.
The 'mdoc x-msitomsx' command converts a Microsoft internal XML dialect into
Microsoft XML Documentation format (e.g. what 'mdoc export-msxdoc' generates).

The 'mdoc x-msitomsx' command is internal, i.e. 'mdoc help' won't list it,
as this format is completely internal to Microsoft (and likely subject to
change without notice); this command only exists to help facilitate the ECMA
standardization process, converting Microsoft's existing (internal)
documentation into a format usable by the ECMA committee.
2010-09-02 18:26:59 -04:00
Jonathan Pryor ef782c2adb [mdoc-update] Refactor out Microsoft XML Documentation import.
Another side effect of having the DocumentationImporter abstraction is that
we're no longer limited to importing from either ECMA XML, Microsoft XML, or
both; we can now import from arbitrarily many Microsoft XML sources.

(Arbitrarily many ECMA XML sources likely won't work, at present, since the
ECMA XML file controls type + member enumeration, but I don't think this will
be needed any time soon...)
2010-09-02 18:26:58 -04:00
Jonathan Pryor 90a8e96476 [mdoc-update] Refactor out ECMA XML import into EcmaDocumentationImporter.
Victory for less spaghetti code...
2010-09-02 18:26:58 -04:00
Gonzalo Paniagua Javier d6a8c61a19 Return IPv6 addresses
We were not returning IPv6 addresses if there was no IPv6 configured
	interface. Now we will return those addresses if ipv6 is enabled by
	configuration.

	Fixes bug #636517.
2010-09-02 17:26:18 -04:00
Sebastien Pouliot dc669b3572 Ensure OnUploadProgressChanged is called on the right thread
* mcs/class/System.Net/System.Net/WebClient_2_1.cs: Use sync_context to
post the call to OnUploadProgressChanged
2010-09-02 16:18:40 -04:00
Rodrigo Kumpera 60b795f713 During inlining, verify the method before producing locals.
* method-to-ir.c (inline_method): We verify the inlined method
	before variables are created for locals since this can assert.
	Some check on locals are only done by the IL verifier so it's
	not enough to just check if the header decoded fine.

	* mini.c (mini_method_verify): Add parameter telling if we
	should fail the compile or not.

	* mini.c (mono_compile_is_broken): Pass the method explicitly
	as it now can be diferent than cfg->method.

	* mini.h: Export mono_compile_is_broken instead of
	mini_method_verify.

	Fixes #560200
2010-09-02 15:32:16 -03:00
Rodrigo Kumpera 9d4a7883fd Verify locals when checking a method header.
* metadata-verify.c (mono_verifier_verify_method_header): If
	the header has a locals token, verify the corresponding row
	in the standalonesig table.
2010-09-02 15:32:16 -03:00
Atsushi Eno e97fb3666b Repeat UDP message sending, and do not process duplicate messages received. Makes UDP transmit robust. 2010-09-03 01:48:27 +09:00
Sebastien Pouliot 56a925b467 Do not set the exception to NotSupportedException for denied headers
* mcs/class/System.Net/System.Net.Policy/ClientAccessPolicy.cs: Do not
throw a NotSupportedException here since it regress some DRT (like 656).
The (hopefully) correct fix (for DRT3001) will be committed inside moon
2010-09-02 11:13:38 -04:00
Jb Evain 85c0976c3d [Fix] fix regression in Delegate.CreateDelegate
2ec0ab59fe caused a regression in
Create.Delegate where the overload which doesn't take a firstArgument
could be used to create closed over null delegates while this
overload doesn't allow it.
2010-09-02 15:59:58 +02:00
Jb Evain 591252c45b Add a test for the regression to Delegate.CreateDelegate triggered by 2ec0ab59fe 2010-09-02 15:58:20 +02:00
Atsushi Eno 65e5d6381c moonlight build workaround: smcs somehow rejects to compile this code. 2010-09-02 21:53:09 +09:00
Zoltan Varga 195519fcb9 Add some comments about the current state of the precise stack scanning code. 2010-09-02 14:06:39 +02:00
Jérémie Laval 840fed03fc [Plinq] Force strict parallelism in all PLinq unit tests 2010-09-02 11:11:50 +01:00
Jérémie Laval b83e58a461 [PLinq] Check ExecutionMode before executing sequentially 2010-09-02 11:11:26 +01:00
Jérémie Laval 19950d68d1 [PLinq] Add automatic sequential processing of query 2010-09-02 10:35:45 +01:00
Jérémie Laval f724808a29 [PLinq] Add the plumbery for checking source data size when possible and setting ShouldBeSequential appropriately 2010-09-02 10:35:45 +01:00
Jérémie Laval eae326c71c [PLinq] Sanitize QueryOptions to use property everywhere and add ShouldBeSequential option. 2010-09-02 10:35:45 +01:00
Jérémie Laval 4dfbfdc566 Revert "[PLinq] Honor WithDegreeOfParallelism if present"
This reverts commit 59260b1df7.

The degree of parallelism value was actually already registered somewhere else.
2010-09-02 10:35:45 +01:00
Atsushi Eno 270ab972e8 Close AnnouncementService in the test cases. Assert that relevant ports become available. 2010-09-02 18:24:51 +09:00
Atsushi Eno 271213c255 Throw EndpointNotFoundException when it cannot connect to the remote server. 2010-09-02 12:04:29 +09:00
Zoltan Varga ca900084e3 Enable system aot by default only on x86/amd64 linux. 2010-09-02 00:43:20 +02:00
Gonzalo Paniagua Javier 8823d1c040 Remove Content-Length header when not needed
If we are redirecting to a GET from a POST, the Content-Length header
	might have stale data and it will be sent. Some servers, instead of
	ignoring it, keep waiting for the data to be sent (for a GET!).

	Fixes bug #636219.
2010-09-01 17:57:55 -04:00
Ankit Jain 95b4fc30c6 [xbuild] Update man page to add "/tv:" option.
Add option to specify toolsversion from the command line,
to the man page.
2010-09-02 02:49:44 +05:30
Gonzalo Paniagua Javier 4e9d28b405 Add missing DT format
The datetime format having a numeric timezone after the milliseconds
	was missing.
	Fixes bug #479061.
2010-09-01 16:31:11 -04:00
Gonzalo Paniagua Javier f832b99535 Avoid sending data in the challenge phase of NTLM
If there's a POST/PUT request that gets a NTLM 401, we save the data
	and don't send it again until after the challenge phase. Ie, instead of
	sending all the data 3 times, we only send it at most twice.
2010-09-01 15:52:09 -04:00
Gonzalo Paniagua Javier 1b439c7286 Use the request itself as the key for the cache.
We were usign teh URL, but that might not be unique among several
	requests that need to be authenticated using NTLM. This led to
	different requests sharing the same authentication session which fails
	miserably.

	Bug #631315 fixed.
2010-09-01 15:52:09 -04:00
Ankit Jain 265900fd17 [xbuild] Unsubscribe events on ConsoleLogger.Shutdown ()
Reported by Lluis Sanchez.
2010-09-02 00:01:52 +05:30
Geoff Norton 5f090dd06e Fix build of mono-basic on ppc64
OP_BREAK can take up to 40 bytes on ppc64
2010-09-01 14:09:38 -04:00
Atsushi Eno 7542c0442b Fill Duration value. Got managed mode use case working. 2010-09-02 02:22:04 +09:00
Atsushi Eno 4e30498f34 Fix parameter order for TempAsyncResult. 2010-09-02 02:21:00 +09:00
Jb Evain 45e56c76c3 Add NotWorking test for bugs #635349 and #605936 2010-09-01 18:27:50 +02:00
Jonathan Pryor 28fe6a934a [mdoc-update] Only check for duplicate elements, not duplicate nodes.
The duplicate-element checking algorithm wasn't restricted to just elements;
consequently, an 'invalid token' exception was generated from XPath because we
were trying to call XmlNode.SelectNodes("#text"), and '#' isn't valid.  Oops.

Fixes building gendarme from mono-tools.
2010-09-01 11:07:31 -04:00
Jonathan Pryor 0d48c3ea1d [mdoc-update] Refactor type+member traversal algorithm.
ECMA wants to import some Microsoft documentation for use in the next version
of the ECMA standard (hence mdoc-update-ecma-xml).

Unfortunately, Microsoft doesn't use the Microsoft XML Documentation format
for their internal class library documentation.  They use some other XML
dialect (which looks similar yet different from "msxdoc").

So to make life easier for ECMA, mdoc-update of needs to support yet another
import format.  Yay?

Unfortunately:

  - The current import logic uses no abstractions; we have "separate" code
    paths when importing msxdoc's vs. ECMA docs.  We need a sane abstraction
    if we're going to add a third import format.

  - Additionally, the ECMA doc import logic is a mass of spaghetti code, as
    ECMA import also controls type+member enumeration order.

Start trying to bring some sanity to this by adding a DocumentationEnumerator
abstraction so that some of the XmlReader maintenance for importing/processing
ECMA documentation can be split out.
2010-09-01 11:07:31 -04:00
Atsushi Eno af4d3c847d Couple of fixes in FindCriteria and relevant contract types for Find operation. 2010-09-02 00:03:24 +09:00
Atsushi Eno ecd1386cf1 Add another roundtrip case. 2010-09-02 00:01:00 +09:00
Atsushi Eno 9fb2421ccf Use CollectionDataContractAttribute.ItemName for collection item serialization. 2010-09-01 23:59:50 +09:00
Atsushi Eno 140dd51ff4 Allow empty element in ReadElementContent*() e.g. for empty list. 2010-09-01 23:56:57 +09:00
Jb Evain 23b15a3d27 Fix the NET_2_1 build of System.Json 2010-09-01 15:58:39 +02:00
Jb Evain 469f62a378 Fix the System.Core build for the monotouch profile 2010-09-01 15:58:39 +02:00
Jb Evain d779566b1e Fix the monotouch build 2010-09-01 15:58:39 +02:00
Jérémie Laval 5c52755ffd Allow recursive Write + n * Read lock pattern for ReaderWriterLockSlim and add corresponding unit test 2010-09-01 14:26:42 +01:00
Jérémie Laval 68d6de4134 Check Recursive counts for ReaderWriterLockSlim in unit tests 2010-09-01 13:58:58 +01:00
Jérémie Laval c70d5fff59 Generalize ThreadLockState to include recursive count informations and update them accordingly in the different Enter/Exit methods 2010-09-01 13:56:11 +01:00
Jérémie Laval 59260b1df7 [PLinq] Honor WithDegreeOfParallelism if present 2010-09-01 12:05:00 +01:00
Jérémie Laval ac4bd81b23 Change the key of the inner dictionary to an int id instead of the instance itself
It prevents object references to the rwlslim to be kept and thus not GC'ed
2010-09-01 11:10:09 +01:00
Jérémie Laval 3f65781d83 Split ReaderWriterLockSlim helper classes into their own files 2010-09-01 11:10:09 +01:00
Atsushi Eno bdbef85d50 Add a bunch of missing configuration members etc. based on corcompare results. 2010-09-01 18:55:11 +09:00
Atsushi Eno 09a52387d8 Add IdentityElement implementation and some supplemental extension methods for discovery. 2010-09-01 18:53:46 +09:00
Marek Safar b3ac12b635 Add ctor block to field initializers to avoid member lookup at wrong block 2010-09-01 10:34:12 +01:00
Gonzalo Paniagua Javier bda0eeb5ca Handle WAIT_IO_TIMEOUT in WaitAny call
WaitForMultipleObjectsEx might return WAIT_IO_COMPLETION if an APC is queued.
	Fixes bug #549807.
2010-08-31 19:59:27 -04:00
4849 changed files with 254197 additions and 165487 deletions

No files matched your search

+2
View File
@@ -6,6 +6,7 @@ configure.in crlf=input
*.h crlf
*.cs crlf
*.sh crlf
*.il crlf
.gitattributes crlf
ChangeLog crlf
@@ -16,6 +17,7 @@ ChangeLog crlf
*.bat -crlf
*.sln -crlf
*.*proj* -crlf
*.xml -crlf
# CRLF Handling
# -------------
+1
View File
@@ -35,3 +35,4 @@
/ltsugar.m4
/lt~obsolete.m4
/ltversion.m4
*~
-3093
View File
File diff suppressed because it is too large. Load diff
+7 -1
View File
@@ -11,7 +11,13 @@ The Boehm licensing information is in the libgc directory
The SGen Garbage Collector is under the terms of the MIT X11
license
The class libraries under mono/mcs are unless otherwise stated
under the MIT X11 license.
Open source Microsoft code is licensed under the original terms
which is either MS-PL for older components, or dual licensed
MS-PL/Apache2 licensed.
GNU LIBRARY GENERAL PUBLIC LICENSE
Version 2, June 1991
+7
View File
@@ -98,6 +98,13 @@ For comments, corrections and updates, please contact [email protected]
ICSharpCode.SharpZipLib, GPL with exceptions.
See: mcs/class/ICSharpCode.SharpZipLib/README
** mcs/class/System.Core/System/TimeZoneInfo.Android.cs
This is a port of Apache 2.0-licensed Android code, and thus is
licensed under the Apache 2.0 license:
http://www.apache.org/licenses/LICENSE-2.0
** mcs/tools
+32 -13
View File
@@ -1,25 +1,34 @@
AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I .
MOONLIGHT_SUBDIRS = $(libgc_dir) eglib mono $(ikvm_native_dir) data
MOONLIGHT_SUBDIRS = $(libgc_dir) eglib/src mono
if CROSS_COMPILING
SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) data runtime scripts man samples web msvc $(docs_dir)
SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) data runtime scripts man samples msvc $(docs_dir)
# Keep in sync with SUBDIRS
## 'tools' is not normally built
DIST_SUBDIRS = po libgc eglib mono ikvm-native data runtime scripts man samples web tools msvc docs
DIST_SUBDIRS = po libgc eglib mono ikvm-native data runtime scripts man samples tools msvc docs
else
if ONLY_MOONLIGHT
SUBDIRS = $(MOONLIGHT_SUBDIRS) runtime
else
SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scripts man samples web msvc $(docs_dir)
SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scripts man samples msvc $(docs_dir)
# Keep in sync with SUBDIRS
## 'tools' is not normally built
DIST_SUBDIRS = po libgc eglib mono ikvm-native support data runtime scripts man samples web tools msvc docs
DIST_SUBDIRS = po libgc eglib mono ikvm-native support data runtime scripts man samples tools msvc docs
endif
endif
EXTRA_DIST= nls.m4 po.m4 progtest.m4 mono-uninstalled.pc.in build-mingw32.sh LICENSE mkinstalldirs autogen.sh
EXTRA_DIST= \
LICENSE \
autogen.sh \
build-mingw32.sh \
mkinstalldirs \
mono-uninstalled.pc.in \
nls.m4 \
po.m4 \
progtest.m4 \
winconfig.h
DISTCHECK_CONFIGURE_FLAGS = EXTERNAL_MCS=false EXTERNAL_RUNTIME=false
@@ -37,7 +46,8 @@ DISTCLEANFILES= mono-uninstalled.pc
# building with monolite
mcslib = $(mcs_topdir)/class/lib
monolite = $(mcslib)/monolite
monolite_url = http://mono.ximian.com/daily/monolite-latest.tar.gz
mono_corlib_version = $(shell sed -n "s/\#define MONO_CORLIB_VERSION //p" $(srcdir)/mono/metadata/appdomain.c)
monolite_url = http://mono.ximian.com/daily/monolite-$(mono_corlib_version)-latest.tar.gz
.PHONY: get-monolite-latest
get-monolite-latest:
-rm -fr $(mcslib)/monolite-*
@@ -72,17 +82,26 @@ bootstrap-world: compiler-tests
if MOONLIGHT
moon-do-build: config.h
@list='$(MOONLIGHT_SUBDIRS)'; for subdir in $$list; do \
echo "Making all in $$subdir"; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) all); \
case "x$$subdir" in \
xmono ) target="moon-do-build";; \
* ) target="all";; \
esac; \
echo "Making $$target in $$subdir"; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
done;
cd $(mcs_topdir) && NO_DIR_CHECK=1 $(MAKE) PROFILE=moonlight_raw all
(cd runtime && $(MAKE) $(AM_MAKEFLAGS) moon-do-build)
moon-do-clean:
@list='$(MOONLIGHT_SUBDIRS)'; for subdir in $$list; do \
echo "Making clean in $$subdir"; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) clean); \
case "x$$subdir" in \
xmono ) target="moon-do-clean";; \
* ) target="clean";; \
esac; \
echo "Making $$target in $$subdir"; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
done;
cd $(mcs_topdir) && NO_DIR_CHECK=1 $(MAKE) PROFILE=moonlight_raw clean
(cd runtime && $(MAKE) $(AM_MAKEFLAGS) moon-do-clean)
endif
win32getdeps:
+40 -22
View File
@@ -11,16 +11,6 @@ This is Mono.
a. Build Requirements
---------------------
To build Mono, you will need the following components:
* pkg-config
Available from: http://www.freedesktop.org/Software/pkgconfig
* glib 2.4
Available from: http://www.gtk.org/
On Itanium, you must obtain libunwind:
http://www.hpl.hp.com/research/linux/libunwind/download.php4
@@ -35,7 +25,15 @@ This is Mono.
* libgdiplus
If you want to get support for System.Drawing, you will need to get
Libgdiplus.
Libgdiplus. This library in turn requires glib and pkg-config:
* pkg-config
Available from: http://www.freedesktop.org/Software/pkgconfig
* glib 2.4
Available from: http://www.gtk.org/
* libzlib
@@ -74,15 +72,18 @@ This is Mono.
make V=1
c. Building the software from SVN
c. Building the software from GIT
---------------------------------
If you are building the software from SVN, make sure that you
If you are building the software from GIT, make sure that you
have up-to-date mcs and mono sources:
svn co svn+ssh://[email protected]/source/trunk/mono
svn co svn+ssh://[email protected]/source/trunk/mcs
If you are an anonymous user:
git clone git://github.com/mono/mono.git
If you are a Mono contributors with read/write privileges:
git clone [email protected]:mono/mono.git
Then, go into the mono directory, and configure:
@@ -129,16 +130,16 @@ This is Mono.
distribution, which contains just enough to run the 'mcs'
compiler. You do this with:
# Run the following line after ./autogen.sh
make get-monolite-latest
This will download and automatically gunzip and untar the
tarball, and place the files appropriately so that you can then
just run:
make
make EXTERNAL_MCS=${PWD}/mcs/class/lib/monolite/gmcs.exe
To ensure that you're using the 'monolite' distribution, you can
also try passing EXTERNAL_MCS=false on the make command-line.
And that will use the files downloaded by 'make get-monolite-latest.
Testing and Installation
------------------------
@@ -164,10 +165,13 @@ This is Mono.
make install
You can verify your installation by using the mono-test-install
script, it can diagnose some common problems with Mono's install.
Failure to follow these steps may result in a broken installation.
d. Common Configuration Options
-------------------------------
d. Configuration Options
------------------------
The following are the configuration options that someone
building Mono might want to use:
@@ -301,6 +305,21 @@ This is Mono.
System.dll, System.Code.dll and System.Xml.Core.dll) and turn
on the LINQ extensions for the compiler.
--with-moon-gc=boehm,sgen
Select the GC to use for Moonlight.
boehm:
Selects the Boehm Garbage Collector, with the same flags
as the regular Mono build. This is the default.
sgen:
Selects the new SGen Garbage Collector, which provides
Generational GC support, using the same flags as the
mono-sgen build.
This defaults to `boehm'.
--with-libgdiplus=installed,sibling,<path>
This is used to configure where should Mono look for
@@ -567,4 +586,3 @@ This is Mono.
same prefix than this module gets.
+106 -43
View File
@@ -2,7 +2,7 @@
CURDIR="`pwd`"
MINGW=i386-mingw32msvc
CROSS_DIR=/opt/cross/$MINGW
COPY_DLLS="libgio*.dll libglib*.dll libgmodule*.dll libgthread*.dll libgobject*.dll"
EXTRA_CROSS_DIR=
INSTALL_DESTDIR="$CURDIR/mono-win32"
PROFILES="default net_2_0 net_3_5 net_4_0 moonlight"
TEMPORARY_PKG_CONFIG_DIR=/tmp/$RANDOM-pkg-config-$RANDOM
@@ -17,62 +17,119 @@ function cleanup ()
fi
}
function check_pkg_config_dir ()
{
local DIR="$1"
local DIR_PREFIX="$2"
if [ ! -d "$DIR" ]; then
return
fi
install -d -m 755 "$TEMPORARY_PKG_CONFIG_DIR"
for pc in "$DIR"/*.pc; do
if [ -f $pc ]; then
pcname="`basename $pc`"
sed -e "s;^prefix=.*;prefix=$DIR_PREFIX;g" < $pc > "$TEMPORARY_PKG_CONFIG_DIR"/$pcname
fi;
done
if [ -z "$CROSS_PKG_CONFIG_DIR" ]; then
CROSS_PKG_CONFIG_DIR="$TEMPORARY_PKG_CONFIG_DIR"
fi
}
function show_build_info ()
{
cat <<EOF
Installation prefix: $MONO_PREFIX
CPPFLAGS: ${CPPFLAGS:=not set}
LDFLAGS: ${LDFLAGS:=not set}
MONO_PATH: ${MONO_PATH:=not set}
EOF
}
function setup ()
{
local pcname
CROSS_BIN_DIR="$CROSS_DIR/bin"
CROSS_DLL_DIR="$CROSS_DIR/bin"
CROSS_PKG_CONFIG_DIR=$CROSS_DIR/lib/pkgconfig
PATH=$CROSS_BIN_DIR:$PATH
export PATH
if [ -d ./.git/svn ]; then
SVN_INFO='git svn info'
elif [ -d ./.svn ]; then
SVN_INFO='svn info'
else
SVN_INFO=""
fi
if [ -n "$SVN_INFO" ]; then
MONO_SVN_REVISION=`$SVN_INFO | grep Revision | sed 's/.*: //'`
MONO_BRANCH=`$SVN_INFO | grep URL | sed -e 's;.*source/;;g' -e 's;/mono;;g'`
else
MONO_SVN_REVISION="rUNKNOWN"
MONO_BRANCH="tarball"
fi
MONO_VERSION=`grep AM_INIT_AUTOMAKE configure.in | cut -d ',' -f 2|tr -d '\)'`
MONO_RELEASE="$MONO_VERSION-$MONO_BRANCH-r$MONO_SVN_REVISION"
MONO_PREFIX="/mono-$MONO_RELEASE"
if [ -d ./.git ]; then
MONO_GIT_COMMIT="`git log -1 --format=format:%t`"
MONO_GIT_BRANCH="`git branch|grep '\*'|cut -d ' ' -f 2`"
MONO_RELEASE="$MONO_VERSION-$MONO_GIT_BRANCH-$MONO_GIT_COMMIT"
else
MONO_RELEASE="$MONO_VERSION"
fi
MONO_PREFIX="$MONO_PREFIX/mono-$MONO_RELEASE"
NOCONFIGURE=yes
export NOCONFIGURE
if [ -d "$CROSS_PKG_CONFIG_DIR" ]; then
install -d -m 755 "$TEMPORARY_PKG_CONFIG_DIR"
for pc in "$CROSS_PKG_CONFIG_DIR"/*.pc; do
pcname="`basename $pc`"
sed -e "s;^prefix=.*;prefix=$CROSS_DIR;g" < $pc > "$TEMPORARY_PKG_CONFIG_DIR"/$pcname
done
CROSS_PKG_CONFIG_DIR="$TEMPORARY_PKG_CONFIG_DIR"
fi
check_pkg_config_dir "$CROSS_DIR/lib/pkgconfig" "$CROSS_DIR"
echo Mono Win32 installation prefix: $MONO_PREFIX
if [ -n "$EXTRA_CROSS_DIR" -a -d "$EXTRA_CROSS_DIR" ]; then
if [ -d "$EXTRA_CROSS_DIR/bin" ]; then
PATH="$EXTRA_CROSS_DIR/bin":$PATH
fi
check_pkg_config_dir "$EXTRA_CROSS_DIR/lib/pkgconfig" "$EXTRA_CROSS_DIR"
if [ -d "$EXTRA_CROSS_DIR/include" ]; then
if [ -z "$CPPFLAGS" ]; then
CPPFLAGS="-I \"$EXTRA_CROSS_DIR/include\""
else
CPPFLAGS="-I \"$EXTRA_CROSS_DIR/include\" $CFLAGS"
fi
fi
if [ -d "$EXTRA_CROSS_DIR/lib" ]; then
if [ -z "$LDFLAGS" ]; then
LDFLAGS="-I \"$EXTRA_CROSS_DIR/lib\""
else
LDFLAGS="-I \"$EXTRA_CROSS_DIR/lib\" $LDFLAGS"
fi
fi
if [ -d "$EXTRA_CROSS_DIR/share/aclocal" ]; then
if [ -z "$MONO_PATH" ]; then
MONO_PATH="\"$EXTRA_CROSS_DIR\""
else
MONO_PATH="\"$EXTRA_CROSS_DIR\":$MONO_PATH"
fi
fi
fi
export PATH MONO_PATH CPPFLAGS
show_build_info
}
function build ()
{
if [ -f ./Makefile ]; then
make distclean
fi
if [ -d ./autom4te.cache ]; then
rm -rf ./autom4te.cache
fi
if [ -f ./config.status ]; then
for f in `find -name config.status -type f`; do
rm $f
done
fi
./autogen.sh
BUILD="`./config.guess`"
if [ -f ./Makefile ]; then
make distclean
rm -rf autom4te.cache
fi
if [ ! -d "$CURDIR/build-cross-windows" ]; then
mkdir "$CURDIR/build-cross-windows"
fi
@@ -105,27 +162,28 @@ function doinstall ()
cd "$CURDIR/build-cross-windows"
make DESTDIR="$INSTALL_DESTDIR" USE_BATCH_FILES=yes install
cd "$CURDIR/../mcs/mcs"
if test -d $CURDIR/mcs; then
mcsdir=$CURDIR/mcs
else
mcsdir=$CURDIR/../mcs
fi
cd "$mcsdir/mcs"
for p in $PROFILES; do
make DESTDIR="$INSTALL_DESTDIR" PROFILE=$p install || echo "mcs profile $p installation failed"
done
cd "$CURDIR/../mcs/class"
cd "$mcsdir/class"
for p in $PROFILES; do
make DESTDIR="$INSTALL_DESTDIR" PROFILE=$p install || echo "class library profile $p installation failed"
done
cd "$CURDIR/../mcs/tools"
cd "$mcsdir/tools"
for p in $PROFILES; do
make DESTDIR="$INSTALL_DESTDIR" PROFILE=$p install || echo "tools profile $p installation failed"
done
cd "$CURDIR/mono-win32"
for dll in $COPY_DLLS; do
cp -ap "$CROSS_DLL_DIR"/$dll "$INSTALL_DESTDIR/$MONO_PREFIX/bin"
done
rm -f "$CURDIR/mono-win32-$MONO_RELEASE".zip
zip -9r "$CURDIR/mono-win32-$MONO_RELEASE".zip .
@@ -139,7 +197,9 @@ Usage: build-mingw32.sh [OPTIONS]
where OPTIONS are:
-d DIR Sets the location of directory where MINGW is installed [$CROSS_DIR]
-e DIR Sets the location of directory where additional cross develoment packages are installed [${EXTRA_CROSS_DIR:=none}]
-m MINGW Sets the MINGW target name to be passed to configure [$MINGW]
-p PREFIX Prefix at which Mono is to be installed. Build will append the 'mono-X.Y' string to that path
EOF
exit 1
@@ -149,10 +209,12 @@ trap cleanup 0
pushd . > /dev/null
while getopts "d:m:h" opt; do
while getopts "d:m:e:p:" opt; do
case "$opt" in
d) CROSS_DIR="$OPTARG" ;;
m) MINGW="$OPTARG" ;;
e) EXTRA_CROSS_DIR="$OPTARG" ;;
p) MONO_PREFIX="$OPTARG" ;;
*) usage ;;
esac
done
@@ -160,5 +222,6 @@ done
setup
build
doinstall
show_build_info
popd > /dev/null
+117 -48
View File
@@ -6,7 +6,7 @@ AC_CANONICAL_SYSTEM
m4_ifdef([_A][M_PROG_TAR],[_A][M_SET_OPTION([tar-ustar])])
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(mono,2.8.1)
AM_INIT_AUTOMAKE(mono,2.10)
AM_MAINTAINER_MODE
API_VER=2.0
@@ -86,7 +86,7 @@ case "$host" in
host_win32=yes
if test "x$cross_compiling" = "xno"; then
target_win32=yes
if test "x$host" == "x$target"; then
if test "x$host" == "x$build"; then
AC_DEFINE(TARGET_WIN32,1,[Target OS is Win32])
fi
CC="gcc -mno-cygwin -g"
@@ -94,6 +94,7 @@ case "$host" in
# So libgc configure gets -mno-cygwin
export CC
export CXX
CFLAGS_FOR_EGLIB="$CFLAGS_FOR_EGLIB -mno-cygwin"
else
target_win32=yes
AC_DEFINE(TARGET_WIN32,1,[Target OS is Win32/MinGW])
@@ -180,7 +181,6 @@ case "$host" in
libmono_cflags="-D_REENTRANT"
libdl="-ldl"
libgc_threads=pthreads
AOT_SUPPORTED="yes"
use_sigposix=yes
;;
*-*-nacl*)
@@ -192,11 +192,11 @@ case "$host" in
libmono_cflags="-D_REENTRANT"
libdl=
libgc_threads=pthreads
AOT_SUPPORTED="yes"
gc_default=boehm
use_sigposix=yes
ikvm_native=no
AC_DEFINE(DISABLE_SOCKETS,1,[Disable sockets support])
AC_DEFINE(DISABLE_ATTACH, 1, [Disable agent attach support])
;;
*-*-hpux*)
host_win32=no
@@ -379,15 +379,15 @@ AC_CHECK_HEADERS(sys/user.h, [], [],
AC_CHECK_HEADER(zlib.h, [have_zlib=yes], [have_zlib=no])
if test x$have_zlib = xyes; then
AC_TRY_COMPILE([#include <zlib.h>], [
void main () {
#if defined(ZLIB_VERNUM) && (ZLIB_VERNUM >= 0x1230)
}
return 0;
#else
#error No good zlib found
#endif
],[
AC_MSG_RESULT(Using system zlib)
zlib_msg="system zlib"
AC_DEFINE(HAVE_SYS_ZLIB,1,[Have system zlib])
],[
AC_MSG_RESULT(Using embedded zlib)
have_zlib=no
@@ -591,27 +591,6 @@ AC_SUBST(GMODULE_LIBS)
AC_SUBST(BUILD_GLIB_CFLAGS)
AC_SUBST(BUILD_GLIB_LIBS)
if test x$cross_compiling$host_win32 = xnoyes; then
AC_MSG_CHECKING(for cygwin glib2-dev package)
if [ cygcheck --f /usr/lib/libglib-2.0.dll.a | grep -q glib2-devel ]; then
AC_MSG_RESULT(found)
AC_MSG_ERROR([Mono cannot be built with the cygwin glib2-devel package installed, because that package doesn't work with -mno-cygwin. Please uninstall it then re-run configure.])
else
AC_MSG_RESULT(not found, ok)
fi
AC_MSG_CHECKING(for broken gwin32.h)
glib_include=`$PKG_CONFIG --cflags-only-I glib-2.0 | sed -e 's/ -I.*//g' | sed -e 's/-I//g'`
if test -f $glib_include/glib/gwin32.h; then
if [ grep ftruncate $glib_include/glib/gwin32.h | grep -q define ]; then
AC_MSG_RESULT(failed)
hashmark='#'
AC_MSG_ERROR([Your version of gwin32.h is broken and will cause compilation errors when building mono. Please fix it by deleting the line: '$hashmark define ftruncate...' from '$glib_include/glib/gwin32.h' then re-run configure.])
fi
fi
AC_MSG_RESULT(ok)
fi
AC_ARG_WITH(gc, [ --with-gc=boehm,included,none Controls the Boehm GC config, default=included],[gc=$with_gc],[gc=$gc_default])
# Enable support for fast thread-local storage
@@ -623,17 +602,27 @@ AC_ARG_WITH(tls, [ --with-tls=__thread,pthread select Thread Local Storage i
AC_ARG_WITH(sigaltstack, [ --with-sigaltstack=yes,no enable/disable support for sigaltstack (defaults to yes)],[],[with_sigaltstack=yes])
AC_ARG_WITH(static_mono, [ --with-static_mono=yes,no link mono statically to libmono (faster) (defaults to yes)],[],[with_static_mono=yes])
AC_ARG_WITH(shared_mono, [ --with-shared_mono=yes,no build a shared libmono library (defaults to yes)],[],[with_shared_mono=yes])
if test "x$enable_static" = "xno"; then
with_static_mono=no
fi
if test "x$enable_shared" = "xno"; then
with_shared_mono=no
fi
case $host in
*nacl* ) with_shared_mono=yes;;
esac
if test "x$host_win32" = "xyes"; then
# Boehm GC requires the runtime to be in its own dll
with_static_mono=no
fi
AM_CONDITIONAL(STATIC_MONO, test x$with_static_mono != xno)
AM_CONDITIONAL(SHARED_MONO, test x$with_shared_mono != xno)
AC_ARG_ENABLE(mcs-build, [ --disable-mcs-build disable the build of the mcs directory], try_mcs_build=$enableval, enable_mcs_build=yes)
AC_ARG_WITH(xen_opt, [ --with-xen_opt=yes,no Enable Xen-specific behaviour (defaults to yes)],[],[with_xen_opt=yes])
@@ -662,23 +651,19 @@ if test x$enable_small_config = xyes; then
CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -DSMALL_CONFIG"
fi
if test x$AOT_SUPPORTED != xyes; then
AOT_SUPPORTED=no
fi
AC_ARG_ENABLE(system-aot, [ --enable-system-aot Enable the Ahead-Of-Time compilation of system assemblies during the build (on by default on some platforms)], enable_system_aot=$enableval, enable_system_aot=$AOT_SUPPORTED)
AC_ARG_ENABLE(system-aot, [ --enable-system-aot Enable the Ahead-Of-Time compilation of system assemblies during the build (on by default on some platforms)], enable_system_aot=$enableval, enable_system_aot=default)
DISABLED_FEATURES=none
AC_ARG_ENABLE(minimal, [ --enable-minimal=LIST drop support for LIST subsystems.
LIST is a comma-separated list from: aot, profiler, decimal, pinvoke, debug,
reflection_emit, reflection_emit_save, large_code, logging, com, ssa, generics, attach, jit, simd, soft_debug, normalization.],
reflection_emit, reflection_emit_save, large_code, logging, com, ssa, generics, attach, jit, simd, soft_debug, normalization, assembly_remapping.],
[
for feature in `echo "$enable_minimal" | sed -e "s/,/ /g"`; do
eval "mono_feature_disable_$feature='yes'"
done
DISABLED_FEATURES=$enable_minimal
disabled="Disabled: $enable_minimal"
disabled="Disabled: $enable_minimal"
],[])
AC_DEFINE_UNQUOTED(DISABLED_FEATURES, "$DISABLED_FEATURES", [String of disabled features])
@@ -792,6 +777,11 @@ if test "x$mono_feature_disable_normalization" = "xyes"; then
AC_MSG_NOTICE([Disabled String normalization support.])
fi
if test "x$mono_feature_disable_assembly_remapping" = "xyes"; then
AC_DEFINE(DISABLE_ASSEMBLY_REMAPPING, 1, [Disable assembly remapping.])
AC_MSG_NOTICE([Disabled Assembly remapping.])
fi
AC_MSG_CHECKING(for visibility __attribute__)
AC_TRY_COMPILE([], [
void __attribute__ ((visibility ("hidden"))) doit (void) {}
@@ -861,6 +851,14 @@ case "x$gc" in
if test "x$found_gc_enable" = "xyes"; then
BOEHM_DEFINES="-DHAVE_GC_ENABLE $BOEHM_DEFINES"
fi
# check whether we need to explicitly allow
# thread registering
AC_CHECK_LIB(gc, GC_allow_register_threads, found_allow_register_threads="yes",,$libdl)
if test "x$found_allow_register_threads" = "xyes"; then
AC_DEFINE(HAVE_GC_ALLOW_REGISTER_THREADS, 1, [GC requires thread registration])
fi
;;
xincluded)
@@ -999,9 +997,11 @@ if test x$target_win32 = xno; then
AC_CHECK_FUNCS(getpriority)
AC_CHECK_FUNCS(setpriority)
AC_CHECK_FUNCS(dl_iterate_phdr)
AC_CHECK_FUNCS(dladdr)
AC_CHECK_FUNCS(sysconf)
AC_CHECK_FUNCS(sched_setaffinity)
AC_CHECK_FUNCS(sched_getcpu)
dnl ****************************************************************
dnl *** Check for sched_setaffinity from glibc versions before ***
@@ -1754,6 +1754,11 @@ if test x$target_win32 = xno; then
dnl * on xp+
AC_DEFINE(HAVE_GETPROCESSID, 1, [Define if GetProcessId is available])
else
dnl *********************************
dnl *** Checks for Windows compilation ***
dnl *********************************
AC_CHECK_HEADERS(winternl.h)
jdk_headers_found=no
AC_CHECK_LIB(ws2_32, main, LIBS="$LIBS -lws2_32", AC_ERROR(bad mingw install?))
AC_CHECK_LIB(psapi, main, LIBS="$LIBS -lpsapi", AC_ERROR(bad mingw install?))
@@ -1837,6 +1842,7 @@ fi
AC_CHECK_FUNCS(round)
AC_CHECK_FUNCS(rint)
AC_CHECK_FUNCS(execvp)
dnl ****************************
dnl *** Look for /dev/random ***
@@ -1849,7 +1855,7 @@ try_dev_random=$enableval, try_dev_random=yes)
AC_MSG_RESULT($try_dev_random)
case "{$target}" in
case "{$build}" in
*-openbsd*)
NAME_DEV_RANDOM="/dev/srandom"
;;
@@ -1992,6 +1998,7 @@ dnl *** NaCl ***
dnl **************
AC_ARG_ENABLE(nacl_codegen, [ --enable-nacl-codegen Enable Native Client code generation], enable_nacl_codegen=$enableval, enable_nacl_codegen=no)
AC_ARG_ENABLE(nacl_gc, [ --enable-nacl-gc Enable Native Client garbage collection], enable_nacl_gc=$enableval, enable_nacl_gc=no)
AM_CONDITIONAL(NACL_CODEGEN, test x$enable_nacl_codegen != xno)
if test "x$enable_nacl_codegen" = "xyes"; then
@@ -2000,6 +2007,10 @@ if test "x$enable_nacl_codegen" = "xyes"; then
AC_DEFINE(TARGET_NACL, 1, [...])
else
MONO_NACL_ALIGN_MASK_OFF=0
CPPFLAGS="$CPPFLAGS -D__default_codegen__"
fi
if test "x$enable_nacl_gc" = "xyes"; then
CPPFLAGS="$CPPFLAGS -finstrument-for-thread-suspension -D__native_client_gc__"
fi
AC_SUBST(MONO_NACL_ALIGN_MASK_OFF)
@@ -2007,7 +2018,7 @@ dnl **************
dnl *** LLVM ***
dnl **************
AC_ARG_ENABLE(llvm,[ --enable-llvm Enable the experimental LLVM back-end], enable_llvm=$enableval, enable_llvm=no)
AC_ARG_ENABLE(llvm,[ --enable-llvm Enable the LLVM back-end], enable_llvm=$enableval, enable_llvm=no)
AC_ARG_ENABLE(loadedllvm,[ --enable-loadedllvm Load the LLVM back-end dynamically], enable_llvm=$enableval && enable_loadedllvm=$enableval, enable_loadedllvm=no)
if test "x$enable_llvm" = "xyes"; then
@@ -2129,7 +2140,11 @@ case "$host" in
haiku*)
LIBC=libroot.so
;;
linux*|darwin*|openbsd*)
linux*)
sgen_supported=true
AOT_SUPPORTED="yes"
;;
darwin*|openbsd*|freebsd*)
sgen_supported=true
;;
esac
@@ -2140,10 +2155,20 @@ case "$host" in
JIT_SUPPORTED=yes
jit_wanted=true
case $host_os in
linux*|darwin*|openbsd*)
linux*)
sgen_supported=true
AOT_SUPPORTED="yes"
;;
darwin*|openbsd*|freebsd*)
sgen_supported=true
;;
esac
case "$host" in
x86_64-*-nacl*)
AC_DEFINE(__mono_ilp32__, 1, [64 bit mode with 4 byte longs and pointers])
sizeof_register=8
;;
esac
;;
ia64-*-*)
TARGET=IA64
@@ -2295,6 +2320,14 @@ if test "x$host" != "x$target"; then
sizeof_register=8
target_byte_order=G_BIG_ENDIAN
;;
x86_64-*-nacl)
TARGET=AMD64
arch_target=amd64
AC_DEFINE(TARGET_AMD64, 1, [...])
AC_DEFINE(MONO_CROSS_COMPILE,1,[The runtime is compiled for cross-compiling mode])
AC_DEFINE(__mono_ilp32__, 1, [64 bit mode with 4 byte longs and pointers])
sizeof_register=8
;;
*)
AC_MSG_WARN([Cross compiling is only supported for targets matching 'powerpc64-{ps3,xbox360}-linux-gnu'])
esac
@@ -2347,8 +2380,13 @@ fi
dnl
dnl Simple Generational checks (sgen)
dnl
if $sgen_supported; then
build_sgen_default=yes
else
build_sgen_default=no
fi
SGEN_DEFINES=
AC_ARG_WITH(sgen, [ --with-sgen=yes,no Extra Generational GC, default=yes],[buildsgen=$with_sgen],[buildsgen=yes])
AC_ARG_WITH(sgen, [ --with-sgen=yes,no Extra Generational GC, default=yes],[buildsgen=$with_sgen],[buildsgen=$build_sgen_default])
if test x$buildsgen = xyes; then
if $sgen_supported; then
SGEN_DEFINES="-DHAVE_SGEN_GC -DHAVE_MOVING_COLLECTOR -DHAVE_WRITE_BARRIERS"
@@ -2483,6 +2521,11 @@ if test "x$try_mono_debugger" = "xyes"; then
fi
fi
# disable the debugger entirely when building with moonlight
if test "x$with_moonlight" != "xno"; then
mono_debugger_supported=no
fi
AC_MSG_CHECKING(if the Mono Debugger is supported on this platform)
if test "x$mono_debugger_supported" = "xyes"; then
BOEHM_DEFINES="$BOEHM_DEFINES -DMONO_DEBUGGER_SUPPORTED"
@@ -2542,6 +2585,10 @@ case "x$gc" in
if test x$TARGET = xSPARC -o x$TARGET = xSPARC64; then
LIBGC_CPPFLAGS=`echo $LIBGC_CPPFLAGS | sed -e 's/-D_FILE_OFFSET_BITS=64//g'`
fi
# Don't pass -finstrument-for-thread-suspension in,
# if these are instrumented it will be very bad news
# (infinite recursion, undefined parking behavior, etc)
LIBGC_CPPFLAGS=`echo $LIBGC_CPPFLAGS | sed -e 's/-finstrument-for-thread-suspension//g'`
ac_configure_args="$ac_configure_args --disable-embed-check --with-libgc-threads=$libgc_threads $libgc_configure_args \"CPPFLAGS_FOR_LIBGC=$LIBGC_CPPFLAGS\" \"CFLAGS_FOR_LIBGC=$CFLAGS_FOR_LIBGC\""
AC_CONFIG_SUBDIRS(libgc)
;;
@@ -2549,7 +2596,8 @@ esac
#AC_ARG_WITH(profile2, [ --with-profile2=yes,no If you want to install the 2.0 FX (defaults to yes)], [], [with_profile2=yes])
AC_ARG_WITH(profile4, [ --with-profile4=yes,no If you want to install the 4.0 FX (defaults to yes)], [], [with_profile4=yes])
AC_ARG_WITH(monotouch, [ --with-monotouch=yes,no If you want to build the raw MonoTouch 2.1 assemblies (defaults to no)], [], [with_monotouch=no])
AC_ARG_WITH(monodroid, [ --with-monodroid=yes,no If you want to build the MonoDroid 2.1 assemblies (defaults to no)], [], [with_monodroid=no])
AC_ARG_WITH(monotouch, [ --with-monotouch=yes,no If you want to build the MonoTouch 2.1 assemblies (defaults to no)], [], [with_monotouch=no])
OPROFILE=no
AC_ARG_WITH(oprofile,[ --with-oprofile=no,<oprofile install dir> Enable oprofile support (defaults to no)],[
@@ -2580,16 +2628,23 @@ AC_ARG_WITH(mcs_docs,[ --with-mcs-docs=yes,no If you want to build the
DISABLE_MCS_DOCS=yes
fi
])
if test x$with_profile4 != xyes; then
DISABLE_MCS_DOCS=yes
fi
MOONLIGHT_DEFINES=
AC_ARG_WITH(moonlight, [ --with-moonlight=yes|no|only If you want to build Mono for Moonlight (defaults to no)],[
if test "x$with_moonlight" = "xyes"; then
AC_DEFINE(MOONLIGHT,1,[Building for Moonlight])
elif test "x$with_moonlight" = "xonly"; then
AC_DEFINE(MOONLIGHT,1,[Building for Moonlight])
if test x$with_moonlight != xno; then
MOONLIGHT_DEFINES="-DMOONLIGHT -DDISABLE_ASSEMBLY_REMAPPING "
fi
], [with_moonlight=no])
AC_SUBST(MOONLIGHT_DEFINES)
AC_ARG_WITH(moon_gc, [ --with-moon-gc=boehm,sgen Select the gc to use with Moonlight (defaults to boehm)],[
if test "x$with_moon_gc" != "xsgen"; then
with_moon_gc=boehm
fi
], [with_moon_gc=boehm])
AC_CHECK_HEADER([malloc.h],
[AC_DEFINE([HAVE_USR_INCLUDE_MALLOC_H], [1],
@@ -2617,7 +2672,11 @@ libmono_ldflags="$libmono_ldflags $LIBS"
AM_CONDITIONAL(MOONLIGHT, [test "x$with_moonlight" != "xno"])
AM_CONDITIONAL(ONLY_MOONLIGHT, [test "x$with_moonlight" = "xonly"])
AM_CONDITIONAL(MOONLIGHT_BOEHM, [test "x$with_moon_gc" = "xboehm"])
AM_CONDITIONAL(MOONLIGHT_SGEN, [test "x$with_moon_gc" = "xsgen"])
AM_CONDITIONAL(INSTALL_4_0, [test "x$with_profile4" = xyes])
AM_CONDITIONAL(INSTALL_MONODROID, [test "x$with_monodroid" = xyes])
AM_CONDITIONAL(INSTALL_MONOTOUCH, [test "x$with_monotouch" = xyes])
AM_CONDITIONAL(MIPS_GCC, test ${TARGET}${ac_cv_prog_gcc} = MIPSyes)
@@ -2823,7 +2882,6 @@ mono/profiler/Makefile
ikvm-native/Makefile
scripts/Makefile
man/Makefile
web/Makefile
docs/Makefile
data/Makefile
data/net_2_0/Makefile
@@ -2831,6 +2889,7 @@ data/net_4_0/Makefile
data/net_2_0/Browsers/Makefile
data/mint.pc
data/mono-2.pc
data/monosgen-2.pc
data/mono.pc
data/mono-cairo.pc
data/mono-nunit.pc
@@ -2914,7 +2973,16 @@ fi
echo "PLATFORM = darwin" >> $mcs_topdir/build/config.make
fi
if test x$host_win32 = xno -a x$platform_darwin != xyes -a "x$AOT_SUPPORTED" = "xyes" -a x$enable_system_aot = xyes; then
if test x$AOT_SUPPORTED = xyes -a x$enable_system_aot = xdefault; then
enable_system_aot=yes
fi
if test "x$enable_loadedllvm" = "xyes"; then
# This seems to fail on the x86 buildbots
enable_system_aot=no
fi
if test x$host_win32 = xno -a x$platform_darwin != xyes -a x$enable_system_aot = xyes; then
echo "ENABLE_AOT = 1" >> $mcs_topdir/build/config.make
fi
@@ -2965,7 +3033,8 @@ echo "
LLVM Back End: $enable_llvm (dynamically loaded: $enable_loadedllvm)
Libraries:
Moon Profile: $with_moonlight
Moon Profile: $with_moonlight ($with_moon_gc)
MonoDroid: $with_monodroid
MonoTouch: $with_monotouch
JNI support: $jdk_headers_found
libgdiplus: $libgdiplus_msg
+10 -4
View File
@@ -9,7 +9,7 @@ monodir = $(sysconfdir)/mono
EXTRA_DIST = \
config.in \
browscap.ini mono.supp mono.d README ChangeLog \
mono.pc.in mono-2.pc.in mint.pc.in dotnet.pc.in dotnet35.pc.in wcf.pc.in monodoc.pc.in \
mono.pc.in mono-2.pc.in monosgen-2.pc.in mint.pc.in dotnet.pc.in dotnet35.pc.in wcf.pc.in monodoc.pc.in \
mono-nunit.pc.in mono-cairo.pc.in mono-options.pc.in cecil.pc.in \
mono-lineeditor.pc.in system.web.extensions_1.0.pc.in system.web.extensions.design_1.0.pc.in\
dtrace-prelink.sh mono.web.pc.in system.web.mvc.pc.in system.web.mvc2.pc.in \
@@ -19,20 +19,26 @@ EXTRA_DIST = \
pkgconfigdir = $(libdir)/pkgconfig
if SUPPORT_SGEN
SGENPCFILE=monosgen-2.pc
else
SGENPCFILE=
endif
if JIT_SUPPORTED
if INTERP_SUPPORTED
pkgconfig_DATA= mono.pc mono-2.pc mint.pc dotnet.pc dotnet35.pc wcf.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc monodoc.pc mono-lineeditor.pc system.web.extensions_1.0.pc \
system.web.extensions.design_1.0.pc mono.web.pc system.web.mvc.pc system.web.mvc2.pc
system.web.extensions.design_1.0.pc mono.web.pc system.web.mvc.pc system.web.mvc2.pc $(SGENPCFILE)
else
pkgconfig_DATA= mono.pc mono-2.pc dotnet.pc dotnet35.pc wcf.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc monodoc.pc mono-lineeditor.pc system.web.extensions_1.0.pc \
system.web.extensions.design_1.0.pc mono.web.pc system.web.mvc.pc system.web.mvc2.pc
system.web.extensions.design_1.0.pc mono.web.pc system.web.mvc.pc system.web.mvc2.pc $(SGENPCFILE)
endif
else
pkgconfig_DATA= mint.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc monodoc.pc mono-lineeditor.pc
endif
DISTCLEANFILES= mono-2.pc mono.pc mint.pc dotnet.pc dotnet35.pc wcf.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc monodoc.pc mono-lineeditor.pc system.web.extensions_1.0.pc \
system.web.extensions.design_1.0.pc mono.web.pc system.web.mvc.pc system.web.mvc2.pc
system.web.extensions.design_1.0.pc mono.web.pc system.web.mvc.pc system.web.mvc2.pc $(SGENPCFILE)
mono_DATA = config \
browscap.ini
+1 -1
View File
@@ -1,5 +1,5 @@
assemblies_dir=@prefix@/lib/mono
Libraries=${assemblies_dir}/gac/Mono.Cecil/0.6.9.0__0738eb9f132ed756/Mono.Cecil.dll
Libraries=${assemblies_dir}/gac/Mono.Cecil/0.9.4.0__0738eb9f132ed756/Mono.Cecil.dll
Name: Mono Internal -- Do not use.
Description: Mono Internal Libraries -- Do not use
+1
View File
@@ -18,6 +18,7 @@
<dllmap dll="libX11" target="@X11@" os="!windows" />
<dllmap dll="libcairo-2.dll" target="libcairo.so.2" os="!windows"/>
<dllmap dll="libcups" target="libcups.so.2" os="!windows"/>
<dllmap dll="libcups" target="libcups.dylib" os="osx"/>
<dllmap dll="i:kernel32.dll">
<dllentry dll="__Internal" name="CopyMemory" target="mono_win32_compat_CopyMemory"/>
<dllentry dll="__Internal" name="FillMemory" target="mono_win32_compat_FillMemory"/>
+2
View File
@@ -288,6 +288,8 @@ def lookup_pretty_printer(val):
return ObjectPrinter (val)
if t == "string":
return StringPrinter (val)
if t == "MonoString *":
return StringPrinter (val)
if t == "MonoMethod *":
return MonoMethodPrinter (val)
if t == "MonoClass *":
+1 -1
View File
@@ -4,4 +4,4 @@ Sources=${assemblies_dir}/Options.cs
Name: Mono.Options
Description: Command Line Parsing Library
Version: 0.2.1
Version: 0.2.2
+11
View File
@@ -0,0 +1,11 @@
prefix=${pcfiledir}/../..
exec_prefix=${pcfiledir}/../..
libdir=${prefix}/@reloc_libdir@
includedir=${prefix}/include/mono-@API_VER@
sysconfdir=@sysconfdir@
Name: Mono
Description: Mono Runtime
Version: @VERSION@
Libs: -L${libdir} @export_ldflags@ -lmonosgen-@API_VER@ @libmono_ldflags@
Cflags: -I${includedir} @libmono_cflags@
+6 -1
View File
@@ -474,10 +474,15 @@ private CodeDomProvider GetProvider(string langId)
//
// Document generation
//
class UTF8StringWriter : StringWriter {
public override Encoding Encoding {
get { return Encoding.UTF8; }
}
}
string GenerateDocument ()
{
StringWriter sw = new StringWriter ();
UTF8StringWriter sw = new UTF8StringWriter ();
if (CurrentDocType == "wsdl")
descriptions [CurrentDocInd].Write (sw);
+4
View File
@@ -84,6 +84,10 @@
<section name="serviceHostingEnvironment" type="System.ServiceModel.Configuration.ServiceHostingEnvironmentSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="services" type="System.ServiceModel.Configuration.ServicesSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</sectionGroup>
<sectionGroup name="system.transactions" type="System.Transactions.Configuration.TransactionsSectionGroup, System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, Custom=null">
<section name="defaultSettings" type="System.Transactions.Configuration.DefaultSettingsSection, System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, Custom=null"/>
<section name="machineSettings" type="System.Transactions.Configuration.MachineSettingsSection, System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, Custom=null" allowDefinition="MachineOnly" allowExeDefinition="MachineOnly"/>
</sectionGroup>
<section name="system.webServer" type="System.Configuration.IgnoreSection, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="uri" type="System.Configuration.UriSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</configSections>
File diff suppressed because it is too large. Load diff
+2
View File
@@ -4,9 +4,11 @@ monodir = $(sysconfdir)/mono/4.0
EXTRA_DIST = machine.config \
web.config \
DefaultWsdlHelpGenerator.aspx \
settings.map
mono_DATA = machine.config \
web.config \
DefaultWsdlHelpGenerator.aspx \
settings.map
+27
View File
@@ -62,6 +62,17 @@
</sectionGroup>
<section name="monoSettings" type="System.Web.Configuration.MonoSettingsSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</sectionGroup>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere"/>
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
</sectionGroup>
</sectionGroup>
</sectionGroup>
<sectionGroup name="system.net" type="System.Net.Configuration.NetSectionGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="authenticationModules" type="System.Net.Configuration.AuthenticationModulesSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="connectionManagement" type="System.Net.Configuration.ConnectionManagementSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
@@ -83,6 +94,13 @@
<section name="extensions" type="System.ServiceModel.Configuration.ExtensionsSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="serviceHostingEnvironment" type="System.ServiceModel.Configuration.ServiceHostingEnvironmentSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="services" type="System.ServiceModel.Configuration.ServicesSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="standardEndpoints" type="System.ServiceModel.Configuration.StandardEndpointsSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<section name="routing" type="System.ServiceModel.Routing.Configuration.RoutingSection, System.ServiceModel.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<section name="protocolMapping" type="System.ServiceModel.Configuration.ProtocolMappingSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
</sectionGroup>
<sectionGroup name="system.transactions" type="System.Transactions.Configuration.TransactionsSectionGroup, System.Transactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, Custom=null">
<section name="defaultSettings" type="System.Transactions.Configuration.DefaultSettingsSection, System.Transactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, Custom=null"/>
<section name="machineSettings" type="System.Transactions.Configuration.MachineSettingsSection, System.Transactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, Custom=null" allowDefinition="MachineOnly" allowExeDefinition="MachineOnly"/>
</sectionGroup>
<section name="system.webServer" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="uri" type="System.Configuration.UriSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
@@ -272,6 +290,15 @@
<bindingExtensions>
<add name="webHttpBinding" type="System.ServiceModel.Configuration.WebHttpBindingCollectionElement, System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</bindingExtensions>
<endpointExtensions>
<add name="dynamicEndpoint" type="System.ServiceModel.Discovery.Configuration.DynamicEndpointCollectionElement, System.ServiceModel.Discovery, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="discoveryEndpoint" type="System.ServiceModel.Discovery.Configuration.DiscoveryEndpointCollectionElement, System.ServiceModel.Discovery, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="udpDiscoveryEndpoint" type="System.ServiceModel.Discovery.Configuration.UdpDiscoveryEndpointCollectionElement, System.ServiceModel.Discovery, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="announcementEndpoint" type="System.ServiceModel.Discovery.Configuration.AnnouncementEndpointCollectionElement, System.ServiceModel.Discovery, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="udpAnnouncementEndpoint" type="System.ServiceModel.Discovery.Configuration.UdpAnnouncementEndpointCollectionElement, System.ServiceModel.Discovery, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="webHttpEndpoint" type="System.ServiceModel.Configuration.WebHttpEndpointCollectionElement, System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="webScriptEndpoint" type="System.ServiceModel.Configuration.WebScriptEndpointCollectionElement, System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</endpointExtensions>
</extensions>
</system.serviceModel>
</configuration>
+1
View File
@@ -76,6 +76,7 @@
<!--
<add path="*.svc" verb="*" type="System.ServiceModel.Activation.HttpHandler, System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="False"/>
-->
<add verb="*" path="*.svc" type="System.ServiceModel.Channels.SvcHttpHandlerFactory, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add path="*.rules" verb="*" type="System.Web.HttpForbiddenHandler" validate="True"/>
<!--
<add path="*.xoml" verb="*" type="System.ServiceModel.Activation.HttpHandler, System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="False"/>
+1
View File
@@ -19,3 +19,4 @@
/config.h
/config.status
/INSTALL
dolt*
-8
View File
@@ -1,8 +0,0 @@
set(SUBDIRS src test)
autoheader("config.h" null)
foreach(subdir ${SUBDIRS})
add_subdirectory(${subdir})
endforeach()
+5 -1
View File
@@ -1,12 +1,16 @@
if HOST_WIN32
SUBDIRS = src
else
if PLATFORM_DARWIN
SUBDIRS = src
else
if CROSS_COMPILING
SUBDIRS = src
else
SUBDIRS = src test
endif
endif
endif
EXTRA_DIST = autogen.sh README NEWS AUTHORS ChangeLog
EXTRA_DIST = autogen.sh README NEWS AUTHORS ChangeLog winconfig.h
+181
View File
@@ -0,0 +1,181 @@
dnl dolt, a replacement for libtool
dnl Copyright © 2007-2008 Josh Triplett <[email protected]>
dnl Copying and distribution of this file, with or without modification,
dnl are permitted in any medium without royalty provided the copyright
dnl notice and this notice are preserved.
dnl
dnl To use dolt, invoke the DOLT macro immediately after the libtool macros.
dnl Optionally, copy this file into acinclude.m4, to avoid the need to have it
dnl installed when running autoconf on your project.
AC_DEFUN([DOLT], [
AC_REQUIRE([AC_CANONICAL_HOST])
# dolt, a replacement for libtool
# Josh Triplett <[email protected]>
AC_PATH_PROG(DOLT_BASH, bash)
AC_MSG_CHECKING([if dolt supports this host])
dolt_supported=yes
if test x$DOLT_BASH = x; then
dolt_supported=no
fi
if test x$GCC != xyes; then
dolt_supported=no
fi
case $host in
i?86-*-linux*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-linux* \
|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*|sparc*-*-linux*|mips*-*-linux*)
pic_options='-fPIC'
;;
?86-pc-cygwin*|i?86-pc-cygwin*)
pic_options='-DDLL_EXPORT'
;;
i?86-apple-darwin*)
pic_options='-fno-common'
;;
*)
dolt_supported=no
;;
esac
if test x$dolt_supported = xno ; then
AC_MSG_RESULT([no, falling back to libtool])
LTCOMPILE='$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(COMPILE)'
LTCXXCOMPILE='$(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXXCOMPILE)'
else
AC_MSG_RESULT([yes, replacing libtool])
dnl Start writing out doltcompile.
cat <<__DOLTCOMPILE__EOF__ >doltcompile
#!$DOLT_BASH
__DOLTCOMPILE__EOF__
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
args=("$[]@")
for ((arg=0; arg<${#args@<:@@@:>@}; arg++)) ; do
if test x"${args@<:@$arg@:>@}" = x-o ; then
objarg=$((arg+1))
break
fi
done
if test x$objarg = x ; then
echo 'Error: no -o on compiler command line' 1>&2
exit 1
fi
lo="${args@<:@$objarg@:>@}"
obj="${lo%.lo}"
if test x"$lo" = x"$obj" ; then
echo "Error: libtool object file name \"$lo\" does not end in .lo" 1>&2
exit 1
fi
objbase="${obj##*/}"
__DOLTCOMPILE__EOF__
dnl Write out shared compilation code.
if test x$enable_shared = xyes; then
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
libobjdir="${obj%$objbase}.libs"
if test ! -d "$libobjdir" ; then
mkdir_out="$(mkdir "$libobjdir" 2>&1)"
mkdir_ret=$?
if test "$mkdir_ret" -ne 0 && test ! -d "$libobjdir" ; then
echo "$mkdir_out" 1>&2
exit $mkdir_ret
fi
fi
pic_object="$libobjdir/$objbase.o"
args@<:@$objarg@:>@="$pic_object"
__DOLTCOMPILE__EOF__
cat <<__DOLTCOMPILE__EOF__ >>doltcompile
"\${args@<:@@@:>@}" $pic_options -DPIC || exit \$?
__DOLTCOMPILE__EOF__
fi
dnl Write out static compilation code.
dnl Avoid duplicate compiler output if also building shared objects.
if test x$enable_static = xyes; then
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
non_pic_object="$obj.o"
args@<:@$objarg@:>@="$non_pic_object"
__DOLTCOMPILE__EOF__
if test x$enable_shared = xyes; then
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
"${args@<:@@@:>@}" >/dev/null 2>&1 || exit $?
__DOLTCOMPILE__EOF__
else
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
"${args@<:@@@:>@}" || exit $?
__DOLTCOMPILE__EOF__
fi
fi
dnl Write out the code to write the .lo file.
dnl The second line of the .lo file must match "^# Generated by .*libtool"
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
{
echo "# $lo - a libtool object file"
echo "# Generated by doltcompile, not libtool"
__DOLTCOMPILE__EOF__
if test x$enable_shared = xyes; then
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
echo "pic_object='.libs/${objbase}.o'"
__DOLTCOMPILE__EOF__
else
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
echo pic_object=none
__DOLTCOMPILE__EOF__
fi
if test x$enable_static = xyes; then
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
echo "non_pic_object='${objbase}.o'"
__DOLTCOMPILE__EOF__
else
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
echo non_pic_object=none
__DOLTCOMPILE__EOF__
fi
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
} > "$lo"
__DOLTCOMPILE__EOF__
dnl Done writing out doltcompile; substitute it for libtool compilation.
chmod +x doltcompile
LTCOMPILE='$(top_builddir)/doltcompile $(COMPILE)'
LTCXXCOMPILE='$(top_builddir)/doltcompile $(CXXCOMPILE)'
dnl automake ignores LTCOMPILE and LTCXXCOMPILE when it has separate CFLAGS for
dnl a target, so write out a libtool wrapper to handle that case.
dnl Note that doltlibtool does not handle inferred tags or option arguments
dnl without '=', because automake does not use them.
cat <<__DOLTLIBTOOL__EOF__ > doltlibtool
#!$DOLT_BASH
__DOLTLIBTOOL__EOF__
cat <<'__DOLTLIBTOOL__EOF__' >>doltlibtool
top_builddir_slash="${0%%doltlibtool}"
: ${top_builddir_slash:=./}
args=()
modeok=false
tagok=false
for arg in "$[]@"; do
case "$arg" in
--mode=compile) modeok=true ;;
--tag=CC|--tag=CXX) tagok=true ;;
--quiet) ;;
*) args@<:@${#args[@]}@:>@="$arg" ;;
esac
done
if $modeok && $tagok ; then
. ${top_builddir_slash}doltcompile "${args@<:@@@:>@}"
else
exec ${top_builddir_slash}libtool "$[]@"
fi
__DOLTLIBTOOL__EOF__
dnl Done writing out doltlibtool; substitute it for libtool.
chmod +x doltlibtool
LIBTOOL='$(top_builddir)/doltlibtool'
fi
AC_SUBST(LTCOMPILE)
AC_SUBST(LTCXXCOMPILE)
# end dolt
])
+23 -5
View File
@@ -7,16 +7,17 @@ AM_MAINTAINER_MODE
AC_PROG_CC
AM_PROG_LIBTOOL
CFLAGS="$CFLAGS -g -O0 -D_GNU_SOURCE"
# Use dolt (http://dolt.freedesktop.org/) instead of libtool for building.
DOLT
CFLAGS="$CFLAGS -O0"
GNUC_PRETTY=
GNUC_UNUSED=
BREAKPOINT="G_STMT_START { raise (SIGTRAP); } G_STMT_END"
if test x$GCC = xyes; then
GNUC_UNUSED='__attribute__((__unused__))'
GNUC_NORETURN='__attribute__((__noreturn__))'
echo target_cpu=$target_cpu
case $target_cpu in
i*86) BREAKPOINT="G_STMT_START { __asm__ (\"int \$03\"); } G_STMT_END" ;;
case $host_cpu in
i*86|x86_64) BREAKPOINT="G_STMT_START { __asm__ (\"int \$03\"); } G_STMT_END" ;;
esac
fi
AC_SUBST(GNUC_PRETTY)
@@ -33,15 +34,25 @@ if test "x$CFLAGS_FOR_EGLIB" != "x"; then
CFLAGS=$CFLAGS_FOR_EGLIB
fi
CFLAGS="$CFLAGS -g -D_GNU_SOURCE"
AM_CONDITIONAL(CROSS_COMPILING, [test x$cross_compiling = xyes])
AC_C_BIGENDIAN([ORDER=G_BIG_ENDIAN],[ORDER=G_LITTLE_ENDIAN])
platform_darwin=no
case $host in
*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
PATHSEP='\\'
SEARCHSEP=';'
OS="WIN32"
;;
*-*darwin*)
platform_darwin=yes
PATHSEP='/'
SEARCHSEP=':'
OS="UNIX"
;;
*)
PATHSEP='/'
SEARCHSEP=':'
@@ -75,6 +86,7 @@ AC_SUBST(SEARCHSEP)
AC_SUBST(OS)
AM_CONDITIONAL(HOST_WIN32, test x$OS = xWIN32)
AM_CONDITIONAL(TARGET_WIN32, test x$OS = xWIN32)
AM_CONDITIONAL(PLATFORM_DARWIN, test x$platform_darwin = xyes)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(void *)
@@ -82,6 +94,10 @@ AC_CHECK_FUNCS(strndup strlcpy getpwuid_r strtok_r rewinddir vasprintf)
AM_CONDITIONAL(NEED_VASPRINTF, test x$have_vasprintf = x )
AC_CHECK_LIB(iconv, iconv_open, LIBS="$LIBS -liconv")
AC_CHECK_LIB(iconv, libiconv_open, LIBS="$LIBS -liconv")
AC_CHECK_LIB(iconv, iconv_open, ICONV_LIBS="-liconv")
AC_CHECK_LIB(iconv, libiconv_open, ICONV_LIBS="-liconv")
AC_SUBST(ICONV_LIBS)
LIBS="$LIBS $ICONV_LIBS"
AC_SEARCH_LIBS(sqrtf, m)
# nanosleep may not be part of libc, also search it in other libraries
@@ -110,7 +126,9 @@ if test "x$have_iso_varargs" = "xyes"; then
fi
AC_SUBST(G_HAVE_ISO_VARARGS)
AC_CHECK_HEADERS(getopt.h sys/time.h sys/wait.h pwd.h langinfo.h iconv.h)
AC_CHECK_HEADERS(getopt.h sys/time.h sys/wait.h pwd.h langinfo.h iconv.h localcharset.h sys/types.h)
AC_CHECK_HEADER(alloca.h, [HAVE_ALLOCA_H=1], [HAVE_ALLOCA_H=0])
AC_SUBST(HAVE_ALLOCA_H)
if test $ac_cv_sizeof_void_p != $ac_cv_sizeof_int; then
GPOINTER_TO_INT="((gint)(long) (ptr))"
-49
View File
@@ -1,49 +0,0 @@
set(win_files
gdate-win32.c gdir-win32.c gfile-win32.c gmisc-win32.c
gmodule-win32.c gtimer-win32.c)
set(unix_files
gdate-unix.c gdir-unix.c gfile-unix.c gmisc-unix.c
gmodule-unix.c gtimer-unix.c)
if (MSVC)
set(os_files ${win_files})
else(MSVC)
set(os_files ${unix_files})
endif(MSVC)
set(libeglib_la_SOURCES
${os_files}
eglib-config.h
sort.frag.h
glib.h
garray.c
gerror.c
ghashtable.c
gmem.c
gmodule.h
goutput.c
gstr.c
gslist.c
gstring.c
gptrarray.c
glist.c
gqueue.c
gpath.c
gshell.c
gspawn.c
gfile.c
gfile-posix.c
gpattern.c
gmarkup.c
gutf8.c
gunicode.c
unicode-data.h)
set(EXTRA_DIST eglib-config.h.in eglib-config.hw ${win_files} ${unix_files})
INCLUDE_DIRECTORIES(../ ${CMAKE_CURRENT_SOURCE_DIR})
ADD_DEFINITIONS(${CFLAGS} -D_FORTIFY_SOURCE=2)
ADD_LIBRARY(eglib-static STATIC ${libeglib_la_SOURCES})
ADD_LIBRARY(eglib SHARED ${libeglib_la_SOURCES})
+4 -3
View File
@@ -1,6 +1,7 @@
noinst_LTLIBRARIES = libeglib.la libeglib-static.la
win_files = \
eglib-config.hw \
gdate-win32.c gdir-win32.c gfile-win32.c gmisc-win32.c \
gmodule-win32.c gtimer-win32.c
@@ -23,11 +24,11 @@ os_files = $(unix_files)
endif
libeglib_la_SOURCES = \
eglib-config.h \
eglib-remap.h \
sort.frag.h \
glib.h \
garray.c \
gbytearray.c \
gerror.c \
ghashtable.c \
gmem.c \
@@ -52,14 +53,14 @@ libeglib_la_SOURCES = \
$(os_files) \
$(vasprintf_files)
libeglib_la_CFLAGS = -Wall -D_FORTIFY_SOURCE=2
libeglib_la_CFLAGS = -g -Wall -D_FORTIFY_SOURCE=2
libeglib_static_la_SOURCES=$(libeglib_la_SOURCES)
libeglib_static_la_CFLAGS = $(libeglib_la_CFLAGS)
INCLUDES = -I$(srcdir)
if HOST_WIN32
libeglib_la_LIBADD = -lm -liconv -lpsapi
libeglib_la_LIBADD = -lm $(ICONV_LIBS) -lpsapi
endif
libeglib_static_la_LIBADD = $(libeglib_la_LIBADD)
+4
View File
@@ -19,6 +19,10 @@
#define GINT_TO_POINTER(v) @GINT_TO_POINTER@
#define GUINT_TO_POINTER(v) @GUINT_TO_POINTER@
#if @HAVE_ALLOCA_H@ == 1
#define G_HAVE_ALLOCA_H
#endif
typedef unsigned @GSIZE@ gsize;
typedef signed @GSIZE@ gssize;
+13
View File
@@ -1,3 +1,4 @@
#define g_array_append monoeg_g_array_append
#define g_array_append_vals monoeg_g_array_append_vals
#define g_array_free monoeg_g_array_free
#define g_array_insert_vals monoeg_g_array_insert_vals
@@ -20,6 +21,7 @@
#define g_direct_hash monoeg_g_direct_hash
#define g_error_free monoeg_g_error_free
#define g_error_new monoeg_g_error_new
#define g_error_vnew monoeg_g_error_vnew
#define g_file_error_from_errno monoeg_g_file_error_from_errno
#define g_file_get_contents monoeg_g_file_get_contents
#define g_file_open_tmp monoeg_g_file_open_tmp
@@ -50,6 +52,10 @@
#define g_hash_table_new_full monoeg_g_hash_table_new_full
#define g_hash_table_remove monoeg_g_hash_table_remove
#define g_hash_table_size monoeg_g_hash_table_size
#define g_hash_table_print_stats monoeg_g_hash_table_print_stats
#define g_hash_table_remove_all monoeg_g_hash_table_remove_all
#define g_hash_table_iter_init monoeg_g_hash_table_iter_init
#define g_hash_table_iter_next monoeg_g_hash_table_iter_next
#define g_int_equal monoeg_g_int_equal
#define g_int_hash monoeg_g_int_hash
#define g_list_alloc monoeg_g_list_alloc
@@ -99,6 +105,7 @@
#define g_pattern_spec_new monoeg_g_pattern_spec_new
#define g_print monoeg_g_print
#define g_printf monoeg_g_printf
#define g_printerr monoeg_g_printerr
#define g_propagate_error monoeg_g_propagate_error
#define g_ptr_array_add monoeg_g_ptr_array_add
#define g_ptr_array_foreach monoeg_g_ptr_array_foreach
@@ -114,6 +121,7 @@
#define g_ptr_array_sort_with_data monoeg_g_ptr_array_sort_with_data
#define g_queue_free monoeg_g_queue_free
#define g_queue_is_empty monoeg_g_queue_is_empty
#define g_queue_foreach monoeg_g_queue_foreach
#define g_queue_new monoeg_g_queue_new
#define g_queue_pop_head monoeg_g_queue_pop_head
#define g_queue_push_head monoeg_g_queue_push_head
@@ -166,6 +174,7 @@
#define g_strerror monoeg_g_strerror
#define g_strescape monoeg_g_strescape
#define g_strfreev monoeg_g_strfreev
#define g_strdupv monoeg_g_strdupv
#define g_string_append monoeg_g_string_append
#define g_string_append_c monoeg_g_string_append_c
#define g_string_append_len monoeg_g_string_append_len
@@ -216,7 +225,11 @@
#define g_malloc0 monoeg_malloc0
#define g_ptr_array_grow monoeg_ptr_array_grow
#define g_realloc monoeg_realloc
#define g_try_malloc monoeg_try_malloc
#define g_try_realloc monoeg_try_realloc
#define g_strdup monoeg_strdup
#define g_ucs4_to_utf16_len monoeg_ucs4_to_utf16_len
#define g_utf16_to_ucs4_len monoeg_utf16_to_ucs4_len
#define g_byte_array_free monoeg_g_byte_array_free
#define g_byte_array_new monoeg_g_byte_array_new
+1 -1
View File
@@ -37,7 +37,7 @@
typedef struct {
GArray array;
gboolean clear_;
gboolean element_size;
guint element_size;
gboolean zero_terminated;
gint capacity;
} GArrayPriv;
+95
View File
@@ -0,0 +1,95 @@
/*
* Arrays
*
* Author:
* Geoff Norton ([email protected])
*
* (C) 2010 Novell, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <stdlib.h>
#include <glib.h>
#define INITIAL_CAPACITY 16
static void
ensure_capacity (GByteArray *array,
int capacity)
{
int new_capacity = MAX (array->len, INITIAL_CAPACITY);
if (capacity < array->len)
return;
while (new_capacity < capacity) {
new_capacity <<= 1;
}
capacity = new_capacity;
array->data = (guint8*) g_realloc (array->data, capacity);
memset (array->data + array->len, 0, capacity - array->len);
array->len = capacity;
}
GByteArray *
g_byte_array_new ()
{
GByteArray *rv = g_new0 (GByteArray, 1);
ensure_capacity (rv, INITIAL_CAPACITY);
return rv;
}
guint8*
g_byte_array_free (GByteArray *array,
gboolean free_segment)
{
guint8* rv = NULL;
g_return_val_if_fail (array != NULL, NULL);
if (free_segment)
g_free (array->data);
else
rv = array->data;
g_free (array);
return rv;
}
GByteArray *
g_array_append (GByteArray *array,
guint8 *data,
guint len)
{
g_return_val_if_fail (array != NULL, NULL);
ensure_capacity (array, array->len + len);
memmove (array->data + array->len, data, len);
array->len += len;
return array;
}
+10 -16
View File
@@ -51,46 +51,40 @@ g_dir_open (const gchar *path, guint flags, GError **error)
g_return_val_if_fail (path != NULL, NULL);
g_return_val_if_fail (error == NULL || *error == NULL, NULL);
dir = g_new0 (GDir, 1);
path_utf16 = u8to16 (path);
path_utf16_search = g_malloc ((wcslen(path_utf16) + 3)*sizeof(gunichar2));
wcscpy (path_utf16_search, path_utf16);
wcscat (path_utf16_search, L"\\*");
dir->handle = FindFirstFile (path_utf16, &find_data);
dir->handle = FindFirstFileW (path_utf16_search, &find_data);
if (dir->handle == INVALID_HANDLE_VALUE) {
if (error) {
gint err = errno;
*error = g_error_new (G_LOG_DOMAIN, g_file_error_from_errno (err), strerror (err));
}
g_free (dir);
g_free (path_utf16_search);
g_free (path_utf16);
g_free (dir);
return NULL;
}
/* now get files */
FindClose (dir->handle);
path_utf16_search = g_malloc ((wcslen(path_utf16) + 3)*sizeof(gunichar2));
wcscpy (path_utf16_search, path_utf16);
wcscat (path_utf16_search, L"\\*");
dir->handle = FindFirstFile (path_utf16_search, &find_data);
g_free (path_utf16_search);
g_free (path_utf16);
while ((wcscmp (find_data.cFileName, L".") == 0) || (wcscmp (find_data.cFileName, L"..") == 0)) {
if (!FindNextFile (dir->handle, &find_data)) {
if (!FindNextFileW (dir->handle, &find_data)) {
if (error) {
gint err = errno;
*error = g_error_new (G_LOG_DOMAIN, g_file_error_from_errno (err), strerror (err));
}
g_free (dir);
g_free (path_utf16);
return NULL;
}
}
dir->current = NULL;
dir->next = u16to8 (find_data.cFileName);
g_free (path_utf16);
return dir;
}
@@ -113,7 +107,7 @@ g_dir_read_name (GDir *dir)
dir->next = NULL;
do {
if (!FindNextFile (dir->handle, &find_data)) {
if (!FindNextFileW (dir->handle, &find_data)) {
dir->next = NULL;
return dir->current;
}
+15 -1
View File
@@ -47,6 +47,20 @@ g_error_new (gpointer domain, gint code, const char *format, ...)
return err;
}
static GError *
g_error_vnew (gpointer domain, gint code, const char *format, va_list ap)
{
GError *err = g_new (GError, 1);
err->domain = domain;
err->code = code;
if (vasprintf (&err->message, format, ap) == -1)
err->message = g_strdup_printf ("internal: invalid format string %s", format);
return err;
}
void
g_clear_error (GError **error)
{
@@ -72,7 +86,7 @@ g_set_error (GError **err, gpointer domain, gint code, const gchar *format, ...)
if (err) {
va_start (args, format);
*err = g_error_new (domain, code, format, args);
*err = g_error_vnew (domain, code, format, args);
va_end (args);
}
}
+66 -2
View File
@@ -51,6 +51,12 @@ struct _GHashTable {
GDestroyNotify value_destroy_func, key_destroy_func;
};
typedef struct {
GHashTable *ht;
int slot_index;
Slot *slot;
} Iter;
static const guint prime_tbl[] = {
11, 19, 37, 73, 109, 163, 251, 367, 557, 823, 1237,
1861, 2777, 4177, 6247, 9371, 14057, 21089, 31627,
@@ -334,6 +340,23 @@ g_hash_table_find (GHashTable *hash, GHRFunc predicate, gpointer user_data)
return NULL;
}
void
g_hash_table_remove_all (GHashTable *hash)
{
int i;
g_return_if_fail (hash != NULL);
for (i = 0; i < hash->table_size; i++){
Slot *s;
while (hash->table [i]) {
s = hash->table [i];
g_hash_table_remove (hash, s->key);
}
}
}
gboolean
g_hash_table_remove (GHashTable *hash, gconstpointer key)
{
@@ -500,6 +523,47 @@ g_hash_table_print_stats (GHashTable *table)
printf ("Size: %d Table Size: %d Max Chain Length: %d at %d\n", table->in_use, table->table_size, max_chain_size, max_chain_index);
}
void
g_hash_table_iter_init (GHashTableIter *it, GHashTable *hash_table)
{
Iter *iter = (Iter*)it;
memset (iter, 0, sizeof (Iter));
iter->ht = hash_table;
iter->slot_index = -1;
}
gboolean g_hash_table_iter_next (GHashTableIter *it, gpointer *key, gpointer *value)
{
Iter *iter = (Iter*)it;
GHashTable *hash = iter->ht;
g_assert (iter->slot_index != -2);
g_assert (sizeof (Iter) <= sizeof (GHashTableIter));
if (!iter->slot) {
while (TRUE) {
iter->slot_index ++;
if (iter->slot_index >= hash->table_size) {
iter->slot_index = -2;
return FALSE;
}
if (hash->table [iter->slot_index])
break;
}
iter->slot = hash->table [iter->slot_index];
}
if (key)
*key = iter->slot->key;
if (value)
*value = iter->slot->value;
iter->slot = iter->slot->next;
return TRUE;
}
gboolean
g_direct_equal (gconstpointer v1, gconstpointer v2)
{
@@ -515,13 +579,13 @@ g_direct_hash (gconstpointer v1)
gboolean
g_int_equal (gconstpointer v1, gconstpointer v2)
{
return GPOINTER_TO_INT (v1) == GPOINTER_TO_INT (v2);
return *(gint *)v1 == *(gint *)v2;
}
guint
g_int_hash (gconstpointer v1)
{
return GPOINTER_TO_UINT(v1);
return *(guint *)v1;
}
gboolean
+56 -6
View File
@@ -16,6 +16,10 @@
/* For pid_t */
#ifndef WIN32
#include <unistd.h>
#else
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#endif
#endif
@@ -24,6 +28,10 @@
#include <eglib-remap.h>
#endif
#ifdef G_HAVE_ALLOCA_H
#include <alloca.h>
#endif
#ifndef offsetof
# define offsetof(s_name,n_name) (size_t)(char *)&(((s_name*)0)->m_name)
#endif
@@ -85,7 +93,6 @@ typedef int32_t gboolean;
#endif
#endif
/*
* Macros
*/
@@ -123,11 +130,11 @@ typedef int32_t gboolean;
* Allocation
*/
void g_free (void *ptr);
static inline gpointer g_realloc (gpointer obj, gsize size) { if (!size) {g_free (obj); return 0;} return realloc (obj, size);}
static inline gpointer g_malloc (gsize x) {if (x) return malloc (x); else return 0;}
static inline gpointer g_malloc0 (gsize x) {if (x) return calloc(1,x); else return 0;}
#define g_try_malloc(x) g_malloc(x)
#define g_try_realloc(obj,size) g_realloc((obj),(size))
gpointer g_realloc (gpointer obj, gsize size);
gpointer g_malloc (gsize x);
gpointer g_malloc0 (gsize x);
gpointer g_try_malloc (gsize x);
gpointer g_try_realloc (gpointer obj, gsize size);
#define g_new(type,size) ((type *) g_malloc (sizeof (type) * (size)))
#define g_new0(type,size) ((type *) g_malloc0 (sizeof (type)* (size)))
@@ -178,6 +185,14 @@ gchar* g_win32_getlocale(void);
* Hashtables
*/
typedef struct _GHashTable GHashTable;
typedef struct _GHashTableIter GHashTableIter;
/* Private, but needed for stack allocation */
struct _GHashTableIter
{
gpointer dummy [8];
};
typedef void (*GFunc) (gpointer data, gpointer user_data);
typedef gint (*GCompareFunc) (gconstpointer a, gconstpointer b);
typedef gint (*GCompareDataFunc) (gconstpointer a, gconstpointer b, gpointer user_data);
@@ -198,11 +213,15 @@ gboolean g_hash_table_lookup_extended (GHashTable *hash, gconstpointer ke
void g_hash_table_foreach (GHashTable *hash, GHFunc func, gpointer user_data);
gpointer g_hash_table_find (GHashTable *hash, GHRFunc predicate, gpointer user_data);
gboolean g_hash_table_remove (GHashTable *hash, gconstpointer key);
void g_hash_table_remove_all (GHashTable *hash);
guint g_hash_table_foreach_remove (GHashTable *hash, GHRFunc func, gpointer user_data);
guint g_hash_table_foreach_steal (GHashTable *hash, GHRFunc func, gpointer user_data);
void g_hash_table_destroy (GHashTable *hash);
void g_hash_table_print_stats (GHashTable *table);
void g_hash_table_iter_init (GHashTableIter *iter, GHashTable *hash_table);
gboolean g_hash_table_iter_next (GHashTableIter *iter, gpointer *key, gpointer *value);
guint g_spaced_primes_closest (guint x);
#define g_hash_table_insert(h,k,v) g_hash_table_insert_replace ((h),(k),(v),FALSE)
@@ -434,6 +453,20 @@ GList *g_list_insert_before (GList *list,
GList *g_list_sort (GList *sort,
GCompareFunc func);
/*
* ByteArray
*/
typedef struct _GByteArray GByteArray;
struct _GByteArray {
guint8 *data;
gint len;
};
GByteArray *g_byte_array_new (void);
GByteArray* g_byte_array_append (GByteArray *array, const guint8 *data, guint len);
guint8* g_byte_array_free (GByteArray *array, gboolean free_segment);
/*
* Array
*/
@@ -496,6 +529,7 @@ void g_queue_push_tail (GQueue *queue,
gboolean g_queue_is_empty (GQueue *queue);
GQueue *g_queue_new (void);
void g_queue_free (GQueue *queue);
void g_queue_foreach (GQueue *queue, GFunc func, gpointer user_data);
/*
* Messages
@@ -542,6 +576,8 @@ void g_assertion_message (const gchar *format, ...) G_GNUC_NORETURN
#endif /* ndef HAVE_C99_SUPPORT */
#define g_log_set_handler(a,b,c,d)
#define G_GNUC_INTERNAL
/*
* Conversions
*/
@@ -891,16 +927,30 @@ glong g_utf8_strlen (const gchar *str, gssize max);
# define GUINT16_TO_LE(x) (x)
# define GUINT_TO_LE(x) (x)
# define GUINT32_TO_BE(x) GUINT32_SWAP_LE_BE(x)
# define GUINT16_FROM_BE(x) GUINT16_SWAP_LE_BE(x)
# define GUINT32_FROM_BE(x) GUINT32_SWAP_LE_BE(x)
# define GUINT64_FROM_BE(x) GUINT64_SWAP_LE_BE(x)
# define GINT16_FROM_BE(x) GUINT16_SWAP_LE_BE(x)
# define GINT32_FROM_BE(x) GUINT32_SWAP_LE_BE(x)
# define GINT64_FROM_BE(x) GUINT64_SWAP_LE_BE(x)
#else
# define GUINT32_TO_LE(x) GUINT32_SWAP_LE_BE(x)
# define GUINT64_TO_LE(x) GUINT64_SWAP_LE_BE(x)
# define GUINT16_TO_LE(x) GUINT16_SWAP_LE_BE(x)
# define GUINT_TO_LE(x) GUINT32_SWAP_LE_BE(x)
# define GUINT32_TO_BE(x) (x)
# define GUINT16_FROM_BE(x) (x)
# define GUINT32_FROM_BE(x) (x)
# define GUINT64_FROM_BE(x) (x)
# define GINT16_FROM_BE(x) (x)
# define GINT32_FROM_BE(x) (x)
# define GINT64_FROM_BE(x) (x)
#endif
#define GINT64_FROM_LE(x) (GUINT64_TO_LE (x))
#define GINT32_FROM_LE(x) (GUINT32_TO_LE (x))
#define GINT16_FROM_LE(x) (GUINT16_TO_LE (x))
#define GUINT32_FROM_LE(x) (GUINT32_TO_LE (x))
#define GUINT64_FROM_LE(x) (GUINT64_TO_LE (x))
#define GUINT16_FROM_LE(x) (GUINT16_TO_LE (x))
+52
View File
@@ -51,3 +51,55 @@ g_memdup (gconstpointer mem, guint byte_size)
return ptr;
}
gpointer g_realloc (gpointer obj, gsize size)
{
gpointer ptr;
if (!size) {
g_free (obj);
return 0;
}
ptr = realloc (obj, size);
if (ptr)
return ptr;
g_error ("Could not allocate %i bytes", size);
}
gpointer
g_malloc (gsize x)
{
gpointer ptr;
if (!x)
return 0;
ptr = malloc (x);
if (ptr)
return ptr;
g_error ("Could not allocate %i bytes", x);
}
gpointer g_malloc0 (gsize x)
{
gpointer ptr;
if (!x)
return 0;
ptr = calloc(1,x);
if (ptr)
return ptr;
g_error ("Could not allocate %i bytes", x);
}
gpointer g_try_malloc (gsize x)
{
if (x)
return malloc (x);
return 0;
}
gpointer g_try_realloc (gpointer obj, gsize size)
{
if (!size) {
g_free (obj);
return 0;
}
return realloc (obj, size);
}
+39 -21
View File
@@ -72,39 +72,57 @@ g_path_is_absolute (const char *filename)
return (*filename == '/');
}
static pthread_mutex_t home_lock = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t pw_lock = PTHREAD_MUTEX_INITIALIZER;
static const gchar *home_dir;
static const gchar *user_name;
static void
get_pw_data (void)
{
#ifdef HAVE_GETPWUID_R
struct passwd pw;
struct passwd *result;
char buf [4096];
#endif
if (user_name != NULL)
return;
pthread_mutex_lock (&pw_lock);
if (user_name != NULL) {
pthread_mutex_unlock (&pw_lock);
return;
}
#ifdef HAVE_GETPWUID_R
if (getpwuid_r (getuid (), &pw, buf, 4096, &result) == 0) {
home_dir = g_strdup (pw.pw_dir);
user_name = g_strdup (pw.pw_name);
}
#endif
if (home_dir == NULL)
home_dir = g_getenv ("HOME");
if (user_name == NULL) {
user_name = g_getenv ("USER");
if (user_name == NULL)
user_name = "somebody";
}
pthread_mutex_unlock (&pw_lock);
}
/* Give preference to /etc/passwd than HOME */
const gchar *
g_get_home_dir (void)
{
if (home_dir == NULL){
pthread_mutex_lock (&home_lock);
if (home_dir == NULL){
#ifdef HAVE_GETPWUID_R
struct passwd pw;
struct passwd *result;
char buf [4096];
if (getpwuid_r (getuid (), &pw, buf, 4096, &result) == 0)
home_dir = g_strdup (pw.pw_dir);
#endif
if (home_dir == NULL)
home_dir = g_getenv ("HOME");
}
pthread_mutex_unlock (&home_lock);
}
get_pw_data ();
return home_dir;
}
const char *
g_get_user_name (void)
{
const char *retName = g_getenv ("USER");
if (!retName)
retName = "somebody";
return retName;
get_pw_data ();
return user_name;
}
static const char *tmp_dir;
+1 -1
View File
@@ -153,6 +153,6 @@ g_assertion_message (const gchar *format, ...)
va_start (args, format);
g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, format, args);
va_end (args);
g_assert_not_reached ();
abort ();
}
+6
View File
@@ -105,3 +105,9 @@ g_queue_free (GQueue *queue)
g_list_free (queue->head);
g_free (queue);
}
void
g_queue_foreach (GQueue *queue, GFunc func, gpointer user_data)
{
g_list_foreach (queue->head, func, user_data);
}
+24 -13
View File
@@ -33,8 +33,7 @@ split_cmdline (const gchar *cmdline, GPtrArray *array, GError **error)
{
gchar *ptr;
gchar c;
gboolean in_quote = FALSE;
gboolean escaped = FALSE;
gboolean escaped = FALSE, fresh = TRUE;
gchar quote_char = '\0';
GString *str;
@@ -42,18 +41,30 @@ split_cmdline (const gchar *cmdline, GPtrArray *array, GError **error)
ptr = (gchar *) cmdline;
while ((c = *ptr++) != '\0') {
if (escaped) {
escaped = FALSE;
if (!g_ascii_isspace (c))
/*
* \CHAR is only special inside a double quote if CHAR is
* one of: $`"\ and newline
*/
if (quote_char == '\"'){
if (!(c == '$' || c == '`' || c == '"' || c == '\\'))
g_string_append_c (str, '\\');
g_string_append_c (str, c);
} else if (in_quote) {
if (c == quote_char) {
in_quote = FALSE;
quote_char = '\0';
g_ptr_array_add (array, g_string_free (str, FALSE));
str = g_string_new ("");
} else {
g_string_append_c (str, c);
if (!g_ascii_isspace (c))
g_string_append_c (str, c);
}
escaped = FALSE;
} else if (quote_char) {
if (c == quote_char) {
quote_char = '\0';
if (fresh && g_ascii_isspace (*ptr)){
g_ptr_array_add (array, g_string_free (str, FALSE));
str = g_string_new ("");
}
} else if (c == '\\'){
escaped = TRUE;
} else
g_string_append_c (str, c);
} else if (g_ascii_isspace (c)) {
if (str->len > 0) {
g_ptr_array_add (array, g_string_free (str, FALSE));
@@ -62,7 +73,7 @@ split_cmdline (const gchar *cmdline, GPtrArray *array, GError **error)
} else if (c == '\\') {
escaped = TRUE;
} else if (c == '\'' || c == '"') {
in_quote = TRUE;
fresh = str->len == 0;
quote_char = c;
} else {
g_string_append_c (str, c);
@@ -76,7 +87,7 @@ split_cmdline (const gchar *cmdline, GPtrArray *array, GError **error)
return -1;
}
if (in_quote) {
if (quote_char) {
if (error)
*error = g_error_new (G_LOG_DOMAIN, 0, "Unfinished quote.");
g_string_free (str, TRUE);
+4
View File
@@ -69,6 +69,10 @@ g_strdupv (gchar **str_array)
guint length;
gchar **ret;
guint i;
if (!str_array)
return NULL;
length = g_strv_length(str_array);
ret = g_new0(gchar *, length + 1);
for (i = 0; str_array[i]; i++) {
+10 -3
View File
@@ -53,6 +53,9 @@
# ifdef HAVE_ICONV_H
# include <iconv.h>
# endif
# ifdef HAVE_LOCALCHARSET_H
# include <localcharset.h>
# endif
#endif
static char *my_charset;
@@ -217,8 +220,10 @@ g_convert (const gchar *str, gssize len,
convertor = iconv_open (to_codeset, from_codeset);
if (convertor == (iconv_t) -1){
*bytes_written = 0;
*bytes_read = 0;
if (bytes_written)
*bytes_written = 0;
if (bytes_read)
*bytes_read = 0;
return NULL;
}
@@ -303,7 +308,9 @@ g_get_charset (G_CONST_RETURN char **charset)
#else
if (my_charset == NULL){
/* These shouldn't be heap allocated */
#if HAVE_LANGINFO_H
#if HAVE_LOCALCHARSET_H
my_charset = locale_charset ();
#elif defined(HAVE_LANGINFO_H)
my_charset = nl_langinfo (CODESET);
#else
my_charset = "UTF-8";
+10 -3
View File
@@ -65,7 +65,7 @@ utf8_to_utf16_len (const gchar *str, glong len, glong *items_read, GError **erro
glong in_pos, ret;
if (len < 0)
len = strlen (str);
len = (glong) strlen (str);
in_pos = 0;
ret = 0;
@@ -74,8 +74,11 @@ utf8_to_utf16_len (const gchar *str, glong len, glong *items_read, GError **erro
for (in_pos = 0; in_pos < len && str [in_pos] < 0x80; in_pos++)
ret ++;
if (in_pos == len)
if (in_pos == len) {
if (items_read)
*items_read = in_pos;
return ret;
}
mb_size = 0;
mb_remain = 0;
@@ -212,8 +215,10 @@ g_utf8_to_utf16 (const gchar *str, glong len, glong *items_read, glong *items_wr
*error = NULL;
if (len < 0)
len = strlen (str);
len = (glong) strlen (str);
if (items_read)
*items_read = 0;
if (items_written)
*items_written = 0;
utf16_len = utf8_to_utf16_len (str, len, items_read, error);
@@ -311,6 +316,8 @@ g_utf16_to_utf8 (const gunichar2 *str, glong len, glong *items_read, glong *item
out_pos = 0;
surrogate = FALSE;
if (items_read)
*items_read = 0;
if (items_written)
*items_written = 0;
utf8_len = utf16_to_utf8_len (str, len, items_read, error);
+1 -1
View File
@@ -9,7 +9,7 @@ int vasprintf(char **ret, const char *fmt, va_list ap)
size_t buflen;
va_list ap2;
#ifdef _MSC_VER
#if defined(_MSC_VER) || defined(__MINGW64_VERSION_MAJOR)
ap2 = ap;
len = _vscprintf(fmt, ap2); // NOTE MS specific extension ( :-( )
#else
+1 -1
View File
@@ -29,7 +29,7 @@ SOURCES = \
test_eglib_SOURCES = $(SOURCES)
test_eglib_CFLAGS = -Wall -Werror -D_FORTIFY_SOURCE=2 -I$(srcdir)/../src -I../src -DDRIVER_NAME=\"EGlib\"
test_eglib_CFLAGS = -Wall -D_FORTIFY_SOURCE=2 -I$(srcdir)/../src -I../src -DDRIVER_NAME=\"EGlib\"
test_eglib_LDADD = ../src/libeglib.la
run-eglib: all
+33
View File
@@ -131,12 +131,45 @@ RESULT hash_grow (void)
return NULL;
}
RESULT hash_iter (void)
{
#if !defined(GLIB_MAJOR_VERSION) || GLIB_CHECK_VERSION(2, 16, 0)
GHashTable *hash = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, NULL);
GHashTableIter iter;
int i, sum, keys_sum, values_sum;
gpointer key, value;
sum = 0;
for (i = 0; i < 1000; i++) {
sum += i;
g_hash_table_insert (hash, GUINT_TO_POINTER (i), GUINT_TO_POINTER (i));
}
keys_sum = values_sum = 0;
g_hash_table_iter_init (&iter, hash);
while (g_hash_table_iter_next (&iter, &key, &value)) {
if (key != value)
return FAILED ("key != value");
keys_sum += GPOINTER_TO_UINT (key);
values_sum += GPOINTER_TO_UINT (value);
}
if (keys_sum != sum || values_sum != sum)
return FAILED ("Did not find all key-value pairs");
g_hash_table_destroy (hash);
return NULL;
#else
/* GHashTableIter was added in glib 2.16 */
return NULL;
#endif
}
static Test hashtable_tests [] = {
{"t1", hash_t1},
{"t2", hash_t2},
{"grow", hash_grow},
{"default", hash_default},
{"null_lookup", hash_null_lookup},
{"iter", hash_iter},
{NULL, NULL}
};
+91 -12
View File
@@ -55,7 +55,7 @@ test_shell_argv1 ()
if (!ret)
return FAILED ("11. It should return TRUE");
if (argc != 2)
return FAILED ("12. argc was %d", argc);
return FAILED ("12. argc was %d expected 2", argc);
if (strcmp (argv [0], "hola"))
return FAILED ("13. argv[0] was %s", argv [0]);
if (strcmp (argv [1], "bola"))
@@ -72,7 +72,7 @@ test_shell_argv1 ()
if (!ret)
return FAILED ("16. It should return TRUE");
if (argc != 3)
return FAILED ("17. argc was %d", argc);
return FAILED ("17. argc was %d expected 3", argc);
if (strcmp (argv [0], "hola"))
return FAILED ("18. argv[0] was %s", argv [0]);
if (strcmp (argv [1], ""))
@@ -85,6 +85,19 @@ test_shell_argv1 ()
g_strfreev (argv);
argv = NULL;
argc = 0;
error = NULL;
ret = g_shell_parse_argv ("hola'' bola", &argc, &argv, &error);
if (!ret)
return FAILED ("21. It should return TRUE");
if (argc != 2)
return FAILED ("22. argc was %d expected 2", argc);
if (strcmp (argv [0], "hola"))
return FAILED ("23. argv[0] was %s", argv [0]);
if (strcmp (argv [1], "bola"))
return FAILED ("24. argv[2] was %s", argv [1]);
if (error != NULL)
return FAILED ("25. error is not null");
return OK;
}
@@ -103,7 +116,7 @@ test_shell_argv2 ()
if (!ret)
return FAILED ("1. It should return TRUE");
if (argc != 2)
return FAILED ("2. argc was %d", argc);
return FAILED ("2. argc was %d expected 2", argc);
if (strcmp (argv [0], "hola"))
return FAILED ("3. argv[0] was %s", argv [0]);
if (strcmp (argv [1], "bola"))
@@ -119,7 +132,7 @@ test_shell_argv2 ()
if (!ret)
return FAILED ("6. It should return TRUE");
if (argc != 3)
return FAILED ("7. argc was %d", argc);
return FAILED ("7. argc was %d expected 3", argc);
if (strcmp (argv [0], "hola"))
return FAILED ("8. argv[0] was %s", argv [0]);
if (strcmp (argv [1], ""))
@@ -137,7 +150,7 @@ test_shell_argv2 ()
if (!ret)
return FAILED ("10. It should return TRUE");
if (argc != 3)
return FAILED ("11. argc was %d", argc);
return FAILED ("11. argc was %d expected 3", argc);
if (strcmp (argv [0], "hola"))
return FAILED ("12. argv[0] was %s", argv [0]);
if (strcmp (argv [1], "\t"))
@@ -155,7 +168,7 @@ test_shell_argv2 ()
if (!ret)
return FAILED ("16. It should return TRUE");
if (argc != 3)
return FAILED ("17. argc was %d", argc);
return FAILED ("17. argc was %d expected 3", argc);
if (strcmp (argv [0], "hola"))
return FAILED ("18. argv[0] was %s", argv [0]);
if (strcmp (argv [1], "\t"))
@@ -184,7 +197,7 @@ test_shell_argv3 ()
if (ret)
return FAILED ("1. It should return FALSE");
if (argc != 0)
return FAILED ("2. argc was %d", argc);
return FAILED ("2. argc was %d expected 0", argc);
if (argv != NULL)
return FAILED ("3. argv[0] was %s", argv [0]);
if (error == NULL)
@@ -197,7 +210,7 @@ test_shell_argv3 ()
if (!ret)
return FAILED ("5. It should return TRUE");
if (argc != 2)
return FAILED ("6. argc was %d", argc);
return FAILED ("6. argc was %d expected 2", argc);
if (strcmp (argv [0], "hola"))
return FAILED ("18. argv[0] was %s", argv [0]);
if (strcmp (argv [1], "\"bola"))
@@ -212,7 +225,7 @@ test_shell_argv3 ()
if (!ret)
return FAILED ("9. It should return TRUE. %s", error->message);
if (argc != 2)
return FAILED ("10. argc was %d", argc);
return FAILED ("10. argc was %d expected 2", argc);
if (strcmp (argv [0], "hola"))
return FAILED ("11. argv[0] was %s", argv [0]);
if (strcmp (argv [1], "\n\\'bola"))
@@ -226,6 +239,70 @@ test_shell_argv3 ()
return OK;
}
// This was the 2.8 showstopper error
RESULT
test_shell_argv4 ()
{
GError *error;
gint argc;
gchar **argv;
gboolean ret;
char *str = "'/usr/bin/gnome-terminal' -e \"bash -c 'read -p \\\"Press any key to continue...\\\" -n1;'\"";
argv = NULL;
argc = 0;
error = NULL;
ret = g_shell_parse_argv (str, &argc, &argv, &error);
if (!ret)
return FAILED ("1. It should return TRUE");
if (argc != 3)
return FAILED ("2. argc was %d expected 3", argc);
if (argv == NULL)
return FAILED ("3. argv[0] was NULL");
if (error != NULL)
return FAILED ("4. error was set");
if (strcmp (argv [0], "/usr/bin/gnome-terminal"))
return FAILED ("5. Expected /usr/bin/gnome-terminal got %s", argv [0]);
if (strcmp (argv [1], "-e"))
return FAILED ("6. Expected -e, got: %s", argv [1]);
if (strcmp (argv [2], "bash -c 'read -p \"Press any key to continue...\" -n1;'"))
return FAILED ("7. Got unexpected result: %s\n", argv [2]);
return OK;
}
// This is https://bugzilla.novell.com/show_bug.cgi?id=655896
RESULT
test_shell_argv5 ()
{
GError *error;
gint argc;
gchar **argv;
gboolean ret;
char *str = "echo \"foo\",\"bar\"";
argv = NULL;
argc = 0;
error = NULL;
ret = g_shell_parse_argv (str, &argc, &argv, &error);
if (!ret)
return FAILED ("1. It should return TRUE");
if (argc != 2)
return FAILED ("2. argc was %d expected 2", argc);
if (argv == NULL)
return FAILED ("3. argv[0] was NULL");
if (error != NULL)
return FAILED ("4. error was set");
if (strcmp (argv [0], "echo"))
return FAILED ("5. Expected echo got %s", argv [0]);
if (strcmp (argv [1], "foo,bar"))
return FAILED ("6. Expected foo,bar, got: %s", argv [1]);
return OK;
}
RESULT
test_quote ()
{
@@ -241,9 +318,11 @@ test_quote ()
}
static Test shell_tests [] = {
{"g_shell_parse_argv1", test_shell_argv1},
{"g_shell_parse_argv2", test_shell_argv2},
{"g_shell_parse_argv3", test_shell_argv3},
{"test_shell_argv1", test_shell_argv1},
{"test_shell_argv2", test_shell_argv2},
{"test_shell_argv3", test_shell_argv3},
{"test_shell_argv4", test_shell_argv4},
{"test_shell_argv5", test_shell_argv5},
{"g_shell_quote", test_quote},
{NULL, NULL}
};
+25
View File
@@ -621,6 +621,30 @@ test_ascii_strdown ()
return OK;
}
RESULT
test_strdupv ()
{
gchar **one;
gchar **two;
gint len;
one = g_strdupv (NULL);
if (one)
return FAILED ("Should have been NULL");
one = g_malloc (sizeof (gchar *));
*one = NULL;
two = g_strdupv (one);
if (!two)
FAILED ("Should have been not NULL");
len = g_strv_length (two);
if (len)
FAILED ("Should have been 0");
g_strfreev (two);
g_strfreev (one);
return NULL;
}
static Test strutil_tests [] = {
{"g_strfreev", test_strfreev},
{"g_strconcat", test_concat},
@@ -639,6 +663,7 @@ static Test strutil_tests [] = {
{"g_strescape", test_strescape},
{"g_ascii_strncasecmp", test_ascii_strncasecmp },
{"g_ascii_strdown", test_ascii_strdown },
{"g_strdupv", test_strdupv },
{NULL, NULL}
};
-4
View File
@@ -1,4 +0,0 @@
ADD_DEFINITIONS(${GMODULE_CFLAGS})
ADD_LIBRARY(ikvm_native SHARED jni.c os.c jni.h)
TARGET_LINK_LIBRARIES(ikvm_native ${GMODULE_LIBS})
+1
View File
@@ -22,3 +22,4 @@
/autom4te.cache
/libgc-mono.pc
/libgc-mono-*.tar.gz
dolt*
-196
View File
@@ -1,196 +0,0 @@
# based on configure.in/Makefile.am, which is:
# Copyright (c) 1999-2001 by Red Hat, Inc. All rights reserved.
#
# THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
# OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
#
# Permission is hereby granted to use or copy this program
# for any purpose, provided the above notices are retained on all copies.
# Permission to modify the code and to distribute modified code is granted,
# provided the above notices are retained, and a notice that the code was
# modified is included with the above copyright notice.
#
# Original author: Tom Tromey
# Modified by: Grzegorz Jakacki <jakacki at acm dot org>
# This is in sync with the configure.in/Makefile.am at r135583
#
# This is a cmake build file for libgc
# Only the functionality needed by mono is supported
#
# FIXME:
add_definitions("-g -O2")
set(THREADS ${libgc_threads})
set(THREADDLLIBS "")
if (THREADS STREQUAL "no" OR THREADS STREQUAL "none" OR THREADS STREQUAL "single")
set(THREADS none)
endif()
if (THREADS STREQUAL "posix" OR THREADS STREQUAL "pthreads")
set(THREADS posix)
set(THREADDLLIBS "-lpthread")
if (${host} MATCHES "x86-.*-linux.*|ia64-.*-linux.*|i386-.*-linux.*|i486-.*-linux.*|i586-.*-linux.*|i686-.*-linux.*|x86_64-.*-linux.*|alpha.*-.*-linux.*|s390.*-.*-linux.*|sparc.*-.*-linux.*|powerpc-.*-linux.*")
add_definitions(-DGC_LINUX_THREADS -D_REENTRANT)
set(parallel_mark_supported yes)
add_definitions(-DTHREAD_LOCAL_ALLOC)
elseif(${host} MATCHES ".*-linux.*")
add_definitions(-DGC_LINUX_THREADS -D_REENTRANT)
elseif(${host} MATCHES ".*-aix.*")
add_definitions(-DGC_AIX_THREADS -D_REENTRANT)
elseif(${host} MATCHES ".*-hpux.*")
message("Only HP/UX 11 threads are supported.")
add_definitions(-DGC_HPUX_THREADS -D_REENTRANT -D_POSIX_C_SOURCE=199506L)
add_definitions(-DTHREAD_LOCAL_ALLOC)
set(parallel_mark_supported yes)
set(THREADDLLIBS "-lpthread -lrt")
elseif(${host} ".*-.*-freebsd.*")
add_definitions(-DGC_FREEBSD_THREADS)
message(FATAL_ERROR "todo")
### if test "x$PTHREAD_CFLAGS" != "x"; then
### INCLUDES="$INCLUDES $PTHREAD_CFLAGS"
### fi
### if test "x$PTHREAD_LIBS" = "x"; then
### THREADDLLIBS=-pthread
### else
### THREADDLLIBS="$PTHREAD_LIBS"
### fi
elseif(${host} ".*-.*-freebsd.*")
add_definitions(-DGC_SOLARIS_THREADS -DGC_SOLARIS_PTHREADS)
elseif(${host} ".*-.*-irix.*")
add_definitions(-DGC_IRIX_THREADS)
elseif(${host} ".*-.*-cygwin.*")
add_definitons(-DGC_WIN32_THREADS)
elseif(${host} ".*-.*-darwin.*")
add_definitons(-DGC_DARWIN_THREADS -DTHREAD_LOCAL_ALLOC)
set(parallel_mark_supported yes)
elseif(${host} ".*-.*-netbsd.*")
add_definitions(-DGC_NETBSD_THREADS -DTHREAD_LOCAL_ALLOC)
set(parallel_mark_supported yes)
elseif(${host} ".*-.*-osf.*")
add_definitions(GC_OSF1_THREADS -DTHREAD_LOCAL_ALLOC)
set(parallel_mark_supported yes)
add_definitions(-pthread)
set(THREADDLLIBS "-lpthread -lrt")
else()
message(FATAL_ERROR "Pthreads not supported by the GC on this platform.")
endif()
endif()
if(THREADS STREQUAL "win32")
add_definitions(GC_WIN32_THREADS)
# Wine getenv may not return NULL for missing entry
add_definitions(NO_GETENV)
if (enable_win32_dllmain)
add_definitions(gc_inside_dll)
endif()
endif()
if(${host} MATCHES "powerpc-.*-darwin.*")
set(powerpc_darwin yes)
endif()
if(parallel_mark_supported AND enable_parallel_mark)
add_definitions("-DPARALLEL_MARK")
endif()
# Configuration of machine-dependent code
ac_msg_checking("which machine-dependent code should be used")
###AC_MSG_CHECKING(
###machdep=
###case "$host" in
### alpha-*-openbsd*)
### machdep="alpha_mach_dep.lo"
### if test x"${ac_cv_lib_dl_dlopen}" != xyes ; then
### AC_MSG_WARN(OpenBSD/Alpha without dlopen(). Shared library support is disabled)
### fi
### ;;
### alpha*-*-linux*)
### machdep="alpha_mach_dep.lo"
### ;;
### i?86-*-solaris2.[[89]]|i?86-*-solaris2.1?)
### AC_DEFINE(SOLARIS25_PROC_VDB_BUG_FIXED)
### ;;
### mipstx39-*-elf*)
### machdep="mips_ultrix_mach_dep.lo"
### AC_DEFINE(STACKBASE, __stackbase)
### AC_DEFINE(DATASTART_IS_ETEXT)
### ;;
### mips-dec-ultrix*)
### machdep="mips_ultrix_mach-dep.lo"
### ;;
### mips-nec-sysv*|mips-unknown-sysv*)
### ;;
### mips*-*-linux*)
### ;;
### mips-*-*)
### machdep="mips_sgi_mach_dep.lo"
### AC_DEFINE(NO_EXECUTE_PERMISSION)
### ;;
### sparc-*-netbsd*)
### machdep="sparc_netbsd_mach_dep.lo"
### ;;
### sparc-sun-solaris2.3)
### machdep="sparc_mach_dep.lo"
### AC_DEFINE(SUNOS53_SHARED_LIB)
### ;;
### sparc*-sun-solaris2.*)
### machdep="sparc_mach_dep.lo"
### ;;
### ia64-*-*)
### machdep="mach_dep.lo ia64_save_regs_in_stack.lo"
### ;;
###esac
if(NOT machdep)
set(machdep "mach_dep.c")
endif()
ac_msg_result("${machdep}")
ac_msg_checking("for threads package to use")
ac_msg_result("${THREADS}")
# Include defines that have become de facto standard.
# ALL_INTERIOR_POINTERS can be overridden in startup code.
add_definitions(-DSILENT -DNO_SIGNALS -DNO_EXECUTE_PERMISSION)
# AC_DEFINE(ALL_INTERIOR_POINTERS)
# By default, make the library as general as possible.
add_definitions(-DJAVA_FINALIZATION -DGC_GCJ_SUPPORT -DATOMIC_UNCOLLECTABLE)
add_definitions(-D_IN_LIBGC)
set(SUBDIRS include doc)
foreach(dir ${SUBDIRS})
add_subdirectory(${dir})
endforeach()
set(top_srcdir ../)
# .. is needed for mono/utils/mono-compiler.h
INCLUDE_DIRECTORIES(. .. include)
add_definitions(${CPPFLAGS})
if(powerpc_darwin)
set(asm_libgc_sources powerpc_darwin_mach_dep.s)
endif()
set(libmonogc_la_SOURCES
allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c
dyn_load.c finalize.c gc_dlopen.c gcj_mlc.c headers.c
malloc.c mallocx.c mark.c mark_rts.c misc.c new_hblk.c
obj_map.c os_dep.c pcr_interface.c ptr_chck.c real_malloc.c reclaim.c
solaris_pthreads.c solaris_threads.c specific.c stubborn.c typd_mlc.c
backgraph.c win32_threads.c
pthread_support.c pthread_stop_world.c darwin_stop_world.c
${asm_libgc_sources} ${machdep})
add_library(monogc-static STATIC ${libmonogc_la_SOURCES})
target_link_libraries (${THREADDLLIBS} ${UNWINDLIBS})
+9 -7
View File
@@ -36,8 +36,10 @@ EXTRA_DIST =
if POWERPC_DARWIN
asm_libgc_sources = powerpc_darwin_mach_dep.s
else
asm_libgc_sources =
endif
if TARGET_IA64
asm_libgc_sources = ia64_save_regs_in_stack.s
endif
libmonogc_la_SOURCES = allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c \
@@ -47,12 +49,12 @@ obj_map.c os_dep.c pcr_interface.c ptr_chck.c real_malloc.c reclaim.c \
solaris_pthreads.c solaris_threads.c specific.c stubborn.c typd_mlc.c \
backgraph.c win32_threads.c \
pthread_support.c pthread_stop_world.c darwin_stop_world.c \
$(asm_libgc_sources)
openbsd_stop_world.c mach_dep.c $(asm_libgc_sources)
# Include THREADDLLIBS here to ensure that the correct versions of
# linuxthread semaphore functions get linked:
libmonogc_la_LIBADD = @addobjs@ $(THREADDLLIBS) $(UNWINDLIBS)
libmonogc_la_DEPENDENCIES = @addobjs@
libmonogc_la_LIBADD = $(THREADDLLIBS) $(UNWINDLIBS)
libmonogc_la_DEPENDENCIES =
libmonogc_la_LDFLAGS = -version-info 1:2:0
EXTRA_libmonogc_la_SOURCES = alpha_mach_dep.S \
@@ -93,7 +95,7 @@ endif
#TESTS = gctest $(extra_checks)
## FIXME: relies on internal code generated by automake.
all_objs = @addobjs@ $(libgc_la_OBJECTS)
all_objs = $(libgc_la_OBJECTS)
$(all_objs) : include/private/gcconfig.h include/private/gc_priv.h \
include/private/gc_hdrs.h include/gc.h include/gc_gcj.h include/gc_mark.h
@@ -113,7 +115,7 @@ endif
## We have our own definition of LTCOMPILE because we want to use our
## CFLAGS, not those passed in from the top level make.
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) \
LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) $(INCLUDES) \
-I$(top_srcdir)/include $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(MY_CFLAGS) $(GC_CFLAGS)
LINK = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(MY_CFLAGS) $(LDFLAGS) -o $@
+177 -43
View File
@@ -1,47 +1,181 @@
#
#
# THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
# OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
#
# Permission is hereby granted to use or copy this program
# for any purpose, provided the above notices are retained on all copies.
# Permission to modify the code and to distribute modified code is granted,
# provided the above notices are retained, and a notice that the code was
# modified is included with the above copyright notice.
#
# Modified by: Grzegorz Jakacki <jakacki at acm dot org>
dnl dolt, a replacement for libtool
dnl Copyright © 2007-2008 Josh Triplett <[email protected]>
dnl Copying and distribution of this file, with or without modification,
dnl are permitted in any medium without royalty provided the copyright
dnl notice and this notice are preserved.
dnl
dnl To use dolt, invoke the DOLT macro immediately after the libtool macros.
dnl Optionally, copy this file into acinclude.m4, to avoid the need to have it
dnl installed when running autoconf on your project.
# GC_SET_VERSION
# sets and AC_DEFINEs GC_VERSION_MAJOR, GC_VERSION_MINOR and GC_ALPHA_VERSION
# based on the contents of PACKAGE_VERSION; PACKAGE_VERSION must conform to
# [0-9]+[.][0-9]+(alpha[0.9]+)?
# in lex syntax; if there is no alpha number, GC_ALPHA_VERSION is empty
#
AC_DEFUN(GC_SET_VERSION, [
AC_MSG_CHECKING(GC version numbers)
GC_VERSION_MAJOR=`echo $PACKAGE_VERSION | sed 's/^\([[0-9]][[0-9]]*\)[[.]].*$/\1/g'`
GC_VERSION_MINOR=`echo $PACKAGE_VERSION | sed 's/^[[^.]]*[[.]]\([[0-9]][[0-9]]*\).*$/\1/g'`
GC_ALPHA_VERSION=`echo $PACKAGE_VERSION | sed 's/^[[^.]]*[[.]][[0-9]]*//'`
AC_DEFUN([DOLT], [
AC_REQUIRE([AC_CANONICAL_HOST])
# dolt, a replacement for libtool
# Josh Triplett <[email protected]>
AC_PATH_PROG(DOLT_BASH, bash)
AC_MSG_CHECKING([if dolt supports this host])
dolt_supported=yes
if test x$DOLT_BASH = x; then
dolt_supported=no
fi
if test x$GCC != xyes; then
dolt_supported=no
fi
case $host in
i?86-*-linux*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-linux* \
|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*|sparc*-*-linux*|mips*-*-linux*)
pic_options='-fPIC'
;;
?86-pc-cygwin*|i?86-pc-cygwin*)
pic_options='-DDLL_EXPORT'
;;
i?86-apple-darwin*)
pic_options='-fno-common'
;;
*)
dolt_supported=no
;;
esac
if test x$dolt_supported = xno ; then
AC_MSG_RESULT([no, falling back to libtool])
LTCOMPILE='$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(COMPILE)'
LTCXXCOMPILE='$(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXXCOMPILE)'
else
AC_MSG_RESULT([yes, replacing libtool])
case "$GC_ALPHA_VERSION" in
alpha*)
GC_ALPHA_VERSION=`echo $GC_ALPHA_VERSION \
| sed 's/alpha\([[0-9]][[0-9]]*\)/\1/'` ;;
*) GC_ALPHA_MAJOR='' ;;
esac
dnl Start writing out doltcompile.
cat <<__DOLTCOMPILE__EOF__ >doltcompile
#!$DOLT_BASH
__DOLTCOMPILE__EOF__
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
args=("$[]@")
for ((arg=0; arg<${#args@<:@@@:>@}; arg++)) ; do
if test x"${args@<:@$arg@:>@}" = x-o ; then
objarg=$((arg+1))
break
fi
done
if test x$objarg = x ; then
echo 'Error: no -o on compiler command line' 1>&2
exit 1
fi
lo="${args@<:@$objarg@:>@}"
obj="${lo%.lo}"
if test x"$lo" = x"$obj" ; then
echo "Error: libtool object file name \"$lo\" does not end in .lo" 1>&2
exit 1
fi
objbase="${obj##*/}"
__DOLTCOMPILE__EOF__
if test :$GC_VERSION_MAJOR: = :: \
-o :$GC_VERSION_MINOR: = :: ;
then
AC_MSG_RESULT(invalid)
AC_MSG_ERROR([nonconforming PACKAGE_VERSION='$PACKAGE_VERSION'])
fi
AC_DEFINE_UNQUOTED(GC_VERSION_MAJOR, $GC_VERSION_MAJOR)
AC_DEFINE_UNQUOTED(GC_VERSION_MINOR, $GC_VERSION_MINOR)
if test :$GC_ALPHA_VERSION: != :: ; then
AC_DEFINE_UNQUOTED(GC_ALPHA_VERSION, $GC_ALPHA_VERSION)
fi
AC_MSG_RESULT(major=$GC_VERSION_MAJOR minor=$GC_VERSION_MINOR \
${GC_ALPHA_VERSION:+alpha=}$GC_ALPHA_VERSION)
dnl Write out shared compilation code.
if test x$enable_shared = xyes; then
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
libobjdir="${obj%$objbase}.libs"
if test ! -d "$libobjdir" ; then
mkdir_out="$(mkdir "$libobjdir" 2>&1)"
mkdir_ret=$?
if test "$mkdir_ret" -ne 0 && test ! -d "$libobjdir" ; then
echo "$mkdir_out" 1>&2
exit $mkdir_ret
fi
fi
pic_object="$libobjdir/$objbase.o"
args@<:@$objarg@:>@="$pic_object"
__DOLTCOMPILE__EOF__
cat <<__DOLTCOMPILE__EOF__ >>doltcompile
"\${args@<:@@@:>@}" $pic_options -DPIC || exit \$?
__DOLTCOMPILE__EOF__
fi
dnl Write out static compilation code.
dnl Avoid duplicate compiler output if also building shared objects.
if test x$enable_static = xyes; then
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
non_pic_object="$obj.o"
args@<:@$objarg@:>@="$non_pic_object"
__DOLTCOMPILE__EOF__
if test x$enable_shared = xyes; then
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
"${args@<:@@@:>@}" >/dev/null 2>&1 || exit $?
__DOLTCOMPILE__EOF__
else
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
"${args@<:@@@:>@}" || exit $?
__DOLTCOMPILE__EOF__
fi
fi
dnl Write out the code to write the .lo file.
dnl The second line of the .lo file must match "^# Generated by .*libtool"
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
{
echo "# $lo - a libtool object file"
echo "# Generated by doltcompile, not libtool"
__DOLTCOMPILE__EOF__
if test x$enable_shared = xyes; then
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
echo "pic_object='.libs/${objbase}.o'"
__DOLTCOMPILE__EOF__
else
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
echo pic_object=none
__DOLTCOMPILE__EOF__
fi
if test x$enable_static = xyes; then
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
echo "non_pic_object='${objbase}.o'"
__DOLTCOMPILE__EOF__
else
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
echo non_pic_object=none
__DOLTCOMPILE__EOF__
fi
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
} > "$lo"
__DOLTCOMPILE__EOF__
dnl Done writing out doltcompile; substitute it for libtool compilation.
chmod +x doltcompile
LTCOMPILE='$(top_builddir)/doltcompile $(COMPILE)'
LTCXXCOMPILE='$(top_builddir)/doltcompile $(CXXCOMPILE)'
dnl automake ignores LTCOMPILE and LTCXXCOMPILE when it has separate CFLAGS for
dnl a target, so write out a libtool wrapper to handle that case.
dnl Note that doltlibtool does not handle inferred tags or option arguments
dnl without '=', because automake does not use them.
cat <<__DOLTLIBTOOL__EOF__ > doltlibtool
#!$DOLT_BASH
__DOLTLIBTOOL__EOF__
cat <<'__DOLTLIBTOOL__EOF__' >>doltlibtool
top_builddir_slash="${0%%doltlibtool}"
: ${top_builddir_slash:=./}
args=()
modeok=false
tagok=false
for arg in "$[]@"; do
case "$arg" in
--mode=compile) modeok=true ;;
--tag=CC|--tag=CXX) tagok=true ;;
--quiet) ;;
*) args@<:@${#args[@]}@:>@="$arg" ;;
esac
done
if $modeok && $tagok ; then
. ${top_builddir_slash}doltcompile "${args@<:@@@:>@}"
else
exec ${top_builddir_slash}libtool "$[]@"
fi
__DOLTLIBTOOL__EOF__
dnl Done writing out doltlibtool; substitute it for libtool.
chmod +x doltlibtool
LIBTOOL='$(top_builddir)/doltlibtool'
fi
AC_SUBST(LTCOMPILE)
AC_SUBST(LTCXXCOMPILE)
# end dolt
])
+23 -3
View File
@@ -94,7 +94,7 @@ case "$THREADS" in
fi
AC_DEFINE(THREAD_LOCAL_ALLOC)
;;
*-*-linux*)
*-*-linux* | *-*-nacl*)
AC_DEFINE(GC_LINUX_THREADS)
AC_DEFINE(_REENTRANT)
;;
@@ -147,6 +147,13 @@ case "$THREADS" in
fi
AC_DEFINE(THREAD_LOCAL_ALLOC)
;;
*-*-openbsd*)
AC_DEFINE(GC_OPENBSD_THREADS)
if test "${enable_parallel_mark}" = yes; then
AC_DEFINE(PARALLEL_MARK)
fi
AC_DEFINE(THREAD_LOCAL_ALLOC)
;;
*-*-osf*)
AC_DEFINE(GC_OSF1_THREADS)
if test "${enable_parallel_mark}" = yes; then
@@ -330,7 +337,11 @@ case "$host" in
machdep="sparc_mach_dep.lo"
;;
ia64-*-*)
machdep="mach_dep.lo ia64_save_regs_in_stack.lo"
machdep="mach_dep.lo ia64_save_regs_in_stack.lo"
target_ia64=true
;;
*-*-nacl*)
AC_DEFINE(NO_EXECUTE_PERMISSION)
;;
esac
if test x"$machdep" = x; then
@@ -338,12 +349,21 @@ AC_MSG_RESULT($machdep)
machdep="mach_dep.lo"
fi
addobjs="$addobjs $machdep"
AC_SUBST(addobjs)
#
# Adding object files directly to _LIBADD breaks -j builds, so we need to add the sources
# instead, but _SOURCES can't contain autoconf substitutions, so add them using automake
# conditionals.
#
#AC_SUBST(addobjs)
AC_SUBST(addincludes)
AC_SUBST(addlibs)
AC_SUBST(addtests)
AM_CONDITIONAL(TARGET_IA64,test x$target_ia64 = xtrue)
AC_PROG_LIBTOOL
# Use dolt (http://dolt.freedesktop.org/) instead of libtool for building.
DOLT
#
# Check for AViiON Machines running DGUX
+8 -1
View File
@@ -57,6 +57,7 @@
!defined(HPUX) && !(defined(LINUX) && defined(__ELF__)) && \
!defined(RS6000) && !defined(SCO_ELF) && !defined(DGUX) && \
!(defined(FREEBSD) && defined(__ELF__)) && \
!(defined(OPENBSD) && (defined(__ELF__) || defined(M68K))) && \
!(defined(NETBSD) && defined(__ELF__)) && !defined(HURD) && \
!defined(DARWIN)
--> We only know how to find data segments of dynamic libraries for the
@@ -92,9 +93,12 @@
#if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \
(defined(FREEBSD) && defined(__ELF__)) || defined(DGUX) || \
(defined(OPENBSD) && defined(__ELF__)) || \
(defined(NETBSD) && defined(__ELF__)) || defined(HURD)
# include <stddef.h>
# if !defined(OPENBSD)
# include <elf.h>
# endif
# include <link.h>
#endif
@@ -295,6 +299,7 @@ void GC_register_dynamic_libraries()
#if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \
(defined(FREEBSD) && defined(__ELF__)) || defined(DGUX) || \
(defined(OPENBSD) && defined(__ELF__)) || \
(defined(NETBSD) && defined(__ELF__)) || defined(HURD)
@@ -473,8 +478,10 @@ GC_bool GC_register_main_static_data()
/* This doesn't necessarily work in all cases, e.g. with preloaded
* dynamic libraries. */
#if defined(NETBSD)
#if defined(NETBSD) || defined(OPENBSD)
# if !defined(OPENBSD)
# include <sys/exec_elf.h>
# endif
/* for compatibility with 1.4.x */
# ifndef DT_DEBUG
# define DT_DEBUG 21
+1 -1
View File
@@ -25,7 +25,7 @@
#include "private/gc_priv.h"
# if (defined(GC_PTHREADS) && !defined(GC_DARWIN_THREADS)) \
# if defined(DYNAMIC_LOADING) && (defined(GC_PTHREADS) && !defined(GC_DARWIN_THREADS)) \
|| defined(GC_SOLARIS_THREADS)
# if defined(dlopen) && !defined(GC_USE_LD_WRAP)
+5
View File
@@ -57,6 +57,7 @@
defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS) || \
defined(GC_DGUX386_THREADS) || defined(GC_DARWIN_THREADS) || \
defined(GC_AIX_THREADS) || defined(GC_NETBSD_THREADS) || \
defined(GC_OPENBSD_THREADS) || \
(defined(GC_WIN32_THREADS) && defined(__CYGWIN32__))
# define GC_PTHREADS
# endif
@@ -87,6 +88,10 @@
# define GC_DARWIN_THREADS
# define GC_PTHREADS
# endif
# if !defined(GC_PTHREADS) && defined(__OpenBSD__)
# define GC_OPENBSD_THREADS
# define GC_PTHREADS
# endif
# if !defined(GC_PTHREADS) && defined(__FreeBSD__)
# define GC_FREEBSD_THREADS
# define GC_PTHREADS
+5
View File
@@ -59,6 +59,11 @@
#endif
int GC_pthread_join(pthread_t thread, void **retval);
int GC_pthread_detach(pthread_t thread);
#if defined(__native_client__) || defined(NACL)
void GC_pthread_exit(void *status);
# undef pthread_exit
# define pthread_exit GC_pthread_exit
#endif
#if defined(GC_OSF1_THREADS) \
&& defined(_PTHREAD_USE_MANGLED_NAMES_) && !defined(_PTHREAD_USE_PTDNAM_)
+2
View File
@@ -1962,6 +1962,8 @@ void GC_err_puts GC_PROTO((GC_CONST char *s));
/* SPARC/Linux doesn't properly define SIGPWR in <signal.h>.
* It is aliased to SIGLOST in asm/signal.h, though. */
# define SIG_SUSPEND SIGLOST
# elif defined(NACL)
# define SIG_SUSPEND 0
# else
/* Linuxthreads itself uses SIGUSR1 and SIGUSR2. */
# define SIG_SUSPEND SIGPWR
+75 -7
View File
@@ -65,6 +65,11 @@
# endif
/* Determine the machine type: */
# if defined(__native_client__)
# define NACL
# define I386
# define mach_type_known
# endif
# if defined(__arm__) || defined(__thumb__)
# define ARM32
# if !defined(LINUX) && !defined(NETBSD) && !defined(DARWIN)
@@ -231,6 +236,10 @@
# define I386
# define mach_type_known
# endif
# if defined(OPENBSD) && defined(__amd64__)
# define X86_64
# define mach_type_known
# endif
# if defined(LINUX) && defined(__x86_64__)
# define X86_64
# define mach_type_known
@@ -1082,13 +1091,19 @@
# endif
# ifdef I386
# define MACH_TYPE "I386"
# if defined(__LP64__) || defined(_WIN64)
# define CPP_WORDSZ 64
# define ALIGNMENT 8
# else
# if defined( NACL )
# define MACH_TYPE "NACL"
# define CPP_WORDSZ 32
# define ALIGNMENT 4
# else
# define MACH_TYPE "I386"
# if defined(__LP64__) || defined(_WIN64)
# define CPP_WORDSZ 64
# define ALIGNMENT 8
# else
# define CPP_WORDSZ 32
# define ALIGNMENT 4
# endif
/* Appears to hold for all "32 bit" compilers */
/* except Borland. The -a4 option fixes */
/* Borland. */
@@ -1184,7 +1199,32 @@
# define HEAP_START DATAEND
# endif /* USE_MMAP */
# endif /* DGUX */
# ifdef NACL
# define OS_TYPE "NACL"
extern int etext[];
# define DATASTART ((ptr_t)((((word) (etext)) + 0xfff) & ~0xfff))
extern int _end[];
# define DATAEND (_end)
# ifdef STACK_GRAN
# undef STACK_GRAN
# endif /* STACK_GRAN */
# define STACK_GRAN 0x10000
# define HEURISTIC1
# ifdef USE_MMAP
# undef USE_MMAP
# endif
# ifdef USE_MUNMAP
# undef USE_MUNMAP
# endif
# ifdef USE_MMAP_ANON
# undef USE_MMAP_ANON
# endif
# ifdef USE_MMAP_FIXED
# undef USE_MMAP_FIXED
# endif
# define GETPAGESIZE() 65536
# define MAX_NACL_GC_THREADS 1024
# endif
# ifdef LINUX
# ifndef __GNUC__
/* The Intel compiler doesn't like inline assembly */
@@ -1304,6 +1344,18 @@
# endif
# ifdef OPENBSD
# define OS_TYPE "OPENBSD"
# ifdef GC_OPENBSD_THREADS
# define UTHREAD_SP_OFFSET 192
# else
# include <sys/param.h>
# include <uvm/uvm_extern.h>
# define STACKBOTTOM USRSTACK
# endif
extern int __data_start[];
# define DATASTART ((ptr_t)(__data_start))
extern char _end[];
# define DATAEND ((ptr_t)(&_end))
# define DYNAMIC_LOADING
# endif
# ifdef FREEBSD
# define OS_TYPE "FREEBSD"
@@ -2086,6 +2138,22 @@
extern char etext[];
# define SEARCH_FOR_DATA_START
# endif
# ifdef OPENBSD
# define OS_TYPE "OPENBSD"
# define ELF_CLASS ELFCLASS64
# ifdef GC_OPENBSD_THREADS
# define UTHREAD_SP_OFFSET 400
# else
# include <sys/param.h>
# include <uvm/uvm_extern.h>
# define STACKBOTTOM USRSTACK
# endif
extern int __data_start[];
# define DATASTART ((ptr_t)(__data_start))
extern char _end[];
# define DATAEND ((ptr_t)(&_end))
# define DYNAMIC_LOADING
# endif
# endif
#if defined(LINUX) && defined(USE_MMAP)
@@ -2239,7 +2307,7 @@
# if defined(GC_IRIX_THREADS) && !defined(IRIX5)
--> inconsistent configuration
# endif
# if defined(GC_LINUX_THREADS) && !defined(LINUX)
# if defined(GC_LINUX_THREADS) && !(defined(LINUX) || defined(NACL))
--> inconsistent configuration
# endif
# if defined(GC_SOLARIS_THREADS) && !defined(SUNOS5)
@@ -0,0 +1,12 @@
#ifndef GC_OPENBSD_STOP_WORLD_H
#define GC_OPENBSD_STOP_WORLD_H
#if !defined(GC_OPENBSD_THREADS)
#error openbsd_stop_world.h included without GC_OPENBSD_THREADS defined
#endif
struct thread_stop_info {
ptr_t stack_ptr; /* Valid only when stopped. */
};
#endif
@@ -7,6 +7,15 @@ struct thread_stop_info {
/* last successfully handled a suspend */
/* signal. */
ptr_t stack_ptr; /* Valid only when stopped. */
#ifdef NACL
/* Grab NACL_GC_REG_STORAGE_SIZE pointers off the stack when going into */
/* a syscall. 20 is more than we need, but it's an overestimate in case*/
/* the instrumented function uses any callee saved registers, they may */
/* be pushed to the stack much earlier. Also, on amd64 'push' puts 8 */
/* bytes on the stack even though our pointers are 4 bytes. */
#define NACL_GC_REG_STORAGE_SIZE 20
ptr_t reg_storage[NACL_GC_REG_STORAGE_SIZE];
#endif
};
#endif
+8
View File
@@ -8,6 +8,8 @@
#if defined(GC_DARWIN_THREADS)
# include "private/darwin_stop_world.h"
#elif defined(GC_OPENBSD_THREADS)
# include "private/openbsd_stop_world.h"
#else
# include "private/pthread_stop_world.h"
#endif
@@ -26,6 +28,9 @@ typedef struct GC_Thread_Rep {
/* guaranteed to be dead, but we may */
/* not yet have registered the join.) */
pthread_t id;
#ifdef PLATFORM_ANDROID
pid_t kernel_id;
#endif
/* Extra bookkeeping information the stopping code uses */
struct thread_stop_info stop_info;
@@ -87,6 +92,9 @@ typedef struct GC_Thread_Rep {
# define THREAD_TABLE_SZ 128 /* Must be power of 2 */
extern volatile GC_thread GC_threads[THREAD_TABLE_SZ];
#ifdef NACL
extern __thread GC_thread gc_thread_self;
#endif
extern GC_bool GC_thr_initialized;
+1 -1
View File
@@ -492,7 +492,7 @@ ptr_t cold_gc_frame;
/* the stack. Return sp. */
# ifdef SPARC
asm(" .seg \"text\"");
# if defined(SVR4) || defined(NETBSD) || defined(FREEBSD)
# if defined(SVR4) || defined(NETBSD) || defined(FREEBSD) || defined(OPENBSD)
asm(" .globl GC_save_regs_in_stack");
asm("GC_save_regs_in_stack:");
asm(" .type GC_save_regs_in_stack,#function");
+2 -2
View File
@@ -473,7 +473,7 @@ size_t GC_get_total_bytes GC_PROTO(())
int GC_get_suspend_signal GC_PROTO(())
{
#if defined(SIG_SUSPEND) && defined(GC_PTHREADS) && !defined(GC_MACOSX_THREADS)
#if defined(SIG_SUSPEND) && defined(GC_PTHREADS) && !defined(GC_MACOSX_THREADS) && !defined(GC_OPENBSD_THREADS)
return SIG_SUSPEND;
#else
return -1;
@@ -684,7 +684,7 @@ void GC_init_inner()
# if defined(SEARCH_FOR_DATA_START)
GC_init_linux_data_start();
# endif
# if (defined(NETBSD) || defined(OPENBSD)) && defined(__ELF__)
# if defined(NETBSD) && defined(__ELF__)
GC_init_netbsd_elf();
# endif
# if defined(GC_PTHREADS) || defined(GC_SOLARIS_THREADS) \
+161
View File
@@ -0,0 +1,161 @@
#include "private/pthread_support.h"
/* derived from pthread_stop_world.c */
# if defined(GC_OPENBSD_THREADS)
#define THREAD_EQUAL(id1, id2) pthread_equal(id1, id2)
/* We hold allocation lock. Should do exactly the right thing if the */
/* world is stopped. Should not fail if it isn't. */
void GC_push_all_stacks()
{
GC_bool found_me = FALSE;
size_t nthreads = 0;
int i;
GC_thread p;
ptr_t lo, hi;
pthread_t me = pthread_self();
if (!GC_thr_initialized) GC_thr_init();
# if DEBUG_THREADS
GC_printf("Pushing stacks from thread 0x%x\n", (unsigned) me);
# endif
for (i = 0; i < THREAD_TABLE_SZ; i++) {
for (p = GC_threads[i]; p != 0; p = p -> next) {
if (p -> flags & FINISHED) continue;
++nthreads;
if (THREAD_EQUAL(p -> id, me)) {
# ifdef SPARC
lo = (ptr_t)GC_save_regs_in_stack();
# else
lo = GC_approx_sp();
# endif
found_me = TRUE;
} else {
lo = p -> stop_info.stack_ptr;
}
if ((p -> flags & MAIN_THREAD) == 0) {
hi = p -> stack_end;
} else {
/* The original stack. */
hi = GC_stackbottom;
}
# if DEBUG_THREADS
GC_printf("Stack for thread 0x%x = [%p,%p)\n",
(unsigned)(p -> id), lo, hi);
# endif
if (0 == lo) ABORT("GC_push_all_stacks: sp not set!\n");
# ifdef STACK_GROWS_UP
/* We got them backwards! */
GC_push_all_stack(hi, lo);
# else
GC_push_all_stack(lo, hi);
# endif
}
}
if (!found_me && !GC_in_thread_creation)
ABORT("Collecting from unknown thread.");
}
/* We hold the allocation lock. Suspend all threads that might */
/* still be running. */
void GC_suspend_all()
{
int i;
GC_thread p;
int result;
pthread_t my_thread = pthread_self();
for (i = 0; i < THREAD_TABLE_SZ; i++) {
for (p = GC_threads[i]; p != 0; p = p -> next) {
if (!THREAD_EQUAL(p -> id, my_thread)) {
if (p -> flags & FINISHED) continue;
if (p -> thread_blocked) /* Will wait */ continue;
# if DEBUG_THREADS
GC_printf("Suspending thread 0x%x\n",
(unsigned)(p -> id));
# endif
if (pthread_suspend_np(p -> id) != 0)
ABORT("pthread_suspend_np failed");
/*
* This will only work for userland pthreads. It will
* fail badly on rthreads. Perhaps we should consider
* a pthread_sp_np() function that returns the stack
* pointer for a suspended thread and implement in
* both pthreads and rthreads.
*/
p -> stop_info.stack_ptr = *(ptr_t*)((char *)p -> id + UTHREAD_SP_OFFSET);
}
}
}
}
void GC_stop_world()
{
int i;
GC_ASSERT(I_HOLD_LOCK());
# if DEBUG_THREADS
GC_printf("Stopping the world from 0x%x\n", (unsigned)pthread_self());
# endif
/* Make sure all free list construction has stopped before we start. */
/* No new construction can start, since free list construction is */
/* required to acquire and release the GC lock before it starts, */
/* and we have the lock. */
# ifdef PARALLEL_MARK
GC_acquire_mark_lock();
GC_ASSERT(GC_fl_builder_count == 0);
/* We should have previously waited for it to become zero. */
# endif /* PARALLEL_MARK */
GC_suspend_all();
# ifdef PARALLEL_MARK
GC_release_mark_lock();
# endif
#if DEBUG_THREADS
GC_printf("World stopped from 0x%x\n", (unsigned)pthread_self());
#endif
}
/* Caller holds allocation lock, and has held it continuously since */
/* the world stopped. */
void GC_start_world()
{
pthread_t my_thread = pthread_self();
register int i;
register GC_thread p;
register int result;
# if DEBUG_THREADS
GC_printf("World starting\n");
# endif
for (i = 0; i < THREAD_TABLE_SZ; i++) {
for (p = GC_threads[i]; p != 0; p = p -> next) {
if (!THREAD_EQUAL(p -> id, my_thread)) {
if (p -> flags & FINISHED) continue;
if (p -> thread_blocked) continue;
#if DEBUG_THREADS
GC_printf("Resuming thread 0x%x\n",
(unsigned)(p -> id));
#endif
if (pthread_resume_np(p -> id) != 0)
ABORT("pthread_kill failed");
}
}
}
# if DEBUG_THREADS
GC_printf("World started\n");
# endif
}
void GC_stop_init() {
}
#endif
+164 -3
View File
@@ -133,7 +133,7 @@
# include <errno.h>
#endif
#ifdef UNIX_LIKE
#if defined( UNIX_LIKE ) || defined(NACL)
# include <fcntl.h>
#endif
@@ -392,7 +392,7 @@ static void *tiny_sbrk(ptrdiff_t increment)
#define sbrk tiny_sbrk
# endif /* ECOS */
#if (defined(NETBSD) || defined(OPENBSD)) && defined(__ELF__)
#if defined(NETBSD) && defined(__ELF__)
ptr_t GC_data_start;
void GC_init_netbsd_elf()
@@ -405,6 +405,102 @@ static void *tiny_sbrk(ptrdiff_t increment)
}
#endif
#if defined(OPENBSD)
static struct sigaction old_segv_act;
sigjmp_buf GC_jmp_buf_openbsd;
# if defined(GC_OPENBSD_THREADS)
# include <sys/syscall.h>
sigset_t __syscall(quad_t, ...);
# endif
/*
* Dont use GC_find_limit() because siglongjmp out of the
* signal handler by-passes our userland pthreads lib, leaving
* SIGSEGV and SIGPROF masked. Instead use this custom one
* that works-around the issues.
*/
/*ARGSUSED*/
void GC_fault_handler_openbsd(int sig)
{
siglongjmp(GC_jmp_buf_openbsd, 1);
}
/* Return the first nonaddressible location > p or bound */
/* Requires allocation lock. */
ptr_t GC_find_limit_openbsd(ptr_t p, ptr_t bound)
{
static volatile ptr_t result;
/* Safer if static, since otherwise it may not be */
/* preserved across the longjmp. Can safely be */
/* static since it's only called with the */
/* allocation lock held. */
struct sigaction act;
size_t pgsz = (size_t)sysconf(_SC_PAGESIZE);
GC_ASSERT(I_HOLD_LOCK());
act.sa_handler = GC_fault_handler_openbsd;
sigemptyset(&act.sa_mask);
act.sa_flags = SA_NODEFER | SA_RESTART;
sigaction(SIGSEGV, &act, &old_segv_act);
if (sigsetjmp(GC_jmp_buf_openbsd, 1) == 0) {
result = (ptr_t)(((word)(p)) & ~(pgsz-1));
for (;;) {
result += pgsz;
if (result >= bound) {
result = bound;
break;
}
GC_noop1((word)(*result));
}
}
# if defined(GC_OPENBSD_THREADS)
/* due to the siglongjump we need to manually unmask SIGPROF */
__syscall(SYS_sigprocmask, SIG_UNBLOCK, sigmask(SIGPROF));
# endif
sigaction(SIGSEGV, &old_segv_act, 0);
return(result);
}
/* Return first addressable location > p or bound */
/* Requires allocation lock. */
ptr_t GC_skip_hole_openbsd(ptr_t p, ptr_t bound)
{
static volatile ptr_t result;
struct sigaction act;
size_t pgsz = (size_t)sysconf(_SC_PAGESIZE);
static volatile int firstpass;
GC_ASSERT(I_HOLD_LOCK());
act.sa_handler = GC_fault_handler_openbsd;
sigemptyset(&act.sa_mask);
act.sa_flags = SA_NODEFER | SA_RESTART;
sigaction(SIGSEGV, &act, &old_segv_act);
firstpass = 1;
result = (ptr_t)(((word)(p)) & ~(pgsz-1));
if (sigsetjmp(GC_jmp_buf_openbsd, 1) != 0 || firstpass) {
firstpass = 0;
result += pgsz;
if (result >= bound) {
result = bound;
} else
GC_noop1((word)(*result));
}
sigaction(SIGSEGV, &old_segv_act, 0);
return(result);
}
#endif
# ifdef OS2
# include <stddef.h>
@@ -522,6 +618,12 @@ void GC_enable_signals(void)
/* longjmp implementations. Most systems appear not to have */
/* a signal 32. */
# define SIGSETMASK(old, new) (old) = sigsetmask(new)
# elif defined(NACL)
/* We don't use signals in NaCl. */
# define SIGSET_T int
# define SIG_DEL(set, signal)
# define SIG_FILL(set)
# define SIGSETMASK(old, new)
# else
/* Use POSIX/SYSV interface */
# define SIGSET_T sigset_t
@@ -1021,7 +1123,8 @@ void *GC_set_stackbottom = NULL;
#endif /* FREEBSD_STACKBOTTOM */
#if !defined(BEOS) && !defined(AMIGA) && !defined(MSWIN32) \
&& !defined(MSWINCE) && !defined(OS2) && !defined(NOSYS) && !defined(ECOS)
&& !defined(MSWINCE) && !defined(OS2) && !defined(NOSYS) && !defined(ECOS) \
&& !defined(GC_OPENBSD_THREADS)
ptr_t GC_get_stack_base()
{
@@ -1081,6 +1184,25 @@ ptr_t GC_get_stack_base()
# endif /* ! AMIGA, !OS 2, ! MS Windows, !BEOS, !NOSYS, !ECOS */
#if defined(GC_OPENBSD_THREADS)
/* Find the stack using pthread_stackseg_np() */
# include <sys/signal.h>
# include <pthread.h>
# include <pthread_np.h>
#define HAVE_GET_STACK_BASE
ptr_t GC_get_stack_base()
{
stack_t stack;
pthread_stackseg_np(pthread_self(), &stack);
return stack.ss_sp;
}
#endif /* GC_OPENBSD_THREADS */
/*
* Register static data segment(s) as roots.
* If more data segments are added later then they need to be registered
@@ -1445,6 +1567,31 @@ int * etext_addr;
#else /* !OS2 && !Windows && !AMIGA */
#if defined(OPENBSD)
/*
* Depending on arch alignment there can be multiple holes
* between DATASTART & DATAEND. Scan from DATASTART - DATAEND
* and register each region.
*/
void GC_register_data_segments(void)
{
ptr_t region_start, region_end;
region_start = DATASTART;
for(;;) {
region_end = GC_find_limit_openbsd(region_start, DATAEND);
GC_add_roots_inner(region_start, region_end, FALSE);
if (region_end < DATAEND)
region_start = GC_skip_hole_openbsd(region_end, DATAEND);
else
break;
}
}
# else /* !OS2 && !Windows && !AMIGA && !OPENBSD */
void GC_register_data_segments()
{
# if !defined(PCR) && !defined(SRC_M3) && !defined(MACOS)
@@ -1504,6 +1651,7 @@ void GC_register_data_segments()
/* change. */
}
# endif /* ! OPENBSD */
# endif /* ! AMIGA */
# endif /* ! MSWIN32 && ! MSWINCE*/
# endif /* ! OS2 */
@@ -1925,8 +2073,21 @@ void GC_remap(ptr_t start, word bytes)
int result;
if (0 == start_addr) return;
#ifdef NACL
{
/* NaCl doesn't expose mprotect, but mmap should work fine */
void * mmap_result;
mmap_result = mmap(start_addr, len, PROT_READ | PROT_WRITE | OPT_PROT_EXEC,
MAP_PRIVATE | MAP_FIXED | OPT_MAP_ANON,
zero_fd, 0/* offset */);
if (mmap_result != (void *)start_addr) ABORT("mmap as mprotect failed");
/* Fake the return value as if mprotect succeeded. */
result = 0;
}
#else /* NACL */
result = mprotect(start_addr, len,
PROT_READ | PROT_WRITE | OPT_PROT_EXEC);
#endif /* NACL */
if (result != 0) {
GC_err_printf3(
"Mprotect failed at 0x%lx (length %ld) with errno %ld\n",
+186 -4
View File
@@ -2,12 +2,14 @@
#if defined(GC_PTHREADS) && !defined(GC_SOLARIS_THREADS) \
&& !defined(GC_IRIX_THREADS) && !defined(GC_WIN32_THREADS) \
&& !defined(GC_DARWIN_THREADS) && !defined(GC_AIX_THREADS)
&& !defined(GC_DARWIN_THREADS) && !defined(GC_AIX_THREADS) \
&& !defined(GC_OPENBSD_THREADS)
#include <signal.h>
#include <semaphore.h>
#include <errno.h>
#include <unistd.h>
#include <sys/time.h>
/* work around a dlopen issue (bug #75390), undefs to avoid warnings with redefinitions */
#undef PACKAGE_BUGREPORT
@@ -21,6 +23,19 @@
#include "include/libgc-mono-debugger.h"
#endif
#ifdef NACL
int nacl_park_threads_now = 0;
pthread_t nacl_thread_parker = -1;
int nacl_thread_parked[MAX_NACL_GC_THREADS];
int nacl_thread_used[MAX_NACL_GC_THREADS];
int nacl_thread_parking_inited = 0;
int nacl_num_gc_threads = 0;
pthread_mutex_t nacl_thread_alloc_lock = PTHREAD_MUTEX_INITIALIZER;
__thread int nacl_thread_idx = -1;
__thread GC_thread nacl_gc_thread_self = NULL;
#endif
#if DEBUG_THREADS
#ifndef NSIG
@@ -35,6 +50,7 @@
# endif
#endif
#ifndef NACL
void GC_print_sig_mask()
{
sigset_t blocked;
@@ -48,7 +64,7 @@ void GC_print_sig_mask()
}
GC_printf0("\n");
}
#endif /* NACL */
#endif
/* Remove the signals that we want to allow in thread stopping */
@@ -115,6 +131,7 @@ sem_t GC_suspend_ack_sem;
static void _GC_suspend_handler(int sig)
{
#ifndef NACL
int dummy;
pthread_t my_thread = pthread_self();
GC_thread me;
@@ -184,6 +201,8 @@ static void _GC_suspend_handler(int sig)
#if DEBUG_THREADS
GC_printf1("Continuing 0x%lx\n", my_thread);
#endif
#endif /* NACL */
}
void GC_suspend_handler(int sig)
@@ -277,6 +296,10 @@ static void pthread_push_all_stacks()
# else
GC_push_all_stack(lo, hi);
# endif
# ifdef NACL
/* Push reg_storage as roots, this will cover the reg context */
GC_push_all_stack(p -> stop_info.reg_storage, p -> stop_info.reg_storage + NACL_GC_REG_STORAGE_SIZE);
# endif
# ifdef IA64
# if DEBUG_THREADS
GC_printf3("Reg stack for thread 0x%lx = [%lx,%lx)\n",
@@ -314,11 +337,29 @@ void GC_push_all_stacks()
pthread_t GC_stopping_thread;
int GC_stopping_pid;
#ifdef PLATFORM_ANDROID
static
int android_thread_kill(pid_t tid, int sig)
{
int ret;
int old_errno = errno;
ret = tkill(tid, sig);
if (ret < 0) {
ret = errno;
errno = old_errno;
}
return ret;
}
#endif
/* We hold the allocation lock. Suspend all threads that might */
/* still be running. Return the number of suspend signals that */
/* were sent. */
int GC_suspend_all()
{
#ifndef NACL
int n_live_threads = 0;
int i;
GC_thread p;
@@ -337,8 +378,12 @@ int GC_suspend_all()
#if DEBUG_THREADS
GC_printf1("Sending suspend signal to 0x%lx\n", p -> id);
#endif
#ifndef PLATFORM_ANDROID
result = pthread_kill(p -> id, SIG_SUSPEND);
#else
result = android_thread_kill(p -> kernel_id, SIG_SUSPEND);
#endif
switch(result) {
case ESRCH:
/* Not really there anymore. Possible? */
@@ -353,11 +398,15 @@ int GC_suspend_all()
}
}
return n_live_threads;
#else /* NACL */
return 0;
#endif
}
/* Caller holds allocation lock. */
static void pthread_stop_world()
{
#ifndef NACL
int i;
int n_live_threads;
int code;
@@ -409,8 +458,128 @@ static void pthread_stop_world()
GC_printf1("World stopped from 0x%lx\n", pthread_self());
#endif
GC_stopping_thread = 0; /* debugging only */
#else /* NACL */
GC_thread p;
int i;
#if DEBUG_THREADS
GC_printf1("pthread_stop_world: num_threads %d\n", nacl_num_gc_threads - 1);
#endif
nacl_thread_parker = pthread_self();
nacl_park_threads_now = 1;
while (1) {
#define NACL_PARK_WAIT_NANOSECONDS 100000
int num_threads_parked = 0;
struct timespec ts;
int num_used = 0;
/* Check the 'parked' flag for each thread the GC knows about */
for (i = 0; i < MAX_NACL_GC_THREADS && num_used < nacl_num_gc_threads; i++) {
if (nacl_thread_used[i] == 1) {
num_used++;
if (nacl_thread_parked[i] == 1) {
num_threads_parked++;
}
}
}
/* -1 for the current thread */
if (num_threads_parked >= nacl_num_gc_threads - 1)
break;
ts.tv_sec = 0;
ts.tv_nsec = NACL_PARK_WAIT_NANOSECONDS;
#if DEBUG_THREADS
GC_printf1("sleeping waiting for %d threads to park...\n", nacl_num_gc_threads - num_threads_parked - 1);
#endif
nanosleep(&ts, 0);
}
#endif /* NACL */
}
#ifdef NACL
#if __x86_64__
#define NACL_STORE_REGS() \
do { \
asm("push %rbx");\
asm("push %rbp");\
asm("push %r12");\
asm("push %r13");\
asm("push %r14");\
asm("push %r15");\
asm("mov %%esp, %0" : "=m" (nacl_gc_thread_self->stop_info.stack_ptr));\
memcpy(nacl_gc_thread_self->stop_info.reg_storage, nacl_gc_thread_self->stop_info.stack_ptr, NACL_GC_REG_STORAGE_SIZE * sizeof(ptr_t));\
asm("add $48, %esp");\
asm("add %r15, %rsp");\
} while (0)
#elif __i386__
#define NACL_STORE_REGS() \
do { \
asm("push %ebx");\
asm("push %ebp");\
asm("push %esi");\
asm("push %edi");\
asm("mov %%esp, %0" : "=m" (nacl_gc_thread_self->stop_info.stack_ptr));\
memcpy(nacl_gc_thread_self->stop_info.reg_storage, nacl_gc_thread_self->stop_info.stack_ptr, NACL_GC_REG_STORAGE_SIZE * sizeof(ptr_t));\
asm("add $16, %esp");\
} while (0)
#endif
void nacl_pre_syscall_hook()
{
int local_dummy = 0;
if (nacl_thread_idx != -1) {
NACL_STORE_REGS();
nacl_gc_thread_self->stop_info.stack_ptr = (ptr_t)(&local_dummy);
nacl_thread_parked[nacl_thread_idx] = 1;
}
}
void nacl_post_syscall_hook()
{
/* Calling __nacl_suspend_thread_if_needed() right away should guarantee we don't mutate the GC set. */
__nacl_suspend_thread_if_needed();
if (nacl_thread_idx != -1) {
nacl_thread_parked[nacl_thread_idx] = 0;
}
}
void __nacl_suspend_thread_if_needed() {
if (nacl_park_threads_now) {
pthread_t self = pthread_self();
int local_dummy = 0;
/* Don't try to park the thread parker. */
if (nacl_thread_parker == self)
return;
/* This can happen when a thread is created */
/* outside of the GC system (wthread mostly). */
if (nacl_thread_idx < 0)
return;
/* If it was already 'parked', we're returning from a syscall, */
/* so don't bother storing registers again, the GC has a set. */
if (!nacl_thread_parked[nacl_thread_idx]) {
NACL_STORE_REGS();
nacl_gc_thread_self->stop_info.stack_ptr = (ptr_t)(&local_dummy);
}
nacl_thread_parked[nacl_thread_idx] = 1;
while (nacl_park_threads_now)
; /* spin */
nacl_thread_parked[nacl_thread_idx] = 0;
/* Clear out the reg storage for next suspend. */
memset(nacl_gc_thread_self->stop_info.reg_storage, 0, NACL_GC_REG_STORAGE_SIZE * sizeof(ptr_t));
}
}
#endif /* NACL */
/* Caller holds allocation lock. */
void GC_stop_world()
{
@@ -443,6 +612,7 @@ void GC_stop_world()
/* the world stopped. */
static void pthread_start_world()
{
#ifndef NACL
pthread_t my_thread = pthread_self();
register int i;
register GC_thread p;
@@ -465,8 +635,12 @@ static void pthread_start_world()
#if DEBUG_THREADS
GC_printf1("Sending restart signal to 0x%lx\n", p -> id);
#endif
#ifndef PLATFORM_ANDROID
result = pthread_kill(p -> id, SIG_THR_RESTART);
#else
result = android_thread_kill(p -> kernel_id, SIG_THR_RESTART);
#endif
switch(result) {
case ESRCH:
/* Not really there anymore. Possible? */
@@ -499,6 +673,12 @@ static void pthread_start_world()
#if DEBUG_THREADS
GC_printf0("World started\n");
#endif
#else /* NACL */
# if DEBUG_THREADS
GC_printf0("World starting\n");
# endif
nacl_park_threads_now = 0;
#endif /* NACL */
}
void GC_start_world()
@@ -512,6 +692,7 @@ void GC_start_world()
}
static void pthread_stop_init() {
#ifndef NACL
struct sigaction act;
if (sem_init(&GC_suspend_ack_sem, 0, 0) != 0)
@@ -552,6 +733,7 @@ static void pthread_stop_init() {
GC_printf0("Will retry suspend signal if necessary.\n");
}
# endif
#endif /* NACL */
}
/* We hold the allocation lock. */
+81 -5
View File
@@ -68,7 +68,8 @@
# if (defined(GC_DGUX386_THREADS) || defined(GC_OSF1_THREADS) || \
defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS)) || \
defined(GC_NETBSD_THREADS) && !defined(USE_PTHREAD_SPECIFIC)
defined(GC_NETBSD_THREADS) && !defined(USE_PTHREAD_SPECIFIC) || \
defined(GC_OPENBSD_THREADS)
# define USE_PTHREAD_SPECIFIC
# endif
@@ -129,7 +130,7 @@
# include <sys/sysctl.h>
#endif /* GC_DARWIN_THREADS */
#if defined(GC_NETBSD_THREADS)
#if defined(GC_NETBSD_THREADS) || defined(GC_OPENBSD_THREADS)
# include <sys/param.h>
# include <sys/sysctl.h>
#endif
@@ -163,6 +164,9 @@
# endif
# undef pthread_join
# undef pthread_detach
# if defined(NACL)
# undef pthread_exit
# endif
# if defined(GC_OSF1_THREADS) && defined(_PTHREAD_USE_MANGLED_NAMES_) \
&& !defined(_PTHREAD_USE_PTDNAM_)
/* Restore the original mangled names on Tru64 UNIX. */
@@ -675,6 +679,52 @@ void GC_mark_thread_local_free_lists(void)
static struct GC_Thread_Rep first_thread;
#ifdef NACL
extern int nacl_thread_parked[MAX_NACL_GC_THREADS];
extern int nacl_thread_used[MAX_NACL_GC_THREADS];
extern int nacl_thread_parking_inited;
extern int nacl_num_gc_threads;
extern pthread_mutex_t nacl_thread_alloc_lock;
extern __thread int nacl_thread_idx;
extern __thread GC_thread nacl_gc_thread_self;
void nacl_initialize_gc_thread()
{
int i;
pthread_mutex_lock(&nacl_thread_alloc_lock);
if (!nacl_thread_parking_inited)
{
for (i = 0; i < MAX_NACL_GC_THREADS; i++) {
nacl_thread_used[i] = 0;
nacl_thread_parked[i] = 0;
}
nacl_thread_parking_inited = 1;
}
GC_ASSERT(nacl_num_gc_threads <= MAX_NACL_GC_THREADS);
for (i = 0; i < MAX_NACL_GC_THREADS; i++) {
if (nacl_thread_used[i] == 0) {
nacl_thread_used[i] = 1;
nacl_thread_idx = i;
nacl_num_gc_threads++;
break;
}
}
pthread_mutex_unlock(&nacl_thread_alloc_lock);
}
void nacl_shutdown_gc_thread()
{
pthread_mutex_lock(&nacl_thread_alloc_lock);
GC_ASSERT(nacl_thread_idx >= 0 && nacl_thread_idx < MAX_NACL_GC_THREADS);
GC_ASSERT(nacl_thread_used[nacl_thread_idx] != 0);
nacl_thread_used[nacl_thread_idx] = 0;
nacl_thread_idx = -1;
nacl_num_gc_threads--;
pthread_mutex_unlock(&nacl_thread_alloc_lock);
}
#endif /* NACL */
/* Add a thread to GC_threads. We assume it wasn't already there. */
/* Caller holds allocation lock. */
GC_thread GC_new_thread(pthread_t id)
@@ -692,8 +742,15 @@ GC_thread GC_new_thread(pthread_t id)
}
if (result == 0) return(0);
result -> id = id;
#ifdef PLATFORM_ANDROID
result -> kernel_id = gettid();
#endif
result -> next = GC_threads[hv];
GC_threads[hv] = result;
#ifdef NACL
nacl_gc_thread_self = result;
nacl_initialize_gc_thread();
#endif
GC_ASSERT(result -> flags == 0 && result -> thread_blocked == 0);
return(result);
}
@@ -707,6 +764,11 @@ void GC_delete_thread(pthread_t id)
register GC_thread p = GC_threads[hv];
register GC_thread prev = 0;
#ifdef NACL
nacl_shutdown_gc_thread();
nacl_gc_thread_self = NULL;
#endif
while (!pthread_equal(p -> id, id)) {
prev = p;
p = p -> next;
@@ -1037,7 +1099,7 @@ void GC_thr_init()
GC_nprocs = sysconf(_SC_NPROC_ONLN);
if (GC_nprocs <= 0) GC_nprocs = 1;
# endif
# if defined(GC_DARWIN_THREADS) || defined(GC_FREEBSD_THREADS) || defined(GC_NETBSD_THREADS)
# if defined(GC_DARWIN_THREADS) || defined(GC_FREEBSD_THREADS) || defined(GC_NETBSD_THREADS) || defined(GC_OPENBSD_THREADS)
int ncpus = 1;
size_t len = sizeof(ncpus);
sysctl((int[2]) {CTL_HW, HW_NCPU}, 2, &ncpus, &len, NULL, 0);
@@ -1113,7 +1175,8 @@ void GC_init_parallel()
}
#if !defined(GC_DARWIN_THREADS)
#if !defined(GC_DARWIN_THREADS) && !defined(GC_OPENBSD_THREADS)
#ifndef NACL
int WRAP_FUNC(pthread_sigmask)(int how, const sigset_t *set, sigset_t *oset)
{
sigset_t fudged_set;
@@ -1125,6 +1188,7 @@ int WRAP_FUNC(pthread_sigmask)(int how, const sigset_t *set, sigset_t *oset)
}
return(REAL_FUNC(pthread_sigmask)(how, set, oset));
}
#endif
#endif /* !GC_DARWIN_THREADS */
/* Wrappers for functions that are likely to block for an appreciable */
@@ -1255,6 +1319,17 @@ int WRAP_FUNC(pthread_join)(pthread_t thread, void **retval)
return result;
}
#ifdef NACL
/* Native Client doesn't support pthread cleanup functions, */
/* so wrap pthread_exit and manually cleanup the thread. */
void
WRAP_FUNC(pthread_exit)(void *status)
{
GC_thread_exit_proc(0);
REAL_FUNC(pthread_exit)(status);
}
#endif
int
WRAP_FUNC(pthread_detach)(pthread_t thread)
{
@@ -1341,7 +1416,8 @@ void * GC_start_routine_head(void * arg, void *base_addr,
if (start) *start = si -> start_routine;
if (start_arg) *start_arg = si -> arg;
sem_post(&(si -> registered)); /* Last action on si. */
if (!(si->flags & FOREIGN_THREAD))
sem_post(&(si -> registered)); /* Last action on si. */
/* OK to deallocate. */
# if defined(THREAD_LOCAL_ALLOC) && !defined(DBG_HDRS_ALL)
LOCK();
+1 -1
View File
@@ -15,7 +15,7 @@ int main()
|| defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS)
printf("-lpthread\n");
# endif
# if defined(GC_FREEBSD_THREADS)
# if defined(GC_FREEBSD_THREADS) || defined(GC_OPENBSD_THREADS)
# if (__FREEBSD_version >= 500000)
printf("-lpthread\n");
# else
+1
View File
@@ -27,6 +27,7 @@ man_MANS = \
mdvalidater.1 \
mkbundle.1 \
mono.1 \
mprof-report.1 \
mono-cil-strip.1 \
mono-config.5 \
monodocer.1 \
+18 -1
View File
@@ -1,8 +1,10 @@
.\"
.\" certmgr manual page.
.\" Copyright 2004-2005 Novell
.\" Copyright 2010 Pablo Ruiz
.\" Author:
.\" Sebastien Pouliot <[email protected]>
.\" Pablo Ruiz Garcia <[email protected]>
.\"
.TH Mono "certmgr"
.SH NAME
@@ -24,7 +26,9 @@ server certificates.
List the certificates, CTL or CTL in the specified store.
.TP
.I "-add"
Add a certificate, CRL or CTL to specified store.
Add a certificate, CRL or CTL to specified store. If filename it's a pkcs12
or pfx file, and it contains a private key, it will be imported to local key
pair container.
.TP
.I "-del"
Remove a certificate, CRL or CTL from specified store. You must specify the
@@ -44,6 +48,11 @@ This action assume an certificate (-c) object type and will import the
certificates in appropriate stores (i.e. server certificate in the
OtherPeople store, the root certificate in the Trust store, any other
intermediate certificates in the IntermediateCA store).
.TP
.I "-importKey"
Allows importing a private key from a pkcs12 file into a local key pair
store. (Usefull when you already have the key's corresponding certificate
installed at the specific store.)
.SH OBJECT TYPES
.TP
@@ -66,6 +75,9 @@ Use the machine's certificate stores (instead of the default user's stores).
.I "-v"
More details displayed on the console.
.TP
.I "-p password"
Use the specify password when accessing a pkcs12 file.
.TP
.I "-help", "-h", "-?", "/?"
Display help about this tool.
@@ -88,6 +100,9 @@ The filenames either starts with
(subject key identifier).
.TP
The rest of the filename is the base64-encoded value (tbp or ski).
.TP
Private key data is stored under
.I ~/.config/.mono/keypairs/
.SH EXAMPLES
.TP
@@ -140,6 +155,8 @@ element of your machine.config file.
.SH AUTHOR
Written by Sebastien Pouliot
Minor additions by Pablo Ruiz García
.SH COPYRIGHT
Copyright (C) 2004-2005 Novell.
.SH MAILING LISTS
+19 -1
View File
@@ -6,7 +6,7 @@
.SH NAME
csharp, gsharp \- Interactive C# Shell
.SH SYNOPSIS
.B csharp [--attach PID] [file1 [file2]]
.B csharp [--attach PID] [-e EXPRESSION] [file1 [file2]]
[options]
.P
.B gsharp [file1 [file2]]
@@ -29,7 +29,22 @@ target process.
.PP
Files specified in the command line will be loaded and executed as
scripts.
.PP
Starting with Mono 2.10, the
.I csharp
command can be used as an interpreter executed by executables flagged
with the Unix execute attribute. To do this, make the first line of
your C# source code look like this:
.nf
"#!/usr/bin/csharp"
Console.WriteLine ("Hello, World");
.fi
.SH OPTIONS
The commands accept all of the commands that are available to the
.I mcs
command, so you can reference assemblies, specify paths, language
level and so on from the command line. In addition, the following
command line options are supported:
.TP
.I "\-\-attach"
This is an advanced option and should only be used if you have a deep
@@ -42,6 +57,9 @@ special measures to avoid crashing the target application while using
it. For example, you might have to take the proper locks before
issuing any commands that might affect the target process state, or
sending commands through a method dispatcher.
.TP
.I "\-e" EXPRESSION
This will evaluate the specified C# EXPRESSION and exit
.SH OPERATION
Once you launch the csharp command, you will be greeted with the
interactive prompt:
+5
View File
@@ -351,6 +351,11 @@ shell will perform globbing, so you might want to use it like this:
$ mcs -recurse:'*.cs'
.fi
.TP
.I \-sdk:VERSION
Used to specify the version of Base Class Library assemblies. The possible
values are: 2 (default), 4. The version number means which .NET version
should the produced assembly be compatible with.
.TP
.I \-\-shell
Starts up the compiler in interactive mode, providing a C# shell for
statements and expressions. A shortcut is to use the
+79 -406
View File
@@ -220,6 +220,13 @@ Specifies the diagnostics log level for
.Sp
Used to specify the file where the log will be stored, it defaults to
standard output.
.TP
.I server=[y/n]
Defaults to no, with the default option Mono will actively connect to the
host/port configured with the \fBaddress\fR option. If you set it to 'y', it
instructs the Mono runtime to start debugging in server mode, where Mono
actively waits for the debugger front end to connect to the Mono process.
Mono will print out to stdout the IP address and port where it is listening.
.ne
.RE
.TP
@@ -415,6 +422,10 @@ Turns on profiling. For more information about profiling applications
and code coverage see the sections "PROFILING" and "CODE COVERAGE"
below.
.TP
This option can be used multiple times, each time will load an
additional profiler. This allows developers to use modules that
extend the JIT through the Mono profiling interface.
.TP
\fB--trace[=expression]\fR
Shows method names as they are invoked. By default all methods are
traced.
@@ -627,412 +638,22 @@ Note that the statistical profiler has a very low overhead and should
be the preferred profiler to use (for better output use the full path
to the mono binary when running and make sure you have installed the
addr2line utility that comes from the binutils package).
.SH LOGGING PROFILER
.SH LOG PROFILER
This is the most advanced profiler.
.PP
The
.I logging profiler
is a general purpose profiler that can track many different kinds of
events and logs those into a file as the program executes. This is
different than previous profilers in Mono that kept the information in
memory and rendered a summary of the results when the program shut
down.
The Mono \f[I]log\f[] profiler can be used to collect a lot of
information about a program running in the Mono runtime.
This data can be used (both while the process is running and later)
to do analyses of the program behaviour, determine resource usage,
performance issues or even look for particular execution patterns.
.PP
Using the logging profiler means that useful information can be
gathered for long-running applications, applications that terminate
abormally (crashes, segfaults, complicated tear down processes) or
when no data about the shutdown is required.
This is accomplished by logging the events provided by the Mono
runtime through the profiling interface and periodically writing
them to a file which can be later inspected with the mprof-report(1)
tool.
.PP
The data collected by the running threads is kept independent of each
other to minimize the runtime overhead and the information dumped into
the log at regular intervals.
.PP
A sample use is very simple:
.nf
$ mono --profile=logging program.exe
$ mprof-decoder program.mprof
.fi
.PP
In the above example the logging profiler is used in its default mode
that merely records GC statistics for the execution of program.exe.
The profiling data collected is stored in the file program.mprof. The
mprof-decoder tool is then used to analyze the data.
.PP
You can instruct the logging profiler to record different one or more
sets of events. These are the modes supported:
.IP
.I Statistical Profiling (stat)
the program instruction pointer is periodically sampled to determine
where the program is spending most of its time. Statistical
profiling has a very low impact on a running application and it is
very useful to get a general picture of where time is being spent on a
program.
.IP
If call chains are requested, for each sample the profiler gets a
partial stack trace (limited by the specified depth) so that
caller-callee information is available.
.IP
.I Instrumenting:
each method enter and exit is logged with a timestamp; further processing of
the data can show the methods that took the longer to execute, with complete
accounting for callers and callees. However, this way of profiling is rather
intrusive and slows down the application significantly.
.IP
.I Allocation:
each allocation is logged.
.IP
.I Allocation summary:
shows, for each collection, a summary of the heap contents broken down by
class (for each class the number of allocated and released objects is
given, together with their aggregated size in bytes).
.IP
.I Heap snapshot mode:
dumps the whole heap contents at every collection (or at user specified
collections). It is also possible to request a collection and snapshot dump
with a signal.
.PP
Moreover, other events can be logged and analyzed, like jit time for each
method, load and unload for assemblies, modules and and individual classes,
and appdomain and thread creation and destruction.
.PP
This profiler is activated passing the \fB--profile=logging\fR option to
the mono runtime, and is controlled attaching further options, like
\fB--profile=logging:statistical\fR for doing statistical profiling (multiple
options are separated by commas).
.PP
As a quick primer, here are a few examples of the most common usage modes:
.PP
To perform statistical profiling:
.nf
mono --profile=logging:stat program.exe
.fi
.PP
To perform statistical profiling, inspecting call chains up to depth 8:
.nf
mono --profile=logging:stat=8 program.exe
.fi
.PP
To profile allocations (by default the call stack will be analized for
each allocation, producing detailed caller method attribution infornation):
.nf
mono --profile=logging:allocations program.exe
.fi
.PP
To profile garbage collection activity at a high level (collection time and objects freed
at each collection for each class are reported, but heap snapshots are not saved to disk):
.nf
mono --profile=logging:allocations-summary program.exe
.fi
.PP
To perform heap profiling taking heap snapshots:
.nf
mono --profile=logging:heap=all program.exe
.fi
.PP
To write the resulting data to a different file:
.nf
mono --profile=logging:output=mydata.mprof program.exe
.fi
.PP
Then you would need to invoke the decoder \fImprof-decoder(1)\fR
on the output file to see the profiling results, or to examine heap
snapshots and allocations in detail \fImprof-heap-viewer(1)\fR.
.PP
The operating modes described above are the default ones, and are sufficient
to use the profiler.
.PP
To further customize the profiler behavior there are more options, described
below.
.PP
These options can be individually enabled and disabled prefixing them
with an (optional) '+' character or a '-' character. For instance,
the "allocations" option by default records also the full call stack
at each allocation. If only the caller is wanted, one should use
"allocations,-save-allocation-stack", or to disable call tracking
completely (making the profiler less intrusive)
"allocations,-save-allocation-caller,-save-allocation-stack". In
practice the "allocation" option by default behaves like
"allocations,save-allocation-caller,save-allocation-stack", but the
user can tune this to his needs.
.PP
These are all the available options, organized by category:
.PP
\fBExecution profiling modes\fR
.RS
.ne 8
.TP
\fIstatistical\fR, \fIstat\fR or \fIs\fR
Performs statistical profiling. This is a lightweight profiling
mechanism and it has a much lower overhead than the \fIenter-leave\fR
profiling as it works by sampling where the program is spending its
time by using a timer.
If specified with \fIs=<number>\fR, also inspect call chains up to level
<number>.
.TP
\fIenter-leave\fR, \fIcalls\fR or \fIc\fR
Measure the time spent inside each method call, this is done by
logging the time when a method enters and when the method leaves.
This can be a time consuming operation.
.TP
\fIjit\fR, \fIj\fR
Collect information about time spent by the JIT engine compiling
methods.
.ne
.RE
.PP
\fBAllocation profiling modes\fR
.RS
.ne 8
.TP
\fIallocations\fR, \fIalloc\fR or \fIa\fR
Collect information about each allocation (object class and size).
By default this also implies "+save-allocation-caller" and
"+save-allocation-stack".
.TP
\fIsave-allocation-caller\fR, \fIsac\fR
Save the direct caller of each allocation. The profiler filters out wrapper
methods, and also recognizes if the allocation has been performed by the
runtime while jitting a method.
.TP
\fIsave-allocation-stack\fR, \fIsas\fR
Save the full managed execution stack at each allocation.
While the "sac" option saves the direct caller, this one records the whole
stack trace.
Note that in the call stack the wrapper methods are not filtered out.
Anyway the "sac" and "sas" options can be combined, and the decoder will
attribute the allocation to the correct method even if the wrapper is at the
top of the stack trace.
.TP
\fIallocations-summary\fR or \fIas\fR
At each collection dump a summary
of the heap contents (for each class, the number and collective size of all
live and freed heap objects). This very lightweight compared to full heap
snapshots.
.TP
\fIunreachable\fR, \fIfree\fR or \fIf\fR
Performs a lightweight profile of the garbage collector. On each
collection performed by the GC, the list of unreachable objects is
recorded, and for each object the class and size is provided. This
information can be used to compute the heap size broken down by class
(combined with "a" can give the same information of "as", but the log
file contains info about each individual object, while in "as" the
processing is done directly at runtime and the log file contains only
the summarized data broken down by class).
.TP
\fIgc\fR or \fIg\fR
Measure the time spent in each collection, and also trace heap resizes.
.TP
\fIheap-shot[=ARG]\fR, \fIheap[=ARG]\fR or \fIh[=ARH]\fR
Performs full heap profiling. In this case on each
collection a full heap snapshot is recorded to disk.
Inside the snapshots, each object reference is still represented so
that it's possible to investigate who is responsible for keeping objects
alive.
.PP
If the value of ARG is
.B all,
a heap snapshot is taken at each collection.
.PP
If the value is an integer
.B n,
a snapshot will be taken at the first
.B n
collections (like setting
.B gcd=n
);
.PP
If no additional argument is given to the heap option, the only way to take
heap snapshots is to requeste them using the runtime socket based command
interface described below (see "Profiler activity control").
.PP
Heap profiling also enables full allocation profiling (with call
stacks), and each allocation can be related to its corresponding
object in the snapshots, enabling investigations like "find all
objects of a given class allocated by a given method and still live at
a given collection, and then find all objects referencing them".
.PP
This kind of heap snapshot analysis is performed using the mprof-heap-viewer(1)
application.
.PP
The number of heap snapshots taken (and the moment in which they are taken)
can be further customized with the following options:
.TP
\fIgc-dumps=N\fR, \fIgc-d=N\fR, \fIgcd=N\fR
states the number of snapshots that must be dumped (since the application
starts). Zero means no dumps at all, -1 means dump at all collections.
.TP
These options exist because it can happen that the user wants to investigate
what happens during collections but without forcing a collection using the
command interface, because forcing a collection alters the program behavior.
Of course it is possible to simply take a snapshot at every collection, but
in some workloads this is could not be feasible (too much data).
So we have this "garbage collection dumps" counter to control how many
snapshots to take.
.ne
.RE
.PP
\fBProfiler activity control\fR
.RS
.ne 8
.TP
\fIoutput=FILE\fR, \fIout=FILE\fR or \fIo=FILE\fR
Use this option to provide the output file name for the profile log.
If this option is not specified, it will default to "<program-name>.mprof".
.TP
\fIoutput-suffix=SUFFIX\fR, \fIsuffix=SUFFIX\fR or \fIos=SUFFIX\fR: makes
the output file name equals to "<program-name>-SUFFIX.mprof".
.TP
\fIstart-enabled\fR or \fIse\fR: start with the profiler active
(which is the default).
.TP
\fIstart-disabled\fR or \fIsd\fR: start with the profiler inactive.
.TP
\fIforce-accurate-timer\fR (or \fIfac\fR): the profiler by default uses
rtdsc to acquire timestamps for frequent events, but this can be imprecise;
using this option you force the use of "gettimeofday" at every event, which
is more accurate but much slower.
.TP
\fIcommand-port=port\fR or \fIcp=port\fR (where port is an integer between
1024 nd 65535):
Choose a TCP port where the profiler will listen for user commands.
The protocol is ASCII based and line oriented (one line per command), and the
profiler answers with one line containing either "OK" or "ERROR" to each
received command.
.PP
The user can telnet to this port and give commands manually, or a GUI can
use this facility to control the profiler at runtime.
.PP
The available commands are:
.TP
\fIenable\fR: Enables the profiler.
.TP
\fIdisable\fR: Disables the profiler.
.TP
\fIheap-snapshot\fR: Takes a heap snapshot now (forces a full garbage collection).
.TP
\fIheap-snapshot-counter=arg\fR: Set the counter of the next heap snapshots
that must be taken, where arg can be "all" (take a snapshot at every
collection), "none" (do not take snapshots), or an integer "n" (take a heap
snapshot for the next "n" collections).
.ne
.RE
.PP
\fBInternal buffer sizes\fR
.RS
.ne 8
.TP
\fIper-thread-buffer-size=N\fR, \fItbs=N\fR
Use to specify the number of events that a thread buffer
can hold. When the thread buffer is full, a log block is
written to disk.
.Sp
This defaults to tbs=10000.
.TP
\fIstatistical-thread-buffer-size=N\fR, \fIsbs=N\fR
The number of statistical samples that
are held in memory before they are dumped to disk (the system does
double-buffering and the statistical samples are written by a helper
thread, so the statistical profiler never stops and is able to profile
the profiler itself).
.Sp
This defaults to sbs=10000.
.TP
\fIwrite-buffer-size\fR, \fIwbs\fR
Specifies the size in bytes of the internal write buffers.
.Sp
This defaults to wbs=1024.
.ne
.RE
.PP
In its current state, this profiler can also perform heap analysis
like the HeapShot profiler, but there is no UI to process this
information.
.PP
Another known issue is that if the timer is not strictly monotonic (like
rtdsc), differences between times can underflow (they are handled as
unsigned integers) and weird numbers can show up in the logs.
.PP
Finally, it can happen that when exceptions are thrown the profiler temporarily
loses track of the execution stack and misattributes the caller for a few
allocations (and method execution time).
.PP
The output file contains compressed events, to process the data you should
use tools like the "Mono.Profiler" tool provided on the Mono SVN
repository.
.PP
More explanations are provided here: "http://www.mono-project.com/LoggingProfiler".
.SH EXTERNAL PROFILERS
There are a number of external profilers that have been developed for
Mono, we will update this section to contain the profilers.
.PP
The heap Shot profiler can track all live objects, and references to
these objects, and includes a GUI tool, this is our recommended
profiler.
To install you must download the profiler
from Mono's SVN:
.nf
svn co svn://anonsvn.mono-project.com/source/trunk/heap-shot
cd heap-shot
./autogen
make
make install
.fi
.PP
See the included documentation for details on using it.
.PP
The Live Type profiler shows at every GC iteration all of the live
objects of a given type. To install you must download the profiler
from Mono's SVN:
.nf
svn co svn://anonsvn.mono-project.com/source/trunk/heap-prof
cd heap-prof
./autogen
make
make install
.fi
.PP
To use the profiler, execute:
.nf
mono --profile=desc-heap program.exe
.fi
.PP
The output of this profiler looks like this:
.nf
Checkpoint at 102 for heap-resize
System.MonoType : 708
System.Threading.Thread : 352
System.String : 3230
System.String[] : 104
Gnome.ModuleInfo : 112
System.Object[] : 160
System.Collections.Hashtable : 96
System.Int32[] : 212
System.Collections.Hashtable+Slot[] : 296
System.Globalization.CultureInfo : 108
System.Globalization.NumberFormatInfo : 144
.fi
.PP
The first line describes the iteration number for the GC, in this case
checkpoint 102.
.PP
Then on each line the type is displayed as well as the number of bytes
that are being consumed by live instances of this object.
.PP
The AOT profiler is used to feed back information to the AOT compiler
about how to order code based on the access patterns for pages. To
use it, use:
.nf
mono --profile=aot program.exe
.fi
The output of this profile can be fed back into Mono's AOT compiler to
order the functions on the disk to produce precompiled images that
have methods in sequential pages.
More information about how to use the log profiler is available on the
mprof-report(1) page.
.SH CUSTOM PROFILERS
Mono provides a mechanism for loading other profiling modules which in
the form of shared libraries. These profiling modules can hook up to
@@ -1381,7 +1002,35 @@ The default is 512 megabytes.
Specifies which write barrier to use. Options are `cardtable' and
`remset'. The card table barrier is faster but less precise, and only
supported for the Mark&Sweep major collector on 32 bit platforms. The
default is `cardtable' if it is supported, otherwise `remset'.
default is `cardtable' if it is supported, otherwise `remset'. The cardtable
write barrier is faster and has a more stable and usually smaller
memory footprint. If the program causes too much pinning during
thread scan, it might be faster to enable remset.
.TP
\fBevacuation-threshold=\fIthreshold\fR
Sets the evacuation threshold in percent. This option is only available
on the Mark&Sweep major collectors. The value must be an
integer in the range 0 to 100. The default is 66. If the sweep phase of
the collection finds that the occupancy of a specific heap block type is
less than this percentage, it will do a copying collection for that block
type in the next major collection, thereby restoring occupancy to close
to 100 percent. A value of 0 turns evacuation off.
.TP
\fB(no-)concurrent-sweep\fR
Enables or disables concurrent sweep for the Mark&Sweep collector. If
enabled, the sweep phase of the garbage collection is done in a thread
concurrently with the application. Concurrent sweep is disabled by
default.
.TP
\fBstack-mark=\fImark-mode\fR
Specifies how application threads should be scanned. Options are
`precise` and `conservative`. Precise marking allow the collector
to know what values on stack are references and what are not.
Conservative marking threats all values as potentially references
and leave them untouched. Precise marking reduces floating garbage
and can speed up nursery collection and allocation rate, it has
the downside of requiring a significant extra memory per compiled
method. The right option, unfortunately, requires experimentation.
.ne
.RE
.TP
@@ -1654,11 +1303,36 @@ trading off the small leaks for the increased performance
unload the application domains on production systems, it is worth
using this feature).
.TP
\fBdyn-runtime-invoke\fR
Instructs the runtime to try to use a generic runtime-invoke wrapper
instead of creating one invoke wrapper.
.TP
\fBgdb\fR
Equivalent to setting the \fBMONO_XDEBUG\fR variable, this emits
symbols into a shared library as the code is JITed that can be loaded
into GDB to inspect symbols.
.TP
\fBgen-seq-points\fR
Automatically generates sequence points where the
IL stack is empty. These are places where the debugger can set a
breakpoint.
.TP
\fBexplicit-null-checks\fR
Makes the JIT generate an explicit NULL check on variable dereferences
instead of depending on the operating system to raise a SIGSEGV or
another form of trap event when an invalid memory location is
accessed.
.TP
\fBhandle-sigint\fR
Captures the interrupt signal (Control-C) and displays a stack trace
when pressed. Useful to find out where the program is executing at a
given point. This only displays the stack trace of a single thread.
.TP
\fBinit-stacks\FR
Instructs the runtime to initialize the stack with
some known values (0x2a on x86-64) at the start of a method to assist
in debuggin the JIT engine.
.TP
\fBkeep-delegates\fR
This option will leak delegate trampolines that are no longer
referenced as to present the user with more information about a
@@ -1682,7 +1356,6 @@ This option will disable the GDB backtrace emitted by the runtime
after a SIGSEGV or SIGABRT in unmanaged code.
.TP
\fBsuspend-on-sigsegv\fR
This option will suspend the program when a native SIGSEGV is received.
This is useful for debugging crashes which do not happen under gdb,
since a live process contains more information than a core file.
@@ -1777,7 +1450,7 @@ Mono JIT by default turns this on.
\fBMONO_XDEBUG\fR
When the the MONO_XDEBUG env var is set, debugging info for JITted
code is emitted into a shared library, loadable into gdb. This enables,
for example, to see managed frame names on gdb backtraces.
for example, to see managed frame names on gdb backtraces.
.TP
\fBMONO_VERBOSE_METHOD\fR
Enables the maximum JIT verbosity for the specified method. This is
+524
View File
@@ -0,0 +1,524 @@
.TH mprof-report 1 ""
.SH The Mono log profiler
.PP
The Mono \f[I]log\f[] profiler can be used to collect a lot of
information about a program running in the Mono runtime.
This data can be used (both while the process is running and later)
to do analyses of the program behaviour, determine resource usage,
performance issues or even look for particular execution patterns.
.PP
This is accomplished by logging the events provided by the Mono
runtime through the profiling interface and periodically writing
them to a file which can be later inspected with the command line
\f[I]mprof-report\f[] program or with a GUI (not developed yet).
.PP
The events collected include (among others):
.IP \[bu] 2
method enter and leave
.IP \[bu] 2
object allocation
.IP \[bu] 2
garbage collection
.IP \[bu] 2
JIT compilation
.IP \[bu] 2
metadata loading
.IP \[bu] 2
lock contention
.IP \[bu] 2
exceptions
.PP
In addition, the profiler can periodically collect info about all
the objects present in the heap at the end of a garbage collection
(this is called heap shot and currently implemented only for the
sgen garbage collector).
Another available profiler mode is the \f[I]sampling\f[] or
\f[I]statistical\f[] mode: periodically the program is sampled and
the information about what the program was busy with is saved.
This allows to get information about the program behaviour without
degrading its performance too much (usually less than 10%).
.SS Basic profiler usage
.PP
The simpler way to use the profiler is the following:
.PP
\f[B]mono\ --profile=log\ program.exe\f[]
.PP
At the end of the execution the file \f[I]output.mlpd\f[] will be
found in the current directory.
A summary report of the data can be printed by running:
.PP
\f[B]mprof-report\ output.mlpd\f[]
.PP
With this invocation a huge amount of data is collected about the
program execution and collecting and saving this data can
significantly slow down program execution.
If saving the profiling data is not needed, a report can be
generated directly with:
.PP
\f[B]mono\ --profile=log:report\ program.exe\f[]
.PP
If the information about allocations is not of interest, it can be
excluded:
.PP
\f[B]mono\ --profile=log:noalloc\ program.exe\f[]
.PP
On the other hand, if method call timing is not important, while
allocations are, the needed info can be gathered with:
.PP
\f[B]mono\ --profile=log:nocalls\ program.exe\f[]
.PP
You will still be able to inspect information about the sequence of
calls that lead to each allocation because at each object
allocation a stack trace is collected if full enter/leave
information is not available.
.PP
To periodically collect heap shots (and exclude method and
allocation events) use the following options (making sure you run
with the sgen garbage collector):
.PP
\f[B]mono\ --gc=sgen\ --profile=log:heapshot\ program.exe\f[]
.PP
To perform a sampling profiler run, use the \f[I]sample\f[] option:
.PP
\f[B]mono\ --profile=log:sample\ program.exe\f[]
.SS Profiler option documentation
.PP
By default the \f[I]log\f[] profiler will gather all the events
provided by the Mono runtime and write them to a file named
\f[I]output.mlpd\f[].
When no option is specified, it is equivalent to using:
.PP
\f[B]--profile=log:calls,alloc,output=output.mlpd,maxframes=8,calldepth=100\f[]
.PP
The following options can be used to modify this default behaviour.
Each option is separated from the next by a \f[B],\f[] character,
with no spaces and all the options are included after the
\f[I]log:\f[] profile module specifier.
.IP \[bu] 2
\f[I]help\f[]: display concise help info about each available
option
.IP \[bu] 2
\f[I][no]alloc\f[]: \f[I]noalloc\f[] disables collecting object
allocation info, \f[I]alloc\f[] enables it if it was disabled by
another option like \f[I]heapshot\f[].
.IP \[bu] 2
\f[I][no]calls\f[]: \f[I]nocalls\f[] disables collecting method
enter and leave events.
When this option is used at each object allocation and at some
other events (like lock contentions and exception throws) a stack
trace is collected by default.
See the \f[I]maxframes\f[] option to control this behaviour.
\f[I]calls\f[] enables method enter/leave events if they were
disabled by another option like \f[I]heapshot\f[].
.IP \[bu] 2
\f[I]heapshot[=MODE]\f[]: collect heap shot data at each major
collection.
The frequency of the heap shots can be changed with the
\f[I]MODE\f[] parameter.
When this option is used allocation events and method enter/leave
events are not recorded by default: if they are needed, they need
to be enabled explicitly.
The optional parameter \f[I]MODE\f[] can modify the default heap
shot frequency.
heapshot can be used multiple times with different modes: in that
case a heap shot is taken if either of the conditions are met.
MODE can be one of:
.RS 2
.IP \[bu] 2
\f[I]NUM\f[]ms: perform a heap shot if at least \f[I]NUM\f[]
milliseconds passed since the last one.
.IP \[bu] 2
\f[I]NUM\f[]gc: perform a heap shot every \f[I]NUM\f[] major
garbage collections
.IP \[bu] 2
\f[I]ondemand\f[]: perform a heap shot when such a command is sent
to the control port
.RE
.IP \[bu] 2
\f[I]sample[=TYPE[/FREQ]]\f[]: collect statistical samples of the
program behaviour.
The default is to collect a 1000 times per second the instruction
pointer.
This is equivalent to the value \[lq]cycles/1000\[rq] for
\f[I]TYPE\f[].
On some systems, like with recent Linux kernels, it is possible to
cause the sampling to happen for other events provided by the
performance counters of the cpu.
In this case, \f[I]TYPE\f[] can be one of:
.RS 2
.IP \[bu] 2
\f[I]cycles\f[]: processor cycles
.IP \[bu] 2
\f[I]instr\f[]: executed instructions
.IP \[bu] 2
\f[I]cacherefs\f[]: cache references
.IP \[bu] 2
\f[I]cachemiss\f[]: cache misses
.IP \[bu] 2
\f[I]branches\f[]: executed branches
.IP \[bu] 2
\f[I]branchmiss\f[]: mispredicted branches
.RE
.IP \[bu] 2
\f[I]time=TIMER\f[]: use the TIMER timestamp mode.
TIMER can have the following values:
.RS 2
.IP \[bu] 2
\f[I]fast\f[]: a usually faster but possibly more inaccurate timer
.RE
.IP \[bu] 2
\f[I]maxframes=NUM\f[]: when a stack trace needs to be performed,
collect \f[I]NUM\f[] frames at the most.
The default is 8.
.IP \[bu] 2
\f[I]calldepth=NUM\f[]: ignore method enter/leave events when the
call chain depth is bigger than NUM.
.IP \[bu] 2
\f[I]zip\f[]: automatically compress the output data in gzip
format.
.IP \[bu] 2
\f[I]output=OUTSPEC\f[]: instead of writing the profiling data to
the output.mlpd file, substitute \f[I]%p\f[] in \f[I]OUTSPEC\f[]
with the current process id and \f[I]%t\f[] with the current date
and time, then do according to \f[I]OUTSPEC\f[]:
.RS 2
.IP \[bu] 2
if \f[I]OUTSPEC\f[] begins with a \f[I]|\f[] character, execute the
rest as a program and feed the data to its standard input
.IP \[bu] 2
if \f[I]OUTSPEC\f[] begins with a \f[I]-\f[] character, use the
rest of OUTSPEC as the filename, but force overwrite any existing
file by that name
.IP \[bu] 2
otherwise write the data the the named file: note that is a file by
that name already exists, a warning is issued and profiling is
disabled.
.RE
.IP \[bu] 2
\f[I]report\f[]: the profiling data is sent to mprof-report, which
will print a summary report.
This is equivalent to the option: \f[B]output=mprof-report\ -\f[].
If the \f[I]output\f[] option is specified as well, the report will
be written to the output file instead of the console.
.IP \[bu] 2
\f[I]port=PORT\f[]: specify the tcp/ip port to use for the
listening command server.
Currently not available for windows.
This server is started for example when heapshot=ondemand is used:
it will read commands line by line.
The following commands are available:
.RS 2
.IP \[bu] 2
\f[I]heapshot\f[]: perform a heapshot as soon as possible
.RE
.SS Analyzing the profile data
.PP
Currently there is a command line program (\f[I]mprof-report\f[])
to analyze the data produced by the profiler.
This is ran automatically when the \f[I]report\f[] profiler option
is used.
Simply run:
.PP
\f[B]mprof-report\ output.mlpd\f[]
.PP
to see a summary report of the data included in the file.
.SS Trace information for events
.PP
Often it is important for some events, like allocations, lock
contention and exception throws to know where they happened.
Or we may want to see what sequence of calls leads to a particular
method invocation.
To see this info invoke mprof-report as follows:
.PP
\f[B]mprof-report\ --traces\ output.mlpd\f[]
.PP
The maximum number of methods in each stack trace can be specified
with the \f[I]\[em]maxframes=NUM\f[] option:
.PP
\f[B]mprof-report\ --traces\ --maxframes=4\ output.mlpd\f[]
.PP
The stack trace info will be available if method enter/leave events
have been recorded or if stack trace collection wasn't explicitly
disabled with the \f[I]maxframes=0\f[] profiler option.
Note that the profiler will collect up to 8 frames by default at
specific events when the \f[I]nocalls\f[] option is used, so in
that case, if more stack frames are required in mprof-report, a
bigger value for maxframes when profiling must be used, too.
.PP
The \f[I]\[em]traces\f[] option also controls the reverse reference
feature in the heapshot report: for each class it reports how many
references to objects of that class come from other classes.
.SS Sort order for methods and allocations
.PP
When a list of methods is printed the default sort order is based
on the total time spent in the method.
This time is wall clock time (that is, it includes the time spent,
for example, in a sleep call, even if actual cpu time would be
basically 0).
Also, if the method has been ran on different threads, the time
will be a sum of the time used in each thread.
.PP
To change the sort order, use the option:
.PP
\f[B]--method-sort=MODE\f[]
.PP
where \f[I]MODE\f[] can be:
.IP \[bu] 2
\f[I]self\f[]: amount of time spent in the method itself and not in
its callees
.IP \[bu] 2
\f[I]calls\f[]: the number of method invocations
.IP \[bu] 2
\f[I]total\f[]: the total time spent in the method.
.PP
Object allocation lists are sorted by default depending on the
total amount of bytes used by each type.
.PP
To change the sort order of object allocations, use the option:
.PP
\f[B]--alloc-sort=MODE\f[]
.PP
where \f[I]MODE\f[] can be:
.IP \[bu] 2
\f[I]count\f[]: the number of allocated objects of the given type
.IP \[bu] 2
\f[I]bytes\f[]: the total number of bytes used by objects of the
given type
.SS Selecting what data to report
.PP
The profiler by default collects data about many runtime subsystems
and mprof-report prints a summary of all the subsystems that are
found in the data file.
It is possible to tell mprof-report to only show information about
some of them with the following option:
.PP
\f[B]--reports=R1[,R2...]\f[]
.PP
where the report names R1, R2 etc.
can be:
.IP \[bu] 2
\f[I]header\f[]: information about program startup and profiler
version
.IP \[bu] 2
\f[I]jit\f[]: JIT compiler information
.IP \[bu] 2
\f[I]sample\f[]: statistical sampling information
.IP \[bu] 2
\f[I]gc\f[]: garbage collection information
.IP \[bu] 2
\f[I]alloc\f[]: object allocation information
.IP \[bu] 2
\f[I]call\f[]: method profiling information
.IP \[bu] 2
\f[I]metadata\f[]: metadata events like image loads
.IP \[bu] 2
\f[I]exception\f[]: exception throw and handling information
.IP \[bu] 2
\f[I]monitor\f[]: lock contention information
.IP \[bu] 2
\f[I]thread\f[]: thread information
.IP \[bu] 2
\f[I]heapshot\f[]: live heap usage at heap shots
.PP
It is possible to limit some of the data displayed to a timeframe
of the program execution with the option:
.PP
\f[B]--time=FROM-TO\f[]
.PP
where \f[I]FROM\f[] and \f[I]TO\f[] are seconds since application
startup (they can be floating point numbers).
.PP
Another interesting option is to consider only events happening on
a particular thread with the following option:
.PP
\f[B]--thread=THREADID\f[]
.PP
where \f[I]THREADID\f[] is one of the numbers listed in the thread
summary report (or a thread name when present).
.PP
By default long lists of methods or other information like object
allocations are limited to the most important data.
To increase the amount of information printed you can use the
option:
.PP
\f[B]--verbose\f[]
.SS Track individual objects
.PP
Instead of printing the usual reports from the profiler data, it is
possible to track some interesting information about some specific
object addresses.
The objects are selected based on their address with the
\f[I]\[em]track\f[] option as follows:
.PP
\f[B]--track=0xaddr1[,0xaddr2,...]\f[]
.PP
The reported info (if available in the data file), will be class
name, size, creation time, stack trace of creation (with the
\f[I]\[em]traces\f[] option), etc.
If heapshot data is available it will be possible to also track
what other objects reference one of the listed addresses.
.PP
The object addresses can be gathered either from the profiler
report in some cases (like in the monitor lock report), from the
live application or they can be selected with the
\f[I]\[em]find=FINDSPEC\f[] option.
FINDSPEC can be one of the following:
.IP \[bu] 2
\f[I]S:SIZE\f[]: where the object is selected if it's size is at
least \f[I]SIZE\f[]
.IP \[bu] 2
\f[I]T:NAME\f[]: where the object is selected if \f[I]NAME\f[]
partially matches its class name
.PP
This option can be specified multiple times with one of the
different kinds of FINDSPEC.
For example, the following:
.PP
\f[B]--find=S:10000\ --find=T:Byte[]\f[]
.PP
will find all the byte arrays that are at least 10000 bytes in
size.
.PP
Note that with a moving garbage collector the object address can
change, so you may need to track the changed address manually.
It can also happen that multiple objects are allocated at the same
address, so the output from this option can become large.
.SS Saving a profiler report
.PP
By default mprof-report will print the summary data to the console.
To print it to a file, instead, use the option:
.PP
\f[B]--out=FILENAME\f[]
.SS Dealing with profiler slowness
.PP
If the profiler needs to collect lots of data, the execution of the
program will slow down significantly, usually 10 to 20 times
slower.
There are several ways to reduce the impact of the profiler on the
program execution.
.SS Use the statistical sampling mode
.PP
Statistical sampling allows executing a program under the profiler
with minimal performance overhead (usually less than 10%).
This mode allows checking where the program is spending most of
it's execution time without significantly perturbing its behaviour.
.SS Collect less data
.PP
Collecting method enter/leave events can be very expensive,
especially in programs that perform many millions of tiny calls.
The profiler option \f[I]nocalls\f[] can be used to avoid
collecting this data or it can be limited to only a few call levels
with the \f[I]calldepth\f[] option.
.PP
Object allocation information is expensive as well, though much
less than method enter/leave events.
If it's not needed, it can be skipped with the \f[I]noalloc\f[]
profiler option.
Note that when method enter/leave events are discarded, by default
stack traces are collected at each allocation and this can be
expensive as well.
The impact of stack trace information can be reduced by setting a
low value with the \f[I]maxframes\f[] option or by eliminating them
completely, by setting it to 0.
.PP
The other major source of data is the heapshot profiler option:
especially if the managed heap is big, since every object needs to
be inspected.
The \f[I]MODE\f[] parameter of the \f[I]heapshot\f[] option can be
used to reduce the frequency of the heap shots.
.SS Reduce the timestamp overhead
.PP
On many operating systems or architectures what actually slows down
profiling is the function provided by the system to get timestamp
information.
The \f[I]time=fast\f[] profiler option can be usually used to speed
up this operation, but, depending on the system, time accounting
may have some level of approximation (though statistically the data
should be still fairly valuable).
.SS Dealing with the size of the data files
.PP
When collecting a lot of information about a profiled program, huge
data files can be generated.
There are a few ways to minimize the amount of data, for example by
not collecting some of the more space-consuming information or by
compressing the information on the fly or by just generating a
summary report.
.SS Reducing the amount of data
.PP
Method enter/leave events can be excluded completely with the
\f[I]nocalls\f[] option or they can be limited to just a few levels
of calls with the \f[I]calldepth\f[] option.
For example, the option:
.PP
\f[B]calldepth=10\f[]
.PP
will ignore the method events when there are more than 10 managed
stack frames.
This is very useful for programs that have deep recursion or for
programs that perform many millions of tiny calls deep enough in
the call stack.
The optimal number for the calldepth option depends on the program
and it needs to be balanced between providing enough profiling
information and allowing fast execution speed.
.PP
Note that by default, if method events are not recorded at all, the
profiler will collect stack trace information at events like
allocations.
To avoid gathering this data, use the \f[I]maxframes=0\f[] profiler
option.
.PP
Allocation events can be eliminated with the \f[I]noalloc\f[]
option.
.PP
Heap shot data can also be huge: by default it is collected at each
major collection.
To reduce the frequency, you can specify a heapshot mode: for
example to collect every 5 collections (including major and minor):
.PP
\f[B]heapshot=5gc\f[]
.PP
or when at least 5 seconds passed since the last heap shot:
.PP
\f[B]heapshot=5000ms\f[]
.SS Compressing the data
.PP
To reduce the amout of disk space used by the data, the data can be
compressed either after it has been generated with the gzip
command:
.PP
\f[B]gzip\ -9\ output.mlpd\f[]
.PP
or it can be compressed automatically by using the \f[I]zip\f[]
profiler option.
Note that in this case there could be a significant slowdown of the
profiled program.
.PP
The mprof-report program will tranparently deal with either
compressed or uncompressed data files.
.SS Generating only a summary report
.PP
Often it's enough to look at the profiler summary report to
diagnose an issue and in this case it's possible to avoid saving
the profiler data file to disk.
This can be accomplished with the \f[I]report\f[] profiler option,
which will basically send the data to the mprof-report program for
display.
.PP
To have more control of what summary information is reported (or to
use a completely different program to decode the profiler data),
the \f[I]output\f[] profiler option can be used, with \f[B]|\f[] as
the first character: the rest of the output name will be executed
as a program with the data fed in on the standard input.
.PP
For example, to print only the Monitor summary with stack trace
information, you could use it like this:
.PP
\f[B]output=|mprof-report\ --reports=monitor\ --traces\ -\f[]
.SH WEB SITE
http://www.mono-project.com/Profiler
.SH SEE ALSO
.PP
mono(1)
.SH AUTHORS
Paolo Molaro.
+17 -3
View File
@@ -23,6 +23,15 @@ Set or override project properties
.B \//logger:<logger>
Custom logger to log build events
.TP
.B \//toolsversion:version , /tv:version
Specify the toolset version to use.
Eg. /tv:4.0
This would cause 4.0 version of the Microsoft.Common.targets (among others) to be used. This overrides
the value specified in a project file.
Valid values: 2.0, 3.0, 3.5 and 4.0
.TP
.B \//verbosity:<level>
Logger verbosity level : quiet, minimal, normal, detailed, diagnostic
.TP
@@ -64,9 +73,10 @@ to $prefix/lib/mono/xbuild . When used in Import, like:
xbuild tries various values for the msbuild property $(MSBuildExtensionsPath), in order:
1. Paths specified in the environment variable $MSBuildExtensionsPath.
2. $XDG_CONFIG_HOME/xbuild/tasks (or Environment.SpecialFolder.ApplicationData)
3. $prefix/lib/mono/xbuild (default location)
1. /Library/Frameworks/Mono.framework/External/xbuild on Mac OSX.
2. Paths specified in the environment variable $MSBuildExtensionsPath.
3. $XDG_CONFIG_HOME/xbuild/tasks (or Environment.SpecialFolder.ApplicationData)
4. $prefix/lib/mono/xbuild (default location)
Anywhere else in the project files, $(MSBuildExtensionsPath) will always resolve to the default
location. This is a xbuild-only feature.
@@ -102,6 +112,10 @@ For example, you could set this variable from your shell:
You can disable the built-in color scheme by setting this variable to
"disable".
.SH NOTES
On Mac OSX, for locating pkg-config (.pc) files, xbuild additionally
looks in "/Library/Frameworks/Mono.framework/External/pkgconfig" .
.SH SEE ALSO
.BR mono(1), mcs(1)
.SH COPYRIGHT
+1 -2
View File
@@ -13,9 +13,8 @@ tests/?mcs.log
tests/gtest-*.dll
tests/test-*.dll
tests/xml-*.xml
tests/?xml-*.xml
tests/test-*.netmodule
tests/gxml-*.xml
tests/test-*.xml
tests/data.xml
class/Mono.Data.Sqlite/test.db
class/Mono.CSharp/Mono.CSharp.dll.sources
+13 -20
View File
@@ -3,16 +3,13 @@ thisdir := .
SUBDIRS := build jay mcs class nunit24 ilasm tools tests errors docs
basic_SUBDIRS := build jay mcs class tools
net_2_0_bootstrap_SUBDIRS := build tools
net_2_0_SUBDIRS := build mcs class nunit24 ilasm tools tests errors
moonlight_bootstrap_SUBDIRS := build mcs class
moonlight_raw_SUBDIRS := build mcs class tools
moonlight_SUBDIRS := tools tests errors
monotouch_SUBDIRS := build mcs class
monotouch_bootstrap_SUBDIRS := build mcs class
net_2_0_SUBDIRS := build class nunit24 ilasm tools tests errors mcs
moonlight_raw_SUBDIRS := build class tools mcs
moonlight_SUBDIRS := tools
monodroid_SUBDIRS := build class mcs
monotouch_SUBDIRS := build class mcs
net_3_5_SUBDIRS := build class tools/xbuild
net_4_0_bootstrap_SUBDIRS := build mcs class tools
net_4_0_SUBDIRS := build mcs class nunit24 ilasm tools tests errors docs
net_4_0_SUBDIRS := build class nunit24 ilasm tools tests errors mcs docs
# List of test subdirs that should pass 100%
centum_tests := \
@@ -103,16 +100,13 @@ profiles-do--run-test:
# Orchestrate the bootstrap here.
_boot_ = all clean install
$(_boot_:%=profile-do--net_4_0--%): profile-do--net_4_0--%: profile-do--net_4_0_bootstrap--%
$(_boot_:%=profile-do--net_4_0_bootstrap--%): profile-do--net_4_0_bootstrap--%: profile-do--net_2_0--%
$(_boot_:%=profile-do--net_4_0--%): profile-do--net_4_0--%: profile-do--basic--%
$(_boot_:%=profile-do--net_3_5--%): profile-do--net_3_5--%: profile-do--net_2_0--%
$(_boot_:%=profile-do--moonlight--%): profile-do--moonlight--%: profile-do--moonlight_raw--%
$(_boot_:%=profile-do--monotouch--%): profile-do--monotouch--%: profile-do--monotouch_bootstrap--%
$(_boot_:%=profile-do--monotouch_bootstrap--%): profile-do--monotouch_bootstrap--%: profile-do--net_2_0--%
$(_boot_:%=profile-do--moonlight_raw--%): profile-do--moonlight_raw--%: profile-do--moonlight_bootstrap--%
$(_boot_:%=profile-do--moonlight_bootstrap--%): profile-do--moonlight_bootstrap--%: profile-do--basic--%
$(_boot_:%=profile-do--net_2_0--%): profile-do--net_2_0--%: profile-do--net_2_0_bootstrap--%
$(_boot_:%=profile-do--net_2_0_bootstrap--%): profile-do--net_2_0_bootstrap--%: profile-do--basic--%
$(_boot_:%=profile-do--moonlight--%): profile-do--moonlight--%: profile-do--moonlight_raw--%
$(_boot_:%=profile-do--monodroid--%): profile-do--monodroid--%: profile-do--basic--%
$(_boot_:%=profile-do--monotouch--%): profile-do--monotouch--%: profile-do--basic--%
$(_boot_:%=profile-do--moonlight_raw--%): profile-do--moonlight_raw--%: profile-do--basic--%
$(_boot_:%=profile-do--net_2_0--%): profile-do--net_2_0--%: profile-do--basic--%
testcorlib:
@cd class/corlib && $(MAKE) test run-test
@@ -138,8 +132,7 @@ DISTFILES = \
MonoIcon.png \
README \
ScalableMonoIcon.svg \
winexe.in \
nunit.key
winexe.in
dist-local: dist-default
-3
View File
@@ -17,13 +17,10 @@ common/Consts.cs: common/Consts.cs.in $(wildcard config.make)
PLATFORMS = darwin linux win32
PROFILES = \
basic \
net_2_0_bootstrap \
net_2_0 \
moonlight_bootstrap \
moonlight_raw \
moonlight \
net_3_5 \
net_4_0_bootstrap \
net_4_0
COMMON_SRCS = \
+3 -5
View File
@@ -39,7 +39,7 @@ static class Consts
public const string MonoProduct = "MONO Common language infrastructure";
public const string MonoCopyright = "(c) various MONO Authors";
#if NET_4_0 || BOOTSTRAP_NET_4_0
#if NET_4_0
public const string FxVersion = "4.0.0.0";
public const string FxFileVersion = "4.0.30319.1";
@@ -62,7 +62,7 @@ static class Consts
public const string VsVersion = "9.0.0.0"; // unused, but needed for compilation
public const string FxFileVersion = "4.0.50524.0";
public const string VsFileVersion = "9.0.50727.42"; // unused, but needed for compilation
#elif NET_2_0 || BOOTSTRAP_NET_2_0
#elif NET_2_0
// Versions of .NET Framework 2.0 RTM
public const string FxVersion = "2.0.0.0";
public const string VsVersion = "8.0.0.0";
@@ -82,9 +82,7 @@ static class Consts
public const string AssemblyI18N = "I18N, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=0738eb9f132ed756";
public const string AssemblyMicrosoft_VisualStudio = "Microsoft.VisualStudio, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
#if NET_2_0
public const string AssemblyMicrosoft_VisualStudio_Web = "Microsoft.VisualStudio.Web, Version=" + VsVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
#endif
public const string AssemblyMicrosoft_VSDesigner = "Microsoft.VSDesigner, Version=" + VsVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
public const string AssemblyMono_Http = "Mono.Http, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=0738eb9f132ed756";
public const string AssemblyMono_Posix = "Mono.Posix, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=0738eb9f132ed756";
@@ -102,7 +100,7 @@ static class Consts
public const string AssemblySystem_ServiceProcess = "System.ServiceProcess, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
public const string AssemblySystem_Web = "System.Web, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
public const string AssemblySystem_Windows_Forms = "System.Windows.Forms, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b77a5c561934e089";
#if NET_4_0 || BOOTSTRAP_NET_4_0
#if NET_4_0
public const string AssemblySystem_2_0 = "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
public const string AssemblySystemCore_3_5 = "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
public const string AssemblySystem_Core = "System.Core, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b77a5c561934e089";
+2 -1
View File
@@ -33,7 +33,7 @@
//
namespace System {
#pragma warning disable 436
[AttributeUsage (AttributeTargets.All, AllowMultiple=true)]
internal class MonoTODOAttribute : Attribute {
@@ -97,4 +97,5 @@ namespace System {
{
}
}
#pragma warning restore 436
}
+4 -2
View File
@@ -233,6 +233,8 @@ $(the_lib): $(build_lib)
$(Q) test ! -f $(build_lib:.dll=.pdb) || mv $(build_lib:.dll=.pdb) $(the_lib:.dll=.pdb)
endif
library_CLEAN_FILES += $(PROFILE)_aot.log
ifdef PLATFORM_AOT_SUFFIX
Q_AOT=$(if $(V),,@echo "AOT [$(PROFILE)] $(notdir $(@))";)
$(the_lib)$(PLATFORM_AOT_SUFFIX): $(the_lib)
@@ -250,7 +252,7 @@ endif
makefrag = $(depsdir)/$(PROFILE)_$(LIBRARY).makefrag
library_CLEAN_FILES += $(makefrag)
$(makefrag): $(sourcefile)
@echo Creating $@ ...
# @echo Creating $@ ...
@sed 's,^,$(build_lib): ,' $< >$@
@if test ! -f $(sourcefile).makefrag; then :; else \
cat $(sourcefile).makefrag >> $@ ; \
@@ -268,7 +270,7 @@ $(response): $(sourcefile)
@echo Converting $(sourcefile) to $@ ...
@cat $(sourcefile) | $(PLATFORM_CHANGE_SEPARATOR_CMD) >$@
endif
endif
-include $(makefrag)
+2 -2
View File
@@ -8,7 +8,7 @@ use_monolite := $(wildcard $(monolite_flag))
ifdef use_monolite
PROFILE_RUNTIME = $(with_mono_path_monolite) $(RUNTIME)
BOOTSTRAP_MCS = $(PROFILE_RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/monolite/gmcs.exe
BOOTSTRAP_MCS = $(PROFILE_RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/monolite/mcs.exe
else
PROFILE_RUNTIME = $(EXTERNAL_RUNTIME)
BOOTSTRAP_MCS = $(EXTERNAL_MCS)
@@ -60,7 +60,7 @@ do-profile-check: $(depsdir)/.stamp
$(MAKE) $(MAKE_Q) $(PROFILE_OUT) || ok=false; \
rm -f $(PROFILE_EXE) $(PROFILE_OUT); \
if $$ok; then :; else \
if test -f $(topdir)/class/lib/monolite/gmcs.exe; then \
if test -f $(topdir)/class/lib/monolite/mcs.exe; then \
$(MAKE) -s do-profile-check-monolite ; \
else \
echo "*** The compiler '$(BOOTSTRAP_MCS)' doesn't appear to be usable." 1>&2; \
+17
View File
@@ -0,0 +1,17 @@
#! -*- makefile -*-
BOOTSTRAP_PROFILE = basic
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
profile-check:
@:
DEFAULT_REFERENCES = -r:mscorlib.dll
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:MOBILE -d:MONODROID -nowarn:1699 -nostdlib -lib:$(topdir)/class/lib/$(PROFILE) $(DEFAULT_REFERENCES)
FRAMEWORK_VERSION = 2.1
NO_TEST = yes
# the tuner takes care of the install
NO_INSTALL = yes
+5 -7
View File
@@ -1,17 +1,15 @@
#! -*- makefile -*-
my_runtime = $(RUNTIME) $(RUNTIME_FLAGS) --security=temporary-smcs-hack
INTERNAL_SMCS = $(my_runtime) $(topdir)/class/lib/$(PROFILE)/smcs.exe
BOOTSTRAP_PROFILE = basic
BOOTSTRAP_PROFILE = monotouch_bootstrap
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(my_runtime) $(topdir)/class/lib/$(BOOTSTRAP_PROFILE)/smcs.exe
MCS = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_SMCS)
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
profile-check:
@:
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:MONOTOUCH
DEFAULT_REFERENCES = -r:mscorlib.dll
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:MOBILE -d:MONOTOUCH -nowarn:1699 -nostdlib -lib:$(topdir)/class/lib/$(PROFILE) $(DEFAULT_REFERENCES)
FRAMEWORK_VERSION = 2.1
NO_TEST = yes
@@ -1,20 +0,0 @@
#! -*- makefile -*-
INTERNAL_SMCS = $(RUNTIME) $(RUNTIME_FLAGS) --security=temporary-smcs-hack $(topdir)/class/lib/$(PROFILE)/smcs.exe
BOOTSTRAP_PROFILE = net_2_0
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
MCS = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_SMCS)
# We can enable this if System.dll depends on features of the mscorlib.dll from this profile
#PROFILE_MCS_HAS_BOOTSTRAP_FALLBACK = yes
profile-check:
@:
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:MONOTOUCH
FRAMEWORK_VERSION = 2.1
NO_TEST = yes
# the tuner takes care of the install
NO_INSTALL = yes
@@ -1,21 +0,0 @@
#! -*- makefile -*-
INTERNAL_SMCS = $(RUNTIME) $(RUNTIME_FLAGS) --security=temporary-smcs-hack $(topdir)/class/lib/$(PROFILE)/smcs.exe
INTERNAL_GMCS = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/basic/gmcs.exe
BOOTSTRAP_PROFILE = basic
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
MCS = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_SMCS)
# We can enable this if System.dll depends new features of the mscorlib.dll from this profile
#PROFILE_MCS_HAS_BOOTSTRAP_FALLBACK = yes
profile-check:
@:
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:MOONLIGHT
FRAMEWORK_VERSION = 2.1
NO_TEST = yes
# the tuner takes care of the install
NO_INSTALL = yes
+5 -7
View File
@@ -1,17 +1,15 @@
#! -*- makefile -*-
my_runtime = $(RUNTIME) $(RUNTIME_FLAGS) --security=temporary-smcs-hack
INTERNAL_SMCS = $(my_runtime) $(topdir)/class/lib/$(PROFILE)/smcs.exe
BOOTSTRAP_PROFILE = basic
BOOTSTRAP_PROFILE = moonlight_bootstrap
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(my_runtime) $(topdir)/class/lib/$(BOOTSTRAP_PROFILE)/smcs.exe
MCS = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_SMCS)
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
profile-check:
@:
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:MOONLIGHT
DEFAULT_REFERENCES = -r:mscorlib.dll
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:MOONLIGHT -nowarn:1699 -nostdlib -lib:$(topdir)/class/lib/$(PROFILE) $(DEFAULT_REFERENCES)
FRAMEWORK_VERSION = 2.1
NO_TEST = yes
+4 -3
View File
@@ -1,14 +1,15 @@
# -*- makefile -*-
BOOTSTRAP_PROFILE = basic
BUILD_TOOLS_PROFILE = net_2_0_bootstrap
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
MCS = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
# nuttzing!
profile-check:
@:
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -nowarn:1699
DEFAULT_REFERENCES = -r:mscorlib.dll
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -nowarn:1699 -nostdlib -lib:$(topdir)/class/lib/$(PROFILE) $(DEFAULT_REFERENCES)
FRAMEWORK_VERSION = 2.0
-18
View File
@@ -1,18 +0,0 @@
# -*- makefile -*-
#
# Note that we're using the .NET 1.1 MCS but MONO_PATH points to the net_2_0_bootstrap directory.
# We do it this way to get assembly version references right.
#
BOOTSTRAP_PROFILE = basic
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BOOTSTRAP_PROFILE)/gmcs.exe
MCS = $(BOOTSTRAP_MCS)
profile-check:
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0
FRAMEWORK_VERSION = 2.0
NO_SIGN_ASSEMBLY = yes
NO_TEST = yes
NO_INSTALL = yes
+6 -3
View File
@@ -1,14 +1,17 @@
# -*- makefile -*-
INTERNAL_GMCS = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/net_2_0/gmcs.exe
BOOTSTRAP_PROFILE = basic
MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
MCS = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$(topdir)/class/lib/net_2_0$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
# nuttzing!
profile-check:
@:
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_3_5
DEFAULT_REFERENCES = -r:mscorlib.dll
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_3_5 -nowarn:1699 -nostdlib -lib:$(topdir)/class/lib/$(PROFILE) -lib:$(topdir)/class/lib/net_2_0 $(DEFAULT_REFERENCES)
FRAMEWORK_VERSION = 3.5
TEST_HARNESS = $(topdir)/class/lib/net_2_0/nunit-console.exe
+6 -7
View File
@@ -1,17 +1,16 @@
# -*- makefile -*-
INTERNAL_DMCS = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(PROFILE)/dmcs.exe
BOOTSTRAP_PROFILE = basic
BOOTSTRAP_PROFILE = net_4_0_bootstrap
BOOTSTAP_DMCS = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BOOTSTRAP_PROFILE)/dmcs.exe
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(BOOTSTAP_DMCS)
MCS = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_DMCS)
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
# nuttzing!
profile-check:
@:
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_3_0 -d:NET_3_5 -d:NET_4_0 -nowarn:1699
DEFAULT_REFERENCES = -r:mscorlib.dll
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_3_0 -d:NET_3_5 -d:NET_4_0 -nowarn:1699 -nostdlib -lib:$(topdir)/class/lib/$(PROFILE) $(DEFAULT_REFERENCES)
FRAMEWORK_VERSION = 4.0
-17
View File
@@ -1,17 +0,0 @@
# -*- makefile -*-
BOOTSTRAP_PROFILE = net_2_0
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BOOTSTRAP_PROFILE)/gmcs.exe
MCS = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(PROFILE)/dmcs.exe
# we have BOOTSTRAP_PROFILE listed in the MONO_PATH of MCS
PROFILE_MCS_HAS_BOOTSTRAP_FALLBACK = yes
profile-check:
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:BOOTSTRAP_NET_4_0
FRAMEWORK_VERSION = 4.0
NO_SIGN_ASSEMBLY = yes
NO_TEST = yes
NO_INSTALL = yes
+2 -8
View File
@@ -36,14 +36,13 @@ INSTALL_DATA = $(INSTALL) -c -m 644
INSTALL_BIN = $(INSTALL) -c -m 755
INSTALL_LIB = $(INSTALL_BIN)
MKINSTALLDIRS = $(SHELL) $(topdir)/mkinstalldirs
INTERNAL_MCS = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(PROFILE)/mcs.exe
INTERNAL_MBAS = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/mbas/mbas.exe
INTERNAL_GMCS = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(PROFILE)/gmcs.exe
INTERNAL_GMCS = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/basic/mcs.exe
INTERNAL_ILASM = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(PROFILE)/ilasm.exe
corlib = mscorlib.dll
ifndef BUILD_TOOLS_PROFILE
BUILD_TOOLS_PROFILE = $(BOOTSTRAP_PROFILE)
BUILD_TOOLS_PROFILE = basic
endif
INTERNAL_RESGEN = $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/resgen.exe
@@ -197,11 +196,6 @@ dist-default:
$(MKINSTALLDIRS) $(@D)
touch $@
# Useful
withmcs:
$(MAKE) MCS='$(INTERNAL_MCS)' BOOTSTRAP_MCS='$(INTERNAL_MCS)' all
## Documentation stuff
Q_MDOC =$(if $(V),,@echo "MDOC [$(PROFILE)] $(notdir $(@))";)
+2 -2
View File
@@ -109,11 +109,11 @@ $(test_lib): $(the_assembly) $(test_response) $(test_nunit_dep)
$(TEST_COMPILE) -target:library -out:$@ $(test_flags) $(LOCAL_TEST_COMPILER_ONDOTNET_FLAGS) @$(test_response)
$(test_response): $(test_sourcefile)
@echo Creating $@ ...
# @echo Creating $@ ...
@sed -e '/^$$/d' -e 's,^,Test/,' $(test_sourcefile) | $(PLATFORM_CHANGE_SEPARATOR_CMD) >$@
$(test_makefrag): $(test_response)
@echo Creating $@ ...
# @echo Creating $@ ...
@sed 's,^,$(test_lib): ,' $< >$@
-include $(test_makefrag)
+1 -1
View File
@@ -447,7 +447,7 @@ namespace I18N.CJK
// Decoder that handles a rolling Shift-JIS state.
sealed class CP932Decoder : DbcsEncoding.DbcsDecoder
{
private JISConvert convert;
private new JISConvert convert;
private int last_byte_count;
private int last_byte_chars;
+6 -5
View File
@@ -26,7 +26,7 @@ namespace I18N.Common
{
using System;
using System.Collections;
using System.Collections.Generic;
// This class provides an internal list of handlers, for runtime
// engines that do not implement the altered "GetFile" semantics.
@@ -210,19 +210,20 @@ public sealed class Handlers
"I18N.West.ENCibm865"
};
static Hashtable aliases;
static Dictionary<string, string> aliases;
public static string GetAlias (string name)
{
if (aliases == null)
BuildHash ();
return aliases [name] as string;
string v;
aliases.TryGetValue (name, out v);
return v;
}
static void BuildHash ()
{
aliases = new Hashtable (new CaseInsensitiveHashCodeProvider (),
new CaseInsensitiveComparer ());
aliases = new Dictionary<string, string> (StringComparer.OrdinalIgnoreCase);
aliases.Add ("arabic", "iso_8859_6");
aliases.Add ("csISOLatinArabic", "iso_8859_6");
@@ -48,11 +48,12 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
#if NET_2_0
#if NET_4_0
[assembly: AssemblyVersion("4.84.0.0")]
#elif NET_2_0
[assembly: AssemblyVersion("2.84.0.0")]
#else
// not worrying about the NET_1_0 profile for now.
[assembly: AssemblyVersion("0.84.0.0")]
#error "No profile"
#endif
[assembly: AssemblyDelaySign(true)]
Loaded 100 of 4849 files, more files were not shown because too many files have changed in this diff. Show more