Compare commits

...
1328 Commits
Author SHA1 Message Date
Marek Habersack b68a5046d6 [asp.net] Update of fix for bug #648080. Properly populate embedded resources cache 2011-03-23 02:46:22 +01:00
Sebastien Pouliot 2c11692beb Fix randomly failing unit test
* MachineKeySectionUtilsTest.cs: Do not assume xor will change a byte
2010-12-01 02:11:06 +01:00
Marek Habersack 16205147a8 [asp.net] Part of fix for bug #649546. A partial rewrite of the web/script resource handler.
Backport of commit a9cb57cc13

    * 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-12-01 01:22:00 +01:00
Marek Habersack 938f3f308c [asp.net] make sure the string we pass to DecryptAssemblyResource is a valid Base64 string
Backport of commit 2a6bc369a3
2010-12-01 01:00:22 +01:00
Marek Habersack 66cd060e18 [asp.net] A few moves/changes following previous patch review
Backport of commit 21d2c6aedb

    * 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-12-01 00:59:49 +01:00
Marek Habersack fc78a30c18 [asp.net] Normalization of cryptographic uses in asp.net.
Backport of commit 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.
2010-12-01 00:58:48 +01:00
vvaradhan 4035ecdd45 backport of 4613d59
2010-07-23  Veerapuram Varadhan  <[email protected]>

	** Fixes #623451
	* DataColumnCollection.cs (MoveColumn): Fix shifting of
	DataColumn according to the direction of movement.
2010-07-23 22:43:15 +05:30
vvaradhan 15dfcc4f04 backport of 2ec0a00
2010-07-23  Veerapuram Varadhan  <[email protected]>

	** Fixes #565616 - Based on Patch by Hubert FONGARNAND
	* DataContainer.cs (GetContainerData): If typecode is string,
	call Convert.ToString() irrespective of whether value is
	IConvertible or not.
2010-07-23 19:28:49 +05:30
Veerapuram Varadhan b98d2f62db backport of r159962
2010-07-06  Veerapuram Varadhan  <[email protected]>

        ** Fixes #609109
        * TdsComm.cs (Append[DateTime]): Handle datetime values sanely
        that are less than epoch.

svn path=/branches/mono-2-4/mcs/; revision=159970
2010-07-06 16:19:59 +00:00
Veerapuram Varadhan 1157866eed backport of r159851
2010-07-03  Veerapuram Varadhan  <[email protected]>

	** Fixes #609935
	* TdsMetaParameter.cs (Prepare): Use GetActualSize() instead of
	* Size
	property to calculate the length of a nvarchar param.

svn path=/branches/mono-2-4/mcs/; revision=159855
2010-07-03 16:06:23 +00:00
Veerapuram Varadhan 3e34c89324 2010-06-23 Veerapuram Varadhan <[email protected]>
** Fixes #581679
	* DataRelationCollection.cs (Add, Remove): Use DataRelation obj
	instead of this when raising OnCollectionChang(ing, ed) events.

svn path=/branches/mono-2-4/mcs/; revision=159449
2010-06-23 19:04:53 +00:00
Veerapuram Varadhan 72ebae2802 2010-06-15 Veerapuram Varadhan <[email protected]>
** Fixes #613087
	* Tds70.cs (BuildPreparedParameters, BuildProcedureCall): Set
	* default
	precision to 18 as used by MS.Net when connecting to SqlServer
7.0.

svn path=/branches/mono-2-4/mcs/; revision=158954
2010-06-15 16:50:14 +00:00
Gonzalo Paniagua Javier bab851f0ec 2010-05-29 Gonzalo Paniagua Javier <[email protected]>
* FileStream.cs: backport of Miguel's r145271 that fixes bug #531613.


svn path=/branches/mono-2-4/mcs/; revision=158148
2010-05-29 05:32:29 +00:00
Zoltan Varga 750b7a22ee 2010-05-19 Zoltan Varga <[email protected]>
* marshal.c (get_runtime_invoke_type): Backport some fixes from HEAD to fix
	sharing issues.

svn path=/branches/mono-2-4/mono/; revision=157564
2010-05-19 16:08:52 +00:00
Veerapuram Varadhan 7617365456 2010-04-21 Veerapuram Varadhan <[email protected]>
** Fixes #595918
	* Tds70.cs (WriteParameterInfo.cs): Write updated decimal value
	according to specified scale value.

svn path=/branches/mono-2-4/mcs/; revision=155914
2010-04-21 20:21:50 +00:00
Gonzalo Paniagua Javier 8e039e14ea 2010-04-20 Gonzalo Paniagua Javier <[email protected]>
* ChunkStream.cs: ignore chunk extensions when reading the chunk
	size. Fixes bug #597556.


svn path=/branches/mono-2-4/mcs/; revision=155817
2010-04-20 15:54:38 +00:00
Gonzalo Paniagua Javier 2e3bf3ede4 2010-04-19 Gonzalo Paniagua Javier <[email protected]>
* zlib-helper.c: don't call Z_FINISH if nothing has been written.


svn path=/branches/mono-2-4/mono/; revision=155766
2010-04-19 21:12:50 +00:00
Gonzalo Paniagua Javier f61a083996 2010-04-15 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: set content length to -1 on redirect. Reset
	'FinishedReading' on redirects. Fixes bug #593596.


svn path=/branches/mono-2-4/mcs/; revision=155606
2010-04-16 02:17:07 +00:00
Gonzalo Paniagua Javier e1b32f33c0 2010-04-14 Gonzalo Paniagua Javier <[email protected]>
* socket-io.c: make GetHostByName ("") work on windows.
	Fixes bug #456723.


svn path=/branches/mono-2-4/mono/; revision=155468
2010-04-15 02:45:04 +00:00
Gonzalo Paniagua Javier b6bb5298a3 2010-04-14 Gonzalo Paniagua Javier <[email protected]>
* DeflateStream.cs: the delegate uses Cdecl calling convention on
	windows too. Fixes bug #574713.


svn path=/branches/mono-2-4/mcs/; revision=155394
2010-04-14 14:17:22 +00:00
Veerapuram Varadhan e27d8fe463 2010-04-11 Veerapuram Varadhan <[email protected]>
** Fixes #591443
	* DataColumn.cs (Clone): Use property to clone Expression as it
	* builds
	compiled expression also, if any.

svn path=/branches/mono-2-4/mcs/; revision=155218
2010-04-11 21:17:38 +00:00
Veerapuram Varadhan 5babb30a18 2010-04-10 Veerapuram Varadhan <[email protected]>
** Fixes #589482
	* DataColumn.cs (set_DataType): Preserve autoIncrement value
	for Decimal types as well.

svn path=/branches/mono-2-4/mcs/; revision=155204
2010-04-10 18:44:21 +00:00
Veerapuram Varadhan d333c74972 2010-04-09 Veerapuram Varadhan <[email protected]>
** Fixes #576520 - Based on a patch by Greg SIROU
<[email protected]>
	* DataSet.cs (WriteColumnAsElement): Handle system.object types
	* sanely.

svn path=/branches/mono-2-4/mcs/; revision=155194
2010-04-10 13:49:53 +00:00
Veerapuram Varadhan d083096855 2010-04-09 Veerapuram Varadhan <[email protected]>
** Fixes #590232
	* DataColumn.cs (Clone):  Clone extended properties as well.

svn path=/branches/mono-2-4/mcs/; revision=155167
2010-04-09 17:31:57 +00:00
Gonzalo Paniagua Javier 6ec16bb8d2 2010-04-07 Gonzalo Paniagua Javier <[email protected]>
* DeflateStream.cs: always use Cdecl, since the library is compiled
	using that calling convention in windows too.


svn path=/branches/mono-2-4/mcs/; revision=155014
2010-04-07 22:57:01 +00:00
Gonzalo Paniagua Javier 2a736ca1d9 2010-04-07 Gonzalo Paniagua Javier <[email protected]>
* zlib-helper.c: now that we don't use Z_SYNC_FLUSH, there might be
	unflushed input in zstream, so always call Z_FINISH.


svn path=/branches/mono-2-4/mono/; revision=154997
2010-04-07 21:41:32 +00:00
Gonzalo Paniagua Javier 438882b5f2 2010-04-07 Gonzalo Paniagua Javier <[email protected]>
* file-io.c: reset the MonoIOStat structure in case of error.
	Fixes bug #582667.


svn path=/branches/mono-2-4/mono/; revision=154907
2010-04-07 05:51:59 +00:00
Andreas Färber b2a1768506 configure: Fix typo
Backport of r154764: It's "initializer".

	* configure.in: Fix typo.

This commit is licensed under the MIT X11 license.

svn path=/branches/mono-2-4/mono/; revision=154767
2010-04-04 13:52:34 +00:00
Zoltan Varga 3101ba54fa 2010-04-01 Zoltan Varga <[email protected]>
* method-to-ir.c (handle_ccastclass): Call save_cast_details (). Fixes
	#592711.

svn path=/branches/mono-2-4/mono/; revision=154577
2010-03-31 22:44:43 +00:00
Gonzalo Paniagua Javier cc3f65fd45 undo
svn path=/branches/mono-2-4/mcs/; revision=154500
2010-03-30 21:23:03 +00:00
Gonzalo Paniagua Javier 3245b3d285 2010-03-30 Gonzalo Paniagua Javier <[email protected]>
* System.Web.UI/PageParser.cs:
	* System.Web.UI/Page.cs:
	* System.Web.Configuration/PagesConfiguration.cs:
	* System.Web.Compilation/PageCompiler.cs: default for
	EnableViewStateMac is true. Allow setting it from a @Page
	directive.



svn path=/branches/mono-2-4/mcs/; revision=154496
2010-03-30 21:05:59 +00:00
Gonzalo Paniagua Javier e19471fd31 2010-03-27 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: when PreAuthenticate is true, don't remove the
	existing authorization related headers until we know we have a
	replacement. Fixes bug #591633.


svn path=/branches/mono-2-4/mcs/; revision=154346
2010-03-27 16:27:08 +00:00
Veerapuram Varadhan 59e9bd02c7 backport of r154262
svn path=/branches/mono-2-4/mcs/; revision=154267
2010-03-26 12:35:53 +00:00
Veerapuram Varadhan 1e3b5b0ce7 backport of r154261
svn path=/branches/mono-2-4/mcs/; revision=154266
2010-03-26 12:35:38 +00:00
Sebastien Pouliot 5452c67530 2010-03-24 Sebastien Pouliot <[email protected]>
* ASN1Convert.cs: Specify CultureInfo.InvariantCulture (instead of 
	null) to avoid crash on Windows. Patch by Yoni Shalom.
	[Backport r154135]


svn path=/branches/mono-2-4/mcs/; revision=154137
2010-03-24 13:28:29 +00:00
Veerapuram Varadhan 0362042582 backport of r153410
svn path=/branches/mono-2-4/mcs/; revision=154130
2010-03-24 12:30:38 +00:00
Gonzalo Paniagua Javier c5d4aec319 2010-03-23 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: error handling was totally broken in the synchronous
	Connect() call.  Fixes bug #590488.


svn path=/branches/mono-2-4/mcs/; revision=154089
2010-03-23 20:34:16 +00:00
Zoltan Varga d2cd7bd9fa 2010-03-22 Zoltan Varga <[email protected]>
* loader.c (mono_method_get_marshal_info): Fix the handling of dynamic methods
	broken by the last change.

svn path=/branches/mono-2-4/mono/; revision=153976
2010-03-22 12:43:39 +00:00
Zoltan Varga 46b286cf7e 2010-03-04 Geoff Norton <[email protected]>
* loader.c: The marshal specs are freed at the end of the call
	but it explicitly frees the strings as well as the container,
	so we need to dup them too to avoid referencing free'd memory.

svn path=/branches/mono-2-4/mono/; revision=153975
2010-03-22 12:43:26 +00:00
Zoltan Varga 6a50faab8d 2010-03-21 Zoltan Varga <[email protected]>
* mini-ppc.c (mono_arch_emit_exceptions): Avoid an assert in ppc_patch () for
	some large methods with lots of exception handlers. Fixes #440924.

svn path=/branches/mono-2-4/mono/; revision=153955
2010-03-21 12:46:26 +00:00
Zoltan Varga 99086682a8 2010-03-19 Zoltan Varga <[email protected]>
* mini-arm.c: Backport lots of changes from HEAD to reduce the number of ARM
	test failures.

svn path=/branches/mono-2-4/mono/; revision=153890
2010-03-19 12:19:55 +00:00
Gonzalo Paniagua Javier 1a612b9eed 2010-03-18 Gonzalo Paniagua Javier <[email protected]>
* FtpWebResponse.cs:
	* FtpWebRequest.cs: for non-data operations, make sure we send the
	QUIT command upon completion when KeepAlive is false.
	Fixes bug #589305.


svn path=/branches/mono-2-4/mcs/; revision=153827
2010-03-18 11:59:56 +00:00
Gonzalo Paniagua Javier d8fdb91b53 2010-03-17 Gonzalo Paniagua Javier <[email protected]>
* StreamReader.cs: if the detected encoding is different from the
	provided to the constructor, adjust the decoded buffer size if
	needed. Fixes bug #589236.


svn path=/branches/mono-2-4/mcs/; revision=153801
2010-03-18 02:41:41 +00:00
Zoltan Varga e5dee34d72 2010-03-14 Zoltan Varga <[email protected]>
* ILParser.jay: Fix the float32(<long>) case in the previous change.

svn path=/branches/mono-2-4/mcs/; revision=153545
2010-03-14 01:53:36 +00:00
Zoltan Varga a91407874b 2010-03-14 Zoltan Varga <[email protected]>
* ILParser.jay: Fix support for hex float literals on big-endian platforms.

svn path=/branches/mono-2-4/mcs/; revision=153542
2010-03-14 01:43:46 +00:00
Zoltan Varga 8ffbb443f6 2010-03-11 Zoltan Varga <[email protected]>
* aot-compiler.c (mono_compile_assembly): Use the asm writer when static linking.
	Fixes #587306.

svn path=/branches/mono-2-4/mono/; revision=153451
2010-03-11 08:09:59 +00:00
Zoltan Varga a8022475e0 2010-03-09 Zoltan Varga <[email protected]>
* object-internals.h (_G_BOOLEAN_EXPR): Fix the definition of this to explicitly
	convert to a boolean, recent gcc versions compile this differently.

svn path=/branches/mono-2-4/mono/; revision=153374
2010-03-09 22:24:48 +00:00
Zoltan Varga 892a5dfdf1 2010-03-09 Zoltan Varga <[email protected]>
* mini-codegen.c (mono_peephole_ins): Fix the OP_FMOVE optimization. Fixes
	#586664.

	* iltests.il.in: Add a test.

svn path=/branches/mono-2-4/mono/; revision=153334
2010-03-09 18:22:03 +00:00
Zoltan Varga 5297b7ef1e 2010-03-07 Zoltan Varga <[email protected]>
* branch-opts.c (mono_if_conversion): Disable one of the cases when deadce
	is disabled. Fixes #582322.

	* iltests.il.in: Add a test.

svn path=/branches/mono-2-4/mono/; revision=153221
2010-03-07 19:27:25 +00:00
Gonzalo Paniagua Javier 18e3664776 2010-03-06 Gonzalo Paniagua Javier <[email protected]>
* processes.c: made ShellExecuteEx actually work when the file name to
	execute is quoted. Display a message intead of blindly ignoring the
	result of g_shell_parse_argv(). Fixes bug #385497.


svn path=/branches/mono-2-4/mono/; revision=153210
2010-03-06 21:38:45 +00:00
Gonzalo Paniagua Javier e47c2702a3 2010-03-06 Gonzalo Paniagua Javier <[email protected]>
* SmtpClient.cs: typo in reply-to header. Thanks to Chris Tomlinson.
	Fixes bug #578271.


svn path=/branches/mono-2-4/mcs/; revision=153182
2010-03-06 16:39:08 +00:00
Zoltan Varga 31274888cf 2010-03-05 Zoltan Varga <[email protected]>
* shared.c (shm_semaphores_init): Applied patch from Cal Page
	([email protected]). Fix support for USE_SHM.

svn path=/branches/mono-2-4/mono/; revision=153134
2010-03-05 18:48:11 +00:00
Zoltan Varga ee0d4e9e5a 2009-04-14 Zoltan Varga <[email protected]>
* marshal.c (mono_delegate_to_ftnptr): Use mono_gc_alloc_fixed () for
	allocating the location holding the this argument to prevent
	'too many root sets' errors.

svn path=/branches/mono-2-4/mono/; revision=152518
2010-02-26 00:41:25 +00:00
Zoltan Varga 84443bae60 2009-04-13 Zoltan Varga <[email protected]>
* marshal.c (mono_marshal_emit_managed_wrapper): Handle closed delegates
	correctly. Fixes #492330.

svn path=/branches/mono-2-4/mono/; revision=152517
2010-02-26 00:41:19 +00:00
Zoltan Varga 5c4854caac 2009-04-13 Zoltan Varga <[email protected]>
* marshal.c: Fix the embedding of object pointers into JITted code in
	the native-to-managed wrappers by allocating some GC tracked memory, and
	embedding the address of that.

svn path=/branches/mono-2-4/mono/; revision=152516
2010-02-26 00:41:13 +00:00
Gabriel Burt f0b6e27019 2010-02-23 Gabriel Burt <[email protected]>
* Normalization.cs: Implement algorithmic Hangul decomposition; Calling
	string.Normalize on Korean characters now works properly (bnc#480152).
	This reduces the number of errors in 'make test' from 27k to 5.1k.

	* StringNormalizationTestSource.cs:
	* Makefile: Use the local, working copy of Normalization etc,so as to make
	modifying Normalization.cs and then testing your changes with 'make test'
	possible.  Also, fix building/running of tests, patch by Alexander
	Kojevnikov.

	* NormalizationTableUtil.cs : Backport fix some wrong ranges in
	mapIdxToComposite. This fixes some Arabic normalization (and more), and
	fixes generating NormalizationGenerated.cs.

svn path=/branches/mono-2-4/mcs/; revision=152308
2010-02-23 22:34:57 +00:00
Zoltan Varga 6849897022 2010-02-22 Zoltan Varga <[email protected]>
* decompose.c (mono_decompose_long_opts): Handle OP_LCONV_TO_OVF_I8 here too.

svn path=/branches/mono-2-4/mono/; revision=152216
2010-02-22 22:16:55 +00:00
Zoltan Varga 2b0a5d74e4 2010-02-22 Zoltan Varga <[email protected]>
* decompose.c (mono_decompose_opcode): Handle OP_LCONV_TO_OVF_I8. Fixes
	#581950.

	* iltests.il.in: Add a test.

svn path=/branches/mono-2-4/mono/; revision=152212
2010-02-22 22:12:01 +00:00
Zoltan Varga 2ce7c01622 2009-11-24 Zoltan Varga <[email protected]>
* tramp-arm.c: Use blx instead of mov pc, reg to improve support for thumb.

	* mini-arm.c (mono_arm_thumb_supported): New helper function.

svn path=/branches/mono-2-4/mono/; revision=152179
2010-02-22 14:37:22 +00:00
Marek Habersack b757e09adb Backport r152060
svn path=/branches/mono-2-4/mcs/; revision=152062
2010-02-19 11:17:59 +00:00
Marek Habersack cdee5c9cbb Backport of r152045
svn path=/branches/mono-2-4/mcs/; revision=152047
2010-02-19 03:03:31 +00:00
Marek Habersack b58af56772 Fix for test failing in 1.1
svn path=/branches/mono-2-4/mcs/; revision=152043
2010-02-19 02:35:13 +00:00
Marek Habersack d072f5b1aa Backport of r152040
svn path=/branches/mono-2-4/mcs/; revision=152042
2010-02-19 01:51:54 +00:00
Marek Habersack c2d0b44fd8 Backport of r152025
svn path=/branches/mono-2-4/mcs/; revision=152027
2010-02-18 21:49:18 +00:00
Marek Habersack ef6d6f6322 Backport of r151983
svn path=/branches/mono-2-4/mcs/; revision=151985
2010-02-18 13:30:33 +00:00
Marek Habersack 050f2d1ed9 Backport of r151978
svn path=/branches/mono-2-4/mcs/; revision=151980
2010-02-18 12:38:26 +00:00
Marek Habersack 8fbfd7ce0d Backport of r151964
svn path=/branches/mono-2-4/mcs/; revision=151966
2010-02-18 10:51:24 +00:00
Zoltan Varga b36ea50655 2010-02-18 Zoltan Varga <[email protected]>
* method-to-ir.c (mono_method_to_ir): Fix SIZEOF in dynamic methods.

svn path=/branches/mono-2-4/mono/; revision=151947
2010-02-18 00:35:34 +00:00
Zoltan Varga 01c1b0fe90 2010-02-18 Zoltan Varga <[email protected]>
* class.c (mono_class_get_cctor): Fix support for dynamic classes, which doesn't
	have has_cctor set. Fixes #575946.

svn path=/branches/mono-2-4/mono/; revision=151945
2010-02-18 00:35:11 +00:00
Gonzalo Paniagua Javier 967636ea68 update year
svn path=/branches/mono-2-4/mono/; revision=151766
2010-02-16 01:50:35 +00:00
Gonzalo Paniagua Javier d470dd36c3 2010-02-15 Gonzalo Paniagua Javier <[email protected]>
* StreamWriter.cs:
	* FileStream.cs: if flushing fails when disposing the stream, make
	sure it is closed before throwing the exception. Fixes bug #579146.


svn path=/branches/mono-2-4/mcs/; revision=151763
2010-02-16 01:40:31 +00:00
Gonzalo Paniagua Javier 74b02ab64d 2010-02-15 Gonzalo Paniagua Javier <[email protected]>
* SoapDocumentationHandler.cs: use IndexOf() instead of LastIndexOf()
	when removing the querystring from the url.



svn path=/branches/mono-2-4/mcs/; revision=151756
2010-02-15 23:12:31 +00:00
Marek Habersack 87f633facb Backport of r151604
svn path=/branches/mono-2-4/mcs/; revision=151606
2010-02-12 12:08:05 +00:00
Marek Habersack 2783855769 Backport of r151519
svn path=/branches/mono-2-4/mcs/; revision=151521
2010-02-11 14:17:02 +00:00
Gonzalo Paniagua Javier 476a318420 2010-02-09 Gonzalo Paniagua Javier <[email protected]>
* threadpool.c: Fixes for SetMinThreads and SetMaxThreads.
	Closes bug #566057.

	* exception.c: fix typo in comment.


svn path=/branches/mono-2-4/mono/; revision=151154
2010-02-09 23:02:55 +00:00
Marek Habersack 1620399575 Backport of r150802
svn path=/branches/mono-2-4/mcs/; revision=150804
2010-02-04 01:02:01 +00:00
Zoltan Varga 7047255adb 2010-02-02 Zoltan Varga <[email protected]>
* reflection.c (resolve_object): Handle MonoArrayMethod. Fixes #575955.

svn path=/branches/mono-2-4/mono/; revision=150744
2010-02-02 22:36:10 +00:00
Zoltan Varga ea1ed34a41 2010-02-02 Zoltan Varga <[email protected]>
* mini-trampolines.c (common_call_trampoline): Fix a problem where the callsite
	was not patched if the callee needed an rgctx trampoline.

svn path=/branches/mono-2-4/mono/; revision=150691
2010-02-02 05:14:51 +00:00
Marek Habersack 7eff445b24 Backport of r150684
svn path=/branches/mono-2-4/mcs/; revision=150686
2010-02-01 23:48:02 +00:00
Zoltan Varga f0133a2cb3 Fix the 2.4 build.
svn path=/branches/mono-2-4/mcs/; revision=150569
2010-01-29 20:18:42 +00:00
Zoltan Varga b2d67b627a 2010-01-29 Zoltan Varga <[email protected]>
* class.c (make_generic_param_class): Initialize interface offsets since we
	set klass->inited. Fixes #574819.

svn path=/branches/mono-2-4/mono/; revision=150561
2010-01-29 17:45:37 +00:00
Gonzalo Paniagua Javier 4ffb2640ce 2010-01-28 Gonzalo Paniagua Javier <[email protected]>
* zlib-helper.c: no need for sync flush when compressing.
	Thanks to Hin-Tak Leung.


svn path=/branches/mono-2-4/mono/; revision=150351
2010-01-28 07:09:08 +00:00
Zoltan Varga d47a889a27 2010-01-27 Zoltan Varga <[email protected]>
* object.c (mono_field_get_value_object): Handle nullable types correctly.
	Fixes #572874.

svn path=/branches/mono-2-4/mono/; revision=150293
2010-01-27 14:48:22 +00:00
Zoltan Varga a486a6fa3e 2010-01-25 Zoltan Varga <[email protected]>
* icall.c (ves_icall_System_Array_SetValueImpl): Handle nullable types correctly.
	Fixes #573322.

svn path=/branches/mono-2-4/mono/; revision=150126
2010-01-25 12:47:16 +00:00
Zoltan Varga 934114cc41 2010-01-06 Atsushi Enomoto <[email protected]>
* culture-info-table.h : regenerated.

svn path=/branches/mono-2-4/mono/; revision=150122
2010-01-25 12:16:56 +00:00
Zoltan Varga 90c321babb 2010-01-06 Atsushi Enomoto <[email protected]>
* Driver.cs : support FirstDayOfWeek. Fixed bug #567944.
	  Patch by Jose Antonio Sanchez Lazaro.

svn path=/branches/mono-2-4/mono/; revision=150120
2010-01-25 12:09:11 +00:00
Carlos Alberto Cortez b3a5fc7b19 2010-01-21 Carlos Alberto Cortez <[email protected]>
* ComboBox.cs: When the normal drop down window is closed, make sure
	that the auto complete list -if any- is closed as well, instead of
	stay open without need.


svn path=/branches/mono-2-4/mcs/; revision=150030
2010-01-21 23:25:19 +00:00
Carlos Alberto Cortez 29b731ae11 * TextBox.cs: When showing the autocomplete listbox, make sure it's on
top, by calling the raw XplatUI.SetZOrder for it, since we can't
 	properly call BringToFront on it as it is parentless. This fixes an
 	issue when using this feature with ComboBox's own parentless listbox.
 	Fixes the remaining bits of #489339.

2010-01-21  Carlos Alberto Cortez <[email protected]>


svn path=/branches/mono-2-4/mcs/; revision=150026
2010-01-21 22:49:35 +00:00
Carlos Alberto Cortez 2ea6ceccf6 Forgot to include XplatUI.cs in the last commit
svn path=/branches/mono-2-4/mcs/; revision=150023
2010-01-21 22:21:28 +00:00
Carlos Alberto Cortez 396c83dc1e * XplatUI.cs:
* XplatUIDriver:
	* XplatUICarbon:
 	* XplatUIWin32:
 	* XplatUIX11.cs: 
 	* XplatUIStructs: Implement support for different kind of audible
 	alerts in Windows, and update the requiered classes.
 	* MessageBox.cs: 
 	* TextBoxBase.cs: Update calls to XplatUI.AudibleAlert.
 	Fixes #473725.

2010-01-21  Carlos Alberto Cortez <[email protected]>


svn path=/branches/mono-2-4/mcs/; revision=150022
2010-01-21 22:20:27 +00:00
Carlos Alberto Cortez 980e5a27a1 * ComboBox.cs: When use manually setting DropDownHeight, ignore the
MaxDropDownHeight property - also rename our field 'count' to
	'visible_items_count' to avoid confusion as much as possible.
	Fixes an issue with several items, showing an incorrect layout.

2010-01-21  Carlos Alberto Cortez <[email protected]>


svn path=/branches/mono-2-4/mcs/; revision=150020
2010-01-21 22:06:37 +00:00
Carlos Alberto Cortez a8cb7112b5 2010-01-21 Carlos Alberto Cortez <[email protected]>
* RichTextBoxTest.cs: New test for the Modified property.


svn path=/branches/mono-2-4/mcs/; revision=150018
2010-01-21 21:50:07 +00:00
Carlos Alberto Cortez 6ad7a0c56f 2010-01-21 Carlos Alberto Cortez <[email protected]>
* RichTextBox.cs: SelectedText should set Modified to true. Observe
	that this is happening just here, not for the Text property, and
	neither for the TextBoxBase impl.
	Fixes #569950.


svn path=/branches/mono-2-4/mcs/; revision=150016
2010-01-21 21:47:41 +00:00
Zoltan Varga e4036d54e2 2010-01-21 Zoltan Varga <[email protected]>
* exceptions-amd64.c (mono_arch_notify_pending_exc): Avoid a crash if the
	thread has not fully started yet.

svn path=/branches/mono-2-4/mono/; revision=150015
2010-01-21 21:28:24 +00:00
Sebastien Pouliot e87225c2cc 2010-01-21 Sebastien Pouliot <[email protected]>
* CookieContainer.cs: Fix to cloning and expiration. Patch
	by Tom Philpot <[email protected]>
	[Backport r149976 + NET_1_1 fixes]


svn path=/branches/mono-2-4/mcs/; revision=150009
2010-01-21 19:50:44 +00:00
Gonzalo Paniagua Javier 105ec7f6b4 2010-01-21 Gonzalo Paniagua Javier <[email protected]>
* SmtpClient.cs: rethrow inner exception so that
	AsyncCompletedEventArgs.Error gets the right value on error. Patch
	by Dimitar Dobrev.


svn path=/branches/mono-2-4/mcs/; revision=149985
2010-01-21 15:22:52 +00:00
Marek Habersack 224ef27a93 Backport of r149855
svn path=/branches/mono-2-4/mcs/; revision=149858
2010-01-19 22:39:17 +00:00
Marek Habersack 68dd4af230 Backport of r149842
svn path=/branches/mono-2-4/mcs/; revision=149844
2010-01-19 21:15:06 +00:00
Rodrigo Kumpera 3f5eb5e2f8 In metadata:
2010-01-19  Rodrigo Kumpera  <[email protected]>

	* icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition): Handle inflated generic methods
	on a GTD.

	Backport of r149808.


svn path=/branches/mono-2-4/mono/; revision=149812
2010-01-19 13:00:56 +00:00
Marek Habersack 5e660bb397 Backport of r149778
svn path=/branches/mono-2-4/mcs/; revision=149780
2010-01-18 22:35:03 +00:00
Marek Habersack ca09138f17 Backport of r149756
svn path=/branches/mono-2-4/mcs/; revision=149758
2010-01-18 17:44:08 +00:00
Zoltan Varga 722ba3b031 2010-01-17 Zoltan Varga <[email protected]>
* branch-opts.c (mono_branch_optimize_exception_target): Stop the optimization
	if a clause is skipped because it uses the exception object, since it could
	have caught the exception.

	* exceptions.cs: Add a test.

svn path=/branches/mono-2-4/mono/; revision=149708
2010-01-17 08:47:45 +00:00
Zoltan Varga 4ee16e038b 2010-01-16 Zoltan Varga <[email protected]>
* mini-amd64.c (emit_call_body): Always use near calls when AOTing even if
	NOMAP32BIT or optimize_for_xen is set.

svn path=/branches/mono-2-4/mono/; revision=149674
2010-01-16 00:50:11 +00:00
Marek Habersack e8177ade41 Backport of r149631
svn path=/branches/mono-2-4/mcs/; revision=149633
2010-01-15 13:24:39 +00:00
Gonzalo Paniagua Javier b961e9bd5b 2010-01-13 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: when the server returns several different
	authentication methods, pick the one that works.
	Fixes bug #562043.


svn path=/branches/mono-2-4/mcs/; revision=149502
2010-01-13 23:23:31 +00:00
Zoltan Varga dd329e4faf 2010-01-11 Zoltan Varga <[email protected]>
* socket-io.c (AI_ADDRCONFIG): Applied patch from John Lightsey ([email protected]).
	Fixes build on rh 7.3.

svn path=/branches/mono-2-4/mono/; revision=149346
2010-01-11 22:28:20 +00:00
Zoltan Varga ce6a2ff251 2010-01-11 Zoltan Varga <[email protected]>
* mono-profiler-logging.c (_ProfilerFileWriteBuffer): Use MONO_ZERO_LEN_ARRAY.
	Fixes #569806.

svn path=/branches/mono-2-4/mono/; revision=149344
2010-01-11 22:24:39 +00:00
Zoltan Varga 0538722d6e 2009-12-16 Zoltan Varga <[email protected]>
* class.c (mono_bounded_array_class_get): Make these classes PUBLIC. Fixes
	#565120.

svn path=/branches/mono-2-4/mono/; revision=149338
2010-01-11 21:02:00 +00:00
Zoltan Varga a7b62ee407 2009-12-26 Zoltan Varga <[email protected]>
* monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait): Don't close the
	wait handle if the wait is interrupted, since it is still in mon->wait_list, and
	we can't remove it from it since we don't hold the lock.
	(mon_new): Free the orphaned events here when a mon structure is added to the
	freelist. Fixes #561239. Thanks to Mike Rieker <[email protected]> for tracking
	this down.

svn path=/branches/mono-2-4/mono/; revision=149336
2010-01-11 21:00:56 +00:00
Zoltan Varga 62dc4c4e53 2009-12-26 Zoltan Varga <[email protected]>
* generic-sharing.c (instantiate_other_info): Avoid creating jump trampolines since
	they cannot be patched. Partly fixes #564408.

svn path=/branches/mono-2-4/mono/; revision=149334
2010-01-11 21:00:07 +00:00
Carlos Alberto Cortez 2ef667684b 2010-01-10 Carlos Alberto Cortez <[email protected]>
* ToolStripMenuItemTest: New test for the events related to the check
	state.


svn path=/branches/mono-2-4/mcs/; revision=149294
2010-01-11 00:47:21 +00:00
Carlos Alberto Cortez f8f39ed6f4 2010-01-10 Carlos Alberto Cortez <[email protected]>
* ToolStripMenuItem.cs: Put the Checked/CheckState logic in a single
	place and synchronize the events properly. Fixes a lack of
	coordination between the events - which should be fired together.


svn path=/branches/mono-2-4/mcs/; revision=149292
2010-01-11 00:45:16 +00:00
Zoltan Varga 7cae2e16c5 2010-01-10 Zoltan Varga <[email protected]>
* method-to-ir.c (mono_emit_method_call_full): Avoid the virt->nonvirt
	optimization if the called method is gshared and marshalbyref, since gshared
	methods can' have wrappers. Fixes #569390.

	* generics.cs: Add a test.

svn path=/branches/mono-2-4/mono/; revision=149288
2010-01-10 22:46:07 +00:00
Carlos Alberto Cortez f8e93ef415 2010-01-09 Carlos Alberto Cortez <[email protected]>
* TrackBarTest.cs: New test for events.


svn path=/branches/mono-2-4/mcs/; revision=149273
2010-01-09 18:29:26 +00:00
Carlos Alberto Cortez 775ca6da9f 2010-01-09 Carlos Alberto Cortez <[email protected]>
* TrackBar.cs: Move our events code to a single method, allowing it to
	optionally fire the Scroll event. This way we both avoid the
	duplicated calls to OnScroll and also will be able to fire Scroll
	*before* OnValueChanged in other places.
	Fixes #568026.


svn path=/branches/mono-2-4/mcs/; revision=149270
2010-01-09 17:18:32 +00:00
Marek Habersack de7deb6b34 Backport of r149262
svn path=/branches/mono-2-4/mcs/; revision=149264
2010-01-09 00:33:14 +00:00
Sebastien Pouliot 208e97dc75 In System:
2010-01-07  Sebastien Pouliot  <[email protected]>

	* Convert.cs: Fix line endings in ToBase64String (bug #568778)
	and also the default line length. Code changed to not require
	a BinaryReader over a MemoryStream to reduce memory requirements.
	[Backport r149171]

In System.Security.Cryptography:
2010-01-07  Sebastien Pouliot  <[email protected]>

	* ToBase64Transform.cs: Static-ify some methods to make it easier 
	to use from System.Convert
	[Backport r149171]


svn path=/branches/mono-2-4/mcs/; revision=149173
2010-01-07 15:26:28 +00:00
Marek Habersack 2a646f27e9 Backport of r149089
svn path=/branches/mono-2-4/mcs/; revision=149091
2010-01-05 23:13:42 +00:00
Marek Habersack 95adef5ac4 Backport of r149077
svn path=/branches/mono-2-4/mcs/; revision=149079
2010-01-05 12:14:13 +00:00
Carlos Alberto Cortez 7cdcc67988 2010-01-04 Carlos Alberto Cortez <[email protected]>
* RadioButton.cs: When drawing, if Appearance is Button use the old
	normal routine in the theme engine, instead of using the one in 2.0,
	since this last one doesn't support proper rendering of the control as
	a button.
	Fixes #567904.


svn path=/branches/mono-2-4/mcs/; revision=149074
2010-01-05 11:40:39 +00:00
Zoltan Varga 8081943a80 2010-01-04 Zoltan Varga <[email protected]>
* mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call
	mono_method_get_vtable_slot () instead of accessing imt_method->slot directly,
	to fix an AOT case.

svn path=/branches/mono-2-4/mono/; revision=149058
2010-01-04 22:13:58 +00:00
Zoltan Varga 4e4be49ba0 2009-12-22 Geoff Norton <[email protected]>
* configure.in: Fix invalid escaping.  Patch from Spina from
	www.slacky.eu.

svn path=/branches/mono-2-4/mono/; revision=149050
2010-01-04 21:05:04 +00:00
Carlos Alberto Cortez 871c408ed1 2010-01-03 Carlos Alberto Cortez <[email protected]>
* GroupBoxRenderer.cs: Properly use SystemColors.GrayText to draw to
	text of the group box if it is disabled.
	Fixes #567847.


svn path=/branches/mono-2-4/mcs/; revision=149011
2010-01-04 11:45:28 +00:00
Zoltan Varga e9488c7ecf 2010-01-03 Zoltan Varga <[email protected]>
* marshal.c (mono_marshal_get_runtime_invoke): Fix a memory leak.

svn path=/branches/mono-2-4/mono/; revision=148991
2010-01-03 16:49:05 +00:00
Zoltan Varga cf598f9d14 2010-01-03 Zoltan Varga <[email protected]>
* TransactionAbortedException.cs: Make the default ctor public. Fixes #567872.

svn path=/branches/mono-2-4/mcs/; revision=148980
2010-01-03 14:15:35 +00:00
Zoltan Varga 6e26b6e895 2010-01-03 Zoltan Varga <[email protected]>
* Array.cs: Fix ArrayReadOnlyList.CopyTo. Fixes #564095.

svn path=/branches/mono-2-4/mcs/; revision=148977
2010-01-03 14:10:56 +00:00
Zoltan Varga a7c17814f9 2010-01-03 Zoltan Varga <[email protected]>
* DateTime.cs (TryParseExact): Handle exceptions. Fixes #567857.

svn path=/branches/mono-2-4/mcs/; revision=148973
2010-01-03 13:54:35 +00:00
Zoltan Varga e8f8249d3c 2010-01-03 Zoltan Varga <[email protected]>
* locales.c (construct_culture_from_specific_name): Applied patch from
	José Antonio Sánchez Lázaro <[email protected]>. Fix a crash if a culture was
	not found. Fixes #567900.

svn path=/branches/mono-2-4/mono/; revision=148970
2010-01-03 13:30:06 +00:00
Jonathan Pryor aaeaa3e44f * Lucene.Net/Lucene.Net/QueryParser/QueryParser.cs: Fix crash when
searching for "()".  Fixes #423853.  
	  Thanks to Benoît Tuduri <[email protected]>.

svn path=/branches/mono-2-4/mcs/; revision=148946
2009-12-30 20:05:46 +00:00
Sebastien Pouliot 2cb125b3f6 In Test/System.Net:
2009-12-24  Sebastien Pouliot  <[email protected]>

	* CookieContainerTest.cs: Split many tests into smaller test 
	cases. Add test cases for DefaultPerDomainCookieLimit and
	DefaultCookieLimit. Remove all, but one 1.x, [Category 
	("NotWorking")] since everything works now.

In System.Net:
2009-12-24  Sebastien Pouliot  <[email protected]>

	* Cookie.cs: Re-work ToString to be useable in more cases. Fix
	some issues found by Gendarme.
	* CookieContainer.cs: Fix 2.0 NonWorking (and new) unit tests.
	Implement removing oldest cookies when limits are reached.
	* CookieCollection.cs: Fix sort to be closer to MS implementation
	(but still not 100% identical). Fix some issues found by Gendarme


svn path=/branches/mono-2-4/mcs/; revision=148893
2009-12-24 18:49:36 +00:00
Jo Shields ab469a4bd9 Backport r148856 from trunk to fix broken RabbitMQ build
svn path=/branches/mono-2-4/mcs/; revision=148858
2009-12-23 02:36:09 +00:00
Zoltan Varga c88bf84bc6 2009-12-22 Zoltan Varga <[email protected]>
* aot-runtime.c (decode_klass_ref): Avoid a crash if a decode_klass_ref () call
	fails. Fixes #566689.

svn path=/branches/mono-2-4/mono/; revision=148850
2009-12-22 17:52:17 +00:00
Jo Shields 2e3102adb4 Backport r148843 and r148844 from trunk
svn path=/branches/mono-2-4/mono/; revision=148847
2009-12-22 17:45:02 +00:00
Sebastien Pouliot b5ecc8d838 2009-12-21 Sebastien Pouliot <[email protected]>
* File.cs (ReadAllBytes): We cannot assume that a single call to
	Read will return all the data we require.
	[Backport r148822]


svn path=/branches/mono-2-4/mcs/; revision=148824
2009-12-21 22:42:51 +00:00
Michael Barker caddf234a4 2009-12-19 Michael Barker <[email protected]>
* Added stripped xml to avoid licensing issues.

svn path=/branches/mono-2-4/mcs/; revision=148818
2009-12-21 19:16:49 +00:00
Marek Habersack 9f101930f4 Backport r148806
svn path=/branches/mono-2-4/mcs/; revision=148808
2009-12-21 14:27:56 +00:00
Zoltan Varga 3b438d056d In System:
2009-12-19  Zoltan Varga  <[email protected]>

	* String.cs: Fix the various IndexOf and LastIndexOf methods so they handle
	"" and a non-zero startIndex correctly. Fixes #566106.

In Test/System:

2009-12-19  Zoltan Varga  <[email protected]>

	* StringTest.cs: Add tests for IndexOf ("", startIndex, count).

svn path=/branches/mono-2-4/mcs/; revision=148791
2009-12-19 21:36:51 +00:00
Marek Habersack 77077b4a4c Backport of r148743
svn path=/branches/mono-2-4/mcs/; revision=148745
2009-12-18 11:08:21 +00:00
Zoltan Varga 8041750cc2 2009-12-17 Zoltan Varga <[email protected]>
* libtest.c pinvoke2.cs: Add a test for calling pinvoke methods using calli.

svn path=/branches/mono-2-4/mono/; revision=148687
2009-12-17 09:35:42 +00:00
Zoltan Varga b8fd870d22 2009-12-17 Zoltan Varga <[email protected]>
* method-to-ir.c (mono_method_to_ir): Add support for CALLI with unmanaged
	signatures. Fixes #565143.

	* jit-icalls.c (mono_get_native_calli_wrapper): New JIT icall.

svn path=/branches/mono-2-4/mono/; revision=148686
2009-12-17 09:35:36 +00:00
Zoltan Varga 17f4fed102 2009-12-17 Zoltan Varga <[email protected]>
* reflection.c (resolve_object): Fix the encoding of unmanaged calling
	conventions.

svn path=/branches/mono-2-4/mono/; revision=148685
2009-12-17 09:35:29 +00:00
Gonzalo Paniagua Javier d322f8cf09 2009-12-16 Gonzalo Paniagua Javier <[email protected]>
* zlib-helper.c: when finishing uncompressing a buffer, we might need
	more than one call to deflate with Z_FINISH since the uncompressed
	data can take more space than the allocated buffer.

	Fixes the IPY+Chiron test case.


svn path=/branches/mono-2-4/mono/; revision=148594
2009-12-16 21:44:03 +00:00
Rodrigo Kumpera 1c53908155 In .:
* reflection.c (mono_type_get_object): Guard against NULL generic param owner.

2009-12-16  Rodrigo Kumpera  <[email protected]>


svn path=/branches/mono-2-4/mono/; revision=148586
2009-12-16 21:17:54 +00:00
Rodrigo Kumpera f7ecfbbfe6 In .:
2009-12-16  Rodrigo Kumpera  <[email protected]>

	* reflection.c (mono_type_get_object): If the type is VAR or MVAR check
	if the owner class has not been finished before returning reflection_info.	

	Fixes #565127.

	Backport of r148575.


svn path=/branches/mono-2-4/mono/; revision=148580
2009-12-16 20:05:17 +00:00
Zoltan Varga 65cca3fd0a 2009-12-16 Zoltan Varga <[email protected]>
* reflection.c (mono_custom_attrs_from_param): Avoid a crash if a dynamic
	param doesn't have custom attributes. Fixes #565117.

svn path=/branches/mono-2-4/mono/; revision=148562
2009-12-16 12:46:27 +00:00
Marek Habersack 9c008dd101 Backport of r148498
svn path=/branches/mono-2-4/mcs/; revision=148500
2009-12-15 18:46:16 +00:00
Marek Habersack 63ee1f347f Backport of r148474
svn path=/branches/mono-2-4/mono/; revision=148476
2009-12-15 12:25:28 +00:00
Marek Habersack a3c0e41a52 Backport of r148378
svn path=/branches/mono-2-4/mcs/; revision=148380
2009-12-14 13:05:44 +00:00
Zoltan Varga 330a012786 2009-12-11 Zoltan Varga <[email protected]>
* driver.c: Applied patch from Matt McClellan ([email protected]). Add a check
	for 2 parameter sched_setaffinity in older glibc versions. Fixes
	#564000.

svn path=/branches/mono-2-4/mono/; revision=148127
2009-12-11 19:53:53 +00:00
Zoltan Varga 28e5c87672 2009-12-11 Zoltan Varga <[email protected]>
* configure.in: Applied patch from Matt McClellan ([email protected]). Add a check
	for 2 parameter sched_setaffinity in older glibc versions. Fixes
	#564000.

svn path=/branches/mono-2-4/mono/; revision=148126
2009-12-11 19:53:45 +00:00
Paolo Molaro 021368ac0a Fri Dec 11 18:24:04 CET 2009 Paolo Molaro <[email protected]>
* boehm-gc.c: fixed race condition while getting the target of a
	disappearing link (bug #522233).


svn path=/branches/mono-2-4/mono/; revision=148107
2009-12-11 17:28:11 +00:00
Rodrigo Kumpera 97d93b028d In .:
2009-12-01  Rodrigo Kumpera  <[email protected]>

	* reflection.c (fieldref_encode_signature): For some reason 2.4 doesn't
	behave like 2.8 on this part. So add an extra guard for the token kind.

	Fixes #563909.


svn path=/branches/mono-2-4/mono/; revision=148100
2009-12-11 13:29:57 +00:00
Zoltan Varga 5c34a171c3 2009-12-05 Zoltan Varga <[email protected]>
Applied patch from Laurent Etiemble ([email protected]).

	* mono/metadata/assembly.c: When opening an assembly image, pass the real
	names in addition to the runtime generated one.

	* mono/metadata/image.h: Add a function to take the real name of the assembly
	image.

	* mono/metadata/image.c: If a real name has been passed to load an assembly,
	use it instead of the runtime generated one.

	Code is contributed under MIT/X11 license.

svn path=/branches/mono-2-4/mono/; revision=147742
2009-12-05 17:34:13 +00:00
Zoltan Varga e871376513 2009-12-05 Zoltan Varga <[email protected]>
* marshal.c (emit_marshal_vtype): Do the klass == date_time_class checks
	before the other checks to prevent problems if the DateTime class is blittable.
	Hopefully fixes #559600.

svn path=/branches/mono-2-4/mono/; revision=147739
2009-12-05 06:35:25 +00:00
Jonathan Pobst da3af6cfca [Backport to 2.4]
2009-12-03  Jonathan Pobst  <[email protected]>

	* SortOrder.cs: Add enum.

2009-12-03  Jonathan Pobst  <[email protected]>

	* System.Data.dll.sources: Add SortOrder.cs.

svn path=/branches/mono-2-4/mcs/; revision=147680
2009-12-04 17:16:46 +00:00
Zoltan Varga 1763ca8602 2009-12-03 Zoltan Varga <[email protected]>
* mini.c (mini_method_compile): Call handle_exception_clauses () in the same
	place it was called before too.

svn path=/branches/mono-2-4/mono/; revision=147626
2009-12-03 22:48:21 +00:00
Zoltan Varga 204d02f94d 2009-12-03 Zoltan Varga <[email protected]>
* mini.c (mini_method_compile): Call handle_exception_clauses earlier so
	the local optimization passes can take its result into account. Fixes
	#559876.

	* exceptions.cs: Add a test.

svn path=/branches/mono-2-4/mono/; revision=147605
2009-12-03 21:12:26 +00:00
Zoltan Varga 6c200f3dec 2009-01-24 Steven Munroe <[email protected]>
This patch is contributed under the terms of the MIT/X11 license

        * cpu-ppc64.md (load_memindex): Add loadi8_memindex.

svn path=/branches/mono-2-4/mono/; revision=147601
2009-12-03 20:55:04 +00:00
Zoltan Varga ace57a85d1 2009-12-03 Zoltan Varga <[email protected]>
* src/gmisc-unix.c (g_get_user_name): Avoid returning NULL if the env
	var is not set.

svn path=/branches/mono-2-4/mono/; revision=147588
2009-12-03 19:36:35 +00:00
Marek Habersack 226977213f Backport of r147399
svn path=/branches/mono-2-4/mcs/; revision=147400
2009-12-02 09:01:35 +00:00
Rodrigo Kumpera 8e6ee7263c In .:
2009-12-01  Rodrigo Kumpera  <[email protected]>

	* metadata.c (inflated_method_in_image): Avoid calling
	mono_method_signature () if the method does not already have a signature.

	Backport of r125724.


svn path=/branches/mono-2-4/mono/; revision=147165
2009-12-01 02:27:07 +00:00
Zoltan Varga 82b554e7b6 2009-11-30 Zoltan Varga <[email protected]>
* mini-arm.c (mono_arch_lowering_pass): Fix an assert which is hit when
	the instruction following an OP_FCOMPARE is optimized away.

svn path=/branches/mono-2-4/mono/; revision=147104
2009-11-30 16:27:39 +00:00
Zoltan Varga c1f8ce5e71 2009-11-28 Zoltan Varga <[email protected]>
* appdomain.c (create_exceptions): New helper function extracted from
	mono_runtime_init () to precreate objects used during exception handling.
	(mono_runtime_init): Call it.
	(mono_domain_create_appdomain_internal): Ditto. Fixes #555264.

svn path=/branches/mono-2-4/mono/; revision=147059
2009-11-28 17:36:05 +00:00
Zoltan Varga 6bd58a2836 2009-11-24 Zoltan Varga <[email protected]>
* aot-compiler.c: Avoid infinite recursion when generic virtual recursion is
	encountered.

svn path=/branches/mono-2-4/mono/; revision=147047
2009-11-27 18:27:48 +00:00
Sebastien Pouliot aaa9741fc5 2009-11-26 Sebastien Pouliot <[email protected]>
* Random.cs: Fix case where the diff between min and max
	is very large in Next(int,int). Fix bug #558593
	[Backport r146993]


svn path=/branches/mono-2-4/mcs/; revision=146995
2009-11-26 15:22:23 +00:00
Zoltan Varga f4c48646e1 2009-11-25 Zoltan Varga <[email protected]>
* Delegate.cs (GetHashCode): Fix this so it is constant.

svn path=/branches/mono-2-4/mcs/; revision=146906
2009-11-25 13:41:34 +00:00
Zoltan Varga 2de741d7b2 2009-11-24 Zoltan Varga <[email protected]>
* cfold.c (mono_constant_fold_ins): Fix a problem in the previous change,
	OP_SHL_IMM is not 32 bit.

svn path=/branches/mono-2-4/mono/; revision=146854
2009-11-24 18:32:33 +00:00
Marek Habersack ca455804e1 Fix 1.1 tests build and some failing tests
svn path=/branches/mono-2-4/mcs/; revision=146772
2009-11-23 22:02:51 +00:00
Marek Habersack c40891536f Fix the build
svn path=/branches/mono-2-4/mcs/; revision=146764
2009-11-23 18:59:17 +00:00
Marek Habersack 31cb670c04 Fix 1.1 build
svn path=/branches/mono-2-4/mcs/; revision=146745
2009-11-23 17:27:23 +00:00
Marek Habersack 087dd1bf11 Backport of r146732
svn path=/branches/mono-2-4/mcs/; revision=146735
2009-11-23 16:28:18 +00:00
Zoltan Varga dc5b1c7516 2009-11-23 Zoltan Varga <[email protected]>
* method-to-ir.c (inline_method): Prevent infinite recursion. Fixes
	#557606.

	* generics.cs: Add a test.

svn path=/branches/mono-2-4/mono/; revision=146690
2009-11-22 23:27:19 +00:00
Zoltan Varga 2cd739fc8d 2009-11-21 Zoltan Varga <[email protected]>
* cfold.c (mono_constant_fold_ins): Fix constant folding of shr_imm. Fixes
	#557262.

	* basic.cs: Add a test.

svn path=/branches/mono-2-4/mono/; revision=146669
2009-11-21 02:49:14 +00:00
Zoltan Varga b5006461ca 2009-11-20 Zoltan Varga <[email protected]>
* tramp-ppc.c (mono_arch_create_generic_class_init_trampoline_full): These
	receive their argument in MONO_ARCH_VTABLE_REG, not in the first argument reg.

svn path=/branches/mono-2-4/mono/; revision=146605
2009-11-20 07:27:39 +00:00
Marek Habersack 13929f1233 Backport of r146546
svn path=/branches/mono-2-4/mcs/; revision=146548
2009-11-19 15:19:36 +00:00
Marek Habersack 9a977c28d8 Backport of r146525
svn path=/branches/mono-2-4/mcs/; revision=146527
2009-11-19 12:20:26 +00:00
Carlos Alberto Cortez c5cf2d76cf * XplatUICarbon.cs: Implement the overriden AudibleAlert
function in XplatUICarbon.  Currently it throws
	NotImplementedException which will kill a WinForms application showing
	a dialog box.
	Patch by  Erik Ylvisaker ([email protected]).

2009-11-18  Carlos Alberto Cortez <[email protected]>


svn path=/branches/mono-2-4/mcs/; revision=146409
2009-11-18 09:29:09 +00:00
Carlos Alberto Cortez 523199f463 * DataGrid.cs: In CurrentCell, the check to do nothing in case we are
in the same cell as specified *and* not editing is wrong.

2009-11-18  Carlos Alberto Cortez <[email protected]>


svn path=/branches/mono-2-4/mcs/; revision=146408
2009-11-18 09:27:51 +00:00
Carlos Alberto Cortez 8c56acc9f8 * DataGrid.cs: When removing the cells, don't do anything if the
specified row is the extra cell we use to add new ones.

2009-11-18  Carlos Alberto Cortez <[email protected]>


svn path=/branches/mono-2-4/mcs/; revision=146407
2009-11-18 09:18:35 +00:00
Carlos Alberto Cortez dd05b043a4 * DataGrid.cs: CurrentCell should be *used* if the new value is the
same as the current one, since we could need to activate the edition
	in the current row. Also, when beginning the edition, do nothing if,
	basides having an empty source, we are sure we don't have the new
	cell, which could obviously start it.
	Fixes other bits of #323154.

2009-11-18  Carlos Alberto Cortez <[email protected]>


svn path=/branches/mono-2-4/mcs/; revision=146406
2009-11-18 09:17:14 +00:00
Carlos Alberto Cortez aba4d5f8cd * DataGrid.cs: When we get notified by a change in the position of our
data source, don't set CurrentRow if the source is empty, as there's
	no need to do anything else in the first place, and second, the logic
	in the CurrentRow setter (public property) will add a new row by
	default in this case (that is, when the source is empty).
	Fixes part of #323154.

2009-11-18  Carlos Alberto Cortez <[email protected]>


svn path=/branches/mono-2-4/mcs/; revision=146405
2009-11-18 09:15:22 +00:00
Carlos Alberto Cortez b716b5e1ca * ToolStripMenuItem.cs: Don't try to use SystemColors.MenuText if fore
color is SystemColors.ControlText, as this system color detection
	should be done *completely*. This is specially important when
	detecting colors in systems running Gtk+ and dark themes.

2009-11-18  Carlos Alberto Cortez <[email protected]>


svn path=/branches/mono-2-4/mcs/; revision=146404
2009-11-18 09:13:39 +00:00
Carlos Alberto Cortez 0f1dc92039 2009-11-18 Carlos Alberto Cortez <[email protected]>
* DataGrid.cs: Add a new internal property to get the maximum possible
	visible rows in the grid. We cannot use VisibleRowCount since this
	value can, depending on the scroll position, return a +1 or -1 value,
	so we need an absolute way to know whether we need a scroll bar or
	not. Also, update VLargeChange to avoid code duplication.
	Fixes a vertical scroll mismatch happening trying to add a new row
	while the scrollbar has reached its maximum value.


svn path=/branches/mono-2-4/mcs/; revision=146403
2009-11-18 09:11:02 +00:00
Gonzalo Paniagua Javier b1d882a2c7 2009-11-16 Gonzalo Paniagua Javier <[email protected]>
* DefaultWatcher.cs: patch by James P. Mitchel III.
	The change corrects an instance of unsynchronized access to shared
	state and is probably the intent of the original code.


svn path=/branches/mono-2-4/mcs/; revision=146292
2009-11-16 21:39:37 +00:00
Marek Habersack 5dba9fd63b Backport of r146275
svn path=/branches/mono-2-4/mcs/; revision=146277
2009-11-16 17:09:53 +00:00
Marek Habersack 86d4e4beac Backport of r146250
svn path=/branches/mono-2-4/mcs/; revision=146252
2009-11-16 11:54:36 +00:00
Zoltan Varga 68ce4778da 2009-11-15 Zoltan Varga <[email protected]>
* boehm-gc.c (mono_gc_base_init): Applied patch from DKoushik K. Dutta (
	[email protected]). Disable GC_no_dls on android.

svn path=/branches/mono-2-4/mono/; revision=146217
2009-11-15 01:21:22 +00:00
Marek Habersack 6ed50ed78d Backport of r146199
svn path=/branches/mono-2-4/mcs/; revision=146201
2009-11-14 01:22:50 +00:00
Marek Habersack dd17579abb Backport of r146191
svn path=/branches/mono-2-4/mcs/; revision=146193
2009-11-13 23:46:19 +00:00
Marek Habersack ffd46ece51 Backport of r146151
svn path=/branches/mono-2-4/mcs/; revision=146152
2009-11-13 15:46:55 +00:00
Marek Habersack 0267677c46 More fixes to make all 1.1 tests succeed
svn path=/branches/mono-2-4/mcs/; revision=146143
2009-11-13 15:16:01 +00:00
Marek Habersack 1eb009c06b Restore setting up shadow copying for 1.1 to fix failing tests
svn path=/branches/mono-2-4/mcs/; revision=146140
2009-11-13 14:24:24 +00:00
Marek Habersack 073ba34f2b 1.1 build fix
svn path=/branches/mono-2-4/mcs/; revision=146139
2009-11-13 14:02:55 +00:00
Marek Habersack b889920cbe Backport of several fixes needed to make all 2.0 tests succeed
svn path=/branches/mono-2-4/mcs/; revision=146136
2009-11-13 13:59:41 +00:00
Marek Habersack 4b45b3f367 Fix for majority of failing tests and a 1.1 build fix
svn path=/branches/mono-2-4/mcs/; revision=146133
2009-11-13 13:25:50 +00:00
Marek Habersack c4d718644a Backport of r146126
svn path=/branches/mono-2-4/mcs/; revision=146128
2009-11-13 12:57:46 +00:00
Zoltan Varga 6092fa2e9d 2009-11-13 Zoltan Varga <[email protected]>
* mini-amd64.c (emit_call_body): Disable usage of near calls when running
	under XEN. Fixes #522894.

svn path=/branches/mono-2-4/mono/; revision=146111
2009-11-13 06:38:25 +00:00
Marek Habersack e0bef96e4d Backport of r146092
svn path=/branches/mono-2-4/mcs/; revision=146094
2009-11-13 02:05:04 +00:00
Marek Habersack 8b45b5288c Backport of r146086
svn path=/branches/mono-2-4/mcs/; revision=146088
2009-11-13 01:19:32 +00:00
Carlos Alberto Cortez bde0742c33 2009-11-11 Carlos Alberto Cortez <[email protected]>
* DataGridTextBoxColumn.cs:
	* DataGrid.cs: Position the cursor in the add row should *not* show
	yet another new row - that will happen till we get any real input data
	from the user. When that happens, we will also mark the new row as
	ready to commit - otherwise, when the cursor moves to a different row,
	the just added row will be discarded. This is exactly what .Net seems
	to do.


svn path=/branches/mono-2-4/mcs/; revision=145946
2009-11-11 08:56:03 +00:00
Carlos Alberto Cortez f57941576f * DataGrid.cs: The large value for our vertical scrollbar should
depend on the number of visible rows, instead of trying to re-use the
	value of VisibleRowCount, which is the value of *current* visible
	rows, and can easily end messed up if new rows are added/removed.

2009-11-11  Carlos Alberto Cortez <[email protected]>


svn path=/branches/mono-2-4/mcs/; revision=145945
2009-11-11 08:49:30 +00:00
Carlos Alberto Cortez 2c8c108695 * DataGrid.cs: When moving the scroll, *dont* ever end the current
edit - this could seriously mess up our current edit cycle, specially
	when adding new rows.

2009-11-11  Carlos Alberto Cortez <[email protected]>


svn path=/branches/mono-2-4/mcs/; revision=145944
2009-11-11 08:47:55 +00:00
Carlos Alberto Cortez 0618321ce5 * TabControl.cs: In OnKeyDown call the base implementation first -
this way we let the user tell us whether we should handle the key or
	not.
	Fixes #543717.

2009-11-11  Carlos Alberto Cortez <[email protected]>


svn path=/branches/mono-2-4/mcs/; revision=145943
2009-11-11 08:43:44 +00:00
Carlos Alberto Cortez 4bcff3488f * DataGrid.cs: Implement removal of rows the Correct Way by creating a
copy of the indexes, as any direct write access to the source will cause to
	reset the entire selection - also, do the linear de-selection in
	reverse order to avoid any index mismatch in the source, due to out of
	synchronization removing the rows.

2009-11-11  Carlos Alberto Cortez <[email protected]>


svn path=/branches/mono-2-4/mcs/; revision=145942
2009-11-11 08:38:05 +00:00
Carlos Alberto Cortez 8f26a0a7e6 * DataGridTextBoxColumn.cs:
* DataGrid.cs: Don't use this add-pending behaviour to try to add a
	new row until we have the first input char - it was helping us to fix
	other issues we have/had, but it's not matching .net.

2009-11-11  Carlos Alberto Cortez <[email protected]>


svn path=/branches/mono-2-4/mcs/; revision=145941
2009-11-11 08:21:52 +00:00
Carlos Alberto Cortez d279030271 * TextBoxBase.cs: When returning the preferred height, and we are
supposed to be borderless, return the TopMargin value - usually in
	borderless mode it has a value of 0, but in the ToolStrip controls we
	need to set the margin manually.
	Fixes #551214.

2009-11-11  Carlos Alberto Cortez <[email protected]>


svn path=/branches/mono-2-4/mcs/; revision=145940
2009-11-11 08:17:23 +00:00
Carlos Alberto Cortez 354c980fb9 * ToolTip.cs: ShowAlways works at the form level, not at the control
level. Fixes #544565.

2009-11-11  Carlos Alberto Cortez <[email protected]>


svn path=/branches/mono-2-4/mcs/; revision=145938
2009-11-11 08:14:46 +00:00
Carlos Alberto Cortez 7979db0b61 * ButtonBase.cs: Usually the click routines are handled in Control,
but in this class we are handling it ourselved, thus we need to have
	the same calls, and we were missing the call to MouseClick.
	Patch by Eric Petit <[email protected]>.

2009-11-11  Carlos Alberto Cortez <[email protected]>


svn path=/branches/mono-2-4/mcs/; revision=145937
2009-11-11 08:08:21 +00:00
Carlos Alberto Cortez deac0e9ae3 2009-11-11 Carlos Alberto Cortez <[email protected]>
* ComboBoxTest.cs: New test case for data binding and Text
	interaction.


svn path=/branches/mono-2-4/mcs/; revision=145936
2009-11-11 08:01:29 +00:00
Carlos Alberto Cortez d96eb88f1f 2009-11-11 Carlos Alberto Cortez <[email protected]>
* ComboBox.cs: When setting Text and data source is being used, if the
	passed value is not matching any of the items in the source, don't
	pass it to GetItemText, since it's useless, as GetItemText expects a
	valid item.
	Fixes #546009.


svn path=/branches/mono-2-4/mcs/; revision=145935
2009-11-11 07:59:22 +00:00
Marek Habersack eb6d24a5e7 Backport of r145831
svn path=/branches/mono-2-4/mcs/; revision=145833
2009-11-10 13:49:40 +00:00
Marek Habersack be535c852e Backport of r145824
svn path=/branches/mono-2-4/mcs/; revision=145826
2009-11-10 10:42:24 +00:00
Marek Habersack bcba7f1e72 Backport of r145740
svn path=/branches/mono-2-4/mcs/; revision=145742
2009-11-09 14:21:43 +00:00
Marek Habersack bf91b204d9 Backport of r145735
svn path=/branches/mono-2-4/mcs/; revision=145737
2009-11-09 13:40:48 +00:00
Marek Habersack 96f8f5c696 Backport of r145727
svn path=/branches/mono-2-4/mcs/; revision=145729
2009-11-09 12:31:53 +00:00
Marek Habersack 064e04a574 Backport r145721
svn path=/branches/mono-2-4/mcs/; revision=145723
2009-11-09 11:47:20 +00:00
Zoltan Varga 58e83da38a 2009-11-06 Zoltan Varga <[email protected]>
* mini-arm.c (handle_thunk): Add a domain argument to control the domain
	where the thunk memory should be allocated from. Fixes appdomain unloading
	on arm.

svn path=/branches/mono-2-4/mono/; revision=145571
2009-11-06 08:19:19 +00:00
Gonzalo Paniagua Javier 4c8cf00077 2009-11-04 Gonzalo Paniagua Javier <[email protected]>
* debug-helpers.c: avoid g_strdup() in mono_type_full_name().


svn path=/branches/mono-2-4/mono/; revision=145451
2009-11-05 00:54:19 +00:00
Rodrigo Kumpera f1535a5e98 In .:
2009-11-04  Rodrigo Kumpera  <[email protected]>

	* reflection.c (fieldref_encode_signature): If field_image is NULL then
	the token is already properly encoded. Fixs 4.0 build.

	Backport of r145396.


svn path=/branches/mono-2-4/mono/; revision=145413
2009-11-04 19:13:17 +00:00
Marek Habersack 84ab05b5d4 Backport of r145381
svn path=/branches/mono-2-4/mcs/; revision=145383
2009-11-04 09:50:50 +00:00
Gonzalo Paniagua Javier 289fb01744 2009-11-03 Gonzalo Paniagua Javier <[email protected]>
* Socket_2_1.cs: stop any blocking thread before closing the socket.


svn path=/branches/mono-2-4/mcs/; revision=145371
2009-11-04 03:32:44 +00:00
Rodrigo Kumpera d9f1ee2376 In .:
2009-11-03  Rodrigo Kumpera  <[email protected]>

	* reflection.c (fieldref_encode_signature): Add new field_image parameter
	to indicate which assembly to use when resolving a custom-mod.

	Fixes handling of volatile fields used across assemblies as reported in #551513.

	Backport of r145337.


svn path=/branches/mono-2-4/mono/; revision=145363
2009-11-04 02:11:05 +00:00
Gonzalo Paniagua Javier fa26de2ab0 add new library for windows
svn path=/branches/mono-2-4/mono/; revision=145349
2009-11-04 00:44:20 +00:00
Rodrigo Kumpera 78da67a63f In .:
2009-11-03  Rodrigo Kumpera  <[email protected]>

	* simd-intrinsics.c (load_simd_vreg): Add extra argument to signal if
	the value was loaded from memory.

	* simd-intrinsics.c (simd_intrinsic_emit_setter): Store back to memory if
	the value was loader from there.

	* simd-intrinsics.c (simd_intrinsic_emit_shuffle): Fail correctly for Shuffle
	without constant swizzle.

	Backport of r145283.


svn path=/branches/mono-2-4/mono/; revision=145339
2009-11-03 22:49:56 +00:00
Marek Habersack 7e45841e8e Backport of r145280
svn path=/branches/mono-2-4/mcs/; revision=145282
2009-11-03 12:14:10 +00:00
Miguel de Icaza db87b36463 Backport
svn path=/branches/mono-2-4/mcs/; revision=145266
2009-11-03 05:11:13 +00:00
Sebastien Pouliot fcb0077966 2009-11-02 Sebastien Pouliot <[email protected]>
* Thread.cs (set_CurrentUICulture): Delay setting in_currentculture
	to true until after the null check and the return statement.
	[Backport r145215]


svn path=/branches/mono-2-4/mcs/; revision=145216
2009-11-02 20:07:01 +00:00
Zoltan Varga a9b4dfb87c 2009-10-31 Zoltan Varga <[email protected]>
* mono-perfcounters.c (predef_writable_update): Fix the 2.4 build.

svn path=/branches/mono-2-4/mono/; revision=145150
2009-10-31 21:33:12 +00:00
Zoltan Varga b043b92888 2009-10-31 Zoltan Varga <[email protected]>
* appdomain.c (mono_domain_try_unload): Applied patch from Romain Tartière.
	Fix returning when WaitForSingleObjectEx returns WAIT_IO_COMPLETION.

svn path=/branches/mono-2-4/mono/; revision=145142
2009-10-31 14:12:10 +00:00
Gonzalo Paniagua Javier 12a90d222f 2009-10-31 Gonzalo Paniagua Javier <[email protected]>
* mono-perfcounters.c: add the "_Total" instance for CPU counters.
	Until now, we only had the per-cpu(core) counters.

2009-10-30 Gonzalo Paniagua Javier <[email protected]>

	* mono-proclib.c: hz is only multiplied by the number of cpus when
	requesting "_Total".

	Fixes bug #523520.

svn path=/branches/mono-2-4/mono/; revision=145136
2009-10-31 04:07:02 +00:00
Veerapuram Varadhan b7f7a7d56e backport of r145122
svn path=/branches/mono-2-4/mcs/; revision=145124
2009-10-30 21:00:43 +00:00
Carlos Alberto Cortez ce9008a174 2009-10-30 Carlos Alberto Cortez <[email protected]>
[merge -r 142756:144751 from trunk, which basically contains ListView related
bug fixes, specially large speed ups for VirtualMode].

	2009-10-23  Carlos Alberto Cortez <[email protected]>

		* ListView.cs: When retrieving an item in virtual mode, as part of the
		process calculate its layout, instead of trying to do it later.
		* ListViewItem.cs: There's no need to try to infer whether we need to
		compute layout or not anymore - we just do it every time we are
		returning an item.
		This way we should be fixing View changes with cached items, which
		were storing the previous value, and not updating their contents
		properly.

	2009-10-23  Carlos Alberto Cortez <[email protected]>
	
		* ColumnHeader.cs: Remove the double linear search in the Index
		property, by removing the call to Contains, which is not needed.
		Also, Columns collection can never be null.

	2009-10-23  Carlos Alberto Cortez <[email protected]>

		* ColumnHeader.cs: When calculating the width and height of the
		column, try to expand to the right and use all the free space if we
		are the last column *and* the resize mode is set to -2/header content.
		Fixes #544716.

	2009-10-14  Carlos Alberto Cortez <[email protected]>

		* ListView.cs: When retrieving the top item, take into account the
		offset represented by the header control, to retrieve the proper
		value. Patch by Christoph von Wittich (Christoph at ApiViewer.de)
		Fixes the remaining bits of #543773.

	2009-10-14  Carlos Alberto Cortez <[email protected]>
	
		* ListView.cs: TopItem setter should set the value as the top, not
		only ensuring its visibility.
		Fixes part of #543773.

	2009-10-12  Carlos Alberto Cortez <[email protected]>

		* ListView.cs: For virtual mode, when navigating the items using keyboard,
		don't use the matrix of positions, and instead calculate the positions
		based on the number of cols and rows, taking advantage of the fixed
		positions of items. Use the same idea to implement FirstVisibleIndex,
		so we avoid iterating over all the items. Patch by Stephen Robinson
		mono at esar.org.uk.
		Fixes part of #467418.

	2009-10-12  Dick Porter  <[email protected]>

		* Splitter.cs: Adjust offsets when more than one splitter is
		present in a control.  Fixes bug 509472.

	2009-10-07  Carlos Alberto Cortez <[email protected]>

		* ListView.cs: When computing the value for groups height don't use
		text_size field, since in LargeIcon view it sometimes contains a
		double height value - use Font.Height directly, and also improve the
		padding value.
		* ThemeWin32Classic: The same as above.
		This way the space between the group header, the line, and the items
		area is not that big in LargeIcon view.

	2009-10-04  Carlos Alberto Cortez <[email protected]>

		* ListView.cs: When retrieving the fixed positions for the items in
		virtual mode, use the row value to compute the coords of the item,
		instead of the col value, as opposed to SmallIcon/LargeIcon views.

	2009-09-29  Carlos Alberto Cortez <[email protected]>

		* ListView.cs: The location of the items should be computed on the fly
		in virtual mode - that decreased speed overall, but reduces the load
		time.that decreased speed overall, but reduces the load time. Also,
		handle the cases where we were using data structures we don't need to
		use/create for this mode.
		Fixes part of #467418.


svn path=/branches/mono-2-4/mcs/; revision=145116
2009-10-30 18:52:55 +00:00
Marek Habersack 5afc112b2b Backport of r145109
svn path=/branches/mono-2-4/mcs/; revision=145113
2009-10-30 16:00:45 +00:00
Zoltan Varga 1cbb57381e 2009-10-30 Zoltan Varga <[email protected]>
* mini.c (mini_cleanup): Call profiler shutdown before shutting down the
	runtime. Fixes #551228.

svn path=/branches/mono-2-4/mono/; revision=145105
2009-10-30 15:20:50 +00:00
Veerapuram Varadhan d02d77139e backport of r145072
svn path=/branches/mono-2-4/mcs/; revision=145074
2009-10-30 01:11:09 +00:00
Marek Habersack 6c810e8b5f Backport of r145069
svn path=/branches/mono-2-4/mcs/; revision=145071
2009-10-30 00:53:55 +00:00
Veerapuram Varadhan d1c43561fe backport r145064
svn path=/branches/mono-2-4/mcs/; revision=145067
2009-10-29 21:10:01 +00:00
Veerapuram Varadhan 42f186fe0e backport of r145054
svn path=/branches/mono-2-4/mcs/; revision=145056
2009-10-29 18:40:35 +00:00
Sebastien Pouliot 4d5addfa3e 2009-10-29 Sebastien Pouliot <[email protected]>
* CompareInfo.cs: Fix bug in length calculation in one of the (too
	many) Compare overloads
	[Partial backport of r145023]


svn path=/branches/mono-2-4/mcs/; revision=145024
2009-10-29 14:12:47 +00:00
Zoltan Varga 019fa99b05 2009-10-29 Zoltan Varga <[email protected]>
* mini-x86.c (mono_arch_output_basic_block): Fix % 1. Fixes #550970.

	* basic.cs: Add a test.

svn path=/branches/mono-2-4/mono/; revision=145019
2009-10-29 13:09:10 +00:00
Veerapuram Varadhan 00859abd01 backport of r145011
svn path=/branches/mono-2-4/mcs/; revision=145016
2009-10-29 12:54:05 +00:00
Zoltan Varga c95a5819c2 2009-10-29 Zoltan Varga <[email protected]>
* method-to-ir.c (mono_method_to_ir): Use EMIT_NEW_LOAD_MEMBASE_TYPE to
	load vtypes instead if OP_LOADV_MEMBASE in the implementation of
	CONSTRAINED. Fixes #550964.

	* generics.cs: Add a test.

svn path=/branches/mono-2-4/mono/; revision=145009
2009-10-29 12:12:40 +00:00
Marek Safar 0111a9770d Update
svn path=/branches/mono-2-4/mcs/; revision=144999
2009-10-29 10:12:17 +00:00
Marek Safar 5e52406eb2 2009-10-29 Marek Safar <[email protected]>
A fix for bug #550580	
	* convert.cs: Don't eliminate explicit precission casts.


svn path=/branches/mono-2-4/mcs/; revision=144998
2009-10-29 10:01:20 +00:00
Veerapuram Varadhan 52859de65a backport of r144980
svn path=/branches/mono-2-4/mcs/; revision=144982
2009-10-29 02:16:29 +00:00
Lluis Sanchez 77a75e4d25 2009-10-28 Lluis Sanchez Gual <[email protected]>
* MarshalByRefObject.cs: In InitializeLifetimeService, if a lease
	exists for the object return it, instead of always creating
	a new one. Fixes bug #544357.


svn path=/branches/mono-2-4/mcs/; revision=144964
2009-10-28 18:40:12 +00:00
Marek Habersack 8fc3fba53c Backport of r144947
svn path=/branches/mono-2-4/mcs/; revision=144949
2009-10-28 14:02:14 +00:00
Marek Habersack dd0cd7a638 Fix 1.1 build
svn path=/branches/mono-2-4/mcs/; revision=144938
2009-10-28 12:04:21 +00:00
Marek Habersack fa63fc3a07 Backport of r144935
svn path=/branches/mono-2-4/mcs/; revision=144937
2009-10-28 10:37:51 +00:00
Marek Habersack 7fe9c65beb Backport of r144932
svn path=/branches/mono-2-4/mcs/; revision=144934
2009-10-28 10:19:49 +00:00
Veerapuram Varadhan a42f08d05b backport of r140085
svn path=/branches/mono-2-4/mcs/; revision=144920
2009-10-27 22:30:44 +00:00
Veerapuram Varadhan 8e0d779511 ** Fixes #385028,385029
Based on patch by Ted <[email protected]> and patches backported from 2.6

svn path=/branches/mono-2-4/mcs/; revision=144918
2009-10-27 21:51:13 +00:00
Marek Habersack 13f8d435ba Backport of r144898
svn path=/branches/mono-2-4/mcs/; revision=144900
2009-10-27 13:11:10 +00:00
Marek Habersack e6c419bbb9 Backport of r144894
svn path=/branches/mono-2-4/mcs/; revision=144896
2009-10-27 09:56:32 +00:00
Zoltan Varga a391057ec3 2009-01-26 Zoltan Varga <[email protected]>
* marshal.c (emit_marshal_ptr): Allow pointers to blittable structures.
	Fixes #469217.

svn path=/branches/mono-2-4/mono/; revision=144886
2009-10-27 03:38:29 +00:00
Zoltan Varga 52fdb32f83 2009-05-26 Zoltan Varga <[email protected]>
* shared.c (_wapi_shm_file): Avoid creating a .wapi directory here, create
	it in _wapi_shm_file_open (), since platforms using posix shm don't need it.

svn path=/branches/mono-2-4/mono/; revision=144858
2009-10-26 17:08:23 +00:00
Zoltan Varga 0e046efde8 2009-01-29 Zoltan Varga <[email protected]>
* shared.c: Fall back to file based shared storage if shm_open () fails
	because /dev/shm is not mounted.

svn path=/branches/mono-2-4/mono/; revision=144857
2009-10-26 17:08:17 +00:00
Zoltan Varga 9b67a51d31 2009-01-29 Zoltan Varga <[email protected]>
* shared.c: Add an alternative implementation using shared memory instead of
	files. This fixes problems where the mono process would spin up the disk
	every x secs on laptops. Fixes #434566, #415373 and #321949.

svn path=/branches/mono-2-4/mono/; revision=144856
2009-10-26 17:08:04 +00:00
Gonzalo Paniagua Javier c5205e5f28 2009-10-24 Gonzalo Paniagua Javier <[email protected]>
* appdomain.c: do not test the st_mode field for shadow-copies.
	Fixes bug #545276.


svn path=/branches/mono-2-4/mono/; revision=144813
2009-10-24 20:52:32 +00:00
Gonzalo Paniagua Javier 5703183225 2009-10-24 Gonzalo Paniagua Javier <[email protected]>
* appdomain.c: do not test the st_mode field for shadow-copies.
	Fixes bug #545276.


svn path=/branches/mono-2-4/mono/; revision=144811
2009-10-24 20:04:45 +00:00
Gonzalo Paniagua Javier a08f151dfa 2009-10-24 Gonzalo Paniagua Javier <[email protected]>
* appdomain.c: do not test the st_mode field for shadow-copies.
	Fixes bug #545276.


svn path=/branches/mono-2-4/mono/; revision=144810
2009-10-24 20:04:37 +00:00
Gonzalo Paniagua Javier c7326c0f7e 2009-10-24 Gonzalo Paniagua Javier <[email protected]>
* DeflateStreamTest.cs: test from bug #549492.


svn path=/branches/mono-2-4/mcs/; revision=144804
2009-10-24 17:27:05 +00:00
Gonzalo Paniagua Javier 3375d8d96e 2009-08-23 Gonzalo Paniagua Javier <[email protected]>
* deflate.c:
	* gzio.c:
	* deflate.h:
	* zutil.h:
	* crc32.c:
	* trees.c:
	* zconf.h:
	* inffast.c:
	* compress.c:
	* zlib.h:
	* inftrees.c:
	* inflate.c:
	* inflate.h:
	* adler32.c:
	* infback.c: updated to 1.2.3.3


svn path=/branches/mono-2-4/mono/; revision=144801
2009-10-24 17:22:18 +00:00
Gonzalo Paniagua Javier 3fe7cc07da 2009-10-23 Alexandre Gomes <[email protected]>
* WebClient.cs: Fixed GetWebRequest overriding problems, bug: 
	  https://bugzilla.novell.com/show_bug.cgi?id=549580
	  

svn path=/branches/mono-2-4/mcs/; revision=144785
2009-10-24 05:13:56 +00:00
Gonzalo Paniagua Javier 115efca0af 2009-10-23 Gonzalo Paniagua Javier <[email protected]>
* mono-config.c: ignore UTF-8 BOM and report parser errors.
	Fixes bug #549108.


svn path=/branches/mono-2-4/mono/; revision=144730
2009-10-23 12:05:25 +00:00
Gonzalo Paniagua Javier 05dbbe6707 2009-10-23 Gonzalo Paniagua Javier <[email protected]>
* Configuration.cs: make this work again with bundled configuration
	files. Fixes bug #495957. Patch from Tor Lillqvist.


svn path=/branches/mono-2-4/mcs/; revision=144724
2009-10-23 09:54:01 +00:00
Gonzalo Paniagua Javier 127b9cd909 2009-10-22 Gonzalo Paniagua Javier <[email protected]>
* class.c: fix typo.


svn path=/branches/mono-2-4/mono/; revision=144694
2009-10-22 22:50:10 +00:00
Gonzalo Paniagua Javier 24737d1b15 2009-10-22 Gonzalo Paniagua Javier <[email protected]>
* class.c: fix typo.


svn path=/branches/mono-2-4/mono/; revision=144693
2009-10-22 22:50:01 +00:00
Gonzalo Paniagua Javier ea4d23cdae Added new library for TransmitFile (mswsock.lib)
svn path=/branches/mono-2-4/mono/; revision=144680
2009-10-22 20:22:57 +00:00
Marek Habersack d927bbb06c Backport of r144675
svn path=/branches/mono-2-4/mcs/; revision=144678
2009-10-22 20:02:08 +00:00
Marek Habersack 540c7830e7 Backport of r144662
svn path=/branches/mono-2-4/mcs/; revision=144664
2009-10-22 18:33:14 +00:00
Zoltan Varga fc97d0f52c 2009-10-22 Zoltan Varga <[email protected]>
* marshal.c (mono_string_builder_to_utf16): Applied patch from
	Hib Eris  <[email protected]>. Return empty string for empty string builders.
	Fixes #549173.

svn path=/branches/mono-2-4/mono/; revision=144655
2009-10-22 17:50:52 +00:00
Lluis Sanchez 7d3e850c32 2009-10-22 Lluis Sanchez Gual <[email protected]>
* CodeNamespaceImportCollection.cs: Properly update the internal
	keys hashtable when there are changes in the items.


svn path=/branches/mono-2-4/mcs/; revision=144650
2009-10-22 16:28:04 +00:00
Gonzalo Paniagua Javier bbca0e3628 2009-10-22 Carlo Kok <[email protected]>
* Fixed AssemblyInfo.cs to reflect proper copyright.


svn path=/branches/mono-2-4/mcs/; revision=144615
2009-10-22 09:03:56 +00:00
Gonzalo Paniagua Javier 6b26bae916 2009-10-21 Carlo Kok <[email protected]>
* RuntimeLicenseContext.cs: Support for the resourceAssembly parameter.


svn path=/branches/mono-2-4/mcs/; revision=144613
2009-10-22 09:02:54 +00:00
Gonzalo Paniagua Javier 31efd84de3 add lc.1
svn path=/branches/mono-2-4/mono/; revision=144592
2009-10-22 02:17:26 +00:00
Gonzalo Paniagua Javier 8c3e09f90f add lc
svn path=/branches/mono-2-4/mcs/; revision=144591
2009-10-22 02:16:35 +00:00
Gonzalo Paniagua Javier b89bdd1a66 2009-10-21 Gonzalo Paniagua Javier <[email protected]>
* sockets.[ch]: fix function definition.


svn path=/branches/mono-2-4/mono/; revision=144578
2009-10-21 21:40:10 +00:00
Gonzalo Paniagua Javier 6b4317f88f 2009-10-21 Gonzalo Paniagua Javier <[email protected]>
* socket-io.[ch]: fix VS build.


svn path=/branches/mono-2-4/mono/; revision=144575
2009-10-21 21:38:42 +00:00
Sebastien Pouliot b079fc4e2d 2009-10-21 Sebastien Pouliot <[email protected]>
* WaitHandle.cs: Add missing validations for 'millisecondsTimeout'
	in Wait[One|Any|All]. Also call the overloaded (bool) methods for
	WaitAll to reduce code duplication.
	[Backport r144529]


svn path=/branches/mono-2-4/mcs/; revision=144533
2009-10-21 12:22:54 +00:00
Gonzalo Paniagua Javier 9238fab10a 2009-10-21 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: implement *SendFile().


svn path=/branches/mono-2-4/mcs/; revision=144512
2009-10-21 06:43:50 +00:00
Gonzalo Paniagua Javier c3d79f04a1 2009-10-21 Gonzalo Paniagua Javier <[email protected]>
* icall-def.h:
	* socket-io.[ch]: implemented SendFile.


svn path=/branches/mono-2-4/mono/; revision=144509
2009-10-21 06:36:19 +00:00
Gonzalo Paniagua Javier 99a46e7588 2009-10-21 Gonzalo Paniagua Javier <[email protected]>
* sockets.[ch]: added TransmitFile implementation.


svn path=/branches/mono-2-4/mono/; revision=144506
2009-10-21 06:31:17 +00:00
Marek Habersack 2213964e71 Backport of r144487
svn path=/branches/mono-2-4/mcs/; revision=144489
2009-10-20 19:22:29 +00:00
Zoltan Varga 00d6160ed4 2009-10-20 Zoltan Varga <[email protected]>
* class.c (mono_class_create_from_typedef): Initialize class->element_class
	before the interfaces to avoid crashes later if class initialization fails.
	Fixes #548417.

svn path=/branches/mono-2-4/mono/; revision=144485
2009-10-20 19:05:43 +00:00
Gonzalo Paniagua Javier c34b828632 2009-10-20 Gonzalo Paniagua Javier <[email protected]>
* ApplicationHost.cs: set the shadow copy options calling the methods
	in AppDomain, instead of setting them in a copy of the setup
	information.


svn path=/branches/mono-2-4/mcs/; revision=144480
2009-10-20 18:33:45 +00:00
Gonzalo Paniagua Javier ec548a4f6d 2009-10-20 Gonzalo Paniagua Javier <[email protected]>
* ServerContext.cs:
	* SslServerStream.cs: add new parameter that forces sending the
	CertificateRequest record. Make sure we raise the client certificate
	validation event when it is requested or required.


svn path=/branches/mono-2-4/mcs/; revision=144461
2009-10-20 15:26:16 +00:00
Sebastien Pouliot e3bd3ebf13 2009-10-19 Sebastien Pouliot <[email protected]>
* assembly.c (mono_assembly_load_reference): Fix leak when 'status'
	code is known. (parse_public_key) Remove duplicate (unneeded) NULL
	check since 'pubkey' can't be NULL at this stage
	* icall.c (ves_icall_System_Array_FastCopy): Add comment about
	the check. (ves_icall_Type_GetInterfaceMapData) Remove duplicate
	initialization of 'iter'
	[Backport r144403 + part of r141170 (assembly.c)]


svn path=/branches/mono-2-4/mono/; revision=144406
2009-10-19 19:40:20 +00:00
Zoltan Varga 6940d0223e 2009-09-22 Zoltan Varga <[email protected]>
* mini-exceptions.c (mini_jit_info_table_find): New helper function which
	searches all the domains of the current thread.

	* exceptions-<ARCH>.c: Use it. Fixes #539394.

svn path=/branches/mono-2-4/mono/; revision=144377
2009-10-19 14:18:42 +00:00
Zoltan Varga 2045182352 2009-09-22 Zoltan Varga <[email protected]>
* image.c (mono_image_close): Atomically decrement the reference count and
	remove the image from the hash tables, to prevent another thread from seeing a
	dying MonoImage. Fixes #541194.

svn path=/branches/mono-2-4/mono/; revision=144375
2009-10-19 14:15:00 +00:00
Gonzalo Paniagua Javier 5aef1aea03 2009-10-17 Gonzalo Paniagua Javier <[email protected]>
* WebConnectionStream.cs: add 3 missing DoCallback() calls in
	EndRead/EndWrite.


svn path=/branches/mono-2-4/mcs/; revision=144317
2009-10-18 02:09:29 +00:00
Carlos Alberto Cortez 8caf76be66 2009-10-17 Carlos Alberto Cortez <[email protected]>
* System.Windows.Forms_test.dll.sources: Add a new test file.

2009-03-30  Carlos Alberto Cortez <[email protected]>


svn path=/branches/mono-2-4/mcs/; revision=144313
2009-10-17 18:13:12 +00:00
Carlos Alberto Cortez bc18b42755 2009-10-17 Carlos Alberto Cortez <[email protected]>
[merge -r 132698:142738 from trunk]

	2009-08-28  Carlos Alberto Cortez <[email protected]>
	
	* TextBoxTest.cs: Improve the ModifiedTest test.

	2009-08-28  Atsushi Enomoto  <[email protected]>

	* DataGridViewCellTest.cs : nunit test upgrade to modern style.

	2009-08-19  Carlos Alberto Cortez <[email protected]>

	* ToolStripDropDownItemTest.cs: New test file.

	2009-08-10  Carlos Alberto Cortez <[email protected]>

	* DataGridTest.cs: Don't use DataGrid.Rows.Add() for our latest test,
	since it is 2.0. Use DataGrid.NewRow() instead.

	2009-08-10  Carlos Alberto Cortez <[email protected]>

	* DataGridTest.cs: New test for the interaction between DataSource and
	TableStyles.

	2009-08-03  Carlos Alberto Cortez <[email protected]>

	* GridColumnStylesCollectionTest.cs: New test for #465019. Also make
	public the test class, so it is *actually* loaded by nunit.

	2009-07-24  Carlos Alberto Cortez <[email protected]>

	* ToolStripItemCollectionTest.cs: New test for Find.

	2009-07-17  Carlos Alberto Cortez <[email protected]>

	* RadioButtonTest.cs: Update the Checked test to not depend on
	Form.Show, since we need to check the same behaviour even if no handle
	has been created yet.

	2009-06-16  Ivan N. Zlatev  <[email protected]>

	* DataGridViewTest.cs: Duplicate test label fix.

	2009-06-07  Carlos Alberto Cortez <[email protected]>

	* DataObjectTest.cs: New assertions for the text functionality.

	2009-06-06  Carlos Alberto Cortez <[email protected]>

	* ListBindingHelperTest.cs: New assertion for GetListItemType, as well
	as a new helper collection class.

	2009-06-01  Carlos Alberto Cortez <[email protected]>

	* ClipboardTest.cs: New test for serializable types.

	2009-05-11  Carlos Alberto Cortez <[email protected]>

	* ToolStripDropDownTest.cs: New test to assure the Height atfer
	calculating the layout depends on ToolStripItem.GetPreferredHeight.

	2009-05-08  Carlos Alberto Cortez <[email protected]>

	* ToolStripControlHost.cs: New tests for DefaultSize and
	OnHostedControlResize members.

	2009-05-08  Andrés G. Aragoneses  <[email protected]>

	* ToolStripMenuItemTest.cs: Improve test, and remove the
	NotWorking attribute. Also remove the 'var' keywords, doh!

	2009-05-08  Andrés G. Aragoneses  <[email protected]>

	* ToolStripMenuItemTest.cs: Simplify test.

	2009-05-08  Andrés G. Aragoneses  <[email protected]>

	* ToolStripMenuItemTest.cs: Add yet another non-passing test
	(wors in MS.NET).

	2009-05-06  Andrés G. Aragoneses <[email protected]>

	* ToolStripMenuItemTest.cs: add tests for Owner and OwnerItem.

	2009-05-06  Andrés G. Aragoneses <[email protected]>

	* ToolStripMenuItemTest.cs: more accurate test, and fix build
	(namespace clash).

	2009-05-06  Andrés G. Aragoneses <[email protected]>

	* ToolStripMenuItemTest.cs: Add a test for GetCurrentParent
	(passes on MS.NET). Related to a11y bugs #485524 and #479397.

	2009-05-04  Andrés G. Aragoneses <[email protected]>

	* TabControlTest.cs: More accurate test for bug#499887 showing
	the SelectedIndex at the moment of the event (passes on MS.NET).

	2009-04-30  Andrés G. Aragoneses <[email protected]>

	* TabControlTest.cs: Added test for bug#499887.


svn path=/branches/mono-2-4/mcs/; revision=144312
2009-10-17 18:11:29 +00:00
Carlos Alberto Cortez 8b9736f246 2009-10-17 Carlos Alberto Cortez <[email protected]>
[merge -r 132698:142738 from trunk to 2-4 branch. Some changes were already
there, so also keep this Changelog sane]
	2009-10-17  Carlos Alberto Cortez <[email protected]>

		* ListView.cs: When calculating the layout for Details view, don't ask
		for the items *at all* in case we are in virtual mode. This should
		re-enable the proper behaviour of virtual mode.

		2009-10-17  Andrés G. Aragoneses  <[email protected]>

		* ToolBar.cs, ToolBarButton.cs: Add new UIA events to know
		when a button gets focus, firing the events from the ToolBar.
		r: jpobst

		2009-10-17  Carlos Alberto Cortez <[email protected]>

		* ComboBox.cs: When calculating the height of the ComboListBox,
		specially for the 2.0 profile, use MaxDropDownItems if the
		DropDownHeight property hasn't been set, and use the later if it has
		been set. This way we support both properties.
		Fixes #493308.

		2009-10-17 Carlos Alberto Cortez <[email protected]>

		* XplatUIX11.cs, X11Clipboard.cs: Text and Rtf formats must be
		separated, and we cannot fallback on Text if Rtf is requested but not
		present.
		* Clipboard.cs: Actually use the format specified by our user when
		putting data.

		2009-10-17  Carlos Alberto Cortez <[email protected]>

		* XplatUIX11.cs: When handling the SelectionRequest event, use
		SelectionRequestEvent instead of SelectionEvent, so we get the right
		data for the app asking for clipboard data. Set the member of
		SelectioneEvent.property to indicate the place where we are storing
		the information as well - this is specially important for gnome/kde
		apps using the TARGETS atom to ask for the supported permission before
		actually asking for a specific format.
		Fixes #489393.

		2009-10-17  Jonathan Pobst  <[email protected]>

		* ToolStripDrowDown.cs: Remove some hardcoded values and assumptions.
		* ToolStripDropDownButton.cs: This should use a ToolStripDropDownMenu,
		not a ToolStripDropDown.
		* ToolStripItem.cs: Don't use the item margins on a ToolStripDropDown.

		2009-09-26  Jonathan Pobst  <[email protected]>

		* TreeNode.cs: When we invalidate a node, make sure we start at
		0, instead of the node's Bounds.Left, which does not include
		the +/-, checkbox, or stateimages.
		[Fixes bug #542481]

		2009-09-24  Ivan N. Zlatev  <[email protected]>

		* DataGridView.cs: Compare the name and not displayname of properties 
		when checking if the column is already bound.

		2009-09-21  Carlos Alberto Cortez <[email protected]>

		* RichTextBox.cs: For SelectedRtf, after inserting the stream, adjust
		the position of the caret by adding the needed chars represented by the new line chars,
		according to the system, using rich *or* hard new lines as needed. Also do a
		check to be sure we don't move the cursor position beyond the limits
		of our text. This should avoid problems with text being pasted,
		regarding the position of the caret.

		2009-09-16  Carlos Alberto Cortez <[email protected]>

		* RichTextBox.cs: When SelectedRtf is set, and we are in the 0
		position in the x axis, force to re-use any already available line,
		even if it is not empty. This way pasting text into our textbox in the
		beginning for non empty lines should work fine.

		2009-09-14  Carlos Alberto Cortez <[email protected]>

		* RichTextBox.cs: When we are inserting a flow of rtf text, and we are
		*not* loading it from a file, try to re-use a line if already
		available, since the default behaviour of the parser is to create new
		lines for the document.
		This should fix a regressions we found after the last fix for #513030.

		2009-09-14  Tom Hindle <[email protected]>

		* ToolStripOverflow.cs: Fixes #536036 by adding null ptr check.

		2009-09-11  Ivan N. Zlatev  <[email protected]>

		* PropertyGrid.cs: Hide the splitter when the help is hidden.

		2009-09-11  Ivan N. Zlatev  <[email protected]>

		* InternalWindowManager.cs: Call Invalidate-Update instead of 
		Refresh for MS compitability. Note also that Refresh is virtual 
		and several controls override it in order to provide data refresh 
		functionallity on top of the redraw and they do not expect this 
		extra refresh call.
		* Control.cs: In Refresh Invalidate the control and all children 
		insead of calling Refresh for each of them.
		[Fixes bug #538336]

		2009-09-11  Ivan N. Zlatev  <[email protected]>

		* PropertyGrid.cs: Always set the help panel properties on the 
		internal control, because they are inherited and can change with 
		the parent.
		[Fixes bug #525305]

		2009-09-08  Carlos Alberto Cortez <[email protected]>

		* RichTextBox.cs: When processing rtf, don't add a new line if we
		already have one for that position. This way we avoid overriding by
		mistake our lines when copying/pasting.
		Fixes #513030.

		2009-09-07  Carlos Alberto Cortez <[email protected]>

		* TextControl.cs: When inserting new lines, look for the end of file
		char, and remove chars after it. This is unlikely to happeng either
		loading a file, pasting text or pressing a char, but can happen using
		the TextBox.Text property.
		Fixes #535884.

		2009-09-06  Carlos Alberto Cortez <[email protected]>

		* Line.cs: In DeleteCharacters, cache line.Length for every tag, since
		tag.Start changes will modify it indirectly and then we would end up
		with wrong values.
		Fixes #512521.

		2009-09-03  Ivan N. Zlatev  <[email protected]>

		* BindingSource.cs: Implement support for chained data sources.
		* ListBindingHelper.cs: Add support for ICurrencyManagerProvider and 
		clean up.
		[Fixes part of bug #536547]

		2009-09-01  Carlos Alberto Cortez <[email protected]>

		* RichTextBox.cs: When saving the text to a file using SaveFile use
		Environment.NewLine to separate the lines. This way we should be
		saving the files according to the system.
		Fixes the remaining part of #511515.

		2009-08-31  Carlos Alberto Cortez <[email protected]>

		* RichText.cs: Remove some unix new line characters and use
		Environment.NewLine. Fixes part of #511515.

		2009-08-28  Carlos Alberto Cortez <[email protected]>

		* TextBoxBase.cs: Modified should *not* be modified from the Text
		property, as our new tests show. It should be to false, however, in
		Append and Clear; and Paste, Cut, Undo, and direct user input should set it
		to true. Also, as opposed to what the .net docs say -but proven by our
		tests-, the changes should be generating a ModifiedChanged event
		(thus we set the property, instead of the field).
		Fixes #511267.

		2009-08-27  Ivan N. Zlatev  <[email protected]>

		* DataGridView.cs: Fire the CellDoubleClicked event.
		[Fixes bug #533430]

		2009-08-27  Ivan N. Zlatev  <[email protected]>

		* DataGridView.cs: Add support for column DataGridViewAutoSizeColumnMode
		DisplayedCells and DisplayedCellsExceptHeader.
		[Fixes bug #533435]

		2009-08-27  Carlos Alberto Cortez <[email protected]>

		* TextControl.cs: When removing a simple char, actually record the
		action in the undo manager. This way we both support undoing the
		removal of chars using backspace/delete, as well as keeping data
		integrity when other undo tasks are performed.
		Fixes #531983.

		2009-08-24  Carlos Alberto Cortez <[email protected]>

		* Control.cs: Remove the ancient code in ResetText, which was setting
		the internal field to String.Empty, instead of doing it for our Text
		property, as .net does (which also causes a TextChanged event and all
				the other related routines).
		Fixes #531587.

		2009-08-24  Carlos Alberto Cortez <[email protected]>

		* TreeNodeCollection.cs: Correctly implement Contains by using a
		linear search - there's no possible way to use a binary search, since
		the node instances are not implementing IComparable, nor have a
		specific order.
		Fixes #529927.

		2009-08-24  Carlos Alberto Cortez <[email protected]>

		* DataGrid.cs: If we are *not* changing a row
		already added to the source, and thus we are adding a new 
		row instead, try to move to the previous row when Esc is
		pressed -if possible-.
		Fixes some bits of #322974.

		2009-08-24  Carlos Alberto Cortez <[email protected]>

		* DataGridTextBoxColumn.cs:
		* DataGrid.cs: Moving the cell to the add row (the last one) should
		not immediately add a new row - this should happen until the very
		first change happens in that textbox.
		Fixes part of #322974.

		2009-08-19  Carlos Alberto Cortez <[email protected]>

		* ToolStripDropDown.cs: When assigning the owner item, use its Font as
		well.

		2009-08-17  Carlos Alberto Cortez <[email protected]>

		* ToolStripItem.cs: When the owner changes its Font, call the
		OnFontChanged event, so we let our users know that we likely have a
		new font - since Font is an ambient property.
		* ToolStripDropDownItem.cs: When our Font changes, propagate that
		information to our DropDown control, if any.
		Fixes #531515.

		2009-08-17  Carlos Alberto Cortez <[email protected]>

		* DataGrid.cs: 
		* ThemeWin32Classic.cs: When the user clicks on a new cell, we should reset any
		previous selection, just like .net does. Also, in the cases where a
		cell is being edited and it keeps the selected status, use the normal
		colors for it, and use the selected colors for the rest of the columns of
		that row.
		Fixes the remaining bits of #323051.

		2009-08-16  Carlos Alberto Cortez <[email protected]>

		* DataGrid.cs: When getting ProcessKeyPreview fired, call Edit() if we
		are not editing already - so the edition is actually active on our
		column style textbox. Also, it seems the code handling process the
		grid keys is repeated, but instead of removing it, just comment it for
		now.
		Fixes part of #323051.

		2009-08-13  Carlos Alberto Cortez <[email protected]>

		* AsyncMethodResult.cs: Store a exception field in case the called
		method actually caused an exception. This way we can throw it later.
		* XplatUIDriver.cs: Check if the async method result has an exception
		- throw it if needed. 
		The idea is that Control.Invoke throws the exception from the thread
		that called it, not the main MWF thread. 
		Patch by Tom Spink <[email protected]>. Fixes #497175.

		2009-08-12  Carlos Alberto Cortez <[email protected]>

		* DataGrid.cs: In mouse move we need to shift the selection in case
		the pointer is on the row headers.
		Fixes #323052.

		2009-08-11  Ivan N. Zlatev  <[email protected]>

		* SplitContainer.cs: Avoid updating the splitter distance if it hasn't 
		moved. Updating the distance was causing a re-layout which was resetting 
		the clicks counter and preventing DoubleClick from every firing.
		[Fixes bug #521387]

		2009-08-11  Carlos Alberto Cortez <[email protected]>

		* DataGrid.cs: When a new TableStyle is added, don't create new
		columns for it unless it is empty - this is the correct way to both
		respect the columns if they were provided by our user, or create them
		for him in case the column collection is empty.
		Fixes #323111.

		2009-08-10  Carlos Alberto Cortez <[email protected]> 

		* DataGrid.cs: Actually call BindColumns in the handler for
		ListManager.MetaDataChanged, since the current code is already taking
		into account the scenario when a custom table style is used - this was
		confusing us before, and that's why we commented the call to
		BindColumns. Also call CallAreasAndInvalidate, to properly reflect the
		changes as needed.
		Fixes #465021.

		2009-08-10  Carlos Alberto Cortez <[email protected]>

		* DataGrid.cs: When setting the data source, if we have a user
		provided table style available, force a complete bind in case the
		column styles for that table style is empty.

		2009-08-09  Ivan N. Zlatev  <[email protected]>

		* DataGridViewCell.cs: Handle null and DBNull values.

		2009-08-07 Rodrigo Kumpera  <[email protected]>

		* ListBindingHelper.cs: Fix the 1.0 build by making this type available
		under that profile.

		2009-08-07  Ivan N. Zlatev  <[email protected]>

		* CurrencyManager.cs: Remove duplicate code.

		2009-08-07  Ivan N. Zlatev  <[email protected]>

		* DataGridView.cs, DataGridViewCell.cs, DataGridViewColumn.cs: 
		Massive population performance boost. From seconds to ms.
		[Fixes bug #528887]

		2009-08-04  Carlos Alberto Cortez <[email protected]>

		* DataGrid.cs: When handling mouse down on a column, don't do any sort
		even if the list supports it if we are empty. This way we avoid an exc
		sorting the empty list, and keep the UI compatible with .net.

		2009-08-04  Carlos Alberto Cortez <[email protected]>

		* DataGrid.cs: In Edit () check we have any row before trying to use
		the current row. Fixes a IOOR exc with an empty data grid.

		2009-08-03  Carlos Alberto Cortez <[email protected]>

		* DataGridColumnStyle.cs: Don't call CheckValidDataSource when setting
		the owner DataGrid - even if this seems to be the right thing to do,
		.net is not doind this check at this point, but in later operations.
		Fixes #465019.

		2009-07-28  Mike Gorse  <[email protected]>

		* ToolStripMenuItem.cs: Added UIA CheckOnClickChanged event.

		2009-07-28  Carlos Alberto Cortez <[email protected]> 

		* Application.cs: Make FilterMessage internal for 1.1. Fixes the 1.1 build.

		2009-07-28  Carlos Alberto Cortez <[email protected]>

		* XplatUIX11.cs:
		* XplatUIWin32.cs: We need to filter the messages using
		Application.FilterMessage for our DoEvents implementations. Observe
		that I don't like the idea of XplatUI call the upper level Application
		class, but at this point is easier and simpler to do this call - based
		on the fact it's only one simple call.
		Fixes #516735.

		2009-07-28  Carlos Alberto Cortez <[email protected]>

		* TreeNodeCollection.cs: When removing the selected node, set the
		SelectedNode value of TreeView to null if there aren't more nodes left - 
		this is better than to clear the selected node in Clear, since we need
		to handle the situation in the Remove methods as well.
		Fixes #525002.

		2009-07-24  Carlos Alberto Cortez <[email protected]>

		* ToolStripItemCollection.cs: Find should do a case insensitive
		search, and should throw an ArgumentNullException if the parameter is
		an empty string.

		2009-07-23  Carlos Alberto Cortez <[email protected]>

		* PropertyGrid.cs: Use click handlers for each ToolStripButton instead
		of using a global handler for the ToolStrip. This way the buttons can
		be recovered and can have its PerformClick method called properly.
		Fixes #522454.

		2009-07-20  Carlos Alberto Cortez <[email protected]>

		* X11Dnd.cs: Implement support for XdndActionList, so we can get the
		complete list of the supported actions in the drag source, and use the
		action passed in the Position message only as a fallback. This will
		help us with dnd operations with non winforms apps.
		Fixes #402158.

		2009-07-20  Carlos Alberto Cortez <[email protected]>

		* ToolStripItemCollection.cs: Use a List<> instead of an ArrayList in
		Find. This should fix the exception we were getting when trying to
		convert the ArrayList to an array of objects (since we were losing the
				type parameter).
		Fixes #519944.

		2009-07-17  Carlos Alberto Cortez <[email protected]>

		* RadioButton.cs: Setting Checked when none of the sibligs is checked
		should happen *not* in GotFocus, but in the Enter event. This is
		specially important since we should get that Checked behaviour even if
		no handle is created yet - and thus, no actual GotFocus call happens at
		the time.
		Fixes #520764.

		2009-07-16  Carlos Alberto Cortez <[email protected]>

		* ComboBox.cs: Adjust manually the top border for out internal
		ComboBox, since removing the border from it leaves it without any
		margin. This is not noticeable in a default ComboBox, but it is in an
		instance shown on top of ToolStrip.
		Fixes the remaining part of #507462.

		2009-07-13  Carlos Alberto Cortez <[email protected]>

		* TextBoxBase.cs: Expose the margin top width as a property, to keep
		the code clean.
		* ToolStripTextBox.cs: Since we are actually using no border in the
		default TextBox impl, and we are drawing the border ourselves, we need
		to manually set the top margin.
		Fixes part of #507462.

		2009-07-06  Carlos Alberto Cortez <[email protected]>

		* PrintPreviewDialog.cs: Record when left was pressed, so we can
		simulate Tab+Alt when moving the focus throughout our buttons and
		controls.
		Fixes the remaining bits of #509142.

		2009-07-05  Carlos Alberto Cortez <[email protected]>

		* TabControl.cs: When computing the width of each tab page, use the
		page's Font instead of the tab control one.
		Fixes #514368.

		2009-07-03  Carlos Alberto Cortez <[email protected]> 

		* MenuAPI.cs: When handling the Keys.Left key, don't close the menu if
		the current menu is specifically a ContextMenu (this is what .net does
				as well). This way we also avoid a crash caused by MenuTracker trying
		to use the menu when it was already hidden.

		2009-07-03  Carlos Alberto Cortez <[email protected]>

		* PrintPreviewDialog.cs: Remove the code used to handle the
		DropDown menu, since we are now doing it by default in ToolBar, and
		just call the base impl as needed.Also, deactivate the dropdown menu
		before moving the focus to a different button in our toolbar, as .net
		does.
		* ContextMenu.cs:
		* MenuAPI.cs: Make as internal the needed bits to deactivate a
		ContextMenu, and also to keep some beauty in our api.

		2009-07-02  Carlos Alberto Cortez <[email protected]>

		* ToolBar.cs: When handling the key down message, if we are on a
		drop down button, either show the DropDownMenu or pass the key to its
		ProcessCmdKey method as needed.
		Fixes the remaining bits of #509985.

		2009-06-29  Carlos Alberto Cortez <[email protected]>

		* ToolBar.cs: Isolate the event logic related to OnButtonClick. Also
		set current_item when navigating with the keyboard, so we can use it
		properly later. Finally, handle both Enter and Space to fire
		OnButtonClick *only*, without any other impact, as .net does.
		Fixes part of #509985.

		2009-06-29  Carlos Alberto Cortez <[email protected]>

		* MenuAPI.cs: Close any active menu when we get a simple Alt.
		Fixes #509299.

		2009-06-26  Carlos Alberto Cortez <[email protected]>

		* ToolBar.cs: In OnButtonClick only change the Pushed value for
		buttons with toogle style. We were previously doing it for
		DropDownButton's buttons, but that's not what .net is doing.
		Fixes #510030.

		2009-06-26  Atsushi Enomoto  <[email protected]>

		* XplatUICarbon.cs : support multi-byte text input.
		Fixed bug #501276.

		2009-06-22  Carlos Alberto Cortez <[email protected]> 

		* ListBox.cs: When creating DrawItemEventArgs, pass either
		Theme.ColorHighlightText or ForeColor depending on the selected state
		of our item, as .net does.
		Fixes #512115.

		2009-06-22  Carlos Alberto Cortez <[email protected]>

		* ComboBox.cs: When handling WM_CHAR, process the message first, and
		send it to the textbox only if it wasn't handled.
		Fixes #507459.

		2009-06-18  Jonathan Pobst  <[email protected]>

		* ComboBox.cs: Only do my big sort at the end of AddRange if
		the combobox is actually set to Sorted.

		2009-06-18 Tom Hindle <[email protected]>

		* XplatUIX11.cs: Enabled Text to coexist with custom data formats.
		Fixes #511849.

		2009-06-18  Carlos Alberto Cortez <[email protected]>

		* ListBox.cs: When calculating the scrollbars for non MultiColumn
		mode, force the use of the horizontal scrollbar only if
		ScrollAlwaysVisible is true as well.
		Fixes #513029.

		2009-06-17  Jonathan Pobst  <[email protected]>

		* ComboBox.cs: When using AddRange on a sorted combobox, don't
		try to use our inefficient sorted insert method, just append
		it and sort the whole thing at then end.
		[Fixes bug #511247]

		2009-06-16  Carlos Alberto Cortez <[email protected]>

		* ToolBar.cs: Expose as internal the code used to show a dropdown menu.
		* PrintPreviewDialog.cs: Handle the down/up arrow keys for our
		DropDown element.
		Fixes #509152.

		2009-06-16  Ivan N. Zlatev  <[email protected]>

		* DataGridView.cs: Scrolling fixes.
		[Fixes bug #512816]

		2009-06-16  Ivan N. Zlatev  <[email protected]>

		* DataGridView.cs, DataGridViewRowCollection.cs: Clean up a bit and 
		optimize for batch adding rows.

		2009-06-16  Ivan N. Zlatev  <[email protected]>

		* DataGridView.cs: Avoid calling ReBind twice during the initial data 
		binding.
		[Fixes bug #512807]

		2009-06-16  Ivan N. Zlatev  <[email protected]>

		* DataGridView.cs: Suppress invalidation during data binding.
		[Fixes part of bug #512807]

		2009-06-15  Carlos Alberto Cortez <[email protected]>

		* PrintPreviewDialog.cs: Tune the navigation among the buttons and
		controls that are part of our ToolBar, so we can mimic the behaviour
		observed in .Net, by handling also the arrow keys and doing the
		preprocess for them too.
		Fixes the remaining bits of #509142.

		2009-06-12  Carlos Alberto Cortez <[email protected]>

		* ToolBar.cs: Expose the current item as internal.
		* PrintPreviewDialog.cs: Tune the TabStop property for
		PrintPreviewControl/ToolBar so we match the .net scenario regarding
		Tab navigation. Also implement support to navigate throughout the
		items in the ToolBar.
		Fixes #509142.

		2009-06-09  Ivan N. Zlatev  <[email protected]>

		* DataGridViewComboBoxCell.cs, DataGridViewComboBoxColumn.cs: 
		Implement items syncing in the non-databound scenario.
		[Fixes bug #494031]

		2009-06-09  Ivan N. Zlatev  <[email protected]>

		* DataGridView.cs: Call OnCellValidating and OnCellValidated and 
		handle the Cancel accordingly.
		[Fixes bug #506838]

		2009-06-09  Ivan N. Zlatev  <[email protected]>

		* DataGridViewBand.cs: Fix a typo in DefaultHeaderCellType.
		[Fixes bug #506796]

		2009-06-09  Ivan N. Zlatev  <[email protected]>

		* DataGridViewColumnCollection.cs, DataGridViewRowCollection.cs, 
		DataGridView.cs: Fire CollectionChangeAction.Refresh collection 
		changed when Clearing the collections so that the DataGridView 
		can know and reset the current cell.
		[Fixes bug #492549]

		2009-06-09  Ivan N. Zlatev  <[email protected]>

		* BindingSource.cs: In ResetBindings use the ListChangedEventArgs ctor 
		with the PropertyDescriptor parameter instead of index, because the 
		latter will set some irelevant indices. Fixes a bug uncovered by recent
		fix to ListChangedEventArgs.

		2009-06-09  Carlos Alberto Cortez <[email protected]> 

		* DataObject.cs: When looking for any specific format, do a case
		insensitive search, as .net does.
		Fixes #509199.

		2009-06-09  Ivan N. Zlatev  <[email protected]>

		* CurrencyManager.cs: In AllowNew firstly check if the list is a 
		IBindingList and proxy to AllowNew. IBindingList has slightly differet 
		logic and eventhough it's an IList IsReadOnly should not be used in this 
		case as it might be True but AllowNew could be True as well.
		Fixes a bug uncovered by a fix to the Array class.

		2009-06-08  Carlos Alberto Cortez <[email protected]>

		* ListBindingHelper.cs: In GetListItemType do a null check when
		looking for IList.Item, since the impl could be explicit, and thus
		private. Fix by Florent Fayolle (p.ricca at odyssee-ingenierie.com).
		Fixes the remaining part of #507120

		2009-06-07  Carlos Alberto Cortez <[email protected]>

		* DataObject.cs: Map StringFormat/Text/UnicodeText formats properly,
		to match them in all the cases, as this is exactly what .net does.
		Fixes #510728.

		2009-06-06  Carlos Alberto Cortez <[email protected]>

		* ListBindingHelper.cs: In GetListItemType handle gracefully the case
		where an instance of IEnumerator returns a null value for its Current
		property. Fix by Florent Fayolle (p.ricca at odyssee-ingenierie.com).
		Fixes #507120.

		2009-06-05  Carlos Alberto Cortez <[email protected]>

		* ComboBox.cs: Properly detect whether we need to use our vertical
		scrollbar or not, specially for DropDownList/DropDown styles,
		depending on the value of DropDownHeight.
		Fixes #508541.

		2009-06-01  Carlos Alberto Cortez <[email protected]> 

		* ToolTip.cs: Call the base implementation in Dispose, but do it
		before anything else to avoid a regression. This way we do the default
		routines related to any System.ComponentModel.Container.
		Fixes #508586.

		2009-06-01  Carlos Alberto Cortez <[email protected]>

		* Clipboard.cs:
		* XplatUIX11.cs:
		* DataFormats.cs: Implement support for serializable types in our
		clipboard.
		Fixes #357642.

		2009-05-25  Carlos Alberto Cortez <[email protected]>

		* ColorDialog.cs: Actually add the help button to the form, so it can
		be visible.
		Fixes #478555.

		2009-05-25  Carlos Alberto Cortez <[email protected]>

		* PrintPreviewDialog.cs: Don't use Dock.Fill for the
		PrintPreviewControl, since it will be hidden in the top by our
		toolbar. Use manual location and anchoring instead.
		Fixes #474889.

		2009-05-25  Carlos Alberto Cortez <[email protected]> 

		* FileDialog.cs: When saving the size of the dialog, use the
		ClientSize instead of Size, so we have always the same size for the
		form. Patch by Alex Shulgin.
		Fixes #503064.

		2009-05-25  Carlos Alberto Cortez <[email protected]>

		* MessageBox.cs: When showing the dialog call XplatUI.AudibleAlert to
		show a beep, similar to what .net does. 
		Fixes #473725.

		2009-05-23  Carlos Alberto Cortez <[email protected]>

		* ContainerControl.cs:
		* MenuStrip.cs
		* ToolStrip.cs: Implicit mnemonic processing should happen for every
		ToolStrip child, not only for MenuStrip, so we are going to do that in
		ToolStrip.ProcessMnemonic, where we already had that exactly
		functionality, but we are only just checking that either this instance
		is a ToolStripDropDownMenu instance or Alt has been pressed. Finally
		remove the extra code, since we are not going to use it now.
		Fixes the remaining bits of #503663.

		2009-05-21  Neville Gao  <[email protected]>

		* ContextMenu.cs: Cleaned up UIA properties.

		2009-05-20  Dick Porter  <[email protected]>

		* XplatUICarbon.cs: Add more locking around MessageQueue
		manipulations.

		2009-05-18  Carlos Alberto Cortez <[email protected]> 

		* DateTimePicker.cs: Call Focus in HideMonthCalendar to avoid
		duplication of code, as well as actually getting the focus back in
		*any* scenario where the drop down is closed.

		2009-05-18 Tom Hindle <[email protected]>
		* ScrollableControl.cs: Ignore setting properties HScroll and 
		VScroll when AutoScroll is true.
		[Fixes bug #500213]

		2009-05-18  Jonathan Pobst  <[email protected]>

		* ToolStripRenderer.cs: Apply patch from Thomas Goldstein to make
		disabled graphics look closer to the ones that .Net produces.
		[Fixes bug #473660]

		2009-05-18  Carlos Alberto Cortez <[email protected]>

		* DateTimePicker.cs: When calculating the max width for the year part,
		use the current value, since *all* the possible values are exactly a 4
		digits number. This way we avoid a ArgumentOutOfRangeException trying
		to check against different values.
		Fixes #500917.

		2009-05-15  Carlos Alberto Cortez <[email protected]>

		* MessageBox.cs: When handling ProcessDialogChar, check that
		CancelButton is not null before trying to use it, to avoid a null ref
		exception. We don't need to do that on the ok/yes buttons, since they
		always exist.
		Fixes #503935.

		2009-05-15  Carlos Alberto Cortez <[email protected]> 

		* ListBox.cs: Handle the key down event in WndProc instead of doing it
		in an event handler, as we need to avoid any operation in case
		the user has handled it in its own OnKeyDown handler, and this can't
		be achieved since our handler would be the first one always.
		* FontDialog.cs: Update the calls since our method handling key down
		has been renamed.
		Fixes #503469.

		2009-05-15  Carlos Alberto Cortez <[email protected]>

		* Application.cs: We should dismiss the active ToolStrip when we
		receive a WM_SYSKEYDOWN message, instead of WM_SYSKEYUP, so the next
		keyboard short cut can be properly processed by another menu item.
		Fixes part of #503663.

		2009-05-13  Andreia Gaita  <[email protected]>

		* HtmlDocument.cs: If the objects are strings, wrap them in ""

		2009-05-13  Andreia Gaita  <[email protected]>

		* HtmlDocument.cs: Fix InvokeScript call (duh).

		2009-05-11  Carlos Alberto Cortez <[email protected]>

		* TextBox.cs: Expose IsAutoCompleteAvailable as internal.
		* ComboBox.cs: If auto complete is being used, it is needed to update
		the actual value of the combo box, doing it immediately if the user
		presses Enter, or doing it when our combo box loses focus. Finally,
		when handling Enter and Escape keys for the combobox, don't try to
		hide the listbox if it is not visible in the first place. 
		Fixes part of #489339.

		2009-05-11  Carlos Alberto Cortez <[email protected]>

		* ToolStripDropDownMenu.cs: Use the height returned by
		ToolStripItem.GetPreferredHeight to calculate our own height.

		2009-05-10  Carlos Alberto Cortez <[email protected]> 

		* TreeNode.cs: When setting Checked, do a double null check, since the
		current node can still get a null parent handling
		TreeView.OnAfterCheck.
		Fixes #502567.

		2009-05-10  Carlos Alberto Cortez <[email protected]>

		* Control.cs: When assigning ContextMenu, do a null check before
		assigning its container field.

		2009-05-08  Brad Taylor  <[email protected]>

		* DateTimePicker.cs: Add a UIA-specific property to ensure that if
		is_checkbox_checked is changed, we won't break.

		2009-05-08  Andrés G. Aragoneses  <[email protected]>

		* ToolStripItem.cs: Prevent NRE when our holder is a
		ToolStripDropDownButton and we get Select()ed.

		2009-05-08  Carlos Alberto Cortez <[email protected]> 

		* ToolStripControlHost.cs: DefaultSize must return the current size of
		the Control, not the value returned by GetPreferredSize. Also connect
		a handle to the control Resize event, and use it to fire
		OnHostedControlReize.
		Fixes the remaining bits of #483146.

		2009-05-08  Carlos Alberto Cortez <[email protected]>

		* ToolStripDropDown.cs: When performing the layout, use
		ToolStripItem.GetPreferredSize ().Height instead of
		ToolStripItem.Height, since we are already using it that way in this
		same method.
		Fixes part of ##483146.

		2009-05-08  Brad Taylor  <[email protected]>

		* DateTimePicker.cs: Wrap UIA specific code in NET_2_0 wrappers.  Send
		OnUIASelectionChanged when ShowCheckbox is true and the checkbox
		recieves focus.  Part of fix for #502029.

		2009-05-06  Mike Gorse  <[email protected]>

		* FileDialog.cs: Add UIAFocusedItemChanged to PopupButtonPanel.
		Add PerformClick and PerformDoubleClick to PopupButton.
		Fixes #499851.

		2009-05-04  Andrés G. Aragoneses  <[email protected]>

		* TabControl.cs: call Focus() to emit GotFocus event at the
		proper time when SelectionIndex changes. Fixes #499887.

		2009-05-03  Carlos Alberto Cortez <[email protected]>

		* MonthCalendar.cs: In SetBoundsCore always do the bounds check to
		have valid values, even if BoundSpecified is not including
		Size/Height/Width - this is useful when we are in a control using Dock
		or Anchor.
		Fixes part of #483146.

		2009-04-27  Carlos Alberto Cortez <[email protected]>

		* ComboBox.cs: When losing the focus, if our textbox is not null,
		close its auto complete list, if any.
		Fixes part of #489339.

		2009-04-27  Andrés G. Aragoneses  <[email protected]>

		* ListView.cs: Make OnColumnClick +internal to be used by a11y.

		2009-04-27  Brad Taylor  <[email protected]>

		* ToolStripButton.cs: Emit an internal event when CheckOnClick is
		changed.

		2009-04-26  Carlos Alberto Cortez <[email protected]> 

		* ToolStripDropDownItem.cs: When assigning a new
		ToolStripDropDownMenu, let it know we are its OwnerItem. This way the
		Capture duties performed by Application/ToolStripManager are handled
		nicely and we don't end up in an inconsisten stat.
		Fixes #492815.


svn path=/branches/mono-2-4/mcs/; revision=144311
2009-10-17 18:05:43 +00:00
Gonzalo Paniagua Javier db222a6e19 2009-10-12 Carlo Kok <[email protected]>
* DesigntimeLicenseContextSerializer.cs: Properly serialize licenses.
	* RuntimeLicenseContext.cs: Properly deserialize licenses.


svn path=/branches/mono-2-4/mcs/; revision=144241
2009-10-16 02:49:37 +00:00
Sebastien Pouliot d4fcdf7bee In Test/System.IO:
2009-10-15  Sebastien Pouliot  <[email protected]>

	* UnmanagedMemoryStream.cs: Fix some and add missing validations
	[Backport r144226]

In System.IO:
2009-10-15  Sebastien Pouliot  <[email protected]>

	* UnmanagedMemoryStream.cs: Fix some and add missing validations
	[Backport r144226]


svn path=/branches/mono-2-4/mcs/; revision=144229
2009-10-15 20:21:17 +00:00
Sebastien Pouliot 48f67b07f0 In Test/System.Runtime.CompilerServices:
2009-10-15  Sebastien Pouliot  <[email protected]>

	* RuntimeHelpers.cs: Add missing validations
	[Backport up to r144208]

In System.Runtime.CompilerServices:
2009-10-15  Sebastien Pouliot  <[email protected]>

	* RuntimeHelpers.cs: Add missing validations
	[Backport r144208]


svn path=/branches/mono-2-4/mcs/; revision=144211
2009-10-15 14:38:56 +00:00
Sebastien Pouliot ffcf860161 In System.Runtime.InteropServices:
2009-10-15  Sebastien Pouliot  <[email protected]>

	* GCHandle.cs: Add missing validations
	[Backport r144204]

In Test/System.Runtime.InteropServices:
2009-10-15  Sebastien Pouliot  <[email protected]>

	* GCHandleTest.cs: Add more test cases for validations
	[Backport up to r144204]


svn path=/branches/mono-2-4/mcs/; revision=144207
2009-10-15 14:23:53 +00:00
Zoltan Varga 804cb4eeb2 2009-10-15 Zoltan Varga <[email protected]>
* mini.c (mono_op_imm_to_op): Handle OP_AND/OR/XOR_IMM.

svn path=/branches/mono-2-4/mono/; revision=144169
2009-10-15 00:13:22 +00:00
Gonzalo Paniagua Javier 8978f0f4f3 fix the build
svn path=/branches/mono-2-4/mcs/; revision=144153
2009-10-14 20:58:23 +00:00
Gonzalo Paniagua Javier 6bbee79c7f 2009-10-14 Gonzalo Paniagua Javier <[email protected]>
* ApplicationHost.cs: use shadowCopyBinAssemblies from
	<hostingEnvironment>.


svn path=/branches/mono-2-4/mcs/; revision=144139
2009-10-14 19:30:34 +00:00
Marek Habersack e0b951d57f Backport of r144016
svn path=/branches/mono-2-4/mcs/; revision=144130
2009-10-14 18:19:03 +00:00
Carlos Alberto Cortez f802dd56b2 * ToolStripDropDownItem.cs: When assigning a new
ToolStripDropDownMenu, let it know we are its OwnerItem. This way the
	Capture duties performed by Application/ToolStripManager are handled
	nicely and we don't end up in an inconsisten stat.
	Fixes #492815.

2009-10-14  Carlos Alberto Cortez <[email protected]>


svn path=/branches/mono-2-4/mcs/; revision=144123
2009-10-14 17:16:18 +00:00
Carlos Alberto Cortez bac9ce27f7 2009-10-14 Carlos Alberto Cortez <[email protected]>
* ToolStrip.cs: Even if we are not exactly a MenuStrip instance, close
	any ToolStripDropDownItem when receiving a mouse down event in an
	empty area.


svn path=/branches/mono-2-4/mcs/; revision=144122
2009-10-14 17:02:08 +00:00
Martin Baulig 20f386aca8 Backport of r144049 - add a new 'MONO_DEBUGGER_EVENT_TRAMPOLINE' notification for the debugger which also includes the address of the callsite.
2009-10-13  Martin Baulig  <[email protected]>

	* debug-mini.c (mono_debugger_trampoline_compiled): Add
	`const guint8 *trampoline' argument; send both the old and the new
	notification.

2009-10-13  Martin Baulig  <[email protected]>

	* mono-debug-debugger.h (MonoDebuggerEvent): Renamed
	`MONO_DEBUGGER_EVENT_TRAMPOLINE' into
	`MONO_DEBUGGER_EVENT_OLD_TRAMPOLINE' and added a new
	`MONO_DEBUGGER_EVENT_TRAMPOLINE'.

	* mono-debug.h (MONO_DEBUGGER_MINOR_VERSION): Bump to 80.2.

svn path=/branches/mono-2-4/mono/; revision=144054
2009-10-13 22:34:41 +00:00
Veerapuram Varadhan 69dc8e224c backport of r143996
svn path=/branches/mono-2-4/mcs/; revision=143997
2009-10-13 01:23:06 +00:00
Marek Habersack cdd4c53f51 Backport of r143990
svn path=/branches/mono-2-4/mcs/; revision=143992
2009-10-12 22:52:39 +00:00
Zoltan Varga 83e0d586fd Fix the build.
svn path=/branches/mono-2-4/mcs/; revision=143988
2009-10-12 22:46:26 +00:00
Zoltan Varga 384b7946cc 2009-10-12 Zoltan Varga <[email protected]>
* Process.cs (Dispose): Close the async output/error readers. Fixes #545429.

svn path=/branches/mono-2-4/mcs/; revision=143987
2009-10-12 21:51:35 +00:00
Marek Habersack 0a0690ff31 Backport of r143979
svn path=/branches/mono-2-4/mcs/; revision=143982
2009-10-12 21:11:58 +00:00
Marek Habersack 0034517fc4 Backport of r143972
svn path=/branches/mono-2-4/mcs/; revision=143974
2009-10-12 14:43:38 +00:00
Ankit Jain ce656a9b65 Update xbuild and Microsoft.Build.* from trunk.
In tools/xbuild:
2009-10-12  Ankit Jain  <[email protected]>

	* xbuild/Microsoft.Common.targets: For referenced projects,
	when trying to get the deploy items, ensure that the split
	lists of project references are available.
	(SplitProjectReferencesByExistent): New.
	Set DependsOnTargets appropriately.

2009-10-12  Ankit Jain  <[email protected]>

	* SolutionParser.cs: Handle non-existing project files, and
	project file load errors. Raise warnings instead of failing.
	* xbuild/Microsoft.Common.targets: Handle non-existant
	Project references, skip instead of failing.

In class/Microsoft.Build.Tasks/Microsoft.Build.Tasks:
2009-10-12  Ankit Jain  <[email protected]>

	* ResolveAssemblyReference.cs: Remove unnecessary tab in the warning
	messages.

2009-10-12  Ankit Jain  <[email protected]>

	* MSBuild.cs (Execute): Handle build errors.

In class/Microsoft.Build.Tasks:
2009-10-12  Ankit Jain  <[email protected]>

	* Makefile: Add reference to Microsoft.Build.Engine .

In class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine:
2009-10-12  Ankit Jain  <[email protected]>

	* Target.cs (TargetFile): New. Gives the name of the file
	containing the target definition.
	* BuildEngine.cs (.ctor): Add a 'taskfile' parameters, and
	return this for ProjectFileOfTaskNode.
	* BuildTask.cs (LogTaskStarted):
	(LogTaskFinished): Use parentTarget.ProjectFileOfTaskNode for
	the event.
	(InitializeTask): Set BuildEngine's task file to parent target's
	TargetFile.
	* Engine.cs (LogProjectStarted): Incase of default targets, set
	TargetNames to String.Empty .
	* TargetBatchingImpl.cs (LogTargetStarted):
	(LogTargetFinished): Use target.TargetFile for the event.

	* ConsoleLogger.cs: Keep a stack of project/target/task being
	executed. And corresponding list of errors and warnings.
	(EventsToString): Stringifies the current "stack", to be used
	as key to the table of errors/warnings and for show messages
	at the end of the build.

2009-10-12  Ankit Jain  <[email protected]>

	* Project.cs (Load): Add argument checks.

In class/Microsoft.Build.Utilities/Microsoft.Build.Utilities:
2009-10-12  Ankit Jain  <[email protected]>

	* TaskLoggingHelper.cs: Use the buildEngine.ProjectFileOfTaskNode
	in the event args.

2009-10-12  Ankit Jain  <[email protected]>

	* ToolTask.cs (ExecuteTool): Don't set toolOutput to null.
	(HandleTaskExecutionErrors): toolOutput can be null.
	Set toolOutput to null here.


svn path=/branches/mono-2-4/mcs/; revision=143970
2009-10-12 13:21:48 +00:00
Marek Habersack df9c479b9f Backport of r143967
svn path=/branches/mono-2-4/mcs/; revision=143969
2009-10-12 12:52:33 +00:00
Zoltan Varga 62bc944bd5 2009-09-25 Zoltan Varga <[email protected]>
* solaris_threads.c (GC_get_orig_stack_size): Remove the annoying 'Large stack
	limit' warning.

svn path=/branches/mono-2-4/mono/; revision=143962
2009-10-12 12:22:09 +00:00
Marek Habersack 9ea089fcdf Backport of r143950
svn path=/branches/mono-2-4/mcs/; revision=143952
2009-10-12 10:50:33 +00:00
Marek Habersack f34df297c1 Backport of r143945
svn path=/branches/mono-2-4/mcs/; revision=143947
2009-10-12 09:52:55 +00:00
Ankit Jain 992c26b0fe * xbuild.1: Add info about env var XBUILD_COLORS.
Backported from trunk.

svn path=/branches/mono-2-4/mono/; revision=143908
2009-10-11 01:42:34 +00:00
Ankit Jain 5f43045e07 Update xbuild and Microsoft.Build.* from trunk.
In tools/xbuild:
2009-10-11  Ankit Jain  <[email protected]>

	* Main.cs: Add support for emitting messages in color.
	Taking relevant code from mcs/report.cs . Using ANSI
	color codes here instead of Console.ForegroundColor
	because of a bug in Console.

In class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine:
2009-10-11  Ankit Jain  <[email protected]>

	* ConsoleLogger.cs (no_colors): Rename to ..
	(use_colors): .. this. Fix the case when XBUILD_COLORS
	is not set.

2009-10-11  Ankit Jain  <[email protected]>

	* ConsoleLogger.cs: Use ColorSetter and ColorResetter .
	Support 'XBUILD_COLORS' to set colors for errors, warnings,
	events and messages.

2009-10-10  Ankit Jain  <[email protected]>

	* ConsoleLogger.cs (ProjectFinishedHandler): Once projectFailed
	becomes true, don't reset it. We are looking for "atleast one
	project failed".


svn path=/branches/mono-2-4/mcs/; revision=143905
2009-10-11 01:33:59 +00:00
Ankit Jain 8b2205bc01 Update xbuild and Microsoft.Build.* from trunk.
2009-10-09  Ankit Jain  <[email protected]>

	* Exec.cs (AddCommandLineCommands): Add '/q' for cmd.exe, to
	turn 'echo off'. And make sure the script file on windows, has
	a '.bat' extension, otherwise cmd.exe opens it in a text editor.

2009-10-09  Ankit Jain  <[email protected]>

	Fix bug #545703.
	* Exec.cs (Command): On unix, change CRLF to CR.


svn path=/branches/mono-2-4/mcs/; revision=143882
2009-10-09 15:52:30 +00:00
Marek Safar a73f9b73e9 Fixed bootstrap with trunk
svn path=/branches/mono-2-4/mcs/; revision=143869
2009-10-09 14:11:13 +00:00
Sebastien Pouliot a9167fe490 2009-10-08 Sebastien Pouliot <[email protected]>
* certmgr.cs: Don't throw if we're missing an argument. Fix by
	Romain Tartiere (bug #464765). Updated help to specify that 
	"option type" is mandatory in some cases.
	[Backport from HEAD to fix #544518]


svn path=/branches/mono-2-4/mcs/; revision=143814
2009-10-08 22:36:03 +00:00
Veerapuram Varadhan 76bfc0bb7c 2009-09-30 Veerapuram Varadhan <[email protected]>
** Fixes #543207
	* OracleParameter.cs (Bind): Do not remove the trailing-null-byte.

svn path=/branches/mono-2-4/mcs/; revision=143807
2009-10-08 19:52:00 +00:00
Mark Probst 1dbbe11762 2009-07-09 Mark Probst <[email protected]>
* class-internals.h, generic-sharing.c: New RGCTX info type for
        getting a remoting invoke with check wrapper.

        Backport of r137640.

2009-07-09  Mark Probst  <[email protected]>

        * method-to-ir.c: When doing a call which might be remote from
        shared generic code to other shared code with open type arguments,
        get the remoting invoke wrapper from the RGCTX and do an indirect
        call to it.

        Backport of r137640.

svn path=/branches/mono-2-4/mono/; revision=143791
2009-10-08 16:53:21 +00:00
Zoltan Varga b101df1257 2009-06-11 Zoltan Varga <[email protected]>
* configure.in: Disable dtrace support if dtrace doesn't support the
	-h option.

svn path=/branches/mono-2-4/mono/; revision=143790
2009-10-08 16:49:08 +00:00
Ankit Jain d8c8f3d901 Update xbuild and Microsoft.Build.* from trunk.
In tools/xbuild:
	* xbuild/Microsoft.Common.targets: Don't get list of files
	to deploy, for 'Private' project references.
	Fix target named for *CopyDeploy*.

In tools/xbuild/tests:

	* standalone/Project1: Add a new Lib5 project, and add
	private references to various projects.
	Update final-outputs.txt .
	* standalone/Project01/Lib5/*: New.

In class/Microsoft.Build.Tasks/Microsoft.Build.Tasks:
	* ResolveAssemblyReference.cs: Don't resolve any dependencies for
	assemblies resolved from {PkgConfig}. Honor parent's CopyLocal for
	dependencies.


svn path=/branches/mono-2-4/mcs/; revision=143742
2009-10-08 02:27:49 +00:00
Zoltan Varga 94211cb59c 2009-03-11 Zoltan Varga <[email protected]>
* SortedList.cs: Add version checking to the Key/Value enumerators +
	implement support for Reset (). Fixes #483985.

svn path=/branches/mono-2-4/mcs/; revision=143738
2009-10-08 01:23:46 +00:00
Ankit Jain bd143cd3f7 Update xbuild and Microsoft.Build.* from trunk.
In tools/xbuild:
2009-10-08  Ankit Jain  <[email protected]>

	* xbuild/Microsoft.Common.tasks: Add RemoveDuplicates task.

In class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks:
2009-10-08  Ankit Jain  <[email protected]>

	* TestMessageLogger.cs (CheckLoggedAny): New.

2009-10-08  Ankit Jain  <[email protected]>

	* RemoveDuplicatesTest.cs: New.

In class/Microsoft.Build.Tasks/Microsoft.Build.Tasks:
2009-10-08  Ankit Jain  <[email protected]>

	* MSBuild.cs (Execute): Don't share target output items,
	always create a copy.

2009-10-08  Ankit Jain  <[email protected]>

	* RemoveDuplicates.cs: Use item's ItemSpec as the key.

2009-10-07  Ankit Jain  <[email protected]>

	* ManagedCompiler.cs (HandleTaskExecutionErrors): Log error if
	required.

2009-10-06  Ankit Jain  <[email protected]>

	* Exec.cs (ExecuteTool): Use DeleteTempFile instead of File.Delete
	(HandleTaskExecutionErrors): Log error, if required.
	* MSBuild.cs: Don't log error.
	* Warning.cs: Don't log if @text is empty.

In class/Microsoft.Build.Tasks:
2009-10-08  Ankit Jain  <[email protected]>

	* Microsoft.Build.Tasks_test.dll.sources: Added
	RemoveDuplicatesTest.cs

In class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine:
2009-10-08  Ankit Jain  <[email protected]>

	* ProjectTest.cs (TestBatchedMetadataRefInOutput): New.

In class/Microsoft.Build.Engine/Test/various:
2009-10-08  Ankit Jain  <[email protected]>

	* Items.cs (TestItemsWithWildcards): New.

2009-10-08  Ankit Jain  <[email protected]>

	* Items.cs (TestItems5): Fix to work correctly on windows
	and unix.
	(TestReservedMetadata): New.

In class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine:
2009-10-08  Ankit Jain  <[email protected]>

	* DirectoryScanner.cs: Use Path.GetPathRoot, instead of
	directly using DirectoryInfo ("z:"), that doesn't return
	a dir info for "z:".

2009-10-08  Ankit Jain  <[email protected]>

	* DirectoryScanner.cs: Handle absolute paths. Fix to work
	correctly on windows. Change order of adding paths to match
	msbuild, useful to have.

2009-10-08  Ankit Jain  <[email protected]>

	* TaskBatchingImpl.cs (ParseTaskAttributes): Parse attributes
	of the 'Output' element also.
	* TaskEngine.cs (PublishOutput): Honor condition on 'Output' also.

2009-10-07  Ankit Jain  <[email protected]>

	* ConsoleLogger.cs: Mark build as failed, if any project failed.

2009-10-06  Ankit Jain  <[email protected]>

	* ConsoleLogger: Improve error reporting. Don't count failed task,
	target or project as another error. Show "errors" after "warnings",
	more useful to the user.
	* Project.cs (BuildTarget): Log error instead of using CWL.

In class/Microsoft.Build.Utilities/Mono.XBuild.Utilities:
2009-10-08  Ankit Jain  <[email protected]>

	* ReservedNameUtils.cs: Fix 'RootDir', 'Directory'.
	(WithTrailingSlash): New.
	Update to use the new WithTrailingSlash method.

In class/Microsoft.Build.Utilities/Microsoft.Build.Utilities:
2009-10-06  Ankit Jain  <[email protected]>

	* ToolTask.cs (Execute): HandleTaskExecutionErrors is called only
	if exitCode != 0.
	(ExecuteTool): Move logging of exitcode to HandleTaskExecutionErrors.
	Remove MonoTODOs.
	* TaskLoggingHelper.cs (LogMessageFromText): New.
	(LogMessage): Refactor to use above.


svn path=/branches/mono-2-4/mcs/; revision=143737
2009-10-08 01:03:41 +00:00
Zoltan Varga 8f9f8e99c3 Fix 2.4 make check.
svn path=/branches/mono-2-4/mcs/; revision=143718
2009-10-07 22:22:51 +00:00
Sebastien Pouliot 38a94954f5 2009-10-07 Sebastien Pouliot <[email protected]>
* CryptoStreamTest.cs: Make latest test cases compilable using
	older 2.4 mcs (which does not support automatically implemented 
	properties and implicitly typed arrays)implicitly typed arrays


svn path=/branches/mono-2-4/mcs/; revision=143664
2009-10-07 14:43:30 +00:00
Gonzalo Paniagua Javier bd85af1b49 2009-09-27 Gonzalo Paniagua Javier <[email protected]>
* RealProxy.cs: for a custom proxy, retrieve the OutArgs before
	allowing EndInvoke to proceed because after that, OutArgs will throw
	because there is no method. Fixes remoting2 and remoting3 tests.


svn path=/branches/mono-2-4/mcs/; revision=143662
2009-10-07 14:38:30 +00:00
Zoltan Varga 6b9c3fe99f Fix the 2.4 build.
svn path=/branches/mono-2-4/mono/; revision=143655
2009-10-07 14:13:46 +00:00
Zoltan Varga 5e4ef6deb3 2009-10-07 Zoltan Varga <[email protected]>
* pinvoke2.cs libtest.c: Add a test for marshalling DateTime to unmanaged code.

svn path=/branches/mono-2-4/mono/; revision=143645
2009-10-07 13:23:20 +00:00
Zoltan Varga c257c50737 2009-10-07 Zoltan Varga <[email protected]>
* marshal.c (emit_marshal_vtype): Emit marshalling of DateTime to OLE DATE.
	Fixes #322934.

svn path=/branches/mono-2-4/mono/; revision=143644
2009-10-07 13:23:12 +00:00
Marek Habersack 8539b28aa5 Backport of r143611
svn path=/branches/mono-2-4/mcs/; revision=143613
2009-10-07 10:49:39 +00:00
Gonzalo Paniagua Javier e5c1376fb8 2009-10-07 Gonzalo Paniagua Javier <[email protected]>
* StaticFileHandler.cs: it's the last flush even when a VPP is used.


svn path=/branches/mono-2-4/mcs/; revision=143599
2009-10-07 04:03:26 +00:00
Marek Habersack e922251982 Backport of r143587
svn path=/branches/mono-2-4/mcs/; revision=143589
2009-10-07 00:10:49 +00:00
Gonzalo Paniagua Javier 927558f1d3 2009-10-06 Gonzalo Paniagua Javier <[email protected]>
* GatewayIPAddressInformationCollection.cs:
	* IPInterfaceProperties.cs: implement GatewayAddresses for linux.
	Original patch by Christoph von Wittich.
	Fixes bug #544640.


svn path=/branches/mono-2-4/mcs/; revision=143527
2009-10-06 16:26:06 +00:00
Jonathan Chambers de7a2f04dd 2009-10-06 Jonathan Chambers <[email protected]>
* String.cs (Contains): Use CompareOptions.Ordinal. Fixes bug
        #535425.


svn path=/branches/mono-2-4/mcs/; revision=143520
2009-10-06 15:14:31 +00:00
Mark Probst 7b4efdcd94 2009-10-06 Mark Probst <[email protected]>
* object.c (mono_method_return_message_restore): Handle the case
        where the argument is an instance of a generic type.  Fixes
        #544446.

        Backport of r143506.

2009-10-06  Mark Probst  <[email protected]>

        * bug-544445.cs: New test.

        * Makefile.am: Test added.

        Backport of r143506.

svn path=/branches/mono-2-4/mono/; revision=143508
2009-10-06 12:56:59 +00:00
Carlos Alberto Cortez e4a3f205ce 2009-10-05 Carlos Alberto Cortez <[email protected]>
* RTF.cs: If the rtf specified a code page outside the valid values,
	fallback to the default one.
	Fixes #503174.


svn path=/branches/mono-2-4/mcs/; revision=143479
2009-10-05 23:40:59 +00:00
Carlos Alberto Cortez a71a0eb0b8 2009-10-05 Carlos Alberto Cortez <[email protected]>
* DateTimePicker.cs: Call Focus in HideMonthCalendar to avoid
	duplication of code, as well as actually getting the focus back in
	*any* scenario where the drop down is closed.


svn path=/branches/mono-2-4/mcs/; revision=143478
2009-10-05 23:37:48 +00:00
Carlos Alberto Cortez 5ffb93e446 * DateTimePicker.cs: When calculating the max width for the year part,
use the current value, since *all* the possible values are exactly a 4
	digits number. This way we avoid a ArgumentOutOfRangeException trying
	to check against different values.
	Fixes #500917.

2009-10-05  Carlos Alberto Cortez <[email protected]>


svn path=/branches/mono-2-4/mcs/; revision=143477
2009-10-05 23:36:33 +00:00
Carlos Alberto Cortez 7111cb7b4b * TextBox.cs: Expose IsAutoCompleteAvailable as internal.
* ComboBox.cs: If auto complete is being used, it is needed to update
	the actual value of the combo box, doing it immediately if the user
	presses Enter, or doing it when our combo box loses focus. Finally,
	when handling Enter and Escape keys for the combobox, don't try to
	hide the listbox if it is not visible in the first place. 
	Fixes part of #489339.

2009-10-05  Carlos Alberto Cortez <[email protected]>


svn path=/branches/mono-2-4/mcs/; revision=143476
2009-10-05 23:31:40 +00:00
Carlos Alberto Cortez 28610f479c * ComboBox.cs: When losing the focus, if our textbox is not null,
close its auto complete list, if any.
	Fixes part of #489339.

2009-10-05  Carlos Alberto Cortez <[email protected]>


svn path=/branches/mono-2-4/mcs/; revision=143475
2009-10-05 23:27:15 +00:00
Carlos Alberto Cortez b757396273 2009-10-05 Carlos Alberto Cortez <[email protected]>
* Control.cs, ContextMenuStrip.cs, ToolStripMenuItem.cs: Only process any 
	shortchut in ToolStripMenuItem.ProcessCmdKey if the control generating the 
	event is the same as the owner of the menu item. Also set properly 
	SourceControl for ContextMenuStrip, as well as add an internal field to 
	contain the control that owns the ContextMenuStrip (we need to know this 
	even before the public property is assigned).
	Fixes bits of #393775.


svn path=/branches/mono-2-4/mcs/; revision=143474
2009-10-05 23:13:49 +00:00
Carlos Alberto Cortez 964321cc03 2009-10-05 Carlos Alberto Cortez <[email protected]>
* ListBox.cs: The default instance StringFormat field used to draw our
	items should use the StringFormatFlags.NoWrap value, so it doesn't try
	to put in a different line the text that doesn't fit our bounds, but
	show it partially.
	Fixes #475581.


svn path=/branches/mono-2-4/mcs/; revision=143472
2009-10-05 23:01:07 +00:00
Carlos Alberto Cortez 536ee367dd 2009-10-05 Carlos Alberto Cortez <[email protected]>
* CheckedListbox.cs: When executing OnItemClick check that the index
	is different to -1 before trying to retrieve an item using that value.
	Fixes a ArgumentOutOfRangeException thrown when the horizontal
	scrollbar was visible but not needed, and then a clicked was received
	on its area.


svn path=/branches/mono-2-4/mcs/; revision=143471
2009-10-05 22:59:00 +00:00
Carlos Alberto Cortez 8b6dbf9018 2009-10-05 Carlos Alberto Cortez <[email protected]>
* ListView.cs: In EnsureVisible avoid any direct access to items if we
	are using virtual mode - otherwise use the bounds stored in a specific
	item in a given index. This is specially important when using groups
	or when items are re-arranged, since the position in the items
	collection can be different than that one being displayed.
	Fixes the rest of #491978.


svn path=/branches/mono-2-4/mcs/; revision=143470
2009-10-05 22:43:14 +00:00
Carlos Alberto Cortez 22c8ec9c90 * TabControl.cs: When removing a tab that was previously selected, set
internally the value of selected_index to -1, to avoid trying to
	access the previous one when trying to set the new one (and was
	already removed from the collection). This is what .net seems to do
	too.
	Fixes #490937.

2009-10-05  Carlos Alberto Cortez <[email protected]>

svn path=/branches/mono-2-4/mcs/; revision=143469
2009-10-05 22:41:31 +00:00
Carlos Alberto Cortez 9e0099bb86 * X11Clipboard.cs: Actually look for the RtfText format when calling
GetRftText in our clipboard formats list, instead of using the
	generical Text format.
2009-10-05  Carlos Alberto Cortez <[email protected]>


svn path=/branches/mono-2-4/mcs/; revision=143468
2009-10-05 22:39:21 +00:00
Carlos Alberto Cortez d321738dfa * TextBox.cs: Process auto completion properly when we are using the
internal source provided by ComboBox, and also remove some repeated
	checks.
	Fixes #489339.

2009-10-05  Carlos Alberto Cortez <[email protected]>


svn path=/branches/mono-2-4/mcs/; revision=143467
2009-10-05 22:37:38 +00:00
Carlos Alberto Cortez d2f90fa4ee 2009-10-05 Carlos Alberto Cortez <calberto.cortez@gmail,com>
* System.Windows.Forms.dll.sources: Add X11Clipboard.cs.


svn path=/branches/mono-2-4/mcs/; revision=143466
2009-10-05 22:34:58 +00:00
Carlos Alberto Cortez 255542e8a7 * X11Structs:
* X11Clipboard.cs: Move internal ClipboardStruct from X11Structs to
	its own file, since it is adding some functionality and thus is not a
	simple struct as before.
	* XplatUIX11.cs: Add support to store different formats that could
	have been specified by the user when puting data in the Clipboard -
	this is important when more than one format is supported (such plain
	text and rtf text). Update in the needed places, as well as simplify
	the code.
	Fixes #489625.

2009-10-05  Carlos Alberto Cortez <[email protected]>


svn path=/branches/mono-2-4/mcs/; revision=143465
2009-10-05 22:33:21 +00:00
Carlos Alberto Cortez ae63bf109a * XplatUIX11.cs: When handling the SelectionRequest event, use
SelectionRequestEvent instead of SelectionEvent, so we get the right
	data for the app asking for clipboard data. Set the member of
	SelectioneEvent.property to indicate the place where we are storing
	the information as well - this is specially important for gnome/kde
	apps using the TARGETS atom to ask for the supported permission before
	actually asking for a specific format.
	Fixes #489393.

2009-10-05  Carlos Alberto Cortez <[email protected]>


svn path=/branches/mono-2-4/mcs/; revision=143460
2009-10-05 21:36:48 +00:00
Carlos Alberto Cortez 8f356aa09f 2009-10-05 Carlos Alberto Cortez <[email protected]>
* ToolStrip.cs: When disposing, iterate over the items in reverse
	order, since disposing the items modifies the collection.
	* ToolStripItem.cs: Remove from the owner when disposing.
	Fixes #485769.


svn path=/branches/mono-2-4/mcs/; revision=143459
2009-10-05 21:34:52 +00:00
Carlos Alberto Cortez 1e3e17f293 2009-10-05 Carlos Alberto Cortez <[email protected]>
* DomainUpDown.cs: When ReadOnly is true, all the text entered by the
	user should use a different handling, trying to use every pressed char
	as a unique and only one prefix to compare against the items. Also,
	refactor some input check code to avoid duplication.
	Fixes #458607.


svn path=/branches/mono-2-4/mcs/; revision=143456
2009-10-05 21:25:13 +00:00
Carlos Alberto Cortez 721b9fa745 2009-10-05 Carlos Alberto Cortez <[email protected]>
* Form.cs: When calling ProcessCmdKey, just after checking for any
	MainMenu, check if there's an active ContextMenu that is *not* owned
	by the form - this is needed when a non-focusable control owns a
	ContextMenu but its ProcessCmdKey method can't be called since it
	can't receive any input.
	Fixes #477655.


svn path=/branches/mono-2-4/mcs/; revision=143453
2009-10-05 21:22:40 +00:00
Carlos Alberto Cortez 0cf685caee 2009-10-05 Carlos Alberto Cortez <[email protected]>
* RichTextBox.cs: LoadFile(string path) should pass by default
	RichTextBoxStreamType.RichText, without caring about the detection or
	extension of the file.


svn path=/branches/mono-2-4/mcs/; revision=143450
2009-10-05 21:19:58 +00:00
Carlos Alberto Cortez e5ce90c59e * ListView.cs: In our MouseDown handler in ItemControl use the item in
the very specific *real* position where the mouse was pressed, using
	GetItemAtDisplayIndex for that purpose, instead of directly accessing
	Items - this is specially useful when groups with Details view is
	used. This is what we do in other places when using groups.
	Fixes part of #478689.

2009-10-05  Carlos Alberto Cortez <[email protected]>


svn path=/branches/mono-2-4/mcs/; revision=143449
2009-10-05 21:18:11 +00:00
Carlos Alberto Cortez b92ef732f7 * ListView.cs: For EnsureVisible, adjust the view port bounds based on
the existence of the column headers, as well as using this information
	to adjust the vscrollbar value, so items never get hidden by the
	column headers.
	Fixes #478498.

2009-10-05  Carlos Alberto Cortez <[email protected]>


svn path=/branches/mono-2-4/mcs/; revision=143448
2009-10-05 21:15:26 +00:00
Carlos Alberto Cortez 4405d72a9e 2009-10-05 Carlos Alberto Cortez <[email protected]>
* TextBox.cs: Some code lifting for AutoComplete's support. First,
	when handling non-navigation keys, save the original Text typed by the
	user, and don't motify it BEFORE. This was a design mistake, since the
	re-assignation happens only when navigating the append/suggest list,
	not while creating the matches. Also, process the Delete key just like 
	the backspace one. Finally, when handling WM_CHAR, ignore both Escape
	and Enter keys.
	Fixes some missing bits of #469967.


svn path=/branches/mono-2-4/mcs/; revision=143446
2009-10-05 21:13:37 +00:00
Marek Habersack 9a376b7755 Fix the build
svn path=/branches/mono-2-4/mcs/; revision=143430
2009-10-05 18:00:09 +00:00
Carlos Alberto Cortez b02607456d 2009-10-05 Carlos Alberto Cortez <[email protected]>
* TextBox.cs: When handling WndProc with autocomplete activated,
	event if the new text is not causing any change in the look up
	algorithm, save it as we normally do when numbers and letters.
	Fixes #469967.


svn path=/branches/mono-2-4/mcs/; revision=143427
2009-10-05 17:12:02 +00:00
Carlos Alberto Cortez e5ff57bed6 * TreeView.cs: When canceling selection in our MouseUp handler,
invalidate also the previous selected node bounds.
	Fixes #464191.

2009-10-05  Carlos Alberto Cortez <[email protected]>


svn path=/branches/mono-2-4/mcs/; revision=143424
2009-10-05 17:00:27 +00:00
Carlos Alberto Cortez 730b186c46 2009-10-05 Carlos Alberto Cortez <[email protected]>
* TreeView.cs: When handling the MouseMove event, check if
	focused_node and selected_node fields are null - usually they are non
	null, since we have always a selected node, but canceling selection by
	handling BeforeSelect event leaves the two of them as null.
	Fixes #470451.


svn path=/branches/mono-2-4/mcs/; revision=143423
2009-10-05 16:58:34 +00:00
Carlos Alberto Cortez f21208d73b 2009-10-05 Carlos Alberto Cortez <[email protected]>
* TreeView.cs: When drawing the node's image, check that the index
	specified by the node is valid for the ImageList.
	Fixes #471094.


svn path=/branches/mono-2-4/mcs/; revision=143422
2009-10-05 16:53:37 +00:00
Marek Habersack 00611272fe Backport of r143388
svn path=/branches/mono-2-4/mcs/; revision=143390
2009-10-05 11:15:47 +00:00
Marek Habersack 857819e153 Backport of r143384
svn path=/branches/mono-2-4/mcs/; revision=143386
2009-10-05 10:46:14 +00:00
Ankit Jain bbede03060 Update xbuild and Microsoft.Build.* from trunk.
In tools/xbuild:
2009-10-03  Ankit Jain  <[email protected]>

	Fix bug#542461.
	* xbuild/Microsoft.Common.targets (KeyOriginatorFile): Set to
	$(AssemblyOriginatorKeyFile), if SignAssembly is true.
	Use it for satellite assemblies also.

In class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine:
2009-10-03  Ankit Jain  <[email protected]>

	* Project.cs (OS): New.
	(InitializeProperties): Set 'OS' as a pre-defined property, set to
	'Windows_NT', 'Unix' or 'OSX' depending on the platform.


svn path=/branches/mono-2-4/mcs/; revision=143318
2009-10-02 22:10:12 +00:00
Zoltan Varga 772e974348 2009-10-02 Zoltan Varga <[email protected]>
* mini-sparc.c (mono_arch_emit_setret): Emit long return values using OP_LMOVE.
	(mono_arch_create_vars): Instead of allocating a stack slot by hand, allocate
	a variable to hold the stack slot used by the int<->float conversion opcodes.

svn path=/branches/mono-2-4/mono/; revision=143309
2009-10-02 18:50:37 +00:00
Zoltan Varga 13e116f67d 2009-10-02 Zoltan Varga <[email protected]>
* mini-sparc.c (mono_arch_build_imt_thunk): Implement support for fail_tramp.

svn path=/branches/mono-2-4/mono/; revision=143269
2009-10-02 10:48:56 +00:00
Ankit Jain 15e05030e7 Update xbuild and Microsoft.Build.* from trunk.
In class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine:
2009-10-02  Ankit Jain  <[email protected]>

	* Expression.cs (Parse): Don't change '/' to '\\', not required.

In class/Microsoft.Build.Utilities/Microsoft.Build.Utilities:
2009-10-02  Ankit Jain  <[email protected]>

	* AppDomainIsolatedTask.cs (BuildEngine): Init 'log'.


svn path=/branches/mono-2-4/mcs/; revision=143219
2009-10-01 20:49:52 +00:00
Gonzalo Paniagua Javier 5cd2012a74 2009-09-30 Gonzalo Paniagua Javier <[email protected]>
* HtmlSelectBuilder.cs: <option> allows the value of the 'selected'
	attribute to be a boolean or the string "selected", which is treated
	as "true".


svn path=/branches/mono-2-4/mcs/; revision=143107
2009-10-01 02:25:04 +00:00
Gonzalo Paniagua Javier 2283db587e 2009-09-30 Gonzalo Paniagua Javier <[email protected]>
* CodeNamespace.cs:
	* CodeTypeReference.cs:
	* CodeMemberMethod.cs:
	* CodeCompileUnit.cs:
	* CodeNamespaceImportCollection.cs:
	* CodeTypeDeclaration.cs: renamed/added fields so that we're
	compatible with MS serialization.


svn path=/branches/mono-2-4/mcs/; revision=143104
2009-10-01 01:44:50 +00:00
Gonzalo Paniagua Javier 095eee95a8 2009-09-30 Gonzalo Paniagua Javier <[email protected]>
* Hashtable.cs: MS (at least latest and greatest) does not always
	serialized the HashCodeProvider. Ignoring the error when the field
	is not found.


svn path=/branches/mono-2-4/mcs/; revision=143101
2009-10-01 01:41:26 +00:00
Gonzalo Paniagua Javier d4767647f6 undo. Proper fix was in BuildManager
svn path=/branches/mono-2-4/mcs/; revision=143098
2009-10-01 01:25:48 +00:00
Gonzalo Paniagua Javier dc6a4f9aff 2009-09-30 Gonzalo Paniagua Javier <[email protected]>
* BuildManager.cs: load/set the global resources assembly for
	precompiled and merged sites correctly.


svn path=/branches/mono-2-4/mcs/; revision=143095
2009-10-01 01:22:55 +00:00
Ankit Jain 359f04ea6a Update xbuild and Microsoft.Build.* from trunk.
In class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine:
2009-10-01  Ankit Jain  <[email protected]>

	* ImportTest.cs (TestAdd1): Add tests for multiple imports.

In class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine:
2009-10-01  Ankit Jain  <[email protected]>

	* Project.cs (AddImport): Show the correct source file name, when
	the import is in the main project file.

2009-10-01  Ankit Jain  <[email protected]>

	Fix bug #543299.
	* Import.cs (.ctor): Evaluate and set EvaluatedProjectPath to
	the full path of the imported project here itself, instead of ..
	(Evaluate): .. here.
	* ImportCollection.cs (Add): Use import.EvaluatedProjectPath .
	(Contains): New.
	* Project.cs (AddImport): Don't process if condition is false.
	Warn if a circular reference is detected, and ignore the import.


svn path=/branches/mono-2-4/mcs/; revision=143087
2009-09-30 23:28:13 +00:00
Zoltan Varga 359d16b24d 2009-09-30 Zoltan Varga <[email protected]>
* pinvoke2.cs libtest.c: Add a test for #543133.

svn path=/branches/mono-2-4/mono/; revision=143002
2009-09-30 13:34:05 +00:00
Zoltan Varga 448ff8fe73 2009-09-30 Zoltan Varga <[email protected]>
* marshal.c (emit_marshal_object): Emit out marshalling of stringbuilders.
	Fixes #543133.

svn path=/branches/mono-2-4/mono/; revision=143001
2009-09-30 13:33:56 +00:00
Marek Habersack e73b45fbbd Backport of r142984
svn path=/branches/mono-2-4/mcs/; revision=142986
2009-09-30 10:39:46 +00:00
Marek Safar 88b22f3df9 2009-09-30 Marek Safar <[email protected]>
A fix for bug #542959
	* delegate.cs: Emit correct delegate instance variable when there
	are static and non-static overloads.


svn path=/branches/mono-2-4/mcs/; revision=142979
2009-09-30 09:36:21 +00:00
Gonzalo Paniagua Javier 63d3e279ca 2009-09-30 Gonzalo Paniagua Javier <[email protected]>
* BinaryFormatter.cs: NoCheckDeserialize() was using PeekChar() on a
	reader when it should only read 1 byte. Also BinaryReader.PeekChar()
	tries to set the position of hte stream back to where it was before
	the read, which does not work well with broken Stream
	implementations like BZip2InputStream (reports CanSeek is true when
	it really can't seek). Now we do a Read() and then pass the value we
	read on to the next methods.

	* MessageFormatter.cs: 
	* ObjectReader.cs: added overloads that take a BinaryElement instead
	of reading it from the reader. Only for the methods used in
	NoCheckDeserialize.

	Fixes bug #503435.


svn path=/branches/mono-2-4/mcs/; revision=142966
2009-09-30 06:06:51 +00:00
Gonzalo Paniagua Javier 11bbaa5354 2009-09-30 Gonzalo Paniagua Javier <[email protected]>
* InotifyWatcher.cs: fixes bug #322330. Patch by Alexander Kojevnikov.
	This patch fixes the issues reported by the OP and in my previous
	comment. In particular:

	Hunks 1 and 4 remove the new_name_needed flag, it's not used
	anywhere and only adds confusion.

	Hunk 2 skips DeleteSelf event for sub-directories, they receive the
	Delete event anyway.

	Hunk 3 makes sure that we use a combination of Deleted+Created
	notifications instead of a single Renamed notification, if the watched item
	has been moved from one directory to another. This is because RenamedEventArgs
	supports only one directory name: FullPath is always directory+name,
	OldFullPath is always directory+old_name.

	Hunk 5 updates relevant InotifyData instances with the new directory
	name.  Without this, notifications always use the original folder names.

	The last hunk may be a bit slow as it needs to iterate on all the
	InotifyData instances. On the other hand, we are already doing it on the
	Delete event (lines 560:568) and by default inotify allows only 8192 watches
	per user.


svn path=/branches/mono-2-4/mcs/; revision=142960
2009-09-30 05:27:11 +00:00
Marek Habersack b073156898 Backport of r142943
svn path=/branches/mono-2-4/mcs/; revision=142945
2009-09-29 23:25:46 +00:00
Marek Habersack 2d93af6034 Backport of r142934
svn path=/branches/mono-2-4/mcs/; revision=142936
2009-09-29 21:52:40 +00:00
Zoltan Varga 7038b002d5 2009-09-29 Zoltan Varga <[email protected]>
* mini-sparc.c: Fix the handling of enums with base type long.

svn path=/branches/mono-2-4/mono/; revision=142920
2009-09-29 20:10:33 +00:00
Zoltan Varga 398b1bc45d 2009-09-29 Zoltan Varga <[email protected]>
* mini-sparc.c (mono_arch_output_basic_block): Fix IREM_UN_IMM.

svn path=/branches/mono-2-4/mono/; revision=142919
2009-09-29 20:10:06 +00:00
Zoltan Varga 1ecf89bf0d 2009-09-29 Zoltan Varga <[email protected]>
* solaris_threads.c (GC_thr_daemon): Don't crash if GC_lookup_thread () returns
	NULL.

svn path=/branches/mono-2-4/mono/; revision=142913
2009-09-29 18:33:56 +00:00
Gonzalo Paniagua Javier bb2ae500e5 2009-09-29 Gonzalo Paniagua Javier <[email protected]>
* EndPointListener.cs: fix matching a listener in presence of a query
	string or anchor.


svn path=/branches/mono-2-4/mcs/; revision=142902
2009-09-29 17:16:47 +00:00
Alan McGovern 6f17db0831 2009-09-29 Alan McGovern <[email protected]>
* CategoryAttributeTest.cs: Added new test file.


svn path=/branches/mono-2-4/mcs/; revision=142891
2009-09-29 16:01:24 +00:00
Alan McGovern 11fc90103b 2009-09-29 Alan McGovern <[email protected]>
* DefaultValueAttribute.cs: Implement the cctor which takes
	a Type and a string for the SL2 case.
	* CategoryAttribute.cs: Fix a typo in the CategoryAttribute.Asynchronous
	ctor and fix some SL2 specific naming changes for the default properties.


svn path=/branches/mono-2-4/mcs/; revision=142890
2009-09-29 16:00:30 +00:00
Ankit Jain 36121155b2 Update xbuild and Microsoft.Build.* from trunk.
In tools/xbuild:
2009-09-29  Ankit Jain  <[email protected]>

	* SolutionParser.cs (Insert): Show project name in case of a cyclic
	dependency.

In class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine:
2009-09-29  Ankit Jain  <[email protected]>

	* ProjectTest.cs (TestPropertiesFromImportedProjects): New.

In class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine:
	* GroupingCollection.cs (Evaluate): Mark internal.
	* Project.cs (AddImport): Only evaluate the properties,
	till before the import.

svn path=/branches/mono-2-4/mcs/; revision=142873
2009-09-29 14:53:59 +00:00
Zoltan Varga 78a3856aa4 2009-09-29 Zoltan Varga <[email protected]>
* mono-compiler.h (MONO_INTERNAL): Disable this on solaris as it produces a
	millions of warnings during compilation.

svn path=/branches/mono-2-4/mono/; revision=142869
2009-09-29 14:37:11 +00:00
Zoltan Varga a10399e98b 2009-09-29 Zoltan Varga <[email protected]>
* mini-sparc.c (mono_arch_allocate_vars): Use mono_class_from_mono_type ()
	instead of using type->data.klass as the later doesn't work with generics.

svn path=/branches/mono-2-4/mono/; revision=142868
2009-09-29 14:36:57 +00:00
Gonzalo Paniagua Javier c99d0a46d0 Fix 1.1 profile
svn path=/branches/mono-2-4/mcs/; revision=142838
2009-09-29 09:25:44 +00:00
Gonzalo Paniagua Javier 74baccae7f 2009-09-29 Gonzalo Paniagua Javier <[email protected]>
* Ping.cs: fix the check for a time-out return value from 'ping'.


svn path=/branches/mono-2-4/mcs/; revision=142822
2009-09-29 05:58:03 +00:00
Gonzalo Paniagua Javier 2da4096b85 2009-09-29 Gonzalo Paniagua Javier <[email protected]>
* HttpContext.cs: try to load App_GlobalResouces.dll if it has not
	been set but it exists in 'bin'.


svn path=/branches/mono-2-4/mcs/; revision=142819
2009-09-29 05:42:34 +00:00
Marek Habersack 5e6f979447 Backport of r142798
svn path=/branches/mono-2-4/mcs/; revision=142800
2009-09-28 21:42:39 +00:00
Ankit Jain 54ef591b72 Update xbuild and Microsoft.Build.* from trunk.
In class/Microsoft.Build.Tasks/Microsoft.Build.Tasks:
2009-09-29  Ankit Jain  <[email protected]>

	* Exec.cs: Write the commands, which can be multiline,
	to a temporary file, and execute that with "cmd.exe /c"
	on windows and "sh" on non-windows.
	(LogToolCommand): Override, and emit the commands instead
	of the actual args passed to the shell.

In class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine:
2009-09-29  Ankit Jain  <[email protected]>

	* Project.cs (DoLoad): Don't use XmlReader.Create, for loading
	the project xml, as returned Xml*Reader normalizes the newlines.
	Instead directly use the TextReader with XmlDocument.Load ().

In class/Microsoft.Build.Utilities/Microsoft.Build.Utilities:
2009-09-29  Ankit Jain  <[email protected]>

	* ToolTask.cs (ExecuteTool): Use LogToolCommand, instead of
	directly logging.
	(LogToolCommand): Implement.


svn path=/branches/mono-2-4/mcs/; revision=142793
2009-09-28 19:24:32 +00:00
Marek Habersack f8c1bbf000 Backport of r142783
svn path=/branches/mono-2-4/mcs/; revision=142784
2009-09-28 18:53:58 +00:00
Marek Habersack 1848319078 Backport of r142780
svn path=/branches/mono-2-4/mcs/; revision=142782
2009-09-28 18:50:56 +00:00
Marek Habersack 757303f826 Backport of r142773
svn path=/branches/mono-2-4/mcs/; revision=142777
2009-09-28 18:08:58 +00:00
Marek Habersack e8d4cc4614 Backport of r142766
svn path=/branches/mono-2-4/mcs/; revision=142768
2009-09-28 16:44:35 +00:00
Ankit Jain 3e7c4a6f99 Update xbuild and Microsoft.Build.* from trunk.
In class/Microsoft.Build.Tasks/Microsoft.Build.Tasks:
2009-09-28  Ankit Jain  <[email protected]>

	* WriteLinesToFiles.cs (Execute): Handle empty list of
	lines.

In class/Microsoft.Build.Utilities/Microsoft.Build.Utilities:
2009-09-28  Ankit Jain  <[email protected]>

	* ToolTask.cs (ProcessOuputTool): Move logging of tool
	output from here to ..
	(ExecuteTool): .. here. As, ProcessOuputTool can be
	overridden.


svn path=/branches/mono-2-4/mcs/; revision=142743
2009-09-28 11:00:02 +00:00
Gonzalo Paniagua Javier 6899c14049 from trunk
svn path=/branches/mono-2-4/mono/; revision=142705
2009-09-27 06:16:26 +00:00
Veerapuram Varadhan 068a7792ae backport of r142690
svn path=/branches/mono-2-4/mcs/; revision=142692
2009-09-26 21:30:33 +00:00
Veerapuram Varadhan ef426b10a2 backport of r142668
svn path=/branches/mono-2-4/mcs/; revision=142691
2009-09-26 21:30:15 +00:00
Ankit Jain b617f55f9e Update xbuild and Microsoft.Build.* from trunk.
In tools/xbuild:
2009-09-27  Ankit Jain  <[email protected]>

	* SolutionParser.cs: Implement support for WebSite projects. These
	projects lack a project file, so properties like references are read
	from the .sln file, and targets are generated for build/clean etc.

2009-09-26  Ankit Jain  <[email protected]>

	* xbuild/Microsoft.Common.targets: Remove _ValidateEssentialProperties
	from BuildDependsOn, which was a hack. It will get invoked from the
	InitialTargets now.

In class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine:
2009-09-26  Ankit Jain  <[email protected]>

	* TargetTest.cs (TestOverridingTargets): New.

2009-09-26  Ankit Jain  <[email protected]>

	* ProjectTest.cs (TestInitialTargetsWithImports):
	(TestDefaultTargets):
	(TestDefaultTargetsWithImports):
	(TestNoDefaultTargetsWithImports):
	(TestNoDefaultTargets): New tests.

In class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine:
2009-09-27  Ankit Jain  <[email protected]>

	* ConditionParser.cs: Show the condition being parsed in the
	exception message.

2009-09-26  Ankit Jain  <[email protected]>

	* Expression.cs: Allow '-' in item, property and metadata names.

2009-09-26  Ankit Jain  <[email protected]>

	* Project.cs (Evaluate): Split into this and ..
	(PrepareForEvaluate): .. this.
	(AddImport): Evaluate the current set of properties/items etc,
	before processing the imported project. Honor the Condition
	for the Import.
	(ProcessProjectAttributes): Update MSBuildProjectDefaultTargets
	property.
	* GroupingCollection.cs (Evaluate): Don't evaluate Imports here.
	* BuildItemGroup.cs (Evaluate): Evaluate only once.
	* BuildPropertyGroup.cs (Evaluate): Evaluate only once.

2009-09-26  Ankit Jain  <[email protected]>

	* Project.cs: Get InitialTargets from the imported projects also.
	The combined list of targets are executed, in the order they were
	found.
	DefaultTargets are also read in from imported projects, and the first
	non-empty DefaultTargets found is used.


svn path=/branches/mono-2-4/mcs/; revision=142685
2009-09-26 20:47:33 +00:00
Zoltan Varga 419eb9cd78 2009-09-25 Zoltan Varga <[email protected]>
* mini-sparc.c (mono_arch_create_vars): Make the component vars of a long ret
	variable volatile. Fixes #541577.

	* basic-calls.cs: Add a new test.

	* basic-long.cs: Remove tests which are now in basic-calls.cs.

svn path=/branches/mono-2-4/mono/; revision=142652
2009-09-25 19:19:16 +00:00
Zoltan Varga 468443f52c 2009-07-12 Gert Driesen <[email protected]>
* BinderTest.cs: Added SelectMethod/BindToMethod tests for methods
with byref arguments.
* Binder.cs: Only allow a type to match its byref version for
BindToMethod (and not for SelectMethod).
* TypeTest.cs: Enabled test that was failing due to regression.

svn path=/branches/mono-2-4/mcs/; revision=142638
2009-09-25 14:45:37 +00:00
Zoltan Varga 8b466bd4bc 2009-02-02 Zoltan Varga <[email protected]>
* marshal.c (mono_marshal_get_runtime_invoke): Add support for byref
	nullable arguments.

	* object.c (mono_runtime_invoke_array): Ditto.

svn path=/branches/mono-2-4/mono/; revision=142635
2009-09-25 14:35:11 +00:00
Zoltan Varga d5b8aa69e5 2009-07-10 Zoltan Varga <[email protected]>
* Binder.cs (check_arguments): Allow a type to match its byref version.
	Fixes #520690.

svn path=/branches/mono-2-4/mcs/; revision=142634
2009-09-25 14:34:46 +00:00
Ankit Jain 879eeb6c15 Update xbuild and Microsoft.Build.* from trunk.
In tools/xbuild:
	* Makefile(EXTRA_DISTFILES): Add Microsoft.WebApplication.targets

2009-09-25  Ankit Jain  <[email protected]>

	* xbuild/Microsoft.Common.targets: Emit list of files written
	during the build, even if the build fails.

In class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine:
	* Project.cs (BuildTarget): Handle skipped targets.

svn path=/branches/mono-2-4/mcs/; revision=142632
2009-09-25 13:07:00 +00:00
Marek Habersack 4fbaa2df11 Backport of r142627
svn path=/branches/mono-2-4/mcs/; revision=142628
2009-09-25 11:17:52 +00:00
Ankit Jain 67de92c683 * xbuild.1: Add info about env var XBUILD_EMIT_SOLUTION.
svn path=/branches/mono-2-4/mono/; revision=142613
2009-09-25 00:50:02 +00:00
Veerapuram Varadhan 80ed1e2c00 backport of r142608
svn path=/branches/mono-2-4/mcs/; revision=142612
2009-09-25 00:49:09 +00:00
Ankit Jain 86bb2d341d Update xbuild and Microsoft.Build.* from trunk.
In tools/xbuild:
2009-09-25  Ankit Jain  <[email protected]>

	Fix bug #534992.
	* xbuild/Microsoft.Common.targets: Add support for copying
	app.config to AssemblyName.config
	* xbuild/Microsoft.Common.tasks: Add FindAppConfigFile task.

2009-09-24  Ankit Jain  <[email protected]>

	* Parameters.cs (ParseArguments): If no project file is specified,
	then look for a .sln or *proj file in the current directory.

2009-09-24  Ankit Jain  <[email protected]>

	* Makefile: Create dir for WebApplication.targets .
	* Microsoft.Common.targets (_ValidateEssentialProperties): New.
	(BuildDependsOn): Add _ValidateEssentialProperties, temporary.
	This should actually work via InitialTargets, which will be fixed
	in a subsequent commit. Add PrepareForRun.
	(PrepareForRun): New.
	* xbuild/Microsoft.WebApplication.targets: New.

2009-09-23  Ankit Jain  <[email protected]>

	* xbuild/Microsoft.Common.targets: Add 'Rebuild' target.
	Also, set DefaultTargets to "Build".

In tools/xbuild/tests:
2009-09-25  Ankit Jain  <[email protected]>

	* standalone/Project01: Add app.config to project Lib1.
	Remove Project01.sln.proj . Update final-outputs.txt .

In class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks:
2009-09-25  Ankit Jain  <[email protected]>

	* FindAppConfigFileTest.cs: New.

In class/Microsoft.Build.Tasks/Microsoft.Build.Tasks:
2009-09-25  Ankit Jain  <[email protected]>

	* FindAppConfigFile.cs: New.

2009-09-24  Ankit Jain  <[email protected]>

	* ReadLinesFromFile.cs (Execute): Don't do anything, if
	file is non-existant.

2009-09-24  Ankit Jain  <[email protected]>

	* ToolTaskExtension.cs (HasLoggedErrors): Override.

2009-09-23  Ankit Jain  <[email protected]>

	* MSBuild.cs (BuildInParallel): Add missing property.

2009-09-10  Ankit Jain  <[email protected]>

	* AssemblyResolver.cs: Move the SearchLogger to be a list of
	strings, so that it can be emitted with correct indentation.
	(SearchLogger): Remove.
	(LogSearchMessage): New.
	(LogSearchLoggerMessages): New.
	* ResolveAssemblyReference.cs: Track api changes.

In class/Microsoft.Build.Tasks:
2009-09-25  Ankit Jain  <[email protected]>

	* Microsoft.Build.Tasks.dll.sources: Added
	FindAppConfigFile.cs
	* Microsoft.Build.Tasks_test.dll.sources: Added
	FindAppConfigFileTest.cs

In class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine:
2009-09-25  Ankit Jain  <[email protected]>

	* Project.cs (DoLoad): If a VS2003 project is detected, then throw
	InvalidProjectFileException with useful error.

2009-09-24  Ankit Jain  <[email protected]>

	* Project.cs (Load): Emit the .sln.proj file only if env var
	XBUILD_EMIT_SOLUTION is set.

2009-09-24  Ankit Jain  <[email protected]>

	* Project.cs (GetKeyForTarget): Make target name, case insensitive.

2009-09-24  Ankit Jain  <[email protected]>

	* Project.cs (InitializeProperties): Set 'MSBuildProjectDefaultTargets'
	reserved property.

In class/Microsoft.Build.Utilities/Microsoft.Build.Utilities:
2009-09-24  Ankit Jain  <[email protected]>

	* ToolTask.cs (HasLoggedErrors): Add missing property.

2009-09-23  Ankit Jain  <[email protected]>

	* TaskLoggingHelper.cs (LogErrorFromException): Add missing overload.

2009-09-10  Ankit Jain  <[email protected]>

	* TaskLoggingHelper.cs (FormatString): Use the unformatted string
	even if the args array was empty.


svn path=/branches/mono-2-4/mcs/; revision=142611
2009-09-25 00:48:23 +00:00
Zoltan Varga a51039ba56 2009-09-24 Zoltan Varga <[email protected]>
* processes.c (load_modules): Applied patch from Thomas Philpot
	([email protected]). Fixes #533893.

svn path=/branches/mono-2-4/mono/; revision=142601
2009-09-24 19:34:19 +00:00
Veerapuram Varadhan 979f4d8759 backport of r142590
svn path=/branches/mono-2-4/mcs/; revision=142591
2009-09-24 18:02:49 +00:00
Marek Habersack 1fd6e786cc Backport of r142556
svn path=/branches/mono-2-4/mcs/; revision=142558
2009-09-24 09:36:34 +00:00
Gonzalo Paniagua Javier 7347070d74 2009-09-24 Gonzalo Paniagua Javier <[email protected]>
* Timer.cs: lock access to the 'timer' field. Attemp to fix bug
	#537921.


svn path=/branches/mono-2-4/mcs/; revision=142549
2009-09-24 05:10:26 +00:00
Zoltan Varga 9efe7bd899 2009-09-24 Zoltan Varga <[email protected]>
* Type.cs: Initialize the Missing field.

svn path=/branches/mono-2-4/mcs/; revision=142542
2009-09-24 00:25:49 +00:00
Ivan Zlatev df22e8009a 2009-09-24 Ivan N. Zlatev <[email protected]>
* DataGridView.cs: Compare the name and not displayname of properties
	when checking if the column is already bound.

svn path=/branches/mono-2-4/mcs/; revision=142537
2009-09-24 00:12:06 +00:00
Ivan Zlatev b608b90e15 2009-09-24 Ivan Zlatev <[email protected]>
* EnumConverter.cs: Fix conversion of 0 flag values.
	* EnumConverterTests.cs: Add a test to verify behaviour when converting
	 a 0 flag value.
	[Fixes bug #541402]

svn path=/branches/mono-2-4/mcs/; revision=142535
2009-09-23 23:56:50 +00:00
Zoltan Varga 7b96dea1de 2009-09-24 Zoltan Varga <[email protected]>
* decompose.c (mono_decompose_vtype_opts): Avoid reading uninitialized memory
	in the VCALL decomposition code.

svn path=/branches/mono-2-4/mono/; revision=142531
2009-09-23 23:45:55 +00:00
Gonzalo Paniagua Javier 65e019035d 2009-09-23 Gonzalo Paniagua Javier <[email protected]>
* NetworkStream.cs: after disposing the stream, CanRead/CanWrite
	return false.


svn path=/branches/mono-2-4/mcs/; revision=142489
2009-09-23 13:42:04 +00:00
Sebastien Pouliot db5d5073e3 In Test/System.Security.Cryptography:
2009-09-22  Sebastien Pouliot  <[email protected]> 

	* CryptoStreamTest.cs: Add (nunit-ized) test cases provided by
	Santa Marta (via Atsushi) as repro for bugs #539288 and #539229

2009-09-22  Sebastien Pouliot  <[email protected]>

	* CryptoStreamTest.cs: Convert to newer nunit syntax

In System.Security.Cryptography:
2009-09-23  Sebastien Pouliot  <[email protected]>

	* CryptoStream.cs: Fix [Input|Output]BlockSize for custom streams.
	Patches by Santa Marta (via Atsushi).
	[Fix bug #539288 and #539229]
	[Backport r142435]


svn path=/branches/mono-2-4/mcs/; revision=142476
2009-09-23 12:14:01 +00:00
Marek Habersack b9ba0f5eba Backport of r142433
svn path=/branches/mono-2-4/mcs/; revision=142434
2009-09-22 19:28:40 +00:00
Marek Habersack 6add805673 Backport of r142386
svn path=/branches/mono-2-4/mcs/; revision=142387
2009-09-22 12:15:24 +00:00
Gonzalo Paniagua Javier 82af3effda 2009-09-21 Gonzalo Paniagua Javier <[email protected]>
* Console.cs: mark methods/properties that only work on windows.
	Fixes bug #540593.


svn path=/branches/mono-2-4/mcs/; revision=142326
2009-09-21 11:56:42 +00:00
Zoltan Varga cd46cfb184 2009-09-19 Zoltan Varga <[email protected]>
* method-to-ir.c: Fix the previous change on 64 bit platforms.

svn path=/branches/mono-2-4/mono/; revision=142262
2009-09-19 19:00:56 +00:00
Zoltan Varga 6f496e34c3 2009-09-19 Zoltan Varga <[email protected]>
* method-to-ir.c: Applied patch from Rodrigo Kumpera. Allow an i8 argument
	to NEWARR.

	* iltests.il.in: Add a new test.

svn path=/branches/mono-2-4/mono/; revision=142260
2009-09-19 18:50:43 +00:00
Gonzalo Paniagua Javier 75883edce3 2009-09-19 Gonzalo Paniagua Javier <[email protected]>
* SocketAsyncEventArgs.cs: fix check for non-null.
	Fixes bug #516455.


svn path=/branches/mono-2-4/mcs/; revision=142253
2009-09-19 05:03:21 +00:00
Gonzalo Paniagua Javier e8236f67b4 2009-09-19 Gonzalo Paniagua Javier <[email protected]>
* Ping.cs: if we receive a packet that is ignored, adjust the
	timeout. Fixes bug #538013.


svn path=/branches/mono-2-4/mcs/; revision=142251
2009-09-19 04:45:36 +00:00
Gonzalo Paniagua Javier a226c5c2fc fix the windows cygwin build in 2.4
svn path=/branches/mono-2-4/mono/; revision=142210
2009-09-18 17:00:30 +00:00
Miguel de Icaza 97ad9677e9 Update the number, so MD builds
svn path=/branches/mono-2-4/mono/; revision=142194
2009-09-18 15:39:39 +00:00
Rodrigo Kumpera 3dd67d7f09 In metadata:
2009-09-17 Rodrigo Kumpera  <[email protected]>

	Backport of r127430.

	* appdomain.c:
	* generic-sharing.c:
	* object.c:
	* reflection.c:  Adjust locking order to the new semantics where the loader lock
	comes first.

	Backport of r126758/126783.

	* reflection.c (mono_reflection_lookup_dynamic_token): This function might be called without
	the loader lock which is required to guard MonoImage:tokens.

In mini:
2009-09-17 Rodrigo Kumpera  <[email protected]>

	Backport of r127430.

	* mini.c: Adjust locking order to the new semantics where the loader lock
	comes first.


svn path=/branches/mono-2-4/mono/; revision=142152
2009-09-17 21:58:12 +00:00
Rodrigo Kumpera 17e154b315 In .:
2009-09-17 Rodrigo Kumpera  <[email protected]>

	* ArrayTest.cs: Fix the build.


svn path=/branches/mono-2-4/mcs/; revision=142151
2009-09-17 21:53:36 +00:00
Gonzalo Paniagua Javier 2ca7f78aa2 2009-09-17 Gonzalo Paniagua Javier <[email protected]>
* DirectoryInfo.cs: throw if FullPath is not a directory.
	Fixes bug #539791.


svn path=/branches/mono-2-4/mcs/; revision=142093
2009-09-17 04:36:26 +00:00
Zoltan Varga 278d6d40a5 Add missing change.
svn path=/branches/mono-2-4/mono/; revision=142031
2009-09-16 11:54:59 +00:00
Zoltan Varga 8b60910a83 2009-09-16 Zoltan Varga <[email protected]>
* mini-exceptions.c (mono_handle_exception_internal): Store the computed
	lmf before calling filter clauses as well. Fixes #539550.

	* exceptions.cs: Add a test.

svn path=/branches/mono-2-4/mono/; revision=142030
2009-09-16 11:54:50 +00:00
Gonzalo Paniagua Javier b30dd568ff 2009-09-15 Gonzalo Paniagua Javier <[email protected]>
* System.Net.Configuration/DefaultProxyHandler.cs:
	* System.Net/WebRequest.cs: handle upper and lowercase HTTP_PROXY and
	the Any address.
	Fixes bug #537283.


svn path=/branches/mono-2-4/mcs/; revision=141982
2009-09-15 18:48:01 +00:00
Marek Habersack 3d48cc55b6 Backport of r141962
svn path=/branches/mono-2-4/mcs/; revision=141963
2009-09-15 13:04:31 +00:00
Marek Habersack 9f1c47e243 Backport of r137829. Fixes bug #538588
svn path=/branches/mono-2-4/mcs/; revision=141955
2009-09-15 12:52:51 +00:00
Jonathan Pryor 0cb84def78 * DeflateStream.cs: MonoTouch reverse callbacks need to be static
methods and be annotated with [MonoPInvokeCallback].  Get things
	  working with these limitations.

svn path=/branches/mono-2-4/mcs/; revision=141912
2009-09-14 20:18:09 +00:00
Jonathan Pryor f083fccb3c * zlib-helper.c: support reverse callbacks within MonoTouch.
svn path=/branches/mono-2-4/mono/; revision=141911
2009-09-14 20:17:49 +00:00
Ivan Zlatev 293a7967ef 2009-09-14 Ivan Zlatev <[email protected]>
* DesignSurface.cs: Prevent a NRE in Flush by cheching if the
	designer loader is null.
	[Fixes bug #538929]

svn path=/branches/mono-2-4/mcs/; revision=141889
2009-09-14 12:24:08 +00:00
Gonzalo Paniagua Javier e43e0f6ae8 from trunk
svn path=/branches/mono-2-4/mcs/; revision=141865
2009-09-13 03:33:53 +00:00
Gonzalo Paniagua Javier e12ba9fbad from trunk
svn path=/branches/mono-2-4/mcs/; revision=141864
2009-09-13 03:33:28 +00:00
Gonzalo Paniagua Javier 5b0a0ac34f 2009-09-12 Gonzalo Paniagua Javier <[email protected]>
* AsyncResult.cs: lock when setting the 'completed' field and use the
	property instead of the 'handle' field.


svn path=/branches/mono-2-4/mcs/; revision=141861
2009-09-13 02:49:06 +00:00
Gonzalo Paniagua Javier eba4f9caee 2009-09-12 Gonzalo Paniagua Javier <[email protected]>
* domain.c:
	* object.c:
	* class-internals.h: renamed waithandle_class to
	manualresetevent_class.
	* marshal.c: propagate the exception if a remoting BeginInvoke call
	fails.


svn path=/branches/mono-2-4/mono/; revision=141857
2009-09-13 02:37:40 +00:00
Ivan Zlatev b86c1617bc 2009-09-11 Ivan N. Zlatev <[email protected]>
* PropertyGrid.cs: Hide the splitter when the help is hidden.

svn path=/branches/mono-2-4/mcs/; revision=141749
2009-09-11 12:23:39 +00:00
Ivan Zlatev 9eb14cc8cb 2009-09-11 Ivan N. Zlatev <[email protected]>
* InternalWindowManager.cs: Call Invalidate-Update instead of
	Refresh for MS compitability. Note also that Refresh is virtual
	and several controls override it in order to provide data refresh
	functionallity on top of the redraw and they do not expect this
	extra refresh call.
	* Control.cs: In Refresh Invalidate the control and all children
	insead of calling Refresh for each of them.
	[Fixes bug #538336]

svn path=/branches/mono-2-4/mcs/; revision=141745
2009-09-11 11:20:13 +00:00
Ivan Zlatev 8589323c4a 2009-09-11 Ivan N. Zlatev <[email protected]>
* PropertyGrid.cs: Always set the help panel properties on the
	internal control, because they are inherited and can change with
	the parent.
	[Fixes bug #525305]

svn path=/branches/mono-2-4/mcs/; revision=141734
2009-09-11 09:09:16 +00:00
Ivan Zlatev 1908a25c17 2009-09-10 Ivan N. Zlatev <[email protected]>
* DocumentDesigner.cs: Changing the ISelectionService at run time was a
	bad idea, so wrap it inside the extended UISelectionService instead.

svn path=/branches/mono-2-4/mcs/; revision=141682
2009-09-10 14:08:47 +00:00
Ivan Zlatev fc2812368a 2009-09-10 Ivan N. Zlatev <[email protected]>
* DesignSurface.cs: Provide the default implementation of the
	ISelectionService in the DesignSurface service container.
	* DocumentDesigner.cs: If there is already a ISelectionService registered
	in the ServiceContainer but it's not an IUISelectionService (WinForms
	specific) then replace it with one.
	[Fixes bug #538037]

svn path=/branches/mono-2-4/mcs/; revision=141681
2009-09-10 14:08:18 +00:00
Ankit Jain 351ec10054 Update xbuild and Microsoft.Build.* from trunk.
In class/Microsoft.Build.Engine/Test/various:

	* Items.cs (TestItems2a):
	(TestInheritedMetadataFromItemRefs):
	(TestInheritedMetadataFromItemRefs2):
	(TestMetadataFromItemReferences): New.

2009-09-08  Ankit Jain  <[email protected]>

	* Items.cs (TestItems5):
	(TestItems6): Remove 'NotWorking' attribute.

In class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine:

	* BuildItem.cs (Evaluate): Metadata from "Include" should be,
	preserved, so use ConvertTo ITaskItem, rather than string.
	Ensure that the new items have the metadata from references _in_
	Include, and the metadata of _this_ builditem.
	* DirectoryScanner.cs (Includes): Change to a array of ITaskItem.
	(MatchedFilenames): Rename to ..
	(MatchedItems): .. this, and change type of array of ITaskItem.
	Ensure that metadata of items in Includes are retained in the
	final matched items.

	* BuildItemGroup.cs (ConvertoToITaskItemArray): Add 'separator'
	param. If separator is present, then just return a "Join'ed"
	string as the single task item.
	* ItemReference.cs: Track api changes.

	* BuildProperty.cs (ConvertToITaskItemArray): Split the value,
	as we need separate task items.

In class/Microsoft.Build.Utilities/Mono.XBuild.Utilities:

	* ReservedNameUtils.cs (RelativeDir): Add a trailing \ .

In class/Microsoft.Build.Utilities/Microsoft.Build.Utilities:

	* ToolTask.cs (LogEventsFromTextOutput): Log message even if its not
	identified as an error or a warning.


svn path=/branches/mono-2-4/mcs/; revision=141670
2009-09-10 09:27:01 +00:00
Veerapuram Varadhan 682c395762 ** Fixes #510176
* DataView.cs (OnRowChanged/OnRowDeleted): Raise appropriate events iff
        view is affected. This silence of the numerous Add/Change events that were
        getting raised from DataView.
        (ToTable): Use appropriate index to generated DataTable in case of
        RowFilter / Sort conditions.

        * DataRow.cs (AcceptChanges/RejectChanges): Raise appropriate Changing events

svn path=/branches/mono-2-4/mcs/; revision=141655
2009-09-10 01:25:05 +00:00
Veerapuram Varadhan bb15ce3116 backport of fix for #510176
svn path=/branches/mono-2-4/mcs/; revision=141654
2009-09-10 01:24:37 +00:00
Marek Habersack ab3c27ce28 Backport of r141630
svn path=/branches/mono-2-4/mcs/; revision=141631
2009-09-09 19:50:36 +00:00
Ivan Zlatev cd18c9de77 2009-09-09 Ivan N. Zlatev <[email protected]>
* ParentControlDesigner.cs, ControlDesigner.cs, UISelectionService.cs,
	IUISelectionService.cs: Support IToolboxService control creation via
	point-(resize)-click.
	[Fixes part of bug #537604]

svn path=/branches/mono-2-4/mcs/; revision=141613
2009-09-09 14:40:45 +00:00
Gonzalo Paniagua Javier 8899c62e31 Fixing the cygwin build: the saga continues
svn path=/branches/mono-2-4/mono/; revision=141611
2009-09-09 14:24:14 +00:00
Marek Habersack f036434968 Backport of r141509
svn path=/branches/mono-2-4/mcs/; revision=141510
2009-09-08 11:49:07 +00:00
Marek Habersack 0cd66271d8 Backport of r141504
svn path=/branches/mono-2-4/mcs/; revision=141505
2009-09-08 11:25:35 +00:00
Marek Habersack 7429294094 Backport of r141474
svn path=/branches/mono-2-4/mcs/; revision=141475
2009-09-08 00:13:22 +00:00
Marek Habersack c4cb4f6992 Backport of r141471
svn path=/branches/mono-2-4/mcs/; revision=141472
2009-09-07 22:22:44 +00:00
Marek Habersack 23c2378d8c Backport of r141424
svn path=/branches/mono-2-4/mcs/; revision=141425
2009-09-07 11:57:37 +00:00
Marek Habersack c7d989bf2a Backport of r141422
svn path=/branches/mono-2-4/mcs/; revision=141423
2009-09-07 11:19:30 +00:00
Marek Habersack db8656e6e7 Backport of r141420
svn path=/branches/mono-2-4/mcs/; revision=141421
2009-09-07 11:09:01 +00:00
Ivan Zlatev a6cbff7505 2009-09-07 Ivan N. Zlatev <[email protected]>
* DesignSurface.cs: Don't be so strict and allow for the users
	to get the View even if the DesignSurface wasn't properly initialized
	with a DesignerLoader. MS compatibility.
	[Fixes bug #537131]

svn path=/branches/mono-2-4/mcs/; revision=141407
2009-09-07 08:06:02 +00:00
Zoltan Varga b13da3b3ba 2009-09-05 Zoltan Varga <[email protected]>
* handles.c (_wapi_handle_real_new): Call _wapi_process_reap () when running
	out of shared handes. Fixes #536776.

svn path=/branches/mono-2-4/mono/; revision=141383
2009-09-05 18:25:35 +00:00
Zoltan Varga 87fa06efa1 2009-09-05 Zoltan Varga <[email protected]>
* processes.c (CreateProcess): Return false and set the error to
	ERROR_OUTOFMEMORY when a process handle cannot be created.
	(ShellExecuteEx): Propagate an ERROR_OUTOFMEMORY error code. Fixes part of
	#536776.

svn path=/branches/mono-2-4/mono/; revision=141382
2009-09-05 18:25:27 +00:00
Marek Habersack efe201ceed Backport of r141370
svn path=/branches/mono-2-4/mcs/; revision=141371
2009-09-04 21:38:48 +00:00
Gonzalo Paniagua Javier 6c2dd6d31c 2009-09-04 Gonzalo Paniagua Javier <[email protected]>
* threadpool.c: make the Sleep() alertable to prevent delays exiting
	applications that take less than 2s to execute.
	Bug #524984 fixed.


svn path=/branches/mono-2-4/mono/; revision=141364
2009-09-04 20:35:33 +00:00
Miguel de Icaza 16c4da9313 2009-09-04 Miguel de Icaza <[email protected]>
* TermInfoDriver.cs: Handle a few more key combinations.

svn path=/branches/mono-2-4/mcs/; revision=141361
2009-09-04 19:14:01 +00:00
Gonzalo Paniagua Javier 069b92a2c2 2009-09-04 Gonzalo Paniagua Javier <[email protected]>
* WebConnection.cs: if the request has already finished reading, don't
	throw ObjectDisposedException here, just return as if nothing
	happened. Fixes bug #312968.


svn path=/branches/mono-2-4/mcs/; revision=141348
2009-09-04 17:35:24 +00:00
Gonzalo Paniagua Javier 2ae6966e02 2009-09-04 Gonzalo Paniagua Javier <[email protected]>
* WebConnection.cs: if the request has already finished reading, don't
	throw ObjectDisposedException here, just return as if nothing
	happened. Fixes bug #312968.


svn path=/branches/mono-2-4/mcs/; revision=141347
2009-09-04 17:35:13 +00:00
Marek Habersack 698bfe6353 Backport of r141339
svn path=/branches/mono-2-4/mcs/; revision=141340
2009-09-04 16:09:38 +00:00
Ivan Zlatev 8e3fdb8590 2009-09-03 Ivan N. Zlatev <[email protected]>
* DataColumnPropertyDescriptor.cs, DataView.cs: Not browsable if Hidden.
	[Fixes the second part of bug #536547]

svn path=/branches/mono-2-4/mcs/; revision=141276
2009-09-03 18:21:15 +00:00
Ivan Zlatev 9cd9c6af8b 2009-09-03 Ivan N. Zlatev <[email protected]>
* BindingSource.cs: Implement support for chained data sources.
	* ListBindingHelper.cs: Add support for ICurrencyManagerProvider and
	clean up.
	[Fixes part of bug #536547]

svn path=/branches/mono-2-4/mcs/; revision=141275
2009-09-03 18:18:44 +00:00
Zoltan Varga f3bf41421e 2009-09-03 Zoltan Varga <[email protected]>
* pinvoke3.cs libtest.c: Add a test for #481559.

svn path=/branches/mono-2-4/mono/; revision=141271
2009-09-03 18:00:09 +00:00
Zoltan Varga 40b393c746 2009-09-03 Zoltan Varga <[email protected]>
* marshal.c (emit_marshal_array): Call conv.ovf.i on the array parameter
	argument, since NEWARR expects a native int. Fixes #481559.

svn path=/branches/mono-2-4/mono/; revision=141270
2009-09-03 18:00:02 +00:00
Marek Habersack a888b77b83 Backport of r141245
svn path=/branches/mono-2-4/mcs/; revision=141246
2009-09-03 13:13:54 +00:00
Marek Habersack 8753eae5f1 Backport of r141220
svn path=/branches/mono-2-4/mcs/; revision=141222
2009-09-03 09:58:00 +00:00
Ivan Zlatev 0e112ac750 2009-09-02 Ivan N. Zlatev <[email protected]>
* Backport DataGridView and PropertyGrid bug fixes.

svn path=/branches/mono-2-4/mcs/; revision=141171
2009-09-02 19:25:32 +00:00
Gonzalo Paniagua Javier 910a785863 2009-09-01 Gonzalo Paniagua Javier <[email protected]>
* DB2CLIWrapper.cs: changed libname to 'db2'. Use 'int' instead of
	'IntPtr' for most of the SQL handles. Only SQLPOINTER is 64 bits in
	64-bit machines.


svn path=/branches/mono-2-4/mcs/; revision=141089
2009-09-01 21:48:43 +00:00
Zoltan Varga 78e2d6976e 2009-09-01 Zoltan Varga <[email protected]>
* exceptions-x86.c (throw_exception): Fix the previous change by substracting
	the alignment for the value of sp.

svn path=/branches/mono-2-4/mono/; revision=141070
2009-09-01 20:33:30 +00:00
Ankit Jain 08cf01009d Update xbuild and Microsoft.Build.* from trunk.
In class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks:

	* TaskBatchingTest.cs: Add new tests for metadata refs found
	in places other than task attributes.

In class/Microsoft.Build.Tasks/Microsoft.Build.Tasks:

	* ResolveAssemblyReference.cs (ResolveReference): targetFrameworkDirectories
	can be null.

In class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine:
2009-09-01  Ankit Jain  <[email protected]>

	Fix bug #534965.
	* Project.cs (BuildTarget): Move caching of target outputs to ..
	* Target.cs: .. here. Move LogTargetSkipped also here.
	Ensure that caching happens for target dependencies also.

2009-09-01  Ankit Jain  <[email protected]>

	* DirectoryScanner.cs (Scan): Ignore empty entries in includes and
	excludes.

2009-09-01  Ankit Jain  <[email protected]>

	* Expression.cs (ParseOptions): New enum. Replace the bool params
	of exression.Parse with this. Add option to control expansion of
	metadata references.
	(CopyToExpressionCollection): Track api changes.
	
	Update all expr.Parse calls to use the new enum.
	* BuildItem.cs, BuildProperty.cs, BuildTask.cs, Import.cs,
	Target.cs, TargetBatchingImpl.cs, UsingTask.cs: Track api changes.

	* BatchingImplBase.cs: Track api changes. Allow metadata refs
	in task attributes.
	* ConditionFactorExpression.cs: Allow metadata refs in conditions.
	* ItemReference.cs: Allow metadata in transforms.
	* TaskEngine.cs: Allow metadata refs.

	* MetadataReference.cs (.ctor): Add a 'original string' param.

svn path=/branches/mono-2-4/mcs/; revision=141066
2009-09-01 19:33:27 +00:00
Marek Habersack 7dbb8723c1 Backport of r141062
svn path=/branches/mono-2-4/mcs/; revision=141063
2009-09-01 19:25:27 +00:00
Raja R Harinath c1a902e73a Fix #533572
* Uri.cs (ParseNoExceptions): Don't look for '@' in absolute unix paths.

2009-09-01  Andres Aragoneses  <[email protected]>
	* UriTest.cs: New tests from #533572.

(backported from trunk r141020)

svn path=/branches/mono-2-4/mcs/; revision=141052
2009-09-01 15:55:55 +00:00
Zoltan Varga da98f87d31 2009-09-01 Zoltan Varga <[email protected]>
* processes.c (EnumProcessModules): Applied patch from Romain Tartière
	([email protected]). Fix this on freebsd/OSX. Fixes #533893.

svn path=/branches/mono-2-4/mono/; revision=140995
2009-09-01 00:15:47 +00:00
Zoltan Varga 329e4b82d3 2009-08-31 Zoltan Varga <[email protected]>
* exceptions-x86.c (get_throw_exception): Align the stack on osx.

svn path=/branches/mono-2-4/mono/; revision=140990
2009-08-31 21:21:06 +00:00
Gonzalo Paniagua Javier 3e86cd37a9 2009-08-31 Gonzalo Paniagua Javier <[email protected]>
* CustomizableFileSettingsProvider.cs: reset the property value
	instead of using the DefaultValue.
	* SettingsPropertyValue.cs: new Reset() method.
	* ApplicationSettingsBase.cs: Reset happens in Reload().
	Patch by Andrew Kurochka that fixes bug #532180.


svn path=/branches/mono-2-4/mcs/; revision=140951
2009-08-31 09:21:20 +00:00
Gonzalo Paniagua Javier b04e945cd4 2009-08-29 Gonzalo Paniagua Javier <[email protected]>
* WebConnection.cs: HEAD response does not have a body even if the
	response is an error. Fixes buf #535102.


svn path=/branches/mono-2-4/mcs/; revision=140924
2009-08-29 21:09:29 +00:00
Zoltan Varga 3ae3f5b5ed 2009-07-13 Zoltan Varga <[email protected]>
* method-to-ir.c (mono_method_to_ir): When calling a gshared method,
	call a generic class init trampoline if needed. Fixes #519336.

	* generics.cs: Add a test.

svn path=/branches/mono-2-4/mono/; revision=140919
2009-08-29 13:20:16 +00:00
Ankit Jain ceffbf33f1 Update xbuild and Microsoft.Build.* from trunk.
In class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks:

	* CopyTest.cs (TestCopy_EmptySources): New.
	(TestCopy_EmptyDestFolder): New.

In class/Microsoft.Build.Tasks/Microsoft.Build.Tasks:

	* AssignCulture.cs, AssignTargetPath.cs,
	CallTarget.cs, CombinePath.cs, Copy.cs,
	CreateItem.cs, CreateManifestResourceName.cs,
	Delete.cs, Error.cs, FindUnderPath.cs,
	GenerateResource.cs, MSBuild.cs, MakeDir.cs,
	Message.cs, RemoveDir.cs, RemoveDuplicates.cs,
	ResolveAssemblyReference.cs, Touch.cs,
	WriteLinesToFiles.cs: Add null checks and array
	length checks.

In class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine:

	* BuildItemTest.cs (TestSetMetadata5a): New.
	* ProjectTest.cs: Add tests for different property types
	with required attribute. Also, check the values - null or
	empty array.
	* TestTasks.cs: Add new tasks for above.

In class/Microsoft.Build.Engine/Test/various:

	* Items.cs: Add tests for property/item evaluation.

In class/Microsoft.Build.Engine/Test/resources:

	* TestTasks.cs: Add new tasks for different property types
	with required attribute. Also, emit whether the value was
	null or a zero length array.

In class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine:

	* Expression.cs (ExpressionOptions): New.

	Introduce a ExpressionOptions argument to all ConvertTo*
	methods. Implement the rule: in evaluation phase, expand
	all items completely, but dont expand item refs in properties.
	At other times, expand the item refs in the properties.
	See comments in Expression.cs, for a full explanation.
	* BuildItem.cs: Track api changes.
	* BuildItemGroup.cs: Likewise.
	* BuildProperty.cs: Track api changes. Handle self-references.
	* BuildTask.cs: Track api changes.
	* IReference.cs: Add ExpressionOptions param.
	* ItemReference.cs: Track api changes.
	* PropertyReference.cs: Likewise.
	* MetadataReference.cs: Likewise.
	* ExpressionCollection.cs: Track api changes. Add support for
	converting all primitive types and DateTime, instead of a fixed
	few.
	* Project.cs (GetMetadataBatched): Use the evaluated metadata.
	* TaskBatchingImpl.cs: Handle the case when batching is required,
	but no items are available.

	* TaskEngine.cs: Throw on unsupported types. Correctly handle
	properties in case of empty values.


svn path=/branches/mono-2-4/mcs/; revision=140914
2009-08-28 22:06:17 +00:00
Zoltan Varga e35e4fb469 2009-08-28 Zoltan Varga <[email protected]>
* marshal.c (cominterop_get_ccw): Applied patch from tom hindle
	<[email protected]>. Add locking around hash table accesses.

svn path=/branches/mono-2-4/mono/; revision=140844
2009-08-27 23:44:32 +00:00
Marek Habersack ba63c00a5d Backport of r140786
svn path=/branches/mono-2-4/mcs/; revision=140789
2009-08-27 11:08:00 +00:00
Ankit Jain f70fa401ce Update xbuild and Microsoft.Build.* from trunk.
In tools/xbuild:
	* xbuild/Microsoft.Common.targets: Remove dummy
	@(_TargetPathItem), since we support item refs with transforms
	as a property value.

2009-08-26  Ankit Jain  <[email protected]>

In class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks:
	* CreateItemTest.cs (TestVariableExpansion): Update test to
	use a transform with a item reference in a property.

2009-08-26  Ankit Jain  <[email protected]>

In class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine:
	* Expression.cs: Correctly handle a item reference with transform
	when allowItems is false. If item ref is ignored, then the transform
	will get incorrectly matched as a metadata ref.
	* ItemReference.cs (.ctor): Add a @original_string param.

2009-08-26  Ankit Jain  <[email protected]>

	* Utilities.cs (UnescapeFromXml): New. From md.
	* BuildProperty.cs (.ctor): Unescape xml codes from the InnerXml
	of the property element.

2009-08-26  Ankit Jain  <[email protected]>


svn path=/branches/mono-2-4/mcs/; revision=140705
2009-08-26 11:33:54 +00:00
Ankit Jain 5e6b4037c4 Update xbuild and Microsoft.Build.* from trunk.
In tools/xbuild:
2009-08-26  Ankit Jain  <[email protected]>

	Fix bug #533903.
	* xbuild/Microsoft.Common.targets: Support building projects
	directly from command line. Builds referenced projects. Honors
	$(BuildingSolutionFile) and $(BuildingInsideVisualStudio) now.
	Also, clean referenced projects.

In class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks:
2009-08-26  Ankit Jain  <[email protected]>

	* CreateItemTest.cs (TestVariableExpansion): New.
	* CreatePropertyTest.cs (TestExecution2): New.

2009-08-24  Ankit Jain  <[email protected]>

	* CreateCSharpManifestResourceNameTest.cs:
	* CreateVisualBasicManifestResourceNameTest.cs: Add tests for
	folder name with spaces in it.

In class/Microsoft.Build.Tasks/Microsoft.Build.Tasks:
2009-08-24  Ankit Jain  <[email protected]>

	* LibraryPcFileCache.cs: New. From monodevelop.
	* PcFileCache.cs: Update from monodevelop, see r140528.
	* AssemblyResolver.cs: Track api changes.

2009-08-24  Ankit Jain  <[email protected]>

	* CreateManifestResourceName.cs (GetResourceIdFromFileName): Spaces
	in folder names should be converted to '_'.

In class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine:
2009-08-26  Ankit Jain  <[email protected]>

	* BuildProperty.cs (ConvertToString): New.
	(ConvertoToITaskItemArray): New. Parse the property value.
	* PropertyReference.cs (ConvertToString): Use BuildProperty's
	ConvertToString.
	(ConvertoToITaskItemArray): Likewise.	


svn path=/branches/mono-2-4/mcs/; revision=140680
2009-08-26 00:06:27 +00:00
Gonzalo Paniagua Javier fe0873a801 new test. generics+fetchmovenext
svn path=/branches/mono-2-4/mcs/; revision=140630
2009-08-25 15:01:50 +00:00
Gonzalo Paniagua Javier b578d313e0 2009-08-25 Gonzalo Paniagua Javier <[email protected]>
* statement.cs: avoid nullref when the return value of GetEnumerator()
	does not contain any MoveNext() method.


svn path=/branches/mono-2-4/mcs/; revision=140629
2009-08-25 15:01:26 +00:00
Marek Habersack ec76144667 Backport of r140611
svn path=/branches/mono-2-4/mcs/; revision=140612
2009-08-25 11:23:04 +00:00
Veerapuram Varadhan 50e39d0c1f 2009-08-25 Veerapuram Varadhan <[email protected]>
* Fixes **522465 - based on the work by [email protected]
	* Tds70.cs (FormatParameter): For double, use "round-trip" format
	specifier in order to be sure of a successful conversion.

svn path=/branches/mono-2-4/mcs/; revision=140609
2009-08-25 11:03:08 +00:00
Veerapuram Varadhan da2e4417d4 2009-08-25 Veerapuram Varadhan <[email protected]>
* DataViewManager.cs (CollectionToListChangeEventArgs) : Use IsAssignableFrom
	instead of type comparison.

svn path=/branches/mono-2-4/mcs/; revision=140598
2009-08-25 09:36:34 +00:00
Veerapuram Varadhan 853b049a2a 2009-08-25 Veerapuram Varadhan <[email protected]>
** Fixes #521951
	* DataViewManager.cs (CollectionToListChangeEventArgs) : Use a corresponding
	DataTable/DataRelation obj instead of only DataRelation.

svn path=/branches/mono-2-4/mcs/; revision=140595
2009-08-25 09:06:38 +00:00
Gonzalo Paniagua Javier 0391b8ea28 fix take 2
svn path=/branches/mono-2-4/mono/; revision=140534
2009-08-24 18:35:07 +00:00
Gonzalo Paniagua Javier c88c25fed9 fix packaging
svn path=/branches/mono-2-4/mono/; revision=140516
2009-08-24 15:26:17 +00:00
Gonzalo Paniagua Javier ea6ef4b6dc 2009-08-23 Gonzalo Paniagua Javier <[email protected]>
* deflate.c:
	* gzio.c:
	* deflate.h:
	* zutil.h:
	* crc32.c:
	* trees.c:
	* zconf.h:
	* inffast.c:
	* compress.c:
	* zlib.h:
	* inftrees.c:
	* inflate.c:
	* inflate.h:
	* adler32.c:
	* infback.c: updated to 1.2.3.3


svn path=/branches/mono-2-4/mono/; revision=140454
2009-08-23 06:15:10 +00:00
Marek Habersack b1420abfcf Backport of r140438
svn path=/branches/mono-2-4/mcs/; revision=140439
2009-08-21 20:56:12 +00:00
Marek Habersack e0cfae9c2c Backport of r140394
svn path=/branches/mono-2-4/mcs/; revision=140395
2009-08-21 00:41:56 +00:00
Ankit Jain 6187128f80 Backport r140383 from trunk.
* Makefile.am (man_MANS): Add xbuild.1
* xbuild.1: New.

svn path=/branches/mono-2-4/mono/; revision=140384
2009-08-20 22:32:02 +00:00
Marek Habersack d4884b7805 Backport of r140375
svn path=/branches/mono-2-4/mcs/; revision=140376
2009-08-20 21:08:01 +00:00
Marek Habersack 7c050f04f7 Backport of r140371
svn path=/branches/mono-2-4/mcs/; revision=140372
2009-08-20 21:03:33 +00:00
Ankit Jain 138daf5918 Update xbuild and Microsoft.Build.* from trunk.
In tools/xbuild:
2009-08-21  Ankit Jain  <[email protected]>

	Fix bug #531926
	* xbuild/Microsoft.Common.targets: Add $(ConfigurationName)
	and $(PlatformName) default values.
	Move CoreCompile to a Compile target with corresponding
	Before/After hooks and *DependsOn.
	Add Pre/PostBuildEvents handling.

2009-08-20  Ankit Jain  <[email protected]>

	Fix bug #532264.
	* Main.cs: Dont generate .sln.proj, project.Load can handle
	.sln directly now. Show stack trace for exceptions if logger
	verbosity is > normal
	* SolutionParser.cs (ParseSolution): Add a param for a raise
	warning delegate. Use Dictionary.TryGetValue, key might not
	be present.

2009-08-20  Ankit Jain  <[email protected]>

	* xbuild/Microsoft.Common.targets (ResolveReferences*): Add
	a *DependsOn property and Before/After hooks. Change output
	of ResolvedFiles to @(ReferencePath).
	* xbuild/Microsoft.CSharp.targets (Csc): Use @(ReferencePath)
	for references.

2009-08-19  Ankit Jain  <[email protected]>

	* xbuild/Microsoft.Common.targets (ResolveAssemblyReference):
	Make SearchPaths get value from a property (AssemblySearchPaths)
	to allow it to be overridden.

2009-08-18  Ankit Jain  <[email protected]>

	* SolutionParser.cs (ParseSolution): Project reference in a project
	file, but not found in .sln file is ignored. Also, add dependencies
	specified in the .sln file.

In class/Microsoft.Build.Tasks/Microsoft.Build.Tasks:
2009-08-18  Ankit Jain  <[email protected]>

	* TaskLoggingHelperExtensios.cs (.ctor): Mark internal.

2009-08-18  Ankit Jain  <[email protected]>

	* PcFileCache.cs (PackageInfo): Mark internal.

2009-08-18  Ankit Jain  <[email protected]>

	* AssemblyResolver.cs (FindInTargetFramework): Perform case insensitive
	assembly name comparison. Use the new AssemblyNamesCompatible api.
	(AssemblyNamesCompatible): Add new overload with a 'ignoreCase' param.

2009-08-17  Ankit Jain  <[email protected]>

	* AssemblyResolver.cs (TargetFrameworkAssemblies..ctor): Make assembly
	name lookups for target framework assemblies, case insensitive. Helps
	with cases like "System.configuration", which vs.net is known to emit.

In class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine:
2009-08-18  Ankit Jain  <[email protected]>

	* ProjectTest.cs (TestCaseSensitivityOfProjectElements): New.

In class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine:
2009-08-21  Ankit Jain  <[email protected]>

	* Engine.cs (EndProjectBuild): Use the @succeeded argument
	instead of hardcoding 'true'.
	* Target.cs (Build): Add an overload to return executeOnErrors
	value for the target executed. If building dependencies fails,
	and executeOnErrors is true, then execute OnError tasks.
	Add the new param to ..
	(BuildDependencies): this, ..
	(DoBuild): and this.
	(GetDependencies): Improve error message and variable name.
	(ExecuteOnErrors): Honor OnError tag's Condition also.
	* TaskBatchingImpl.cs (Run): Correctly set executeOnErrors param.

2009-08-20  Ankit Jain  <[email protected]>

	Fix bug #532264
	* Project.cs (Load): Add support for loading .sln files.

2009-08-20  Ankit Jain  <[email protected]>

	* BuildTask.cs (Execute): Use task_logger only after the task
	has been initialized. Catch and report task loading errors.
	* Target.cs (DoBuild): Dont rethrow the exception, and emit
	the stacktrace as a low importance message.

2009-08-18  Ankit Jain  <[email protected]>

	* BatchingImplBase.cs: Make the item name lookups and metadata be case
	insensitive.
	* TaskDatabase.cs: Likewise.
	* TaskEngine.cs: Make property name looks, case insensitive.

In class/Microsoft.Build.Engine:
2009-08-20  Ankit Jain  <[email protected]>

	* Microsoft.Build.Engine.dll.sources: Add tools/xbuild/SolutionParser.cs


svn path=/branches/mono-2-4/mcs/; revision=140370
2009-08-20 20:59:55 +00:00
Sebastien Pouliot 990f18df7a In System.Net.Mail:
2009-08-20  Sebastien Pouliot  <[email protected]>

	* SmtpClient.cs: Honor ServicePointManager.
	ServerCertificateValidationCallback when provided
	[Backport r140347]

In System.Net.Security:
2009-08-20  Sebastien Pouliot  <[email protected]>

	* SslStream.cs : Always use/provide a X509Chain even if this 
	duplicates some of the old/existing logic of Mono.Security.
	This makes it possible to provide a callback using 
	ServicePointManager.ServerCertificateValidationCallback
	[Backport r140359]


svn path=/branches/mono-2-4/mcs/; revision=140363
2009-08-20 18:38:57 +00:00
Sebastien Pouliot 3626f07f77 2009-08-20 Sebastien Pouliot <[email protected]>
* TlsServerCertificate.cs: If no usage information is available then
	assume it's ok for SSL since we'll (later) check that the CN contains
	a host name (that match the server) and such a certificate wouldn't
	be much useful for anything but SSL/TLS. Fix the new stmp.gmail.com
	certificate usage failure.
	[Backport r140358]


svn path=/branches/mono-2-4/mcs/; revision=140360
2009-08-20 18:31:32 +00:00
Marek Habersack 2d4bf4b1f2 Added system.web.mvc.pc
svn path=/branches/mono-2-4/mono/; revision=140306
2009-08-19 23:09:20 +00:00
Marek Habersack e56346c970 Backport of r140299
svn path=/branches/mono-2-4/mcs/; revision=140300
2009-08-19 22:34:27 +00:00
Marek Habersack 90ab18c9f5 Backport r140273
svn path=/branches/mono-2-4/mcs/; revision=140274
2009-08-19 18:37:45 +00:00
Mark Probst 32c24f276d 2009-08-19 Mark Probst <[email protected]>
* generic-sharing.c: Replace the templates lock with the loader
	lock because of very hard to resolve deadlock issues.

	Backport of r139118.

svn path=/branches/mono-2-4/mono/; revision=140272
2009-08-19 18:15:21 +00:00
Marek Habersack 49e8adee21 Backport of r140213
svn path=/branches/mono-2-4/mcs/; revision=140215
2009-08-18 23:57:02 +00:00
Marek Habersack 0775a3b406 Backport of r140161
svn path=/branches/mono-2-4/mcs/; revision=140162
2009-08-18 13:32:27 +00:00
Marek Habersack 00647205a3 Backport of r140098
svn path=/branches/mono-2-4/mcs/; revision=140100
2009-08-17 20:44:43 +00:00
Marek Habersack bd54877408 Backport of r140004
svn path=/branches/mono-2-4/mcs/; revision=140005
2009-08-15 02:24:29 +00:00
Marek Habersack bd6fbcdc07 Backport of r139989
svn path=/branches/mono-2-4/mcs/; revision=139990
2009-08-15 00:33:18 +00:00
Marek Habersack bb1b7defd7 Backport of r139969
svn path=/branches/mono-2-4/mcs/; revision=139970
2009-08-14 21:39:25 +00:00
Marek Habersack ff93796eaa Unbreak the build
svn path=/branches/mono-2-4/mcs/; revision=139967
2009-08-14 21:23:41 +00:00
Ankit Jain 2b0ce0ec3c Update xbuild from trunk.
In tools/xbuild:
	Fix bug #530368.
	* SolutionParser.cs (AddProjectTargets): If a project name matches one
	of the targets that we emit (Build/Clean etc), then rename to
	"Solution:<project name>".

2009-08-14  Ankit Jain  <[email protected]>

	* xbuild/Microsoft.Common.targets (AllowUnsafeBlocks): Don't set any
	default value.
	(OutputPath): Set a default value.
	(DeployOutputFiles): Copy only if something available to copy.

2009-08-14  Ankit Jain  <[email protected]>

	* SolutionParser.cs (ProjectInfo.Dependencies): Change to a dictionary
	to keep track of corresponding ProjectInfo objects.
	(ParseSolution): Refactor to populate the ProjectInfo.Dependencies
	dictionary. Use AddBuildLevels to emit build levels to allow
	parallel builds.
	(AddProjectTargets): Dependency's projectInfo is directly available now.
	(AddBuildLevels): New. Emit items named BuildLevelN, where each level
	has projects that can be built in parallel. Lower levels represent
	dependencies for higher levels.
	(AddSolutionTargets): Instead of using CallTarget, directly use MSBuild
	task with the new BuildLevelN stuff. Also tell the user about disabled
	projects or missing project configs.
	(TopologicalSort): New.
	(Insert): New. Based on code from monodevelop.

In tools/xbuild/tests:

	* standalone/Project01: Update .sln.proj file.


svn path=/branches/mono-2-4/mcs/; revision=139956
2009-08-14 18:10:16 +00:00
Ankit Jain 51eab20b95 Update xbuild and Microsoft.Build.* from trunk.
In tools/xbuild:
2009-08-14  Ankit Jain  <[email protected]>

	* xbuild/Microsoft.Common.targets (ResolveAssemblyReference): Add
	'{PkgConfig}' to SearchPaths.

2009-07-31  Ankit Jain  <[email protected]>

	* ErrorUtilities.cs (ShowUsage): Implement.

2009-07-30  Ankit Jain  <[email protected]>

	Fix bug #484771.
	* xbuild/Microsoft.Common.targets (ResolveAssemblyReference): Add support
	for $(OutDir).

2009-07-30  Ankit Jain  <[email protected]>

	* ErrorUtilities.cs: Set version to Consts.MonoVersion .

2009-07-30  Ankit Jain  <[email protected]>

	* xbuild/Microsoft.Common.targets (ResolveAssemblyReference): Output
	ResolvedFiles to @(ReferencePath), required for IDE integration.

2009-07-30  Ankit Jain  <[email protected]>

	* xbuild/Microsoft.Common.targets: Implement 'Clean' target. Currently
	just handles clean for a full build.

2009-07-28  Ankit Jain  <[email protected]>

	* xbuild/Microsoft.Common.targets: Add missing 'SkipUnchangedFiles=true'
	for the Copy tasks.
	(CopyDeployFiles*): Fix typos, Add inputs/outputs for the
	PreserveNewest case and remove for copy always case.

2009-07-23  Ankit Jain  <[email protected]>

	* xbuild/Microsoft.Common.targets: Oops, forgot to remove some
	debug stuff.

2009-07-23  Ankit Jain  <[email protected]>

	* Makefile: Create a lib/mono/xbuild directory for xbuild
	extensions.

2009-07-23  Ankit Jain  <[email protected]>

	* xbuild/Microsoft.Common.targets (AssignProjectConfigurations): New.
	(ResolveProjectReferences): Add dependency on AssignProjectConfigurations
	target. Also, set the config and platform properties for the msbuild task
	being invoked.
	* xbuild/Microsoft.Common.tasks: Add AssignProjectConfiguration .

2009-07-22  Ankit Jain  <[email protected]>

	* xbuild/Microsoft.VisualBasic.targets (Vbc.References): Remove
	"@(ChildProjectReferences)" as it gets resolved earlier
	and is part of @(ResolvedFiles).

2009-07-22  Ankit Jain  <[email protected]>

	* xbuild.Microsoft.CSharp.targets (Csc.References): Remove
	"@(ChildProjectReferences)" as it gets resolved earlier
	and is part of @(ResolvedFiles).

In tools/xbuild/tests:
2009-07-30  Ankit Jain  <[email protected]>

	* standalone/Project01/final-outputs.txt: Update to include obj/
	dir also, and sort the list.

2009-07-23  Ankit Jain  <[email protected]>

	* standalone/Project01: Change config mappings a bit to mix them up,
	like Debug->Release etc. Update .proj file and final-outputs.txt.

2009-07-22  Ankit Jain  <[email protected]>

	* standalone/Project01: Add references to two "external" assemblies
	with dependencies.
	* standalone/Project01/Program.cs: Add references in code to the new
	assemblies, to ensure that they are required for compilation.

In class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks:
2009-07-23  Ankit Jain  <[email protected]>

	* AssignProjectConfigurationTest.cs: New.

In class/Microsoft.Build.Tasks/Microsoft.Build.Tasks:
2009-08-14  Ankit Jain  <[email protected]>

	* PcFileCache.cs: New. From monodevelop.
	* AssemblyResolver.cs (ResolvePkgConfigReference): New. Use PcFileCache
	to resolve assembly references.
	(AssemblyNamesCompatible): If SpecificVersion is false, then compare
	only simple names.
	(GetResolvedReference): Rename default_value to default_copy_local_value.
	(Cache): New.
	(PcFileCacheContext): New.
	(SearchPath): Add 'PkgConfig' to the enum.
	* ResolveAssemblyReference.cs: Add support for '{PkgConfig}'. Update
	messages.
	* ResolvedReference.cs (FoundInSearchPathToString): Create from ..
	(FoundInSearchPathAsString): .. this. Change this to a property to
	allow custom "found in .. " messages.

2009-07-31  Ankit Jain  <[email protected]>

	* MSBuild.cs (Execute): Log error if the file doesn't exist.

2009-07-30  Ankit Jain  <[email protected]>

	* ResolvedReference.cs (.ctor): Set 'OriginalItemSpec' and 'ResolvedFrom',
	required for IDE integration.
	* AssemblyResolver.cs (GetResolvedReference): All the original metadata
	should be retained. Track api changes.

2009-07-30  Ankit Jain  <[email protected]>

	* ReadLinesFromFile.cs (Execute): Log a warning instead of an error
	if unable to read from the file. Fix a null check. Always return
	true.

2009-07-30  Ankit Jain  <[email protected]>

	* Delete.cs (Execute): Log a message when deleting a file.

2009-07-28  Ankit Jain  <[email protected]>

	* Exec.cs (AddCommandLineCommands): First word from @command is treated
	as exec name, and rest as arguments. Extract arguments here.
	(ExecuteTool): Don't ignore params.
	(GenerateFullPathToTool): Extract first word as tool name.
	(HandleTaskExecutionErrors): Honor IgnoreExitCode property.
	(LogEventsFromTextOutput): Log as messages.
	* ManagedCompiler.cs (HandleTaskExecutionErrors): Implement.

2009-07-23  Ankit Jain  <[email protected]>

	* AssignProjectConfiguration.cs (Execute): Implement.

2009-07-22  Ankit Jain  <[email protected]>

	Fix bug #517974.
	* ResolvedReference.cs (AssemblyName): New.
	(IsPrimary): New. Primary (eg. specified in the project file) or
	dependent reference.
	(FoundInSearchPathAsString): New.
	* AssemblyResolver.cs (GetResolvedReference): Add a 'assembly name'
	param for the new field in ResolvedReference.
	(AssemblyNamesCompatible): Fix the check for public key token.
	Track api changes.

	* ResolveAssemblyReference.cs: Keep track of resolved assemblies,
	prevent duplicate references and other files.
	Process dependencies after resolving all the primary references.
	Search for dependencies in parent assembly's dir first and then
	the specified search paths.
	Detect assembly version conflicts and try to resolve.
	Improve logged messages.
	(PrimaryReference): New.
	(ResolveAssemblyReferenceHelper.AddUniqueFile): New extension method.

2009-07-16  Ankit Jain  <[email protected]>

	Fix bug #519922.

	* AssemblyResolver.cs (FindInDirectory): Try the @reference as a
	filename as it is, or with different @file_extensions.
	If @reference is a assembly name, then look for *.@file_extensions
	for target assembly.
	(GetAssemblyNameFromFile): Log FileNotFoundException and BadImageFormatException
	separately, instead of a single unclear message.

	Change all uses of Assembly.GetAssemblyName with GetAssemblyNameFromFile
	which does the required error checking and logging.

In class/Microsoft.Build.Tasks:
2009-08-14  Ankit Jain  <[email protected]>

	* Microsoft.Build.Tasks_test.dll.sources: Added
	PcFileCache.cs from md.

2009-07-23  Ankit Jain  <[email protected]>

	* Microsoft.Build.Tasks_test.dll.sources: Added
	AssignProjectConfigurationTest.cs .

2009-07-22  Ankit Jain  <[email protected]>

	* Makefile: Add System.Core .

	* Microsoft.Build.Tasks.dll.sources: Added
In class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine:
2009-07-30  Ankit Jain  <[email protected]>

	* EngineTest.cs (TestNewProject): Disable. Invalid for
	v3.5 profile.

In class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine:
2009-08-09  Miguel de Icaza  <[email protected]>

	* ConsoleLogger.cs: Change the format of the error and warnings
	strings to work when invoked inside Emacs by not rendering the
	column if available, by using lowercase "error"/"warning" strings
	instead of camelcased versions and to not have unnecessary padding.

2009-07-31  Ankit Jain  <[email protected]>

	* ConsoleLogger.cs: Keep track of all the errors and warnings
	and show them at the end.

2009-07-31  Ankit Jain  <[email protected]>

	* Target.cs (Build): Log a message if a target is skipped.
	(LogMessage): New.
	* BuildTask.cs (Execute): Log error if task execution fails.

2009-07-30  Ankit Jain  <[email protected]>

	* Engine.cs (.ctor): Set default BinPath. Currently this assumes
	v2.0, this will change when multi-targeting lands.

2009-07-30  Ankit Jain  <[email protected]>

	* Project.cs (InitializeProperties) Set 'MSBuildProjectFile' and
	'MSBuildProjectName' properties.

2009-07-28  Ankit Jain  <[email protected]>

	* TaskEngine.cs (Prepare): Fix formatting mistake.
	* ConsoleLogger.cs: Emit "-- FAILED" also when project/target building
	fails. Also, emit result of project at Normal verbosity level.

2009-07-23  Ankit Jain  <[email protected]>

	Fix bug #511370.
	* Project.cs (ExtensionsPath): New.
	(InitializeProperties): Set "MSBuildExtensionsPath" property.

In class/Microsoft.Build.Utilities/Microsoft.Build.Utilities:
2009-07-28  Ankit Jain  <[email protected]>

	* ToolTask (.ctor): Initialize Timeout value.
	(Execute): Use HandleTaskExecutionErrors to determine task result. Set
	exitCode to the result of ExecuteTool and let HandleTaskExecutionErrors
	determine final result of the task.
	(RealExecute): Rename to ..
	(ExecuteTool): .. this. @responseFileCommands could be empty.
	Use specified timeout value for the executing tool.
	Rename 'compilerOutput' to 'toolOutput'. Cleanup resources in the
	finally block. Move processing of stdout/stderr output to ..
	(ProcessOutputFile): .. here and ..
	(LogEventsFromTextOutput): .. here.
	(HandleTaskExecutionErrors): Implement.
	(DeleteTempFile): Implement.


svn path=/branches/mono-2-4/mcs/; revision=139900
2009-08-14 09:49:54 +00:00
Marek Habersack 3e0d55f180 Backport of r139895
svn path=/branches/mono-2-4/mcs/; revision=139896
2009-08-14 02:01:41 +00:00
Gonzalo Paniagua Javier 46d3bf0620 2009-08-13 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs:
	* WebConnectionStream.cs: if there's an error writing the headers from
	a buffered request, propagate the error instead of hiding it and
	causing a different one later (ie, ObjectDisposedException instead of
	the original WebException). This happened when posting without
	Content-Length set to an HTTPS url without validating the server
	certificate.


svn path=/branches/mono-2-4/mcs/; revision=139884
2009-08-13 22:12:13 +00:00
Marek Habersack d79b1c65cc Backport of r139819
svn path=/branches/mono-2-4/mcs/; revision=139820
2009-08-12 23:51:43 +00:00
Rodrigo Kumpera d795c91e8c 2009-08-12 Rodrigo Kumpera <[email protected]>
Backport of r139815.

	* class.c: Add mono_class_get_field_from_name_full which does
	the same as mono_class_get_field_from_name but does check field
	signature as well.

	* class-internals.h: Export mono_class_get_field_from_name_full as
	part of the internal API.

	* loader.c (field_from_memberref): Search fields by name and signature
	as it's valid to have two fields with same name but different types.

	Fixes #528055.


svn path=/branches/mono-2-4/mono/; revision=139817
2009-08-12 23:49:50 +00:00
Marek Habersack 206b9c748f 2009-08-12 Marek Habersack <[email protected]>
* BuildManager.cs: show source code when an error occurs while
	compiling a page. Fixes bug #518987

svn path=/branches/mono-2-4/mcs/; revision=139801
2009-08-12 21:22:50 +00:00
Gonzalo Paniagua Javier 59d29f7965 2009-08-11 Gonzalo Paniagua Javier <[email protected]>
* DefaultWsdlHelpGenerator.aspx: the 'Message Layout' can now handle
	self-referencing types. Fixes bug #529353.


svn path=/branches/mono-2-4/mono/; revision=139713
2009-08-11 15:09:15 +00:00
Zoltan Varga b7cde18842 2009-08-04 Zoltan Varga <[email protected]>
* threads.c (thread_cleanup): Free serialized_ui_culture_info. Fixes
	#527902.

svn path=/branches/mono-2-4/mono/; revision=139357
2009-08-04 17:10:48 +00:00
Gonzalo Paniagua Javier 7c08ae3796 2009-08-03 Gonzalo Paniagua Javier <[email protected]>
* Attachment.cs: set the body encoding for multipart attachments.
	Fixes bug #527177.


svn path=/branches/mono-2-4/mcs/; revision=139279
2009-08-03 12:48:18 +00:00
Miguel de Icaza 0ed9444c6c Backport
svn path=/branches/mono-2-4/mcs/; revision=139264
2009-08-03 04:46:36 +00:00
Zoltan Varga d3ff7b42d1 2009-06-29 Zoltan Varga <[email protected]>
* threads.c: Store the thread start argument in a hash table instead of
	registering it as a root, as libgc doesn't support unregistering roots
	under windows, leading to 'too many root sets' errors when many threads
	are created.

svn path=/branches/mono-2-4/mono/; revision=139249
2009-08-01 19:26:14 +00:00
Zoltan Varga 674c2367c3 2009-07-31 Zoltan Varga <[email protected]>
* mini-sparc.c (mono_arch_output_basic_block): Implement OP_IREM_UN_IMM.

svn path=/branches/mono-2-4/mono/; revision=139170
2009-07-31 12:25:13 +00:00
Gonzalo Paniagua Javier 573c9348cf 2009-07-30 Gonzalo Paniagua Javier <[email protected]>
* HttpResponseWrapper.cs: removed a few TODO/NotImplemented.
	Fixes bug #526297.


svn path=/branches/mono-2-4/mcs/; revision=139123
2009-07-30 21:20:40 +00:00
Gonzalo Paniagua Javier 6094a0ffec backport form head. Missing APIs
svn path=/branches/mono-2-4/mcs/; revision=139113
2009-07-30 19:13:39 +00:00
Veerapuram Varadhan 94b6b1bc60 backport of r139086
svn path=/branches/mono-2-4/mcs/; revision=139099
2009-07-30 17:03:27 +00:00
Gonzalo Paniagua Javier 616bef98a5 2009-07-23 Gonzalo Paniagua Javier <[email protected]>
* BuildManager.cs: precompilation setup failed if the precompiled
	virtual directory was / and it was deployed somewhere else.


svn path=/branches/mono-2-4/mcs/; revision=139094
2009-07-30 15:56:53 +00:00
Zoltan Varga 9bd18e4aea 2009-07-30 Zoltan Varga <[email protected]>
* icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle_type): Fix the second argument, its a MonoType* not a MonoClass*.

svn path=/branches/mono-2-4/mono/; revision=139056
2009-07-30 11:23:40 +00:00
Gonzalo Paniagua Javier f9c9d9dbb9 fix 2.4 build
svn path=/branches/mono-2-4/mcs/; revision=138894
2009-07-28 22:59:00 +00:00
Mike Gorse e0c4e94f21 * ToolStripMenuItem.cs: Added UIA CheckOnClickChanged event.
svn path=/branches/mono-2-4/mcs/; revision=138875
2009-07-28 20:31:42 +00:00
Gert Driesen fd31b849d6 * SqlCommand.cs: Ensure connection is closed if CloseConnection
behavior is set, and reader could not be created.

Backport of r138854.

svn path=/branches/mono-2-4/mcs/; revision=138857
2009-07-28 17:52:14 +00:00
Gonzalo Paniagua Javier e0eef10421 2009-07-28 Gonzalo Paniagua Javier <[email protected]>
* WebClient.cs: rethrow WebExceptions instead of creating a new one
	with less information on the actual error.
	Fixes bug #526069.


svn path=/branches/mono-2-4/mcs/; revision=138856
2009-07-28 17:26:54 +00:00
Gonzalo Paniagua Javier 1aadace24e 2009-07-28 Gonzalo Paniagua Javier <[email protected]>
* HttpApplicationFactory.cs: allow subclasses of EventHandler for
	event handlers in global.asax.
	Fixes bug #525743.


svn path=/branches/mono-2-4/mcs/; revision=138785
2009-07-28 04:55:23 +00:00
Gonzalo Paniagua Javier cdfc702947 2009-07-27 Gonzalo Paniagua Javier <[email protected]>
* ArrayTest.cs: new LastIndexOf test for 0-length arrays.


svn path=/branches/mono-2-4/mcs/; revision=138736
2009-07-27 15:35:45 +00:00
Gonzalo Paniagua Javier e8ed358a30 2009-07-27 Gonzalo Paniagua Javier <[email protected]>
* Array.cs: empty arrays just return -1 in LastIndexOf().


svn path=/branches/mono-2-4/mcs/; revision=138734
2009-07-27 15:35:35 +00:00
Gonzalo Paniagua Javier 1bc6720528 2009-07-26 Gonzalo Paniagua Javier <[email protected]>
* StringBuilder.cs: small fixes dealing with _maxCapacity.


svn path=/branches/mono-2-4/mcs/; revision=138693
2009-07-26 17:08:13 +00:00
Gonzalo Paniagua Javier d854f3be68 2009-07-26 Gonzalo Paniagua Javier <[email protected]>
* StringBuilderTest.cs: new overflow tests.


svn path=/branches/mono-2-4/mcs/; revision=138689
2009-07-26 16:27:10 +00:00
Gonzalo Paniagua Javier 399ae27f73 2009-07-26 Gonzalo Paniagua Javier <[email protected]>
* StringBuilder.cs: small fixes dealing with _maxCapacity.


svn path=/branches/mono-2-4/mcs/; revision=138687
2009-07-26 16:26:58 +00:00
Veerapuram Varadhan 3ba32cd6d5 2009-07-24 Veerapuram Varadhan <[email protected]>
* DbCommandBuilder.cs (CreateDeleteCommand, CreateUpdateCommand): Add the
	nullcheck-param into the respective command's parameter list.  Fixes
	build breaks.  Individual provider's CommandBuilder classes from 2.0
	profile onwards use the base version of methods to maintain these commands.
	(Get*Command): Cleanup code duplication
	* DbDataAdapter (Update): Use SourceColumnNullMapping property to handle
	nullcheckparams.  Fixes #522624.  Patch by
	Gert Driesen  <[email protected]>.

svn path=/branches/mono-2-4/mcs/; revision=138679
2009-07-25 19:29:54 +00:00
Gonzalo Paniagua Javier 9c95ff041e 2009-07-25 Gert Driesen <[email protected]>
* TdsConnectionPool.cs: Fixed typo in ResetConnectionPool.


svn path=/branches/mono-2-4/mcs/; revision=138675
2009-07-25 15:53:22 +00:00
Gonzalo Paniagua Javier 84a1884f8c revert 138475, which comes from trunk 138474
svn path=/branches/mono-2-4/mcs/; revision=138658
2009-07-24 22:15:10 +00:00
Gonzalo Paniagua Javier c4aaad7b61 2009-07-23 Gonzalo Paniagua Javier <[email protected]>
* BuildManager.cs: precompilation setup failed if the precompiled
	virtual directory was / and it was deployed somewhere else.


svn path=/branches/mono-2-4/mcs/; revision=138577
2009-07-23 17:45:36 +00:00
Gonzalo Paniagua Javier bb3c634493 location,location,location. Fixes all the tests I broke last night
svn path=/branches/mono-2-4/mcs/; revision=138530
2009-07-23 11:53:32 +00:00
Marek Habersack 39d244c682 backport of r138521
svn path=/branches/mono-2-4/mcs/; revision=138522
2009-07-23 10:17:24 +00:00
Gonzalo Paniagua Javier 00e941b7c9 2009-07-23 Gonzalo Paniagua Javier <[email protected]>
* WebConfigurationManager.cs: avoid possible infinite loop when the
	path starts with ~ and 1 file check.


svn path=/branches/mono-2-4/mcs/; revision=138494
2009-07-23 05:01:10 +00:00
Gonzalo Paniagua Javier 876455a97f 2009-07-23 Gonzalo Paniagua Javier <[email protected]>
* LogicalMethodInfo.cs: add CacheDuration property.
	* WebServiceHandlerFactory.cs: use CacheDuration.
	Fixes bug #524460.

svn path=/branches/mono-2-4/mcs/; revision=138493
2009-07-23 04:23:42 +00:00
Gonzalo Paniagua Javier aeeed3c166 2009-07-22 Gonzalo Paniagua Javier <[email protected]>
* WebHeaderCollectionTest.cs: test for allowed characters in headers.


svn path=/branches/mono-2-4/mcs/; revision=138488
2009-07-23 02:57:48 +00:00
Gonzalo Paniagua Javier e21f310e63 2009-07-22 Gonzalo Paniagua Javier <[email protected]>
* WebHeaderCollection.cs: check the validity of the characters in the
	header names.


svn path=/branches/mono-2-4/mcs/; revision=138486
2009-07-23 02:57:29 +00:00
Marek Habersack 2424262095 Backport of r138474
svn path=/branches/mono-2-4/mcs/; revision=138475
2009-07-22 23:41:52 +00:00
Gonzalo Paniagua Javier d7bbe940a5 Implement the 2.0 IsRestricted and add tests
svn path=/branches/mono-2-4/mcs/; revision=138473
2009-07-22 23:29:22 +00:00
Gonzalo Paniagua Javier dc76cc02dd 2009-07-22 Gonzalo Paniagua Javier <[email protected]>
* WebConnectionStream.cs: when sending a 0-length POST, ignore further
	writes instead of throwing.
	Fixes bug #524049.


svn path=/branches/mono-2-4/mcs/; revision=138448
2009-07-22 19:58:54 +00:00
Marek Safar 4ee08ed8c9 2009-07-22 Marek Safar <[email protected]>
A fix for bug #522789
	* expression.cs: Mutate invocation return type.


svn path=/branches/mono-2-4/mcs/; revision=138376
2009-07-22 09:44:14 +00:00
Gonzalo Paniagua Javier 2c3994bcb7 2009-07-21 Gonzalo Paniagua Javier <[email protected]>
* zlib-helper.c: use glib for malloc/free.


svn path=/branches/mono-2-4/mono/; revision=138311
2009-07-21 16:22:59 +00:00
Gonzalo Paniagua Javier 5d8603eae4 moved
svn path=/branches/mono-2-4/mcs/; revision=138303
2009-07-21 15:31:06 +00:00
Gonzalo Paniagua Javier 1b6d2776a4 do not nullify deflateStream
svn path=/branches/mono-2-4/mcs/; revision=138302
2009-07-21 15:29:37 +00:00
Marek Habersack 73479cb494 Backport of r138280
svn path=/branches/mono-2-4/mcs/; revision=138281
2009-07-21 11:25:06 +00:00
Gonzalo Paniagua Javier b5061c30a2 2009-07-21 Gonzalo Paniagua Javier <[email protected]>
* zlib-helper.c: don't try to finish the z_stream if it has not been
	used. This fixes all the tests after the latest change.


svn path=/branches/mono-2-4/mono/; revision=138273
2009-07-21 10:36:48 +00:00
Gonzalo Paniagua Javier ab16a347cc free internal buffer
svn path=/branches/mono-2-4/mono/; revision=138260
2009-07-21 05:42:32 +00:00
Gonzalo Paniagua Javier e3ad351fa1 2009-07-20 Gonzalo Paniagua Javier <[email protected]>
* Makefile.am: replaced zlib_macros.c with zlib-helper.c
	* zlib_macros.c: Removed file.
	* zlib-helper.c: new interface for DeflateStream. Flush() actually
	does something.


svn path=/branches/mono-2-4/mono/; revision=138255
2009-07-21 02:25:02 +00:00
Gonzalo Paniagua Javier c537d30347 2009-07-20 Gonzalo Paniagua Javier <[email protected]>
* GzipStream.cs: fixed Dispose (bool).
	* DeflateStream.cs: simplify the interface with unmanaged code, big
	reduction of managaed<->unmanaged round trips.
	Also fixes bug #523418.


svn path=/branches/mono-2-4/mcs/; revision=138253
2009-07-21 02:24:55 +00:00
Sebastien Pouliot 957e4684e6 2009-07-20 Sebastien Pouliot <[email protected]>
* Aes.cs: Use the fully qualified name since this is not a type known
	in the default corlib (2.0 or 1.x).
	[Fix bug #523687]
	[Backport r138249]


svn path=/branches/mono-2-4/mcs/; revision=138250
2009-07-21 01:00:53 +00:00
Marek Habersack d24266c32a Backport of r138246
svn path=/branches/mono-2-4/mcs/; revision=138247
2009-07-20 23:32:57 +00:00
Jb Evain 0a4d0b5165 2009-07-20 Jb Evain <[email protected]>
backport of 138194.

	* Lookup.cs: avoid a double dictionary lookup on the indexer.


svn path=/branches/mono-2-4/mcs/; revision=138195
2009-07-20 06:22:07 +00:00
Gonzalo Paniagua Javier 6b57f740b5 2009-07-19 Gonzalo Paniagua Javier <[email protected]>
* Lookup.cs: when there are no matching elements, return an empty
	enumerable. Fixes bug #523386.


svn path=/branches/mono-2-4/mcs/; revision=138191
2009-07-20 02:45:53 +00:00
Marek Habersack b0e1b2be21 Backport of r138177
svn path=/branches/mono-2-4/mcs/; revision=138178
2009-07-18 13:05:26 +00:00
Gonzalo Paniagua Javier ebb27c3fd0 2009-07-17 Gonzalo Paniagua Javier <[email protected]>
* ConfigurationElement.cs: don't skip xml nodes when reading 2
	ConfigurationElement in a row. Patch by Greg Smolyn that fixes bug
	#521231.


svn path=/branches/mono-2-4/mcs/; revision=138143
2009-07-17 17:59:28 +00:00
Gonzalo Paniagua Javier 1c34793a7f 2009-07-17 Gonzalo Paniagua Javier <[email protected]>
* mono-proclib.c: fix reading processor usage for a process. Patch
	from Jacob Gladish that fixes bug #523052.


svn path=/branches/mono-2-4/mono/; revision=138139
2009-07-17 17:40:50 +00:00
Marek Habersack 2c4687c08d 2009-07-17 Marek Habersack <[email protected]>
* System.Web.Mvc/DefaultModelBinder.cs: applied workaround for gmcs
	bug which is fixed in trunk but not in the 2.4 branch(es)

svn path=/branches/mono-2-4/mcs/; revision=138087
2009-07-16 23:15:24 +00:00
Marek Safar 612aef0246 2009-07-16 Marek Safar <[email protected]>
A fix for bug #521671
	* statement.cs: Fixed crash when checking missing type.


svn path=/branches/mono-2-4/mcs/; revision=138059
2009-07-16 15:56:44 +00:00
Gonzalo Paniagua Javier 0f84640ef5 2009-07-15 Gonzalo Paniagua Javier <[email protected]>
* Font.cs: implement OriginalFontName.


svn path=/branches/mono-2-4/mcs/; revision=138011
2009-07-16 03:30:23 +00:00
Gonzalo Paniagua Javier 3781da0980 2009-07-15 Gonzalo Paniagua Javier <[email protected]>
* AuthorizationSection.cs:
	* HttpHandlerAction.cs:
	* GlobalizationSection.cs: synch with HEAD.


svn path=/branches/mono-2-4/mcs/; revision=138007
2009-07-15 22:30:58 +00:00
Gonzalo Paniagua Javier b8966a7ed4 2009-07-15 Gonzalo Paniagua Javier <[email protected]>
* mono-proclib.c: fixed setting the NUL terminator.
	Thanks to Jacob Gladish.


svn path=/branches/mono-2-4/mono/; revision=137999
2009-07-15 20:28:29 +00:00
Sebastien Pouliot 635e2fc913 2009-07-15 Sebastien Pouliot <[email protected]>
* gdipFunctions.cs: Fix XVisualIDFromVisual to return an IntPtr
	since 64 bits X servers will return a 64 bits value.
	* gdipStructs.cs: Fix XVisualInfo to use IntPtr on fields that
	are 64 bits on 64 bits X servers.
	* Graphics.cs: Adjust CopyFromScreenX11 to work with IntPtr so the
	screenshot code can work on both 32 and 64 bits X servers.
	[Fix bug #521718]
	[Backport r137982]


svn path=/branches/mono-2-4/mcs/; revision=137983
2009-07-15 19:01:57 +00:00
Marek Habersack ab9c32b4e1 Backport of r137951
svn path=/branches/mono-2-4/mcs/; revision=137952
2009-07-15 13:22:58 +00:00
Gonzalo Paniagua Javier 9a5d861d6a fix changelog
svn path=/branches/mono-2-4/mcs/; revision=137922
2009-07-15 01:15:42 +00:00
Gonzalo Paniagua Javier f15b7a858f 2009-07-14 Gonzalo Paniagua Javier <[email protected]>
* SortedListTest.cs: new tests by Kevin Fitzgerald.


svn path=/branches/mono-2-4/mcs/; revision=137920
2009-07-15 01:09:16 +00:00
Gonzalo Paniagua Javier a3521904ec 2009-07-14 Gonzalo Paniagua Javier <[email protected]>
* SortedList.cs: same issue as bug #521750 in System.


svn path=/branches/mono-2-4/mcs/; revision=137919
2009-07-15 01:07:50 +00:00
Gonzalo Paniagua Javier 275793d7df 2009-07-14 Gonzalo Paniagua Javier <[email protected]>
* SortedListTest.cs: new tests for bug #521750 provided by
	Kevin Fitzgerald.


svn path=/branches/mono-2-4/mcs/; revision=137917
2009-07-15 01:05:19 +00:00
Gonzalo Paniagua Javier 586f1289f9 2009-07-14 Gonzalo Paniagua Javier <[email protected]>
* SortedList.cs: the IComparar.Compare arguments were reversed.
	Fixes bug #521750. Patch by Kevin Fitzgerald.


svn path=/branches/mono-2-4/mcs/; revision=137915
2009-07-15 01:02:37 +00:00
Gonzalo Paniagua Javier 4270529da1 2009-07-14 Gonzalo Paniagua Javier <[email protected]>
* ApplicationShutdownReason.cs: add new 3.5 value.
	* ParserErrorCollection.cs: add setter for ParserError.
	Patch from Daniel Gagne.


svn path=/branches/mono-2-4/mcs/; revision=137912
2009-07-15 00:28:20 +00:00
Gonzalo Paniagua Javier 2266042e07 2009-04-24 Gonzalo Paniagua Javier <[email protected]>
* StreamReader.cs: if Peek() needs to block, do it.
	Fixes bug #496905.


svn path=/branches/mono-2-4/mcs/; revision=137910
2009-07-15 00:25:15 +00:00
Gonzalo Paniagua Javier 105b39d758 fix the 2.1 build. this is not needed in HEAD
svn path=/branches/mono-2-4/mcs/; revision=137900
2009-07-14 21:42:18 +00:00
Sebastien Pouliot 7449a342c8 Security fix for CVE-2009-0217
svn path=/branches/mono-2-4/mcs/; revision=137887
2009-07-14 18:45:25 +00:00
Marek Habersack 919ded1f52 Backport of r137847
svn path=/branches/mono-2-4/mcs/; revision=137848
2009-07-14 11:25:08 +00:00
Zoltan Varga 956abe426e 2009-07-14 Zoltan Varga <[email protected]>
* Changelog: Rename this to ChangeLog.

	* Mono.Simd/Mono.Simd/ArrayExtensions.cs: Don't ignore the 'offset'
	parameter in the GetVector () methods. Fixes #521692.

svn path=/branches/mono-2-4/mcs/; revision=137826
2009-07-13 22:11:17 +00:00
Zoltan Varga 7e09f29b2c 2009-07-13 Zoltan Varga <[email protected]>
* x86/x86-codegen.h: Applied patch from Marian Salaj <[email protected]>.
	Fix encoding of PMINSW and PMINSD. Fixes #521662.

svn path=/branches/mono-2-4/mono/; revision=137823
2009-07-13 22:03:10 +00:00
Marek Habersack 7839f0a3d9 Backport of r137811
svn path=/branches/mono-2-4/mcs/; revision=137812
2009-07-13 19:52:35 +00:00
Gonzalo Paniagua Javier 44f1d7c11b bunch'o'fixes from HEAD
svn path=/branches/mono-2-4/mcs/; revision=137802
2009-07-13 18:24:09 +00:00
Gonzalo Paniagua Javier b3145390c3 System.Net.NetworkInformation from HEAD
svn path=/branches/mono-2-4/mcs/; revision=137761
2009-07-13 04:30:11 +00:00
Miguel de Icaza 2c9c8cf28b Found with Umbraco, this method ignores null pages
svn path=/branches/mono-2-4/mcs/; revision=137745
2009-07-11 16:57:01 +00:00
Gonzalo Paniagua Javier edf8cc6b3b 2009-07-10 Gonzalo Paniagua Javier <[email protected]>
* ProcessStartInfo.cs: HaveEnvVars is enabled by just using the
	EnvironmentVariables property. Bug #520650 fixed.


svn path=/branches/mono-2-4/mcs/; revision=137731
2009-07-10 20:54:32 +00:00
Gonzalo Paniagua Javier 1289d18334 2009-07-10 Gonzalo Paniagua Javier <[email protected]>
* SimpleWorkerRequest.cs: move this back to an instance property.
	Cache works now.


svn path=/branches/mono-2-4/mcs/; revision=137728
2009-07-10 20:01:40 +00:00
Gonzalo Paniagua Javier 5dd2fe1d27 2009-07-10 Gonzalo Paniagua Javier <[email protected]>
* X509Chain.cs: revert my last change here since it caused 2 tests to
	fail.


svn path=/branches/mono-2-4/mcs/; revision=137695
2009-07-10 15:51:33 +00:00
Gonzalo Paniagua Javier 1b0b12052b 2009-07-10 Gonzalo Paniagua Javier <[email protected]>
* WebClient.cs: implement GetWebRequest and GetWebResponse. Use them
	instead of SetupRequest and ProcessResponse.


svn path=/branches/mono-2-4/mcs/; revision=137674
2009-07-10 05:45:16 +00:00
Gonzalo Paniagua Javier 6663f8ab74 2009-07-09 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequestTest.cs: use different ports for different tests since
	the shutdown might take a little bit and tests might conflict.


svn path=/branches/mono-2-4/mcs/; revision=137668
2009-07-10 03:21:49 +00:00
Gonzalo Paniagua Javier 965b6a0867 ignore test that fails on windows
svn path=/branches/mono-2-4/mcs/; revision=137666
2009-07-09 23:07:24 +00:00
Jb Evain e67f9aeb4b 2009-07-09 Jb Evain <[email protected]>
backport of 137653.

	* HashSet.cs (ICollection<T>.Add): fix for bug #520760. Do not throw
	when adding duplicates.


svn path=/branches/mono-2-4/mcs/; revision=137654
2009-07-09 19:13:14 +00:00
Gonzalo Paniagua Javier c1d691e94c fix the build
svn path=/branches/mono-2-4/mcs/; revision=137651
2009-07-09 18:37:32 +00:00
Mark Probst 51a8a75d34 2009-07-09 Mark Probst <[email protected]>
* method-to-ir.c: When doing a call which might be remote from
        shared generic code to other shared code with open type arguments,
        abort generic code sharing for that method.

2009-07-09  Mark Probst  <[email protected]>

        Backport of r137640.

        * generic-xdomain.2.cs: Test case for generic marshal-by-ref
        objects.

        * Makefile.am: Test added.

svn path=/branches/mono-2-4/mono/; revision=137649
2009-07-09 18:36:26 +00:00
Gonzalo Paniagua Javier 32d474db42 2009-07-09 Gonzalo Paniagua Javier <[email protected]>
* HttpContext.cs:
	* HttpRuntime.cs:
	* HttpApplication.cs: backported from HEAD.


svn path=/branches/mono-2-4/mcs/; revision=137639
2009-07-09 17:18:37 +00:00
Gonzalo Paniagua Javier 1edafae0a9 2009-07-09 Gonzalo Paniagua Javier <[email protected]>
* SqliteMembershipProvider.cs:
	* UrlAuthorizationModule.cs: use GetSection instead of
	OpenWebConfiguration+GetSection.


svn path=/branches/mono-2-4/mcs/; revision=137637
2009-07-09 17:13:36 +00:00
Gonzalo Paniagua Javier 944f74919d 2009-07-09 Gonzalo Paniagua Javier <[email protected]>
* SimpleWorkerRequest.cs: store the root web configuration path in a
	static variable.


svn path=/branches/mono-2-4/mcs/; revision=137635
2009-07-09 17:11:32 +00:00
Gonzalo Paniagua Javier 68ae8327c1 2009-07-09 Gonzalo Paniagua Javier <[email protected]>
* WebConfigurationManager.cs: when caching configuration and sections,
	use the configuration file directory instead of the incoming request
	path.


svn path=/branches/mono-2-4/mcs/; revision=137633
2009-07-09 17:10:09 +00:00
Marek Habersack 14075fef49 Backport of r137624
svn path=/branches/mono-2-4/mcs/; revision=137625
2009-07-09 13:01:20 +00:00
Gonzalo Paniagua Javier 7d84067545 prefer MonoIOMAP directive over MONO_IOMAP, update version, fix long line
svn path=/branches/mono-2-4/mono/; revision=137593
2009-07-09 02:37:23 +00:00
Gonzalo Paniagua Javier 6b808b14e5 fix changelog
svn path=/branches/mono-2-4/mcs/; revision=137578
2009-07-08 17:41:10 +00:00
Gonzalo Paniagua Javier b3cc50725a 2009-04-04 Gonzalo Paniagua Javier <[email protected]>
* AssemblyResourceLoader.cs: MS sets cacheability to public. Add
	Last-Modified header and return 304 if validating max-age=0 or
	If-Modified-Since succeeds.


svn path=/branches/mono-2-4/mcs/; revision=137577
2009-07-08 17:36:02 +00:00
Gonzalo Paniagua Javier cf8349e093 from HEAD
svn path=/branches/mono-2-4/mcs/; revision=137503
2009-07-07 15:10:58 +00:00
Gonzalo Paniagua Javier ca3dfb6e7f new test
svn path=/branches/mono-2-4/mcs/; revision=137502
2009-07-07 15:10:37 +00:00
Gonzalo Paniagua Javier 516610e2a7 A bunch of changes from HEAD
svn path=/branches/mono-2-4/mcs/; revision=137501
2009-07-07 15:10:19 +00:00
Gonzalo Paniagua Javier 0522647daa 2009-07-07 Gonzalo Paniagua Javier <[email protected]>
* WebClient.cs: set the content length when uploading values. This
	allows reusing the connection.
	* WebConnectionStream.cs: SetHeaders() takes ownership of the buffer
	and does not need to copy it any more. WriteRequest() wasn't always
	setting 'requestWritten' to true.
	* HttpWebRequest.cs: change in SetHeaders call.

2009-07-06  Gert Driesen  <[email protected]>

	* WebConnectionStream.cs: Move and improve argument checks to match MS.
	Modified CanRead and CanWrite to return false when instance is disposed.


svn path=/branches/mono-2-4/mcs/; revision=137498
2009-07-07 14:58:10 +00:00
Gonzalo Paniagua Javier 3a815ed296 2009-07-07 Gonzalo Paniagua Javier <[email protected]>
* ParserError.cs: add 3 missing setters. Patch from Daniel Gagne.


svn path=/branches/mono-2-4/mcs/; revision=137495
2009-07-07 13:20:02 +00:00
Gonzalo Paniagua Javier c3ed87f257 2009-07-06 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequestTest.cs: add tests for POST + redirect and 401.


svn path=/branches/mono-2-4/mcs/; revision=137430
2009-07-06 17:40:29 +00:00
Gonzalo Paniagua Javier b1747ed392 2009-07-02 Gonzalo Paniagua Javier <[email protected]>
* WebConnection.cs: provide better error message when there's an error
	writing.
	* WebConnectionStream.cs: don't nullify the buffer until
	CheckFinalStatus() decides that there are no more authentication
	retries or redirects.


svn path=/branches/mono-2-4/mcs/; revision=137333
2009-07-02 23:03:34 +00:00
Gonzalo Paniagua Javier 46226e08d9 2009-07-02 Gonzalo Paniagua Javier <[email protected]>
* HttpsClientStream.cs: if there's only an ICertificatePolicy and no
	ServerCertificateValicationCallback, don't fail.


svn path=/branches/mono-2-4/mcs/; revision=137330
2009-07-02 22:39:56 +00:00
Marek Habersack 554cf91b02 Put MVC in and backported a small fix for System.Web.Routing/PatternParser.cs (partial backport of r136875)
svn path=/branches/mono-2-4/mcs/; revision=137268
2009-07-02 10:45:42 +00:00
Gonzalo Paniagua Javier fb881c24d6 2009-07-02 Gonzalo Paniagua Javier <[email protected]>
* X509Certificate2.cs:
	* X509Chain.cs: changes to make everything compile with latest changes
	and fixed typo in IsChainComplete().


svn path=/branches/mono-2-4/mcs/; revision=137260
2009-07-02 07:44:16 +00:00
Gonzalo Paniagua Javier 5545ed26aa make it compile
svn path=/branches/mono-2-4/mcs/; revision=137258
2009-07-02 07:42:26 +00:00
Gonzalo Paniagua Javier 298c292712 2009-07-02 Gonzalo Paniagua Javier <[email protected]>
* HttpsClientStream.cs: invoke the ServerCertificateValidationCallback
	in the 2.0 profile. If there's a CertificatePolicy, it is run before
	the 2.0 callback.


svn path=/branches/mono-2-4/mcs/; revision=137256
2009-07-02 07:39:46 +00:00
Gonzalo Paniagua Javier a3e6db2fec 2009-07-02 Gonzalo Paniagua Javier <[email protected]>
* ServicePointManager.cs: implement ServerCertificateValidationCallback.
	* DefaultCertificatePolicy.cs: if there's a SCVC registered, don't do
	normal error checking.a


svn path=/branches/mono-2-4/mcs/; revision=137254
2009-07-02 07:39:42 +00:00
Gonzalo Paniagua Javier 6174678c93 2009-07-02 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: avoid duplicating Accept-Encoding if GetHeaders()
	is called twice.
	* WebConnectionStream.cs: don't send a 0 content length for non-write
	requests.


svn path=/branches/mono-2-4/mcs/; revision=137245
2009-07-02 07:34:54 +00:00
Gonzalo Paniagua Javier 425ac2bc0b 2009-07-02 Gonzalo Paniagua Javier <[email protected]>
* WebConnection.cs: must use the 'int' version in 1.1.


svn path=/branches/mono-2-4/mcs/; revision=137232
2009-07-02 07:23:28 +00:00
Gonzalo Paniagua Javier ab8209aefd 2009-07-01 Gonzalo Paniagua Javier <[email protected]>
* WebConnection.cs:
	* ServicePoint.cs: UseNagleAlgorithm determines NoDelay value.


svn path=/branches/mono-2-4/mcs/; revision=137204
2009-07-01 16:49:39 +00:00
Marek Habersack 6a8e0737c7 Backport of r137137
svn path=/branches/mono-2-4/mcs/; revision=137138
2009-06-30 09:06:49 +00:00
Gonzalo Paniagua Javier 0547139f26 2009-06-11 Gonzalo Paniagua Javier <[email protected]>
* ContentControlBuilderInternal.cs: detect missing
	ContentPlaceHolderID attribute when parsing instead of throwing a
	nullref later on.


svn path=/branches/mono-2-4/mcs/; revision=137118
2009-06-29 22:10:51 +00:00
Gonzalo Paniagua Javier dc5b336d5c 2009-06-29 Gonzalo Paniagua Javier <[email protected]>
* LicenseProviderAttribute.cs: avoid nullref when provider has not
	been set or cannot be loaded.


svn path=/branches/mono-2-4/mcs/; revision=137116
2009-06-29 22:02:44 +00:00
Gonzalo Paniagua Javier b4c3da555a 2009-06-29 Gonzalo Paniagua Javier <[email protected]>
* TemplateControlCompiler.cs: use the 'Empty' field for Unit and
	FontUnit.


svn path=/branches/mono-2-4/mcs/; revision=137114
2009-06-29 22:01:27 +00:00
Gonzalo Paniagua Javier 2252ebd980 increase timeouts to make this work on machines under load
svn path=/branches/mono-2-4/mcs/; revision=137089
2009-06-29 15:52:51 +00:00
Zoltan Varga 6f363241b2 2009-06-29 Zoltan Varga <[email protected]>
* generic-stack-traces.2.cs: Add a test for #509406.

svn path=/branches/mono-2-4/mono/; revision=137084
2009-06-29 15:26:29 +00:00
Zoltan Varga 83905419fe 2009-06-29 Zoltan Varga <[email protected]>
* mini-exceptions.c (get_generic_context_from_stack_frame): Fix the case
	when the generic instance is an instantiation of a subclass of the
	methods class. Fixes #517166.

svn path=/branches/mono-2-4/mono/; revision=137083
2009-06-29 15:26:23 +00:00
Zoltan Varga 07cf6caa94 2009-06-29 Zoltan Varga <[email protected]>
* dynamic-method-finalize.2.cs: New test.

svn path=/branches/mono-2-4/mono/; revision=137078
2009-06-29 13:35:57 +00:00
Zoltan Varga 3b4daee91c 2009-06-29 Zoltan Varga <[email protected]>
* gc.c (mono_gc_run_finalize): Avoid finalizing dynamic methods during
	shutdown, they can still be referenced by the other dying objects.
	Fixes #514506.

svn path=/branches/mono-2-4/mono/; revision=137077
2009-06-29 13:35:50 +00:00
Gonzalo Paniagua Javier 90e9f6fd51 2009-06-28 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequestTest.cs: backport from HEAD.


svn path=/branches/mono-2-4/mcs/; revision=137053
2009-06-28 21:37:52 +00:00
Gonzalo Paniagua Javier 17abd2e3d0 2009-06-28 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: fix 1.1 only test.


svn path=/branches/mono-2-4/mcs/; revision=137047
2009-06-28 07:17:37 +00:00
Gonzalo Paniagua Javier 2c0cf92564 fix timing issue
svn path=/branches/mono-2-4/mcs/; revision=137044
2009-06-28 07:15:36 +00:00
Gonzalo Paniagua Javier 0b13bf1c44 2009-06-28 Gonzalo Paniagua Javier <[email protected]>
* WebConnectionStream.cs: when buffering the response, we have to set
	the internal length and regenerate the headers.


svn path=/branches/mono-2-4/mcs/; revision=137042
2009-06-28 04:03:41 +00:00
Gonzalo Paniagua Javier 901f3434c0 fix test
svn path=/branches/mono-2-4/mcs/; revision=137041
2009-06-28 03:50:48 +00:00
Gonzalo Paniagua Javier 0186ef2418 2009-06-27 Gonzalo Paniagua Javier <[email protected]>
* SocketResponder.cs: the listener might be closed right before
	Accept() is called and in that case we get an EINVAL.
	* WebClientTest.cs: copy WebClientTest from HEAD.


svn path=/branches/mono-2-4/mcs/; revision=137039
2009-06-28 02:34:52 +00:00
Gonzalo Paniagua Javier 85204adb05 2009-06-27 Gonzalo Paniagua Javier <[email protected]>
* WebClient.cs: backported from HEAD.

svn path=/branches/mono-2-4/mcs/; revision=137037
2009-06-28 02:33:21 +00:00
Gonzalo Paniagua Javier 1641f1c5de new test
svn path=/branches/mono-2-4/mcs/; revision=137034
2009-06-27 18:03:41 +00:00
Gonzalo Paniagua Javier 11a703a55a 2009-06-27 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: turn WSAEINVAL into ArgumentException.


svn path=/branches/mono-2-4/mcs/; revision=137032
2009-06-27 18:02:50 +00:00
Gonzalo Paniagua Javier 4f2769ca2a 2009-06-27 Gonzalo Paniagua Javier <[email protected]>
* socket-io.c: DontLinger does not allow LingerOptions.


svn path=/branches/mono-2-4/mono/; revision=137030
2009-06-27 18:01:35 +00:00
Gonzalo Paniagua Javier 555d8fc7b1 2009-06-26 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequestTest.cs: add a bunch of tests provided by
	Bassan Tabbara.


svn path=/branches/mono-2-4/mcs/; revision=137022
2009-06-26 22:48:49 +00:00
Gonzalo Paniagua Javier 914f7de705 2009-06-26 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: don't send Content-Length header when SendChunked
	is enabled.
	* WebConnectionStream.cs: send the headers immediately when possible.
	When writing the request before a Close(), if there was an exception
	it was lost.


svn path=/branches/mono-2-4/mcs/; revision=137020
2009-06-26 22:45:45 +00:00
Gonzalo Paniagua Javier 6437801e68 2009-06-26 Gonzalo Paniagua Javier <[email protected]>
* HttpConnection.cs:
	* HttpListenerResponse.cs: force closing the socket when the response
	is aborted.


svn path=/branches/mono-2-4/mcs/; revision=137017
2009-06-26 22:37:42 +00:00
Gonzalo Paniagua Javier 14259bdadb 2009-06-26 Gonzalo Paniagua Javier <[email protected]>
* SocketTest.cs: tests for DontLinger.


svn path=/branches/mono-2-4/mcs/; revision=136983
2009-06-26 16:35:08 +00:00
Gonzalo Paniagua Javier c6d0b26f6b 2009-06-26 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: MS throws a SocketException in the byte[] overload when
	the value is null.


svn path=/branches/mono-2-4/mcs/; revision=136981
2009-06-26 16:34:25 +00:00
Gonzalo Paniagua Javier fc3c7be14c 2009-06-26 Gonzalo Paniagua Javier <[email protected]>
* socket-io.c: DontLinger can take an int or a boolean too.


svn path=/branches/mono-2-4/mono/; revision=136979
2009-06-26 16:34:04 +00:00
Atsushi Eno 43a2abd723 backport r136932.
svn path=/branches/mono-2-4/mcs/; revision=136933
2009-06-26 05:58:18 +00:00
Gonzalo Paniagua Javier 7b30d85de6 new tests
svn path=/branches/mono-2-4/mcs/; revision=136931
2009-06-26 05:28:13 +00:00
Gonzalo Paniagua Javier 633ce68d77 2009-06-26 Gonzalo Paniagua Javier <[email protected]>
* DateTime.cs: if the DateTimeOffset is out of bounds, let Parse
	report the error. Fix stupid harmless typo.
	* DateTimeOffset.cs: report error if the UTC date/time is out of
	bounds.


svn path=/branches/mono-2-4/mcs/; revision=136929
2009-06-26 05:27:28 +00:00
Miguel de Icaza 91cf99317a Backport
svn path=/branches/mono-2-4/mcs/; revision=136909
2009-06-26 00:15:42 +00:00
Miguel de Icaza 4bdcb632ee Backport
svn path=/branches/mono-2-4/mcs/; revision=136903
2009-06-25 23:36:08 +00:00
Gonzalo Paniagua Javier 10941e34f5 2009-06-25 Gonzalo Paniagua Javier <[email protected]>
* WebAsyncResult.cs: new field that tells us if the request is being
	written automatically because we reached the content length.
	* WebConnection.cs:
	* WebConnectionStream.cs: make sure we only access the NetworkStream
	while we own it. Automatically write the request when we reach
	ContentLength number of bytes. Kill the write buffer as soon as
	possible. Don't use the buffer at all when chunked encoding is
	enabled.

	Fixes bugs #515931 and #510642.


svn path=/branches/mono-2-4/mcs/; revision=136901
2009-06-25 23:23:29 +00:00
Miguel de Icaza 16ed7b1f91 Backport
svn path=/branches/mono-2-4/mcs/; revision=136899
2009-06-25 23:20:01 +00:00
Miguel de Icaza 05c0ed4c34 Backport
svn path=/branches/mono-2-4/mcs/; revision=136896
2009-06-25 22:48:36 +00:00
Gonzalo Paniagua Javier 793c66c138 2009-06-25 Gonzalo Paniagua Javier <[email protected]>
* sockets.c: add the error number to the message so we can figure out
	when this happens.


svn path=/branches/mono-2-4/mono/; revision=136884
2009-06-25 20:40:46 +00:00
Gonzalo Paniagua Javier f35d2d910b 2009-06-25 Gonzalo Paniagua Javier <[email protected]>
* BuildManager.cs: backport r131138.


svn path=/branches/mono-2-4/mcs/; revision=136881
2009-06-25 20:28:20 +00:00
Gonzalo Paniagua Javier 8fffce35a0 2009-06-25 Gonzalo Paniagua Javier <[email protected]>
* threads.c: fix missing colon when DEBUG is defined.


svn path=/branches/mono-2-4/mono/; revision=136855
2009-06-25 17:40:59 +00:00
Gonzalo Paniagua Javier 82382c6b37 2009-06-25 Gonzalo Paniagua Javier <[email protected]>
* wait.c: add missing 'break'.


svn path=/branches/mono-2-4/mono/; revision=136853
2009-06-25 17:37:45 +00:00
Gonzalo Paniagua Javier ead5111648 2009-06-24 Gonzalo Paniagua Javier <[email protected]>
* WebConnection.cs: 'socket' and 'Data' where being changed by 2
	threads at the same time when there were queued requests and the
	current one was aborted in Connect().
	* HttpWebRequest.cs: 'aborted' is now an int and we use Interlocked to
	access it. Added WebConnection field used when aborting the request.

	Fixes bug #514591 for good.


svn path=/branches/mono-2-4/mcs/; revision=136754
2009-06-24 06:41:19 +00:00
Jonathan Pryor 073cc6762d * Mono.Documentation/monodocer.cs: Don't generate an exception when an
enumeration contains multiple names with the same value.
	  Fixes #515030.
	* Test/DocTest-v1.cs: Add test for #515030.
	* Test/en.expected/Mono.DocTest/Color.xml,
	  Test/en.expected.since/Mono.DocTest/Color.xml,
	  Test/html.expected/Mono.DocTest/Color.html,
	  Test/msxdoc-expected.importslashdoc.xml,
	  Test/en.expected.importslashdoc/Mono.DocTest/Color.xml: Flush.

svn path=/branches/mono-2-4/mcs/; revision=136731
2009-06-23 18:37:49 +00:00
Gonzalo Paniagua Javier b8d16d1016 make the ParseExact5 work for all timezones
svn path=/branches/mono-2-4/mcs/; revision=136726
2009-06-23 18:00:20 +00:00
Gonzalo Paniagua Javier 3138aaa1ca 2009-06-23 Gonzalo Paniagua Javier <[email protected]>
* DateTime.cs: ignore MinValue to avoid DateTimeOffset ctor throwing
	when adjusting for TZ.


svn path=/branches/mono-2-4/mcs/; revision=136724
2009-06-23 17:59:00 +00:00
Zoltan Varga d4b7b503c7 2009-06-22 Zoltan Varga <[email protected]>
* mini-ops.h: Use TARGET_X86 and TARGET_AMD64 instead of __i386__ and
	__x86_64__ to fix cross-compilation. Fixes #515050.

svn path=/branches/mono-2-4/mono/; revision=136582
2009-06-22 10:23:49 +00:00
Zoltan Varga f06027b2f9 Fri Apr 24 16:44:08 CEST 2009 Paolo Molaro <[email protected]>
* Makefile.am, genmdesc.c, genmdesc.pl: tiny refactor to allow
	multiple machine description files to be specified.
	* mini-ops.h: fixes for cross-compilation.

svn path=/branches/mono-2-4/mono/; revision=136581
2009-06-22 10:23:37 +00:00
Gonzalo Paniagua Javier d57297685e 2009-06-21 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: check for an aborted request in Begin* before
	proceeding. Fixes bug #511851.


svn path=/branches/mono-2-4/mcs/; revision=136575
2009-06-22 02:00:33 +00:00
Gonzalo Paniagua Javier 40b2f12a57 2009-06-21 Gonzalo Paniagua Javier <[email protected]>
* WebConnectionStream.cs: close the underlying socket if there's an
	exception when closing the stream. Fixes bug #514996.


svn path=/branches/mono-2-4/mcs/; revision=136573
2009-06-22 01:48:05 +00:00
Gert Driesen f27f8950dd * HttpWebRequestTest.cs: Improved and enabled test for bug #510642.
* WebConnectionStream.cs: Keep count of all bytes written, and perform
write overflow check in both buffered and non-buffered writing (if
not using chunked transfer encoding). Fixes bug #510642.

svn path=/branches/mono-2-4/mcs/; revision=136571
2009-06-21 19:12:44 +00:00
Gonzalo Paniagua Javier e28a0e822e 2009-06-19 Gonzalo Paniagua Javier <[email protected]>
* WebConnection.cs: make sure we don't open a new socket if the
	request is aborted before we establish the connection. Fixes bug
	#514591.

	* HttpWebRequest.cs: new property to return abort status. Invoke the
	abort handler before doing anything else when Abort() is called for
	the first time.


svn path=/branches/mono-2-4/mcs/; revision=136517
2009-06-19 20:21:15 +00:00
Gonzalo Paniagua Javier e38a8fb6d0 new section in town
svn path=/branches/mono-2-4/mono/; revision=136442
2009-06-18 20:33:05 +00:00
Gonzalo Paniagua Javier 14b3379978 new files
svn path=/branches/mono-2-4/mcs/; revision=136439
2009-06-18 20:32:13 +00:00
Gonzalo Paniagua Javier d9f5065ac3 2009-06-18 Gonzalo Paniagua Javier <[email protected]>
* IriParsingElement.cs:
	* UriSection.cs:
	* IdnElement.cs: new files that parse <uri> and subelements.


svn path=/branches/mono-2-4/mcs/; revision=136438
2009-06-18 20:31:56 +00:00
Gonzalo Paniagua Javier a03b3b9d78 2009-06-18 Gonzalo Paniagua Javier <[email protected]>
* DateTime.cs: quick fix for the 1.x build.


svn path=/branches/mono-2-4/mcs/; revision=136433
2009-06-18 18:32:18 +00:00
Gonzalo Paniagua Javier 52f5d81bef 2009-06-18 Gonzalo Paniagua Javier <[email protected]>
* DateTimeTest.cs: add test for parsing a negative timezone.
	* DateTimeOffsetTest.cs: several tests for Parse.


svn path=/branches/mono-2-4/mcs/; revision=136429
2009-06-18 17:51:10 +00:00
Gonzalo Paniagua Javier 31cfa72408 2009-06-18 Gonzalo Paniagua Javier <[email protected]>
* AppDomainSetup.cs: update attribute.
	* TermInfoDriver.cs: ensure we are initialized in CheckWindowDimensions().
	* DateTimeOffset.cs: Implement Parse().
	* DateTime.cs: add 'zzz' to the list of default time formats. Return a
	DateTimeOffset from _DoParse. Fixed the offset minutes when the
	timezone is specified as a negative one.
	* Console.cs: updates for MoveBufferArea().
	* AppDomainManager.cs: implement EntryAssembly.
	* AppDomain.cs: update attribute.


svn path=/branches/mono-2-4/mcs/; revision=136427
2009-06-18 17:50:01 +00:00
Marek Habersack d62cba4511 Backport of r136394
svn path=/branches/mono-2-4/mcs/; revision=136398
2009-06-18 11:21:18 +00:00
Marek Habersack e25b80c1e6 Backport of r136393
svn path=/branches/mono-2-4/mono/; revision=136396
2009-06-18 11:20:04 +00:00
Marek Habersack 27ac65690c Backport of r136392
svn path=/branches/mono-2-4/mono/; revision=136395
2009-06-18 11:19:32 +00:00
Marek Safar 54a1f69309 2009-06-17 Marek Safar <[email protected]>
A fix for bug #514096
	* class.cs: Allow IntPtr/UIntPtr fields to be volatile.


svn path=/branches/mono-2-4/mcs/; revision=136344
2009-06-17 18:57:55 +00:00
Gonzalo Paniagua Javier 0ce0991f54 2009-06-17 Gonzalo Paniagua Javier <[email protected]>
* EndPointListener.cs: call CheckIfRemove() after removing a regular
	prefix. Fixes bug #513849.
	* EndPointManager.cs: make sure we use the right lock when one prefix
	of a collection fails to be added and we need to remove all of the
	prefixes.
	Clear the ip_to_endpoints hashtable if there are no more prefixes
	listening on that address.


svn path=/branches/mono-2-4/mcs/; revision=136321
2009-06-17 15:24:31 +00:00
Gonzalo Paniagua Javier 5f8b89c972 updated browscap.ini
svn path=/branches/mono-2-4/mono/; revision=136318
2009-06-17 15:05:18 +00:00
Zoltan Varga 62af2efe41 2009-06-17 Zoltan Varga <[email protected]>
* branch-opts.c (mono_merge_basic_blocks): Fix the case when bbn
	falls through to its next bblock. Fixes #513931.

	* iltests.il: Add a test.

svn path=/branches/mono-2-4/mono/; revision=136304
2009-06-17 13:56:20 +00:00
Andrés G. Aragoneses 63af1bd1f1 Backport r136198,r135818
svn path=/branches/mono-2-4/mcs/; revision=136282
2009-06-17 02:31:29 +00:00
Robert Jordan 43c82c0008 backport from trunk r136163.
svn path=/branches/mono-2-4/mcs/; revision=136164
2009-06-15 20:35:12 +00:00
Zoltan Varga bd0957848d 2009-06-09 Zoltan Varga <[email protected]>
* metadata.c (free_inflated_method): Call
	mono_marshal_free_inflated_wrappers (), which was missed earlier.

svn path=/branches/mono-2-4/mono/; revision=136148
2009-06-15 18:47:45 +00:00
Rodrigo Kumpera b284f15c09 In metadata:
2009-06-15 Rodrigo Kumpera  <[email protected]>
	Backport of r136134.

	* class.c (mono_class_from_typeref): If the enclosing type is not
	found return null instead of crashing. Fixes #508487.

In tests:
2009-06-15 Rodrigo Kumpera  <[email protected]>

	Backport of r136135.

	* load-exceptions.cs: Add regression test for #508487.

	* t-missing.cs: Add nested type.


svn path=/branches/mono-2-4/mono/; revision=136145
2009-06-15 18:23:05 +00:00
Gonzalo Paniagua Javier ca3ecaa3f2 2009-06-15 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: for unknown methods, always send the request once
	we are connected even if there's no writeStream. Fixes bug #513087.


svn path=/branches/mono-2-4/mcs/; revision=136137
2009-06-15 15:38:12 +00:00
Atsushi Eno 7d72027efd backport r136109.
svn path=/branches/mono-2-4/mcs/; revision=136112
2009-06-15 10:31:37 +00:00
Marek Habersack 4c5f817ea7 Backport of r136096
svn path=/branches/mono-2-4/mcs/; revision=136097
2009-06-15 08:28:56 +00:00
Marek Habersack 9a6d66bf1c Backport of r136093
svn path=/branches/mono-2-4/mcs/; revision=136094
2009-06-15 08:02:11 +00:00
Marek Habersack d2c05fcb50 Backport of r136089
svn path=/branches/mono-2-4/mcs/; revision=136091
2009-06-15 07:30:25 +00:00
Zoltan Varga c679f219fb 2009-06-14 Zoltan Varga <[email protected]>
* Makefile.am (libmonoruntimeinclude_HEADERS): Remove duplicate
	appdomain.h file.

svn path=/branches/mono-2-4/mono/; revision=136083
2009-06-14 18:20:34 +00:00
Zoltan Varga 86736d3c12 2009-06-14 Zoltan Varga <[email protected]>
* Makefile.am (libmonoruntimeinclude_HEADERS): Remove duplicate
	appdomain.h file.

svn path=/branches/mono-2-4/mono/; revision=136082
2009-06-14 18:20:27 +00:00
Gonzalo Paniagua Javier 204b8f8412 This was commited in March but never backported to 2.4: implement WaitOne(TimeSpan)
svn path=/branches/mono-2-4/mcs/; revision=136075
2009-06-14 08:43:56 +00:00
Gonzalo Paniagua Javier 8f774dec6e 2009-06-12 Gonzalo Paniagua Javier <[email protected]>
* WebConfigurationHost.cs: workaround to avoid definition errors when
	a null config path is passed.


svn path=/branches/mono-2-4/mcs/; revision=136010
2009-06-12 15:35:51 +00:00
Ankit Jain bd5438ec1a Update xbuild and Microsoft.Build.* from trunk.
In tools/xbuild:
	* xbuild/Microsoft.Common.targets (ProjectDir): Fix typo.

	* xbuild/Microsoft.Common.targets (IntermediateAssembly): Change to
	an Item list to match msbuild.
	* xbuild/Microsoft.CSharp.targets (IntermediateAssembly): Update for
	above changes.

In class/Microsoft.Build.Engine/Test/various:

	* Items.cs (TestItemsInTarget3a): Add another case for valid whitespace
	around an item ref.

In class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine:
	Fix bug #512535.
	* ExpressionCollection.cs (ConvertToITaskItemArray): Whitespace around a
	itemref is allowed if the prev/next element is ";".

svn path=/branches/mono-2-4/mcs/; revision=136004
2009-06-12 14:53:39 +00:00
Marek Habersack 7b5e62f918 Backport of r135970
svn path=/branches/mono-2-4/mcs/; revision=135971
2009-06-12 07:55:45 +00:00
Gonzalo Paniagua Javier c62b1b5718 2009-06-11 Gonzalo Paniagua Javier <[email protected]>
* ContentControlBuilderInternal.cs: detect missing
	ContentPlaceHolderID attribute when parsing instead of throwing a
	nullref later on.


svn path=/branches/mono-2-4/mcs/; revision=135961
2009-06-11 22:17:48 +00:00
Gonzalo Paniagua Javier 38c1b3358e 2009-06-11 Gonzalo Paniagua Javier <[email protected]>
* HtmlTitle.cs: HtmlTitle allows children that are not
	LiteralControls. Fixes bug #511882.


svn path=/branches/mono-2-4/mcs/; revision=135959
2009-06-11 22:14:47 +00:00
Ankit Jain 61726e001b Update xbuild and class/Microsoft.Build.* from trunk.
In tools/xbuild/tests:
	* standalone/Project01: Add missing Lib2.deploy.txt in the correct
	location.

	* standalone/Project01: Fix location for lib2.deploy.txt

In class/Microsoft.Build.Tasks/Microsoft.Build.Tasks:

	* Utilities.cs: New.
	* AL.cs, AspNetCompiler.cs, Csc.cs,
	SGen.cs, Vbc.cs (ToolName): Append ".bat" when running
	on windows.

	* MSBuild.cs (Execute): Copy metadata from the @Projects items
	to the target outputs.

	* ResolvedReference.cs: Add missing file.

In class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine:

	* EngineTest.cs (TestMSBuildOutputs): New.

svn path=/branches/mono-2-4/mcs/; revision=135955
2009-06-11 21:42:21 +00:00
Ankit Jain fb3b47b51f Backport r135951.
* Parameters.cs (.ctor): Use assembly's location to build
path for the default response file.

svn path=/branches/mono-2-4/mcs/; revision=135954
2009-06-11 21:29:57 +00:00
Ankit Jain 2903b71e06 Backport r135950.
* Utilities.cs (FromMSBuildPath): Return null if the path contains
"drive:" only on windows.

svn path=/branches/mono-2-4/mcs/; revision=135953
2009-06-11 21:26:59 +00:00
Zoltan Varga 21bbcde758 2009-06-11 Zoltan Varga <[email protected]>
* reflection.c (add_custom_modifiers): Avoid reading invalid memory.

svn path=/branches/mono-2-4/mono/; revision=135949
2009-06-11 21:09:44 +00:00
Marek Habersack 717336499b Backport of r135918
svn path=/branches/mono-2-4/mcs/; revision=135919
2009-06-11 09:21:13 +00:00
Gonzalo Paniagua Javier 50ad81e07d Update ChangeLog
svn path=/branches/mono-2-4/mcs/; revision=135814
2009-06-10 00:52:08 +00:00
Gonzalo Paniagua Javier 4552e026da 2009-06-09 Gonzalo Paniagua Javier <[email protected]>
* XPathExpression.cs: Backport to Mono 2.4 the bug fix
	for multithreaded applications that use XPath.

	This was the fix for #477049 which also fixes #505678


svn path=/branches/mono-2-4/mcs/; revision=135813
2009-06-10 00:51:31 +00:00
Gonzalo Paniagua Javier 9e83ad4e47 2009-06-09 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: ProtocolViolationException is not thrown in
	certain cases since 2.0. Fixes bug #508027.


svn path=/branches/mono-2-4/mcs/; revision=135768
2009-06-09 15:40:39 +00:00
Gonzalo Paniagua Javier ac7e6377d2 new tests from HEAD
svn path=/branches/mono-2-4/mcs/; revision=135761
2009-06-09 15:14:57 +00:00
Gonzalo Paniagua Javier ae50ec7275 2009-06-09 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: follow MS docs when throwing
	ProtocolViolationException at the beginning of an asynchronous
	operation. Fixes bug #465613.


svn path=/branches/mono-2-4/mcs/; revision=135759
2009-06-09 15:14:26 +00:00
Rodrigo Kumpera b3112d3b56 2009-06-09 Rodrigo Kumpera <[email protected]>
Revert previous commit to threads.c until the race condition
	is fixed.


svn path=/branches/mono-2-4/mono/; revision=135755
2009-06-09 14:43:05 +00:00
Gonzalo Paniagua Javier 2146c262ed 2009-06-08 Gonzalo Paniagua Javier <[email protected]>
* WebConnectionStream.cs: throw a WebException instead of an IOException.


svn path=/branches/mono-2-4/mcs/; revision=135705
2009-06-08 22:27:02 +00:00
Gonzalo Paniagua Javier c5e73d5316 2009-06-08 Gonzalo Paniagua Javier <[email protected]>
* FtpWebRequest.cs: avoid exception when the reply from the server
	contains just response code. Fixes bug #510852.


svn path=/branches/mono-2-4/mcs/; revision=135696
2009-06-08 20:48:12 +00:00
Gonzalo Paniagua Javier b17e27771f 2009-06-08 Gonzalo Paniagua Javier <[email protected]>
* SmtpClient.cs: handle dots. Patch by Ted Unangst that fixes bug
	#392875.


svn path=/branches/mono-2-4/mcs/; revision=135693
2009-06-08 20:40:25 +00:00
Rodrigo Kumpera 3075fb3f7c 2009-06-08 Rodrigo Kumpera <[email protected]>
Backport of 135171.

	* threads.c (ves_icall_System_Threading_Thread_Sleep_internal):
	Check if the thread was interrupted and proccess it straight away.
	Makes abortion much more responsive.

	Backport of 135170.

	* threads.c (mono_thread_execute_interruption): Use atomic cas with
	MonoThread::interruption_requested to match it's counterpart.

	Fixes a hang in abort-stress-1 on a 2 core x86.


svn path=/branches/mono-2-4/mono/; revision=135666
2009-06-08 15:45:51 +00:00
Martin Baulig aa667d9821 Improve exception handling when running in mdb: check whether an exception is caught inside a runtime-invoked method or the runtime-invoke wrapper.
2009-06-08  Martin Baulig  <[email protected]>

	* debug-mini.c
	(MonoDebuggerExceptionAction): Moved into debug-mini.h.
	(_mono_debugger_throw_exception): Don't make this static.
	(_mono_debugger_unhandled_exception): Likewise.
	(mono_debugger_handle_exception): Moved to mini-exceptions.c

	* debug-mini.c
	(MonoDebuggerExceptionAction): Moved here from debug-mini.c.
	(_mono_debugger_throw_exception): Add function prototype.
	(_mono_debugger_unhandled_exception): Likewise.

	* mini-exceptions.c
	(mono_handle_exception_internal): Added `MonoJitInfo **out_ji'
	arg; return the first exception handler if the exception is caught
	and we're running inside the debugger.
	(mono_debugger_handle_exception): Moved here from debug-mini.c;
	improve exception handle inside runtime-invoke, check whether the
	exception is actually caught in the method being invoked and not
	by the runtime-invoke-wrapper.

svn path=/branches/mono-2-4/mono/; revision=135636
2009-06-08 08:46:08 +00:00
Marek Habersack 8c11b0cb13 Backport of r135630
svn path=/branches/mono-2-4/mcs/; revision=135631
2009-06-08 07:19:59 +00:00
Ankit Jain d3f7781195 In class/PEAPI:
2009-03-31  Rodrigo Kumpera  <[email protected]>

	* Code.cs (CILLabel): Add new constructor to signal that
	a label is an absolute il offset. This is required by exception
	handling declarations that use offsets and not labels.

In ilasm/codegen:
2009-05-27  Rodrigo Kumpera  <[email protected]>

	* TypeDef.cs: Add field method_list to preserve definition
	order of methods when emiting the PE file.

2009-04-20  Ankit Jain  <[email protected]>

	Fix bug #494221
	* MethodDef.cs (BeginLocalsScope): New.
	(EndLocalsScope): New.
	(AddLocals):
	(GetNamedLocal): Support scoping for .locals

	* MethodDef.cs (GetNamedLocalSlot): Return -1 if local var not found.

2009-03-31  Rodrigo Kumpera  <[email protected]>

	* MethodDef.cs (WriteCode): Emit labels which use offsets as absolute PEAPI
	CilLabels.

In ilasm/scanner:

	* StringHelper.cs (startIdChars): New. Set of chars that can start an
	identifier.
	(Start): Use startIdChars instead of idchars.

	Fix bug #487155.
	* StringHelper.cs: Handle octal values in strings.
	Patch from  Stephen Gennard ([email protected])

In ilasm/parser:
	Fix bug #494221.
	* ILParser.jay (scope_block_begin): Mark begin .locals scope.
	(scope_block): Mark end .locals scope.

	* ILParser.jay (instr): Handle unidentified local var id.

2009-03-31  Rodrigo Kumpera  <[email protected]>

	* ILParser.jay: Fix integer labels in handler blocks.

svn path=/branches/mono-2-4/mcs/; revision=135623
2009-06-08 00:47:03 +00:00
Ankit Jain acc1b29080 Update xbuild and Microsoft.Build.* from trunk.
In tools/xbuild:

	* xbuild/Microsoft.Common.targets: Use ResolveAssemblyReference
	to find satellite assemblies, dependent assemblies, dependent
	files, copy local files etc.
	Add targets to fetch all this info for all referenced projects,
	and copy them to the target locations. Also, copy the debug (.mdb)
	files. Honor, "CopyToOutputDirectory" metadata.

	* Parameters.cs (ProcessProperty): Handle invalid syntax.

	* SolutionParser.cs (AddGeneralSettings): Don't hardcode the default
	config/platform. Move to ..
	(AddDefaultSolutionConfiguration): .. here.
	(AddCurrentSolutionConfigurationContents): Use the first solution target
	as the default config/platform or use Debug/anycpu if no config is available.

In tools/xbuild/tests:

	* standalone/Project01: New. Solution with interdependent multiple projects,
	with deploy files, satellite assemblies etc.

In class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks:

	* CreateCSharpManifestResourceNameTest.cs (TestInvalidCulture): New.

	* CscTest.cs (TestDefineConstants): Update DefineConstants to include
	spaces also.

	* AssignTargetPathTest.cs: Update tests to not depend on a fixed
	root (C:\) or cur dir.

In class/Microsoft.Build.Tasks:

	* Microsoft.Build.Tasks_test.dll.sources: Added
	ResolvedReference.cs

In class/Microsoft.Build.Tasks/Microsoft.Build.Tasks:

	* AssignCulture.cs (TrySplitResourceName): Reset culture arg to null
	if returning false.
	* CreateCSharpManifestResourceName.cs: Set culture to null if the
	culture was invalid.

	* ResolvedReference.cs: New.
	* AssemblyResolver.cs (GetResolvedReference): New. Honor's the
	'Private' metadata and sets CopyLocal.
	(SearchPath): New. Used to track how the reference was resolved.
	(IsStrongNamed): Fix potential null ref.
	All the assembly resolution methods now return ResolvedReference
	instead of strings, to aid in proper CopyLocal behavior and
	dependency resolution.
	* ResolveAssemblyReference.cs: Add support for finding related files,
	satellite files, resolving dependencies, copy local files.
	Resolve files specified in "AssemblyFiles" param also, used to resolve
	project references and dependencies.

	* Csc.cs (AddResponseFileCommands): Split DefineConstants on space also.

	* AssignTargetPath.cs (Execute): Expand incoming path to absolute
	path, and correctly extract relative path (skipping over the preceding
	dir separator).

	* Copy.cs (CopyFile): Don't copy if the source and dest are the same.

In class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine:

	* ProjectTest (TestBuildSolutionProject): New. Disabled for now.
	* Consts.cs (RunningOnMono): Make public.

	* TargetTest (TestTargetOutputsIncludingMetadata): New.

In class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine:

	* Target.cs (Outputs): Use ITaskItem[] for conversion, to retain
	the metadata.

svn path=/branches/mono-2-4/mcs/; revision=135620
2009-06-08 00:28:26 +00:00
Marek Habersack 3325e79f38 Backport of r130909
svn path=/branches/mono-2-4/mcs/; revision=135562
2009-06-05 21:26:49 +00:00
Marek Habersack 14c36e347e Fix the 1.1 build
svn path=/branches/mono-2-4/mcs/; revision=135561
2009-06-05 21:11:02 +00:00
Marek Habersack 9cea00c852 Backport of r135558
svn path=/branches/mono-2-4/mcs/; revision=135559
2009-06-05 20:53:59 +00:00
Robert Jordan 13c1574f1e merge from trunk r135532.
svn path=/branches/mono-2-4/mcs/; revision=135533
2009-06-05 14:57:11 +00:00
Marek Habersack 7bcec499bb Backport of r135488
svn path=/branches/mono-2-4/mcs/; revision=135489
2009-06-04 21:23:04 +00:00
Marek Habersack 905299db93 Backport of r135486
svn path=/branches/mono-2-4/mcs/; revision=135487
2009-06-04 21:18:44 +00:00
Marek Habersack 69340b378c Backport of r135471
svn path=/branches/mono-2-4/mcs/; revision=135472
2009-06-04 18:48:30 +00:00
Marek Habersack db984ca1f9 Backport of r135464
svn path=/branches/mono-2-4/mcs/; revision=135465
2009-06-04 17:45:39 +00:00
Marek Habersack cde24e99e0 Backport of r135460
svn path=/branches/mono-2-4/mcs/; revision=135462
2009-06-04 17:34:36 +00:00
Marek Habersack 181c888eb3 Backport of r135438
svn path=/branches/mono-2-4/mcs/; revision=135439
2009-06-04 15:31:55 +00:00
Zoltan Varga 981e7e4a91 2009-06-04 Zoltan Varga <[email protected]>
* marshal.c metadata.c: Applied patch from Ulrich Weigand
	<[email protected]>: Free the wrappers of inflated generic methods when
	the inflated method is freed. Fixes #508389.

	The code is contributed under the MIT/X11 license.

svn path=/branches/mono-2-4/mono/; revision=135435
2009-06-04 15:26:16 +00:00
Veerapuram Varadhan 384885ad15 2009-06-04 Veerapuram Varadhan <[email protected]>
* OracleParameter.cs: Infer size only for 2.0 profile when only
	value is passed.  Fixes test failure under 1.1 profile.

svn path=/branches/mono-2-4/mcs/; revision=135429
2009-06-04 15:15:21 +00:00
Jb Evain 631c51205f 2009-06-03 Jb Evain <[email protected]>
backport of 135337.

	* main.c (dis_code): don't try to locate invalid entry points.


svn path=/branches/mono-2-4/mono/; revision=135339
2009-06-03 18:58:04 +00:00
Ankit Jain 973d8fe897 Update xbuild and Microsoft.Build.* libs from trunk.
In tools/xbuild:
2009-05-20  Jonathan Chambers  <[email protected]>

	* SolutionParser.cs (ParseSolution): Ignore vcproj projects in solutions 
	and issue warning. 

2009-04-27  Ankit Jain  <[email protected]>

	* xbuild/Microsoft.VisualBasic.targets: Update to use
	CreateVisualBasicManifestResourceName task, and fix compiler params.

2009-04-25 Daniel Nauck <[email protected]>

	Fix bug #484649:
	* LoggerInfo.cs: fixed the parsing of the /logger: argument as described in
	http://msdn.microsoft.com/en-us/library/ms164311.aspx
	Added logger class detection if it's not explicit specified in the argument.

2009-03-19  Ankit Jain  <[email protected]>

	Fix bug #484773.
	* Main.cs (Execute): Check whether the project file exists or not.
	* Parameters.cs (ParseArguments): Handle absolute paths too.

2009-03-13  Ankit Jain  <[email protected]>

	* Main.cs (Execute): Build the project/sln with current directory set to
	the project file's dir.
	* SolutionParser.cs (ParseSolution): Project paths are relative to
	solution directory.

2009-03-06  Ankit Jain  <[email protected]>

	Fix bug #481336.
	* SolutionParser.cs (AddWarningForMissingProjectConfiguration): New.
	(AddProjectTargets): Emit warning for missing project configurations.

2009-02-26  Ankit Jain  <[email protected]>

	* xbuild/Microsoft.CSharp.targets (Csc): Fix "Resources" argument to use
	ManifestNonResxWithCultureOnDisk instead of ManifestResourceWithNoCultureOnDisk.

2009-02-26  Ankit Jain  <[email protected]>

	* xbuild/Microsoft.Common.targets: Make targets extensible. Add
	before/after hooks.

2009-02-25  Ankit Jain  <[email protected]>

	* xbuild/Microsoft.Common.targets: Use obj/$(Config) as the default intermediate
	output path, instead of just obj/

2009-02-25  Ankit Jain  <[email protected]>

	* xbuild/Microsoft.Common.targets (CopyNonResxEmbeddedResources): New.
	(GenerateSatelliteAssemblies): Update to use the new ManifestNonResxWithCultureOnDisk
	instead of NonResxWithCulture.
	* xbuild/Microsoft.CSharp.targets (Csc): Fix "Resources" argument to use
	the new on disk file names instead of original filenames.

2009-02-25  Ankit Jain  <[email protected]>

	* xbuild/Microsoft.Common.targets (GetTargetPath): Add a path separator.

2009-02-25  Ankit Jain  <[email protected]>

	* SolutionParser.cs (ParseSolution): Report warning instead of error
	for unknown global sections.

2009-02-21  Ankit Jain  <[email protected]>

	* xbuild/xbuild.rsp: Add descriptive comments.

2009-02-21  Ankit Jain  <[email protected]>

	* Parameters.cs (LoadResponseFile): Handle comments.

2009-02-20  Ankit Jain  <[email protected]>

	* SolutionParser.cs (ParseSolution): Ignore solution folders.

2009-02-20  Ankit Jain  <[email protected]>

	* SolutionParser.cs (ParseSolution): Ignore GlobalSection named
	'NestedProjects'.

2009-02-20  Ankit Jain  <[email protected]>

	* SolutionParser.cs (ParseProjectConfigurationPlatforms): Report missing
	project guids as Warnings and not errors. Report every missing guid only
	once.

2009-02-20  Ankit Jain  <[email protected]>

	* SolutionParser.cs (projectRegex): Use '\s' to match whitespace.

2009-02-19  Jonathan Chambers  <[email protected]>

	* xbuild.csproj: Add.
	* xbuild.sln: Add.

2009-02-13  Jonathan Chambers  <[email protected]>

	* SolutionParser.cs: Make Guid Regex case insensitive.
	Handle project dependencies. The solution has explicit
	dependencies, but we have to open projects for implicit
	dependencies (via ProjectReferences).

2009-02-13  Jonathan Chambers  <[email protected]>

	* Main.cs: Add support for .sln files.
	* SolutionParser.cs: Class for generating project file
	from solution file.
	* xbuild.exe.sources: Added SolutionParser.cs.

2009-02-02  Ankit Jain  <[email protected]>

	* Microsoft.CSharp.targets: Add targets to generate resource ids.
	* Microsoft.Common.targets: Add targets for generating resources,
	generate and deploy satellite assemblies, resolve project and assembly
	references. All intermediate build output goes into a 'obj/' dir by
	default. 'Clean' target enabled.

In class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks:
2009-05-29  Ankit Jain  <[email protected]>

	* TestMessageLogger.cs: Add counts for project/build start/finish
	events.

2009-04-27  Ankit Jain  <[email protected]>

	* CreateVisualBasicManifestResourceNameTest.cs: New.

2009-03-03  Ankit Jain  <[email protected]>

	* CscTest.cs (DefineConstants): Add some extra semi-colons,
	that should get removed on output.
	(DefineConstants2): New. Test effectively empty define constants.

2009-02-25  Ankit Jain  <[email protected]>

	* CreateCSharpManifestResourceNameTest.cs (CheckResourceNames):
	Refactor a bit to improve error reporting.
	Update to use Path.Combine instead of hardcoding "\".

2009-02-24  Ankit Jain  <[email protected]>

	* TestMessageLogger.cs (CheckLoggedMessageHead): Move here from
	* TaskBatchingTest.cs: .. here. Track api change.

2009-02-21  Ankit Jain  <[email protected]>

	* CopyTest.cs: New.

2009-01-31  Ankit Jain  <[email protected]>

	* TaskBatchingTest.cs (*): Add tests for target/task events.
	(TestTargetBatching*): New tests for target batching.
	* TestMessageLogger.cs: Add counts for target/task started/finished
	events.
	(NormalMessageCount): New.

In class/Microsoft.Build.Tasks/Test/resources:
2009-04-27  Ankit Jain  <[email protected]>

	* Sample.vb: New.

In class/Microsoft.Build.Tasks/Microsoft.Build.Tasks:
2009-04-27  Ankit Jain  <[email protected]>

	* CreateCSharpManifestResourceName.cs (GetResourceIdFromFileName): Move
	to ..
	* CreateManifestResourceName.cs: .. here.
	* CreateVisualBasicManifestResourceName.cs: Implement.

2009-04-27  Ankit Jain  <[email protected]>

	* Vbc.cs (AddResponseFileCommands): Escape DefineConstants as it can
	contain double quotes itself. Fix /doc switch.
	(EscapeDoubleQuotes): New.

2009-03-22  Daniel Nauck  <[email protected]>

	* GenerateResource.cs: Set BasePath property of
		ResXResourceReader class.
		See: http://lists.ximian.com/pipermail/mono-devel-list/2009-March/031459.html

2009-03-19  Ankit Jain  <[email protected]>

	Fix bugs #323833 and #484384.
	* AssemblyResolver.cs (GatherGacAssemblies): Handle duplicate entries.
	These seem to be old copies of the assemblies with old keys. Pick
	the one with the latest timestamp.

2009-03-03  Ankit Jain  <[email protected]>

	Fix bug #480856.
	* Csc.cs (AddResponseFileCommands): Split DefineConstants on ';'.

2009-02-26  Ankit Jain  <[email protected]>

	* MakeDir.cs (Execute): Don't create+log if dir already exists.

2009-02-25  Ankit Jain  <[email protected]>

	* AL.cs (Execute): Use ToolTask.Execute instead of doing our own.

2009-02-25  Ankit Jain  <[email protected]>

	* AssemblyResolver.cs:
	* ResolveAssemblyReference.cs: Honor SpecificVersion. Emit detailed error
	messages incase assembly resolution fails. Make specific version
	strict.

2009-02-25  Ankit Jain  <[email protected]>

	* ManagedCompiler.cs (AddResponseFileCommands): Use LogicalName for
	embedded resources, wherever available.
	* CreateCSharpManifestResourceName.cs (GetResourceIdFromFileName): Use
	Path.Combine instead of hardcoding "\".

2009-02-25  Ankit Jain  <[email protected]>

	* MSBuild.cs (Execute): Reset current directory back after every
	project's execution.

2009-02-21  Ankit Jain  <[email protected]>

	Fix bug #458916.
	* Copy.cs: CopiedFiles and DestinationFiles should have target paths
	instead of source. Also, the metadata should get retained from source
	items. Based on a patch by Jeffrey Richardson <[email protected]>
	Refactor a bit to remove code duplication.

2009-02-21  Ankit Jain  <[email protected]>

	* MSBuild.cs (SplitPropertiesToDictionary): Split into exactly 2 parts.

2009-02-11  Leszek Ciesielski <[email protected]>

	* ResolveAssemblyReference.cs : AllowedRelatedFileExtensions stub

2009-02-02  Ankit Jain  <[email protected]>

	* MSBuild.cs (Execute): Disable incorrect 'rebaseOutputs' behavior.

2009-02-02  Ankit Jain  <[email protected]>

	* ResolveAssemblyReference.cs: Honor SearchPaths and the special
	items like '{HintPathFromItem}', '{TargetFrameworkDirectory}' etc.
	* AssemblyResolver.cs: Add api for more specific search, like search
	in a directory, target frameworks, gac etc.

2009-02-01  Ankit Jain  <[email protected]>

	* CallTarget.cs: Copy all items from target to TargetOutputs.

2009-02-01  Ankit Jain  <[email protected]>

	* Csc.cs (AddResponseFileCommands):
	* ManagedCompiler.cs (AddResponseFileCommands): 'AddModules' and
	'AdditionalLibPaths' can be empty.

2009-01-30  Ankit Jain  <[email protected]>

	* Copy.cs (Execute): Use for loop instead of enumerators.
	sourceFiles and destinationFiles can be null, handle that.
	Create new directory if required.

2009-01-27  Ankit Jain  <[email protected]>

	* Delete.cs (Execute): Skip non-existant files.

In class/Microsoft.Build.Tasks:
2009-05-14  Ankit Jain  <[email protected]>

	Fix tests on monobuild
	* Makefile (EXTRA_DISTFILES): Add Test/resources/Sample.vb

2009-04-28  Raja R Harinath  <[email protected]>

	* Makefile (NAME_SUFFIX): New.
	(LIBRARY_NAME): Use it.
	(TEST_MCS_FLAGS): Don't mention name of library.  Use NAME_SUFFIX
	as appropriate when referring to other msbuild dlls.

2009-04-27  Ankit Jain  <[email protected]>

	* Microsoft.Build.Tasks_test.dll.sources: Added
	CreateVisualBasicManifestResourceNameTest.cs .

2009-04-25  Jonathan Chambers  <[email protected]>

	* Makefile: Adjust assembly name for 3.5 profile.

2009-02-21  Ankit Jain  <[email protected]>

	* Microsoft.Build.Tasks_test.dll.sources: Added CopyTest.cs

In class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine:
2009-05-29  Ankit Jain  <[email protected]>

	* EngineTest.cs (TestGlobalProperties*): New tests
	and some helper methods.
	* ProjectTest.cs (TestResetBuildStatus): Reset twice. Update
	the event counts.

2009-05-15  Marek Sieradzki  <[email protected]>

	* BuildItemTest.cs:
	* BuildPropertyGroupTest.cs:
	* BuildPropertyGroupCollectionTest.cs:
	* BuildPropertyTest.cs:
	* BuildItemGroupTest.cs:
	* EngineTest.cs:
	* InternalLoggerExceptionTest.cs:
	* ProjectTest.cs: Don't compare exception messages.

2009-05-12  Ankit Jain  <[email protected]>

	* ProjectTest.cs (TestAssignment1):
	* UsingTaskTest.cs (TestTaskName):
	(TestAssemblyNameOrAssemblyFile1):
	(TestAssemblyNameOrAssemblyFile2): Don't compare exception messages. 

2009-03-27  Jonathan Chambers  <[email protected]>

	* BuildChooseTest.cs: Enable tests.
	* Microsoft.Build.Engine.Test.csproj: Update post build step.

2009-03-26  Jonathan Chambers  <[email protected]>

	* BuildTaskTest.cs (TestTaskInNamespace): Add test for Task in namespace.

2009-02-24  Ankit Jain  <[email protected]>

	* UsingTaskTest.cs (TestLazyLoad{1,2,3}): New.
	(TestAssemblyNameOrAssemblyFileConditionFalse): New.
	(TestDuplicate1): New.
	* TargetTest (CheckLoggedMessageHead): Moved to TestMessageLogger,
	use that.

2009-02-15  Jonathan Chambers  <[email protected]>

	* BuildChooseTest.cs (TestValueXml): Add tests for Choose.
	Currently not working.

2009-02-12  Jonathan Chambers  <[email protected]>

	* BuildPropertyTest.cs (TestValueXml): New.

2009-02-01  Ankit Jain  <[email protected]>

	* ProjectTest.cs (TestBuild[23]): Check number of task started/finished
	events.
	(TestResetBuildStat): Remove "NotWorking".
	(TestBuild4): Likewise. Check number of task started/finished events.

	* TargetTest.cs (TestTargetOutputs1): New.

2009-01-30  Ankit Jain  <[email protected]>

	* ProjectTest.cs (TestRequiredTask_*): New.
	(TestBatchedMetadataRef5): New.

2009-01-29  Ankit Jain  <[email protected]>

	* BuildItemTest.cs (TestBuildItemTransform): New.

In class/Microsoft.Build.Engine/Test/various:
2009-05-29  Ankit Jain  <[email protected]>

	* Conditions.cs (TestHasTrailingSlash1): New.
	(TestUnknownFunction): New.

2009-05-15  Marek Sieradzki  <[email protected]>

	* Items.cs
	* Conditions.cs: Don't check exception messages.

2009-02-23  Ankit Jain  <[email protected]>

	* Items.cs (TestItemsInTarget8): New.
	(TestItemsInTarget9): New.

2009-02-20  Ankit Jain  <[email protected]>

	* Conditions.cs (TestCondition11): New. Test unquoted item/property
	references in conditions.

In class/Microsoft.Build.Engine/Test/resources:
2009-03-26  Jonathan Chambers  <[email protected]>

	* TestTasks.cs (NamespacedOutputTestTask): New.

2009-02-24  Ankit Jain  <[email protected]>

	* TestTasks.cs (Another.SameTask): New.
	(Other.SameTask): New.

2009-01-30  Ankit Jain  <[email protected]>

	* TestTasks.cs (RequiredTestTask): Rename to ..
	(RequiredTestTask_TaskItems): .. this.
	(RequiredTestTask_*): New types.

2009-01-29  Ankit Jain  <[email protected]>

	* TestTasks.cs (BatchingTestTask.TaskItemsOutput): New.

In class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine:
2009-05-29  Ankit Jain  <[email protected]>

	Correctly handle global properties. Correctly log
	project/build events.

	* BuildPropertyGroup.cs (Clone): Implement.
	* Engine.cs (globalProperties): Rename to ..
	(global_properties): .. this.
	(currentlyBuildingProjectsStack): New. Used to correctly
	log and raise project/build start/finish events.
	(BuildProjectFile): Override any project global properties
	with explicitly specified ones, here in the param @globalProperties.
	Mark project for reevaluation, which will update the engine's
	global properties also.
	Reset both engine and project's old global properties at the end.
	(UnregisterAllLoggers): Log build finished only if we are currently
	building.
	(StartBuild): Rename to ..
	(StartProjectBuild): .. this. Keeps track of the projects being built
	in the new stack, and logs project and build events accordingly.
	(EndProjectBuild): New. Uses the stack to keep track of projects
	finishing builds, and raises project and build events accordingly.
	(LogProjectStarted): Move here from Project.cs
	(LogProjectFinished): Likewise.

	* Project.cs (Build): Log start of project build.
	Set current directory to the project file's dir, and reset at end.
	(BuildInternal): Don't log here, its done in Build.
	(BuildTarget): Already built targets are keyed by the set of global
	properties that they were built with.
	(GlobalPropertiesToString): New.
	(ResetBuildStatus): 'building' must be true to allow built targets to be reset.
	(RemoveBuiltTargets): Initialize builtTargetKeys in .ctor
	(Evaluate): Remove built targets only if we are currently building and
	build settings are None.
	Merge project's global properties with those of the parent engine.
	Add missing properties from engine's global properties.
	(LogTargetSkipped): Fix format string, add the reqd argument.

2009-05-29  Ankit Jain  <[email protected]>

	* ConditionFunctionExpression.cs: Add 'HasTrailingSlash' function.
	(HasTrailingSlash): New.

2009-05-12  Ankit Jain  <[email protected]>

	* Project.cs (.ctor): Init timeOfLastDirty.

2009-05-05  Miguel de Icaza  <[email protected]>

	* Contribution from Martin Brenn to fix #498154.

2009-04-27  Ankit Jain  <[email protected]>

	Fix bug #497839.
	* Engine.cs (BuildProjectFile): Set project's GlobalProperties to the
	one passed as argument.

2009-04-27  Ankit Jain  <[email protected]>

	* TaskEngine.cs (Prepare): Emit a useful error message property value
	can't be converted to required type.

2009-04-27  Ankit Jain  <[email protected]>

	* ExpressionCollection.cs (ConvertToObject): Allow true/on/yes
	as valid true values for bool, and corresponding for false.

2009-03-27  Jonathan Chambers  <[email protected]>

	* BuildWhen.cs: Add basic implementation.
	* BuildChoose.cs: Add basic implementation.
	* BuildItem.cs (AddEvaluatedItem): Add BuiltItem to 
	EvaluatedItemsIgnoringCondition.
	* GroupingCollection.cs: Add evaluation of BuildChoose items.

2009-03-26  Jonathan Chambers  <[email protected]>

	* TaskDatabase.cs (RegisterTask): Search for class by name
	if task was not found using GetType (which uses namespace). 

2009-02-26  Ankit Jain  <[email protected]>

	* Target.cs: Handle target with no tasks. Log errors.

2009-02-24  Ankit Jain  <[email protected]>

	Lazily load UsingTask tasks.
	* UsingTask.cs (Evaluate): Register 'this' with task database,
	but don't load it yet. Register only if condition evaluates to true.
	Move the load logic to ..
	(Load): .. here. Register with the specified task database.
	* TaskDatabase.cs (RegisterUsingTask): Store the UsingTask instance
	in a table keyed by task name, but don't load it yet.
	(GetTypeFromClassName): Try to load UsingTask if task is not already
	loaded. Move loading logic to ..
	(GetTypeFromClassNameInternal): .. here.
	(CopyTasks): Copy the usingTasks table also.

2009-02-23  Ankit Jain  <[email protected]>

	* BuildItem.cs (AddMetadata): Allow overwriting older values.

2009-02-22  Ankit Jain  <[email protected]>

	* BuildItem.cs: Iterate over XmlElements childnodes with XmlNode
	instead of XmlElement. Eg. XmlComment

2009-02-21  Ankit Jain  <[email protected]>

	* Utilities.cs (FromMSBuildPath): Copy from monodevelop.
	* Project.cs (Load): Use FromMSBuildPath on the path.
	(InitializeProperties): Set "MSBuildToolsPath" also.

2009-02-20  Ankit Jain  <[email protected]>

	Fix #449683.
	* ConditionTokenizer.cs: Handle unquoted item references (with or w/o
	transforms) in conditions.
	* ConditionParser.cs: Parse unquoted item, property references.
	eg. Condition = " @(Foo->'%(Extension)') == '.exe' "
	* Token.cs (Token.ToString): Override.
	(TokenType.Transform): Uncomment.

2009-02-12  Jonathan Chambers  <[email protected]>

	* BuildProperty.cs: Value corresponds to XmlElement.InnerXml
	no XmlElement.InnerText. This allows properties to be additional 
	xml elements.

2009-02-01  Ankit Jain  <[email protected]>

	* BuildEngine.cs (BuildProjectFile): Use
	BuildSettings.DoNotResetPreviouslyBuiltTargets for building projects.
	* Engine.cs (BuiltTargetsOutputByName): New. Table of targets already
	built. Move logging of project start/finish to ..
	* Project.cs: .. here. Build a target only if hasn't been built already.
	Keep track of target outputs, and return those even if an already built
	target has been invoked again.
	Honor BuildSettings.None and DoNotResetPreviouslyBuiltTargets .

2009-01-31  Ankit Jain  <[email protected]>

	* BatchingImpl.cs: Split into ..
	* BatchingImplBase.cs: .. this,
	* TaskBatchingImpl.cs: .. this ..
	* TargetBatchingImpl.cs: .. and this. Implement target batching here.

	* Target.cs (DoBuild): Use TargetBatchingImpl for building.
	(Log*): Move to TargetBatchingImpl .
	(BuildTasks): New.
	(Engine): New.

2009-01-30  Ankit Jain  <[email protected]>

	* TaskEngine.cs (GetObjectFromString): Empty value is allowed only for
	arrays.

2009-01-29  Ankit Jain  <[email protected]>

	* BuildItem.cs (child_items): Change type from BuildItemGroup to
	List<BuildItem>.
	(HasParent): Rename to ..
	(HasParentItem): .. this.
	(ParentItemGroup): Add setter.

	* BuildItemGroup.cs (.ctor): Add overload with @project param.
	(AddNewItem):
	(AddItem): Correctly set the ParentItemGroup for new build items.
	(ParentProject): Add setter.
	* Project.cs: Set the project for new BuildItemGroup instances.
	* TaskEngine.cs (PublishItemGroup): Likewise.

In class/Microsoft.Build.Engine:
2009-02-21  Ankit Jain  <[email protected]>

	* Import.cs (GetFullPath): Use Utilities.FromMSBuildPath .

2009-02-19  Jonathan Chambers  <[email protected]>

	* Microsoft.Build.Engine.csproj: Add.
	* Microsoft.Build.Engine.Test.csproj: Update.

2009-01-31  Ankit Jain  <[email protected]>

	* Microsoft.Build.Engine_test.dll.sources: Replace BatchingImpl.cs with
	BatchingImplBase.cs, TargetBatchingImpl.cs and TaskBatchingImpl.cs

In class/Microsoft.Build.Utilities:
2009-04-25  Jonathan Chambers  <[email protected]>

	* Makefile: Adjust assembly name for 3.5 profile.

2009-02-25  Ankit Jain  <[email protected]>

	* Microsoft.Build.Utilities.dll.sources: Add ProcessService.cs,
	ProcessWrapper.cs, IAsyncOperation.cs and IProcessAsyncOperation.cs

In class/Microsoft.Build.Utilities/Microsoft.Build.Utilities:
2009-04-24  Ankit Jain  <[email protected]>

	* ToolTask.cs (RealExecute): Handle TypeLoadExceptions, compiler
	crashes and report them. Borrow some tricks from md.
	(LogEventsFromTextOutput): Ignore known non-error messages. Don't
	log unknown lines, crashes get handled elsewhere.

2009-04-08  Ankit Jain  <[email protected]>

	Fix bug #491828.
	* ToolTask.cs (LogEventsFromTextOutput): Log even in case of
	unrecognized errors.

2009-02-25  Ankit Jain  <[email protected]>

	* ProcessService.cs, IAsyncOperation.cs, IProcessAsyncOperation.cs,
	ProcessWrapper.cs: Brought in from monodevelop.
	* ToolTask.cs: Use the new ProcessService to execute the tool. Honor
	SkipTaskExecution (). Use response files, but log the contents of the
	response file instead of "@foo.rsp". Support environmentOverrides.
	(LogEventsFromTextOutput): Add null check.
	* Exec.cs (GetWorkingDirectory): Use the workingDirectory property.

2009-02-20  Ankit Jain  <[email protected]>

	Fix bug #475438.
	* ToolTask.cs (RealExecute): Check whether the target executable exists.
	Log any execution errors.


svn path=/branches/mono-2-4/mcs/; revision=135336
2009-06-03 18:54:33 +00:00
Jb Evain 9551a9a3f1 2009-06-03 Jb Evain <[email protected]>
backport of r135334.

	* main.c (dis_type): escape namespaces.


svn path=/branches/mono-2-4/mono/; revision=135335
2009-06-03 18:46:21 +00:00
Marek Habersack 78d49ba450 Backport of r135328
svn path=/branches/mono-2-4/mcs/; revision=135329
2009-06-03 17:55:32 +00:00
Veerapuram Varadhan ee8e74d14c 2009-06-03 Veerapuram Varadhan <[email protected]>
* OracleParameterTest.cs: Mark tests for bug #424908 as NotWorking
        as it requires some more thorough debugging.

svn path=/branches/mono-2-4/mcs/; revision=135315
2009-06-03 16:32:38 +00:00
Marek Habersack bc46a3e762 Backport of r135313
svn path=/branches/mono-2-4/mcs/; revision=135314
2009-06-03 16:32:38 +00:00
Veerapuram Varadhan 4dc9024c2d 2009-06-03 Veerapuram Varadhan <[email protected]>
* OracleParameter.cs:  Infer the ocitype before inferring the size

svn path=/branches/mono-2-4/mcs/; revision=135312
2009-06-03 16:31:43 +00:00
Marek Habersack 622db0d809 Backport of r135307
svn path=/branches/mono-2-4/mcs/; revision=135308
2009-06-03 15:44:48 +00:00
Gonzalo Paniagua Javier 9f8949286a 2009-06-02 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: KeepAlive check not needed.
	Fixes bug #465613.


svn path=/branches/mono-2-4/mcs/; revision=135247
2009-06-02 22:13:50 +00:00
Gonzalo Paniagua Javier 0ea6d04a70 2009-06-02 Gonzalo Paniagua Javier <[email protected]>
* HttpConnection.cs: unbind the context after every read for keep-alive
	connections.
	Bug #502274 fixed.


svn path=/branches/mono-2-4/mcs/; revision=135242
2009-06-02 21:42:38 +00:00
Marek Habersack 6fedac8703 Backport of r135237
svn path=/branches/mono-2-4/mcs/; revision=135238
2009-06-02 21:27:30 +00:00
Veerapuram Varadhan df6f839eae 2009-06-03 Veerapuram Varadhan <[email protected]>
* OracleParameter.cs:  If a non-zero size is passed, update
	the size member but sizeSet is updated only when a non-null
	value is passed.

svn path=/branches/mono-2-4/mcs/; revision=135236
2009-06-02 21:09:06 +00:00
Gonzalo Paniagua Javier 2c79e8fd29 2009-06-02 Gonzalo Paniagua Javier <[email protected]>
* BuildManager.cs: allow deployment of precompiled applications under
	any virtual path, not just the default one used when precompiling.
	Fixes bug #483268.


svn path=/branches/mono-2-4/mcs/; revision=135232
2009-06-02 20:38:11 +00:00
Marek Habersack 8cce221351 Backport of r135205
svn path=/branches/mono-2-4/mcs/; revision=135206
2009-06-02 15:27:43 +00:00
Marek Habersack 12907a6ff5 Backport of r135147
svn path=/branches/mono-2-4/mcs/; revision=135148
2009-06-01 20:43:46 +00:00
Marek Habersack edce13a1d5 Backport of r135144
svn path=/branches/mono-2-4/mcs/; revision=135145
2009-06-01 20:18:28 +00:00
Rodrigo Kumpera 59b33685c6 2009-06-01 Rodrigo Kumpera <[email protected]>
* bug-508538.cs: New regression test.


svn path=/branches/mono-2-4/mono/; revision=135139
2009-06-01 18:47:20 +00:00
Rodrigo Kumpera e76bf9dc64 2009-06-01 Rodrigo Kumpera <[email protected]>
* marshal.c (mono_marshal_get_runtime_invoke): Emit the right kind
	of ldind opcode for generic instances so we don't fail for direct wrappers.

	Fixes #508538.


svn path=/branches/mono-2-4/mono/; revision=135138
2009-06-01 18:46:37 +00:00
Marek Habersack 9c8de626c2 Backport of r135134
svn path=/branches/mono-2-4/mcs/; revision=135135
2009-06-01 18:26:26 +00:00
Marek Habersack a48a335e5f Backport of r135057
svn path=/branches/mono-2-4/mcs/; revision=135058
2009-05-29 10:25:59 +00:00
Mark Probst 385565fad4 2009-05-28 Mark Probst <[email protected]>
* collection.c (_wapi_collection_init): If pthread_create() fails,
	try again with larger and then with no stack size set.  Fixes
	#470336.

	Backport of r134985.

svn path=/branches/mono-2-4/mono/; revision=134986
2009-05-28 19:54:38 +00:00
Rodrigo Kumpera 635e76be8e 2009-05-28 Rodrigo Kumpera <[email protected]>
Backport of r134810.

	* icall.c (ves_icall_Type_GetMethodsByName): Virtual methods should be
	discarded based on their most specific definition so we set the method_slots
	array before checking if the method is acceptable or not.

	Fixes #506757.


svn path=/branches/mono-2-4/mono/; revision=134944
2009-05-28 13:02:26 +00:00
Marek Habersack b32d5cd5c8 Backport of r134942
svn path=/branches/mono-2-4/mcs/; revision=134943
2009-05-28 12:34:59 +00:00
Marek Habersack 25134ad072 Backport of r134931
svn path=/branches/mono-2-4/mcs/; revision=134932
2009-05-28 09:03:48 +00:00
Marek Habersack 798a6ee9cf Backport of r134877
svn path=/branches/mono-2-4/mcs/; revision=134878
2009-05-27 20:54:42 +00:00
Andrew Jorgensen 01e82cb527 fix dist
svn path=/branches/mono-2-4/mcs/; revision=134874
2009-05-27 20:25:22 +00:00
Zoltan Varga cebff568eb 2009-05-27 Zoltan Varga <[email protected]>
* configure.in: Disable USE_MUNMAP on ppc to work around #504411.

svn path=/branches/mono-2-4/mono/; revision=134829
2009-05-27 12:26:05 +00:00
Zoltan Varga 92ff723bd0 2009-05-27 Zoltan Varga <[email protected]>
* AppDomain.cs (DoAssemblyResolve): Fix recursion detection. Fixes #507003.

svn path=/branches/mono-2-4/mcs/; revision=134825
2009-05-27 11:06:11 +00:00
Zoltan Varga 0ccffa1c56 2009-05-26 Zoltan Varga <[email protected]>
* mini-sparc.c (add_outarg_load): Fix the sparc build.

svn path=/branches/mono-2-4/mono/; revision=134800
2009-05-26 21:11:10 +00:00
Michael Barker 77884bdfa9 2009-05-25 Michael Barker <[email protected]>
* Removed amqp spec files and modified generated code to fix licensing 
	issues.

svn path=/branches/mono-2-4/mcs/; revision=134751
2009-05-26 10:52:31 +00:00
Marek Habersack d60167594d Backport of r134747
svn path=/branches/mono-2-4/mcs/; revision=134748
2009-05-26 10:02:27 +00:00
Rodrigo Kumpera c18b529f02 2009-05-25 Rodrigo Kumpera <[email protected]>
Backport of r134723.

	* class.c (mono_class_setup_fields): Don't mark simd types as having
	16 bytes alignment as the whole runtime doesn't support.


svn path=/branches/mono-2-4/mono/; revision=134724
2009-05-25 20:58:54 +00:00
Rodrigo Kumpera 83feb875fa 2009-05-25 Rodrigo Kumpera <[email protected]>
Backport of r134713/134715.

	* basic.cs: Add regression test for #506915.

	* method-to-ir.c (mono_method_to_ir): When doing the ldobj+stobj
	optimization we must check the bb of the first byte of stobj as
	it's the only one set in cil_offset_to_bb.

	Fixes #506915.	


svn path=/branches/mono-2-4/mono/; revision=134719
2009-05-25 19:04:10 +00:00
Marek Habersack bd9d2c3ecc Backport of r134682
svn path=/branches/mono-2-4/mcs/; revision=134683
2009-05-25 12:39:14 +00:00
Rodrigo Kumpera b5ef3f0ba0 2009-05-21 Rodrigo Kumpera <[email protected]>
Backport of r134536.

	* mini-x86.c (mono_arch_emit_call): The decompose code now supports
	decomposing 8 bytes structs into a LCALL.

	* mini-x86.c (emit_move_return_value): We no longer push the vtype
	pointer for where to store the returned regs.

	* decompose.c (mono_decompose_vtype_opts): Fix the comment to properly
	state the concern.

	Fixes #471747, #471751 and #4734530 (in fact, it's a bunch of dups).


svn path=/branches/mono-2-4/mono/; revision=134538
2009-05-21 14:55:04 +00:00
Marek Safar efb5876c2b 2009-05-21 Marek Safar <[email protected]>
A fix for bug #504667
	* class.cs: Check for static class using parent container instead of
	parent type.


svn path=/branches/mono-2-4/mcs/; revision=134524
2009-05-21 10:15:08 +00:00
Marek Safar baaa805118 2009-04-28 Marek Safar <[email protected]>
A fix for bug #495112
	* class.cs (IsUnmanagedType): Handle recursive unmanaged types using
	local cache.


svn path=/branches/mono-2-4/mcs/; revision=134522
2009-05-21 10:09:20 +00:00
Rodrigo Kumpera a5100746a9 2009-05-20 Rodrigo Kumpera <[email protected]>
Backport of r134470.

	* local-propagation.c (mono_local_cprop): Avoid local propagation
	across paired add/sub if the first instruction dest reg is it's
	source reg. For example:

	int_add_imm R12 <- R12 [1] clobbers: 1
	int_sub_imm R42 <- R12 [1] clobbers: 1

	The cprop pass would wrongly const prop + 1 to int_sub_imm which doesn't
	maintain the math identify.

	Fixes #505375.


svn path=/branches/mono-2-4/mono/; revision=134472
2009-05-20 19:52:20 +00:00
Dick Porter 7e797f40cd 2009-05-20 Dick Porter <[email protected]>
* XplatUICarbon.cs: Add more locking around MessageQueue
	manipulations.


svn path=/branches/mono-2-4/mcs/; revision=134466
2009-05-20 16:11:21 +00:00
Gonzalo Paniagua Javier c2c809fb85 revert. more things broken than fixed
svn path=/branches/mono-2-4/mcs/; revision=134364
2009-05-19 03:02:55 +00:00
Marek Habersack 6e9f407dfe Backport of r134342
svn path=/branches/mono-2-4/mcs/; revision=134343
2009-05-18 19:04:06 +00:00
Jb Evain b29ead8210 2009-05-18 Jb Evain <[email protected]>
backport of 134333.

	* Enumerable.cs (Max, Min): fix generic versions.


svn path=/branches/mono-2-4/mcs/; revision=134334
2009-05-18 17:09:15 +00:00
Veerapuram Varadhan 4a3d91e86d fix for #417398
svn path=/branches/mono-2-4/mcs/; revision=134314
2009-05-18 11:47:47 +00:00
Gonzalo Paniagua Javier 0320aca3ce 2009-05-16 Gonzalo Paniagua Javier <[email protected]>
* RouteCollection.cs: when there is no named route, try the current
	route before going through the list. The known values (default or
	not) for the current route are merged with the values provided when
	attempting to match.
	Example:
		Html.RouteLink ("Text", new { page = 5 });
	
	when the current path is /some/path-here and the route is:

		routes.MapRoute("RouteName", "some/{one}-{two}/{page}",
		new { controller = "Some", action = "Index", page = 1});


svn path=/branches/mono-2-4/mcs/; revision=134273
2009-05-16 09:41:11 +00:00
Gonzalo Paniagua Javier 175a146f47 2009-05-16 Gonzalo Paniagua Javier <[email protected]>
* HttpWebResponse.cs:
	* HttpWebRequest.cs: support automatic decompression of the response.
	Fixes bug #504391.



svn path=/branches/mono-2-4/mcs/; revision=134270
2009-05-16 05:47:12 +00:00
Veerapuram Varadhan 961333f673 2009-05-16 Veerapuram Varadhan <[email protected]>
** Fixes #325464 - ToolItems.xsd
	* CustomDataClassGenerator.cs (CreateDataSetTableMembers): Prefix a "_" to
	member names when it is same as that of the dataset.  Fixes the CS0542 error
	during compilation of the generated source.

svn path=/branches/mono-2-4/mcs/; revision=134264
2009-05-16 02:43:50 +00:00
Veerapuram Varadhan 7715562698 2009-05-16 Veerapuram Varadhan <[email protected]>
* Tds70.cs (WriteParameterInfo): fix r134256 backport errors.

svn path=/branches/mono-2-4/mcs/; revision=134262
2009-05-16 01:48:14 +00:00
Veerapuram Varadhan bf47ba5538 Nunit 2.4 changes and other sqlserver config fixes
svn path=/branches/mono-2-4/mcs/; revision=134261
2009-05-16 01:48:00 +00:00
Veerapuram Varadhan f114e716b0 Fix for bug #382589 and corresponding tests
svn path=/branches/mono-2-4/mcs/; revision=134260
2009-05-16 01:47:45 +00:00
Veerapuram Varadhan c0a0cb21a4 2009-05-16 Veerapuram Varadhan <[email protected]>
** Fixes #382589
	* Tds.cs (ServerTdsVersion): New property to access ServerVersion.

	* Tds70.cs (WriteParameterInfo): Treat Decimal types as Numeric
	types from SQL Server 2000.

	* TdsVersion.cs: Add SQL Server 2008 version.

svn path=/branches/mono-2-4/mcs/; revision=134259
2009-05-16 01:47:28 +00:00
Veerapuram Varadhan 2f6f1603b6 2009-09-15 Veerapuram Varadhan <[email protected]>
* OracleParameter.cs: Consider DBNull.Value as null and
	update size and sizeSet accordingly.

svn path=/branches/mono-2-4/mcs/; revision=134195
2009-05-15 11:04:10 +00:00
Veerapuram Varadhan 3730ece7de 2009-05-15 Veerapuram Varadhan <[email protected]>
** Fixes #424908
	* OracleParameter.cs:  Make sure size and sizeSet are properly
	updated whenever value changes.

svn path=/branches/mono-2-4/mcs/; revision=134194
2009-05-15 11:03:48 +00:00
Marek Habersack 953716e8cd Backport of r134176
svn path=/branches/mono-2-4/mcs/; revision=134177
2009-05-15 01:21:56 +00:00
Miguel de Icaza 00a66dbe5d Here as well
svn path=/branches/mono-2-4/mono/; revision=134145
2009-05-14 16:51:40 +00:00
Gonzalo Paniagua Javier cfa2cc2a08 2009-05-14 Gonzalo Paniagua Javier <[email protected]>
* TypeTest.cs: test for bug #503728


svn path=/branches/mono-2-4/mcs/; revision=134115
2009-05-14 10:24:18 +00:00
Gonzalo Paniagua Javier cccde54ea0 2009-05-14 Gonzalo Paniagua Javier <[email protected]>
* Type.cs: (GetInterfaceMap) 'this' can't be an interface itself.
	Fixed bug #503728.


svn path=/branches/mono-2-4/mcs/; revision=134113
2009-05-14 10:18:27 +00:00
Marek Habersack 6a5a182180 Backport r134097
svn path=/branches/mono-2-4/mcs/; revision=134098
2009-05-14 01:19:39 +00:00
Veerapuram Varadhan 1e81e3db35 2009-05-12 Veerapuram Varadhan <[email protected]>
** Fixes rest of #497715 - Patch by Jonas Larsson <[email protected]>
	* TdsMetaParameter.cs: Add support for XML type.  For now, handle
	XML type as just NVarchar.
	backport of r134079

svn path=/branches/mono-2-4/mcs/; revision=134080
2009-05-13 21:08:02 +00:00
Zoltan Varga 72a67245bd 2009-04-17 Zoltan Varga <[email protected]>
* mini-x86.c (mono_arch_output_basic_block): Add a few nops before
	indirect calls to simplify get_vcall_slot_addr (). Fixes #494567.
	(mono_arch_get_vcall_slot): Simplify this.

svn path=/branches/mono-2-4/mono/; revision=134066
2009-05-13 15:58:38 +00:00
Zoltan Varga 6a1d1d113b 2009-05-07 Zoltan Varga <[email protected]>
* aot-compiler.c (add_wrappers): Add remoting-invoke-with-check wrappers
	for virtual methods too.

svn path=/branches/mono-2-4/mono/; revision=134065
2009-05-13 15:58:31 +00:00
Gonzalo Paniagua Javier 5e4ee8006b 2009-05-12 Gonzalo Paniagua Javier <[email protected]>
* UrlPattern.cs: if the pattern is line {a}/{b} and {b} is substituted
	by an empty string, remove the '/' too.


svn path=/branches/mono-2-4/mcs/; revision=134027
2009-05-13 00:39:20 +00:00
Gonzalo Paniagua Javier c75f541751 2009-05-12 Gonzalo Paniagua Javier <[email protected]>
* UrlPattern.cs: non-string default arguments work now.


svn path=/branches/mono-2-4/mcs/; revision=134013
2009-05-12 23:17:26 +00:00
Marek Habersack 2f447342f4 Backport of r133997
svn path=/branches/mono-2-4/mcs/; revision=133998
2009-05-12 21:51:19 +00:00
Marek Habersack 0e67677eaa Backport of r133990
svn path=/branches/mono-2-4/mcs/; revision=133991
2009-05-12 20:38:03 +00:00
Gonzalo Paniagua Javier 3d4ef534d3 2009-05-11 Gonzalo Paniagua Javier <[email protected]>
* TcpClient.cs:
	* Socket.cs:
	* UdpClient.cs: use GetHostAddresses() instead of Resolve or
	GetHostEntry.


svn path=/branches/mono-2-4/mcs/; revision=133952
2009-05-12 03:56:07 +00:00
Gonzalo Paniagua Javier ea13af4c15 2009-05-11 Gonzalo Paniagua Javier <[email protected]>
* Dns.cs: made GetHostAddresses and friends internal for 1.x
	* EndpointPermission.cs: use GetHostAddresses.


svn path=/branches/mono-2-4/mcs/; revision=133950
2009-05-12 03:49:40 +00:00
Gonzalo Paniagua Javier dad8256567 2009-05-11 Gonzalo Paniagua Javier <[email protected]>
* UdpClient.cs: if possible, avoid DNS lookups when the host name is
	an IP address. Related to bug #502866.


svn path=/branches/mono-2-4/mcs/; revision=133945
2009-05-12 03:14:47 +00:00
Marek Habersack 0846bfde9c Backport of r133904
svn path=/branches/mono-2-4/mcs/; revision=133906
2009-05-11 17:12:33 +00:00
Gonzalo Paniagua Javier 1353d2bd9d fix prev patch
svn path=/branches/mono-2-4/mcs/; revision=133875
2009-05-11 04:14:07 +00:00
Gonzalo Paniagua Javier 04f27881b2 2009-05-10 Gonzalo Paniagua Javier <[email protected]>
* CookieContainer.cs: matching hosts to domain names like MS does.
	Bug #421827 fixed.


svn path=/branches/mono-2-4/mcs/; revision=133873
2009-05-11 03:58:26 +00:00
Gonzalo Paniagua Javier de95f52a19 2009-05-10 Gonzalo Paniagua Javier <[email protected]>
* CustomizableFileSettingsProvider.cs: make sure 'values' is
	initialized in Reset(). Fixes bug #436592.


svn path=/branches/mono-2-4/mcs/; revision=133867
2009-05-11 02:06:11 +00:00
Marek Habersack 766fa75d4e Backport of r133861
svn path=/branches/mono-2-4/mcs/; revision=133862
2009-05-10 20:29:36 +00:00
Marek Habersack 4ed3bd43af Backport of r129198
svn path=/branches/mono-2-4/mcs/; revision=133822
2009-05-08 22:21:10 +00:00
Andrés G. Aragoneses 12f967afbb Backport from trunk (r133814)
svn path=/branches/mono-2-4/mcs/; revision=133819
2009-05-08 21:19:07 +00:00
Brad Taylor dd219fbf4a 2009-05-08 Brad Taylor <[email protected]>
* DateTimePicker.cs: Add a UIA-specific property to ensure that if
	is_checkbox_checked is changed, we won't break.


svn path=/branches/mono-2-4/mcs/; revision=133816
2009-05-08 20:29:31 +00:00
Gonzalo Paniagua Javier 2b0da97307 2009-05-08 Gonzalo Paniagua Javier <[email protected]>
* Convert.cs: backport from HEAD.


svn path=/branches/mono-2-4/mcs/; revision=133813
2009-05-08 19:35:53 +00:00
Marek Safar ed03a4b616 Updated after some trunk runtime changes went to 2.4
svn path=/branches/mono-2-4/mcs/; revision=133795
2009-05-08 17:06:48 +00:00
Miguel de Icaza 990c2886cc Fix another
svn path=/branches/mono-2-4/mcs/; revision=133791
2009-05-08 16:36:33 +00:00
Miguel de Icaza e153058144 backport fix
svn path=/branches/mono-2-4/mcs/; revision=133790
2009-05-08 16:29:08 +00:00
Brad Taylor d3d4619649 2009-05-08 Brad Taylor <[email protected]>
* DateTimePicker.cs: Wrap UIA specific code in NET_2_0 wrappers.  Send
	OnUIASelectionChanged when ShowCheckbox is true and the checkbox
	recieves focus.  Part of fix for #502029.


svn path=/branches/mono-2-4/mcs/; revision=133782
2009-05-08 15:58:01 +00:00
Veerapuram Varadhan 7f83ae1ecb backport of r133769
svn path=/branches/mono-2-4/mcs/; revision=133771
2009-05-08 14:26:00 +00:00
Miguel de Icaza 0d61dc371a Backport pain removal
svn path=/branches/mono-2-4/mono/; revision=133753
2009-05-08 02:11:27 +00:00
Gonzalo Paniagua Javier 5a565524f2 2009-05-07 Gonzalo Paniagua Javier <[email protected]>
* MimeTypes.cs: add silverlight related types.


svn path=/branches/mono-2-4/mcs/; revision=133750
2009-05-07 21:42:04 +00:00
Gonzalo Paniagua Javier beb06f5ba3 2009-05-07 Gonzalo Paniagua Javier <[email protected]>
* Connection.cs: if the socket is already disconnected, Shutdown will
	fail with a SocketException... Also, catch *all* the possible
	exceptions since the socket.Close method could also throw
	ObjectDisposedException.
	Fixes bug #449092.


svn path=/branches/mono-2-4/mcs/; revision=133735
2009-05-07 18:14:37 +00:00
Jeffrey Stedfast 03879114a5 2009-04-22 Jeffrey Stedfast <[email protected]>
* src/gtimer-win32.c (g_timer_elapsed): Avoid re-querying freq by
	just saving it in a static variable. Also modified microseconds
	calculation to avoid overflow.


svn path=/branches/mono-2-4/mono/; revision=133723
2009-05-07 15:40:41 +00:00
Jb Evain 2c7c1705fb 2009-05-07 Jb Evain <[email protected]>
backport of r133710.

	* XElement.cs (Load (XmlReader,LoadOptions)): prevent a NRE if
	the provided XmlReader doesn't have existing settings.
	Fixes #501589.

svn path=/branches/mono-2-4/mcs/; revision=133712
2009-05-07 07:27:36 +00:00
Miguel de Icaza ee8b6bcbfb Backport changes
svn path=/branches/mono-2-4/mcs/; revision=133701
2009-05-07 00:44:22 +00:00
Mike Gorse 1b4d05a818 * FileDialog.cs: Add UIAFocusedItemChanged to PopupButtonPanel.
Add PerformClick and PerformDoubleClick to PopupButton.
Fixes #499851.

svn path=/branches/mono-2-4/mcs/; revision=133666
2009-05-06 15:16:00 +00:00
Miguel de Icaza 454bed799a Backport fixes from trunk to 2-4 for eglib
svn path=/branches/mono-2-4/mono/; revision=133661
2009-05-06 15:06:25 +00:00
Zoltan Varga 46e970f78a 2009-05-06 Zoltan Varga <[email protected]>
Backport of r133651.

	* aot-compiler.c aot-runtime.c: Use our own hash function instead of
	g_str_hash () which can change.

svn path=/branches/mono-2-4/mono/; revision=133654
2009-05-06 13:32:07 +00:00
Zoltan Varga 0fce1b7b6c 2009-05-06 Zoltan Varga <[email protected]>
* driver.c (mini_regression): Disable optimizations not supported by
	the cpu. Fixes #500019.

svn path=/branches/mono-2-4/mono/; revision=133647
2009-05-06 10:47:16 +00:00
Gonzalo Paniagua Javier 56369a2b24 2009-05-05 Gonzalo Paniagua Javier <[email protected]>
* io-layer/events.c: fix event_signal and namedevent_signal to actually signal
	the handle.

	* metadata/icall-def.h:
	* metadata/threads-types.h:
	* metadata/threads.c: added internal call for WaitHandle.SignalAndWait.

svn path=/branches/mono-2-4/mono/; revision=133631
2009-05-06 01:15:01 +00:00
Lluis Sanchez fc78b62d49 2009-05-06 Lluis Sanchez Gual <[email protected]>
* Lease.cs: Don't use ArrayList.Remove() to remove sponsors because
	it will end calling Equals, which may crash if the sponsor is not
	available anymore. Just compare references.


svn path=/branches/mono-2-4/mcs/; revision=133623
2009-05-05 23:21:13 +00:00
Lluis Sanchez 16f49ea247 2009-05-06 Lluis Sanchez Gual <[email protected]>
* RealProxy.cs: If async dispatch crashes, don't propagate the
	exception. The exception will be raised when calling EndInvoke.


svn path=/branches/mono-2-4/mcs/; revision=133622
2009-05-05 23:21:00 +00:00
Miguel de Icaza 26635baa7d 2009-05-05 Miguel de Icaza <[email protected]>
* Contribution from David Uvalle <[email protected]> that
	implements FileInfo.Replace.

svn path=/branches/mono-2-4/mcs/; revision=133618
2009-05-05 22:58:54 +00:00
Marek Habersack 28bef0dc2c Backport of r133606
svn path=/branches/mono-2-4/mcs/; revision=133607
2009-05-05 20:47:23 +00:00
Zoltan Varga 9212e1ffd0 2009-05-05 Zoltan Varga <[email protected]>
* genmdesc.pl (load_opcodes): Fix this after the TARGET_... changes.

svn path=/branches/mono-2-4/mono/; revision=133602
2009-05-05 19:31:11 +00:00
Miguel de Icaza ebffe8d0dc Do not build docs if cross compiling or the mcs build is disabled
svn path=/branches/mono-2-4/mono/; revision=133593
2009-05-05 17:42:26 +00:00
Miguel de Icaza 734c7df34b There was a missing \
svn path=/branches/mono-2-4/mono/; revision=133589
2009-05-05 17:21:30 +00:00
Marek Habersack 4807150835 Backport of r133577
svn path=/branches/mono-2-4/mcs/; revision=133578
2009-05-05 13:17:50 +00:00
Marek Habersack f5a339a061 Backport r133574
svn path=/branches/mono-2-4/mcs/; revision=133575
2009-05-05 12:30:55 +00:00
Marek Habersack 1e9b516492 Backport of r133568
svn path=/branches/mono-2-4/mcs/; revision=133569
2009-05-05 09:03:49 +00:00
Carlos Alberto Cortez 6dd8581aa1 2009-05-04 Carlos Alberto Cortez <[email protected]>
* ToolStripDropDown.cs: In OnVisibleChanged, if we have an OwnerItem,
	fire OnDropDownOpened/OnDropDownClosed depending on the new
	visibility. This also ensures that any direct access to this instance
	will fire the mentioned events for the OwnerItem.
	* ToolStripDropDownItem.cs: Remove the invocations to
	OnDropDownOpened/OnDropDownClosed, since they are handled in
	ToolStripDropDown, as well as updating the
	OnDropDownHide/OnDropDownShow calls to be in the right order.
	Fixes #496139.


svn path=/branches/mono-2-4/mcs/; revision=133554
2009-05-05 01:49:02 +00:00
Carlos Alberto Cortez f96863c0c0 2009-05-04 Carlos Alberto Cortez <[email protected]>
* MaskedTextBox.cs: If Insert is pressed, change the internal
	overwrite mode for our default value.
	Fixes some bits of #477395.


svn path=/branches/mono-2-4/mcs/; revision=133552
2009-05-05 01:45:40 +00:00
Carlos Alberto Cortez 65f53a293d 2009-05-04 Carlos Alberto Cortez <[email protected]>
* MaskedTextBox.cs: When setting Text use the very precise algorithm
	that .net uses: iterate over every char of the new value, trying to
	use every char, and use a normal call to MaskedTextProvider.Replace
	call if RejectInputOnFirstFailure is true. Fire OnMaskInputRejected 
	in case of error in both cases, as well.
	Fixes #477408.


svn path=/branches/mono-2-4/mcs/; revision=133551
2009-05-05 01:42:19 +00:00
Carlos Alberto Cortez 54983f1c97 2009-05-04 Carlos Alberto Cortez <[email protected]>
* MaskedTextBox.cs: Handle OnKeyDown to properly process the Delete
	key. Also create a new method to avoid code duplication between
	OnKeyDown and OnKeyPress.
	Fixes #477388.


svn path=/branches/mono-2-4/mcs/; revision=133550
2009-05-05 01:40:10 +00:00
Carlos Alberto Cortez a750705f64 2009-05-04 Carlos Alberto Cortez <[email protected]>
* MaskedTextBox.cs: In OnKeyPress the IsOverwriteMode check is
	actually inversed, so put it the right way. Also, don't automatically
	look for the next editable item after adding a new one, but way for
	the next insertion (this is what .net does) - this is not needed when
	MaskedTextProvider.InsertAt is called however, since it already looks for the
	next editable position.
	Fixes the remaining bits of #477383.


svn path=/branches/mono-2-4/mcs/; revision=133549
2009-05-05 01:35:56 +00:00
Carlos Alberto Cortez 6f5aeb8948 2009-05-04 Carlos Alberto Cortez <[email protected]>
* MaskedTextBox.cs: In OnKeyPress handle backspace by calling
	MaskedTextProvider.RemoveAt method. Also for setting the SelectionStart
	property after the text was modified, adjust the testPosition value
	depending on what method was called.
	Fixes part of #477383.


svn path=/branches/mono-2-4/mcs/; revision=133548
2009-05-05 01:33:47 +00:00
Andrés G. Aragoneses 7569f306e1 Backport from trunk (r133510)
svn path=/branches/mono-2-4/mcs/; revision=133512
2009-05-04 16:30:43 +00:00
Marek Habersack 3d96aa17e4 Backport of r133500
svn path=/branches/mono-2-4/mcs/; revision=133501
2009-05-04 13:30:12 +00:00
Gonzalo Paniagua Javier 13ae2a4d50 2009-05-03 Gonzalo Paniagua Javier <[email protected]>
* TermInfoDriver.cs: replace Peek with DataAvailable.


svn path=/branches/mono-2-4/mcs/; revision=133462
2009-05-04 03:40:12 +00:00
Gonzalo Paniagua Javier 37158959c3 2009-05-03 Gonzalo Paniagua Javier <[email protected]>
* Ping.cs: we just need the address(es), not a host entry. This avoids
	querying the DNS server(s) when the target is an IP address.


svn path=/branches/mono-2-4/mcs/; revision=133460
2009-05-04 03:14:44 +00:00
Sebastien Pouliot 951c613a76 2009-05-03 Sebastien Pouliot <[email protected]>
* MethodInfoTest.cs: Add test cases from Joachim Ante for bug
	#500385.
	[Backport of r133428]


svn path=/branches/mono-2-4/mcs/; revision=133430
2009-05-03 16:27:06 +00:00
Martin Baulig 70da744115 2009-05-03 Martin Baulig <[email protected]>
* debug-debugger.c (debugger_insert_source_breakpoint): Don't call
	mono_debugger_insert_method_breakpoint() since the class init
	handler we're inserting at the top of the method already gives us
	a notification.

svn path=/branches/mono-2-4/mono/; revision=133424
2009-05-03 12:44:37 +00:00
Veerapuram Varadhan 85e63d2cd5 ChangeLog conflict changes
svn path=/branches/mono-2-4/mcs/; revision=133363
2009-05-02 05:03:40 +00:00
Veerapuram Varadhan f249a2c1db 2009-04-19 Veerapuram Varadhan <[email protected]>
* Tds.cs (InitExec): Move initialization of state variables here.  Useful
	in case of asynchronous queries.

svn path=/branches/mono-2-4/mcs/; revision=133362
2009-05-02 05:03:20 +00:00
Veerapuram Varadhan 43bd6f2f86 2009-04-16 Veerapuram Varadhan <[email protected]>
* Tds.cs (ExecuteQuery): Reset all the variables related to LoadData when
	performing queries with SequentialAccess set to true.  Fixes incorrect
	handling of data retrieval when consecutive queries are run with
	SequentialAccess set to true.

svn path=/branches/mono-2-4/mcs/; revision=133361
2009-05-02 05:02:56 +00:00
Veerapuram Varadhan 4bc5df32e1 2009-04-14 Veerapuram Varadhan <[email protected]>
* Tds.cs (ExecuteQuery): Reset SequentialAccess read state variables
	in order to avoid blocking forever when two consecutive queries are
	executed with SequetialAccess set to true.

svn path=/branches/mono-2-4/mcs/; revision=133360
2009-05-02 05:02:33 +00:00
Veerapuram Varadhan e6367cc7d6 backport of r129377
svn path=/branches/mono-2-4/mcs/; revision=133359
2009-05-02 05:02:03 +00:00
Gonzalo Paniagua Javier a9e450aa11 2009-05-01 Gonzalo Paniagua Javier <[email protected]>
* SqliteConnection.cs: implement Dispose for 2.0. It was leaking an fd
	in using().
	Bug #499864 fixed.


svn path=/branches/mono-2-4/mcs/; revision=133255
2009-05-01 04:28:58 +00:00
Gonzalo Paniagua Javier cfcea6721d 2009-04-30 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: return the last error if a connect to multiple addresses
	fails.


svn path=/branches/mono-2-4/mcs/; revision=133253
2009-05-01 03:29:25 +00:00
Marek Habersack c452847c6e Backport of r133169
svn path=/branches/mono-2-4/mcs/; revision=133170
2009-04-30 10:54:01 +00:00
Zoltan Varga b5a9fcd4d3 2009-04-30 Zoltan Varga <[email protected]>
* appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Avoid
	returning refonly assemblies if refonly is FALSE. Fixes #499013.

svn path=/branches/mono-2-4/mono/; revision=133165
2009-04-30 07:37:56 +00:00
Zoltan Varga 212a86bd9d 2009-04-30 Zoltan Varga <[email protected]>
* aot-compiler.c (asm_writer_emit_writeout): Strip 'mapping symbols'
	when compiling for ARM.

svn path=/branches/mono-2-4/mono/; revision=133085
2009-04-29 22:41:19 +00:00
Gonzalo Paniagua Javier 4106ae8724 2009-04-29 Gonzalo Paniagua Javier <[email protected]>
* sockets.c: don't display a warning when connect() fails because the
	socket was closed in another thread.


svn path=/branches/mono-2-4/mono/; revision=133032
2009-04-29 16:01:18 +00:00
Zoltan Varga f7a6b3c10d 2009-04-29 Zoltan Varga <[email protected]>
* method-to-ir.c (inline_method): Save/Restore cfg->ret_var_set too.

svn path=/branches/mono-2-4/mono/; revision=133022
2009-04-29 15:05:24 +00:00
Marek Habersack 68fbdb13ff Backport of r132962
svn path=/branches/mono-2-4/mcs/; revision=133004
2009-04-29 13:27:49 +00:00
Zoltan Varga 378ea0e69a 2009-04-29 Zoltan Varga <[email protected]>
* mini.c (mini_method_compile): Use TARGET_<ARCH> defines instead of
	__<arch>__ defines in the JIT code.

svn path=/branches/mono-2-4/mono/; revision=132980
2009-04-29 10:00:32 +00:00
Zoltan Varga 2d66b2d667 2009-04-29 Zoltan Varga <[email protected]>
* *.h *.c: Use TARGET_<ARCH> defines instead of __<arch>__ defines in the
	JIT code.

svn path=/branches/mono-2-4/mono/; revision=132979
2009-04-29 09:43:51 +00:00
Zoltan Varga 1c8136a644 2009-04-28 Zoltan Varga <[email protected]>
* configure.in: Define a TARGET_<ARCH> preprocessor symbol for some
	architectures.

svn path=/branches/mono-2-4/mono/; revision=132978
2009-04-29 09:43:41 +00:00
Gonzalo Paniagua Javier c19e82d15a fix test
svn path=/branches/mono-2-4/mcs/; revision=132957
2009-04-29 05:42:16 +00:00
Gonzalo Paniagua Javier 4c4ea4bc09 2009-04-29 Gonzalo Paniagua Javier <[email protected]>
* Enum.cs: return the value as an enum of the right type.


svn path=/branches/mono-2-4/mcs/; revision=132954
2009-04-29 05:29:15 +00:00
Gonzalo Paniagua Javier 11da3ab5e4 fix changelog
svn path=/branches/mono-2-4/mcs/; revision=132948
2009-04-29 03:21:27 +00:00
Gonzalo Paniagua Javier 0ad99d28da 2009-04-13 Gonzalo Paniagua Javier <[email protected]>
* HttpUtility.cs: the collection returned from ParseQueryString knows
	how to convert the key/value pairs to a string.


svn path=/branches/mono-2-4/mcs/; revision=132947
2009-04-29 03:19:22 +00:00
Gonzalo Paniagua Javier 588cb965ee 2009-04-28 Gonzalo Paniagua Javier <[email protected]>
* Enum.cs: avoid exceptions from ToObject and use Try* instead.


svn path=/branches/mono-2-4/mcs/; revision=132945
2009-04-29 03:00:32 +00:00
Gonzalo Paniagua Javier 65b57eb6ac 2009-04-28 Gonzalo Paniagua Javier <[email protected]>
* SqlConnection.cs: if the error causes a disconnection from the
	server, close the data stream.


svn path=/branches/mono-2-4/mcs/; revision=132943
2009-04-29 02:55:23 +00:00
Gonzalo Paniagua Javier 4e7ab67563 changelog
svn path=/branches/mono-2-4/mcs/; revision=132941
2009-04-29 02:53:31 +00:00
Gonzalo Paniagua Javier 61602b310d 2009-04-28 Gonzalo Paniagua Javier <[email protected]>
* TdsConnectionPool.cs: if GetConnection() fails to create a
	connection, try again several times and then throw. Improved
	ResetConnectionPool() so that it does not immediately close
	connections in use. Don't re-add connections that have been closed.

	* Tds.cs: Connected tests the socket connection too. Made Disconnect()
	not throw.

	* TdsComm.cs: set more socket options (timeout and NoDelay) and have a
	single entry point for reading from the stream.


svn path=/branches/mono-2-4/mcs/; revision=132940
2009-04-29 02:53:11 +00:00
Zoltan Varga 510d3ffb5a 2009-04-29 Zoltan Varga <[email protected]>
* gc_wrapper.h: Disable thread-local alloc for arm too.

svn path=/branches/mono-2-4/mono/; revision=132913
2009-04-28 23:16:34 +00:00
Zoltan Varga ee0244dfc5 2009-01-25 Zoltan Varga <[email protected]>
* acinclude.m4 (dolt_supported): Handle ARM as well.

svn path=/branches/mono-2-4/mono/; revision=132904
2009-04-28 22:44:50 +00:00
Zoltan Varga 3eb001da36 2009-04-28 Zoltan Varga <[email protected]>
* configure.in: Add an option to disable the solaris tar check.

svn path=/branches/mono-2-4/mono/; revision=132900
2009-04-28 22:32:41 +00:00
Martin Baulig 29035caddf **** Backport of r130659 ****
2009-03-31  Martin Baulig  <[email protected]>

	* mono-debug-debugger.h (MonoDebuggerEvent): Add
	`MONO_DEBUGGER_EVENT_CREATE_APPDOMAIN' and
	`MONO_DEBUGGER_EVENT_UNLOAD_APPDOMAIN'.
	(mono_debugger_event_create_appdomain): New function.
	(mono_debugger_event_unload_appdomain): New function.

	* appdomain.c (mono_domain_create_appdomain_internal): Call
	mono_debugger_event_create_appdomain().

svn path=/branches/mono-2-4/mono/; revision=132892
2009-04-28 21:11:23 +00:00
Martin Baulig 77754c9b71 **** Backport of r130658 ****
2009-03-31  Martin Baulig  <[email protected]>

	* debug-debugger.c (debugger_remove_breakpoint): Call
	mono_debugger_remove_class_init_callback ().

2009-03-31  Martin Baulig  <[email protected]>

	* mono-debug-debugger.c
	(mono_debugger_register_class_init_callback): Also register the
	class init callback if the class is already initialized to make
	things work with shadow copied assemblies.

svn path=/branches/mono-2-4/mono/; revision=132891
2009-04-28 21:11:07 +00:00
Zoltan Varga 70a3b232fd 2009-04-28 Zoltan Varga <[email protected]>
* image.c (mono_image_fixup_vtable): Avoid casting an lvalue. Fixes
	part of #498692.

svn path=/branches/mono-2-4/mono/; revision=132877
2009-04-28 18:12:40 +00:00
Zoltan Varga 6203a2757a 2009-04-28 Zoltan Varga <[email protected]>
* misc.c (GC_init): Avoid casting an lvalue. Fixes part of #498692.

svn path=/branches/mono-2-4/mono/; revision=132876
2009-04-28 18:12:32 +00:00
Zoltan Varga c294459c83 2009-04-23 Tom Hindle <[email protected]>
* cominterop.c (ves_icall_System_Runtime_InteropServices_Marshal_ReleaseComObjectInternal):
	changed to match .Net behaviour of not aborting on additional calls to ReleaseComObject.

svn path=/branches/mono-2-4/mono/; revision=132873
2009-04-28 18:02:13 +00:00
Gonzalo Paniagua Javier f639f4a183 2009-04-28 Gonzalo Paniagua Javier <[email protected]>
* ConsoleTraceListener.cs: add an internal constructor that takes a
	string argument. Used when 'initializeData' is set.
	* DiagnosticsConfigurationHandler.cs: try internal constructors when
	the assembly is System.
	Fixes bug #498853.


svn path=/branches/mono-2-4/mcs/; revision=132869
2009-04-28 17:47:49 +00:00
Miguel de Icaza 04470304fc Update: +EXPR was never supported, just EXPR
svn path=/branches/mono-2-4/mono/; revision=132849
2009-04-28 14:53:51 +00:00
Marek Habersack 8010c932da Backport of r132812
svn path=/branches/mono-2-4/mcs/; revision=132813
2009-04-28 08:40:04 +00:00
Andrés G. Aragoneses 864052686a backport r132782
svn path=/branches/mono-2-4/mcs/; revision=132783
2009-04-27 20:35:41 +00:00
Brad Taylor 95f681ad07 2009-04-27 Brad Taylor <[email protected]>
* ToolStripButton.cs: Emit an internal event when CheckOnClick is
	changed.


svn path=/branches/mono-2-4/mcs/; revision=132780
2009-04-27 20:14:01 +00:00
Gonzalo Paniagua Javier f983adfba7 2009-04-27 Gonzalo Paniagua Javier <[email protected]>
* assembly.c: assemblies in the GAC should never be shadow-copied.


svn path=/branches/mono-2-4/mono/; revision=132765
2009-04-27 16:34:37 +00:00
Marek Habersack ad2ff59c4e Backport of r130971
svn path=/branches/mono-2-4/mcs/; revision=132708
2009-04-27 07:06:49 +00:00
Miguel de Icaza 353e721243 Backport:
2009-04-25  Miguel de Icaza  <[email protected]>

	* StreamReader.cs (DataAvailable): New internal function to work
	around the fact that StreamReaders are now blocking on Peek(), and
	that our own Console.TermInfoDriver used Peek() as a way of
	probing if there was data on a stream before to avoid blocking. o

2009-04-25  Miguel de Icaza  <[email protected]>

	* TermInfoDriver.cs: Use the new StreamReader.DataAvailable to
	load all the data that was added into the `stdin' stream when we
	did the `Read'.


svn path=/branches/mono-2-4/mcs/; revision=132671
2009-04-25 19:33:31 +00:00
Miguel de Icaza 6d8d1190c8 Reapply the fix from Gonzalo for 496905 and apply his patch to TermInfodriver that fixes csharp usage
svn path=/branches/mono-2-4/mcs/; revision=132669
2009-04-25 19:04:47 +00:00
Miguel de Icaza 9f8610512d 2009-04-25 Miguel de Icaza <[email protected]>
Backport of r129367
	
        * Convert.cs (ToType): Control whether this internal function will
        call an IConvertible.ToType method or not.

        Classes and structs implementing IConvertible in mscorlib (the
        only callers that can access Convert.ToType) must pass false to
        avoid a infinite recursion problem and callers from the public
        Convert API must call it with true.

        This fixes the regression reported in #485377 that was introduced
        by the fix for #481687.

        * Int16.cs, UInt64.cs, Double.cs, Enum.cs, SByte.cs, UInt16.cs,
        Byte.cs, Decimal.cs, Int32.cs, String.cs, Int64.cs, Char.cs,
        Boolean.cs, Single.cs, UInt32.cs: Update the call sites.

svn path=/branches/mono-2-4/mcs/; revision=132668
2009-04-25 19:03:52 +00:00
Miguel de Icaza 82183bbfbd Revert 132603, 132604 as it made the csharp console stop working
svn path=/branches/mono-2-4/mcs/; revision=132639
2009-04-24 23:47:29 +00:00
Marek Habersack aeb9042fbf Backport of r132619
svn path=/branches/mono-2-4/mcs/; revision=132620
2009-04-24 20:56:02 +00:00
Marek Habersack e4a8ce3b6c Backport of r132617
svn path=/branches/mono-2-4/mcs/; revision=132618
2009-04-24 20:44:48 +00:00
Marek Habersack 669895404a Backport of r132607
svn path=/branches/mono-2-4/mcs/; revision=132608
2009-04-24 18:54:59 +00:00
Gonzalo Paniagua Javier 0cbba93484 2009-04-24 Gonzalo Paniagua Javier <[email protected]>
* StreamReader.cs: if Peek() needs to block, do it.
	Fixes bug #496905.


svn path=/branches/mono-2-4/mcs/; revision=132604
2009-04-24 16:46:47 +00:00
Gonzalo Paniagua Javier 85abf75e04 2009-04-24 Gonzalo Paniagua Javier <[email protected]>
* StreamReaderTest.cs: new test. Using Peek() when we did a short read
	should block if needed.


svn path=/branches/mono-2-4/mcs/; revision=132603
2009-04-24 16:46:37 +00:00
Zoltan Varga 5ae581bcdd 2009-02-22 Zoltan Varga <[email protected]>
* threads.c (mono_thread_suspend_all_other_threads): Handle the case when
	the a thread does not suspend within 100ms.

	* monitor.c (mono_monitor_try_enter_internal): Handle SuspendRequested
	in addition to StopRequested as well.

svn path=/branches/mono-2-4/mono/; revision=132494
2009-04-23 17:47:52 +00:00
Marek Habersack ff03387d96 Backport of r132482
svn path=/branches/mono-2-4/mcs/; revision=132483
2009-04-23 16:48:13 +00:00
Gonzalo Paniagua Javier ea3901feb9 2009-04-22 Gonzalo Paniagua Javier <[email protected]>
* Win32Exception.cs: made W32ErrorMessage internal.


svn path=/branches/mono-2-4/mcs/; revision=132395
2009-04-22 19:01:36 +00:00
Gonzalo Paniagua Javier 53e2b831d2 2009-04-22 Gonzalo Paniagua Javier <[email protected]>
* Microsoft.CSharp/CSharpCodeCompiler.cs:
	* Microsoft.VisualBasic/VBCodeCompiler.cs: better error when there's a
	problem running the specified exec.


svn path=/branches/mono-2-4/mcs/; revision=132391
2009-04-22 18:37:47 +00:00
Marek Habersack 13ff6c52c4 Backport of r132366
svn path=/branches/mono-2-4/mcs/; revision=132367
2009-04-22 14:56:22 +00:00
Zoltan Varga 5027d8438f 2009-04-22 Zoltan Varga <[email protected]>
* method-to-ir.c (mono_method_to_ir): Force init_locals to be TRUE
	to prevent asserts in various passes. Fixes #497220.

svn path=/branches/mono-2-4/mono/; revision=132365
2009-04-22 13:06:14 +00:00
Gonzalo Paniagua Javier e14429066c 2009-04-21 Gonzalo Paniagua Javier <[email protected]>
* HttpSoapWebServiceHandler.cs: provide the full stack trace instead
	of just the Message to aid in debugging web service problems.
	Bug #496758 fixed.


svn path=/branches/mono-2-4/mcs/; revision=132336
2009-04-21 22:42:06 +00:00
Marek Habersack 0ec0584d37 Backport of r132312
svn path=/branches/mono-2-4/mcs/; revision=132313
2009-04-21 19:57:28 +00:00
Marek Habersack a62741d0f9 Backport of r132300
svn path=/branches/mono-2-4/mcs/; revision=132302
2009-04-21 17:54:52 +00:00
Zoltan Varga 86eb24ad8c 2009-04-21 Zoltan Varga <[email protected]>
* mini-trampolines.c (mono_generic_class_init_trampoline): Remove
	a racy assert.

svn path=/branches/mono-2-4/mono/; revision=132301
2009-04-21 17:54:46 +00:00
Gonzalo Paniagua Javier 2ffdbbf908 2009-04-21 Gonzalo Paniagua Javier <[email protected]>
* DnsTest.cs: new IP for go-mono and fix AsyncResolve test.


svn path=/branches/mono-2-4/mcs/; revision=132295
2009-04-21 17:03:35 +00:00
Gonzalo Paniagua Javier 26c6c53f56 2009-04-21 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: End* methods can only be called once per IAsyncResult.
	Bug #466031 fixed.


svn path=/branches/mono-2-4/mcs/; revision=132222
2009-04-21 04:54:48 +00:00
Miguel de Icaza 6af6410175 backport
svn path=/branches/mono-2-4/mono/; revision=132219
2009-04-21 00:41:05 +00:00
Miguel de Icaza b577be87cf Backport
svn path=/branches/mono-2-4/mcs/; revision=132020
2009-04-17 16:31:45 +00:00
Marek Habersack c40b89e6fc Backport of r131983
svn path=/branches/mono-2-4/mcs/; revision=131984
2009-04-17 09:39:27 +00:00
Marek Habersack 976e225e29 Backport of r131977
svn path=/branches/mono-2-4/mcs/; revision=131978
2009-04-17 07:41:56 +00:00
Zoltan Varga 2c0ab98242 2009-04-16 Zoltan Varga <[email protected]>
* aot-compiler.c (mono_xdebug_init): Fix the DISABLE_AOT build.

svn path=/branches/mono-2-4/mono/; revision=131940
2009-04-16 20:44:28 +00:00
Sebastien Pouliot 55430eba96 2009-04-16 Sebastien Pouliot <[email protected]>
* IsolatedStorageFile.cs: Fix thread-safety issue at creation time.
	[Fix bug #431039]
	* IsolatedStorageFileStream.cs: Fix missing path check in Verify.
	[Fix bug #487659]
	[Backport of SVN r131886]


svn path=/branches/mono-2-4/mcs/; revision=131890
2009-04-16 12:29:43 +00:00
Marek Habersack 48bf31774c Backport of r131888
svn path=/branches/mono-2-4/mcs/; revision=131889
2009-04-16 12:27:27 +00:00
Marek Habersack e7c3dc6d6d Backport of r131874
svn path=/branches/mono-2-4/mcs/; revision=131875
2009-04-16 09:52:32 +00:00
Martin Baulig efbba49bb6 2009-04-15 Martin Baulig <[email protected]>
**** Backport of r131819 ****

	* MonoSymbolWriter.cs: Move `ISourceFile', `ICompileUnit' and
	`IMethodDef' into MonoSymbolFile.cs.  This allows us to use the
	symbol reader part without MonoSymbolWriter.cs.


svn path=/branches/mono-2-4/mcs/; revision=131820
2009-04-15 19:45:25 +00:00
Martin Baulig 0418900afe 2009-04-15 Martin Baulig <[email protected]>
**** Backport of r131801 ****

	* MonoSymbolTable.cs
	(LineNumberTable.DW_LNE_MONO__extensions_start): New const.
	(LineNumberTable.DW_LNE_MONO__extensions_end): New const.
	(LineNumberTable.DoRead): Ignore unknown extended opcodes if
	they're within the Mono extension range.


svn path=/branches/mono-2-4/mcs/; revision=131806
2009-04-15 18:07:19 +00:00
Martin Baulig 177033b01d 2009-04-15 Martin Baulig <[email protected]>
**** Backport of r131800 ****

	* debug-mono-symfile.c
	(mono_debug_symfile_lookup_location): Don't print a warning for
	unknown extended opcodes if they're within 0x40 and 0x7f.


svn path=/branches/mono-2-4/mono/; revision=131803
2009-04-15 18:02:31 +00:00
Marek Habersack 3868815d93 Backport of r131768
svn path=/branches/mono-2-4/mcs/; revision=131769
2009-04-15 13:33:25 +00:00
Marek Habersack a8f6747a1d Backport of r131752
svn path=/branches/mono-2-4/mcs/; revision=131753
2009-04-15 11:11:58 +00:00
Marek Habersack 95094b546f Backport of r131734
svn path=/branches/mono-2-4/mcs/; revision=131735
2009-04-15 07:25:34 +00:00
Gonzalo Paniagua Javier 42adc1fadf 2009-04-15 Gonzalo Paniagua Javier <[email protected]>
* HtmlInputText.cs: make sure we're inside a Page before dereferencing
	it.


svn path=/branches/mono-2-4/mcs/; revision=131731
2009-04-15 05:42:00 +00:00
Gonzalo Paniagua Javier fbb0a1d700 2009-04-13 Gonzalo Paniagua Javier <[email protected]>
* HttpUtility.cs: the collection returned from ParseQueryString knows
	how to convert the key/value pairs to a string.


svn path=/branches/mono-2-4/mcs/; revision=131600
2009-04-13 16:28:42 +00:00
Marek Safar dba6b90691 Updated.
svn path=/branches/mono-2-4/mcs/; revision=131591
2009-04-13 13:41:29 +00:00
Marek Safar 359ff00cea 2009-04-13 Marek Safar <[email protected]>
A fix for bug #493887
	* statement.cs: Don't skip string multi-section with default or
	null label when populating string hashtable.


svn path=/branches/mono-2-4/mcs/; revision=131590
2009-04-13 13:40:55 +00:00
Marek Safar 0da086728d Updated.
svn path=/branches/mono-2-4/mcs/; revision=131523
2009-04-11 16:57:08 +00:00
Marek Safar f3762672ee 2009-04-11 Marek Safar <[email protected]>
A fix for bug #492329
	* expression.cs (New): Workaround broken TypeManager.IsValueType.


svn path=/branches/mono-2-4/mcs/; revision=131522
2009-04-11 16:56:55 +00:00
Marek Habersack 8fab207e32 Backport of r131511
svn path=/branches/mono-2-4/mcs/; revision=131512
2009-04-11 13:37:11 +00:00
Zoltan Varga 3add210d9b 2009-04-10 Zoltan Varga <[email protected]>
* include/private/gc_locks.h (GC_test_and_set): Merge a change from libgc
	7.1's libatomic-ops to fix the ppc build with gcc 4.4.

svn path=/branches/mono-2-4/mono/; revision=131472
2009-04-10 14:34:27 +00:00
Marek Habersack ff746e27dc 2009-04-10 Marek Habersack <[email protected]>
* BuildManager.cs: enabled recursion checking for page
	targets. Also, if a built item is skipped because it has been
	compiled recursively, add its assembly to the list of referenced
	assemblies for the batch being currently compiled.

svn path=/branches/mono-2-4/mcs/; revision=131466
2009-04-10 10:10:04 +00:00
Gonzalo Paniagua Javier d92ce85174 2009-03-25 Gonzalo Paniagua Javier <[email protected]>
* HttpResponse.cs: ClearHeaders() also resets cacheability.
	Bug #485557 fixed.


svn path=/branches/mono-2-4/mcs/; revision=131452
2009-04-10 04:48:30 +00:00
Jonathan Pryor c4d730fecd * mdoc-update.1: Document -L, -r options.
svn path=/branches/mono-2-4/mono/; revision=131448
2009-04-10 02:05:25 +00:00
Jonathan Pryor f3af0d49c9 * Mono.Documentation/monodocer.cs: Using a single IAssemblyResolver is
an improvement, but doesn't fix all problems.  In particular, some
	  assemblies will depend upon other assemblies to load (e.g. 3rd party
	  assemblies) but these dependent assemblies shouldn't be documented.
	  Add support for -r:ASSEMBLY and -L:DIRECTORY arguments to allow the
	  user to manually add to the assembly search path so that assemblies
	  can be found.  Assemblies added via -r will NOT be documented.

svn path=/branches/mono-2-4/mcs/; revision=131446
2009-04-10 01:45:54 +00:00
Zoltan Varga 5e58dfc8f1 2009-04-09 Zoltan Varga <[email protected]>
* mini-arm.h: Error out if VFP support is requested, since its not
	complete in 2.4.

svn path=/branches/mono-2-4/mono/; revision=131425
2009-04-09 20:52:11 +00:00
Jonathan Pryor 56fb74913a * Mono.Documentation/monodocer.cs: Use a single IAssemblyResolver
shared amongst all AssemblyDefinitions to resolve assembly/type
	  references with Cecil.  Otherwise, if we have deeply nested
	  directories with cross-directory assembly dependencies, then Cecil
	  won't find the necessary assemblies (e.g. b/bin/Debug/b.dll has a
	  type which inherits from a/bin/Debug/a.dll -- here, we'll have two
	  separate AssemblyDefinitions, and when b.dll's AssemblyDefinition
	  tries to resolve types from a.dll, it fails).
	  See: http://lists.ximian.com/pipermail/mono-devel-list/2009-April/031646.html

svn path=/branches/mono-2-4/mcs/; revision=131366
2009-04-08 21:39:48 +00:00
Marek Habersack 977f185512 Backport of r131314
svn path=/branches/mono-2-4/mcs/; revision=131316
2009-04-08 11:32:54 +00:00
Marek Habersack 0fd7dba26a Backport of r131225
svn path=/branches/mono-2-4/mcs/; revision=131226
2009-04-07 13:06:19 +00:00
Marek Habersack 04b1406fa8 Backport of r131214
svn path=/branches/mono-2-4/mcs/; revision=131215
2009-04-07 10:56:57 +00:00
Marek Habersack 1e4e6fbc02 Backport of r131210
svn path=/branches/mono-2-4/mcs/; revision=131211
2009-04-07 10:45:26 +00:00
Gonzalo Paniagua Javier f001027f81 2009-04-06 Gonzalo Paniagua Javier <[email protected]>
* FtpWebRequest.cs: send REST after PASV to avoid some servers
	forgetting aboout it.
	Bug #491590 fixed.


svn path=/branches/mono-2-4/mcs/; revision=131181
2009-04-07 00:05:40 +00:00
Marek Habersack 8f7f035288 Fix the build
svn path=/branches/mono-2-4/mcs/; revision=131106
2009-04-06 11:00:27 +00:00
Marek Safar f44d422aef 2009-04-06 Marek Safar <[email protected]>
A fix for bug #492329
	* expression.cs (New): Load variable when assigning type parameter
	to ref variable.


svn path=/branches/mono-2-4/mcs/; revision=131103
2009-04-06 10:35:58 +00:00
Marek Safar 8d8ae6a36a 2009-04-06 Marek Safar <[email protected]>
A fix for bug #488960
	* decl.cs: Compare MVAR types using non-null values.


svn path=/branches/mono-2-4/mcs/; revision=131099
2009-04-06 09:04:36 +00:00
Veerapuram Varadhan c77179d098 New: IntervalDescriptor implementation file
Implements  basic OciInterval types handling


Conflicts:

svn path=/branches/mono-2-4/mcs/; revision=131092
2009-04-06 05:36:47 +00:00
Veerapuram Varadhan 6e1812bf0c backport of r130709
svn path=/branches/mono-2-4/mcs/; revision=131091
2009-04-06 05:32:01 +00:00
Veerapuram Varadhan 66cf3e30bd backport or r130490
svn path=/branches/mono-2-4/mcs/; revision=131090
2009-04-06 05:31:43 +00:00
Veerapuram Varadhan 2c16e09089 backport of r129864
svn path=/branches/mono-2-4/mcs/; revision=131089
2009-04-06 05:31:22 +00:00
Gonzalo Paniagua Javier 397c889bbb fix the 1.1 build
svn path=/branches/mono-2-4/mcs/; revision=131057
2009-04-04 20:30:36 +00:00
Gonzalo Paniagua Javier 4384904433 2009-04-04 Gonzalo Paniagua Javier <[email protected]>
* AssemblyResourceLoader.cs: MS sets cacheability to public. Add
	Last-Modified header and return 304 if validating max-age=0 or
	If-Modified-Since succeeds.


svn path=/branches/mono-2-4/mcs/; revision=131054
2009-04-04 19:53:38 +00:00
Marek Habersack 4b303da408 Backport of r130982
svn path=/branches/mono-2-4/mcs/; revision=130983
2009-04-03 16:38:45 +00:00
Marek Habersack 1e7ab5d674 Backport of r130979
svn path=/branches/mono-2-4/mcs/; revision=130980
2009-04-03 16:02:31 +00:00
Marek Habersack 2cb87f749f Backport of r130972
svn path=/branches/mono-2-4/mcs/; revision=130973
2009-04-03 14:49:42 +00:00
Jb Evain cc67b3f262 2009-04-03 Jb Evain <[email protected]>
backport of 130961.

	* Enumerable.cs (Cast): fix for when casted enumerator is already
	of the appropriate type.


svn path=/branches/mono-2-4/mcs/; revision=130962
2009-04-03 10:50:01 +00:00
Jb Evain b9a774091e 2009-04-02 Jb Evain <[email protected]>
backport of r130884 and r130886.

	* Dictionary.cs (ValueCollection.CopyTo): fix for copying to
	an object array. Based on a patch by Tobias Grimm <[email protected]>.
	Fixes bug #328036.


svn path=/branches/mono-2-4/mcs/; revision=130887
2009-04-02 17:45:23 +00:00
Gonzalo Paniagua Javier 2139bcdf86 Backport from HEAD. Fixes bug #491343
svn path=/branches/mono-2-4/mcs/; revision=130838
2009-04-02 06:56:51 +00:00
Marek Habersack 3c0ad436fb Backport of r130763
svn path=/branches/mono-2-4/mcs/; revision=130793
2009-04-01 19:40:58 +00:00
Marek Habersack 2236b4015f Backport of r130755
svn path=/branches/mono-2-4/mcs/; revision=130792
2009-04-01 19:40:22 +00:00
Marek Habersack 157df7b1ec Backport of r130720
svn path=/branches/mono-2-4/mcs/; revision=130791
2009-04-01 19:39:43 +00:00
Marek Habersack fea6fcdd64 Backport of r130694
svn path=/branches/mono-2-4/mcs/; revision=130790
2009-04-01 19:39:08 +00:00
Marek Habersack 4ec4514bb4 Backport of r130683
svn path=/branches/mono-2-4/mcs/; revision=130789
2009-04-01 19:38:38 +00:00
Marek Habersack 20a17e606b Backport of r130682
svn path=/branches/mono-2-4/mcs/; revision=130788
2009-04-01 19:37:59 +00:00
Marek Habersack 91a8d0b50e Backport of r130667
svn path=/branches/mono-2-4/mono/; revision=130787
2009-04-01 19:36:49 +00:00
Marek Habersack 098c748a2f Backport of r130666
svn path=/branches/mono-2-4/mcs/; revision=130786
2009-04-01 19:35:38 +00:00
Marek Habersack 04bcffdc88 Backport of r130665
svn path=/branches/mono-2-4/mcs/; revision=130785
2009-04-01 19:34:55 +00:00
Marek Habersack c27009892d Patch applied incorrectly, compilation fix
svn path=/branches/mono-2-4/mcs/; revision=130782
2009-04-01 18:58:48 +00:00
Marek Habersack dd8e821949 Compilation fix
svn path=/branches/mono-2-4/mcs/; revision=130781
2009-04-01 18:33:04 +00:00
Marek Habersack ceffc7cd26 Backport of r130664
svn path=/branches/mono-2-4/mcs/; revision=130777
2009-04-01 18:14:01 +00:00
Marek Habersack 4ed410f2d4 Backport of r130566
svn path=/branches/mono-2-4/mcs/; revision=130776
2009-04-01 18:12:20 +00:00
Marek Habersack 72e57f5e4a Backport of r130245
svn path=/branches/mono-2-4/mcs/; revision=130773
2009-04-01 17:54:58 +00:00
Marek Habersack 2ea525d40d Backport of r130244
svn path=/branches/mono-2-4/mcs/; revision=130772
2009-04-01 17:54:23 +00:00
Marek Habersack 9b4bd2ba33 Partial backport of r130082
svn path=/branches/mono-2-4/mcs/; revision=130771
2009-04-01 17:44:25 +00:00
Gonzalo Paniagua Javier 1bc76374a8 2009-03-31 Gonzalo Paniagua Javier <[email protected]>
* socket-io.c: don't fail if the SocketOptionsFlag has Partial or
	* MaxIOVectorLength enabled, just ignore them.
	Fixes bug #349688.


svn path=/branches/mono-2-4/mono/; revision=130614
2009-03-31 06:25:33 +00:00
Zoltan Varga 6e0124eebd 2009-03-29 Zoltan Varga <[email protected]>
* CodeGenerator.cs: Add synchronization as SRE is not thread safe.

svn path=/branches/mono-2-4/mcs/; revision=130485
2009-03-29 02:31:28 +00:00
Jb Evain 501b6c8951 2009-03-28 Jb Evain <[email protected]>
backport of r130478.

	* Enumerable.cs: fix Intersect.


svn path=/branches/mono-2-4/mcs/; revision=130480
2009-03-28 22:00:55 +00:00
Zoltan Varga d319651008 2009-03-17 Zoltan Varga <[email protected]>
* mini-exceptions.c (get_generic_info_from_stack_frame): Avoid returning
	a managed object which is later put into a GList. Return its class instead.

	* mini.c (mono_allocate_stack_slots_full): Avoid sharing ref and non-ref
	stack slots when using sgen.

svn path=/branches/mono-2-4/mono/; revision=130475
2009-03-28 19:04:58 +00:00
Zoltan Varga a9a9b35b65 2009-01-26 Zoltan Varga <[email protected]>
* marshal.c (mono_marshal_load_type_info): Fill out info->min_align.
	(mono_class_native_size): Use klass->marshal_info->min_align instead of
	klass->min_align, since klass->min_align contains the managed alignment,
	while the native alignment can be different, like for longs on x86.
	Fixes #469135.

	* class-internals.h (MonoMarshalType): Add a min_align field.

svn path=/branches/mono-2-4/mono/; revision=130473
2009-03-28 17:58:41 +00:00
Gonzalo Paniagua Javier 8d94c7d98a 2009-03-27 Gonzalo Paniagua Javier <[email protected]>
* appdomain.c:
	* console-io.[ch]: added new mono_console_init() to make sure that
	file descriptors 0, 1 and 2 are opened.
	Bug #489019 fixed.


svn path=/branches/mono-2-4/mono/; revision=130425
2009-03-27 20:07:48 +00:00
Gonzalo Paniagua Javier 3072976517 2009-03-27 Gonzalo Paniagua Javier <[email protected]>
* DefaultWsdlHelpGenerator.aspx: disable the test form
	when only Soap is supported.
	Bug #342073 fixed.


svn path=/branches/mono-2-4/mono/; revision=130401
2009-03-27 15:52:17 +00:00
Zoltan Varga 2d0fb10dc2 2009-03-27 Zoltan Varga <[email protected]>
* method-to-ir.c (mono_method_to_ir): Disable tail calls for calls which
	return a valuetype. Fixes #487518.

	* iltests.il: Add a test.

svn path=/branches/mono-2-4/mono/; revision=130391
2009-03-27 14:08:27 +00:00
Zoltan Varga c02e3ec1b5 2009-03-26 Zoltan Varga <[email protected]>
* pinvoke2.cs: Add a test for #488670.

svn path=/branches/mono-2-4/mono/; revision=130260
2009-03-25 23:49:10 +00:00
Zoltan Varga 32f261dbd1 2009-03-26 Zoltan Varga <[email protected]>
* marshal.c (emit_marshal_object): Generate code to throw an exception
	instead of throwing it. Fixes #488670.


Conflicts:

	mono/metadata/ChangeLog

svn path=/branches/mono-2-4/mono/; revision=130259
2009-03-25 23:49:03 +00:00
Gonzalo Paniagua Javier 7b22ebc970 2009-03-25 Gonzalo Paniagua Javier <[email protected]>
* HttpResponse.cs: ClearHeaders() also resets cacheability.
	Bug #485557 fixed.


svn path=/branches/mono-2-4/mcs/; revision=130189
2009-03-25 05:20:20 +00:00
Gonzalo Paniagua Javier d58ae94cd3 2009-03-24 Gonzalo Paniagua Javier <[email protected]>
* FtpWebRequest.cs: we were sending CWD instead of PWD.
	Bug #486703 fixed.


svn path=/branches/mono-2-4/mcs/; revision=130158
2009-03-24 21:09:03 +00:00
Gonzalo Paniagua Javier cba68a1e89 2009-03-24 Gonzalo Paniagua Javier <[email protected]>
* Ping.cs: MacOS has different arguments for ping.
	Bug #486904 fixed.


svn path=/branches/mono-2-4/mcs/; revision=130155
2009-03-24 21:00:26 +00:00
Zoltan Varga 3f6c9d13ed In metadata/
2009-03-23  Zoltan Varga  <[email protected]>

	* marshal.c (mono_delegate_to_ftnptr): For delegates wrapping pinvoke
	methods, return the native function address itself. Fixes
	#487758.

In tests/

2009-03-23  Zoltan Varga  <[email protected]>

	* pinvoke-2.2.cs libtest.c: Add a test for #487758.


Conflicts:

	mono/mini/unwind.c

svn path=/branches/mono-2-4/mono/; revision=130067
2009-03-23 15:32:19 +00:00
Marek Safar ca87eff2fb Removed for now.
svn path=/branches/mono-2-4/mcs/; revision=130064
2009-03-23 15:28:22 +00:00
Marek Safar 77cfabcfa2 2009-03-23 Marek Safar <[email protected]>
A fix for bug #487625
	* namespace.cs: Use a warning for all predefined type conflicts.


svn path=/branches/mono-2-4/mcs/; revision=130063
2009-03-23 15:23:32 +00:00
Jonathan Pryor 295b492fe0 * UnixDriveInfo.cs: UnixDriveInfo.AvailableFreeSpace needs to return
stat.f_bavail * stat.f_frsize, NOT f_bavail*f_bsize, as on some
	  platforms (Solaris) bsize is the preferred block I/O size, while
	  f_frsize is the *actual* filesystem block size.  Thus, to get proper
	  disk under Solaris, we need to s/f_bsize/f_frsize/g.

svn path=/branches/mono-2-4/mcs/; revision=130056
2009-03-23 14:36:04 +00:00
Zoltan Varga aae1be1d3d 2009-03-23 Zoltan Varga <[email protected]>
* String.cs (LastIndexOf): Handle empty strings correctly. Fixes #486234.

svn path=/branches/mono-2-4/mcs/; revision=130039
2009-03-23 11:24:05 +00:00
Jonathan Pryor 735ddc4f5b * x-struct-str.c: It's possible for struct members to be NULL, so make
sure we don't pass NULL to strlen(3).

svn path=/branches/mono-2-4/mono/; revision=129890
2009-03-20 17:18:14 +00:00
Zoltan Varga 0e1476a47a 2009-03-19 Zoltan Varga <[email protected]>
Backport of r129824.

	* mini-amd64.c (mono_arch_compute_omit_fp): Add another check to avoid hitting
	the stack_alloc_size < (1 << 16) assertion in emit_prolog ().

svn path=/branches/mono-2-4/mono/; revision=129825
2009-03-19 21:09:53 +00:00
Zoltan Varga 80a900730c 2009-03-19 Zoltan Varga <[email protected]>
Backport of r129798.

	* locales.c (get_current_locale_name): Use g_malloc instead of malloc.

svn path=/branches/mono-2-4/mono/; revision=129799
2009-03-19 17:44:11 +00:00
Marek Habersack f14dfcc563 Backport of r129774
svn path=/branches/mono-2-4/mcs/; revision=129775
2009-03-19 13:44:41 +00:00
Zoltan Varga 9a01f64dc1 2009-03-18 Zoltan Varga <[email protected]>
Backport of r129689.

	* icall.c: Handle user types in many Type icalls. Fixes #486303.


svn path=/branches/mono-2-4/mono/; revision=129690
2009-03-18 14:12:29 +00:00
Marek Habersack fd4ff987ae Backport of r129676
svn path=/branches/mono-2-4/mcs/; revision=129677
2009-03-18 08:08:47 +00:00
Marek Habersack 4a4861af27 Backport of r129620
svn path=/branches/mono-2-4/mcs/; revision=129621
2009-03-17 19:02:28 +00:00
Marek Habersack 1d60c868a4 Backport of r129580
svn path=/branches/mono-2-4/mcs/; revision=129581
2009-03-17 13:22:30 +00:00
Marek Habersack 21815cee75 Backport of r129491
svn path=/branches/mono-2-4/mcs/; revision=129492
2009-03-16 18:54:55 +00:00
Zoltan Varga 05d3217e67 2009-03-15 Steven Munroe <[email protected]>
Backport of r129461.
	
	This patch is contributed under the terms of the MIT/X11 license

	* Makefile.am (test_platform): Enable testbundle for ppc.

svn path=/branches/mono-2-4/mono/; revision=129463
2009-03-16 15:50:06 +00:00
Zoltan Varga def436d728 2009-03-15 Steven Munroe <[email protected]>
Backport of r129460.

	This patch is contributed under the terms of the MIT/X11 license

	* mkbundle.cs (WriteSymbol): Use .p2align 5 instead of .align 32
	to get consistent results on all platforms.

svn path=/branches/mono-2-4/mcs/; revision=129462
2009-03-16 15:49:16 +00:00
Marek Habersack 15e1e19285 Backport r129449
svn path=/branches/mono-2-4/mcs/; revision=129450
2009-03-16 14:55:40 +00:00
Massimiliano Mantione be59d72e0d * mono-profiler-logging.c: Backport from trunk, make it like
r129416:
        - When checking if an elf file is valid, avoid mapping it in
        memory until we know it's usable (avoids virtual memory
        fragmentation issues).
        - Correctly handle duplicated entries in /proc/self/maps.


svn path=/branches/mono-2-4/mono/; revision=129418
2009-03-16 10:50:34 +00:00
Marek Habersack ca19241224 Backport of r129412
svn path=/branches/mono-2-4/mcs/; revision=129413
2009-03-16 09:55:19 +00:00
Marek Habersack 449e45b071 Backport of r129234
svn path=/branches/mono-2-4/mcs/; revision=129235
2009-03-13 00:49:23 +00:00
Gonzalo Paniagua Javier 87366f4649 2009-03-12 Gonzalo Paniagua Javier <[email protected]>
* appdomain.c: if the assembly name is a shadow-copied file, return
	TRUE from mono_is_shadow_copy_enabled but don't actually do anything
	in mono_make_shadow_copy.
	* icall.c: if the assembly name is a shadow-copied file, replace it
	with the original assembly path.

	Bug #484244 fixed. NUnit tests for corlib can be run without
	--noshadow now.


svn path=/branches/mono-2-4/mono/; revision=129214
2009-03-12 22:38:44 +00:00
Gonzalo Paniagua Javier 2c28fda055 accidental commit
svn path=/branches/mono-2-4/mono/; revision=129213
2009-03-12 22:37:57 +00:00
Gonzalo Paniagua Javier 64be0aa4d1 2009-03-12 Gonzalo Paniagua Javier <[email protected]>
* appdomain.c: if the assembly name is a shadow-copied file, return
	TRUE from mono_is_shadow_copy_enabled but don't actually do anything
	in mono_make_shadow_copy.
	* icall.c: if the assembly name is a shadow-copied file, replace it
	with the original assembly path.

	Bug #484244 fixed. NUnit tests for corlib can be run without
	--noshadow now.


svn path=/branches/mono-2-4/mono/; revision=129212
2009-03-12 22:37:18 +00:00
Dean Brettle b92f0d6e2d Commit approved by Gonzalo via private email.
2009-03-12  Dean Brettle  <[email protected]>

	* nBrowser/Build.cs: made Browser() method thread-safe and moved the
	actual tree creation to a private InitializeTree() method for clarity.


svn path=/branches/mono-2-4/mcs/; revision=129179
2009-03-12 19:11:54 +00:00
Gonzalo Paniagua Javier cfa5ba3ed7 2009-03-11 Gonzalo Paniagua Javier <[email protected]>
* InotifyWatcher.cs: don't send events when a directory is created
	unless it matches the pattern.  Fixes bug #484082.


svn path=/branches/mono-2-4/mcs/; revision=129113
2009-03-12 00:21:43 +00:00
Zoltan Varga 174cbf6460 2009-03-08 Zoltan Varga <[email protected]>
Backport of r128849 + r128490.

	* domain-internals.h (struct _MonoDomain): Add new hash tables mapping
	between GCHandles of type WeakTrackResurrection and the objects they
	point to.

	* gc.c: Partly implement the sematics of GCHandles of type 
	WeakTrackResurrection: these handles should only be cleared after the
	finalizer of the object they are pointing to has ran.

	* domain-internals.h (struct _MonoDomain): Add a separate lock for the
	finalize_objects_hash.

	* gc.c: Use the separate lock to access the finalize_objects_hash field.

svn path=/branches/mono-2-4/mono/; revision=129104
2009-03-11 23:12:06 +00:00
Zoltan Varga d90dfb6b92 2009-03-11 Zoltan Varga <[email protected]>
Backport of r129069.

	* Binder.cs: Allow conversions from T to T?. Fixes #484294.

svn path=/branches/mono-2-4/mcs/; revision=129102
2009-03-11 23:02:25 +00:00
Zoltan Varga 8f4c7c9e1a 2009-03-11 Zoltan Varga <[email protected]>
* mini-amd64.c (mono_arch_output_basic_block): Fix % 1. Fixes #484323.

	* basic.cs: Add a test.

svn path=/branches/mono-2-4/mono/; revision=129066
2009-03-11 14:29:38 +00:00
Mark Probst 950b5dc41b 2009-03-11 Mark Probst <[email protected]>
* mini-x86.c (mono_arch_output_basic_block): Use different
	registers in case the ones we want to overwrite are used by the
	other operand.  Fixes regression in #480807.

	Backport of r129058.

svn path=/branches/mono-2-4/mono/; revision=129064
2009-03-11 14:27:20 +00:00
Zoltan Varga 5901f1de17 2009-03-10 Zoltan Varga <[email protected]>
Backport of r129009.

	* reflection.c (ensure_complete_type): New helper function to call
	type resolve handlers for unfinished dynamic types.
	(resolve_object): Call it for MonoClassFields. Fixes #483852.

svn path=/branches/mono-2-4/mono/; revision=129010
2009-03-10 19:48:57 +00:00
Marek Habersack 84c1469a25 Backport of r128972
svn path=/branches/mono-2-4/mcs/; revision=128973
2009-03-10 14:23:03 +00:00
Zoltan Varga e08028625d 2009-03-10 Zoltan Varga <[email protected]>
Backport of r128924.
	
	* mini-s390x.c: Fix support for vtypes whose addresses are passed on the
	stack.

svn path=/branches/mono-2-4/mono/; revision=128926
2009-03-10 00:21:40 +00:00
Miguel de Icaza acbaa50498 Backport from 128830
svn path=/branches/mono-2-4/mcs/; revision=128925
2009-03-10 00:20:25 +00:00
Mark Probst b92652fb0c 2009-03-09 Mark Probst <[email protected]>
Contributed under the terms of the MIT/X11 license by Steven
        Munroe <[email protected]>.

        * mini-ppc.c: Correct handling of OP_LOADI4_MEMINDEX for ppc64.
        Fixes #483462.

        Backport of r128904.

svn path=/branches/mono-2-4/mono/; revision=128905
2009-03-09 20:03:44 +00:00
Mark Probst b400a612a4 2009-03-09 Mark Probst <[email protected]>
* mini-trampolines.c (mono_create_jump_trampoline): If the method
	is shared generic code, return the trampoline, even if the method
	has already been compiled.  Fixes #479763.

	* mini.c, mini.h: New function
	mono_jit_find_compiled_method_with_jit_info() which is the same as
	mono_jit_find_compiled_method() but also returns the jit info.

	Backport of r128723.

2009-03-09  Mark Probst  <[email protected]>

	* generic-sharing.c (instantiate_other_info): Always return a jump
	trampoline for method code.

	Backport of r128723.

2009-03-09  Mark Probst  <[email protected]>

	* bug-479763.2.cs: New test.

	* Makefile.am: Test added.

	Backport of r128723.

svn path=/branches/mono-2-4/mono/; revision=128903
2009-03-09 19:57:22 +00:00
Rodrigo Kumpera f75dddbe61 2009-03-08 Rodrigo Kumpera <[email protected]>
Backport of r128853.

	* appdomain.c (get_shadow_assembly_location): Fix memleak.


svn path=/branches/mono-2-4/mono/; revision=128882
2009-03-09 14:24:35 +00:00
Marek Safar ce5c0e651e 2009-03-08 Marek Safar <[email protected]>
* class.cs: Use correct common base type for unmanaged delayed
	check.

	* rootcontext.cs: Wrap unhandled exception.


svn path=/branches/mono-2-4/mcs/; revision=128854
2009-03-08 19:15:50 +00:00
Gonzalo Paniagua Javier 11cd4f09ed 2009-03-06 Gonzalo Paniagua Javier <[email protected]>
* ResourceSet.cs: for custom resource sets without a reader, pretende
	that's we've already read the stream.


svn path=/branches/mono-2-4/mcs/; revision=128815
2009-03-07 00:06:31 +00:00
Miguel de Icaza 15c1fae0ea 2009-03-05 Tom Hindle <[email protected]>
* Marshal.cs: Implemented GenerateGuidForType

svn path=/branches/mono-2-4/mcs/; revision=128809
2009-03-06 23:31:51 +00:00
Miguel de Icaza b712e0ae63 Backport
svn path=/branches/mono-2-4/mcs/; revision=128808
2009-03-06 23:30:19 +00:00
Marek Habersack 7304ee6ef0 Backport of r128801
svn path=/branches/mono-2-4/mcs/; revision=128802
2009-03-06 22:17:10 +00:00
Marek Habersack ef23c9aaeb Backport of r128799
svn path=/branches/mono-2-4/mcs/; revision=128800
2009-03-06 21:30:17 +00:00
Marek Habersack 5eecf6b197 Backport of r128796
svn path=/branches/mono-2-4/mcs/; revision=128797
2009-03-06 20:55:33 +00:00
Marek Habersack 74dcf0f4e7 Backport of r128793
svn path=/branches/mono-2-4/mcs/; revision=128794
2009-03-06 20:05:35 +00:00
Zoltan Varga 2a21dbb533 2009-03-06 Zoltan Varga <[email protected]>
* arm/tramp.c: Include a change from the debian patches. Avoid #include-ing
	a file in the middle of a function.

svn path=/branches/mono-2-4/mono/; revision=128784
2009-03-06 15:56:44 +00:00
Zoltan Varga fdf4913561 2009-03-06 Zoltan Varga <[email protected]>
Backport of r128749.
	
	* method-to-ir.c (mini_emit_memset): Fix the handling of size '3'. Fixes
	#481458.

	* iltests.il.in: Add a test.

svn path=/branches/mono-2-4/mono/; revision=128751
2009-03-06 02:43:14 +00:00
Mark Probst a1ea9b3ab8 2009-03-05 Mark Probst <[email protected]>
* method-to-ir.c (mono_method_to_ir): Only force the vtable var
	for methods which actually have one.  For all other methods, make
	sure the this argument var is live the whole method.

	* mini.c (mini_method_compile): Every shared method has a
	this/vtable/mrgctx info.  Fixes #480807.

	Backport of r128720.

svn path=/branches/mono-2-4/mono/; revision=128724
2009-03-05 21:17:28 +00:00
Marek Habersack d22d581784 Backport of r128714
svn path=/branches/mono-2-4/mono/; revision=128715
2009-03-05 18:06:35 +00:00
Bill Holmes 7ff68d17a2 2009-03-05 Bill Holmes <[email protected]>
* mono.def : Removing missing methods to remove link errors for
	  MSVC build.  

	Code is contributed under MIT/X11 license.

svn path=/branches/mono-2-4/mono/; revision=128712
2009-03-05 17:50:48 +00:00
Mark Probst ebbca31e3c 2009-03-05 Mark Probst <[email protected]>
Contributed under the terms of the MIT/X11 license by Steven
	Munroe <[email protected]>.

	* mini-ppc.c, mini-ppc.h: Implement TLS for PPC64.

	Backport of r127060.

2009-03-05  Mark Probst  <[email protected]>

	Contributed under the terms of the MIT/X11 license by Steven
	Munroe <[email protected]>.

	* mono-compiler.h: MONO_THREAD_VAR_OFFSET for PPC(64).

	Backport of r127060.

svn path=/branches/mono-2-4/mono/; revision=128711
2009-03-05 17:49:49 +00:00
Marek Safar fbe5f68924 2009-03-05 Marek Safar <[email protected]>
A fix for bug #480100
	* parameter.cs: A parameter is not hoisted when used directly as ET.


svn path=/branches/mono-2-4/mcs/; revision=128680
2009-03-05 11:41:25 +00:00
Martin Baulig aca813ba8d ***** Backport of r128549 *****
svn path=/branches/mono-2-4/mono/; revision=128622
2009-03-04 20:46:47 +00:00
Martin Baulig d4955be897 ***** Backport of r128556 *****
2009-03-04  Martin Baulig  <[email protected]>

	* debug-mini.c: Clean up the exception API and add documentation.
	(mono_debugger_handle_exception): New public method; this is
	called when throwing an exception or encountering an unhandled one.
	(mono_debugger_call_exception_handler): Formerly known as
	mono_debugger_handle_exception(); this is used to tell the
	debugger that we're about to invoke an exception handler.


svn path=/branches/mono-2-4/mono/; revision=128614
2009-03-04 20:24:02 +00:00
Martin Baulig 84ada866ad ***** Backport of r128544 *****
2009-03-04  Martin Baulig  <[email protected]>

	* debug-mini.c (mono_debugger_runtime_invoke): Moved here from
	../metadata/mono-debug-debugger.c; save and reset exception state.

2009-03-02  Martin Baulig  <[email protected]>

	* debug-mini.c: Moved the debugger exception handling here from
	../metadata/mono-debug-debugger.c.

	* debug-mini.h
	(MonoDebuggerExceptionAction): New exception typedef.

	* debug-mini.c
	(MonoDebuggerThreadInfo): Added `MonoObject *last_exception'.

	* exceptions-amd64.c
	(mono_amd64_throw_exception): Use the new debugger exception
	handling code.

	* mini-exceptions.c
	(mono_handle_exception_internal): Don't call
	mono_debugger_unhandled_exception() here.

2009-03-04  Martin Baulig  <[email protected]>

	* mono-debug.h
	(mono_debugger_runtime_invoke): Removed.

	* mono-debug-debugger.c
	(mono_runtime_invoke): Moved into ../mini/debug-mini.c.

2009-03-02  Martin Baulig  <[email protected]>

	* mono-debug.h
	(mono_debugger_unhandled_exception): Removed.
	(mono_debugger_handle_exception): Removed.
	(mono_debugger_throw_exception): Removed.

	* mono-debug.h (MONO_DEBUGGER_MINOR_VERSION): Bump to 1.

	* mono-debug.c
	(mono_debug_debugger_version): Bump to 5.

	* mono-debug-debugger.c: Moved the exception handling code to
	../mini/debug-mini.c


svn path=/branches/mono-2-4/mono/; revision=128613
2009-03-04 20:19:14 +00:00
Marek Habersack d7e563dd87 Backport of r128602
svn path=/branches/mono-2-4/mcs/; revision=128603
2009-03-04 19:06:26 +00:00
Mark Probst 2085fa219c 2009-03-04 Mark Probst <[email protected]>
* method-to-ir.c: Don't inline methods that use JMP.  Fixes
	#481403.

	Backport of r128552.

2009-03-04  Mark Probst  <[email protected]>

	* bug-481403.il: New test.

	* Makefile.am: Test added.

	Backport of r128552.

svn path=/branches/mono-2-4/mono/; revision=128560
2009-03-04 15:58:15 +00:00
Marek Safar 8d34f01dfc 2009-03-03 Marek Safar <[email protected]>
A fix for bug #481258
	* class.cs: Set extension method flag in partial container.


svn path=/branches/mono-2-4/mcs/; revision=128434
2009-03-03 12:58:09 +00:00
Marek Habersack ac1aa9d309 Backport of r128407 and r128408
svn path=/branches/mono-2-4/mcs/; revision=128409
2009-03-03 01:34:29 +00:00
Gonzalo Paniagua Javier 97434a0a9b 2009-03-01 Gonzalo Paniagua Javier <[email protected]>
* WebEncoding.cs: another GetWebApplication here.


svn path=/branches/mono-2-4/mcs/; revision=128294
2009-03-01 07:43:09 +00:00
Gonzalo Paniagua Javier 1c03c661b4 patch from Marek in trunk
svn path=/branches/mono-2-4/mcs/; revision=128280
2009-02-28 23:45:29 +00:00
Gonzalo Paniagua Javier 7e204d02b5 2009-02-28 Gonzalo Paniagua Javier <[email protected]>
* AppResourcesAssemblyBuilder.cs:
	* AspComponentFoundry.cs:
	* AssemblyBuilder.cs:
	* CachingCompiler.cs:
	* AspGenerator.cs:
	* WsdlBuildProvider.cs:
	* BaseCompiler.cs:
	* BuildProvider.cs:
	* AppWebReferencesCompiler.cs:
	* TemplateControlCompiler.cs:
	* BuildManager.cs:
	* AppCodeCompiler.cs: settings that have to be in
	machine.config or the root level web.config now call
	GetWebApplicationSection.


svn path=/branches/mono-2-4/mcs/; revision=128277
2009-02-28 20:41:32 +00:00
Gonzalo Paniagua Javier 34d0ee8c95 2009-02-28 Gonzalo Paniagua Javier <[email protected]>
* BaseParser.cs:
	* PageParser.cs:
	* ControlBuilder.cs:
	* TemplateParser.cs:
	* Page.cs:
	* SimpleWebHandlerParser.cs: settings that have to be in
	machine.config or the root level web.config now call
	GetWebApplicationSection.


svn path=/branches/mono-2-4/mcs/; revision=128274
2009-02-28 20:05:24 +00:00
Gonzalo Paniagua Javier 05442e11d7 2009-02-28 Gonzalo Paniagua Javier <[email protected]>
* System.Web/HttpResponseHeader.cs:
	* System.Web/HttpResponse.cs:
	* System.Web/QueueManager.cs:
	* System.Web/HttpRequest.cs:
	* System.Web/TraceManager.cs:
	* System.Web/HttpServerUtility.cs:
	* System.Web/HttpApplication.cs:
	* System.Web.UI/ObjectStateFormatter.cs:
	* System.Web.Security/FormsAuthentication.cs: use GetWebApplication
	instead of GetSection for application level configuration.


svn path=/branches/mono-2-4/mcs/; revision=128271
2009-02-28 19:00:51 +00:00
Zoltan Varga 42f06c7663 2009-02-28 Zoltan Varga <[email protected]>
* Enum.cs (FindName): Use a hash table for looking up names instead of
	a linear search for enums with a lot of values.

svn path=/branches/mono-2-4/mcs/; revision=128268
2009-02-28 16:23:19 +00:00
Rodrigo Kumpera 8c002790f7 2008-02-28 Rodrigo Kumpera <[email protected]>
* MonoProperty.cs (GetValue): Don't use the delegate optimization for valuetypes.


svn path=/branches/mono-2-4/mcs/; revision=128263
2009-02-28 06:26:39 +00:00
Gonzalo Paniagua Javier 7172bcccf8 2009-02-17 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: instead of clearing the sockets form the output and then
	adding them back, we just remove the ones that have not been signaled.
	Fixes bug #354090 and bug #476138.



svn path=/branches/mono-2-4/mcs/; revision=128260
2009-02-28 05:59:06 +00:00
Marek Habersack 4ff65f3ac1 Backport of r128249
svn path=/branches/mono-2-4/mcs/; revision=128250
2009-02-28 02:05:10 +00:00
Gonzalo Paniagua Javier de4d2ec78b 2009-02-27 Gonzalo Paniagua Javier <[email protected]>
* ResourceSet.cs: populating the resource should be locked because the
	resourceset could be shared.


svn path=/branches/mono-2-4/mcs/; revision=128216
2009-02-27 17:32:57 +00:00
Rodrigo Kumpera 6e6489d471 2008-02-26 Rodrigo Kumpera <[email protected]>
* MonoProperty.cs (GetValue): Optimize getters for properties without arguments.

2008-02-26  Rodrigo Kumpera  <[email protected]>

	* MonoProperty.cs (GetValue): Optimize getters for properties without arguments.
	The optimization is to create a pair of chained delegates that duplicate the workings
	on MethodBase::Invoke without all the aditional overhead and without doing two
	managed/native transitions.

	Simple Getter performance is up to 17x faster.

	This patch reduces contention on domain and domain jit code hash locks, which
	can be very hot on asp.net applications.


svn path=/branches/mono-2-4/mcs/; revision=128174
2009-02-27 01:53:16 +00:00
Zoltan Varga 986524c0bb 2009-02-27 Zoltan Varga <[email protected]>
* BaseMachine.cs (LTRReplace): Initialize the StringBuilder with an
	appropriate initial length.

svn path=/branches/mono-2-4/mcs/; revision=128159
2009-02-26 23:28:25 +00:00
Gonzalo Paniagua Javier ffe099d2fc 2009-02-26 Gonzalo Paniagua Javier <[email protected]>
* appdomain.c: make the check to avoid copying when the assembly is
	already shadow copied actually work.


svn path=/branches/mono-2-4/mono/; revision=128126
2009-02-26 17:42:12 +00:00
Gonzalo Paniagua Javier a317249bec 2009-02-26 Gonzalo Paniagua Javier <[email protected]>
* WebConfigurationManager.cs: generate a hash from the string hsah
	codes instead of concatenating them.


svn path=/branches/mono-2-4/mcs/; revision=128122
2009-02-26 17:24:40 +00:00
Jonathan Pryor fc98dcc51c * Makefile:
- s/TEST_FILES/MAN_TEST_FILES/g: $(TEST_FILES) is used by the normal
	    build process, so the local definition is lost (and thus ignored).
	    Result: Test/* isn't actually copied.  Oops.  Changing to
	    MAN_TEST_FILES allows things to be copied.
	  - Fix the filenames within $(MAN_TEST_FILES) so `make dist-local'
	    works without error.
	  - Fixes #479753.

svn path=/branches/mono-2-4/mcs/; revision=128120
2009-02-26 17:08:58 +00:00
Zoltan Varga 48ee1b70a0 2009-02-26 Zoltan Varga <[email protected]>
* String.cs (FormatHelper): If all the arguments are strings, compute an
	initial length for the stringbuilder to avoid reallocations.

svn path=/branches/mono-2-4/mcs/; revision=128116
2009-02-26 16:38:34 +00:00
Zoltan Varga ab154c2bdb 2009-02-26 Zoltan Varga <[email protected]>
* mini-x86.c (mono_arch_get_this_arg_from_call): Avoid expensive calls
	to  get_generic_context_from_code () + get_call_info () if possible.

svn path=/branches/mono-2-4/mono/; revision=128113
2009-02-26 16:26:23 +00:00
Zoltan Varga e2bde717f8 2009-02-25 Zoltan Varga <[email protected]>
* object.c (mono_get_delegate_invoke): Call setup_methods () to avoid the
	slower search in metadata.

svn path=/branches/mono-2-4/mono/; revision=128095
2009-02-26 14:20:50 +00:00
Marek Habersack e34e7f2de8 Backport of r128091
svn path=/branches/mono-2-4/mcs/; revision=128092
2009-02-26 14:16:55 +00:00
Gonzalo Paniagua Javier 1e30039a0a fix the build
svn path=/branches/mono-2-4/mono/; revision=128063
2009-02-26 07:30:06 +00:00
Marek Habersack 4881df3014 Backport of r128040
svn path=/branches/mono-2-4/mono/; revision=128041
2009-02-26 02:03:10 +00:00
Marek Safar 38af1d1400 2009-02-25 Marek Safar <[email protected]>
A fix for bug #479532
	* expression.cs: Implement NewInitialize::AddressOf.


svn path=/branches/mono-2-4/mcs/; revision=128016
2009-02-25 16:46:27 +00:00
Marek Habersack 6a50c9ec35 Backport of: r124779, r124780, r124783, r124784, r126769, r126855, r126856, r126891, r127259, r127333, r127334 and r127343
svn path=/branches/mono-2-4/mcs/; revision=128005
2009-02-25 14:16:21 +00:00
Marek Safar 5e0f8cda9a 2009-02-25 Marek Safar <[email protected]>
A fix for bug #413633
	* expression.cs: Iterate all base class-constraint types.


svn path=/branches/mono-2-4/mcs/; revision=127990
2009-02-25 11:39:30 +00:00
Marek Habersack a094e9a735 Backport of r127935
svn path=/branches/mono-2-4/mcs/; revision=127936
2009-02-25 02:50:15 +00:00
Zoltan Varga 816e0e8fdd 2009-02-25 Zoltan Varga <[email protected]>
Backport of r127929.
	
	* Enum.cs (GetInfo): Add a global cache in addition to the thread-local
	caches to accomodate short living threads like threadpool threads.

svn path=/branches/mono-2-4/mcs/; revision=127930
2009-02-25 02:16:00 +00:00
Gonzalo Paniagua Javier 47e1dbf970 2009-02-24 Gonzalo Paniagua Javier <[email protected]>
* StringReader.cs: LF followed by CR is 2 lines.


svn path=/branches/mono-2-4/mcs/; revision=127917
2009-02-24 23:51:00 +00:00
Gonzalo Paniagua Javier aa19449ebb 2009-02-24 Gonzalo Paniagua Javier <[email protected]>
* StringReaderTest.cs: new test for ReadLine.


svn path=/branches/mono-2-4/mcs/; revision=127916
2009-02-24 23:50:24 +00:00
Andrew Jorgensen 90041dc378 Backport of r127907, bnc#479237
svn path=/branches/mono-2-4/mcs/; revision=127908
2009-02-24 22:15:56 +00:00
Zoltan Varga 922912292b 2009-02-24 Zoltan Varga <[email protected]>
* CILCompiler.cs: Partially inline calls to Char.ToLower () to speed
	up ignorecase matching.

svn path=/branches/mono-2-4/mcs/; revision=127902
2009-02-24 20:51:30 +00:00
Ivan Zlatev c92fff7043 2009-02-24 Ivan N. Zlatev <[email protected]>
* DataGridViewCell.cs: Invalidate the datagrid when the cell is selected
	or deselected.
	[Fixes bug #479124]

svn path=/branches/mono-2-4/mcs/; revision=127893
2009-02-24 20:10:30 +00:00
Jb Evain e3931f38b6 2009-02-24 Jb Evain <[email protected]>
backport of 127871.

	* Expression.cs (BinaryCoreCheck): fix comparison of enums.


svn path=/branches/mono-2-4/mcs/; revision=127872
2009-02-24 17:11:47 +00:00
Veerapuram Varadhan 493e003258 backport of r127849
svn path=/branches/mono-2-4/mcs/; revision=127850
2009-02-24 09:34:15 +00:00
Veerapuram Varadhan 32bf6cac04 * OracleException: 2.0 changes - patch submitted by
Jay Wren <[email protected]>


svn path=/branches/mono-2-4/mcs/; revision=127840
2009-02-24 05:21:40 +00:00
Veerapuram Varadhan 0c8aa2ee8b * Fixes #476523
* DbType.cs: Add DateTime2 and DateTimeOffset - 3.5 additions
        Patch by Jay Wren <[email protected]>


svn path=/branches/mono-2-4/mcs/; revision=127838
2009-02-24 05:10:23 +00:00
Jb Evain 0ee8a2414d 2009-02-23 Jb Evain <[email protected]>
backport of 127784.

	* XUtil.cs (ToString): properly stringify datetimes.

svn path=/branches/mono-2-4/mcs/; revision=127787
2009-02-23 19:20:54 +00:00
Jb Evain eb08b06215 2009-02-23 Jb Evain <[email protected]>
backport of 127772.

	* Enumerable.cs (IterateNullable): fix initial value
	for nullables.


svn path=/branches/mono-2-4/mcs/; revision=127774
2009-02-23 18:16:14 +00:00
Jb Evain 88b7acff98 2009-02-23 Jb Evain <[email protected]>
backport of 127755.

	* Expression.cs (IsNumber): actually decimal is rather a special
	case, and not a primitive number.


svn path=/branches/mono-2-4/mcs/; revision=127756
2009-02-23 17:06:08 +00:00
Jb Evain 84fd92865b 2009-02-23 Jb Evain <[email protected]>
backport of 127746.

	* Expression.cs (BinaryCoreCheck): add decimal operations
	are provided by custom operators.

svn path=/branches/mono-2-4/mcs/; revision=127748
2009-02-23 16:44:42 +00:00
Ivan Zlatev 400afe1a8f 2009-02-23 Ivan N. Zlatev <[email protected]>
* DataGridView.cs: Make the ScrollBars property work properly.

svn path=/branches/mono-2-4/mcs/; revision=127718
2009-02-23 09:43:23 +00:00
Gonzalo Paniagua Javier d9755b89e6 2009-02-23 Gonzalo Paniagua Javier <[email protected]>
* WebClient.cs: append the QueryString in DownloadData.
	Fixes bug #323788.


svn path=/branches/mono-2-4/mcs/; revision=127700
2009-02-23 05:10:24 +00:00
Gonzalo Paniagua Javier 8c8593fd96 2009-02-22 Gonzalo Paniagua Javier <[email protected]>
* HttpServerUtility.cs: allow Transfer to static files too.


svn path=/branches/mono-2-4/mcs/; revision=127678
2009-02-23 00:22:39 +00:00
Mark Probst 200118c485 2009-02-22 Mark Probst <[email protected]>
Backport of r127665.

	* tramp-ppc.c (mono_arch_create_trampoline_code): Store the
	correct frame pointer in the LMF.  Should fix #478394.

svn path=/branches/mono-2-4/mono/; revision=127666
2009-02-22 21:08:04 +00:00
Gonzalo Paniagua Javier 8575b3983a 2009-02-22 Gonzalo Paniagua Javier <[email protected]>
* socket-io.c: support SO_MAXCONN, SO_USELOOPBACK and
	SO_EXLUSIVEADDRUSE where available.


svn path=/branches/mono-2-4/mono/; revision=127651
2009-02-22 06:42:55 +00:00
Gonzalo Paniagua Javier d99e8f21af fix
svn path=/branches/mono-2-4/mcs/; revision=127646
2009-02-22 03:08:15 +00:00
Ivan Zlatev df53237ac6 2009-02-22 Ivan N. Zlatev <[email protected]>
* DataGridView.cs: Fix row removal in the data-bound scenario.

svn path=/branches/mono-2-4/mcs/; revision=127643
2009-02-22 00:54:39 +00:00
Gonzalo Paniagua Javier 24ad061817 2009-02-21 Gonzalo Paniagua Javier <[email protected]>
* FtpWebResponse.cs: return a Null stream when there's no response to
	be read.
	* FtpWebRequest.cs: provide the error returned by the server in the
	exception.
	* WebClient.cs: set the correct method when doing a FTP upload.
	Fixes bug #478451.


svn path=/branches/mono-2-4/mcs/; revision=127641
2009-02-21 23:30:33 +00:00
Zoltan Varga 76ffb82a48 2009-02-21 Zoltan Varga <[email protected]>
* marshal.c (mono_marshal_get_runtime_invoke): Fix _another_ bug sharing
	runtime invoke wrappers, this time it is string ctor wrappers, which
	pass a dummy string as 'this' instead of their obj argument. Fixes
	#478473.

svn path=/branches/mono-2-4/mono/; revision=127638
2009-02-21 21:27:35 +00:00
Zoltan Varga 53cc1f8d6d 2009-02-21 Zoltan Varga <[email protected]>
* method-to-ir.c (mono_method_to_ir): Don't assert if string ctors
	are called from runtime invoke wrappers.

svn path=/branches/mono-2-4/mono/; revision=127636
2009-02-21 21:24:16 +00:00
Jb Evain 0489b56686 backport of r127631.
in System.Reflection:
2008-02-21  Jb Evain  <[email protected]>

	* Module.cs: add a new virtual GetModuleVersionId method,
	and make the properties .MvId and ModuleVersionId call it.
	This way, we can override it in ModuleBuilder.
	Part of the fix for #471302.

in System.Reflection.Emit:
2008-02-21  Jb Evain  <[email protected]>

	* ModuleBuilder.cs: override GetModuleVersionId
	so that we can get the module guid from Module.ModuleVersionId.
	Part of the fix for #471302.

svn path=/branches/mono-2-4/mcs/; revision=127632
2009-02-21 16:20:07 +00:00
Jb Evain 4f856e94a3 2009-02-21 Jb Evain <[email protected]>
backport of r127628.

	* MonoType.cs (InvokeMember): don't pass a null args to
	Binder.BindToMethod. Fix for #471275.

svn path=/branches/mono-2-4/mcs/; revision=127629
2009-02-21 15:36:47 +00:00
Jb Evain a927203608 2009-02-21 Jb Evain <[email protected]>
* EventHandlerList.cs: fix the 1.1 profile.


svn path=/branches/mono-2-4/mcs/; revision=127625
2009-02-21 12:51:59 +00:00
Gonzalo Paniagua Javier 4313c50b3d oops
svn path=/branches/mono-2-4/mcs/; revision=127618
2009-02-21 07:35:31 +00:00
Gonzalo Paniagua Javier 09a2a27d27 2009-02-21 Gonzalo Paniagua Javier <[email protected]>
* EventHandlerList.cs: there's no need for HandlerEntry here.
	Just store the delegate.


svn path=/branches/mono-2-4/mcs/; revision=127616
2009-02-21 07:33:08 +00:00
Gonzalo Paniagua Javier c6c5c7c8b6 this was checked in by mistake
svn path=/branches/mono-2-4/mcs/; revision=127598
2009-02-20 23:35:18 +00:00
Gonzalo Paniagua Javier 8a19ec3273 2009-02-20 Gonzalo Paniagua Javier <[email protected]>
* TemplateControl.cs: implement the other ReadStringResource method.
	Patch from Kornel Pal.


svn path=/branches/mono-2-4/mcs/; revision=127597
2009-02-20 23:34:35 +00:00
Gonzalo Paniagua Javier 32d603eda4 fix the 1.x build
svn path=/branches/mono-2-4/mcs/; revision=127589
2009-02-20 22:57:08 +00:00
Gonzalo Paniagua Javier 11b4aef454 2009-02-20 Gonzalo Paniagua Javier <[email protected]>
* System.Web/HttpWriter.cs: new Response property and WriteUTF8Ptr
	method.
	* System.Web/HttpResponseStream.cs: added support for writing from an
	IntPtr. copied the memcpy method from String.cs.

	* System.Web.Compilation/BuildManager.cs: updated comment.

	* System.Web.UI/ResourceBasedLiteralControl.cs: new Control. It's just
	like a LiteralControl but will render itself from the bytes pointed to
	by an IntPtr and not create any string from the underlying data unless
	needed.

	* System.Web.UI/TemplateControl.cs: implemented a bunch of methods
	that are used from the precompiled assemblies for a web project. The
	most notable change needed is to be able to read a win32 resource from
	the dll of the control. The resource is a concatenation of literals
	with plain text for the control and a specialized LiteralControl is
	generated from different chunks of the resource.

	* System.Web.UI/HtmlTextWriter.cs: new method that returns the
	HttpWriter in use.

	* System.Web.dll.sources: added new file.

	* System.Web.Util/ICalls.cs: new internal call to get a pointer to the
	win32 resource associated with the control's assembly.


svn path=/branches/mono-2-4/mcs/; revision=127580
2009-02-20 21:32:50 +00:00
Gonzalo Paniagua Javier b1b4f52b34 2009-02-20 Gonzalo Paniagua Javier <[email protected]>
* cil-coff.h:
	* icall-def.h:
	* icall.c: add new GetUnmanagedResourcePtr that returns a pointer to a
	win32 resource loaded from a PE file.

	* image.c: fix mono_image_lookup_resource.


svn path=/branches/mono-2-4/mono/; revision=127575
2009-02-20 21:07:43 +00:00
Gonzalo Paniagua Javier bff28446a2 changelog
svn path=/branches/mono-2-4/mcs/; revision=127572
2009-02-20 20:46:03 +00:00
Gonzalo Paniagua Javier 08df38ca1b .
svn path=/branches/mono-2-4/mcs/; revision=127571
2009-02-20 20:37:44 +00:00
Gonzalo Paniagua Javier 21eef2e77e ChangeLog
svn path=/branches/mono-2-4/mcs/; revision=127570
2009-02-20 20:36:31 +00:00
Gonzalo Paniagua Javier cff463913d 2009-02-20 Gonzalo Paniagua Javier <[email protected]>
* WaitHandle.cs: implemented SignalAndWait.

svn path=/branches/mono-2-4/mcs/; revision=127568
2009-02-20 20:33:23 +00:00
Zoltan Varga e040c39674 2009-02-20 Zoltan Varga <[email protected]>
* cpu-ppc.md (store_memindex): Increase the size of this.

svn path=/branches/mono-2-4/mono/; revision=127567
2009-02-20 20:30:39 +00:00
Veerapuram Varadhan eeca83c94d Test for Bug#419224
svn path=/branches/mono-2-4/mcs/; revision=127543
2009-02-20 15:47:16 +00:00
Veerapuram Varadhan 1a66d85f3b backport of r127530
svn path=/branches/mono-2-4/mcs/; revision=127532
2009-02-20 11:50:35 +00:00
Marek Safar 8508387f81 2009-02-20 Marek Safar <[email protected]>
A fix for bug #477447
	* statement.cs: Add reference to correct parent storey when this
	is accessible from deep children storey (more than 1 level).


svn path=/branches/mono-2-4/mcs/; revision=127528
2009-02-20 11:16:43 +00:00
Veerapuram Varadhan cd41807bcb * TdsDataReader.cs: Access TdsDataColumn correctly for NET_2_0.
Fixes #466199. Patch by Tom Hindle <[email protected]>


svn path=/branches/mono-2-4/mcs/; revision=127493
2009-02-20 02:30:12 +00:00
Ivan Zlatev fff850ae00 2009-02-19 Ivan N. Zlatev <[email protected]>
* DataGridViewCell.cs: Use strict equality comparison in order to
	prevent superfluous CellValueChanged events.

svn path=/branches/mono-2-4/mcs/; revision=127452
2009-02-19 20:16:25 +00:00
Gonzalo Paniagua Javier c4af40f5cf 2009-02-19 Gonzalo Paniagua Javier <[email protected]>
* FtpWebRequest.cs: avoid errors when creating a temporary Uri to get
	the local path.
	* WebClient.cs: when setting up the request for downloading, use the
	default method. Fixes bug #477611.


svn path=/branches/mono-2-4/mcs/; revision=127451
2009-02-19 20:14:31 +00:00
Ivan Zlatev ace3196c2b 2009-02-19 Ivan N. Zlatev <[email protected]>
* DataGridView.cs: Do not reset the columns when the data list changes,
	but only the rows. Fixes multiple bugs related to sorting, custom
	column styles being reset and more.

svn path=/branches/mono-2-4/mcs/; revision=127435
2009-02-19 18:25:02 +00:00
Veerapuram Varadhan 890a4f46f5 backport of r127379
svn path=/branches/mono-2-4/mcs/; revision=127424
2009-02-19 17:11:14 +00:00
Gonzalo Paniagua Javier fd89397e70 2009-02-19 Gonzalo Paniagua Javier <[email protected]>
* OleDbFactory.cs: New file.


svn path=/branches/mono-2-4/mcs/; revision=127376
2009-02-19 06:50:42 +00:00
Gonzalo Paniagua Javier 50c7e593cb 2009-02-18 Gonzalo Paniagua Javier <[email protected]>
* TemplateControl.cs: ReadStringResource returns null now.


svn path=/branches/mono-2-4/mcs/; revision=127359
2009-02-19 02:43:33 +00:00
Gonzalo Paniagua Javier c06c09bd60 svn path=/branches/mono-2-4/mcs/; revision=127354 2009-02-18 23:52:50 +00:00
Gonzalo Paniagua Javier 4a3bf3d995 2009-02-18 Gonzalo Paniagua Javier <[email protected]>
* System.Web/HttpApplicationFactory.cs: check of global.asax was precompiled.
	* System.Web.UI/MasterPage.cs: the items in ContentPlaceHolders are lowercase.
	* System.Web.Compilation/TemplateControlCompiler.cs: lowercase place holder names
	* System.Web.Compilation/BuildManager.cs: initial support for
	precompilation. No 'updatable', please.



svn path=/branches/mono-2-4/mcs/; revision=127353
2009-02-18 23:51:15 +00:00
Zoltan Varga f59cfce9df 2009-02-19 Zoltan Varga <[email protected]>
Backport of r127347.

	* marshal.c (mono_ftnptr_to_delegate): Convert a NULL ftnptr to a null
	delegate. Fixes #477396.

svn path=/branches/mono-2-4/mono/; revision=127349
2009-02-18 23:14:25 +00:00
Marek Safar b73876a464 Fixes build.
svn path=/branches/mono-2-4/mcs/; revision=127341
2009-02-18 23:02:17 +00:00
Bill Holmes 836e73df60 2009-02-18 Bill Holmes <[email protected]>
backport of r127338

	* mono.def : Adding mono_jit_set_trace_options

	Code is contributed under MIT/X11 license.

svn path=/branches/mono-2-4/mono/; revision=127339
2009-02-18 23:01:08 +00:00
Marek Safar c524bc933b 2009-02-18 Marek Safar <[email protected]>
A fix for bug #472805
	* typemanager.cs, namespace.cs: Import only visible extension method
	types.


svn path=/branches/mono-2-4/mcs/; revision=127311
2009-02-18 19:54:14 +00:00
Marek Safar 9d136bfc7c 2009-02-18 Marek Safar <[email protected]>
A fix for bug #476266
	* anonymous.cs: Mutate multi-dimensional arrays.


svn path=/branches/mono-2-4/mcs/; revision=127294
2009-02-18 17:05:03 +00:00
Bill Holmes ac220e9c0e 2009-02-18 Bill Holmes <[email protected]>
backport of r127279.

	* marshal.c (cominterop_get_managed_wrapper_adjusted) :
	  Adding exception handling for all CCW calls.

	Code is contributed under MIT/X11 license.

svn path=/branches/mono-2-4/mono/; revision=127280
2009-02-18 15:31:07 +00:00
Zoltan Varga ee8370eb8d 2009-02-18 Zoltan Varga <[email protected]>
Backport of r127232.
	
	* marshal.c (emit_marshal_boolean): Add null checks to the new 
	native->managed marshalling code. Fixes #476247.

svn path=/branches/mono-2-4/mono/; revision=127233
2009-02-17 23:51:25 +00:00
Zoltan Varga bdffeb6712 2009-02-02 Zoltan Varga <[email protected]>
Backport of r125348.

	* marshal.c (mono_marshal_get_runtime_invoke): Disable sharing for
	methods taking vtype/byref arguments, to fix yet another bug caused by
	the sharing of runtime invoke wrappers. Partly fixes #471259.

svn path=/branches/mono-2-4/mono/; revision=127080
2009-02-16 23:23:52 +00:00
Zoltan Varga eb24cb0d59 2009-02-15 Zoltan Varga <[email protected]>
Backport of r125349.

	* marshal.c (mono_marshal_free_dynamic_wrappers): New function for
	freeing wrappers of dynamic methods.

	* loader.c (mono_free_method): Call it. Fixes #463323.

svn path=/branches/mono-2-4/mono/; revision=127076
2009-02-16 22:08:08 +00:00
Zoltan Varga 034798235b 2009-02-15 Zoltan Varga <[email protected]>
Backport of r125349.

	* marshal.c (mono_marshal_free_dynamic_wrappers): New function for
	freeing wrappers of dynamic methods.

	* loader.c (mono_free_method): Call it. Fixes #463323.

svn path=/branches/mono-2-4/mono/; revision=127075
2009-02-16 22:07:04 +00:00
Zoltan Varga f049ca86f7 2009-02-15 Zoltan Varga <[email protected]>
Backport of r126958.
	
	* reflection.c (clear_cached_object): New helper function.
	(mono_method_clear_object): New function to clear the cached reflection
	objects for a dynamic method.

	* object.c (mono_runtime_free_method): Call mono_method_clear_object ().
	Partly fixes # 463323.

svn path=/branches/mono-2-4/mono/; revision=127074
2009-02-16 21:59:09 +00:00
Rodrigo Kumpera bcd05ee327 In .:
* loader.c (method_from_memberref): Properly fix #474271 and
	don't break the runtime bad.

2009-02-16 Rodrigo Kumpera  <[email protected]>


svn path=/branches/mono-2-4/mono/; revision=127073
2009-02-16 21:51:24 +00:00
Zoltan Varga 4ed001307d 2009-02-16 Zoltan Varga <[email protected]>
Backport of r126983 + r127069.

	* ssa.c (visit_inst): Fix a crash if the instruction following a switch
	was optimized away.

	Backport of r126980.

	* mini-x86.c (mono_arch_get_vcall_slot): Handle yet another
	code sequence which matches a non-virtual call. Fixes #472654.

	Backport of r124419.

	* mini-amd64.c (mono_arch_get_vcall_slot): Handle yet another
	code sequence which matches a non-virtual call.

svn path=/branches/mono-2-4/mono/; revision=127071
2009-02-16 21:49:34 +00:00
Rodrigo Kumpera 4b4f5466cd In .:
2009-02-16 Rodrigo Kumpera  <[email protected]>

	Backport of r127032.

	* loader.c (method_from_memberref): Don't abort if the array
	method is not found. A regular loader failure is more informative
	and correct.

	Fixes #474271.
	

svn path=/branches/mono-2-4/mono/; revision=127061
2009-02-16 18:12:54 +00:00
Mark Probst 914d38a33e 2009-02-16 Mark Probst <[email protected]>
Backport of r125679.

	Contributed under the terms of the MIT/X11 license by Steven
	Munroe <[email protected]>.

	* mini-ppc.c (mono_arch_output_basic_block): Generate better code
	for LOADI4_MEMBASE.  Use addi instead of addic if it's not
	necessary.

svn path=/branches/mono-2-4/mono/; revision=127059
2009-02-16 17:12:39 +00:00
Mark Probst 8e677f9921 2009-02-16 Mark Probst <[email protected]>
Backport of r125676.

	Contributed under the terms of the MIT/X11 license by Steven
	Munroe <[email protected]>.

	* exceptions-ppc.c (mono_arch_get_restore_context): Code size
	comparison fix.

	* tramp-ppc.c (mono_arch_create_generic_class_init_trampoline):
	The trampoline can be longer on PPC64.

svn path=/branches/mono-2-4/mono/; revision=127056
2009-02-16 17:07:03 +00:00
Mark Probst 12815c0c7e 2009-02-16 Mark Probst <[email protected]>
Backport of r125672.

	Contributed under the terms of the MIT/X11 license by Steven
	Munroe <[email protected]>.

	* mini-ppc.c: Compiler warning fixes and trivial code
	simplifications.

svn path=/branches/mono-2-4/mono/; revision=127055
2009-02-16 17:06:12 +00:00
Mark Probst b535b7d4c0 2009-02-16 Mark Probst <[email protected]>
Backport of r125443.

	Contributed under the terms of the MIT/X11 license by Steven
	Munroe <[email protected]>.

	* ppc/ppc-codegen.h: Make operand order and case consistent
	(assembler order) for ppc_load_reg_update, ppc_load_multiple_regs,
	ppc_store_multiple_regs, ppc_lwz, ppc_lhz, ppc_lbz,
	ppc_stw,ppc_sth, ppc_stb, ppc_stwu, ppc_lbzu, ppc_lfdu, ppc_lfsu,
	ppc_lfsux, ppc_lfsx, ppc_lha, ppc_lhau, ppc_lhzu, ppc_lmw,
	ppc_lwzu, ppc_stbu, ppc_stfdu, ppc_stfsu, ppc_sthu, ppc_stmw.  Use
	"i" or "ui" instead of "d" for immediated operands to immediate
	arthimetic and logical instructions in macros ppc_addi, ppc_addis,
	ppc_ori, ppc_addic, ppc_addicd, ppc_andid, ppc_andisd.
	[__mono_ppc64__]: Make operand order and case consistent
	(assembler order) for ppc_load_multiple_regs,
	ppc_store_multiple_regs.  Simplify the DS form and make them
	consistent with D forms for ppc_load_reg, ppc_load_reg_update,
	ppc_store_reg, ppc_store_reg_update. ppc_ld, ppc_lwa, ppc_ldu,
	ppc_std, ppc_stdu.  Define ppc_lwax and ppc_lwaux.

2009-02-16  Mark Probst  <[email protected]>

	Backport of r125443.

	Contributed under the terms of the MIT/X11 license by Steven
	Munroe <[email protected]>.

	* exceptions-ppc.c (restore_regs_from_context): Correct operand
	order (offset then base reg) for ppc_load_multiple_regs.
	(emit_save_saved_regs) Correct operand order for
	ppc_store_multiple_regs.
	(mono_arch_get_call_filter): Correct operand order for
	ppc_load_multiple_regs.

	* mini-ppc.c (emit_memcpy): Fix operand order for
	ppc_load_reg_update and ppc_store_reg_update.
	(mono_arch_output_basic_block): Correct operand order for ppc_lha.
	(mono_arch_emit_epilog): Correct operand order for
	ppc_load_multiple_regs.

	* tramp-ppc.c (mono_arch_create_trampoline_code): Correct operand
	order for ppc_store_multiple_regs and ppc_load_multiple_regs.

svn path=/branches/mono-2-4/mono/; revision=127054
2009-02-16 17:04:06 +00:00
Mark Probst 3f1a1dbdfe 2009-02-16 Mark Probst <[email protected]>
Backport of r125430.

	* cpu-ppc64.md: Fixed storer4_memindex length.

svn path=/branches/mono-2-4/mono/; revision=127053
2009-02-16 17:01:59 +00:00
Marek Safar eceec54500 2009-02-16 Marek Safar <[email protected]>
A fix for bug #475965
	* generics.cs: Check generic parameter type after extracting from
	Expression<T>.


svn path=/branches/mono-2-4/mcs/; revision=127041
2009-02-16 15:33:42 +00:00
Atsushi Eno c3335e6f62 branch is broken too.
svn path=/branches/mono-2-4/mcs/; revision=127000
2009-02-16 08:07:02 +00:00
Zoltan Varga d8feb83640 2009-02-14 Zoltan Varga <[email protected]>
Backport of r126897.
	
	* method-to-ir.c (mini_emit_ldelema_1_ins): If the array index is a long,
	convert it to an in32. Fixes #475859.

	* arrays.cs: Add a test.

svn path=/branches/mono-2-4/mono/; revision=126900
2009-02-14 00:07:00 +00:00
Gonzalo Paniagua Javier 3a520d36c4 2009-02-13 Gonzalo Paniagua Javier <[email protected]>
* WebConnectionStream.cs: implemente (Read|Write)Timeout.
	Fixes bug #348159.


svn path=/branches/mono-2-4/mcs/; revision=126841
2009-02-13 15:08:53 +00:00
Marek Safar 3fe2bf4538 2009-02-13 Marek Safar <[email protected]>
A fix for bug #475327
	* expression.cs (ArrayCreation): Don't mutate values optimized away.


svn path=/branches/mono-2-4/mcs/; revision=126826
2009-02-13 12:08:57 +00:00
Zoltan Varga 00f2704267 2009-02-12 Zoltan Varga <[email protected]>
Backport of r126717.

	* mini-amd64.c (mono_arch_build_imt_thunk): Fix size calculation after
	the fail_tramp changes. Hopefully fixes #475132.

svn path=/branches/mono-2-4/mono/; revision=126811
2009-02-13 09:39:00 +00:00
Gonzalo Paniagua Javier 150b04b1b9 2009-02-05 Miguel De Icaza <[email protected]>
* sockets.c (_wapi_setsockopt): SO_REUSEPORT is needed also on
	MacOS X.  Fixes bug #471292


svn path=/branches/mono-2-4/mono/; revision=126772
2009-02-12 23:44:05 +00:00
Lluis Sanchez 098fc0b907 2009-02-12 Lluis Sanchez Gual <[email protected]>
* MarshalByRefObject.cs: Implemented MemberwiseClone(bool).


svn path=/branches/mono-2-4/mcs/; revision=126750
2009-02-12 19:46:11 +00:00
Zoltan Varga 1b5cea04fc 2009-02-12 Zoltan Varga <[email protected]>
Backport of r126737.

	* mini-s390x.c (mono_arch_output_basic_block): Fix the shift amounts in 
	OP_LCONV_TO_U2.

	* basic-long.cs: Add a test.

svn path=/branches/mono-2-4/mono/; revision=126742
2009-02-12 18:46:42 +00:00
Bill Holmes e61b2cd43d 2009-02-12 Bill Holmes <[email protected]>
Backport of r126738.  This is a safer variant of the
	  trunk for the 2.4 branch. The default in emit_marshal_boolean
	  for this version is I1.

	* object-internals.h : Fixing a typo in the
	  MonoReflectionComVisibleAttribute struct.

	* marshal.c (cominterop_com_visible): Check the implemented
	  interfaces for ComImport.

	* marshal.c (cominterop_get_native_wrapper_adjusted): For COM calls
	  assume that bools should be treated as VARIANTBOOLs.

	* marshal.c (emit_marshal_boolean): Adding cases for
	  MARSHAL_ACTION_MANAGED_CONV_IN and MARSHAL_ACTION_MANAGED_CONV_OUT.

	* marshal.c (mono_marshal_emit_managed_wrapper): Adding calls to
	  emit_marshal MARSHAL_ACTION_MANAGED_CONV_IN and OUT for bools.

	* marshal.c (cominterop_get_ccw): For COM calls assume that bools
	  should be treated as VARIANTBOOLs.

	Code is contributed under MIT/X11 license.


svn path=/branches/mono-2-4/mono/; revision=126740
2009-02-12 18:40:22 +00:00
Zoltan Varga 69b329a4a5 2009-02-12 Zoltan Varga <[email protected]>
Backport of r126737.

	* mini-s390x.c (mono_arch_output_basic_block): Fix the shift amounts in 
	OP_LCONV_TO_U2.

	* basic-long.cs: Add a test.

svn path=/branches/mono-2-4/mono/; revision=126739
2009-02-12 18:40:13 +00:00
Marek Safar 8cc06e5e77 2009-02-12 Marek Safar <[email protected]>
A fix for bug ##475246
	* expression.cs: More broken flowanalysis hacking needed.


svn path=/branches/mono-2-4/mcs/; revision=126729
2009-02-12 17:47:59 +00:00
Mark Probst 4fd91bf1c0 2009-02-12 Mark Probst <[email protected]>
* generic-sharing.c: Fixed a locking bug: The loader lock has to
	be taken before the templates lock.  Fixes part of #473150.

svn path=/branches/mono-2-4/mono/; revision=126715
2009-02-12 14:08:07 +00:00
Gonzalo Paniagua Javier 6b9376a9bf 2009-02-12 Gonzalo Paniagua Javier <[email protected]>
* io.c: EXDEV when moving directories fails now without creating a
	file in the destination.
	Fixes bug #326983.


svn path=/branches/mono-2-4/mono/; revision=126691
2009-02-12 07:44:10 +00:00
Gonzalo Paniagua Javier c457bcfa42 2009-02-12 Gonzalo Paniagua Javier <[email protected]>
* MonoIO.cs:
	* MonoIOError.cs: enable ERROR_NOT_SAME_DEVICE.


svn path=/branches/mono-2-4/mcs/; revision=126689
2009-02-12 07:43:36 +00:00
Zoltan Varga 63d82ffc3c 2009-02-12 Zoltan Varga <[email protected]>
Backport of r126668.
	
	* ssa.c (fold_ins): Use MONO_IS_JUMP_TABLE () and MONO_JUMP_TABLE_FROM_INS ()
	for processing jump tables. Fixes #473787.

svn path=/branches/mono-2-4/mono/; revision=126669
2009-02-12 00:23:23 +00:00
Mark Probst 2bdd7e92d3 2009-02-11 Mark Probst <[email protected]>
Backport of r126631.

	* class.c, class-internals.h: mono_method_get_context_general()
	combines the functionality of mono_method_get_context() and
	mini_method_get_context().

	* generic-sharing.c, domain-internals.h:
	mono_method_construct_object_context() and
	mono_domain_lookup_shared_generic() moved from mini.

	* icall.c (ves_icall_InternalInvoke): Handle the case where the
	method doesn't have the correct instantiation because it's shared
	generic code.  Fixes #473999.

2009-02-11  Mark Probst  <[email protected]>

	Backport of r126631.

	* mini-generic-sharing.c: mini_method_get_context() just calls
	mono_method_get_context_general() now.

	* mini.c, mini.h: Moved get_object_generic_inst(),
	construct_object_context_for_method() and
	mono_domain_lookup_shared_generic() to metadata/generic-sharing.c.

2009-02-11  Mark Probst  <[email protected]>

	Backport of r126631.

	* bug-473999.2.cs: New test.

	* Makefile.am: Test added.

svn path=/branches/mono-2-4/mono/; revision=126635
2009-02-11 19:23:28 +00:00
Andrew Jorgensen 5bb5d1d407 Missed part of the merge (not sure how that happened... I used svn diff
and patch.  Oh well, easy enough to fix.

svn path=/branches/mono-2-4/mono/; revision=126624
2009-02-11 17:23:13 +00:00
Zoltan Varga ca426640a8 2009-02-11 Zoltan Varga <[email protected]>
Backport of 126604.

	* branch-opts.c (mono_if_conversion): Handle the case where the merged 
	basic block fell through to its successor bblock without a branch. Fixes
	#474718.

	* iltests.il.in: Add a test.

svn path=/branches/mono-2-4/mono/; revision=126606
2009-02-11 14:36:29 +00:00
Bill Holmes 718382bad7 2009-02-11 Bill Holmes <[email protected]>
Backport of r126596.

	* socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal):
	  For Win32, add additional break conditions for accept.

	Code is contributed under MIT/X11 license.


svn path=/branches/mono-2-4/mono/; revision=126598
2009-02-11 13:50:55 +00:00
Gonzalo Paniagua Javier 32bf4798e3 2009-02-10 Gonzalo Paniagua Javier <[email protected]>
* CookieContainer.cs: separate cookies with "; " instead of just ';'.
	Fixes bug #386727.


svn path=/branches/mono-2-4/mcs/; revision=126531
2009-02-10 23:35:16 +00:00
Gonzalo Paniagua Javier dcff2f2285 Fix the windows build in the branch too
svn path=/branches/mono-2-4/mono/; revision=126513
2009-02-10 21:04:58 +00:00
Marek Habersack 17c171a0f9 Backport of r126482
svn path=/branches/mono-2-4/mcs/; revision=126483
2009-02-10 18:12:48 +00:00
Mark Probst 2debaf6612 2009-02-10 Mark Probst <[email protected]>
Backport of r126467.

	* mini-x86.c (mono_arch_context_get_int_reg): Handle all registers
	individually.  Fixes #473482.

2009-02-10  Mark Probst  <[email protected]>

	Backport of r126467.

	* bug-473482.2.cs: New test.

	* Makefile.am: Test added.

svn path=/branches/mono-2-4/mono/; revision=126469
2009-02-10 15:22:00 +00:00
Gonzalo Paniagua Javier 42d8948ea3 2009-02-10 Gonzalo Paniagua Javier <[email protected]>
* AppDomain.cs: this fixes the remoting tests.
	Zoltan found out that there was a domain improperly using shadow
	copy.


svn path=/branches/mono-2-4/mcs/; revision=126431
2009-02-10 07:37:33 +00:00
Andrew Jorgensen 6b01c59030 Backport of r126400
svn path=/branches/mono-2-4/mono/; revision=126402
2009-02-10 00:38:41 +00:00
Marek Habersack 00acd5fd49 Backport of r126371.
svn path=/branches/mono-2-4/mcs/; revision=126372
2009-02-09 21:09:25 +00:00
Andrew Jorgensen f434ba459c Fix Bug 472021 - Windows installation sqlsharp.bat (etc) broken
svn path=/branches/mono-2-4/mono/; revision=126349
2009-02-09 16:52:28 +00:00
Gonzalo Paniagua Javier 34c5d71769 2009-02-08 Gert Driesen <[email protected]>
* Dns.cs: BeginGetHostAddresses - renamed argument to match MS,
	reject "any" IP addresses. BeginGetHostEntry - renamed argument
	to match MS, reject "any" IP addresses. GetHostEntry - reject
	"any" IP addresses. GetHostAddresses - reject "any" IP addresses.
	GetHostByName - use "hostName" as paramname in ANE.


svn path=/branches/mono-2-4/mcs/; revision=126295
2009-02-08 23:20:27 +00:00
Gonzalo Paniagua Javier 53acf05e01 2009-02-08 Gert Driesen <[email protected]>
* DnsTest.cs: Use Assert syntax, and spaces to tabs. Added tests
	for argument checks.

svn path=/branches/mono-2-4/mcs/; revision=126294
2009-02-08 23:18:43 +00:00
Gonzalo Paniagua Javier be859b75ff 2009-02-08 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: lock SetResponseError.


svn path=/branches/mono-2-4/mcs/; revision=126293
2009-02-08 23:11:33 +00:00
Zoltan Varga f958258d28 2009-02-09 Zoltan Varga <[email protected]>
Backport of r126290.

	* wait.c (WaitForMultipleObjectsEx): Initialize poll variable.

svn path=/branches/mono-2-4/mono/; revision=126291
2009-02-08 23:08:59 +00:00
Gonzalo Paniagua Javier a5d0787137 2009-02-08 Gonzalo Paniagua Javier <[email protected]>
* HttpClientTransportSink.cs: if we get an WebException that does not
	have a response, dispatch it to the sink.



svn path=/branches/mono-2-4/mcs/; revision=126289
2009-02-08 22:51:35 +00:00
Ivan Zlatev fc990b1fdc 2009-02-07 Ivan N. Zlatev <[email protected]>
* DataGridView.cs: End or if end fails then cancel the current edit
	operation before clearing the data source.

svn path=/branches/mono-2-4/mcs/; revision=126215
2009-02-07 23:27:17 +00:00
Ivan Zlatev f97835553c 2009-02-07 Ivan N. Zlatev <[email protected]>
* DataGridView.cs: Data-bind only after the handle is created.
	[Fixes bug #473680]

svn path=/branches/mono-2-4/mcs/; revision=126214
2009-02-07 23:27:12 +00:00
Gonzalo Paniagua Javier 9dd4b35d13 2009-02-07 Gonzalo Paniagua Javier <[email protected]>
* socket-io.c: when requesting all the local ips, if there are no
	interfaces up and running, MS returns 127.0.0.1.


svn path=/branches/mono-2-4/mono/; revision=126204
2009-02-07 19:57:55 +00:00
Gonzalo Paniagua Javier 5a440ac217 2009-02-07 Gonzalo Paniagua Javier <[email protected]>
* mono-perfcounters-def.h: processor time is an inverse time.
	Fixes bug #468625.


svn path=/branches/mono-2-4/mono/; revision=126194
2009-02-07 18:57:36 +00:00
Gonzalo Paniagua Javier 67cbfb1f5c 2009-02-07 Gonzalo Paniagua Javier <[email protected]>
* configure.in: include stdio so that NULL is defined when checking
	for ifreq.


svn path=/branches/mono-2-4/mono/; revision=126165
2009-02-07 05:25:30 +00:00
Gonzalo Paniagua Javier 90a94a6b8b 2009-02-07 Gonzalo Paniagua Javier <[email protected]>
* Dns.cs: empty string for host (also 0.0.0.0) is just passed to the
	runtime, which will then retrieve the local IP addresses. Fixes bug
	#386637 part 2/2.


svn path=/branches/mono-2-4/mcs/; revision=126163
2009-02-07 05:22:36 +00:00
Gonzalo Paniagua Javier f6479e150f 2009-02-07 Gonzalo Paniagua Javier <[email protected]>
* socket-io.c: an empty host name returns the list of local IPs.
	Fixes bug #386637 part 1/2.


svn path=/branches/mono-2-4/mono/; revision=126161
2009-02-07 05:21:42 +00:00
Gonzalo Paniagua Javier 1208b12f69 2009-02-06 Gonzalo Paniagua Javier <[email protected]>
* StreamReader.cs: when a LF ends a decoded buffer and is not followed
	by a CR in the next decoded buffer, we didn't flush the string.
	Fixes bug #445326.


svn path=/branches/mono-2-4/mcs/; revision=126132
2009-02-06 23:02:06 +00:00
Gonzalo Paniagua Javier d3d80927e1 2009-02-06 Gonzalo Paniagua Javier <[email protected]>
* FtpWebRequest.cs: some servers have a comment after the directory
	name. Fixes bugs #471149 and #471216.


svn path=/branches/mono-2-4/mcs/; revision=126102
2009-02-06 20:19:30 +00:00
Gonzalo Paniagua Javier 73146ea69a 2009-02-06 Gonzalo Paniagua Javier <[email protected]>
* WebConnectionStream.cs: set the content length to 0 when the
	response is not supposed to have any content.


svn path=/branches/mono-2-4/mcs/; revision=126091
2009-02-06 19:33:54 +00:00
Zoltan Varga f7d427a360 2009-02-06 Zoltan Varga <[email protected]>
Backport of r126054.

	* marshal.c (get_runtime_invoke_type): Avoid sharing enum types since they
	need to be boxed.

svn path=/branches/mono-2-4/mono/; revision=126055
2009-02-06 15:18:43 +00:00
Marek Habersack 2b8f2bd2eb Backport of r126051
svn path=/branches/mono-2-4/mcs/; revision=126052
2009-02-06 15:06:58 +00:00
Marek Habersack 11d0202305 Reverting 126038
svn path=/branches/mono-2-4/mcs/; revision=126046
2009-02-06 14:11:25 +00:00
Marek Habersack a755dfc8ab Backport of r126037
svn path=/branches/mono-2-4/mcs/; revision=126038
2009-02-06 13:09:51 +00:00
Marek Habersack 2c9a79735d Backport of r126025
svn path=/branches/mono-2-4/mcs/; revision=126030
2009-02-06 12:26:30 +00:00
Marek Habersack abc43192bf Backport of r125945
svn path=/branches/mono-2-4/mcs/; revision=125946
2009-02-05 22:09:11 +00:00
Mark Probst 791e158847 2009-02-05 Mark Probst <[email protected]>
Backport of r125887.

	* object.c (mono_object_get_virtual_method): Properly inflate
	generic methods.  Fixes #472692.

2009-02-05  Mark Probst  <[email protected]>

	Backport of r125887.

	* jit-icalls.c (mono_helper_compile_generic_method): Don't inflate
	the method we get from mono_object_get_virtual_method() because
	that function does it properly, now.

2009-02-05  Mark Probst  <[email protected]>

	Backport of r125887.

	* bug-472692.2.cs: New test.

	* Makefile.am: Test added.

svn path=/branches/mono-2-4/mono/; revision=125910
2009-02-05 18:46:12 +00:00
Ivan Zlatev 35022b4629 2009-02-05 Ivan N. Zlatev <[email protected]>
* DataGridViewRowCollection.cs, DataGridView.cs: Fix row insertation:
	   - Use ArrayList.Insert instead of the Item property so that the item
	   is actually inserted and not an existing item replaced.
	   - Call DataGridView.OnRowsAddedInternal and drop internal from
	   OnRowsAdded for binary compitability. This also fixes several
	   redrawing issues.
	[Fixes bug #472968]

svn path=/branches/mono-2-4/mcs/; revision=125901
2009-02-05 18:26:32 +00:00
Andrés G. Aragoneses 13e7da0b12 (Backport typo fix in r125894.)
System.Windows.Forms/ToolBarButton.cs: Doh, fire OnUIATextChanged
  *after* setting the value.

svn path=/branches/mono-2-4/mcs/; revision=125896
2009-02-05 18:07:46 +00:00
Marek Habersack 31d1906af8 Backport of r125885
svn path=/branches/mono-2-4/mcs/; revision=125888
2009-02-05 17:06:35 +00:00
Andrés G. Aragoneses e8030a1270 oops, fix build
svn path=/branches/mono-2-4/mcs/; revision=125877
2009-02-05 16:15:30 +00:00
Andrés G. Aragoneses 81732363f2 * ToolBarButton.cs: OnTextChanged added.
(Backport of r125802.) r: jpobst

svn path=/branches/mono-2-4/mcs/; revision=125876
2009-02-05 16:10:56 +00:00
Miguel de Icaza e47086ae2c Backport the fix for the nullref on WebConnectionStream
svn path=/branches/mono-2-4/mcs/; revision=125875
2009-02-05 16:09:10 +00:00
Marek Habersack adb5812097 Backport of r125857
svn path=/branches/mono-2-4/mcs/; revision=125858
2009-02-05 13:15:31 +00:00
Rodrigo Kumpera a629d14e14 2009-02-05 Rodrigo Kumpera <[email protected]>
Backport of r125849.

	* class.c (mono_class_create_from_typedef): The CLR supports SystemF
	recursive types such as List<T>:Cons<T,List<T>> so when doing the lookup
	for the parent type, the created type must be ready to be used on a generic
	instantiation.
	We fill this_arg/byval_arg if the parent is a generic instance to make sure
	we won't have duplicated entries in generic_inst_cache.

	Fixes #469553.



svn path=/branches/mono-2-4/mono/; revision=125851
2009-02-05 11:52:52 +00:00
Mark Probst 455afec78e 2009-02-05 Mark Probst <[email protected]>
Backport of r125839.

	* mini-exceptions.c (ves_icall_get_frame_info): Account for the
	fact that mono_find_jit_info() sometimes returns the context
	corresponding to the jit info in new_ctx.  Fixes #472600.

2009-02-05  Mark Probst  <[email protected]>

	Backport of r125839.

	* bug-472600.2.cs: New test.

	* Makefile.am: Test added.

svn path=/branches/mono-2-4/mono/; revision=125850
2009-02-05 11:45:58 +00:00
Marek Habersack cee2f48565 Backport of r125798
svn path=/branches/mono-2-4/mcs/; revision=125799
2009-02-05 00:58:02 +00:00
Gonzalo Paniagua Javier 3a1003365a new tests for empty string
svn path=/branches/mono-2-4/mcs/; revision=125796
2009-02-05 00:22:18 +00:00
Gonzalo Paniagua Javier d8f224fa77 2009-02-04 Gonzalo Paniagua Javier <[email protected]>
* DateTime.cs: check for null and empty strings before anything else
	in CoreParse.


svn path=/branches/mono-2-4/mcs/; revision=125794
2009-02-05 00:21:03 +00:00
Miguel de Icaza 22492c37cc Remove public
svn path=/branches/mono-2-4/mcs/; revision=125749
2009-02-04 20:58:29 +00:00
Zoltan Varga a9e7fb0abd 2009-02-04 Zoltan Varga <[email protected]>
Backport of 125697.

	* mini-exceptions.c (mono_setup_altstack): Use a more reasonable altstack
	size on systems with 64k pages. Fixes #471389.

svn path=/branches/mono-2-4/mono/; revision=125698
2009-02-04 16:34:19 +00:00
Marek Safar 02284d8008 Fixed typo.
svn path=/branches/mono-2-4/mcs/; revision=125684
2009-02-04 14:08:30 +00:00
Marek Habersack 0b4c366520 Backport of r125663
svn path=/branches/mono-2-4/mcs/; revision=125664
2009-02-04 10:45:22 +00:00
Marek Habersack f5c7491d79 Backport of r125659
svn path=/branches/mono-2-4/mcs/; revision=125660
2009-02-04 09:04:05 +00:00
Zoltan Varga 4dd31c484d 2009-02-04 Zoltan Varga <[email protected]>
Backport of 125637.
	
	* Regex.cs: Disable the new regex engine for now.

svn path=/branches/mono-2-4/mcs/; revision=125638
2009-02-04 02:21:16 +00:00
Gonzalo Paniagua Javier 48c4359548 2009-02-03 Gonzalo Paniagua Javier <[email protected]>
* WebConnection.cs:
	* HttpWebRequest.cs: calling Abort is safe now if the request has been
	read entirely.


svn path=/branches/mono-2-4/mcs/; revision=125635
2009-02-04 01:50:26 +00:00
Rodrigo Kumpera 3d48548a24 In metadata:
Backport of r125603.

	* verify.c (is_compatible_boxed_valuetype): When checking if the boxed 
	valuetype is compatible with target type, check by inheritance as a
	VT is not really compatible with System.ValueType, for example.

	* verify.c (do_invoke_method): Improve error message.

	* verify.c (do_box_value): If boxing a nullable, use the type argument
	on stack instead.

	* verify.c (do_newobj): Improve error message.	

	Fixes #469549.

2009-02-03 Rodrigo Kumpera  <[email protected]>

In tests/verifier:
	Backport of r125604.

	* valid_boxed_vt_compatible_with_sys_vt_or_sys_enum.il:
	Regression test for #469549.

2009-02-03 Rodrigo Kumpera  <[email protected]>


svn path=/branches/mono-2-4/mono/; revision=125606
2009-02-03 22:05:30 +00:00
Ivan Zlatev bfb47f0422 2009-02-03 Ivan N. Zlatev <[email protected]>
* DataGridViewRowCollection.cs, DataGridView.cs: Move row completion
	code in the row collection code, so that the completion happens before
	the CollectionChanged event, also better encapsulation.
	[Fixes bug #471987]

svn path=/branches/mono-2-4/mcs/; revision=125587
2009-02-03 19:43:40 +00:00
Rodrigo Kumpera c5e9df9a7d In metadata:
2009-02-03 Rodrigo Kumpera  <[email protected]>

	Backport of r125581.

	* verify.c (mono_delegate_signature_equal): Make it possible to check
	first-arg-bound delegates to static method.

	* verify.c (verify_delegate_compatibility): Correctly verify delegates to
	static methods with the first arg bound.

	Fixes #469529.


In tests/verifier:
	Backport of r125582.

	* unverifiable_delegate_with_bad_bound_first_arg_to_static_method.il:
	* mono/tests/verifier/valid_ldfnt_delegates_of_static_methods.il:
	Regression test for #469529.

2009-02-03 Rodrigo Kumpera  <[email protected]>


svn path=/branches/mono-2-4/mono/; revision=125586
2009-02-03 19:41:23 +00:00
Mark Probst 4bfa3b8cb4 2009-02-03 Mark Probst <[email protected]>
Backport of r125565.

	* generic-sharing.c: Don't hold domain lock when calling
	instantiate_other_info().  Fixes #471958.

	* domain-internals.h, loader.c: Describe locking policy of domain
	lock vs loader lock.

svn path=/branches/mono-2-4/mono/; revision=125570
2009-02-03 18:41:15 +00:00
Rodrigo Kumpera d0cfd383a1 In metadata:
Backport of r125539.

	* verify.c: Added stack_slot_full_name to provide decent and more meanfull
	errors.

	* verify.c (is_compatible_boxed_valuetype): Be less restrictive when not
	under strict mode. Any type, when boxed can be seen as a reference type.

	Fixes #469528.

2009-02-03 Rodrigo Kumpera  <[email protected]>

In tests/verifier:
2009-02-03 Rodrigo Kumpera  <[email protected]>

	Backport of r125540.

	* valid_valuetype_boxed_types_are_merge_compatible.il:
	Regression test for #469528.


svn path=/branches/mono-2-4/mono/; revision=125561
2009-02-03 17:54:42 +00:00
Marek Safar 236f5b982c Fixes build.
svn path=/branches/mono-2-4/mcs/; revision=125550
2009-02-03 16:50:46 +00:00
Marek Safar 082abf401a 2009-02-03 Marek Safar <[email protected]>
* class.cs, generic.cs: Emit type parameter constraints for nested
	types.


svn path=/branches/mono-2-4/mcs/; revision=125508
2009-02-03 12:08:02 +00:00
Gonzalo Paniagua Javier bc2585699c 2009-02-03 Gonzalo Paniagua Javier <[email protected]>
* WebProxy.cs: use TryParse when checking for a localhost IP.


svn path=/branches/mono-2-4/mcs/; revision=125500
2009-02-03 10:08:56 +00:00
Gonzalo Paniagua Javier 6dad7702ea 2009-01-26 Gonzalo Paniagua Javier <[email protected]>
* HttpWebResponse.cs: avoid throwing an exception when
	Content-Length is not present.

svn path=/branches/mono-2-4/mcs/; revision=125493
2009-02-03 08:18:25 +00:00
Raja R Harinath 84031f8584 Fix #463999
* CommittableTransaction.cs (CommitCallback): Handle the case
where the callback is invoked before BeginCommit ends due to the
async call ending synchronously.

svn path=/branches/mono-2-4/mcs/; revision=125490
2009-02-03 07:20:32 +00:00
Rodrigo Kumpera 243a027520 In metadata:
2009-02-03 Rodrigo Kumpera  <[email protected]>

	Backport of r125458.

	* object.h: The lower bound of an array is a signed integer value.
	Introduce mono_array_lower_bound_t typedef. It should be used instead of
	gint32 as under MONO_BIG_ARRAYS it will be a gint64.

	* icall.c: Cast MonoArrayBounds::length to a signed value so correctly
	calculate the upper bound.
	
	Fixes #471252.

In mini:
2009-02-03  Rodrigo Kumpera  <[email protected]>

	Backport of r125459.

	* arrays.cs: Test for Get/SetValue of array with negate lower bounds.
	

svn path=/branches/mono-2-4/mono/; revision=125461
2009-02-03 03:06:01 +00:00
Rodrigo Kumpera 5b78093eef 2008-02-03 Rodrigo Kumpera <[email protected]>
* MonoMethod.cs (ToString): Fix the 1.1 build.


svn path=/branches/mono-2-4/mcs/; revision=125457
2009-02-03 02:53:00 +00:00
Ivan Zlatev 4b6d5edc78 2009-02-02 Ivan N. Zlatev <[email protected]>
* DataGridView.cs: When editing is finished do not remove the editing
	row, because it has already become a real one. Instead add a new one.
	[Fixes bug #471754]

svn path=/branches/mono-2-4/mcs/; revision=125445
2009-02-02 23:36:15 +00:00
Rodrigo Kumpera b9d3e3262c Backport of r125415.
* MonoMethod.cs (ToString): Fix the representation of non primitive structs.

2008-02-02  Rodrigo Kumpera  <[email protected]>


svn path=/branches/mono-2-4/mcs/; revision=125417
2009-02-02 22:01:46 +00:00
Rodrigo Kumpera 77c4302bdf In Test/System.Reflection:
2008-02-02  Rodrigo Kumpera  <[email protected]>

	Backport of r125410.

	* MethodInfoTest.cs: Test for #409583.

In System.Reflection:
2008-02-02  Rodrigo Kumpera  <[email protected]>

	Backport of r125409.

	* MonoMethod.cs (ToString): Fix representation of pointer types.

	Fixes #409583.


svn path=/branches/mono-2-4/mcs/; revision=125411
2009-02-02 21:11:19 +00:00
Rodrigo Kumpera 7f13ce00ce 2009-02-02 Rodrigo Kumpera <[email protected]>
Backport of r125402.

	* icall.c (type_from_name): Ignore reflection frames to find out the real caller.

	Fixes #471255.


svn path=/branches/mono-2-4/mono/; revision=125404
2009-02-02 20:40:08 +00:00
Mark Probst 643a83b9a0 2009-02-02 Mark Probst <[email protected]>
Backport of r125388.

	* generic-sharing.c (lookup_or_register_other_info): Make sure the
	loader lock is not taken while the templates lock is held.  Fixes
	#471089.

svn path=/branches/mono-2-4/mono/; revision=125391
2009-02-02 18:48:15 +00:00
Mark Probst 25b50b1c80 2009-02-02 Mark Probst <[email protected]>
Backport or r125371.

	* metadata.c (type_in_image): Added a check to fix a monodis
	crash.

svn path=/branches/mono-2-4/mono/; revision=125377
2009-02-02 17:07:07 +00:00
Andrés G. Aragoneses 2e3f003f5f 2009-02-02 Andrés G. Aragoneses <[email protected]>
* ToolBar.cs: Add new UIAPerformClick method to be called by
        UIAutomationWinforms when someone calls Invoke() on the
        ToolBarButtonProvider. (Backport of r125354.) r: jpobst


svn path=/branches/mono-2-4/mcs/; revision=125358
2009-02-02 16:02:09 +00:00
Marek Safar b8a1e12c73 2009-02-02 Marek Safar <[email protected]>
A fix for bug #471213
	* class.cs: Avoid emitting backing field for abstract event fields.


svn path=/branches/mono-2-4/mcs/; revision=125335
2009-02-02 11:33:07 +00:00
Ivan Zlatev 95ca868476 2009-02-01 Ivan N. Zlatev <[email protected]>
* DataGridView.cs: Complete incomplete rows when they are added to
	the grid.
	[Fixes bug #471068]

svn path=/branches/mono-2-4/mcs/; revision=125278
2009-02-01 20:00:30 +00:00
Ivan Zlatev 58c2baf6a6 2009-02-01 Ivan N. Zlatev <[email protected]>
* DataGridView.cs, DataGridViewColumnCollection.cs: Ensure that the
	binding is cleared prior to setting it to null. Fixes a regression
	causing exceptions when the DataSource is set to null and then set
	again to a data source.

svn path=/branches/mono-2-4/mcs/; revision=125272
2009-02-01 18:33:43 +00:00
Marek Safar 3fc405788c 2009-02-01 Marek Safar <[email protected]>
A fix for bug #359731
	* cs-tokenizer.cs, cs-parser.jay: Correctly parse nested query
	expressions.


svn path=/branches/mono-2-4/mcs/; revision=125270
2009-02-01 18:23:45 +00:00
Ivan Zlatev 79d7ad5921 2009-02-01 Ivan N. Zlatev <[email protected]>
* DataGridView.cs, DataGridViewImageColumn.cs, DataGridViewCell.cs:
	   - Make Image/Bitmap cells work.
	   - Handle images with size greater than the cell.
	   - Default to MiddleCenter alignment for image cells.
	[Fixes bug #471101]

svn path=/branches/mono-2-4/mcs/; revision=125260
2009-02-01 16:31:21 +00:00
Rodrigo Kumpera 4809f77419 2009-01-31 Rodrigo Kumpera <[email protected]>
Backport of r125172, r125205 and r125206 

	* basic-calls.cs: Test for the weird crash found on arm.
	
	* cpu-arm.md: Increase the size of storer8_membase_reg and
	loadr8_membase_reg to 24 bytes to accomodate the extra add.

	* mini-arm.c (mono_arch_output_basic_block): Under FPA, when emitting
	OP_STORER8_MEMBASE_REG and OP_LOADR8_MEMBASE_REG, add the original
	reg to LR otherwise we'll be loading/storing from just the offset.

	* cpu-arm.md: Increase the size of storer8_membase_reg to 20 bytes
	as it might use decomposed ops.


svn path=/branches/mono-2-4/mono/; revision=125207
2009-01-31 03:55:25 +00:00
Rodrigo Kumpera 71b8786ee9 2009-01-30 Rodrigo Kumpera <[email protected]>
Backport of r125077-79
	* exceptions-arm.c (mono_arch_find_jit_info): The frame layout on arm have
	separate frame and stack pointers, so we must use FP to find the register
	spill area.
	The FP reg is retrieved from the MonoContext::regs array.


	* mini-arm.c (mono_arch_output_basic_block): Emit two cond ops for OP_FBGE
	as FPA requires it.

	* mini-arm.c (mono_arch_emit_setret): Emit OP_FMOVE for methods that
	return R4 and R8 when not running under softfloat.

	Fixes basic-calls.exe


svn path=/branches/mono-2-4/mono/; revision=125116
2009-01-30 17:12:46 +00:00
Marek Habersack 0c0fa5ec89 Backport of r125111.
svn path=/branches/mono-2-4/mcs/; revision=125112
2009-01-30 16:53:05 +00:00
Marek Safar 57e29afeaf 2009-01-30 Marek Safar <[email protected]>
A fix for bug #470767
	* statement.cs: Introduced BlockScopeExpression, needed when 
	expression tree conversion has to emit scope variables.


svn path=/branches/mono-2-4/mcs/; revision=125096
2009-01-30 14:51:17 +00:00
Gonzalo Paniagua Javier c1577730af revert changes that should not be here yet
svn path=/branches/mono-2-4/mcs/; revision=124989
2009-01-29 19:00:13 +00:00
Gonzalo Paniagua Javier e22310c6b8 fix the 1.x build. Patch from Marek Safar
svn path=/branches/mono-2-4/mcs/; revision=124986
2009-01-29 18:57:41 +00:00
Gonzalo Paniagua Javier dc34921ff7 fix changelog
svn path=/branches/mono-2-4/mcs/; revision=124960
2009-01-29 17:18:54 +00:00
Gonzalo Paniagua Javier c4c2071766 2009-01-29 Gonzalo Paniagua Javier <[email protected]>
* Tds70.cs: fix for output parameters and '@'.
	Fixes bug #470120.


svn path=/branches/mono-2-4/mcs/; revision=124959
2009-01-29 17:16:46 +00:00
Gonzalo Paniagua Javier 16e7814ee4 2009-01-29 Gonzalo Paniagua Javier <[email protected]>
* HttpApplicationFactory.cs: fix check that avoids lock. Keep one
	HttpApplication instance ready to be returned in an instance variable
	to avoid a few locks.


svn path=/branches/mono-2-4/mcs/; revision=124949
2009-01-29 16:41:12 +00:00
Carlos Alberto Cortez 568d44fd06 2009-01-29 Carlos Alberto Cortez <[email protected]>
* XplatUIX11.cs: We should use utf8 handling clipboard transference
        with other x11 applications, and use utf16 when handling clipboard
        data in the class library. Update the related points as well.
        Fixes #468683.


svn path=/branches/mono-2-4/mcs/; revision=124920
2009-01-29 14:15:30 +00:00
Ivan Zlatev bcdc624995 2009-01-28 Ivan N. Zlatev <[email protected]>
* DataGridViewCell.cs: Format strings according to the supplied
	CellStyle.Format.
	[Fixes bug #470384]

svn path=/branches/mono-2-4/mcs/; revision=124878
2009-01-28 23:34:19 +00:00
Marek Habersack f2b360fc5d Backport of r124872
svn path=/branches/mono-2-4/mcs/; revision=124874
2009-01-28 23:29:31 +00:00
Bill Holmes f913aabf5c 2009-01-28 Bill Holmes <[email protected]>
Backport of r124869.

	* Uri.cs (IsWellFormedUriString):  Changing IsWellFormedUriString
	  to not throw an exception but return false instead.

	Contributed under MIT/X11 license.


svn path=/branches/mono-2-4/mcs/; revision=124870
2009-01-28 23:24:09 +00:00
Ivan Zlatev 3cd16ddbdb 2009-01-28 Ivan N. Zlatev <[email protected]>
* DataGridView.cs: Reset the hover cell if it gets moved due to row(s)
	addition or removal. Fixes multiple crashes in OnMouseMove.

svn path=/branches/mono-2-4/mcs/; revision=124868
2009-01-28 22:48:56 +00:00
Carlos Alberto Cortez 8edff05440 2009-01-28 Carlos Alberto Cortez <[email protected]>
* TreeNode.cs: NextVisibleNode and PrevVisibleNode properties don't
	take into account the fact that OpenTreeNodeEnumerator needs to call
	MoveNext/MovePrevious to actually put the passed node as the one
	retrieved in Current. This way this property should work as really
	expected in .net.
	Fixes part of #467225.


svn path=/branches/mono-2-4/mcs/; revision=124802
2009-01-28 17:14:50 +00:00
Carlos Alberto Cortez bd3a3e1ec5 2009-01-28 Carlos Alberto Cortez <[email protected]>
* TreeView.cs: When calculating the scrollbars, don't use
	TreeNode.Bounds, since it still can have the values of the previous
	-and now invalid- layout -which depends on TreeView.skipped_nodes, and
	could not have been updated as well-, and use the actual number of
	visible number of nodes to compute the height needed to contain all
	the nodes. Also reset the value of vbar to 0 when disabled - this way
	we make sure that, when re-enabled, it will update the visible area of
	the treeview, even if the previous value before disabling it is the
	same as now. Finally don't do anything for the vbar.ValueChanged
	handler - for the case wheer we manually set the value but don't the
	vbar is disabled already.
	Fixes part of #467225.


svn path=/branches/mono-2-4/mcs/; revision=124801
2009-01-28 17:12:51 +00:00
Carlos Alberto Cortez 330dee9522 2009-01-28 Carlos Alberto Cortez <[email protected]>
* TreeView.cs: In CollapseAll, set vbar to the maximum value, instead 
	of trying to set as top node the highest parent of the previous
	top node. Moving to the bottom of the TreeView after a call
	to CollapseAll is exactly what .net does. This should avoid some
	nasty issue when CollapseAll is called and we don't need the
	vertical scroll bar.
	

svn path=/branches/mono-2-4/mcs/; revision=124800
2009-01-28 17:09:34 +00:00
Marek Safar e65b5f396b 2009-01-28 Marek Safar <[email protected]>
A fix for bug #470227
	* cs-tokenizer.cs: Remove too agressive parser optimization.


svn path=/branches/mono-2-4/mcs/; revision=124787
2009-01-28 16:13:16 +00:00
Marek Safar 5c4721c3d5 2009-01-28 Marek Safar <[email protected]>
A fix for bug #324319
	* class.cs: Remove too early base type resolve.


svn path=/branches/mono-2-4/mcs/; revision=124770
2009-01-28 12:29:20 +00:00
Mark Probst 3f7fdcc82d 2009-01-27 Mark Probst <[email protected]>
Backport of r124712.

	* method-to-ir.c (emit_stloc_ir): Only apply the reg-reg move
	optimization if the top of stack is the last instruction in the
	bblock.  Otherwise it might have been used after its definition.
	Fixes #469742.

2009-01-27  Mark Probst  <[email protected]>

	Backport of r124712.

	* bug469742.2.il: New test.

	* Makefile.am: Test added.

svn path=/branches/mono-2-4/mono/; revision=124715
2009-01-27 21:49:44 +00:00
Zoltan Varga a3d384dbbf 2009-01-27 Zoltan Varga <[email protected]>
* Backport of r123987.

	* method-to-ir.c (method-to-ir.c): Add support for the constrained prefix
	on type variables in AOTed code.

svn path=/branches/mono-2-4/mono/; revision=124691
2009-01-27 18:31:49 +00:00
Ivan Zlatev 699f408478 2009-01-27 Ivan N. Zlatev <[email protected]>
* DataGridView.cs: Fix a NRE when setting the CurrentCell to null.

svn path=/branches/mono-2-4/mcs/; revision=124671
2009-01-27 16:48:12 +00:00
Ivan Zlatev 332943e496 2009-01-27 Ivan N. Zlatev <[email protected]>
* XplatUIX11.cs: Fire Timer.Tick even if there is no MainForm for the
	current context.
	[Fixes bug #469239]

svn path=/branches/mono-2-4/mcs/; revision=124669
2009-01-27 16:41:05 +00:00
Marek Habersack 204dc4ea04 Backport of r124659
svn path=/branches/mono-2-4/mcs/; revision=124660
2009-01-27 14:25:33 +00:00
Gonzalo Paniagua Javier 49bbf1f4c3 2009-01-26 Christian Prochnow <[email protected]>
* Ping.cs: ignore ICMP echo request packet in case we ping
	  localhost.


svn path=/branches/mono-2-4/mcs/; revision=124625
2009-01-27 04:23:18 +00:00
Andreia Gaita 401cabfc6a 2009-01-26 Andreia Gaita <[email protected]>
* WebBrowser.cs: fix initial value of ScrollbarsEnabled, so they
	won't be disabled by default.
	[Backported from r124596, fixes #468690]

svn path=/branches/mono-2-4/mcs/; revision=124615
2009-01-27 00:44:14 +00:00
Marek Safar a2e8d38fa6 2009-01-27 Marek Safar <[email protected]>
* anonymous.cs: Fixed recent regression when initializing captured 
	this.


svn path=/branches/mono-2-4/mcs/; revision=124608
2009-01-27 00:01:40 +00:00
Zoltan Varga 099b6e3c26 2009-01-26 Zoltan Varga <[email protected]>
Backport of r124582.

	* mini-s390x.c: Remove a stray declaration of emit_sig_cookie () to fix
	the s390x build.

svn path=/branches/mono-2-4/mono/; revision=124583
2009-01-26 22:12:45 +00:00
Ivan Zlatev 9979ab1f91 2009-01-26 Ivan N. Zlatev <[email protected]>
* DataGridView.cs: Do not clear the rows if we are not databound.

svn path=/branches/mono-2-4/mcs/; revision=124570
2009-01-26 21:58:17 +00:00
Ivan Zlatev f11abca644 2009-01-26 Ivan N. Zlatev <[email protected]>
* DataGridView.cs: Do not be too smart about selecting the first cell
	when the first row is added as this is not what MS does. Fixes the
	failing unit tests.

svn path=/branches/mono-2-4/mcs/; revision=124566
2009-01-26 21:45:47 +00:00
Marek Habersack c12233306a Backport of r124547
svn path=/branches/mono-2-4/mcs/; revision=124548
2009-01-26 18:58:39 +00:00
Marek Safar 5995136419 2009-01-26 Marek Safar <[email protected]>
A fix for bug #469019
	* anonymous.cs: Use all parent type parameters when instantiating
	nested generic storey.


svn path=/branches/mono-2-4/mcs/; revision=124533
2009-01-26 16:49:46 +00:00
Marek Safar 2441d1f521 2009-01-26 Marek Safar <[email protected]>
* expression.cs: Check for null instance methodgroup expression.


svn path=/branches/mono-2-4/mcs/; revision=124506
2009-01-26 15:28:26 +00:00
Marek Habersack 410a27b2bf Backport of r124491
svn path=/branches/mono-2-4/mcs/; revision=124492
2009-01-26 13:27:30 +00:00
Marek Safar a05f9f8b5e 2009-01-26 Marek Safar <[email protected]>
A fix for bug #469244
	* cs-tokenizer.cs, cs-parser.jay: Fixed parsing of nullable type
	instance inside a conditional expression.


svn path=/branches/mono-2-4/mcs/; revision=124489
2009-01-26 13:20:16 +00:00
Marek Habersack 6e5c11cd30 Backport of r124479
svn path=/branches/mono-2-4/mcs/; revision=124481
2009-01-26 11:39:43 +00:00
Marek Habersack b1c0dfa135 Backport of r124475
svn path=/branches/mono-2-4/mcs/; revision=124476
2009-01-26 10:47:02 +00:00
Gonzalo Paniagua Javier 3653a83b39 2009-01-26 Gonzalo Paniagua Javier <[email protected]>
* SocketTest.cs:
	(TestSelect1) avoid RST by reading the bytes from the client.

svn path=/branches/mono-2-4/mcs/; revision=124464
2009-01-26 07:02:18 +00:00
Zoltan Varga cb0c6ba813 2009-01-26 Zoltan Varga <[email protected]>
Backport of r124456.

	* exceptions-amd64.c (mono_arch_exceptions_init): Call 
	get_throw_pending_exception () to avoid initialization races.

	* mini-exceptions.c (mono_exceptions_init): Call an arch specific
	mono_arch_exceptions_init () function.

svn path=/branches/mono-2-4/mono/; revision=124462
2009-01-26 06:52:10 +00:00
Gonzalo Paniagua Javier 16eaf2a641 2009-01-26 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequest.cs: added locking in SetResponseData for the case
	when we get an error response before BeginGetResponse has been
	called.


svn path=/branches/mono-2-4/mcs/; revision=124453
2009-01-26 05:03:35 +00:00
Gonzalo Paniagua Javier 516a0835f0 fix ChangeLog
svn path=/branches/mono-2-4/mcs/; revision=124413
2009-01-24 08:16:23 +00:00
Gonzalo Paniagua Javier 7ff67aa81a Improved TDS connection pooling and synched with HEAD
svn path=/branches/mono-2-4/mcs/; revision=124409
2009-01-24 05:56:39 +00:00
Gonzalo Paniagua Javier 6f0d5440ce Do not throw exceptions when attempting to load satellite assemblies
svn path=/branches/mono-2-4/mcs/; revision=124407
2009-01-24 05:35:35 +00:00
Gonzalo Paniagua Javier 06c1a5f74c 2009-01-24 Gonzalo Paniagua Javier <[email protected]>
* appdomain.c: return NULL instead of throwing FileNotFoundException
	when LoadAssembly() fails.


svn path=/branches/mono-2-4/mono/; revision=124406
2009-01-24 05:35:23 +00:00
Gonzalo Paniagua Javier 572fa90350 2009-01-23 Gonzalo Paniagua Javier <[email protected]>
* AspComponentFoundry.cs: no need to throw. Caller handles a null
	return value.


svn path=/branches/mono-2-4/mcs/; revision=124398
2009-01-24 03:28:19 +00:00
Gonzalo Paniagua Javier 9a7ac8152c 2009-01-23 Gonzalo Paniagua Javier <[email protected]>
* HttpResponse.cs: make sure config is not null here.
	* HttpApplication.cs: add a timer (-d:PIPELINE_TIMER) for the pipeline.
	Handle timeouts for OutputPage() too.


svn path=/branches/mono-2-4/mcs/; revision=124396
2009-01-24 03:20:13 +00:00
Gonzalo Paniagua Javier 9468c9429f 2009-01-23 Gonzalo Paniagua Javier <[email protected]>
* HttpApplicationFactory.cs: set/reset the context for the application
	when creating/disposing. Dispose() out of the lock.


svn path=/branches/mono-2-4/mcs/; revision=124394
2009-01-24 03:04:12 +00:00
Marek Habersack 0c702ece52 Backport of r124385
svn path=/branches/mono-2-4/mcs/; revision=124386
2009-01-24 00:38:33 +00:00
Marek Habersack 8b2e70be67 Backport of r124377
svn path=/branches/mono-2-4/mcs/; revision=124378
2009-01-23 21:50:04 +00:00
Mark Probst 8ee63bd04a 2009-01-23 Mark Probst <[email protected]>
Backport of r124339.

	* mini-ppc.c (mono_arch_context_get_int_reg): Allow access to the
	stack pointer (r1).

svn path=/branches/mono-2-4/mono/; revision=124340
2009-01-23 16:48:19 +00:00
Marek Habersack 30f6ae193f 2009-01-23 Marek Habersack <[email protected]>
* BuildManager.cs: if dependencyCache already contains the virtual
	path, replace its corresponding file set (in AddToCache). This can
	happen only if the requested virtual path compilation resulted in
	errors and the compilation has been retried. Fixes bug #46268


svn path=/branches/mono-2-4/mcs/; revision=124326
2009-01-23 14:07:17 +00:00
Mark Probst 6d52bd6446 2009-01-23 Mark Probst <[email protected]>
Backport of r124022 and r124301.

	* metadata.c (mono_metadata_generic_param_equal): Owner as well as
	image must match.  Only compare the image if the owner is NULL.
	Fixes the AOT failures.

svn path=/branches/mono-2-4/mono/; revision=124305
2009-01-23 09:40:04 +00:00
Ivan Zlatev 85b4874919 2009-01-23 Ivan N. Zlatev <[email protected]>
* DataGridView.cs, DataGridViewCell.cs: Fix crashes when there is no
	editing control.

svn path=/branches/mono-2-4/mcs/; revision=124281
2009-01-23 01:35:31 +00:00
Ivan Zlatev ab52d70383 2009-01-23 Ivan N. Zlatev <[email protected]>
* DataGridView.cs: Fix new row adding/editing in the non-databound
	scenario.

svn path=/branches/mono-2-4/mcs/; revision=124280
2009-01-23 01:35:26 +00:00
Zoltan Varga 64d093c92a 2009-01-23 Zoltan Varga <[email protected]>
Backport of r124266.
	
	* metadata.c (mono_metadata_load_generic_params): Initialize the 
	MonoGenericParam structure using memset so the image field is initialized
	as well.

svn path=/branches/mono-2-4/mono/; revision=124268
2009-01-22 23:43:26 +00:00
Zoltan Varga b0af86bfc2 2009-01-22 Zoltan Varga <[email protected]>
Backport of r124260.
	
	* Stopwatch.cs: Reorder the calculations in Elapsed and ElapsedMilliseconds
	to avoid overflow. Fixes #468570. Patch by Yoni Shalom <[email protected]>.

svn path=/branches/mono-2-4/mcs/; revision=124262
2009-01-22 22:19:55 +00:00
Mark Probst 655579cbb1 2009-01-22 Mark Probst <[email protected]>
Backport of r124246.

	* mini-exceptions.c (ves_icall_get_frame_info): Fetch the generic
	info from the (correct) context.

2009-01-22  Mark Probst  <[email protected]>

	Backport of r124246.

	* generic-stack-traces2.2.cs: Another generic sharing test for
	stack traces.

	* Makefile.am: Test added.

svn path=/branches/mono-2-4/mono/; revision=124249
2009-01-22 21:15:17 +00:00
Jb Evain 2809fe1936 idiotic test NotWorking
svn path=/branches/mono-2-4/mcs/; revision=124242
2009-01-22 20:10:33 +00:00
Jb Evain e5590d4ff5 backport the linq fixes that happened in 124200:124231
svn path=/branches/mono-2-4/mcs/; revision=124232
2009-01-22 17:43:38 +00:00
Neville Gao 4d259921aa Backported r124045: Control enabled to support accessibility. Added
UIACollectionChangedEvent.

svn path=/branches/mono-2-4/mcs/; revision=124172
2009-01-22 06:01:24 +00:00
Mike Gorse 0043b1fd2b * TrackBar.cs: Backported R124116: Make LargeIncrement/Decrement
internal so that UIA can use them.
  Added UIAValueParamChangedEvent.

svn path=/branches/mono-2-4/mcs/; revision=124129
2009-01-21 23:32:53 +00:00
Atsushi Eno 8b50ed4dbb backport r124126.
svn path=/branches/mono-2-4/mcs/; revision=124127
2009-01-21 23:21:22 +00:00
Marek Habersack 7727921d34 Backport of r124121 and r124122
svn path=/branches/mono-2-4/mcs/; revision=124123
2009-01-21 22:53:22 +00:00
Zoltan Varga 56c1d33ae4 Revert r124022 as it is breaking AOT.
svn path=/branches/mono-2-4/mono/; revision=124102
2009-01-21 20:16:59 +00:00
Zoltan Varga cad348bcb2 2009-01-21 Zoltan Varga <[email protected]>
Backport of r124092.
	
	* method-to-ir.c (handle_alloc): Avoid generic instances in the
	out_of_line optimization.

svn path=/branches/mono-2-4/mono/; revision=124095
2009-01-21 19:34:51 +00:00
Mario Carrion c643703e79 2009-01-21 Mario Carrion <[email protected]>
* Form.cs: Backported r124064: UIA Support: Internal events
        added: UIAWindowStateChanged and UIATopMostChanged.

svn path=/branches/mono-2-4/mcs/; revision=124082
2009-01-21 18:54:38 +00:00
Zoltan Varga 9c234e78b1 Fix the 1.1 build.
svn path=/branches/mono-2-4/mcs/; revision=124077
2009-01-21 18:13:20 +00:00
Rodrigo Kumpera 85c63ecffe 2009-01-21 Rodrigo Kumpera <[email protected]>
Backport of r124059.

	* appdomain-unload-callback.cs: New test for the AppDomain::DomainUnload
	deadlock.

	* Makefile.am: Test added.


svn path=/branches/mono-2-4/mono/; revision=124072
2009-01-21 18:00:02 +00:00
Rodrigo Kumpera 86877ecd25 2009-01-21 Rodrigo Kumpera <[email protected]>
Backport of r124068.

	* appdomain.c (mono_domain_unload): Change the InterlockedIncrement to
	a plain store.

2009-01-21 Rodrigo Kumpera  <[email protected]>

	Backport of r124058.

	* domain-internals.h: Add new appdomain state MONO_APPDOMAIN_UNLOADING_START
	which signals that the unloading has started but all appdomain services must
	remain operational.

	* appdomain.c (mono_domain_unload): The initial state for unloading now
	is unloading_start and we switch to unloading after the managed call to
	AppDomain::DomainUnload has finished.

	The new unloading state has to be created because managed code in the
	DomainUnload event can depend on things like the threadpool still working.
	The domain must remain fully functional while the event executes.

	This shown as an issue due to Process::WaitForExit, which waits for
	async reads of stdout and stderr to complete. Since those are processed
	in the threadpool the code deadlocks because the DomainUnload callback 
	waits for the async read finished event, which should have been set by a
	threadpool job but has been discarded due to the domain been in unload
	state.


svn path=/branches/mono-2-4/mono/; revision=124071
2009-01-21 17:58:36 +00:00
Zoltan Varga a228d05aec 2009-01-21 Zoltan Varga <[email protected]>
Backport of r124065.
	
	* class.c (mono_class_setup_vtable_general): In the generic instance
	optimization, set method->slot for abstract virtual methods. Fixes part of
	#467834.

svn path=/branches/mono-2-4/mono/; revision=124067
2009-01-21 17:42:11 +00:00
Martin Baulig 19503869ca 2009-01-21 Martin Baulig <[email protected]>
Backport or r124060.

	* mini.h
	(MonoCompile): Added `disable_deadce_vars' to disable removing
	unused variables.

	* mini.c
	(mini_method_compile): Set `cfg->disable_deadce_vars' when running
	inside the debugger.

	* liveness.c (mono_analyze_liveness): Don't remove any unused
	variables if `cfg->disable_deadce_vars' is set.


svn path=/branches/mono-2-4/mono/; revision=124061
2009-01-21 17:00:39 +00:00
Sandy Armstrong 9e91c826fd * Managed.Windows.Forms/System.Windows.Forms/MenuItem.cs: Add
UIACheckChanged, UIARadioCheckChanged, UIAEnabledChanged, and
  UIATextChanged events.

* Managed.Windows.Forms/System.Windows.Forms/Form.cs: Add UIAMenuChanged
  event.

* Managed.Windows.Forms/System.Windows.Forms/Menu.cs:
* Managed.Windows.Forms/System.Windows.Forms/MenuAPI.cs: Note which
  internal APIs are being used by UIA.

svn path=/branches/mono-2-4/mcs/; revision=124055
2009-01-21 16:31:22 +00:00
Mark Probst ebb82987f6 2009-01-21 Mark Probst <[email protected]>
Backport of r124028.

	* method-to-ir.c: Only apply exception constructor optimization if
	the the method actually belongs to an exception class.  Fixes
	#467456.

2009-01-21  Mark Probst  <[email protected]>

	Backport of r124028.

	* bug-467456.cs: New test case.

	* Makefile.am: Test added.

svn path=/branches/mono-2-4/mono/; revision=124031
2009-01-21 12:36:49 +00:00
Mark Probst e311191ef7 2009-01-21 Mark Probst <[email protected]>
Backport of r124022.

	* metadata.c (mono_metadata_generic_param_equal): Owner as well as
	image must match.

2009-01-21  Mark Probst  <[email protected]>

	Backport of r124022.

	* generic-unloading.2.cs, generic-unloading-sub.2.cs: Test case
	for unloading images whose MonoGenericInst's are still in use.

	* Makefile.am: Test added.

svn path=/branches/mono-2-4/mono/; revision=124025
2009-01-21 11:11:54 +00:00
Zoltan Varga ab819e4118 2009-01-21 Zoltan Varga <[email protected]>
Backport of r123989.
	
	* mini-trampolines.c (mono_delegate_trampoline): Put back the previous
	change inside a #ifdef __mono_ppc64__.

svn path=/branches/mono-2-4/mono/; revision=123990
2009-01-21 04:33:07 +00:00
Zoltan Varga dc3f9d3f6d Fix the windows build.
svn path=/branches/mono-2-4/mono/; revision=123981
2009-01-21 01:55:25 +00:00
Mark Probst 451bc2a8a8 2009-01-21 Mark Probst <[email protected]>
Backport of r123959.

	* TypeBuilderTest.cs: Add test for fields in dynamic generic
	classes.

svn path=/branches/mono-2-4/mcs/; revision=123965
2009-01-21 00:03:59 +00:00
Mark Probst 84b2d6bfec 2009-01-21 Mark Probst <[email protected]>
Backport of r123958.

	* reflection.c (resolve_object): For fields, inflate the class and
	then get the field in the inflated class.

svn path=/branches/mono-2-4/mono/; revision=123964
2009-01-21 00:03:38 +00:00
Mark Probst a498cddad7 2009-01-20 Mark Probst <[email protected]>
Backport of r123917.

	* method-to-ir.c: Force the vtable variable in shared generic code
	for the case that they might show up on a stack trace where they
	are needed.

	* mini-exceptions.c: Save and use generic sharing info as well as
	IP in stack traces to resolve shared generic instantiations.

2009-01-20  Mark Probst  <[email protected]>

	Backport of r123917.

	* object-internals.h (struct _MonoException): Added a comment
	explaining the new use of trace_ips.

2009-01-20  Mark Probst  <[email protected]>

	Backport of r123917.

	* generic-stack-traces.2.cs: Generic sharing test for stack
	traces.

	* Makefile.am: Test added.

svn path=/branches/mono-2-4/mono/; revision=123946
2009-01-20 22:14:33 +00:00
Zoltan Varga 03c6b6918b 2009-01-20 Zoltan Varga <[email protected]>
Backport of r123914.
	
	* mini-trampolines.c (mono_delegate_trampoline): Revert the change which
	added a mono_get_addr_from_ftnptr () as it breaks the ia64 build.

svn path=/branches/mono-2-4/mono/; revision=123927
2009-01-20 21:22:20 +00:00
Andrew Jorgensen dc279e74dc update version numbers to 2.4
svn path=/branches/mono-2-4/mono/; revision=123902
2009-01-20 18:21:18 +00:00
6572 changed files with 371549 additions and 1081857 deletions

No files matched your search

-31
View File
@@ -1,31 +0,0 @@
/Makefile
/Makefile.in
/_tmpinst
/aclocal.m4
/autom4te.cache
/config.cache
/config.guess
/config.h
/config.h.in
/config.h.in
/config.log
/config.status
/config.sub
/configure
/libtool
/ltconfig
/ltmain.sh
/mono-*.tar.gz
/*.pc
/mono.spec
/semantic.cache
/stamp-h
/stamp-h.in
/stamp-h1
/tmpinst-dir.stamp
/missing
/compile
/depcomp
/install-sh
/doltlibtool
/doltcompile
-3041
View File
File diff suppressed because it is too large. Load diff
+18 -273
View File
@@ -1,65 +1,24 @@
2009-08-29 Jonathan Pryor <[email protected]>
2010-04-04 Andreas Färber <[email protected]>
* man/mdoc-export-html.1: Document --with-profile, --with-version.
* configure.in: Fix typo.
2009-09-08 Zoltan Varga <[email protected]>
Contributed under MIT/X11 license.
* acinclude.m4 (dolt_supported): Enable this for mips.
2009-12-22 Geoff Norton <[email protected]>
2009-08-29 Jonathan Pryor <[email protected]om>
* configure.in: Fix invalid escaping. Patch from Spina from
www.slacky.eu.
* man/mdoc.5: Document the new <format/> element.
2009-12-11 Zoltan Varga <[email protected]>
2009-08-18 Zoltan Varga <[email protected]>
* configure.in: Applied patch from Matt McClellan ([email protected]). Add a check
for 2 parameter sched_setaffinity in older glibc versions. Fixes
#564000.
* scripts/Makefile.am: Applied patch from Hib Eris ([email protected]).
Add $(SCRIPT_SUFFIX) to the name of the 'mod' tool.
2009-06-11 Zoltan Varga <[email protected]>
2009-08-04 Miguel de Icaza <[email protected]>
* Start the split between PLATFORM_WIN32 and TARGET_WIN32.
PLATFORM_WIN32 should be used to configure the runtime while
building it. TARGET_WIN32 is used for target execution.
This is used by Mono's AOT cross compiler when running on Windows,
but targetting a different operating system. So we have to tell
those two apart.
2009-07-24 Jb Evain <[email protected]>
* scripts/Makefile.am: generate a dmcs script for the 4.0 compiler
when building the net_4_0 profile.
2009-07-24 Jb Evain <[email protected]>
* configure.in
* runtime/Makefile.am
* data/Makefile.am: create a and populate a configuration folder
for the net_4_0 profile.
2009-07-21 Jb Evain <[email protected]>
* configure.in: add a --with-monotouch option.
* runtime/Makefile.am: use it to trigger the mcs monotouch build.
2009-07-14 Zoltan Varga <[email protected]>
* configure.in: Add more libraries needed by the llvm backend.
2009-07-02 Jb Evain <[email protected]>
* scripts/Makefile.am: monolinker is now a 2.0 assembly.
2009-07-02 jonas echterhoff <[email protected]>
* configure.in: Add linker flag on Mac OS X to allow access to other
processes, needed for debugging. Enable debugging on OS X.
2009-06-21 Zoltan Varga <[email protected]>
* configure.in (TARGET_BYTE_ORDER): New define containing the byte order of
the target.
* configure.in: Disable dtrace support if dtrace doesn't support the
-h option.
2009-06-18 Marek Habersack <[email protected]>
@@ -68,111 +27,18 @@
Added ecmascriptversion, msdomversion and w3cdomversion to the IE
8.0 entry. Fixes bug #513965
2009-06-16 Raja R Harinath <[email protected]>
* configure.in (--with-profile2): Simplify slightly.
(--with-profile4, --with-moonlight): Likewise.
2009-06-15 Miguel de Icaza <[email protected]>
* configure.in: Changed the default to not build the 4.0 profile
unless explicitly enabled.
2009-06-15 Zoltan Varga <[email protected]>
* CMakeLists.txt: Add mips support.
2009-06-14 Zoltan Varga <[email protected]>
* scripts/CMakeLists.txt: New file.
* samples/CMakeLists.txt: New file, currently empty.
2009-06-12 Andreia Gaita <[email protected]>
* data/config.in: add libcups dllmap entry
2009-06-11 Zoltan Varga <[email protected]>
* configure.in: Disable dtrace support if dtrace doesn't support the
-h option.
2009-06-10 Marek Safar <[email protected]>
* runtime/Makefile.am, configure.in: Make net_4_0 profile optional.
2009-06-07 Marek Safar <[email protected]>
* runtime/Makefile.am: Enabled net_4_0 for compilation.
2009-05-27 Zoltan Varga <[email protected]>
* configure.in: Disable USE_MUNMAP on ppc to work around #504411.
2009-05-26 Zoltan Varga <[email protected]>
2009-04-28 Zoltan Varga <[email protected]>
* CMakeLists.txt: Implement AC_OUTPUT, creation of config.make, etc.
* CMakeLists.txt: implement arm fpu detection, add vfp detection as
well.
* configure.in: Define a TARGET_<ARCH> preprocessor symbol for some
architectures.
* CMakeLists.txt: Add arm support.
2009-01-25 Zoltan Varga <[email protected]>
2009-05-24 Miguel de Icaza <[email protected]>
* Disable mono/docs build if we disabled the mcs build.
2009-05-24 Zoltan Varga <[email protected]>
* */CMakeLists.txt: Add beginnings of a cmake based build system.
2009-05-22 Zoltan Varga <[email protected]>
* acinclude.m4 (dolt_supported): Enable dolt on sparc linux.
2009-05-17 Zoltan Varga <[email protected]>
* configure.in: Add TARGET_POWERPC/POWERPC64 defines.
2009-05-09 Miguel de Icaza <[email protected]>
* configure.in: Instead of reporting the various disabled features
in a loop, where a keyword might fail, report the actual disabled
features in the sections that handle them
2009-05-08 Zoltan Varga <[email protected]>
* acinclude.m4 (dolt_supported): Add powerpc64.
2009-05-07 Rodrigo Kumpera <[email protected]>
* runtime/Makefile.am (mcs-compileall): Pass --security=validil
to the runtime so the assemblies are not required to be verifiable.
2009-05-06 Raja R Harinath <[email protected]>
* Makefile.am (compiler-tests): Rewrite to re-build the moon
assemblies after mcs/ is built.
* runtime/Makefile.am (build_profiles) [INSTALL_2_1]: Build only
the net_2_1_raw profile.
(test_profiles): New. Mention net_2_1 profile.
(moon-do-build): New.
2009-05-05 Miguel de Icaza <[email protected]>
* configure.in: Fix the bug reported on the mailing list by
Koushik K Dutta: do not build docs when --disable-mcs-builds is
passed.
2009-05-05 Miguel de Icaza <[email protected]>
* configure.in: Reduce configure-time dependencies by using
pkg-config the way it was originally intended to be used, and not
with the incredibly lame and painful inducing pkg.m4 file.
I am on a quest to remove this gratuitous dep on pkg.m4 that is
making people's lives miserable around the globe, just because
someone can not be bothered to learn the shell if construct.
* acinclude.m4 (dolt_supported): Handle ARM as well.
2009-04-28 Zoltan Varga <[email protected]>
@@ -181,81 +47,6 @@
* configure.in: Define a TARGET_<ARCH> preprocessor symbol for some
architectures.
2009-04-23 Jb Evain <[email protected]>
* scripts/Makefile.am: add a pdb2mdb script.
2009-04-22 Jeffrey Stedfast <[email protected]>
* configure.in: Check for a stable version of glib-2.0 as opposed
to an unstable development version (we don't want people
unfamiliar with glib versioning to install an unstable development
version of glib).
2009-04-13 Zoltan Varga <[email protected]>
* configure.in: Quiet 'copying selected object files' messages from
newer libtool versions as well.
* configure.in: Disable AC_PROG_CXX for now to fix the windows build.
In mono/mini:
* Makefile.am: Comment out the cpp files as f@#%$ automake complains even
if they are inside a conditional.
2009-04-03 Zoltan Varga <[email protected]>
* scripts/patch-quiet.sh: Process LTCXXCOMPILE too.
2009-04-02 Zoltan Varga <[email protected]>
* configure.in: Move the call to AC_PROG_CXX earlier and enable it again.
* configure.in: Disable the call to AC_PROG_CXX for now.
2009-04-02 Marek Habersack <[email protected]>
* data/Makefile.am: added system.web.mvc.pc{.in}
* configure.in: added data/system.web.mvc.pc to AC_OUTPUT
* data/system.web.mvc.pc.in: added
2009-04-02 Zoltan Varga <[email protected]>
* configure.in: Add an ENABLE_LLVM autoconf define.
* configure.in: Add --enable-llvm argument to enable the experimental
LLVM back end.
2009-03-31 Jb Evain <[email protected]>
* scripts: Remove smcs, which is handled by moon now.
* data: ditto.
2009-03-20 Zoltan Varga <[email protected]>
* mono/os: Remove this now empty directory.
* mono/Makefile.am (SUBDIRS): Remove 'os'.
2009-03-16 Atsushi Enomoto <[email protected]>
* scripts/Makefile.am : mono-xmltool uses 2.0.
2009-03-12 Jonathan Pryor <[email protected]>
* scripts/Makefile.am: Add sqlmetal.
2009-03-10 Zoltan Varga <[email protected]>
* README: Remove the comment about --with-moonlight being pre-alpha.
2009-03-10 Atsushi Enomoto <[email protected]>
* scripts/Makefile.am : added svcutil.
2009-02-26 Marek Habersack <[email protected]>
* data/mono.web.pc.in: added. Fixes bug #479760
@@ -267,47 +58,6 @@
* configure.in: include stdio so that NULL is defined when checking
for ifreq.
2009-02-06 Miguel De Icaza <[email protected]>
* Disable parallel marking on OSX as it hangs during collections
in the bootstrap stage of Mono.
As we find more platforms that hang, we should disable it there as
well.
2009-02-03 Miguel de Icaza <[email protected]>
* configure.in (PLATFORM_NO_SYMLINKS): New define that replaces
PLATFORM_WIN32.
2009-02-02 Rodrigo Kumpera <[email protected]>
* configure.in: Add --with-mcs-docs to make it possible to disable building of documentation under mcs.
2009-01-29 Zoltan Varga <[email protected]>
* configure.in: Remove -Wcast-align from the warning list, it leads to a lot of
useless warnings which can only be fixed by casting a pointer to (void*).
2009-01-29 Miguel de Icaza <[email protected]>
* configure.in: Add a couple of new AM conditionals for POSIX and
DARWIN, these are used to conditionally include some files in
mono/mini.
2009-01-27 Jb Evain <[email protected]>
* configure.in: bump Mono's version to 2.5 now that 2.4
has been branched.
2009-01-25 Zoltan Varga <[email protected]>
* acinclude.m4 (dolt_supported): Handle ARM as well.
2009-01-23 Zoltan Varga <[email protected]>
* configure.in: Make --enable-parallel-mark=yes the default.
2009-01-17 Zoltan Varga <[email protected]>
* configure.in: Complete the OPROFILE checks.
@@ -334,11 +84,6 @@
* scripts/Makefile.am: don't generate a script for the now
dead mono-api-diff.
2008-12-05 Jonathan Pryor <[email protected]>
* scripts/mdassembler, scripts/monodocer, scripts/monodocs2html:
Properly quote parameters as they may contain spaces.
2008-12-05 Jonathan Pryor <[email protected]>
* man/mdoc-update.1: Document -fno-assembly-versions.
+2 -2
View File
@@ -37,8 +37,8 @@ For comments, corrections and updates, please contact [email protected]
We consider non-LGPL use instances where you use this on an
embedded system where the end user is not able to upgrade the
Mono VM or Moonlight installation or distribution that is part
of your product (Section 6 and 7), you would have to obtain a
Moonlight installation or distribution that is part of your
product (Section 6 and 7), you would have to obtain a
commercial license from Novell (consider software burned into
a ROM, systems where end users would not be able to upgrade,
an embedded console, a game console that imposes limitations
+5 -38
View File
@@ -1,7 +1,7 @@
AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I .
SUBDIRS = po $(libgc_dir) $(eglib_dir) mono $(ikvm_native_dir) support data runtime scripts man samples web msvc $(docs_dir)
SUBDIRS = po $(libgc_dir) $(eglib_dir) mono $(ikvm_native_dir) support data runtime scripts man samples web msvc docs
# Keep in sync with SUBDIRS
## 'tools' is not normally built
@@ -35,7 +35,9 @@ get-monolite-latest:
cd $(mcslib) && { (wget -O- $(monolite_url) || curl $(monolite_url)) | gzip -d | tar xf - ; }
cd $(mcslib) && mv -f monolite-* monolite
compiler-tests: build-test-mono-mcs-moon
compiler-tests: mcs-do-clean
$(MAKE) all
$(MAKE) mcs-do-compiler-tests
compiler-tests-net_2_0:
-rm -f $(mcs_topdir)/build/common/Consts.cs.save
@@ -44,7 +46,7 @@ compiler-tests-net_2_0:
cd $(mcs_topdir) && $(MAKE) PROFILE=net_2_0 clean
-mv -f $(mcs_topdir)/build/common/Consts.cs.save $(mcs_topdir)/build/common/Consts.cs
$(MAKE) all
$(MAKE) test_profiles=net_2_0 mcs-do-compiler-tests
$(MAKE) build_profiles=net_2_0 mcs-do-compiler-tests
bootstrap-world: compiler-tests
$(MAKE) install
@@ -53,18 +55,6 @@ bootstrap-world-net_2_0: compiler-tests-net_2_0
$(MAKE) install
# internal targets
.PHONY: build-test-mono-mcs-moon
build-test-mono-mcs-moon: do-build-moon-maybe
$(MAKE) mcs-do-compiler-tests
.PHONY: do-build-mono-mcs
do-build-mono-mcs: mcs-do-clean
$(MAKE) all
.PHONY: do-build-moon-maybe
do-build-moon-maybe: do-build-mono-mcs
cd runtime && $(MAKE) moon-do-build
mcs-do-clean:
cd runtime && $(MAKE) clean-local
cd mono/tests && $(MAKE) clean
@@ -96,26 +86,3 @@ bootstrap: all
patch-quiet:
find mono -name Makefile -exec scripts/patch-quiet.sh {} \;
find libgc -name Makefile -exec scripts/patch-quiet.sh {} \;
update-csproj:
-rm msvc/scripts/order
-mkdir msvc/scripts/inputs
(cd runtime; make V=1 extra_targets=csproj-local)
package-inputs:
echo '<?xml version="1.0" encoding="utf-8"?>' > msvc/scripts/order.xml
echo '<root>' >> msvc/scripts/order.xml
for i in `cat msvc/scripts/order`; do \
set `echo $$i | sed -e 's/:/ /' -e 's/.input//'`; \
cat msvc/scripts/inputs/$$2.input | \
(echo " <project dir=\"$$1\" library=\"$$2\">"; \
read boot; echo " <boot>$$boot</boot>"; \
read mcs; echo " <mcs>$$mcs</mcs>"; \
read flags; echo " <flags>$$flags</flags>"; \
read output; echo " <output>$$output</output>"; \
read built; echo " <built_sources>$$built</built_sources>"; \
read libou; echo " <library_output>$$libou</library_output>"; \
read resp; echo " <response>$$resp</response>"; \
echo " </project>") >> msvc/scripts/order.xml; \
done
echo "</root>" >> msvc/scripts/order.xml
+6 -28
View File
@@ -267,12 +267,10 @@ This is Mono.
This defaults to `yes'.
--with-profile2=yes,no
--with-preview=yes,no
Whether you want to build the 2.x libraries (support
for Generics and the 2.0/3.5 APIS).
It defaults to `yes'.
Whether you want to build libraries that are still not
completed (The 2.0 APIs). It defaults to `yes'.
--with-moonlight=yes,no
@@ -281,10 +279,12 @@ This is Mono.
(1.1 and 2.0 APIs).
This will produce the `smcs' compiler which will reference
the Silverlight modified assemblies (mscorlib.dll,
the Silvelright modified assemblies (mscorlib.dll,
System.dll, System.Code.dll and System.Xml.Core.dll) and turn
on the LINQ extensions for the compiler.
This option defaults to `no' and it is considered pre-alpha.
--with-libgdiplus=installed,sibling,<path>
This is used to configure where should Mono look for
@@ -324,11 +324,6 @@ This is Mono.
Disables support for the Ahead of Time
compilation.
attach:
Support for the Mono.Management assembly and the
VMAttach API (allowing code to be injected into
a target VM)
com:
Disables COM support.
@@ -338,12 +333,6 @@ This is Mono.
decimal:
Disables support for System.Decimal.
full_messages:
By default Mono comes with a full table
of messages for error codes. This feature
turns off uncommon error messages and reduces
the runtime size.
generics:
Generics support. Disabling this will not
allow Mono to run any 2.0 libraries or
@@ -366,11 +355,6 @@ This is Mono.
disabling this will drop support for any
libraries using DllImport.
portability:
Removes support for MONO_IOMAP, the environment
variables for simplifying porting applications that
are case-insensitive and that mix the Unix and Windows path separators.
profiler:
Disables support for the default profiler.
@@ -382,11 +366,6 @@ This is Mono.
assemblies (AssemblyBuilderAccess.Save) in
System.Reflection.Emit.
shadow_copy:
Disables support for AppDomain's shadow copies
(you can disable this if you do not plan on
using appdomains).
simd:
Disables support for the Mono.SIMD intrinsics
library.
@@ -522,4 +501,3 @@ This is Mono.
independent checkout) from the Mono module, that
directory is automatically configured to share the
same prefix than this module gets.
+2 -2
View File
@@ -22,8 +22,8 @@ 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*)
i?86-*-linux*|x86_64-*-linux*|powerpc-*-linux* \
|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*)
pic_options='-fPIC'
;;
i?86-apple-darwin*)
+64
View File
@@ -0,0 +1,64 @@
#!/bin/sh
ASPEN_ROOT=/Developer/Platforms/iPhoneOS.platform/Developer
ASPEN_SDK=$ASPEN_ROOT/SDKs/iPhoneOS2.0.sdk/
ORIG_PATH=$PATH
GLIB_FLAGS=`pkg-config --cflags --libs glib-2.0`
if [ -z "$GLIB_FLAGS" ]; then
echo "pkg-config could not locate glib-2.0 needed for the monoburg step"
exit;
fi
setenv () {
export PATH=$ASPEN_ROOT/usr/bin:$PATH
export C_INCLUDE_PATH="$ASPEN_SDK/usr/lib/gcc/arm-apple-darwin9/4.0.1/include:$ASPEN_SDK/usr/include"
export CPLUS_INCLUDE_PATH="$ASPEN_SDK/usr/lib/gcc/arm-apple-darwin9/4.0.1/include:$ASPEN_SDK/usr/include"
export CC=arm-apple-darwin9-gcc-4.0.1
export CXX=arm-apple-darwin9-g++-4.0.1
export CPP="cpp-4.0 -nostdinc -U__powerpc__ -U__i386__ -D__arm__"
export CXXPP="cpp-4.0 -nostdinc -U__powerpc__ -U__i386__ -D__arm__"
export LD=$CC
export LDFLAGS="-liconv -Wl,-syslibroot,$ASPEN_SDK"
}
unsetenv () {
export PATH=$ORIG_PATH
unset C_INCLUDE_PATH
unset CPLUS_INCLUDE_PATH
unset CC
unset CXX
unset CPP
unset CXXPP
unset LD
unset LDFLAGS
}
export mono_cv_uscore=yes
export cv_mono_sizeof_sunpath=104
export ac_cv_func_posix_getpwuid_r=yes
export ac_cv_func_backtrace_symbols=no
setenv
pushd eglib
./autogen.sh --host=arm-apple-darwin9
popd
./autogen.sh --disable-mcs-build --host=arm-apple-darwin9 --disable-shared-handles --with-tls=pthread --with-sigaltstack=no --with-glib=embedded $@
perl -pi -e 's/MONO_SIZEOF_SUNPATH 0/MONO_SIZEOF_SUNPATH 104/' config.h
perl -pi -e 's/#define HAVE_FINITE 1//' config.h
perl -pi -e 's/#define HAVE_MMAP 1//' config.h
make
unsetenv
pushd mono/monoburg
/usr/bin/gcc -o monoburg ./monoburg.c parser.c -I../.. -pthread -lm $GLIB_FLAGS
make
popd
setenv
make
+103 -226
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.5)
AM_INIT_AUTOMAKE(mono,2.4.3)
AM_MAINTAINER_MODE
API_VER=1.0
@@ -64,7 +64,6 @@ need_link_unlink=no
AC_MSG_CHECKING([host platform characteristics])
libgc_threads=no
has_dtrace=no
parallel_mark=yes
case "$host" in
powerpc*-*-linux*)
@@ -76,10 +75,7 @@ esac
case "$host" in
*-*-mingw*|*-*-cygwin*)
platform_win32=yes
AC_DEFINE(PLATFORM_WIN32,1,[Host Platform is Win32])
AC_DEFINE(TARGET_WIN32,1,[Target OS is Win32])
AC_DEFINE(DISABLE_PORTABILITY,1,[Disable the io-portability layer])
AC_DEFINE(PLATFORM_NO_SYMLINKS,1,[This platform does not support symlinks])
AC_DEFINE(PLATFORM_WIN32,1,[Platform is Win32])
if test "x$cross_compiling" = "xno"; then
CC="gcc -mno-cygwin -g"
# So libgc configure gets -mno-cygwin
@@ -88,6 +84,7 @@ case "$host" in
HOST_CC="gcc"
# Windows 2000 is required that includes Internet Explorer 5.01
CPPFLAGS="$CPPFLAGS -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -D_WIN32_IE=0x0501 -D_UNICODE -DUNICODE -DWIN32_THREADS -DFD_SETSIZE=1024"
LDFLAGS="$LDFLAGS -lmswsock"
libmono_cflags="-mno-cygwin -mms-bitfields -mwindows"
libmono_ldflags="-mno-cygwin -mms-bitfields -mwindows"
libdl=
@@ -109,7 +106,6 @@ case "$host" in
libdl="-ldl"
libgc_threads=pthreads
with_sigaltstack=no
use_sigposix=yes
;;
*-*-*freebsd*)
platform_win32=no
@@ -138,11 +134,10 @@ case "$host" in
# but NOT library support)
#
with_tls=pthread
use_sigposix=yes
;;
*-*-*openbsd*)
platform_win32=no
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE -DGC_FREEBSD_THREADS -DPLATFORM_BSD"
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE -DGC_FREEBSD_THREADS"
libmono_cflags="-D_THREAD_SAFE"
LDFLAGS="$LDFLAGS -pthread"
libmono_ldflags="-pthread"
@@ -150,7 +145,6 @@ case "$host" in
AC_DEFINE(PTHREAD_POINTER_ID)
libdl=
libgc_threads=pthreads
use_sigposix=yes
;;
*-*-linux*)
platform_win32=no
@@ -163,10 +157,9 @@ case "$host" in
libdl="-ldl"
libgc_threads=pthreads
AOT_SUPPORTED="yes"
use_sigposix=yes
;;
*-*-hpux*)
platform_win32=no
platform_win32=no
CPPFLAGS="$CPPFLAGS -DGC_HPUX_THREADS -D_HPUX_SOURCE -D_XOPEN_SOURCE_EXTENDED -D_REENTRANT"
# +ESdbgasm only valid on bundled cc on RISC
# silently ignored for ia64
@@ -182,7 +175,6 @@ case "$host" in
libmono_ldflags="-lpthread"
libgc_threads=pthreads
need_link_unlink=yes
use_sigposix=yes
;;
*-*-solaris*)
platform_win32=no
@@ -193,10 +185,8 @@ case "$host" in
# This doesn't seem to work on solaris/x86, but the configure test runs
with_tls=pthread
has_dtrace=yes
use_sigposix=yes
;;
*-*-darwin*)
parallel_mark="Disabled_Currently_Hangs_On_MacOSX"
platform_win32=no
platform_darwin=yes
CPPFLAGS="$CPPFLAGS -no-cpp-precomp -D_THREAD_SAFE -DGC_MACOSX_THREADS -DPLATFORM_MACOSX -DUSE_MMAP -DUSE_MUNMAP"
@@ -229,13 +219,9 @@ fi
AM_CONDITIONAL(PLATFORM_WIN32, test x$platform_win32 = xyes)
AM_CONDITIONAL(PLATFORM_LINUX, echo x$target_os | grep -q linux)
AM_CONDITIONAL(PLATFORM_DARWIN, test x$platform_darwin = xyes)
AM_CONDITIONAL(PLATFORM_SIGPOSIX, test x$use_sigposix = xyes)
AC_CHECK_TOOL(CC, gcc, gcc)
AC_PROG_CC
# Disabled for now to fix the windows build
#AC_PROG_CXX
AM_PROG_AS
AM_PROG_CC_STDC
AC_PROG_INSTALL
@@ -293,9 +279,8 @@ fi
AM_CONDITIONAL(NO_VERSION_SCRIPT, test x$no_version_script = xyes)
AC_CHECK_HEADERS(sys/filio.h sys/sockio.h netdb.h utime.h sys/utime.h semaphore.h sys/un.h linux/rtc.h sys/syscall.h sys/mkdev.h sys/uio.h)
AC_CHECK_HEADERS(sys/user.h sys/socket.h sys/ipc.h sys/sem.h sys/utsname.h alloca.h ucontext.h pwd.h sys/select.h)
AC_CHECK_HEADERS(sys/filio.h sys/sockio.h netdb.h utime.h sys/utime.h semaphore.h sys/un.h linux/rtc.h sys/syscall.h sys/mkdev.h)
AC_CHECK_HEADERS(sys/user.h sys/socket.h sys/ipc.h sys/sem.h sys/utsname.h alloca.h ucontext.h pwd.h)
AC_CHECK_HEADER(zlib.h, [have_zlib=yes], [have_zlib=no])
if test x$have_zlib = xyes; then
@@ -349,7 +334,7 @@ AC_CHECK_SIZEOF(void *, 4)
WARN=''
if test x"$GCC" = xyes; then
WARN='-Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wwrite-strings'
WARN='-Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wcast-align -Wwrite-strings'
# The runtime code does not respect ANSI C strict aliasing rules
CFLAGS="$CFLAGS -fno-strict-aliasing"
@@ -435,7 +420,7 @@ if test "x$USE_NLS" = "xyes"; then
fi
AC_ARG_WITH([libgdiplus],
[ --with-libgdiplus=installed|sibling|<path> Override the libgdiplus used for System.Drawing tests (defaults to installed)],
[ --with-libgdiplus=installed|sibling|<path> Override the libgdiplus used for System.Drawing tests (defaults to NO)],
[], [with_libgdiplus=installed])
case $with_libgdiplus in
@@ -452,7 +437,7 @@ if test "x$PKG_CONFIG" = "xno"; then
fi
pkg_config_path=
AC_ARG_WITH(crosspkgdir, [ --with-crosspkgdir=/path/to/pkg-config/dir Change pkg-config dir to custom dir],
AC_ARG_WITH(crosspkgdir, [ --with-crosspkgdir=/path/to/pkg-config/dir],
if test x$with_crosspkgdir = "x"; then
if test -s $PKG_CONFIG_PATH; then
pkg_config_path=$PKG_CONFIG_PATH
@@ -465,7 +450,7 @@ AC_ARG_WITH(crosspkgdir, [ --with-crosspkgdir=/path/to/pkg-config/dir Chan
)
AC_ARG_WITH([glib],
[ --with-glib=embedded|system Choose glib API: system or embedded (default to system)],
[ --with-glib=embedded|system Choose glib API: system or embedded (default to system)],
[], [with_glib=system])
eglib_dir=
@@ -494,18 +479,18 @@ system)
fi
## Versions of dependencies
GLIB_REQUIRED_VERSION=2.4.0
GLIB_REQUIRED_VERSION=1.3.11
dnl
dnl No, you will not replace this check with a pkg.m4 check
dnl
if $PKG_CONFIG --atleast-version=$GLIB_REQUIRED_VERSION glib-2.0; then
GLIB_CFLAGS=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0`
GLIB_LIBS=`$PKG_CONFIG --libs glib-2.0 gthread-2.0`
GMODULE_CFLAGS=`$PKG_CONFIG --cflags gmodule-2.0`
GMODULE_LIBS=`$PKG_CONFIG --libs gmodule-2.0`
GLIB_CFLAGS=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0`
GLIB_LIBS=`$PKG_CONFIG --libs glib-2.0 gthread-2.0`
GMODULE_CFLAGS=`$PKG_CONFIG --cflags gmodule-2.0`
GMODULE_LIBS=`$PKG_CONFIG --libs gmodule-2.0`
else
AC_MSG_ERROR([You need at least glib-2.0 $GLIB_REQUIRED_VERSION])
AC_MSG_ERROR([You need at least glib-2.0 $GLIB_REQUIRED_VERSION])
fi
;;
*)
@@ -542,17 +527,17 @@ if test x$cross_compiling$platform_win32 = xnoyes; then
AC_MSG_RESULT(ok)
fi
AC_ARG_WITH(gc, [ --with-gc=boehm,included,none Defaults to included],[gc=$with_gc],[gc=$gc_default])
AC_ARG_WITH(gc, [ --with-gc=boehm,included,none],[gc=$with_gc],[gc=$gc_default])
# Enable support for fast thread-local storage
# Some systems have broken support, so we allow to disable it.
AC_ARG_WITH(tls, [ --with-tls=__thread,pthread select Thread Local Storage implementation (defaults to __thread)],[],[with_tls=__thread])
AC_ARG_WITH(tls, [ --with-tls=__thread,pthread select Thread Local Storage implementation],[],[with_tls=__thread])
# Enable support for using sigaltstack for SIGSEGV and stack overflow handling
# This does not work on some platforms (bug #55253)
AC_ARG_WITH(sigaltstack, [ --with-sigaltstack=yes,no enable/disable support for sigaltstack (defaults to yes)],[],[with_sigaltstack=yes])
AC_ARG_WITH(sigaltstack, [ --with-sigaltstack=yes,no enable/disable support for sigaltstack],[],[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(static_mono, [ --with-static_mono=yes,no link mono statically to libmono (faster)],[],[with_static_mono=yes])
if test "x$enable_static" = "xno"; then
with_static_mono=no
@@ -566,7 +551,7 @@ fi
AM_CONDITIONAL(STATIC_MONO, test x$with_static_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])
AC_ARG_WITH(xen_opt, [ --with-xen_opt=yes,no Enable Xen-specific behaviour],[],[with_xen_opt=yes])
if test "x$with_xen_opt" = "xyes"; then
AC_DEFINE(MONO_XEN_OPT, 1, [Xen-specific behaviour])
ORIG_CFLAGS=$CFLAGS
@@ -584,16 +569,17 @@ if test "x$with_xen_opt" = "xyes"; then
])
fi
AC_ARG_ENABLE(quiet-build, [ --enable-quiet-build Enable quiet runtime build (on by default)], enable_quiet_build=$enableval, enable_quiet_build=yes)
AC_ARG_ENABLE(quiet-build, [ --enable-quiet-build Enable quiet runtime build], enable_quiet_build=$enableval, enable_quiet_build=yes)
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.],
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.],
[
for feature in `echo "$enable_minimal" | sed -e "s/,/ /g"`; do
eval "mono_feature_disable_$feature='yes'"
AC_MSG_NOTICE([Disabled support for feature: $feature])
done
DISABLED_FEATURES=$enable_minimal
disabled="Disabled: $enable_minimal"
@@ -602,103 +588,67 @@ AC_ARG_ENABLE(minimal, [ --enable-minimal=LIST drop support for LIST subsy
AC_DEFINE_UNQUOTED(DISABLED_FEATURES, "$DISABLED_FEATURES", [String of disabled features])
if test "x$mono_feature_disable_aot" = "xyes"; then
AC_DEFINE(DISABLE_AOT_COMPILER, 1, [Disable AOT Compiler])
AC_MSG_NOTICE([Disabled AOT compiler])
AC_DEFINE(DISABLE_AOT, 1, [Disable AOT support])
fi
if test "x$mono_feature_disable_profiler" = "xyes"; then
AC_DEFINE(DISABLE_PROFILER, 1, [Disable default profiler support])
AC_MSG_NOTICE([Disabled support for the profiler])
fi
AM_CONDITIONAL(DISABLE_PROFILER, test x$mono_feature_disable_profiler = xyes)
if test "x$mono_feature_disable_decimal" = "xyes"; then
AC_DEFINE(DISABLE_DECIMAL, 1, [Disable System.Decimal support])
AC_MSG_NOTICE([Disabled support for decimal])
fi
if test "x$mono_feature_disable_pinvoke" = "xyes"; then
AC_DEFINE(DISABLE_PINVOKE, 1, [Disable P/Invoke support])
AC_MSG_NOTICE([Disabled support for P/Invoke])
fi
if test "x$mono_feature_disable_debug" = "xyes"; then
AC_DEFINE(DISABLE_DEBUG, 1, [Disable runtime debugging support])
AC_MSG_NOTICE([Disabled support for runtime debugging])
fi
if test "x$mono_feature_disable_reflection_emit" = "xyes"; then
AC_DEFINE(DISABLE_REFLECTION_EMIT, 1, [Disable reflection emit support])
mono_feature_disable_reflection_emit_save=yes
AC_MSG_NOTICE([Disabled support for Reflection.Emit])
fi
if test "x$mono_feature_disable_reflection_emit_save" = "xyes"; then
AC_DEFINE(DISABLE_REFLECTION_EMIT_SAVE, 1, [Disable assembly saving support in reflection emit])
AC_MSG_NOTICE([Disabled support for Reflection.Emit.Save])
fi
if test "x$mono_feature_disable_large_code" = "xyes"; then
AC_DEFINE(DISABLE_LARGE_CODE, 1, [Disable support for huge assemblies])
AC_MSG_NOTICE([Disabled support for large assemblies])
fi
if test "x$mono_feature_disable_logging" = "xyes"; then
AC_DEFINE(DISABLE_LOGGING, 1, [Disable support debug logging])
AC_MSG_NOTICE([Disabled support for logging])
fi
if test "x$mono_feature_disable_com" = "xyes"; then
AC_DEFINE(DISABLE_COM, 1, [Disable COM support])
AC_MSG_NOTICE([Disabled COM support])
fi
if test "x$mono_feature_disable_ssa" = "xyes"; then
AC_DEFINE(DISABLE_SSA, 1, [Disable advanced SSA JIT optimizations])
AC_MSG_NOTICE([Disabled SSA JIT optimizations])
fi
if test "x$mono_feature_disable_generics" = "xyes"; then
AC_DEFINE(DISABLE_GENERICS, 1, [Disable generics support])
AC_MSG_NOTICE([Disabled Generics Support])
fi
if test "x$mono_feature_disable_shadowcopy" = "xyes"; then
AC_DEFINE(DISABLE_SHADOW_COPY, 1, [Disable Shadow Copy for AppDomains])
AC_MSG_NOTICE([Disabled Shadow copy for AppDomains])
fi
if test "x$mono_feature_disable_portability" = "xyes"; then
AC_DEFINE(DISABLE_PORTABILITY, 1, [Disables the IO portability layer])
AC_MSG_NOTICE([Disabled IO Portability layer])
fi
if test "x$mono_feature_disable_attach" = "xyes"; then
AC_DEFINE(DISABLE_ATTACH, 1, [Disable agent attach support])
AC_MSG_NOTICE([Disabled agent attach])
fi
if test "x$mono_feature_disable_full_messages" = "xyes"; then
AC_DEFINE(DISABLE_FULL_MESSAGES, 1, [Disables building in the full table of WAPI messages])
AC_MSG_NOTICE([Disabled full messages for Win32 errors, only core message strings shipped])
fi
if test "x$mono_feature_disable_verifier" = "xyes"; then
AC_DEFINE(DISABLE_VERIFIER, 1, [Disables the verifier])
AC_MSG_NOTICE([Disabled the metadata and IL verifiers])
fi
if test "x$mono_feature_disable_jit" = "xyes"; then
AC_DEFINE(DISABLE_JIT, 1, [Disable the JIT, only full-aot mode will be supported by the runtime.])
AC_MSG_NOTICE([Disabled the JIT engine, only full AOT will be supported])
fi
AM_CONDITIONAL(DISABLE_JIT, test x$mono_feature_disable_jit = xyes)
if test "x$mono_feature_disable_simd" = "xyes"; then
AC_DEFINE(DISABLE_SIMD, 1, [Disable SIMD intrinsics related optimizations.])
AC_MSG_NOTICE([Disabled SIMD support])
fi
AC_MSG_CHECKING(for visibility __attribute__)
@@ -713,7 +663,7 @@ AC_TRY_COMPILE([], [
AC_MSG_RESULT(no)
])
AC_ARG_ENABLE(parallel-mark, [ --enable-parallel-mark Enables GC Parallel Marking], enable_parallel_mark=$enableval, enable_parallel_mark=$parallel_mark)
AC_ARG_ENABLE(parallel-mark, [ --enable-parallel-mark Enables GC Parallel Marking])
if test x$enable_parallel_mark = xyes; then
libgc_configure_args="$libgc_configure_args --enable-parallel-mark"
fi
@@ -799,7 +749,7 @@ case "x$gc" in
;;
esac
AC_ARG_WITH(large-heap, [ --with-large-heap=yes,no Enable support for GC heaps larger than 3GB (defaults to no)], [large_heap=$withval], [large_heap=no])
AC_ARG_WITH(large-heap, [ --with-large-heap=yes,no Enable support for GC heaps larger than 3GB], [large_heap=$withval], [large_heap=no])
if test "x$large_heap" = "xyes"; then
echo "FOO"
CPPFLAGS="$CPPFLAGS -DLARGE_CONFIG"
@@ -858,7 +808,7 @@ if test x$platform_win32 = xno; then
dnl ******************************************************************
dnl *** Checks for the IKVM JNI interface library ***
dnl ******************************************************************
AC_ARG_WITH(ikvm-native, [ --with-ikvm-native=yes,no build the IKVM JNI interface library (defaults to yes)],[with_ikvm_native=$withval],[with_ikvm_native=yes])
AC_ARG_WITH(ikvm-native, [ --with-ikvm-native=yes,no build the IKVM JNI interface library],[with_ikvm_native=$withval],[with_ikvm_native=yes])
ikvm_native_dir=
if test x$with_ikvm_native = xyes; then
@@ -887,6 +837,31 @@ if test x$platform_win32 = xno; then
AC_CHECK_FUNCS(sched_setaffinity)
dnl ****************************************************************
dnl *** Check for sched_setaffinity from glibc versions before ***
dnl *** 2.3.4. The older versions of the function only take 2 ***
dnl *** parameters, not 3. ***
dnl *** ***
dnl *** Because the interface change was not made in a minor ***
dnl *** version rev, the __GLIBC__ and __GLIBC_MINOR__ macros ***
dnl *** won't always indicate the interface sched_affinity has. ***
dnl ****************************************************************
AC_MSG_CHECKING(for sched_setaffinity from glibc < 2.3.4)
AC_TRY_COMPILE([#include <sched.h>], [
int main() {
int mask = 1;
sched_setaffinity(0, &mask);
}
], [
# Yes, we have it...
AC_MSG_RESULT(yes)
AC_DEFINE(GLIBC_BEFORE_2_3_4_SCHED_SETAFFINITY, 1, [Have GLIBC_BEFORE_2_3_4_SCHED_SETAFFINITY])
], [
# We have the new, three-parameter version
AC_MSG_RESULT(no)
])
dnl ******************************************************************
dnl *** Check for large file support ***
dnl *** (If we were using autoconf 2.50 we'd use AC_SYS_LARGEFILE) ***
@@ -1196,15 +1171,9 @@ if test x$platform_win32 = xno; then
AC_DEFINE(USE_MONO_MUTEX, 1, [Use mono_mutex_t])
])
AC_CHECK_FUNCS(pthread_attr_setstacksize)
AC_CHECK_FUNCS(pthread_attr_getstack pthread_attr_getstacksize)
AC_CHECK_FUNCS(pthread_attr_getstack)
AC_CHECK_FUNCS(pthread_get_stacksize_np pthread_get_stackaddr_np)
dnl ***********************************
dnl *** Checks for signals
dnl ***********************************
AC_CHECK_HEADERS(signal.h)
AC_CHECK_FUNCS(sigaction)
dnl ***********************************
dnl *** Checks for working __thread ***
dnl ***********************************
@@ -1649,7 +1618,7 @@ ac_cv_c_socklen_t=yes
AC_MSG_RESULT(no)
])
AC_MSG_CHECKING(for array element initalizer support)
AC_MSG_CHECKING(for array element initializer support)
AC_TRY_COMPILE([#include <sys/socket.h>], [
const int array[] = {[1] = 2,};
], [
@@ -1685,9 +1654,8 @@ dnl ****************************
AC_MSG_CHECKING([if usage of random device is requested])
AC_ARG_ENABLE(dev-random,
[ --disable-dev-random disable the use of the random device (enabled by default)],
[ --disable-dev-random disable the use of the random device],
try_dev_random=$enableval, try_dev_random=yes)
AC_MSG_RESULT($try_dev_random)
case "{$target}" in
@@ -1760,11 +1728,11 @@ if test x$gc = xsgen; then
fi
fi
AC_ARG_ENABLE(nunit-tests, [ --enable-nunit-tests Run the nunit tests of the class library on 'make check'])
AC_ARG_ENABLE(nunit-tests, [ --enable-nunit-tests Run the nunit tests of the class library on 'make check'])
AM_CONDITIONAL(ENABLE_NUNIT_TESTS, [test x$enable_nunit_tests = xyes])
AC_MSG_CHECKING([if big-arrays are to be enabled])
AC_ARG_ENABLE(big-arrays, [ --enable-big-arrays Enable the allocation and indexing of arrays greater than Int32.MaxValue], enable_big_arrays=$enableval, enable_big_arrays=no)
AC_ARG_ENABLE(big-arrays, [ --enable-big-arrays Enable the allocation and indexing of arrays greater than Int32.MaxValue], enable_big_arrays=$enableval, enable_big_arrays=no)
if test "x$enable_big_arrays" = "xyes" ; then
if test "x$ac_cv_sizeof_void_p" = "x8"; then
AC_DEFINE(MONO_BIG_ARRAYS,1,[Enable the allocation and indexing of arrays greater than Int32.MaxValue])
@@ -1834,31 +1802,6 @@ fi
AM_CONDITIONAL(ENABLE_DTRACE, [test x$enable_dtrace = xyes])
AM_CONDITIONAL(DTRACE_G_REQUIRED, [test x$dtrace_g = xyes])
dnl **************
dnl *** LLVM ***
dnl **************
AC_ARG_ENABLE(llvm,[ --enable-llvm Enable the experimental LLVM back-end], enable_llvm=$enableval, enable_llvm=no)
if test "x$enable_llvm" = "xyes"; then
AC_PATH_PROG(LLVM_CONFIG, llvm-config, no)
if test "x$LLVM_CONFIG" = "xno"; then
AC_MSG_ERROR([llvm-config not found.])
fi
LLVM_CXXFLAGS=`$LLVM_CONFIG --cflags`
LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
LLVM_LIBS=`$LLVM_CONFIG --libs core bitwriter jit x86codegen`
LLVM_LIBS="$LLVM_LDFLAGS $LLVM_LIBS -lstdc++"
AC_SUBST(LLVM_CXXFLAGS)
AC_SUBST(LLVM_LIBS)
AC_SUBST(LLVM_LDFLAGS)
AC_DEFINE(ENABLE_LLVM, 1, [Enable the LLVM back end])
fi
AM_CONDITIONAL(ENABLE_LLVM, [test x$enable_llvm = xyes])
TARGET="unknown"
ACCESS_UNALIGNED="yes"
@@ -2065,13 +2008,6 @@ AMD64)
ARM)
AC_DEFINE(TARGET_ARM, 1, [...])
;;
POWERPC)
AC_DEFINE(TARGET_POWERPC, 1, [...])
;;
POWERPC64)
AC_DEFINE(TARGET_POWERPC, 1, [...])
AC_DEFINE(TARGET_POWERPC64, 1, [...])
;;
esac
if test "x$sizeof_register" = "x4"; then
@@ -2082,19 +2018,11 @@ else
AC_DEFINE(SIZEOF_REGISTER,SIZEOF_VOID_P,[size of machine integer registers])
fi
if test "x$target_byte_order" = "xG_BIG_ENDIAN"; then
AC_DEFINE(TARGET_BYTE_ORDER,G_BIG_ENDIAN,[byte order of target])
elif test "x$target_byte_order" = "xG_LITTLE_ENDIAN"; then
AC_DEFINE(TARGET_BYTE_ORDER,G_LITTLE_ENDIAN,[byte order of target])
else
AC_DEFINE(TARGET_BYTE_ORDER,G_BYTE_ORDER,[byte order of target])
fi
if test "x$have_visibility_hidden" = "xyes"; then
AC_DEFINE(HAVE_VISIBILITY_HIDDEN, 1, [Support for the visibility ("hidden") attribute])
fi
AC_ARG_WITH(jit, [ --with-jit=yes,no If you want to build scripts that default to the JIT (defaults to no)],[
AC_ARG_WITH(jit, [ --with-jit=yes,no If you want to build scripts that default to the JIT],[
if test x$withval = xyes; then
jit_wanted=true
else
@@ -2102,7 +2030,7 @@ AC_ARG_WITH(jit, [ --with-jit=yes,no If you want to build scripts
fi
])
AC_ARG_WITH(interp, [ --with-interp=yes,no If you want to build scripts that default to the interpreter (defaults to no)],[
AC_ARG_WITH(interp, [ --with-interp=yes,no If you want to build scripts that default to the interpreter],[
if test x$withval = xyes; then
interp_wanted=true
else
@@ -2204,9 +2132,6 @@ if test "x$TARGET" = "xAMD64" -o "x$TARGET" = "xX86" -o "x$TARGET" = "xALPHA"; t
*-*-*linux*)
mono_debugger_supported=yes
;;
*86-apple-darwin*)
mono_debugger_supported=yes
;;
esac
fi
fi
@@ -2274,13 +2199,22 @@ case "x$gc" in
;;
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 no)], [], [with_profile4=no])
AC_ARG_WITH(moonlight, [ --with-moonlight=yes,no If you want to build the Moonlight 2.1 assemblies (defaults to yes)], [], [with_moonlight=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])
PREVIEW=yes
AC_ARG_WITH(preview, [ --with-preview=yes,no If you want to install the 2.0 FX preview],[
if test x$with_preview = xno; then
PREVIEW=no
fi
])
MOONLIGHT=yes
AC_ARG_WITH(moonlight,[ --with-moonlight=yes,no If you want to build the Moonlight 2.1 assemblies],[
if test x$with_moonlight = xno; then
MOONLIGHT=no
fi
])
OPROFILE=no
AC_ARG_WITH(oprofile,[ --with-oprofile=no,<oprofile install dir> Enable oprofile support (defaults to no)],[
AC_ARG_WITH(oprofile,[ --with-oprofile=no,<oprofile install dir> Enable oprofile support (defaults to NO)],[
if test x$with_oprofile != xno; then
oprofile_include=$with_oprofile/include
if test ! -f $oprofile_include/opagent.h; then
@@ -2294,42 +2228,21 @@ AC_ARG_WITH(oprofile,[ --with-oprofile=no,<oprofile install dir> Enable oprof
])
MALLOC_MEMPOOLS=no
AC_ARG_WITH(malloc_mempools,[ --with-malloc-mempools=yes,no Use malloc for each single mempool allocation (only for runtime debugging, defaults to no)],[
AC_ARG_WITH(malloc_mempools,[ --with-malloc-mempools=yes,no Use malloc for each single mempool allocation (only for runtime debugging, defaults to NO)],[
if test x$with_malloc_mempools = xyes; then
MALLOC_MEMPOOLS=yes
AC_DEFINE(USE_MALLOC_FOR_MEMPOOLS,1,[Use malloc for each single mempool allocation])
fi
])
DISABLE_MCS_DOCS=no
AC_ARG_WITH(mcs_docs,[ --with-mcs-docs=yes,no If you want to build the documentation under mcs (defaults to yes)],[
if test x$with_mcs_docs != xyes; then
DISABLE_MCS_DOCS=yes
fi
])
dnl
dnl Consistency settings
dnl
if test x$cross_compiling = xyes -o x$enable_mcs_build = xno; then
DISABLE_MCS_DOCS=yes
docs_dir=""
else
docs_dir=docs
fi
AC_SUBST(docs_dir)
AM_CONDITIONAL(HAVE_OPROFILE, test x$OPROFILE = xyes)
AC_SUBST(OPROFILE_CFLAGS)
AC_SUBST(OPROFILE_LIBS)
libmono_ldflags="$libmono_ldflags $LIBS"
AM_CONDITIONAL(INSTALL_2_0, [test "x$with_profile2" = xyes])
AM_CONDITIONAL(INSTALL_2_1, [test "x$with_moonlight" = xyes])
AM_CONDITIONAL(INSTALL_4_0, [test "x$with_profile4" = xyes])
AM_CONDITIONAL(INSTALL_MONOTOUCH, [test "x$with_monotouch" = xyes])
AM_CONDITIONAL(INSTALL_2_0, test x$PREVIEW = xyes)
AM_CONDITIONAL(INSTALL_2_1, test x$MOONLIGHT = xyes)
AM_CONDITIONAL(MIPS_GCC, test ${TARGET}${ac_cv_prog_gcc} = MIPSyes)
AM_CONDITIONAL(MIPS_SGI, test ${TARGET}${ac_cv_prog_gcc} = MIPSno)
@@ -2378,7 +2291,7 @@ if test x$platform_win32 = xyes; then
if test "x$cross_compiling" = "xno"; then
mono_cfg_dir=`cygpath -w -a $mono_cfg_root`\\etc
else
mono_cfg_dir=`echo $mono_cfg_root | tr '/' '\\\'`\\etc
mono_cfg_dir=`echo $mono_cfg_root | tr '/' '\\'`\\etc
fi
else
mono_cfg_dir=$mono_cfg_root/etc
@@ -2460,42 +2373,13 @@ AC_CONFIG_COMMANDS([runtime/etc/mono/2.0/Browsers/Compat.browser],
cd $depth
],[LN_S='$LN_S'])
AC_CONFIG_COMMANDS([runtime/etc/mono/4.0/machine.config],
[ depth=../../../..
case $srcdir in
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
.) reldir=$depth ;;
*) reldir=$depth/$srcdir ;;
esac
$ac_aux_dir/install-sh -d runtime/etc/mono/4.0
cd runtime/etc/mono/4.0
rm -f machine.config
$LN_S $reldir/data/net_4_0/machine.config machine.config
cd $depth
],[LN_S='$LN_S'])
AC_CONFIG_COMMANDS([runtime/etc/mono/4.0/web.config],
[ depth=../../../..
case $srcdir in
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
.) reldir=$depth ;;
*) reldir=$depth/$srcdir ;;
esac
$ac_aux_dir/install-sh -d runtime/etc/mono/4.0
cd runtime/etc/mono/4.0
rm -f web.config
$LN_S $reldir/data/net_4_0/web.config web.config
cd $depth
],[LN_S='$LN_S'])
if test x$enable_quiet_build = xyes; then
AC_CONFIG_COMMANDS([quiet], [for i in `find mono libgc support -name Makefile.in | sed -e 's/Makefile.in/Makefile/g'`; do if test -f $i; then $srcdir/scripts/patch-quiet.sh $i; fi; done], [shell=$SHELL])
AC_CONFIG_COMMANDS([quiet-libtool], [sed -e 's/$echo "copying selected/$show "copying selected/g' < libtool > libtool.tmp && mv libtool.tmp libtool && chmod a+x libtool; sed -e 's/$ECHO "copying selected/# "copying selected/g' < libtool > libtool.tmp && mv libtool.tmp libtool && chmod a+x libtool])
AC_CONFIG_COMMANDS([quiet-libtool], [sed -e 's/$echo "copying selected/$show "copying selected/g' < libtool > libtool.tmp && mv libtool.tmp libtool && chmod a+x libtool])
fi
AC_OUTPUT([
Makefile
mono-core.spec
mono-uninstalled.pc
scripts/mono-find-provides
scripts/mono-find-requires
@@ -2505,6 +2389,7 @@ mono/metadata/Makefile
mono/dis/Makefile
mono/cil/Makefile
mono/arch/Makefile
mono/os/Makefile
mono/arch/x86/Makefile
mono/arch/amd64/Makefile
mono/arch/hppa/Makefile
@@ -2539,7 +2424,6 @@ docs/Makefile
data/Makefile
data/net_1_1/Makefile
data/net_2_0/Makefile
data/net_4_0/Makefile
data/net_2_0/Browsers/Makefile
data/mint.pc
data/mono.pc
@@ -2553,6 +2437,7 @@ data/dotnet.pc
data/dotnet35.pc
data/wcf.pc
data/cecil.pc
data/smcs.pc
data/system.web.extensions_1.0.pc
data/system.web.extensions.design_1.0.pc
data/system.web.mvc.pc
@@ -2575,6 +2460,13 @@ if test x$platform_win32 = xyes; then
sed -e "s,-mno-cygwin,,g" libtool > libtool.new; mv libtool.new libtool; chmod 755 libtool
fi
dnl
dnl Consistency settings
dnl
if test x$cross_compiling = xyes -o x$enable_mcs_build = xno; then
DISABLE_MCS_DOCS=yes
fi
(
case $prefix in
NONE) prefix=$ac_default_prefix ;;
@@ -2638,15 +2530,11 @@ fi
echo 'MCS_FLAGS = $(PLATFORM_DEBUG_FLAGS)' >> $srcdir/$olivedir/build/config.make
echo "RUNTIME = $mono_build_root/runtime/mono-wrapper" >> $srcdir/$olivedir/build/config.make
echo "MONO_VERSION = $myver" >> $srcdir/$olivedir/build/config.make
if test x$with_moonlight = xyes; then
if test x$with_moonlight = xyes; then
echo "WITH_MOONLIGHT = yes" >> $srcdir/$olivedir/build/config.make
fi
fi
fi
if test x$DISABLE_MCS_DOCS = xyes; then
echo "DISABLE_MCS_DOCS = yes" >> $srcdir/$mcsdir/build/config.make
fi
)
libgdiplus_msg=${libgdiplus_loc:-assumed to be installed}
@@ -2655,23 +2543,18 @@ echo "
mcs source: $mcs_topdir
olive source: $olive_topdir
GC: $gc
GLIB: $with_glib
TLS: $with_tls
SIGALTSTACK: $with_sigaltstack
Engine: $jit_status
2.0 Profile: $with_profile2
Moon Profile: $with_moonlight
4.0 Alpha: $with_profile4
MonoTouch: $with_monotouch
JNI support: $jdk_headers_found
libgdiplus: $libgdiplus_msg
zlib: $zlib_msg
oprofile: $OPROFILE
BigArrays: $enable_big_arrays
DTrace: $enable_dtrace
Parallel Mark: $enable_parallel_mark
LLVM Back End: $enable_llvm
GC: $gc
TLS: $with_tls
SIGALTSTACK: $with_sigaltstack
Engine: $jit_status
2.0 Beta: $PREVIEW
2.1 Alpha: $MOONLIGHT
JNI support: $jdk_headers_found
libgdiplus: $libgdiplus_msg
zlib: $zlib_msg
oprofile: $OPROFILE
BigArrays: $enable_big_arrays
DTrace: $enable_dtrace
$disabled
"
@@ -2687,9 +2570,3 @@ if test x$gc = xsgen; then
echo IMPORTANT:
echo IMPORTANT: There are known problems with it, use at your own risk.
fi
if test x$enable_llvm = xyes; then
echo IMPORTANT:
echo IMPORTANT: The LLVM Back End is experimental and does not work yet.
echo IMPORTANT:
fi
-5
View File
@@ -1,5 +0,0 @@
/Makefile.in
/Makefile
/config
/.cvsignore
/*.pc
+5 -9
View File
@@ -1,16 +1,12 @@
SUBDIRS = net_1_1 net_2_0
if INSTALL_4_0
SUBDIRS += net_4_0
endif
monodir = $(sysconfdir)/mono
EXTRA_DIST = \
config.in \
browscap.ini mono.supp mono.d README \
mono.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-nunit.pc.in mono-cairo.pc.in mono-options.pc.in cecil.pc.in smcs.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
@@ -18,17 +14,17 @@ pkgconfigdir = $(libdir)/pkgconfig
if JIT_SUPPORTED
if INTERP_SUPPORTED
pkgconfig_DATA= 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 \
pkgconfig_DATA= mono.pc mint.pc dotnet.pc dotnet35.pc wcf.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc smcs.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
else
pkgconfig_DATA= mono.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 \
pkgconfig_DATA= mono.pc dotnet.pc dotnet35.pc wcf.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc smcs.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
endif
else
pkgconfig_DATA= mint.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc monodoc.pc mono-lineeditor.pc
pkgconfig_DATA= mint.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc smcs.pc monodoc.pc mono-lineeditor.pc
endif
DISTCLEANFILES= 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 \
DISTCLEANFILES= mono.pc mint.pc dotnet.pc dotnet35.pc wcf.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc smcs.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
mono_DATA = config \
-1
View File
@@ -17,7 +17,6 @@
<dllmap dll="sqlite3" target="@SQLITE3@" os="!windows"/>
<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="i:kernel32.dll">
<dllentry dll="__Internal" name="CopyMemory" target="mono_win32_compat_CopyMemory"/>
<dllentry dll="__Internal" name="FillMemory" target="mono_win32_compat_FillMemory"/>
-61
View File
@@ -1,61 +0,0 @@
2009-04-14 Zoltan Varga <[email protected]>
* mono-gdb.py (MonoClassPrinter.to_string): Add a MonoClass* pretty
printer.
2009-04-12 Zoltan Varga <[email protected]>
* mono-gdb.py (MonoMethodPrinter.to_string): Add a MonoMethod* pretty
printer.
2009-04-10 Zoltan Varga <[email protected]>
* mono-gdb.py: Update to the latest archer api.
2009-04-07 Zoltan Varga <[email protected]>
* mono-gdb.py (ObjectPrinter.__init__): Update to latest archer api.
2009-04-06 Zoltan Varga <[email protected]>
* test-xdb.py: New file, tester script for xdb.
* mono-gdb.py (stringify_class_name): Handle classes without a namespace
correctly.
* mono-gdb.py: Update after the changes to dwarfwriter.c.
2009-04-05 Zoltan Varga <[email protected]>
* mono-gdb.py: Handle superclasses in the pretty printer.
2009-03-27 Zoltan Varga <[email protected]>
* mono-gdb.py (StringPrinter.to_string): Fix support for non-ascii characters.
2009-03-20 Zoltan Varga <[email protected]>
* mono-gdb.py: Update for the latest python API on the archer branch.
2009-02-03 Zoltan Varga <[email protected]>
* mono-gdb.py: Remove the --64 argument to as, it is not needed.
* mono-gdb.py (stringify_class_name): Helper function to print base types
using their short name. Also add a prototype implementation of registering
the hooks from python code instead of needing the mono-gdbinit file.
* gdb-python.diff: Changes against the gdb archer branch at
http://sourceware.org/gdb/wiki/PythonGdb to fix some problems/add functionality.
2009-02-03 Geoff Norton <[email protected]>
* mono-gdbinit: Hook into backtrace as hook-stop seems to crash gdb
* mono-gdb.py: Find the gdbinit name from the executable name instead of
hardcoding mono
2009-01-29 Zoltan Varga <[email protected]>
* mono-gdb.py mono-gdbinit: Support files to help debugging mono/mono apps
using a python enabled gdb.
-163
View File
@@ -1,163 +0,0 @@
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 640998b..fb73e9d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2009-02-03 Zoltan Varga <[email protected]>
+
+ * cil-script.c python/python-cmd.c: Allow registration of pre/post hooks from
+ python.
+
+ * symfile.c (add_symbol_file_command): Comment out verbose messages.
+
2009-02-03 Thiago Jung Bauermann <[email protected]>
* gdb/c-lang.c (c_get_string): Remove superfluous parenthesis from
diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c
index 835d29c..3941aa5 100644
--- a/gdb/cli/cli-script.c
+++ b/gdb/cli/cli-script.c
@@ -299,6 +299,13 @@ execute_user_command (struct cmd_list_element *c, char *args)
static int user_call_depth = 0;
extern int max_user_call_depth;
+ /* Might be a user defined command implemented in Python */
+ if (!c->user_commands && c->func)
+ {
+ (*c->func) (c, args, FALSE);
+ return;
+ }
+
old_chain = setup_user_args (args);
cmdlines = c->user_commands;
diff --git a/gdb/python/python-cmd.c b/gdb/python/python-cmd.c
index 61d5e5d..a3fbc08 100644
--- a/gdb/python/python-cmd.c
+++ b/gdb/python/python-cmd.c
@@ -339,7 +339,8 @@ gdbpy_parse_command_name (char *text, struct cmd_list_element ***base_list,
/* Object initializer; sets up gdb-side structures for command.
- Use: __init__(NAME, CMDCLASS, [COMPLETERCLASS, [PREFIX]]).
+ Use: __init__(NAME, CMDCLASS, [completerclass=COMPLETERCLASS, prefix=PREFIX,
+ pre_hook_of=PREHOOK_OF, post_hook_of=POSTHOOK_OF]).
NAME is the name of the command. It may consist of multiple words,
in which case the final word is the name of the new command, and
@@ -354,6 +355,11 @@ gdbpy_parse_command_name (char *text, struct cmd_list_element ***base_list,
If PREFIX is True, then this command is a prefix command.
+ PREHOOK_OF is the name of a gdb command this command becomes a
+ pre-execution hook of, same as if this command was defined using
+ "define hook-<cmdname>"
+ POSTHOOK_OF is the same for post-execution hooks.
+
The documentation for the command is taken from the doc string for
the python class.
@@ -362,15 +368,18 @@ static int
cmdpy_init (PyObject *self, PyObject *args, PyObject *kwds)
{
cmdpy_object *obj = (cmdpy_object *) self;
- char *name;
+ char *name, *pre_hook_of = NULL, *post_hook_of = NULL;
int cmdtype;
int completetype = -1;
char *docstring = NULL;
volatile struct gdb_exception except;
struct cmd_list_element **cmd_list;
+ struct cmd_list_element *pre_hookc = NULL, *post_hookc = NULL;
char *cmd_name, *pfx_name;
PyObject *is_prefix = NULL;
int cmp;
+ static char *kwlist[] = {"name", "cmdclass", "completerclass", "prefix",
+ "pre_hook_of", "post_hook_of", NULL};
if (obj->command)
{
@@ -381,8 +390,9 @@ cmdpy_init (PyObject *self, PyObject *args, PyObject *kwds)
return -1;
}
- if (! PyArg_ParseTuple (args, "si|iO", &name, &cmdtype,
- &completetype, &is_prefix))
+ if (! PyArg_ParseTupleAndKeywords (args, kwds, "si|iOss", kwlist, &name, &cmdtype,
+ &completetype, &is_prefix, &pre_hook_of,
+ &post_hook_of))
return -1;
if (cmdtype != no_class && cmdtype != class_run
@@ -402,6 +412,30 @@ cmdpy_init (PyObject *self, PyObject *args, PyObject *kwds)
return -1;
}
+ if (pre_hook_of)
+ {
+ char *text = pre_hook_of;
+
+ pre_hookc = lookup_cmd_1 (&text, cmdlist, NULL, 1);
+ if (! pre_hookc)
+ {
+ PyErr_Format (PyExc_RuntimeError, _("command name given by pre_hook argument not found"));
+ return -1;
+ }
+ }
+
+ if (post_hook_of)
+ {
+ char *text = post_hook_of;
+
+ post_hookc = lookup_cmd_1 (&text, cmdlist, NULL, 1);
+ if (! post_hookc)
+ {
+ PyErr_Format (PyExc_RuntimeError, _("command name given by post_hook argument not found"));
+ return -1;
+ }
+ }
+
cmd_name = gdbpy_parse_command_name (name, &cmd_list, &cmdlist);
if (! cmd_name)
return -1;
@@ -470,6 +504,18 @@ cmdpy_init (PyObject *self, PyObject *args, PyObject *kwds)
cmd->func = cmdpy_function;
cmd->destroyer = cmdpy_destroyer;
+ if (pre_hookc)
+ {
+ pre_hookc->hook_pre = cmd;
+ cmd->hookee_pre = pre_hookc;
+ }
+
+ if (post_hookc)
+ {
+ post_hookc->hook_post = cmd;
+ cmd->hookee_post = post_hookc;
+ }
+
obj->command = cmd;
set_cmd_context (cmd, self);
set_cmd_completer (cmd, ((completetype == -1) ? cmdpy_completer
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 14cb7b8..6d0bb40 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -2196,7 +2196,7 @@ add_symbol_file_command (char *args, int from_tty)
statements because hex_string returns a local static
string. */
- printf_unfiltered (_("add symbol table from file \"%s\" at\n"), filename);
+ /* printf_unfiltered (_("add symbol table from file \"%s\" at\n"), filename); */
section_addrs = alloc_section_addr_info (section_index);
make_cleanup (xfree, section_addrs);
for (i = 0; i < section_index; i++)
@@ -2211,7 +2211,7 @@ add_symbol_file_command (char *args, int from_tty)
entered on the command line. */
section_addrs->other[sec_num].name = sec;
section_addrs->other[sec_num].addr = addr;
- printf_unfiltered ("\t%s_addr = %s\n", sec, paddress (addr));
+ /* printf_unfiltered ("\t%s_addr = %s\n", sec, paddress (addr)); */
sec_num++;
/* The object's sections are initialized when a
-247
View File
@@ -1,247 +0,0 @@
#
# Author: Zoltan Varga ([email protected])
# License: MIT/X11
#
#
# This is a mono support mode for a python-enabled gdb:
# http://sourceware.org/gdb/wiki/PythonGdb
# Usage:
# - copy/symlink this file, plus mono-gdbinit to the directory where the mono
# executable lives.
# - run mono under gdb, or attach to a mono process using gdb
# - Type 'xdb' in gdb to load/reload the debugging info emitted by the runtime.
# - The debug info is emitted to a file called xdb.s in the current working directory.
# When attaching to a mono process, make sure you are in the same directory.
#
import os
class StringPrinter:
"Print a C# string"
def __init__(self, val):
self.val = val
def to_string(self):
if int(self.val.cast (gdb.lookup_type ("guint64"))) == 0:
return "null"
obj = self.val.cast (gdb.lookup_type ("MonoString").pointer ()).dereference ()
len = obj ['length']
chars = obj ['chars']
i = 0
res = ['"']
while i < len:
val = (chars.cast(gdb.lookup_type ("gint64")) + (i * 2)).cast(gdb.lookup_type ("gunichar2").pointer ()).dereference ()
if val >= 256:
c = "\u%X" % val
else:
c = chr (val)
res.append (c)
i = i + 1
res.append ('"')
return ''.join (res)
def stringify_class_name(ns, name):
if ns == "System":
if name == "Byte":
return "byte"
if name == "String":
return "string"
if ns == "":
return name
else:
return "%s.%s" % (ns, name)
class ArrayPrinter:
"Print a C# array"
def __init__(self, val, class_ns, class_name):
self.val = val
self.class_ns = class_ns
self.class_name = class_name
def to_string(self):
obj = self.val.cast (gdb.lookup_type ("MonoArray").pointer ()).dereference ()
length = obj ['max_length']
return "%s [%d]" % (stringify_class_name (self.class_ns, self.class_name [0:len(self.class_name) - 2]), int(length))
class ObjectPrinter:
"Print a C# object"
def __init__(self, val):
if str(val.type)[-1] == "&":
self.val = val.address.cast (gdb.lookup_type ("MonoObject").pointer ())
else:
self.val = val.cast (gdb.lookup_type ("MonoObject").pointer ())
class _iterator:
def __init__(self,obj):
self.obj = obj
self.iter = self.obj.type.fields ().__iter__ ()
pass
def __iter__(self):
return self
def next(self):
field = self.iter.next ()
try:
if str(self.obj [field.name].type) == "object":
# Avoid recursion
return (field.name, self.obj [field.name].cast (gdb.lookup_type ("void").pointer ()))
else:
return (field.name, self.obj [field.name])
except:
# Superclass
return (field.name, self.obj.cast (gdb.lookup_type ("%s" % (field.name))))
def children(self):
# FIXME: It would be easier if gdb.Value would support iteration itself
# It would also be better if we could return None
if int(self.val.cast (gdb.lookup_type ("guint64"))) == 0:
return {}.__iter__ ()
try:
obj = self.val.dereference ()
class_ns = obj ['vtable'].dereference ()['klass'].dereference ()['name_space'].string ()
class_name = obj ['vtable'].dereference ()['klass'].dereference ()['name'].string ()
if class_name [-2:len(class_name)] == "[]":
return {}.__iter__ ()
gdb_type = gdb.lookup_type ("struct %s_%s" % (class_ns.replace (".", "_"), class_name))
return self._iterator(obj.cast (gdb_type))
except:
print sys.exc_info ()[0]
print sys.exc_info ()[1]
return {}.__iter__ ()
def to_string(self):
if int(self.val.cast (gdb.lookup_type ("guint64"))) == 0:
return "null"
try:
obj = self.val.dereference ()
class_ns = obj ['vtable'].dereference ()['klass'].dereference ()['name_space'].string ()
class_name = obj ['vtable'].dereference ()['klass'].dereference ()['name'].string ()
if class_ns == "System" and class_name == "String":
return StringPrinter (self.val).to_string ()
if class_name [-2:len(class_name)] == "[]":
return ArrayPrinter (self.val,class_ns,class_name).to_string ()
if class_ns != "":
try:
gdb_type = gdb.lookup_type ("struct %s.%s" % (class_ns, class_name))
except:
# Maybe there is no debug info for that type
return "%s.%s" % (class_ns, class_name)
#return obj.cast (gdb_type)
return "%s.%s" % (class_ns, class_name)
return class_name
except:
print sys.exc_info ()[0]
print sys.exc_info ()[1]
# FIXME: This can happen because we don't have liveness information
return self.val.cast (gdb.lookup_type ("guint64"))
class MonoMethodPrinter:
"Print a MonoMethod structure"
def __init__(self, val):
self.val = val
def to_string(self):
if int(self.val.cast (gdb.lookup_type ("guint64"))) == 0:
return "0x0"
val = self.val.dereference ()
klass = val ["klass"].dereference ()
class_name = stringify_class_name (klass ["name_space"].string (), klass ["name"].string ())
return "\"%s:%s ()\"" % (class_name, val ["name"].string ())
# This returns more info but requires calling into the inferior
#return "\"%s\"" % (gdb.parse_and_eval ("mono_method_full_name (%s, 1)" % (str (int (self.val.cast (gdb.lookup_type ("guint64")))))).string ())
class MonoClassPrinter:
"Print a MonoClass structure"
def __init__(self, val):
self.val = val
def to_string(self):
if int(self.val.cast (gdb.lookup_type ("guint64"))) == 0:
return "0x0"
klass = self.val.dereference ()
class_name = stringify_class_name (klass ["name_space"].string (), klass ["name"].string ())
return "\"%s\"" % (class_name)
# This returns more info but requires calling into the inferior
#return "\"%s\"" % (gdb.parse_and_eval ("mono_type_full_name (&((MonoClass*)%s)->byval_arg)" % (str (int ((self.val).cast (gdb.lookup_type ("guint64")))))))
def lookup_pretty_printer(val):
t = str (val.type)
if t == "object":
return ObjectPrinter (val)
if t[0:5] == "class" and t[-1] == "&":
return ObjectPrinter (val)
if t == "string":
return StringPrinter (val)
if t == "MonoMethod *":
return MonoMethodPrinter (val)
if t == "MonoClass *":
return MonoClassPrinter (val)
return None
def register_csharp_printers(obj):
"Register C# pretty-printers with objfile Obj."
if obj == None:
obj = gdb
obj.pretty_printers.append (lookup_pretty_printer)
register_csharp_printers (gdb.current_objfile())
class MonoSupport(object):
def __init__(self):
self.s_size = 0
def run_hook(self):
if os.access ("xdb.s", os.F_OK):
os.remove ("xdb.s")
gdb.execute ("set environment MONO_XDEBUG 1")
def stop_hook(self):
# Called when the program is stopped
# Need to recompile+reload the xdb.s file if needed
# FIXME: Need to detect half-written files created when the child is
# interrupted while executing the xdb.s writing code
# FIXME: Handle appdomain unload
if os.access ("xdb.s", os.F_OK):
new_size = os.stat ("xdb.s").st_size
if new_size > self.s_size:
sofile = "xdb.so"
gdb.execute ("shell as -o xdb.o xdb.s && ld -shared -o %s xdb.o" % sofile)
# FIXME: This prints messages which couldn't be turned off
gdb.execute ("add-symbol-file %s 0" % sofile)
self.s_size = new_size
class RunHook (gdb.Command):
def __init__ (self):
super (RunHook, self).__init__ ("hook-run", gdb.COMMAND_NONE,
gdb.COMPLETE_COMMAND, pre_hook_of="run")
def invoke(self, arg, from_tty):
mono_support.run_hook ()
print "Mono support loaded."
mono_support = MonoSupport ()
# This depends on the changes in gdb-python.diff to work
#RunHook ()
# Register our hooks
# This currently cannot be done from python code
exec_file = gdb.current_objfile ().filename
# FIXME: Is there a way to detect symbolic links ?
if os.stat (exec_file).st_size != os.lstat (exec_file).st_size:
exec_file = os.readlink (exec_file)
exec_dir = os.path.dirname (exec_file)
gdb.execute ("source %s/%s-gdbinit" % (exec_dir, os.path.basename (exec_file)))
-20
View File
@@ -1,20 +0,0 @@
# Loaded by mono-gdb.py
# FIXME: According to gdb docs, this is called _before_ anything is printed
# Got broken by this patch:
# http://sourceware.org/ml/gdb-patches/2008-09/msg00193.html
# FIXME: This seems to cause crashes inside gdb
#define hook-stop
# python mono_support.stop_hook ()
#end
define hook-backtrace
python mono_support.stop_hook ()
end
define hook-run
python mono_support.run_hook ()
end
define xdb
python mono_support.stop_hook ()
end
-19
View File
@@ -1,19 +0,0 @@
# Tester script for the xdb functionality
# Run using gdb -P test-xdb.py <NORMAL GDB COMMAND LINE>
import sys
gdb.execute ("file %s" % sys.argv [0])
gdb.execute ("r --break *:* %s" % " ".join (sys.argv[1:len(sys.argv)]))
while True:
try:
if gdb.threads () == None:
break
gdb.execute("xdb")
gdb.execute("bt")
gdb.execute("info args")
gdb.execute("info locals")
gdb.execute("c")
except:
gdb.execute ("quit")
-6
View File
@@ -1,6 +0,0 @@
2009-02-19 Rodrigo Kumpera <[email protected]>
* LockTracerDecoder.cs: Initial version of the lock tracers decoder.
-519
View File
@@ -1,519 +0,0 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Globalization;
using System.Runtime.InteropServices;
public enum Record {
MustNotHoldAny,
MustNotHoldOne,
MustHoldOne,
LockAcquired,
LockReleased
}
public struct LockRecord {
public SimLock lk;
public string frame;
public LockRecord (SimLock lk, string frame) {
this.lk = lk;
this.frame = frame;
}
}
public class SimThread
{
int thread;
List <LockRecord> locks = new List <LockRecord> ();
public SimThread (int t)
{
this.thread = t;
}
public bool HoldsLock (SimLock lk) {
foreach (var l in locks) {
if (l.lk == lk)
return true;
}
return false;
}
public int HoldCount (SimLock lk) {
int res = 0;
foreach (var l in locks)
if (l.lk == lk)
++res;
return res;
}
public void Lock (SimLock lk, string frame) {
foreach (LockRecord lr in locks) {
if (lk.WarnAbout (this, lr.lk))
Console.WriteLine ("WARNING: tried to acquire lock {0} at {1} while holding {2} at {3}: {4}", lk, frame, lr.lk, lr.frame, lk.GetWarningMessage (this, lr.lk));
else if (!lk.IsValid (this, lr.lk))
Console.WriteLine ("ERROR: tried to acquire lock {0} at {1} while holding {2} at {3}: {4}", lk, frame, lr.lk, lr.frame, lk.GetErrorMessage (this, lr.lk));
}
locks.Add (new LockRecord (lk, frame));
}
public void Release (SimLock lk, string frame) {
if (locks.Count == 0) {
Console.WriteLine ("ERROR: released lock {0} at {1} while holding no locks!", lk, frame);
return;
}
LockRecord top = locks [locks.Count - 1];
if (top.lk != lk && !(lk.IsGlobalLock && HoldCount (lk) > 1)) {
Console.WriteLine ("WARNING: released lock {0} at {1} out of order with {2} at {3}!", lk, frame, top.lk, top.frame);
}
for (int i = locks.Count -1; i >= 0; --i) {
if (locks [i].lk == lk) {
locks.RemoveAt (i);
break;
}
}
}
}
/*
LOCK RULES
Simple locks:
Can be acquired at any point regardless of which locks are taken or not.
No other locks can be acquired or released while holding a simple lock.
Reentrancy is not recomended. (warning)
Simple locks are leaf locks on the lock lattice.
Complex locks:
Must respect locking order, which form a lattice.
IOW, to take a given lock, only it's parents might have been taken.
Reentrancy is ok.
Locks around resources count as separate instances of the hierarchy.
Global locks:
Must respect locking order.
Must be the at the botton of the locking lattice.
Can be taken out-of-order by other locks given that it was previously acquired.
Adding global locks is not to be taken lightly.
The current lock hierarchy:
loader lock
domain lock
domain jit lock
simple locks
Examples:
You can take the loader lock without holding a domain lock.
You cannot take a domain lock if the loader lock is held.
You cannot take a domain lock while holding the lock to another domain.
*/
public enum Lock {
Invalid,
LoaderLock,
ImageDataLock,
DomainLock,
DomainAssembliesLock,
DomainJitCodeHashLock,
}
public class SimLock
{
Lock kind;
int id;
public SimLock (Lock kind, int id) {
this.kind = kind;
this.id = id;
}
static int GetLockOrder (Lock kind) {
switch (kind) {
case Lock.LoaderLock:
return 0;
case Lock.DomainLock:
return 1;
case Lock.DomainJitCodeHashLock:
return 2;
default:
return 3;
}
}
bool IsParent (SimLock other) {
return GetLockOrder (kind) > GetLockOrder (other.kind);
}
public bool IsSimpleLock {
get { return GetLockOrder (kind) == 3; }
}
public bool IsGlobalLock {
get { return kind == Lock.LoaderLock; }
}
/*locked is already owned by the thread, 'this' is the new one*/
bool Compare (SimThread thread, SimLock locked, out bool isWarning, out string msg)
{
isWarning = false;
msg = null;
if (locked != this) {
if (!IsParent (locked)) {
if (IsGlobalLock) { /*acquiring a global lock*/
if (!thread.HoldsLock (this)) { /*does the thread alread hold it?*/
msg = "Acquired a global lock after a regular lock without having it before.";
return false;
}
} else {
msg = "Hierarchy violation.";
return false;
}
}
} else if (IsSimpleLock) {
msg = "Avoid taking simple locks recursively";
isWarning = true;
return false;
}
return true;
}
public bool IsValid (SimThread thread, SimLock locked) {
bool warn;
string msg;
return Compare (thread, locked, out warn, out msg);
}
public bool WarnAbout (SimThread thread, SimLock locked) {
bool warn;
string msg;
Compare (thread, locked, out warn, out msg);
return warn;
}
public string GetWarningMessage (SimThread thread, SimLock locked) {
bool warn;
string msg;
Compare (thread, locked, out warn, out msg);
return warn ? msg : null;
}
public string GetErrorMessage (SimThread thread, SimLock locked) {
bool warn;
string msg;
bool res = Compare (thread, locked, out warn, out msg);
return !res && !warn ? msg : null;
}
public override string ToString () {
return String.Format ("{0}", kind);
}
}
public class LockSimulator
{
static Dictionary <int, SimThread> threads = new Dictionary <int, SimThread> ();
static Dictionary <int, SimLock> locks = new Dictionary <int, SimLock> ();
SymbolTable syms;
public LockSimulator (SymbolTable s) { this.syms = s; }
SimLock GetLock (Trace t) {
if (locks.ContainsKey (t.lockPtr))
return locks [t.lockPtr];
else {
return locks [t.lockPtr] = new SimLock (t.lockKind, t.lockPtr);
}
}
SimThread GetThread (Trace t) {
if (threads.ContainsKey (t.thread))
return threads [t.thread];
else
return threads [t.thread] = new SimThread (t.thread);
}
public void PlayBack (IEnumerable<Trace> traces) {
foreach (var t in traces) {
SimThread thread = GetThread (t);
SimLock lk = GetLock (t);
string frame = t.GetUsefullTopTrace (this.syms);
switch (t.record) {
case Record.MustNotHoldAny:
case Record.MustNotHoldOne:
case Record.MustHoldOne:
throw new Exception ("not supported");
case Record.LockAcquired:
thread.Lock (lk, frame);
break;
case Record.LockReleased:
thread.Release (lk, frame);
break;
default:
throw new Exception ("Invalid trace record: "+t.record);
}
}
}
}
public class Trace {
public int thread;
public Record record;
public Lock lockKind;
public int lockPtr;
int[] frames;
static readonly string[] BAD_FRAME_METHODS = new string[] {
"mono_loader_lock",
"mono_loader_unlock",
"mono_image_lock",
"mono_image_unlock",
};
public Trace (string[] fields) {
thread = fields [0].ParseHex ();
record = (Record)fields [1].ParseDec ();
lockKind = (Lock)fields [2].ParseDec ();
lockPtr = fields [3].ParseHex ();
frames = new int [fields.Length - 4];
for (int i = 0; i < frames.Length; ++i)
frames [i] = fields [i + 4].ParseHex ();
}
public void Dump (SymbolTable table) {
Console.WriteLine ("{0:x} {1} {2} {3:x}", thread, record, lockKind, lockPtr);
for (int i = 0; i < frames.Length; ++i)
Console.WriteLine ("\t{0}", table.Translate (frames [i]));
}
public string GetUsefullTopTrace (SymbolTable syms) {
for (int i = 0; i < frames.Length; ++i) {
string str = syms.Translate (frames [i]);
bool ok = true;
for (int j = 0; j < BAD_FRAME_METHODS.Length; ++j) {
if (str.IndexOf (BAD_FRAME_METHODS [j]) >= 0) {
ok = false;
break;
}
}
if (ok)
return str;
}
return "[unknown]";
}
}
public class Symbol : IComparable<Symbol>
{
public int offset;
public int size;
public string name;
public Symbol (int o, int size, string n) {
this.offset = o;
this.size = size;
this.name = n;
}
public int CompareTo(Symbol other) {
return offset - other.offset;
}
}
public interface SymbolTable {
string Translate (int offset);
}
public class OsxSymbolTable : SymbolTable
{
Symbol[] table;
const int MAX_FUNC_SIZE = 0x20000;
public OsxSymbolTable (string binary) {
Load (binary);
}
void Load (string binary) {
ProcessStartInfo psi = new ProcessStartInfo ("gobjdump", "-t "+binary);
psi.UseShellExecute = false;
psi.RedirectStandardOutput = true;
var proc = Process.Start (psi);
var list = new List<Symbol> ();
string line;
while ((line = proc.StandardOutput.ReadLine ()) != null) {
string[] fields = line.Split(new char[] {' ', '\t'}, StringSplitOptions.RemoveEmptyEntries);
if (fields.Length < 4)
continue;
if (!(fields [1].Equals ("g") || fields [1].Equals ("d")))
continue;
if (!fields [2].Equals ("*UND*"))
continue;
int offset = fields [0].ParseHex ();
string name = fields [3];
if (offset != 0)
list.Add (new Symbol (offset, 0, name));
}
table = new Symbol [list.Count];
list.CopyTo (table, 0);
Array.Sort (table);
}
public string Translate (int offset) {
Symbol sym = null;
int res = Array.BinarySearch (table, new Symbol (offset, 0, null));
if (res >= 0)
return table [res].name;
res = ~res;
if (res >= table.Length)
sym = table [table.Length - 1];
else if (res != 0)
sym = table [res - 1];
if (sym != null) {
int size = Math.Max (sym.size, 10);
if (offset - sym.offset < size)
return sym.name;
}
return String.Format ("[{0:x}]", offset);
}
}
public class LinuxSymbolTable : SymbolTable
{
Symbol[] table;
const int MAX_FUNC_SIZE = 0x20000;
public LinuxSymbolTable (string binary) {
Load (binary);
}
void Load (string binary) {
ProcessStartInfo psi = new ProcessStartInfo ("objdump", "-t "+binary);
psi.UseShellExecute = false;
psi.RedirectStandardOutput = true;
var proc = Process.Start (psi);
var list = new List<Symbol> ();
string line;
while ((line = proc.StandardOutput.ReadLine ()) != null) {
string[] fields = line.Split(new char[] {' ', '\t'}, StringSplitOptions.RemoveEmptyEntries);
if (fields.Length < 6)
continue;
if (fields [3] != ".text" || fields [2] != "F")
continue;
int offset = fields [0].ParseHex ();
int size = fields [4].ParseHex ();
string name = fields [fields.Length - 1];
if (offset != 0)
list.Add (new Symbol (offset, size, name));
}
table = new Symbol [list.Count];
list.CopyTo (table, 0);
Array.Sort (table);
}
public string Translate (int offset) {
Symbol sym = null;
int res = Array.BinarySearch (table, new Symbol (offset, 0, null));
if (res >= 0)
return table [res].name;
res = ~res;
if (res >= table.Length)
sym = table [table.Length - 1];
else if (res != 0)
sym = table [res - 1];
if (sym != null && offset - sym.offset < MAX_FUNC_SIZE)
return sym.name;
return String.Format ("[{0:x}]", offset);
}
}
public class TraceDecoder
{
string file;
public TraceDecoder (string file) {
this.file = file;
}
public IEnumerable<Trace> GetTraces () {
using (StreamReader reader = new StreamReader (file)) {
string line;
while ((line = reader.ReadLine ()) != null) {
string[] fields = line.Split(new char[] {','}, StringSplitOptions.RemoveEmptyEntries);
if (fields.Length >= 7) {
yield return new Trace (fields);
}
}
}
}
}
public class Driver
{
[DllImport ("libc")]
static extern int uname (IntPtr buf);
static bool IsOSX ()
{
bool isOsx = false;
IntPtr buf = Marshal.AllocHGlobal (8192);
if (uname (buf) == 0) {
string os = Marshal.PtrToStringAnsi (buf);
isOsx = os == "Darwin";
}
Marshal.FreeHGlobal (buf);
return isOsx;
}
static void Main (string[] args) {
SymbolTable syms;
if (args.Length != 2) {
Console.WriteLine ("usage: LockTracerDecoder.exe /path/to/mono /path/to/locks.pid");
return;
}
if (IsOSX ())
syms = new OsxSymbolTable (args [0]);
else
syms = new LinuxSymbolTable (args [0]);
var decoder = new TraceDecoder (args [1]);
var sim = new LockSimulator (syms);
sim.PlayBack (decoder.GetTraces ());
}
}
public static class Utils
{
public static int ParseHex (this string number) {
while (number.Length > 1 && (number [0] == '0' || number [0] == 'x' || number [0] == 'X'))
number = number.Substring (1);
return int.Parse (number, NumberStyles.HexNumber);
}
public static int ParseDec (this string number) {
while (number.Length > 1 && number [0] == '0')
number = number.Substring (1);
return int.Parse (number);
}
}
-2
View File
@@ -1,2 +0,0 @@
/Makefile
/Makefile.in
-2
View File
@@ -1,2 +0,0 @@
/Makefile
/Makefile.in
-2
View File
@@ -1,2 +0,0 @@
/Makefile
/Makefile.in
-13
View File
@@ -3,15 +3,6 @@
* DefaultWsdlHelpGenerator.aspx: the 'Message Layout' can now handle
self-referencing types. Fixes bug #529353.
2009-08-05 Atsushi Enomoto <[email protected]>
* web.config: add WCF assemblies as references at compilation.
* machine.config: add some missing WCF sections (new in 3.5).
2009-05-28 Atsushi Enomoto <[email protected]>
* machine.config: fix WCF diagnostics section name.
2009-03-31 Marek Habersack <[email protected]>
* DefaultWsdlHelpGenerator.aspx: the link element in <head> must
@@ -25,10 +16,6 @@
when only Soap is supported.
Bug #342073 fixed.
2009-01-23 Atsushi Enomoto <[email protected]>
* web.config : added .svc handler.
2009-01-07 Kornél Pál <[email protected]>
* DefaultWsdlHelpGenerator.aspx: Move <script> at the end of <head> that
+1 -16
View File
@@ -79,7 +79,7 @@
<section name="bindings" type="System.ServiceModel.Configuration.BindingsSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="client" type="System.ServiceModel.Configuration.ClientSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="commonBehaviors" type="System.ServiceModel.Configuration.CommonBehaviorsSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="diagnostics" type="System.ServiceModel.Configuration.DiagnosticSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="diagnostic" type="System.ServiceModel.Configuration.DiagnosticSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="extensions" type="System.ServiceModel.Configuration.ExtensionsSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<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" />
@@ -253,21 +253,6 @@
</providers>
</profile>
</system.web>
<system.serviceModel>
<extensions>
<behaviorExtensions>
<add name="enableWebScript" type="System.ServiceModel.Configuration.WebScriptEnablingElement, System.ServiceModel.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="webHttp" type="System.ServiceModel.Configuration.WebHttpElement, System.ServiceModel.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</behaviorExtensions>
<bindingElementExtensions>
<add name="webMessageEncoding" type="System.ServiceModel.Configuration.WebMessageEncodingElement, System.ServiceModel.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</bindingElementExtensions>
<bindingExtensions>
<add name="webHttpBinding" type="System.ServiceModel.Configuration.WebHttpBindingCollectionElement, System.ServiceModel.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</bindingExtensions>
</extensions>
</system.serviceModel>
</configuration>
+2 -7
View File
@@ -37,9 +37,8 @@
<add verb="*" path="*.vbproj" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.licx" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.dll" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.rem" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory, System.Runtime.Remoting, Culture=neutral, PublicKeyToken=b77a5c561934e089" validate="false" />
<add verb="*" path="*.soap" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory, System.Runtime.Remoting, Culture=neutral, PublicKeyToken=b77a5c561934e089" validate="false" />
<add verb="*" path="*.svc" type="System.ServiceModel.Channels.SvcHttpHandlerFactory, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add verb="*" path="*.rem" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory, System.Runtime.Remoting, Culture=neutral, PublicKeyToken=b77a5c561934e089" validate="false" />
<add verb="*" path="*.soap" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory, System.Runtime.Remoting, Culture=neutral, PublicKeyToken=b77a5c561934e089" validate="false" />
<add verb="GET,HEAD" path="*" type="System.Web.StaticFileHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*" type="System.Web.HttpMethodNotAllowedHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</httpHandlers>
@@ -95,10 +94,6 @@
<add assembly="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add assembly="System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add assembly="System.Runtime.Serialization, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"/>
<add assembly="System.IdentityModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"/>
<add assembly="System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<add assembly="System.ServiceModel.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add assembly="*" /> <!-- Add assemblies in bin directory -->
</assemblies>
-9
View File
@@ -1,9 +0,0 @@
2009-08-06 Atsushi Enomoto <[email protected]>
* web.config: add WCF assemblies as references at compilation.
* machine.config: add some missing WCF sections (new in 3.5).
2009-07-24 Jb Evain <[email protected]>
* Initial import of the net_4_0 specific files.
-12
View File
@@ -1,12 +0,0 @@
SUBDIRS =
monodir = $(sysconfdir)/mono/4.0
EXTRA_DIST = machine.config \
web.config \
settings.map
mono_DATA = machine.config \
web.config \
settings.map
-274
View File
@@ -1,274 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="configProtectedData" type="System.Configuration.ProtectedConfigurationSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="appSettings" type="System.Configuration.AppSettingsSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="connectionStrings" type="System.Configuration.ConnectionStringsSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="mscorlib" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowLocation="false"/>
<section name="runtime" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowLocation="false"/>
<section name="assemblyBinding" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowLocation="false" />
<section name="satelliteassemblies" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowLocation="false" />
<section name="startup" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowLocation="false"/>
<section name="system.codedom" type="System.CodeDom.Compiler.CodeDomConfigurationHandler, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="system.data" type="System.Data.Common.DbProviderFactoriesConfigurationHandler, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="system.diagnostics" type="System.Diagnostics.DiagnosticsConfigurationHandler, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="system.runtime.remoting" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowLocation="false"/>
<section name="system.windows.forms" type="System.Windows.Forms.WindowsFormsSection, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="windows" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowLocation="false" />
<section name="strongNames" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowLocation="false"/>
<sectionGroup name="system.web" type="System.Web.Configuration.SystemWebSectionGroup, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<section name="anonymousIdentification" type="System.Web.Configuration.AnonymousIdentificationSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
<section name="authentication" type="System.Web.Configuration.AuthenticationSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
<section name="authorization" type="System.Web.Configuration.AuthorizationSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="browserCaps" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="clientTarget" type="System.Web.Configuration.ClientTargetSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="compilation" type="System.Web.Configuration.CompilationSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="customErrors" type="System.Web.Configuration.CustomErrorsSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="deployment" type="System.Web.Configuration.DeploymentSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineOnly" />
<section name="globalization" type="System.Web.Configuration.GlobalizationSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="healthMonitoring" type="System.Web.Configuration.HealthMonitoringSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
<section name="hostingEnvironment" type="System.Web.Configuration.HostingEnvironmentSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication" />
<section name="httpCookies" type="System.Web.Configuration.HttpCookiesSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="httpHandlers" type="System.Web.Configuration.HttpHandlersSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="httpModules" type="System.Web.Configuration.HttpModulesSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="httpRuntime" type="System.Web.Configuration.HttpRuntimeSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="identity" type="System.Web.Configuration.IdentitySection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="machineKey" type="System.Web.Configuration.MachineKeySection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="membership" type="System.Web.Configuration.MembershipSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="mobileControls" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="deviceFilters" type="System.Configuration.IgnoreSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="pages" type="System.Web.Configuration.PagesSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="processModel" type="System.Web.Configuration.ProcessModelSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineOnly" allowLocation="false" />
<section name="profile" type="System.Web.Configuration.ProfileSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
<section name="roleManager" type="System.Web.Configuration.RoleManagerSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
<section name="securityPolicy" type="System.Web.Configuration.SecurityPolicySection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication" />
<section name="sessionPageState" type="System.Web.Configuration.SessionPageStateSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="sessionState" type="System.Web.Configuration.SessionStateSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
<section name="siteMap" type="System.Web.Configuration.SiteMapSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
<section name="trace" type="System.Web.Configuration.TraceSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="trust" type="System.Web.Configuration.TrustSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication" />
<section name="urlMappings" type="System.Web.Configuration.UrlMappingsSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
<section name="webControls" type="System.Web.Configuration.WebControlsSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="webParts" type="System.Web.Configuration.WebPartsSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="webServices" type="System.Web.Services.Configuration.WebServicesSection, System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="xhtmlConformance" type="System.Web.Configuration.XhtmlConformanceSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<sectionGroup name="caching" type="System.Web.Configuration.SystemWebCachingSectionGroup, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<section name="cache" type="System.Web.Configuration.CacheSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
<section name="outputCache" type="System.Web.Configuration.OutputCacheSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
<section name="outputCacheSettings" type="System.Web.Configuration.OutputCacheSettingsSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
<section name="sqlCacheDependency" type="System.Web.Configuration.OutputCacheSettingsSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"/>
</sectionGroup>
<section name="monoSettings" type="System.Web.Configuration.MonoSettingsSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</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" />
<section name="defaultProxy" type="System.Net.Configuration.DefaultProxySection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<sectionGroup name="mailSettings" type="System.Net.Configuration.MailSettingsSectionGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="smtp" type="System.Net.Configuration.SmtpSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</sectionGroup>
<section name="requestCaching" type="System.Net.Configuration.RequestCachingSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="settings" type="System.Net.Configuration.SettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="webRequestModules" type="System.Net.Configuration.WebRequestModulesSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</sectionGroup>
<section name="system.drawing" type="System.Configuration.NameValueSectionHandler, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<sectionGroup name="system.serviceModel" type="System.ServiceModel.Configuration.ServiceModelSectionGroup, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="behaviors" type="System.ServiceModel.Configuration.BehaviorsSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="bindings" type="System.ServiceModel.Configuration.BindingsSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="client" type="System.ServiceModel.Configuration.ClientSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="commonBehaviors" type="System.ServiceModel.Configuration.CommonBehaviorsSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="diagnostics" type="System.ServiceModel.Configuration.DiagnosticSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="extensions" type="System.ServiceModel.Configuration.ExtensionsSection, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<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>
<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" />
</configSections>
<connectionStrings>
<add name="LocalSqlServer" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/>
<add name="LocalSqliteServer" connectionString="Data Source=|DataDirectory|/aspnetdb.sqlite;version=3" providerName="Mono.Data.Sqlite"/>
</connectionStrings>
<configProtectedData defaultProvider="RsaProtectedConfigurationProvider">
<providers>
<add name="RsaProtectedConfigurationProvider" type="System.Configuration.RsaProtectedConfigurationProvider, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
description="" keyContainerName="MonoFrameworkConfigurationKey" cspProviderName="" useMachineContainer="true" useOAEP="false" />
<add name="DataProtectionConfigurationProvider" type="System.Configuration.DpapiProtectedConfigurationProvider, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
description="" useMachineProtection="true" keyEntropy="" />
</providers>
</configProtectedData>
<system.net>
<authenticationModules>
<add type="System.Net.BasicClient, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add type="System.Net.DigestClient, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add type="System.Net.NtlmClient, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</authenticationModules>
<webRequestModules>
<add prefix="http" type="System.Net.HttpRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add prefix="https" type="System.Net.HttpRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add prefix="file" type="System.Net.FileWebRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add prefix="ftp" type="System.Net.FtpRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</webRequestModules>
<settings>
<ipv6 enabled="false"/>
</settings>
</system.net>
<system.runtime.remoting>
<application>
<channels>
<channel ref="http client" displayName="http client (delay loaded)" delayLoadAsClientChannel="true" />
<channel ref="tcp client" displayName="tcp client (delay loaded)" delayLoadAsClientChannel="true" />
<channel ref="ipc client" displayName="ipc client (delay loaded)" delayLoadAsClientChannel="true" />
</channels>
</application>
<channels>
<channel id="http" type="System.Runtime.Remoting.Channels.Http.HttpChannel, System.Runtime.Remoting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<channel id="http client" type="System.Runtime.Remoting.Channels.Http.HttpClientChannel, System.Runtime.Remoting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<channel id="http server" type="System.Runtime.Remoting.Channels.Http.HttpServerChannel, System.Runtime.Remoting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<channel id="tcp" type="System.Runtime.Remoting.Channels.Tcp.TcpChannel, System.Runtime.Remoting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<channel id="tcp client" type="System.Runtime.Remoting.Channels.Tcp.TcpClientChannel, System.Runtime.Remoting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<channel id="tcp server" type="System.Runtime.Remoting.Channels.Tcp.TcpServerChannel, System.Runtime.Remoting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<channel id="ipc" type="System.Runtime.Remoting.Channels.Ipc.IpcChannel, System.Runtime.Remoting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<channel id="ipc client" type="System.Runtime.Remoting.Channels.Ipc.IpcClientChannel, System.Runtime.Remoting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<channel id="ipc server" type="System.Runtime.Remoting.Channels.Ipc.IpcServerChannel, System.Runtime.Remoting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</channels>
<channelSinkProviders>
<clientProviders>
<formatter id="soap" type="System.Runtime.Remoting.Channels.SoapClientFormatterSinkProvider, System.Runtime.Remoting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<formatter id="binary" type="System.Runtime.Remoting.Channels.BinaryClientFormatterSinkProvider, System.Runtime.Remoting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</clientProviders>
<serverProviders>
<formatter id="soap" type="System.Runtime.Remoting.Channels.SoapServerFormatterSinkProvider, System.Runtime.Remoting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<formatter id="binary" type="System.Runtime.Remoting.Channels.BinaryServerFormatterSinkProvider, System.Runtime.Remoting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<provider id="wsdl" type="System.Runtime.Remoting.MetadataServices.SdlChannelSinkProvider, System.Runtime.Remoting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</serverProviders>
</channelSinkProviders>
</system.runtime.remoting>
<appSettings>
<!--<add key="yourkey" value="your value" /> -->
<!--<remove key="a key defined higher in the hierarchy" /> -->
<!--<clear/> Removes all defined settings -->
</appSettings>
<system.diagnostics>
<trace autoflush="false" indentsize="4" />
</system.diagnostics>
<system.drawing>
</system.drawing>
<system.data>
<DbProviderFactories>
<add name="Mono Sqlite Data Provider" invariant="Mono.Data.SqliteClient"
description="Mono Framework Data Provider for SQLite (old version)"
type="Mono.Data.SqliteClient.SqliteFactory, Mono.Data.SqliteClient, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756"/>
<add name="Mono Sqlite Provider" invariant="Mono.Data.Sqlite"
description="Mono Framework Data Provider for SQLite (new version)"
type="Mono.Data.Sqlite.SqliteFactory, Mono.Data.Sqlite, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756"/>
<add name="Odbc Data Provider" invariant="System.Data.Odbc"
description=".Net Framework Data Provider for Odbc"
type="System.Data.Odbc.OdbcFactory, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<add name="OleDb Data Provider" invariant="System.Data.OleDb"
description=".Net Framework Data Provider for OleDb"
type="System.Data.OleDb.OleDbFactory, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<add name="OracleClient Data Provider" invariant="System.Data.OracleClient"
description=".Net Framework Data Provider for Oracle"
type="System.Data.OracleClient.OracleClientFactory, System.Data.OracleClient, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<add name="SqlClient Data Provider" invariant="System.Data.SqlClient"
description=".Net Framework Data Provider for SqlServer"
type="System.Data.SqlClient.SqlClientFactory, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<add name="Sybase Data Provider" invariant="Mono.Data.SybaseClient"
description=".Net Framework Data Provider for Sybase"
type="Mono.Data.SybaseClient.SybaseClientFactory, Mono.Data.SybaseClient, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756"/>
</DbProviderFactories>
</system.data>
<mscorlib>
<cryptographySettings>
<cryptoNameMapping>
<cryptoClasses>
<cryptoClass monoMD2="Mono.Security.Cryptography.MD2Managed, Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
</cryptoClasses>
<nameEntry name="MD2" class="monoMD2" />
</cryptoNameMapping>
<oidMap>
<oidEntry OID="1.2.840.113549.2.2" name="MD2" />
<oidEntry OID="1.2.840.113549.2.2" name="Mono.Security.Cryptography.MD2Managed" />
</oidMap>
</cryptographySettings>
</mscorlib>
<strongNames>
<pubTokenMapping>
<!-- ECMA key -->
<map Token="b77a5c561934e089" PublicKey="002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df" />
<!-- Microsoft (final) key -->
<map Token="b03f5f7f11d50a3a" PublicKey="002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df" />
<!-- Microsoft (Web Service Enhancement) key -->
<map Token="31bf3856ad364e35" PublicKey="002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df" />
<!-- IBM (DB2 Data Provider) key -->
<map Token="7c307b91aa13d208" PublicKey="002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df" />
<!-- Silverlight 2.0 key -->
<map Token="7cec85d7bea7798e" PublicKey="002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df" />
</pubTokenMapping>
</strongNames>
<system.web>
<webServices>
<protocols>
<add name="HttpSoap"/>
<add name="HttpSoap12"/>
<add name="HttpPost"/>
<add name="HttpGet"/>
<add name="Documentation"/>
</protocols>
<conformanceWarnings>
<add name="BasicProfile1_1"/>
</conformanceWarnings>
<wsdlHelpGenerator href="DefaultWsdlHelpGenerator.aspx" />
</webServices>
<membership>
<providers>
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="LocalSqlServer" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression=""/>
<!-- <add name="AspNetSqlMembershipProvider" type="Mainsoft.Web.Security.GenericMembershipProvider, Mainsoft.Web.Security" applicationName="/" connectionStringName="LocalSqlServer" /> -->
</providers>
</membership>
<roleManager>
<providers>
<add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" applicationName="/" connectionStringName="LocalSqlServer" />
<!-- <add name="AspNetSqlRoleProvider" type="Mainsoft.Web.Security.GenericRoleProvider, Mainsoft.Web.Security" applicationName="/" connectionStringName="LocalSqlServer" /> -->
</providers>
</roleManager>
<profile>
<providers>
<add name="AspNetSqlProfileProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Profile.SqlProfileProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
</profile>
</system.web>
<system.serviceModel>
<extensions>
<behaviorExtensions>
<add name="enableWebScript" type="System.ServiceModel.Configuration.WebScriptEnablingElement, System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="webHttp" type="System.ServiceModel.Configuration.WebHttpElement, System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</behaviorExtensions>
<bindingElementExtensions>
<add name="webMessageEncoding" type="System.ServiceModel.Configuration.WebMessageEncodingElement, System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</bindingElementExtensions>
<bindingExtensions>
<add name="webHttpBinding" type="System.ServiceModel.Configuration.WebHttpBindingCollectionElement, System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</bindingExtensions>
</extensions>
</system.serviceModel>
</configuration>
-48
View File
@@ -1,48 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<settingsMap>
<map sectionType="System.Web.Configuration.MembershipSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
mapperType="Mono.Web.Util.MembershipSectionMapper, Mono.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756"
platform="Unix">
<!-- The 'what' tag specifies which region of the section to modify. The 'value' attribute value is mapper-specific and is not defined here. It can be
any expression understood by the mapper to designate the section region to modify.
-->
<what value="providers">
<!-- 'what' can contain any number of occurrences of any three elements:
replace - replace the designated region
add - add a new entry to the region
clear - clear the region
remove - remove the designatedregion
The attributes to any of the above are freeform and are not processed by the mapper manager. They are stored verbatim for the
mapper to peruse.
-->
<replace name="AspNetSqlMembershipProvider"
type="System.Web.Security.SqliteMembershipProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="LocalSqliteServer" />
</what>
</map>
<map sectionType="System.Web.Configuration.RoleManagerSection, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
mapperType="Mono.Web.Util.RoleManagerSectionMapper, Mono.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756"
platform="Unix">
<!-- The 'what' tag specifies which region of the section to modify. The 'value' attribute value is mapper-specific and is not defined here. It can be
any expression understood by the mapper to designate the section region to modify.
-->
<what value="providers">
<!-- 'what' can contain any number of occurrences of any three elements:
replace - replace the designated region
add - add a new entry to the region
clear - clear the region
remove - remove the designatedregion
The attributes to any of the above are freeform and are not processed by the mapper manager. They are stored verbatim for the
mapper to peruse.
-->
<replace name="AspNetSqlRoleProvider"
type="System.Web.Security.SqliteRoleProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="LocalSqliteServer" />
</what>
</map>
</settingsMap>
-154
View File
@@ -1,154 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<monoSettings>
<compilersCompatibility>
<compiler language="c#;cs;csharp" extension=".cs" compilerOptions="/nowarn:0169"
type="Microsoft.CSharp.CSharpCodeProvider, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</compilersCompatibility>
</monoSettings>
<authorization>
<allow users="*" />
</authorization>
<httpHandlers>
<add verb="*" path="Trace.axd" type="System.Web.Handlers.TraceHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="UrlRouting.axd" type="System.Web.HttpForbiddenHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.aspx" type="System.Web.UI.PageHandlerFactory, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.asmx" validate="false" type="System.Web.Services.Protocols.WebServiceHandlerFactory, System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.ashx" type="System.Web.UI.SimpleHandlerFactory, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="GET" path="WebResource.axd" type="System.Web.Handlers.AssemblyResourceLoader, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.master" type="System.Web.HttpForbiddenHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.resources" type="System.Web.HttpForbiddenHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.skin" type="System.Web.HttpForbiddenHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.browser" type="System.Web.HttpForbiddenHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.sitemap" type="System.Web.HttpForbiddenHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.webinfo" type="System.Web.HttpForbiddenHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.resx" type="System.Web.HttpForbiddenHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.asax" type="System.Web.HttpForbiddenHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.ascx" type="System.Web.HttpForbiddenHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.config" type="System.Web.HttpForbiddenHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.Config" type="System.Web.HttpForbiddenHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.cs" type="System.Web.HttpForbiddenHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.vb" type="System.Web.HttpForbiddenHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.csproj" type="System.Web.HttpForbiddenHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.vbproj" type="System.Web.HttpForbiddenHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.licx" type="System.Web.HttpForbiddenHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.dll" type="System.Web.HttpForbiddenHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.rem" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory, System.Runtime.Remoting, Culture=neutral, PublicKeyToken=b77a5c561934e089" validate="false" />
<add verb="*" path="*.soap" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory, System.Runtime.Remoting, Culture=neutral, PublicKeyToken=b77a5c561934e089" validate="false" />
<add verb="*" path="*.svc" type="System.ServiceModel.Channels.SvcHttpHandlerFactory, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add verb="GET,HEAD" path="*" type="System.Web.StaticFileHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*" type="System.Web.HttpMethodNotAllowedHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</httpHandlers>
<httpModules>
<add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add name="OutputCache" type="System.Web.Caching.OutputCacheModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add name="RoleManager" type="System.Web.Security.RoleManagerModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add name="Session" type="System.Web.SessionState.SessionStateModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add name="UrlAuthorization" type="System.Web.Security.UrlAuthorizationModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</httpModules>
<authentication mode="Forms">
<forms name=".MONOAUTH" loginUrl="login.aspx" protection="All" timeout="30" path="/">
<credentials passwordFormat="Clear">
<!--<user name="gonzalo" password="gonz"/>-->
</credentials>
</forms>
</authentication>
<machineKey validationKey="AutoGenerate" decryptionKey="AutoGenerate" validation="SHA1" />
<globalization requestEncoding="utf-8"
responseEncoding="utf-8"
fileEncoding="utf-8"/>
<!--
culture="en-US"
uiculture="en-US" />
-->
<sessionState mode="InProc" />
<pages>
<namespaces>
<add namespace="System" />
<add namespace="System.Collections" />
<add namespace="System.Collections.Specialized" />
<add namespace="System.Configuration" />
<add namespace="System.Text" />
<add namespace="System.Text.RegularExpressions" />
<add namespace="System.Web" />
<add namespace="System.Web.Caching" />
<add namespace="System.Web.SessionState" />
<add namespace="System.Web.Security" />
<add namespace="System.Web.Profile" />
<add namespace="System.Web.UI" />
<add namespace="System.Web.UI.WebControls" />
<!-- <add namespace="System.Web.UI.WebControls.WebParts" /> -->
<add namespace="System.Web.UI.HtmlControls" />
</namespaces>
</pages>
<webControls clientScriptsLocation="/web_scripts" />
<compilation debug="false" defaultLanguage="c#" explicit="true" strict="false" >
<assemblies>
<!--<add assembly="mscorlib" /> -->
<add assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add assembly="System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add assembly="System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add assembly="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add assembly="System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add assembly="System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add assembly="System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"/>
<add assembly="System.IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"/>
<add assembly="System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<add assembly="System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add assembly="*" /> <!-- Add assemblies in bin directory -->
</assemblies>
<expressionBuilders>
<add expressionPrefix="Resources"
type="System.Web.Compilation.ResourceExpressionBuilder, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add expressionPrefix="ConnectionStrings"
type="System.Web.Compilation.ConnectionStringsExpressionBuilder, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add expressionPrefix="AppSettings"
type="System.Web.Compilation.AppSettingsExpressionBuilder, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</expressionBuilders>
<buildProviders>
<add extension=".aspx" type="System.Web.Compilation.PageBuildProvider" />
<add extension=".ascx" type="System.Web.Compilation.UserControlBuildProvider" />
<add extension=".master" type="System.Web.Compilation.MasterPageBuildProvider" />
<add extension=".asmx" type="System.Web.Compilation.WebServiceBuildProvider" />
<add extension=".ashx" type="System.Web.Compilation.WebHandlerBuildProvider" />
<add extension=".soap" type="System.Web.Compilation.WebServiceBuildProvider" />
<add extension=".resx" type="System.Web.Compilation.ResXBuildProvider" />
<add extension=".resources" type="System.Web.Compilation.ResourcesBuildProvider" />
<add extension=".wsdl" type="System.Web.Compilation.WsdlBuildProvider" />
<add extension=".xsd" type="System.Web.Compilation.XsdBuildProvider" />
<add extension=".js" type="System.Web.Compilation.ForceCopyBuildProvider" />
<add extension=".lic" type="System.Web.Compilation.IgnoreFileBuildProvider" />
<add extension=".licx" type="System.Web.Compilation.IgnoreFileBuildProvider" />
<add extension=".exclude" type="System.Web.Compilation.IgnoreFileBuildProvider" />
<add extension=".refresh" type="System.Web.Compilation.IgnoreFileBuildProvider" />
</buildProviders>
</compilation>
<httpRuntime executionTimeout="110"
maxRequestLength="4096"
useFullyQualifiedRedirectUrl="false"
minFreeThreads="8"
minLocalRequestFreeThreads="4"
appRequestQueueLimit="5000" />
<clientTarget>
<add alias="ie5" userAgent="Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)" />
<add alias="ie4" userAgent="Mozilla/4.0 (compatible; MSIE 4.0; Windows NT 4.0)" />
<add alias="uplevel" userAgent="Mozilla/4.0 (compatible; MSIE 4.0; Windows NT 4.0)" />
<add alias="downlevel" userAgent="Unknown" />
</clientTarget>
<siteMap>
<providers>
<add name="AspNetXmlSiteMapProvider"
description="Default site map provider that reads in .sitemap xml files."
type="System.Web.XmlSiteMapProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
siteMapFile="Web.sitemap" />
</providers>
</siteMap>
</system.web>
</configuration>
+7
View File
@@ -0,0 +1,7 @@
assemblies_dir=@prefix@/lib/mono
Libraries=${assemblies_dir}/2.1/smcs.exe
Name: Mono Internal -- Do not use.
Description: Mono Internal Libraries -- Do not use
Version: @VERSION@
Libs: -r:smcs.exe
-10
View File
@@ -1,10 +0,0 @@
/convert.exe*
/html
/Makefile
/Makefile.in
/monoapi.tree
/monoapi.zip
/mono-file-formats.tree
/mono-file-formats.zip
/mono-tools.tree
/mono-tools.zip
Binary file not shown.
+8 -14
View File
@@ -1,21 +1,15 @@
2009-02-12 Zoltan Varga <[email protected]>
2009-12-22 Jo Shields <[email protected]>
* HtmlAgilityPack/LICENSE: Include upstream license (Ms-PL) since the
file headers don't specify it
* Makefile.am (EXTRA_DIST): Remove removed files.
2009-12-22 Jo Shields <[email protected]>
* README: Point to the documentation on the wiki.
* HtmlAgilityPack/*: Bundle HtmlAgilityPack 1.4~beta2 from
http://www.codeplex.com/htmlagilitypack in source form.
* call-sites.txt: Remove this, its contents is in jit-trampolines.
* AgilityPack.dll: Remove binary assembly, use source instead.
* memory-management.txt thread-safety.txt aot-compiler.txt jit-regalloc
exception-handling.txt: Remove documents which are now on the wiki.
2009-02-11 Rodrigo Kumpera <[email protected]>
* thread-safety.txt: Improve the docs about image lock.
2009-02-11 Rodrigo Kumpera <[email protected]>
* thread-safety.txt: Document the new image lock.
* docs.make Makefile.am README: Reflect above changes
2008-12-12 Mark Probst <[email protected]>
@@ -0,0 +1,33 @@
// HtmlAgilityPack V1.0 - Simon Mourier <simon underscore mourier at hotmail dot com>
using System;
using System.Text;
namespace HtmlAgilityPack
{
internal class EncodingFoundException : Exception
{
#region Fields
private Encoding _encoding;
#endregion
#region Constructors
internal EncodingFoundException(Encoding encoding)
{
_encoding = encoding;
}
#endregion
#region Properties
internal Encoding Encoding
{
get { return _encoding; }
}
#endregion
}
}
+260
View File
@@ -0,0 +1,260 @@
// HtmlAgilityPack V1.0 - Simon Mourier <simon underscore mourier at hotmail dot com>
#region
using System;
using System.Diagnostics;
#endregion
namespace HtmlAgilityPack
{
/// <summary>
/// Represents an HTML attribute.
/// </summary>
[DebuggerDisplay("Name: {OriginalName}, Value: {Value}")]
public class HtmlAttribute : IComparable
{
#region Fields
private int _line;
internal int _lineposition;
internal string _name;
internal int _namelength;
internal int _namestartindex;
internal HtmlDocument _ownerdocument; // attribute can exists without a node
internal HtmlNode _ownernode;
private AttributeValueQuote _quoteType = AttributeValueQuote.DoubleQuote;
internal int _streamposition;
internal string _value;
internal int _valuelength;
internal int _valuestartindex;
#endregion
#region Constructors
internal HtmlAttribute(HtmlDocument ownerdocument)
{
_ownerdocument = ownerdocument;
}
#endregion
#region Properties
/// <summary>
/// Gets the line number of this attribute in the document.
/// </summary>
public int Line
{
get { return _line; }
internal set { _line = value; }
}
/// <summary>
/// Gets the column number of this attribute in the document.
/// </summary>
public int LinePosition
{
get { return _lineposition; }
}
/// <summary>
/// Gets the qualified name of the attribute.
/// </summary>
public string Name
{
get
{
if (_name == null)
{
_name = _ownerdocument._text.Substring(_namestartindex, _namelength);
}
return _name.ToLower();
}
set
{
if (value == null)
{
throw new ArgumentNullException("value");
}
_name = value;
if (_ownernode != null)
{
_ownernode._innerchanged = true;
_ownernode._outerchanged = true;
}
}
}
/// <summary>
/// Name of attribute with original case
/// </summary>
public string OriginalName
{
get { return _name; }
}
/// <summary>
/// Gets the HTML document to which this attribute belongs.
/// </summary>
public HtmlDocument OwnerDocument
{
get { return _ownerdocument; }
}
/// <summary>
/// Gets the HTML node to which this attribute belongs.
/// </summary>
public HtmlNode OwnerNode
{
get { return _ownernode; }
}
/// <summary>
/// Specifies what type of quote the data should be wrapped in
/// </summary>
public AttributeValueQuote QuoteType
{
get { return _quoteType; }
set { _quoteType = value; }
}
/// <summary>
/// Gets the stream position of this attribute in the document, relative to the start of the document.
/// </summary>
public int StreamPosition
{
get { return _streamposition; }
}
/// <summary>
/// Gets or sets the value of the attribute.
/// </summary>
public string Value
{
get
{
if (_value == null)
{
_value = _ownerdocument._text.Substring(_valuestartindex, _valuelength);
}
return _value;
}
set
{
_value = value;
if (_ownernode != null)
{
_ownernode._innerchanged = true;
_ownernode._outerchanged = true;
}
}
}
internal string XmlName
{
get { return HtmlDocument.GetXmlName(Name); }
}
internal string XmlValue
{
get { return Value; }
}
/// <summary>
/// Gets a valid XPath string that points to this Attribute
/// </summary>
public string XPath
{
get
{
string basePath = (OwnerNode == null) ? "/" : OwnerNode.XPath + "/";
return basePath + GetRelativeXpath();
}
}
#endregion
#region IComparable Members
/// <summary>
/// Compares the current instance with another attribute. Comparison is based on attributes' name.
/// </summary>
/// <param name="obj">An attribute to compare with this instance.</param>
/// <returns>A 32-bit signed integer that indicates the relative order of the names comparison.</returns>
public int CompareTo(object obj)
{
HtmlAttribute att = obj as HtmlAttribute;
if (att == null)
{
throw new ArgumentException("obj");
}
return Name.CompareTo(att.Name);
}
#endregion
#region Public Methods
/// <summary>
/// Creates a duplicate of this attribute.
/// </summary>
/// <returns>The cloned attribute.</returns>
public HtmlAttribute Clone()
{
HtmlAttribute att = new HtmlAttribute(_ownerdocument);
att.Name = Name;
att.Value = Value;
return att;
}
/// <summary>
/// Removes this attribute from it's parents collection
/// </summary>
public void Remove()
{
_ownernode.Attributes.Remove(this);
}
#endregion
#region Private Methods
private string GetRelativeXpath()
{
if (OwnerNode == null)
return Name;
int i = 1;
foreach (HtmlAttribute node in OwnerNode.Attributes)
{
if (node.Name != Name) continue;
if (node == this)
break;
i++;
}
return "@" + Name + "[" + i + "]";
}
#endregion
}
/// <summary>
/// An Enum representing different types of Quotes used for surrounding attribute values
/// </summary>
public enum AttributeValueQuote
{
/// <summary>
/// A single quote mark '
/// </summary>
SingleQuote,
/// <summary>
/// A double quote mark "
/// </summary>
DoubleQuote
}
}
@@ -0,0 +1,394 @@
// HtmlAgilityPack V1.0 - Simon Mourier <simon underscore mourier at hotmail dot com>
using System;
using System.Collections;
using System.Collections.Generic;
namespace HtmlAgilityPack
{
/// <summary>
/// Represents a combined list and collection of HTML nodes.
/// </summary>
public class HtmlAttributeCollection : IList<HtmlAttribute>
{
#region Fields
internal Dictionary<string, HtmlAttribute> Hashitems = new Dictionary<string, HtmlAttribute>();
private HtmlNode _ownernode;
private List<HtmlAttribute> items = new List<HtmlAttribute>();
#endregion
#region Constructors
internal HtmlAttributeCollection(HtmlNode ownernode)
{
_ownernode = ownernode;
}
#endregion
#region Properties
/// <summary>
/// Gets a given attribute from the list using its name.
/// </summary>
public HtmlAttribute this[string name]
{
get
{
if (name == null)
{
throw new ArgumentNullException("name");
}
return Hashitems.ContainsKey(name.ToLower()) ? Hashitems[name.ToLower()] : null;
}
set { Append(value); }
}
#endregion
#region IList<HtmlAttribute> Members
/// <summary>
/// Gets the number of elements actually contained in the list.
/// </summary>
public int Count
{
get { return items.Count; }
}
/// <summary>
/// Gets readonly status of colelction
/// </summary>
public bool IsReadOnly
{
get { return false; }
}
/// <summary>
/// Gets the attribute at the specified index.
/// </summary>
public HtmlAttribute this[int index]
{
get { return items[index]; }
set { items[index] = value; }
}
/// <summary>
/// Adds supplied item to collection
/// </summary>
/// <param name="item"></param>
public void Add(HtmlAttribute item)
{
Append(item);
}
/// <summary>
/// Explicit clear
/// </summary>
void ICollection<HtmlAttribute>.Clear()
{
items.Clear();
}
/// <summary>
/// Retreives existence of supplied item
/// </summary>
/// <param name="item"></param>
/// <returns></returns>
public bool Contains(HtmlAttribute item)
{
return items.Contains(item);
}
/// <summary>
/// Copies collection to array
/// </summary>
/// <param name="array"></param>
/// <param name="arrayIndex"></param>
public void CopyTo(HtmlAttribute[] array, int arrayIndex)
{
items.CopyTo(array, arrayIndex);
}
/// <summary>
/// Get Explicit enumerator
/// </summary>
/// <returns></returns>
IEnumerator<HtmlAttribute> IEnumerable<HtmlAttribute>.GetEnumerator()
{
return items.GetEnumerator();
}
/// <summary>
/// Explicit non-generic enumerator
/// </summary>
/// <returns></returns>
IEnumerator IEnumerable.GetEnumerator()
{
return items.GetEnumerator();
}
/// <summary>
/// Retrieves the index for the supplied item, -1 if not found
/// </summary>
/// <param name="item"></param>
/// <returns></returns>
public int IndexOf(HtmlAttribute item)
{
return items.IndexOf(item);
}
/// <summary>
/// Inserts given item into collection at supplied index
/// </summary>
/// <param name="index"></param>
/// <param name="item"></param>
public void Insert(int index, HtmlAttribute item)
{
if (item == null)
{
throw new ArgumentNullException("item");
}
Hashitems[item.Name] = item;
item._ownernode = _ownernode;
items.Insert(index, item);
_ownernode._innerchanged = true;
_ownernode._outerchanged = true;
}
/// <summary>
/// Explicit collection remove
/// </summary>
/// <param name="item"></param>
/// <returns></returns>
bool ICollection<HtmlAttribute>.Remove(HtmlAttribute item)
{
return items.Remove(item);
}
/// <summary>
/// Removes the attribute at the specified index.
/// </summary>
/// <param name="index">The index of the attribute to remove.</param>
public void RemoveAt(int index)
{
HtmlAttribute att = items[index];
Hashitems.Remove(att.Name);
items.RemoveAt(index);
_ownernode._innerchanged = true;
_ownernode._outerchanged = true;
}
#endregion
#region Public Methods
/// <summary>
/// Adds a new attribute to the collection with the given values
/// </summary>
/// <param name="name"></param>
/// <param name="value"></param>
public void Add(string name, string value)
{
Append(name, value);
}
/// <summary>
/// Inserts the specified attribute as the last attribute in the collection.
/// </summary>
/// <param name="newAttribute">The attribute to insert. May not be null.</param>
/// <returns>The appended attribute.</returns>
public HtmlAttribute Append(HtmlAttribute newAttribute)
{
if (newAttribute == null)
{
throw new ArgumentNullException("newAttribute");
}
Hashitems[newAttribute.Name] = newAttribute;
newAttribute._ownernode = _ownernode;
items.Add(newAttribute);
_ownernode._innerchanged = true;
_ownernode._outerchanged = true;
return newAttribute;
}
/// <summary>
/// Creates and inserts a new attribute as the last attribute in the collection.
/// </summary>
/// <param name="name">The name of the attribute to insert.</param>
/// <returns>The appended attribute.</returns>
public HtmlAttribute Append(string name)
{
HtmlAttribute att = _ownernode._ownerdocument.CreateAttribute(name);
return Append(att);
}
/// <summary>
/// Creates and inserts a new attribute as the last attribute in the collection.
/// </summary>
/// <param name="name">The name of the attribute to insert.</param>
/// <param name="value">The value of the attribute to insert.</param>
/// <returns>The appended attribute.</returns>
public HtmlAttribute Append(string name, string value)
{
HtmlAttribute att = _ownernode._ownerdocument.CreateAttribute(name, value);
return Append(att);
}
/// <summary>
/// Checks for existance of attribute with given name
/// </summary>
/// <param name="name"></param>
/// <returns></returns>
public bool Contains(string name)
{
for (int i = 0; i < items.Count; i++)
{
if (items[i].Name.Equals(name.ToLower()))
return true;
}
return false;
}
/// <summary>
/// Inserts the specified attribute as the first node in the collection.
/// </summary>
/// <param name="newAttribute">The attribute to insert. May not be null.</param>
/// <returns>The prepended attribute.</returns>
public HtmlAttribute Prepend(HtmlAttribute newAttribute)
{
Insert(0, newAttribute);
return newAttribute;
}
/// <summary>
/// Removes a given attribute from the list.
/// </summary>
/// <param name="attribute">The attribute to remove. May not be null.</param>
public void Remove(HtmlAttribute attribute)
{
if (attribute == null)
{
throw new ArgumentNullException("attribute");
}
int index = GetAttributeIndex(attribute);
if (index == -1)
{
throw new IndexOutOfRangeException();
}
RemoveAt(index);
}
/// <summary>
/// Removes an attribute from the list, using its name. If there are more than one attributes with this name, they will all be removed.
/// </summary>
/// <param name="name">The attribute's name. May not be null.</param>
public void Remove(string name)
{
if (name == null)
{
throw new ArgumentNullException("name");
}
string lname = name.ToLower();
for (int i = 0; i < items.Count; i++)
{
HtmlAttribute att = items[i];
if (att.Name == lname)
{
RemoveAt(i);
}
}
}
/// <summary>
/// Remove all attributes in the list.
/// </summary>
public void RemoveAll()
{
Hashitems.Clear();
items.Clear();
_ownernode._innerchanged = true;
_ownernode._outerchanged = true;
}
#endregion
#region LINQ Methods
/// <summary>
/// Returns all attributes with specified name. Handles case insentivity
/// </summary>
/// <param name="attributeName">Name of the attribute</param>
/// <returns></returns>
public IEnumerable<HtmlAttribute> AttributesWithName(string attributeName)
{
attributeName = attributeName.ToLower();
for (int i = 0; i < items.Count; i++)
{
if (items[i].Name.Equals(attributeName))
yield return items[i];
}
}
/// <summary>
/// Removes all attributes from the collection
/// </summary>
public void Remove()
{
foreach (HtmlAttribute item in items)
item.Remove();
}
#endregion
#region Internal Methods
/// <summary>
/// Clears the attribute collection
/// </summary>
internal void Clear()
{
Hashitems.Clear();
items.Clear();
}
internal int GetAttributeIndex(HtmlAttribute attribute)
{
if (attribute == null)
{
throw new ArgumentNullException("attribute");
}
for (int i = 0; i < items.Count; i++)
{
if ((items[i]) == attribute)
return i;
}
return -1;
}
internal int GetAttributeIndex(string name)
{
if (name == null)
{
throw new ArgumentNullException("name");
}
string lname = name.ToLower();
for (int i = 0; i < items.Count; i++)
{
if ((items[i]).Name == lname)
return i;
}
return -1;
}
#endregion
}
}
+142
View File
@@ -0,0 +1,142 @@
// HtmlAgilityPack V1.0 - Simon Mourier <simon underscore mourier at hotmail dot com>
using System;
namespace HtmlAgilityPack
{
internal class HtmlCmdLine
{
#region Static Members
internal static bool Help;
#endregion
#region Constructors
static HtmlCmdLine()
{
Help = false;
ParseArgs();
}
#endregion
#region Internal Methods
internal static string GetOption(string name, string def)
{
string p = def;
string[] args = Environment.GetCommandLineArgs();
for (int i = 1; i < args.Length; i++)
{
GetStringArg(args[i], name, ref p);
}
return p;
}
internal static string GetOption(int index, string def)
{
string p = def;
string[] args = Environment.GetCommandLineArgs();
int j = 0;
for (int i = 1; i < args.Length; i++)
{
if (GetStringArg(args[i], ref p))
{
if (index == j)
return p;
else
p = def;
j++;
}
}
return p;
}
internal static bool GetOption(string name, bool def)
{
bool p = def;
string[] args = Environment.GetCommandLineArgs();
for (int i = 1; i < args.Length; i++)
{
GetBoolArg(args[i], name, ref p);
}
return p;
}
internal static int GetOption(string name, int def)
{
int p = def;
string[] args = Environment.GetCommandLineArgs();
for (int i = 1; i < args.Length; i++)
{
GetIntArg(args[i], name, ref p);
}
return p;
}
#endregion
#region Private Methods
private static void GetBoolArg(string Arg, string Name, ref bool ArgValue)
{
if (Arg.Length < (Name.Length + 1)) // -name is 1 more than name
return;
if (('/' != Arg[0]) && ('-' != Arg[0])) // not a param
return;
if (Arg.Substring(1, Name.Length).ToLower() == Name.ToLower())
ArgValue = true;
}
private static void GetIntArg(string Arg, string Name, ref int ArgValue)
{
if (Arg.Length < (Name.Length + 3)) // -name:12 is 3 more than name
return;
if (('/' != Arg[0]) && ('-' != Arg[0])) // not a param
return;
if (Arg.Substring(1, Name.Length).ToLower() == Name.ToLower())
{
try
{
ArgValue = Convert.ToInt32(Arg.Substring(Name.Length + 2, Arg.Length - Name.Length - 2));
}
catch
{
}
}
}
private static bool GetStringArg(string Arg, ref string ArgValue)
{
if (('/' == Arg[0]) || ('-' == Arg[0]))
return false;
ArgValue = Arg;
return true;
}
private static void GetStringArg(string Arg, string Name, ref string ArgValue)
{
if (Arg.Length < (Name.Length + 3)) // -name:x is 3 more than name
return;
if (('/' != Arg[0]) && ('-' != Arg[0])) // not a param
return;
if (Arg.Substring(1, Name.Length).ToLower() == Name.ToLower())
ArgValue = Arg.Substring(Name.Length + 2, Arg.Length - Name.Length - 2);
}
private static void ParseArgs()
{
string[] args = Environment.GetCommandLineArgs();
for (int i = 1; i < args.Length; i++)
{
// help
GetBoolArg(args[i], "?", ref Help);
GetBoolArg(args[i], "h", ref Help);
GetBoolArg(args[i], "help", ref Help);
}
}
#endregion
}
}
+76
View File
@@ -0,0 +1,76 @@
// HtmlAgilityPack V1.0 - Simon Mourier <simon underscore mourier at hotmail dot com>
namespace HtmlAgilityPack
{
/// <summary>
/// Represents an HTML comment.
/// </summary>
public class HtmlCommentNode : HtmlNode
{
#region Fields
private string _comment;
#endregion
#region Constructors
internal HtmlCommentNode(HtmlDocument ownerdocument, int index)
:
base(HtmlNodeType.Comment, ownerdocument, index)
{
}
#endregion
#region Properties
/// <summary>
/// Gets or Sets the comment text of the node.
/// </summary>
public string Comment
{
get
{
if (_comment == null)
{
return base.InnerHtml;
}
return _comment;
}
set { _comment = value; }
}
/// <summary>
/// Gets or Sets the HTML between the start and end tags of the object. In the case of a text node, it is equals to OuterHtml.
/// </summary>
public override string InnerHtml
{
get
{
if (_comment == null)
{
return base.InnerHtml;
}
return _comment;
}
set { _comment = value; }
}
/// <summary>
/// Gets or Sets the object and its content in HTML.
/// </summary>
public override string OuterHtml
{
get
{
if (_comment == null)
{
return base.OuterHtml;
}
return "<!--" + _comment + "-->";
}
}
#endregion
}
}
@@ -0,0 +1,33 @@
// HtmlAgilityPack V1.0 - Simon Mourier <simon underscore mourier at hotmail dot com>
using System;
using System.Diagnostics;
namespace HtmlAgilityPack
{
internal class HtmlConsoleListener : TraceListener
{
#region Public Methods
public override void Write(string Message)
{
Write(Message, "");
}
public override void Write(string Message, string Category)
{
Console.Write("T:" + Category + ": " + Message);
}
public override void WriteLine(string Message)
{
Write(Message + "\n");
}
public override void WriteLine(string Message, string Category)
{
Write(Message + "\n", Category);
}
#endregion
}
}
File diff suppressed because it is too large. Load diff
+32
View File
@@ -0,0 +1,32 @@
// HtmlAgilityPack V1.0 - Simon Mourier <simon underscore mourier at hotmail dot com>
using System;
namespace HtmlAgilityPack
{
/// <summary>
/// Flags that describe the behavior of an Element node.
/// </summary>
[Flags]
public enum HtmlElementFlag
{
/// <summary>
/// The node is a CDATA node.
/// </summary>
CData = 1,
/// <summary>
/// The node is empty. META or IMG are example of such nodes.
/// </summary>
Empty = 2,
/// <summary>
/// The node will automatically be closed during parsing.
/// </summary>
Closed = 4,
/// <summary>
/// The node can overlap.
/// </summary>
CanOverlap = 8
}
}
+826
View File
@@ -0,0 +1,826 @@
// HtmlAgilityPack V1.0 - Simon Mourier <simon underscore mourier at hotmail dot com>
using System;
using System.Collections;
using System.Text;
namespace HtmlAgilityPack
{
/// <summary>
/// A utility class to replace special characters by entities and vice-versa.
/// Follows HTML 4.0 specification found at http://www.w3.org/TR/html4/sgml/entities.html
/// </summary>
public class HtmlEntity
{
#region Static Members
private static readonly int _maxEntitySize;
private static Hashtable _entityName;
private static Hashtable _entityValue;
/// <summary>
/// A collection of entities indexed by name.
/// </summary>
public static Hashtable EntityName
{
get { return _entityName; }
}
/// <summary>
/// A collection of entities indexed by value.
/// </summary>
public static Hashtable EntityValue
{
get { return _entityValue; }
}
#endregion
#region Constructors
static HtmlEntity()
{
_entityName = new Hashtable();
_entityValue = new Hashtable();
#region Entities Definition
_entityValue.Add("nbsp", 160); // no-break space = non-breaking space, U+00A0 ISOnum
_entityName.Add(160, "nbsp");
_entityValue.Add("iexcl", 161); // inverted exclamation mark, U+00A1 ISOnum
_entityName.Add(161, "iexcl");
_entityValue.Add("cent", 162); // cent sign, U+00A2 ISOnum
_entityName.Add(162, "cent");
_entityValue.Add("pound", 163); // pound sign, U+00A3 ISOnum
_entityName.Add(163, "pound");
_entityValue.Add("curren", 164); // currency sign, U+00A4 ISOnum
_entityName.Add(164, "curren");
_entityValue.Add("yen", 165); // yen sign = yuan sign, U+00A5 ISOnum
_entityName.Add(165, "yen");
_entityValue.Add("brvbar", 166); // broken bar = broken vertical bar, U+00A6 ISOnum
_entityName.Add(166, "brvbar");
_entityValue.Add("sect", 167); // section sign, U+00A7 ISOnum
_entityName.Add(167, "sect");
_entityValue.Add("uml", 168); // diaeresis = spacing diaeresis, U+00A8 ISOdia
_entityName.Add(168, "uml");
_entityValue.Add("copy", 169); // copyright sign, U+00A9 ISOnum
_entityName.Add(169, "copy");
_entityValue.Add("ordf", 170); // feminine ordinal indicator, U+00AA ISOnum
_entityName.Add(170, "ordf");
_entityValue.Add("laquo", 171);
// left-pointing double angle quotation mark = left pointing guillemet, U+00AB ISOnum
_entityName.Add(171, "laquo");
_entityValue.Add("not", 172); // not sign, U+00AC ISOnum
_entityName.Add(172, "not");
_entityValue.Add("shy", 173); // soft hyphen = discretionary hyphen, U+00AD ISOnum
_entityName.Add(173, "shy");
_entityValue.Add("reg", 174); // registered sign = registered trade mark sign, U+00AE ISOnum
_entityName.Add(174, "reg");
_entityValue.Add("macr", 175); // macron = spacing macron = overline = APL overbar, U+00AF ISOdia
_entityName.Add(175, "macr");
_entityValue.Add("deg", 176); // degree sign, U+00B0 ISOnum
_entityName.Add(176, "deg");
_entityValue.Add("plusmn", 177); // plus-minus sign = plus-or-minus sign, U+00B1 ISOnum
_entityName.Add(177, "plusmn");
_entityValue.Add("sup2", 178); // superscript two = superscript digit two = squared, U+00B2 ISOnum
_entityName.Add(178, "sup2");
_entityValue.Add("sup3", 179); // superscript three = superscript digit three = cubed, U+00B3 ISOnum
_entityName.Add(179, "sup3");
_entityValue.Add("acute", 180); // acute accent = spacing acute, U+00B4 ISOdia
_entityName.Add(180, "acute");
_entityValue.Add("micro", 181); // micro sign, U+00B5 ISOnum
_entityName.Add(181, "micro");
_entityValue.Add("para", 182); // pilcrow sign = paragraph sign, U+00B6 ISOnum
_entityName.Add(182, "para");
_entityValue.Add("middot", 183); // middle dot = Georgian comma = Greek middle dot, U+00B7 ISOnum
_entityName.Add(183, "middot");
_entityValue.Add("cedil", 184); // cedilla = spacing cedilla, U+00B8 ISOdia
_entityName.Add(184, "cedil");
_entityValue.Add("sup1", 185); // superscript one = superscript digit one, U+00B9 ISOnum
_entityName.Add(185, "sup1");
_entityValue.Add("ordm", 186); // masculine ordinal indicator, U+00BA ISOnum
_entityName.Add(186, "ordm");
_entityValue.Add("raquo", 187);
// right-pointing double angle quotation mark = right pointing guillemet, U+00BB ISOnum
_entityName.Add(187, "raquo");
_entityValue.Add("frac14", 188); // vulgar fraction one quarter = fraction one quarter, U+00BC ISOnum
_entityName.Add(188, "frac14");
_entityValue.Add("frac12", 189); // vulgar fraction one half = fraction one half, U+00BD ISOnum
_entityName.Add(189, "frac12");
_entityValue.Add("frac34", 190); // vulgar fraction three quarters = fraction three quarters, U+00BE ISOnum
_entityName.Add(190, "frac34");
_entityValue.Add("iquest", 191); // inverted question mark = turned question mark, U+00BF ISOnum
_entityName.Add(191, "iquest");
_entityValue.Add("Agrave", 192);
// latin capital letter A with grave = latin capital letter A grave, U+00C0 ISOlat1
_entityName.Add(192, "Agrave");
_entityValue.Add("Aacute", 193); // latin capital letter A with acute, U+00C1 ISOlat1
_entityName.Add(193, "Aacute");
_entityValue.Add("Acirc", 194); // latin capital letter A with circumflex, U+00C2 ISOlat1
_entityName.Add(194, "Acirc");
_entityValue.Add("Atilde", 195); // latin capital letter A with tilde, U+00C3 ISOlat1
_entityName.Add(195, "Atilde");
_entityValue.Add("Auml", 196); // latin capital letter A with diaeresis, U+00C4 ISOlat1
_entityName.Add(196, "Auml");
_entityValue.Add("Aring", 197);
// latin capital letter A with ring above = latin capital letter A ring, U+00C5 ISOlat1
_entityName.Add(197, "Aring");
_entityValue.Add("AElig", 198); // latin capital letter AE = latin capital ligature AE, U+00C6 ISOlat1
_entityName.Add(198, "AElig");
_entityValue.Add("Ccedil", 199); // latin capital letter C with cedilla, U+00C7 ISOlat1
_entityName.Add(199, "Ccedil");
_entityValue.Add("Egrave", 200); // latin capital letter E with grave, U+00C8 ISOlat1
_entityName.Add(200, "Egrave");
_entityValue.Add("Eacute", 201); // latin capital letter E with acute, U+00C9 ISOlat1
_entityName.Add(201, "Eacute");
_entityValue.Add("Ecirc", 202); // latin capital letter E with circumflex, U+00CA ISOlat1
_entityName.Add(202, "Ecirc");
_entityValue.Add("Euml", 203); // latin capital letter E with diaeresis, U+00CB ISOlat1
_entityName.Add(203, "Euml");
_entityValue.Add("Igrave", 204); // latin capital letter I with grave, U+00CC ISOlat1
_entityName.Add(204, "Igrave");
_entityValue.Add("Iacute", 205); // latin capital letter I with acute, U+00CD ISOlat1
_entityName.Add(205, "Iacute");
_entityValue.Add("Icirc", 206); // latin capital letter I with circumflex, U+00CE ISOlat1
_entityName.Add(206, "Icirc");
_entityValue.Add("Iuml", 207); // latin capital letter I with diaeresis, U+00CF ISOlat1
_entityName.Add(207, "Iuml");
_entityValue.Add("ETH", 208); // latin capital letter ETH, U+00D0 ISOlat1
_entityName.Add(208, "ETH");
_entityValue.Add("Ntilde", 209); // latin capital letter N with tilde, U+00D1 ISOlat1
_entityName.Add(209, "Ntilde");
_entityValue.Add("Ograve", 210); // latin capital letter O with grave, U+00D2 ISOlat1
_entityName.Add(210, "Ograve");
_entityValue.Add("Oacute", 211); // latin capital letter O with acute, U+00D3 ISOlat1
_entityName.Add(211, "Oacute");
_entityValue.Add("Ocirc", 212); // latin capital letter O with circumflex, U+00D4 ISOlat1
_entityName.Add(212, "Ocirc");
_entityValue.Add("Otilde", 213); // latin capital letter O with tilde, U+00D5 ISOlat1
_entityName.Add(213, "Otilde");
_entityValue.Add("Ouml", 214); // latin capital letter O with diaeresis, U+00D6 ISOlat1
_entityName.Add(214, "Ouml");
_entityValue.Add("times", 215); // multiplication sign, U+00D7 ISOnum
_entityName.Add(215, "times");
_entityValue.Add("Oslash", 216);
// latin capital letter O with stroke = latin capital letter O slash, U+00D8 ISOlat1
_entityName.Add(216, "Oslash");
_entityValue.Add("Ugrave", 217); // latin capital letter U with grave, U+00D9 ISOlat1
_entityName.Add(217, "Ugrave");
_entityValue.Add("Uacute", 218); // latin capital letter U with acute, U+00DA ISOlat1
_entityName.Add(218, "Uacute");
_entityValue.Add("Ucirc", 219); // latin capital letter U with circumflex, U+00DB ISOlat1
_entityName.Add(219, "Ucirc");
_entityValue.Add("Uuml", 220); // latin capital letter U with diaeresis, U+00DC ISOlat1
_entityName.Add(220, "Uuml");
_entityValue.Add("Yacute", 221); // latin capital letter Y with acute, U+00DD ISOlat1
_entityName.Add(221, "Yacute");
_entityValue.Add("THORN", 222); // latin capital letter THORN, U+00DE ISOlat1
_entityName.Add(222, "THORN");
_entityValue.Add("szlig", 223); // latin small letter sharp s = ess-zed, U+00DF ISOlat1
_entityName.Add(223, "szlig");
_entityValue.Add("agrave", 224);
// latin small letter a with grave = latin small letter a grave, U+00E0 ISOlat1
_entityName.Add(224, "agrave");
_entityValue.Add("aacute", 225); // latin small letter a with acute, U+00E1 ISOlat1
_entityName.Add(225, "aacute");
_entityValue.Add("acirc", 226); // latin small letter a with circumflex, U+00E2 ISOlat1
_entityName.Add(226, "acirc");
_entityValue.Add("atilde", 227); // latin small letter a with tilde, U+00E3 ISOlat1
_entityName.Add(227, "atilde");
_entityValue.Add("auml", 228); // latin small letter a with diaeresis, U+00E4 ISOlat1
_entityName.Add(228, "auml");
_entityValue.Add("aring", 229);
// latin small letter a with ring above = latin small letter a ring, U+00E5 ISOlat1
_entityName.Add(229, "aring");
_entityValue.Add("aelig", 230); // latin small letter ae = latin small ligature ae, U+00E6 ISOlat1
_entityName.Add(230, "aelig");
_entityValue.Add("ccedil", 231); // latin small letter c with cedilla, U+00E7 ISOlat1
_entityName.Add(231, "ccedil");
_entityValue.Add("egrave", 232); // latin small letter e with grave, U+00E8 ISOlat1
_entityName.Add(232, "egrave");
_entityValue.Add("eacute", 233); // latin small letter e with acute, U+00E9 ISOlat1
_entityName.Add(233, "eacute");
_entityValue.Add("ecirc", 234); // latin small letter e with circumflex, U+00EA ISOlat1
_entityName.Add(234, "ecirc");
_entityValue.Add("euml", 235); // latin small letter e with diaeresis, U+00EB ISOlat1
_entityName.Add(235, "euml");
_entityValue.Add("igrave", 236); // latin small letter i with grave, U+00EC ISOlat1
_entityName.Add(236, "igrave");
_entityValue.Add("iacute", 237); // latin small letter i with acute, U+00ED ISOlat1
_entityName.Add(237, "iacute");
_entityValue.Add("icirc", 238); // latin small letter i with circumflex, U+00EE ISOlat1
_entityName.Add(238, "icirc");
_entityValue.Add("iuml", 239); // latin small letter i with diaeresis, U+00EF ISOlat1
_entityName.Add(239, "iuml");
_entityValue.Add("eth", 240); // latin small letter eth, U+00F0 ISOlat1
_entityName.Add(240, "eth");
_entityValue.Add("ntilde", 241); // latin small letter n with tilde, U+00F1 ISOlat1
_entityName.Add(241, "ntilde");
_entityValue.Add("ograve", 242); // latin small letter o with grave, U+00F2 ISOlat1
_entityName.Add(242, "ograve");
_entityValue.Add("oacute", 243); // latin small letter o with acute, U+00F3 ISOlat1
_entityName.Add(243, "oacute");
_entityValue.Add("ocirc", 244); // latin small letter o with circumflex, U+00F4 ISOlat1
_entityName.Add(244, "ocirc");
_entityValue.Add("otilde", 245); // latin small letter o with tilde, U+00F5 ISOlat1
_entityName.Add(245, "otilde");
_entityValue.Add("ouml", 246); // latin small letter o with diaeresis, U+00F6 ISOlat1
_entityName.Add(246, "ouml");
_entityValue.Add("divide", 247); // division sign, U+00F7 ISOnum
_entityName.Add(247, "divide");
_entityValue.Add("oslash", 248);
// latin small letter o with stroke, = latin small letter o slash, U+00F8 ISOlat1
_entityName.Add(248, "oslash");
_entityValue.Add("ugrave", 249); // latin small letter u with grave, U+00F9 ISOlat1
_entityName.Add(249, "ugrave");
_entityValue.Add("uacute", 250); // latin small letter u with acute, U+00FA ISOlat1
_entityName.Add(250, "uacute");
_entityValue.Add("ucirc", 251); // latin small letter u with circumflex, U+00FB ISOlat1
_entityName.Add(251, "ucirc");
_entityValue.Add("uuml", 252); // latin small letter u with diaeresis, U+00FC ISOlat1
_entityName.Add(252, "uuml");
_entityValue.Add("yacute", 253); // latin small letter y with acute, U+00FD ISOlat1
_entityName.Add(253, "yacute");
_entityValue.Add("thorn", 254); // latin small letter thorn, U+00FE ISOlat1
_entityName.Add(254, "thorn");
_entityValue.Add("yuml", 255); // latin small letter y with diaeresis, U+00FF ISOlat1
_entityName.Add(255, "yuml");
_entityValue.Add("fnof", 402); // latin small f with hook = function = florin, U+0192 ISOtech
_entityName.Add(402, "fnof");
_entityValue.Add("Alpha", 913); // greek capital letter alpha, U+0391
_entityName.Add(913, "Alpha");
_entityValue.Add("Beta", 914); // greek capital letter beta, U+0392
_entityName.Add(914, "Beta");
_entityValue.Add("Gamma", 915); // greek capital letter gamma, U+0393 ISOgrk3
_entityName.Add(915, "Gamma");
_entityValue.Add("Delta", 916); // greek capital letter delta, U+0394 ISOgrk3
_entityName.Add(916, "Delta");
_entityValue.Add("Epsilon", 917); // greek capital letter epsilon, U+0395
_entityName.Add(917, "Epsilon");
_entityValue.Add("Zeta", 918); // greek capital letter zeta, U+0396
_entityName.Add(918, "Zeta");
_entityValue.Add("Eta", 919); // greek capital letter eta, U+0397
_entityName.Add(919, "Eta");
_entityValue.Add("Theta", 920); // greek capital letter theta, U+0398 ISOgrk3
_entityName.Add(920, "Theta");
_entityValue.Add("Iota", 921); // greek capital letter iota, U+0399
_entityName.Add(921, "Iota");
_entityValue.Add("Kappa", 922); // greek capital letter kappa, U+039A
_entityName.Add(922, "Kappa");
_entityValue.Add("Lambda", 923); // greek capital letter lambda, U+039B ISOgrk3
_entityName.Add(923, "Lambda");
_entityValue.Add("Mu", 924); // greek capital letter mu, U+039C
_entityName.Add(924, "Mu");
_entityValue.Add("Nu", 925); // greek capital letter nu, U+039D
_entityName.Add(925, "Nu");
_entityValue.Add("Xi", 926); // greek capital letter xi, U+039E ISOgrk3
_entityName.Add(926, "Xi");
_entityValue.Add("Omicron", 927); // greek capital letter omicron, U+039F
_entityName.Add(927, "Omicron");
_entityValue.Add("Pi", 928); // greek capital letter pi, U+03A0 ISOgrk3
_entityName.Add(928, "Pi");
_entityValue.Add("Rho", 929); // greek capital letter rho, U+03A1
_entityName.Add(929, "Rho");
_entityValue.Add("Sigma", 931); // greek capital letter sigma, U+03A3 ISOgrk3
_entityName.Add(931, "Sigma");
_entityValue.Add("Tau", 932); // greek capital letter tau, U+03A4
_entityName.Add(932, "Tau");
_entityValue.Add("Upsilon", 933); // greek capital letter upsilon, U+03A5 ISOgrk3
_entityName.Add(933, "Upsilon");
_entityValue.Add("Phi", 934); // greek capital letter phi, U+03A6 ISOgrk3
_entityName.Add(934, "Phi");
_entityValue.Add("Chi", 935); // greek capital letter chi, U+03A7
_entityName.Add(935, "Chi");
_entityValue.Add("Psi", 936); // greek capital letter psi, U+03A8 ISOgrk3
_entityName.Add(936, "Psi");
_entityValue.Add("Omega", 937); // greek capital letter omega, U+03A9 ISOgrk3
_entityName.Add(937, "Omega");
_entityValue.Add("alpha", 945); // greek small letter alpha, U+03B1 ISOgrk3
_entityName.Add(945, "alpha");
_entityValue.Add("beta", 946); // greek small letter beta, U+03B2 ISOgrk3
_entityName.Add(946, "beta");
_entityValue.Add("gamma", 947); // greek small letter gamma, U+03B3 ISOgrk3
_entityName.Add(947, "gamma");
_entityValue.Add("delta", 948); // greek small letter delta, U+03B4 ISOgrk3
_entityName.Add(948, "delta");
_entityValue.Add("epsilon", 949); // greek small letter epsilon, U+03B5 ISOgrk3
_entityName.Add(949, "epsilon");
_entityValue.Add("zeta", 950); // greek small letter zeta, U+03B6 ISOgrk3
_entityName.Add(950, "zeta");
_entityValue.Add("eta", 951); // greek small letter eta, U+03B7 ISOgrk3
_entityName.Add(951, "eta");
_entityValue.Add("theta", 952); // greek small letter theta, U+03B8 ISOgrk3
_entityName.Add(952, "theta");
_entityValue.Add("iota", 953); // greek small letter iota, U+03B9 ISOgrk3
_entityName.Add(953, "iota");
_entityValue.Add("kappa", 954); // greek small letter kappa, U+03BA ISOgrk3
_entityName.Add(954, "kappa");
_entityValue.Add("lambda", 955); // greek small letter lambda, U+03BB ISOgrk3
_entityName.Add(955, "lambda");
_entityValue.Add("mu", 956); // greek small letter mu, U+03BC ISOgrk3
_entityName.Add(956, "mu");
_entityValue.Add("nu", 957); // greek small letter nu, U+03BD ISOgrk3
_entityName.Add(957, "nu");
_entityValue.Add("xi", 958); // greek small letter xi, U+03BE ISOgrk3
_entityName.Add(958, "xi");
_entityValue.Add("omicron", 959); // greek small letter omicron, U+03BF NEW
_entityName.Add(959, "omicron");
_entityValue.Add("pi", 960); // greek small letter pi, U+03C0 ISOgrk3
_entityName.Add(960, "pi");
_entityValue.Add("rho", 961); // greek small letter rho, U+03C1 ISOgrk3
_entityName.Add(961, "rho");
_entityValue.Add("sigmaf", 962); // greek small letter final sigma, U+03C2 ISOgrk3
_entityName.Add(962, "sigmaf");
_entityValue.Add("sigma", 963); // greek small letter sigma, U+03C3 ISOgrk3
_entityName.Add(963, "sigma");
_entityValue.Add("tau", 964); // greek small letter tau, U+03C4 ISOgrk3
_entityName.Add(964, "tau");
_entityValue.Add("upsilon", 965); // greek small letter upsilon, U+03C5 ISOgrk3
_entityName.Add(965, "upsilon");
_entityValue.Add("phi", 966); // greek small letter phi, U+03C6 ISOgrk3
_entityName.Add(966, "phi");
_entityValue.Add("chi", 967); // greek small letter chi, U+03C7 ISOgrk3
_entityName.Add(967, "chi");
_entityValue.Add("psi", 968); // greek small letter psi, U+03C8 ISOgrk3
_entityName.Add(968, "psi");
_entityValue.Add("omega", 969); // greek small letter omega, U+03C9 ISOgrk3
_entityName.Add(969, "omega");
_entityValue.Add("thetasym", 977); // greek small letter theta symbol, U+03D1 NEW
_entityName.Add(977, "thetasym");
_entityValue.Add("upsih", 978); // greek upsilon with hook symbol, U+03D2 NEW
_entityName.Add(978, "upsih");
_entityValue.Add("piv", 982); // greek pi symbol, U+03D6 ISOgrk3
_entityName.Add(982, "piv");
_entityValue.Add("bull", 8226); // bullet = black small circle, U+2022 ISOpub
_entityName.Add(8226, "bull");
_entityValue.Add("hellip", 8230); // horizontal ellipsis = three dot leader, U+2026 ISOpub
_entityName.Add(8230, "hellip");
_entityValue.Add("prime", 8242); // prime = minutes = feet, U+2032 ISOtech
_entityName.Add(8242, "prime");
_entityValue.Add("Prime", 8243); // double prime = seconds = inches, U+2033 ISOtech
_entityName.Add(8243, "Prime");
_entityValue.Add("oline", 8254); // overline = spacing overscore, U+203E NEW
_entityName.Add(8254, "oline");
_entityValue.Add("frasl", 8260); // fraction slash, U+2044 NEW
_entityName.Add(8260, "frasl");
_entityValue.Add("weierp", 8472); // script capital P = power set = Weierstrass p, U+2118 ISOamso
_entityName.Add(8472, "weierp");
_entityValue.Add("image", 8465); // blackletter capital I = imaginary part, U+2111 ISOamso
_entityName.Add(8465, "image");
_entityValue.Add("real", 8476); // blackletter capital R = real part symbol, U+211C ISOamso
_entityName.Add(8476, "real");
_entityValue.Add("trade", 8482); // trade mark sign, U+2122 ISOnum
_entityName.Add(8482, "trade");
_entityValue.Add("alefsym", 8501); // alef symbol = first transfinite cardinal, U+2135 NEW
_entityName.Add(8501, "alefsym");
_entityValue.Add("larr", 8592); // leftwards arrow, U+2190 ISOnum
_entityName.Add(8592, "larr");
_entityValue.Add("uarr", 8593); // upwards arrow, U+2191 ISOnum
_entityName.Add(8593, "uarr");
_entityValue.Add("rarr", 8594); // rightwards arrow, U+2192 ISOnum
_entityName.Add(8594, "rarr");
_entityValue.Add("darr", 8595); // downwards arrow, U+2193 ISOnum
_entityName.Add(8595, "darr");
_entityValue.Add("harr", 8596); // left right arrow, U+2194 ISOamsa
_entityName.Add(8596, "harr");
_entityValue.Add("crarr", 8629); // downwards arrow with corner leftwards = carriage return, U+21B5 NEW
_entityName.Add(8629, "crarr");
_entityValue.Add("lArr", 8656); // leftwards double arrow, U+21D0 ISOtech
_entityName.Add(8656, "lArr");
_entityValue.Add("uArr", 8657); // upwards double arrow, U+21D1 ISOamsa
_entityName.Add(8657, "uArr");
_entityValue.Add("rArr", 8658); // rightwards double arrow, U+21D2 ISOtech
_entityName.Add(8658, "rArr");
_entityValue.Add("dArr", 8659); // downwards double arrow, U+21D3 ISOamsa
_entityName.Add(8659, "dArr");
_entityValue.Add("hArr", 8660); // left right double arrow, U+21D4 ISOamsa
_entityName.Add(8660, "hArr");
_entityValue.Add("forall", 8704); // for all, U+2200 ISOtech
_entityName.Add(8704, "forall");
_entityValue.Add("part", 8706); // partial differential, U+2202 ISOtech
_entityName.Add(8706, "part");
_entityValue.Add("exist", 8707); // there exists, U+2203 ISOtech
_entityName.Add(8707, "exist");
_entityValue.Add("empty", 8709); // empty set = null set = diameter, U+2205 ISOamso
_entityName.Add(8709, "empty");
_entityValue.Add("nabla", 8711); // nabla = backward difference, U+2207 ISOtech
_entityName.Add(8711, "nabla");
_entityValue.Add("isin", 8712); // element of, U+2208 ISOtech
_entityName.Add(8712, "isin");
_entityValue.Add("notin", 8713); // not an element of, U+2209 ISOtech
_entityName.Add(8713, "notin");
_entityValue.Add("ni", 8715); // contains as member, U+220B ISOtech
_entityName.Add(8715, "ni");
_entityValue.Add("prod", 8719); // n-ary product = product sign, U+220F ISOamsb
_entityName.Add(8719, "prod");
_entityValue.Add("sum", 8721); // n-ary sumation, U+2211 ISOamsb
_entityName.Add(8721, "sum");
_entityValue.Add("minus", 8722); // minus sign, U+2212 ISOtech
_entityName.Add(8722, "minus");
_entityValue.Add("lowast", 8727); // asterisk operator, U+2217 ISOtech
_entityName.Add(8727, "lowast");
_entityValue.Add("radic", 8730); // square root = radical sign, U+221A ISOtech
_entityName.Add(8730, "radic");
_entityValue.Add("prop", 8733); // proportional to, U+221D ISOtech
_entityName.Add(8733, "prop");
_entityValue.Add("infin", 8734); // infinity, U+221E ISOtech
_entityName.Add(8734, "infin");
_entityValue.Add("ang", 8736); // angle, U+2220 ISOamso
_entityName.Add(8736, "ang");
_entityValue.Add("and", 8743); // logical and = wedge, U+2227 ISOtech
_entityName.Add(8743, "and");
_entityValue.Add("or", 8744); // logical or = vee, U+2228 ISOtech
_entityName.Add(8744, "or");
_entityValue.Add("cap", 8745); // intersection = cap, U+2229 ISOtech
_entityName.Add(8745, "cap");
_entityValue.Add("cup", 8746); // union = cup, U+222A ISOtech
_entityName.Add(8746, "cup");
_entityValue.Add("int", 8747); // integral, U+222B ISOtech
_entityName.Add(8747, "int");
_entityValue.Add("there4", 8756); // therefore, U+2234 ISOtech
_entityName.Add(8756, "there4");
_entityValue.Add("sim", 8764); // tilde operator = varies with = similar to, U+223C ISOtech
_entityName.Add(8764, "sim");
_entityValue.Add("cong", 8773); // approximately equal to, U+2245 ISOtech
_entityName.Add(8773, "cong");
_entityValue.Add("asymp", 8776); // almost equal to = asymptotic to, U+2248 ISOamsr
_entityName.Add(8776, "asymp");
_entityValue.Add("ne", 8800); // not equal to, U+2260 ISOtech
_entityName.Add(8800, "ne");
_entityValue.Add("equiv", 8801); // identical to, U+2261 ISOtech
_entityName.Add(8801, "equiv");
_entityValue.Add("le", 8804); // less-than or equal to, U+2264 ISOtech
_entityName.Add(8804, "le");
_entityValue.Add("ge", 8805); // greater-than or equal to, U+2265 ISOtech
_entityName.Add(8805, "ge");
_entityValue.Add("sub", 8834); // subset of, U+2282 ISOtech
_entityName.Add(8834, "sub");
_entityValue.Add("sup", 8835); // superset of, U+2283 ISOtech
_entityName.Add(8835, "sup");
_entityValue.Add("nsub", 8836); // not a subset of, U+2284 ISOamsn
_entityName.Add(8836, "nsub");
_entityValue.Add("sube", 8838); // subset of or equal to, U+2286 ISOtech
_entityName.Add(8838, "sube");
_entityValue.Add("supe", 8839); // superset of or equal to, U+2287 ISOtech
_entityName.Add(8839, "supe");
_entityValue.Add("oplus", 8853); // circled plus = direct sum, U+2295 ISOamsb
_entityName.Add(8853, "oplus");
_entityValue.Add("otimes", 8855); // circled times = vector product, U+2297 ISOamsb
_entityName.Add(8855, "otimes");
_entityValue.Add("perp", 8869); // up tack = orthogonal to = perpendicular, U+22A5 ISOtech
_entityName.Add(8869, "perp");
_entityValue.Add("sdot", 8901); // dot operator, U+22C5 ISOamsb
_entityName.Add(8901, "sdot");
_entityValue.Add("lceil", 8968); // left ceiling = apl upstile, U+2308 ISOamsc
_entityName.Add(8968, "lceil");
_entityValue.Add("rceil", 8969); // right ceiling, U+2309 ISOamsc
_entityName.Add(8969, "rceil");
_entityValue.Add("lfloor", 8970); // left floor = apl downstile, U+230A ISOamsc
_entityName.Add(8970, "lfloor");
_entityValue.Add("rfloor", 8971); // right floor, U+230B ISOamsc
_entityName.Add(8971, "rfloor");
_entityValue.Add("lang", 9001); // left-pointing angle bracket = bra, U+2329 ISOtech
_entityName.Add(9001, "lang");
_entityValue.Add("rang", 9002); // right-pointing angle bracket = ket, U+232A ISOtech
_entityName.Add(9002, "rang");
_entityValue.Add("loz", 9674); // lozenge, U+25CA ISOpub
_entityName.Add(9674, "loz");
_entityValue.Add("spades", 9824); // black spade suit, U+2660 ISOpub
_entityName.Add(9824, "spades");
_entityValue.Add("clubs", 9827); // black club suit = shamrock, U+2663 ISOpub
_entityName.Add(9827, "clubs");
_entityValue.Add("hearts", 9829); // black heart suit = valentine, U+2665 ISOpub
_entityName.Add(9829, "hearts");
_entityValue.Add("diams", 9830); // black diamond suit, U+2666 ISOpub
_entityName.Add(9830, "diams");
_entityValue.Add("quot", 34); // quotation mark = APL quote, U+0022 ISOnum
_entityName.Add(34, "quot");
_entityValue.Add("amp", 38); // ampersand, U+0026 ISOnum
_entityName.Add(38, "amp");
_entityValue.Add("lt", 60); // less-than sign, U+003C ISOnum
_entityName.Add(60, "lt");
_entityValue.Add("gt", 62); // greater-than sign, U+003E ISOnum
_entityName.Add(62, "gt");
_entityValue.Add("OElig", 338); // latin capital ligature OE, U+0152 ISOlat2
_entityName.Add(338, "OElig");
_entityValue.Add("oelig", 339); // latin small ligature oe, U+0153 ISOlat2
_entityName.Add(339, "oelig");
_entityValue.Add("Scaron", 352); // latin capital letter S with caron, U+0160 ISOlat2
_entityName.Add(352, "Scaron");
_entityValue.Add("scaron", 353); // latin small letter s with caron, U+0161 ISOlat2
_entityName.Add(353, "scaron");
_entityValue.Add("Yuml", 376); // latin capital letter Y with diaeresis, U+0178 ISOlat2
_entityName.Add(376, "Yuml");
_entityValue.Add("circ", 710); // modifier letter circumflex accent, U+02C6 ISOpub
_entityName.Add(710, "circ");
_entityValue.Add("tilde", 732); // small tilde, U+02DC ISOdia
_entityName.Add(732, "tilde");
_entityValue.Add("ensp", 8194); // en space, U+2002 ISOpub
_entityName.Add(8194, "ensp");
_entityValue.Add("emsp", 8195); // em space, U+2003 ISOpub
_entityName.Add(8195, "emsp");
_entityValue.Add("thinsp", 8201); // thin space, U+2009 ISOpub
_entityName.Add(8201, "thinsp");
_entityValue.Add("zwnj", 8204); // zero width non-joiner, U+200C NEW RFC 2070
_entityName.Add(8204, "zwnj");
_entityValue.Add("zwj", 8205); // zero width joiner, U+200D NEW RFC 2070
_entityName.Add(8205, "zwj");
_entityValue.Add("lrm", 8206); // left-to-right mark, U+200E NEW RFC 2070
_entityName.Add(8206, "lrm");
_entityValue.Add("rlm", 8207); // right-to-left mark, U+200F NEW RFC 2070
_entityName.Add(8207, "rlm");
_entityValue.Add("ndash", 8211); // en dash, U+2013 ISOpub
_entityName.Add(8211, "ndash");
_entityValue.Add("mdash", 8212); // em dash, U+2014 ISOpub
_entityName.Add(8212, "mdash");
_entityValue.Add("lsquo", 8216); // left single quotation mark, U+2018 ISOnum
_entityName.Add(8216, "lsquo");
_entityValue.Add("rsquo", 8217); // right single quotation mark, U+2019 ISOnum
_entityName.Add(8217, "rsquo");
_entityValue.Add("sbquo", 8218); // single low-9 quotation mark, U+201A NEW
_entityName.Add(8218, "sbquo");
_entityValue.Add("ldquo", 8220); // left double quotation mark, U+201C ISOnum
_entityName.Add(8220, "ldquo");
_entityValue.Add("rdquo", 8221); // right double quotation mark, U+201D ISOnum
_entityName.Add(8221, "rdquo");
_entityValue.Add("bdquo", 8222); // double low-9 quotation mark, U+201E NEW
_entityName.Add(8222, "bdquo");
_entityValue.Add("dagger", 8224); // dagger, U+2020 ISOpub
_entityName.Add(8224, "dagger");
_entityValue.Add("Dagger", 8225); // double dagger, U+2021 ISOpub
_entityName.Add(8225, "Dagger");
_entityValue.Add("permil", 8240); // per mille sign, U+2030 ISOtech
_entityName.Add(8240, "permil");
_entityValue.Add("lsaquo", 8249); // single left-pointing angle quotation mark, U+2039 ISO proposed
_entityName.Add(8249, "lsaquo");
_entityValue.Add("rsaquo", 8250); // single right-pointing angle quotation mark, U+203A ISO proposed
_entityName.Add(8250, "rsaquo");
_entityValue.Add("euro", 8364); // euro sign, U+20AC NEW
_entityName.Add(8364, "euro");
_maxEntitySize = 8 + 1; // we add the # char
#endregion
}
private HtmlEntity()
{
}
#endregion
#region Public Methods
/// <summary>
/// Replace known entities by characters.
/// </summary>
/// <param name="text">The source text.</param>
/// <returns>The result text.</returns>
public static string DeEntitize(string text)
{
if (text == null)
return null;
if (text.Length == 0)
return text;
StringBuilder sb = new StringBuilder(text.Length);
ParseState state = ParseState.Text;
StringBuilder entity = new StringBuilder(10);
for (int i = 0; i < text.Length; i++)
{
switch (state)
{
case ParseState.Text:
switch (text[i])
{
case '&':
state = ParseState.EntityStart;
break;
default:
sb.Append(text[i]);
break;
}
break;
case ParseState.EntityStart:
switch (text[i])
{
case ';':
if (entity.Length == 0)
{
sb.Append("&;");
}
else
{
if (entity[0] == '#')
{
string e = entity.ToString();
try
{
int code = Convert.ToInt32(e.Substring(1, e.Length - 1));
sb.Append(Convert.ToChar(code));
}
catch
{
sb.Append("&#" + e + ";");
}
}
else
{
// named entity?
int code;
object o = _entityValue[entity.ToString()];
if (o == null)
{
// nope
sb.Append("&" + entity + ";");
}
else
{
// we found one
code = (int) o;
sb.Append(Convert.ToChar(code));
}
}
entity.Remove(0, entity.Length);
}
state = ParseState.Text;
break;
case '&':
// new entity start without end, it was not an entity...
sb.Append("&" + entity);
entity.Remove(0, entity.Length);
break;
default:
entity.Append(text[i]);
if (entity.Length > _maxEntitySize)
{
// unknown stuff, just don't touch it
state = ParseState.Text;
sb.Append("&" + entity);
entity.Remove(0, entity.Length);
}
break;
}
break;
}
}
// finish the work
if (state == ParseState.EntityStart)
{
sb.Append("&" + entity);
}
return sb.ToString();
}
/// <summary>
/// Clone and entitize an HtmlNode. This will affect attribute values and nodes' text. It will also entitize all child nodes.
/// </summary>
/// <param name="node">The node to entitize.</param>
/// <returns>An entitized cloned node.</returns>
public static HtmlNode Entitize(HtmlNode node)
{
if (node == null)
{
throw new ArgumentNullException("node");
}
HtmlNode result = node.CloneNode(true);
if (result.HasAttributes)
Entitize(result.Attributes);
if (result.HasChildNodes)
{
Entitize(result.ChildNodes);
}
else
{
if (result.NodeType == HtmlNodeType.Text)
{
((HtmlTextNode) result).Text = Entitize(((HtmlTextNode) result).Text, true, true);
}
}
return result;
}
/// <summary>
/// Replace characters above 127 by entities.
/// </summary>
/// <param name="text">The source text.</param>
/// <returns>The result text.</returns>
public static string Entitize(string text)
{
return Entitize(text, true);
}
/// <summary>
/// Replace characters above 127 by entities.
/// </summary>
/// <param name="text">The source text.</param>
/// <param name="useNames">If set to false, the function will not use known entities name. Default is true.</param>
/// <returns>The result text.</returns>
public static string Entitize(string text, bool useNames)
{
return Entitize(text, useNames, false);
}
/// <summary>
/// Replace characters above 127 by entities.
/// </summary>
/// <param name="text">The source text.</param>
/// <param name="useNames">If set to false, the function will not use known entities name. Default is true.</param>
/// <param name="entitizeQuotAmpAndLtGt">If set to true, the [quote], [ampersand], [lower than] and [greather than] characters will be entitized.</param>
/// <returns>The result text</returns>
public static string Entitize(string text, bool useNames, bool entitizeQuotAmpAndLtGt)
// _entityValue.Add("quot", 34); // quotation mark = APL quote, U+0022 ISOnum
// _entityName.Add(34, "quot");
// _entityValue.Add("amp", 38); // ampersand, U+0026 ISOnum
// _entityName.Add(38, "amp");
// _entityValue.Add("lt", 60); // less-than sign, U+003C ISOnum
// _entityName.Add(60, "lt");
// _entityValue.Add("gt", 62); // greater-than sign, U+003E ISOnum
// _entityName.Add(62, "gt");
{
if (text == null)
return null;
if (text.Length == 0)
return text;
StringBuilder sb = new StringBuilder(text.Length);
for (int i = 0; i < text.Length; i++)
{
int code = text[i];
if ((code > 127) ||
(entitizeQuotAmpAndLtGt && ((code == 34) || (code == 38) || (code == 60) || (code == 62))))
{
string entity = _entityName[code] as string;
if ((entity == null) || (!useNames))
{
sb.Append("&#" + code + ";");
}
else
{
sb.Append("&" + entity + ";");
}
}
else
{
sb.Append(text[i]);
}
}
return sb.ToString();
}
#endregion
#region Private Methods
private static void Entitize(HtmlAttributeCollection collection)
{
foreach (HtmlAttribute at in collection)
{
at.Value = Entitize(at.Value);
}
}
private static void Entitize(HtmlNodeCollection collection)
{
foreach (HtmlNode node in collection)
{
if (node.HasAttributes)
Entitize(node.Attributes);
if (node.HasChildNodes)
{
Entitize(node.ChildNodes);
}
else
{
if (node.NodeType == HtmlNodeType.Text)
{
((HtmlTextNode) node).Text = Entitize(((HtmlTextNode) node).Text, true, true);
}
}
}
}
#endregion
#region Nested type: ParseState
private enum ParseState
{
Text,
EntityStart
}
#endregion
}
}
+52
View File
@@ -0,0 +1,52 @@
// HtmlAgilityPack V1.0 - Simon Mourier <simon underscore mourier at hotmail dot com>
using System.Xml;
namespace HtmlAgilityPack
{
internal class HtmlNameTable : XmlNameTable
{
#region Fields
private NameTable _nametable = new NameTable();
#endregion
#region Public Methods
public override string Add(string array)
{
return _nametable.Add(array);
}
public override string Add(char[] array, int offset, int length)
{
return _nametable.Add(array, offset, length);
}
public override string Get(string array)
{
return _nametable.Get(array);
}
public override string Get(char[] array, int offset, int length)
{
return _nametable.Get(array, offset, length);
}
#endregion
#region Internal Methods
internal string GetOrAdd(string array)
{
string s = Get(array);
if (s == null)
{
return Add(array);
}
return s;
}
#endregion
}
}
File diff suppressed because it is too large. Load diff
+512
View File
@@ -0,0 +1,512 @@
// HtmlAgilityPack V1.0 - Simon Mourier <simon underscore mourier at hotmail dot com>
using System;
using System.Collections;
using System.Collections.Generic;
namespace HtmlAgilityPack
{
/// <summary>
/// Represents a combined list and collection of HTML nodes.
/// </summary>
public class HtmlNodeCollection : IList<HtmlNode>
{
#region Fields
private readonly HtmlNode _parentnode;
private readonly List<HtmlNode> _items = new List<HtmlNode>();
#endregion
#region Constructors
/// <summary>
/// Initialize the HtmlNodeCollection with the base parent node
/// </summary>
/// <param name="parentnode">The base node of the collection</param>
public HtmlNodeCollection(HtmlNode parentnode)
{
_parentnode = parentnode; // may be null
}
#endregion
#region Properties
/// <summary>
/// Gets a given node from the list.
/// </summary>
public int this[HtmlNode node]
{
get
{
int index = GetNodeIndex(node);
if (index == -1)
{
throw new ArgumentOutOfRangeException("node",
"Node \"" + node.CloneNode(false).OuterHtml +
"\" was not found in the collection");
}
return index;
}
}
/// <summary>
/// Get node with tag name
/// </summary>
/// <param name="nodeName"></param>
/// <returns></returns>
public HtmlNode this[string nodeName]
{
get
{
nodeName = nodeName.ToLower();
for (int i = 0; i < _items.Count; i++)
if (_items[i].Equals(nodeName))
return _items[i];
return null;
}
}
#endregion
#region IList<HtmlNode> Members
/// <summary>
/// Gets the number of elements actually contained in the list.
/// </summary>
public int Count
{
get { return _items.Count; }
}
/// <summary>
/// Is collection read only
/// </summary>
public bool IsReadOnly
{
get { return false; }
}
/// <summary>
/// Gets the node at the specified index.
/// </summary>
public HtmlNode this[int index]
{
get { return _items[index]; }
set { _items[index] = value; }
}
/// <summary>
/// Add node to the collection
/// </summary>
/// <param name="node"></param>
public void Add(HtmlNode node)
{
_items.Add(node);
}
/// <summary>
/// Clears out the collection of HtmlNodes. Removes each nodes reference to parentnode, nextnode and prevnode
/// </summary>
public void Clear()
{
foreach (HtmlNode node in _items)
{
node.ParentNode = null;
node.NextSibling = null;
node.PreviousSibling = null;
}
_items.Clear();
}
/// <summary>
/// Gets existence of node in collection
/// </summary>
/// <param name="item"></param>
/// <returns></returns>
public bool Contains(HtmlNode item)
{
return _items.Contains(item);
}
/// <summary>
/// Copy collection to array
/// </summary>
/// <param name="array"></param>
/// <param name="arrayIndex"></param>
public void CopyTo(HtmlNode[] array, int arrayIndex)
{
_items.CopyTo(array, arrayIndex);
}
/// <summary>
/// Get Enumerator
/// </summary>
/// <returns></returns>
IEnumerator<HtmlNode> IEnumerable<HtmlNode>.GetEnumerator()
{
return _items.GetEnumerator();
}
/// <summary>
/// Get Explicit Enumerator
/// </summary>
/// <returns></returns>
IEnumerator IEnumerable.GetEnumerator()
{
return _items.GetEnumerator();
}
/// <summary>
/// Get index of node
/// </summary>
/// <param name="item"></param>
/// <returns></returns>
public int IndexOf(HtmlNode item)
{
return _items.IndexOf(item);
}
/// <summary>
/// Insert node at index
/// </summary>
/// <param name="index"></param>
/// <param name="node"></param>
public void Insert(int index, HtmlNode node)
{
HtmlNode next = null;
HtmlNode prev = null;
if (index > 0)
{
prev = _items[index - 1];
}
if (index < _items.Count)
{
next = _items[index];
}
_items.Insert(index, node);
if (prev != null)
{
if (node == prev)
{
throw new InvalidProgramException("Unexpected error.");
}
prev._nextnode = node;
}
if (next != null)
{
next._prevnode = node;
}
node._prevnode = prev;
if (next == node)
{
throw new InvalidProgramException("Unexpected error.");
}
node._nextnode = next;
node._parentnode = _parentnode;
}
/// <summary>
/// Remove node
/// </summary>
/// <param name="item"></param>
/// <returns></returns>
public bool Remove(HtmlNode item)
{
int i = _items.IndexOf(item);
RemoveAt(i);
return true;
}
/// <summary>
/// Remove <see cref="HtmlNode"/> at index
/// </summary>
/// <param name="index"></param>
public void RemoveAt(int index)
{
HtmlNode next = null;
HtmlNode prev = null;
HtmlNode oldnode = _items[index];
if (index > 0)
{
prev = _items[index - 1];
}
if (index < (_items.Count - 1))
{
next = _items[index + 1];
}
_items.RemoveAt(index);
if (prev != null)
{
if (next == prev)
{
throw new InvalidProgramException("Unexpected error.");
}
prev._nextnode = next;
}
if (next != null)
{
next._prevnode = prev;
}
oldnode._prevnode = null;
oldnode._nextnode = null;
oldnode._parentnode = null;
}
#endregion
#region Public Methods
/// <summary>
/// Get first instance of node in supplied collection
/// </summary>
/// <param name="items"></param>
/// <param name="name"></param>
/// <returns></returns>
public static HtmlNode FindFirst(HtmlNodeCollection items, string name)
{
foreach (HtmlNode node in items)
{
if (node.Name.ToLower().Contains(name))
return node;
if (node.HasChildNodes)
{
HtmlNode returnNode = FindFirst(node.ChildNodes, name);
if (returnNode != null)
return returnNode;
}
}
return null;
}
/// <summary>
/// Add node to the end of the collection
/// </summary>
/// <param name="node"></param>
public void Append(HtmlNode node)
{
HtmlNode last = null;
if (_items.Count > 0)
{
last = _items[_items.Count - 1];
}
_items.Add(node);
node._prevnode = last;
node._nextnode = null;
node._parentnode = _parentnode;
if (last != null)
{
if (last == node)
{
throw new InvalidProgramException("Unexpected error.");
}
last._nextnode = node;
}
}
/// <summary>
/// Get first instance of node with name
/// </summary>
/// <param name="name"></param>
/// <returns></returns>
public HtmlNode FindFirst(string name)
{
return FindFirst(this, name);
}
/// <summary>
/// Get index of node
/// </summary>
/// <param name="node"></param>
/// <returns></returns>
public int GetNodeIndex(HtmlNode node)
{
// TODO: should we rewrite this? what would be the key of a node?
for (int i = 0; i < _items.Count; i++)
{
if (node == (_items[i]))
{
return i;
}
}
return -1;
}
/// <summary>
/// Add node to the beginning of the collection
/// </summary>
/// <param name="node"></param>
public void Prepend(HtmlNode node)
{
HtmlNode first = null;
if (_items.Count > 0)
{
first = _items[0];
}
_items.Insert(0, node);
if (node == first)
{
throw new InvalidProgramException("Unexpected error.");
}
node._nextnode = first;
node._prevnode = null;
node._parentnode = _parentnode;
if (first != null)
{
first._prevnode = node;
}
}
/// <summary>
/// Remove node at index
/// </summary>
/// <param name="index"></param>
/// <returns></returns>
public bool Remove(int index)
{
RemoveAt(index);
return true;
}
/// <summary>
/// Replace node at index
/// </summary>
/// <param name="index"></param>
/// <param name="node"></param>
public void Replace(int index, HtmlNode node)
{
HtmlNode next = null;
HtmlNode prev = null;
HtmlNode oldnode = _items[index];
if (index > 0)
{
prev = _items[index - 1];
}
if (index < (_items.Count - 1))
{
next = _items[index + 1];
}
_items[index] = node;
if (prev != null)
{
if (node == prev)
{
throw new InvalidProgramException("Unexpected error.");
}
prev._nextnode = node;
}
if (next != null)
{
next._prevnode = node;
}
node._prevnode = prev;
if (next == node)
{
throw new InvalidProgramException("Unexpected error.");
}
node._nextnode = next;
node._parentnode = _parentnode;
oldnode._prevnode = null;
oldnode._nextnode = null;
oldnode._parentnode = null;
}
#endregion
#region LINQ Methods
/// <summary>
/// Get all node descended from this collection
/// </summary>
/// <returns></returns>
public IEnumerable<HtmlNode> DescendantNodes()
{
foreach (HtmlNode item in _items)
foreach (HtmlNode n in item.DescendantNodes())
yield return n;
}
/// <summary>
/// Get all node descended from this collection
/// </summary>
/// <returns></returns>
public IEnumerable<HtmlNode> Descendants()
{
foreach (HtmlNode item in _items)
foreach (HtmlNode n in item.Descendants())
yield return n;
}
/// <summary>
/// Get all node descended from this collection with matching name
/// </summary>
/// <returns></returns>
public IEnumerable<HtmlNode> Descendants(string name)
{
foreach (HtmlNode item in _items)
foreach (HtmlNode n in item.Descendants(name))
yield return n;
}
/// <summary>
/// Gets all first generation elements in collection
/// </summary>
/// <returns></returns>
public IEnumerable<HtmlNode> Elements()
{
foreach (HtmlNode item in _items)
foreach (HtmlNode n in item.ChildNodes)
yield return n;
}
/// <summary>
/// Gets all first generation elements matching name
/// </summary>
/// <param name="name"></param>
/// <returns></returns>
public IEnumerable<HtmlNode> Elements(string name)
{
foreach (HtmlNode item in _items)
foreach (HtmlNode n in item.Elements(name))
yield return n;
}
/// <summary>
/// All first generation nodes in collection
/// </summary>
/// <returns></returns>
public IEnumerable<HtmlNode> Nodes()
{
foreach (HtmlNode item in _items)
foreach (HtmlNode n in item.ChildNodes)
yield return n;
}
#endregion
}
}
+768
View File
@@ -0,0 +1,768 @@
// HtmlAgilityPack V1.0 - Simon Mourier <simon underscore mourier at hotmail dot com>
using System;
using System.Diagnostics;
using System.IO;
using System.Text;
using System.Xml;
using System.Xml.XPath;
namespace HtmlAgilityPack
{
/// <summary>
/// Represents an HTML navigator on an HTML document seen as a data store.
/// </summary>
public class HtmlNodeNavigator : XPathNavigator
{
#region Fields
private int _attindex;
private HtmlNode _currentnode;
private HtmlDocument _doc = new HtmlDocument();
private HtmlNameTable _nametable = new HtmlNameTable();
internal bool Trace;
#endregion
#region Constructors
internal HtmlNodeNavigator()
{
Reset();
}
internal HtmlNodeNavigator(HtmlDocument doc, HtmlNode currentNode)
{
if (currentNode == null)
{
throw new ArgumentNullException("currentNode");
}
if (currentNode.OwnerDocument != doc)
{
throw new ArgumentException(HtmlDocument.HtmlExceptionRefNotChild);
}
InternalTrace(null);
_doc = doc;
Reset();
_currentnode = currentNode;
}
private HtmlNodeNavigator(HtmlNodeNavigator nav)
{
if (nav == null)
{
throw new ArgumentNullException("nav");
}
InternalTrace(null);
_doc = nav._doc;
_currentnode = nav._currentnode;
_attindex = nav._attindex;
_nametable = nav._nametable; // REVIEW: should we do this?
}
/// <summary>
/// Initializes a new instance of the HtmlNavigator and loads an HTML document from a stream.
/// </summary>
/// <param name="stream">The input stream.</param>
public HtmlNodeNavigator(Stream stream)
{
_doc.Load(stream);
Reset();
}
/// <summary>
/// Initializes a new instance of the HtmlNavigator and loads an HTML document from a stream.
/// </summary>
/// <param name="stream">The input stream.</param>
/// <param name="detectEncodingFromByteOrderMarks">Indicates whether to look for byte order marks at the beginning of the stream.</param>
public HtmlNodeNavigator(Stream stream, bool detectEncodingFromByteOrderMarks)
{
_doc.Load(stream, detectEncodingFromByteOrderMarks);
Reset();
}
/// <summary>
/// Initializes a new instance of the HtmlNavigator and loads an HTML document from a stream.
/// </summary>
/// <param name="stream">The input stream.</param>
/// <param name="encoding">The character encoding to use.</param>
public HtmlNodeNavigator(Stream stream, Encoding encoding)
{
_doc.Load(stream, encoding);
Reset();
}
/// <summary>
/// Initializes a new instance of the HtmlNavigator and loads an HTML document from a stream.
/// </summary>
/// <param name="stream">The input stream.</param>
/// <param name="encoding">The character encoding to use.</param>
/// <param name="detectEncodingFromByteOrderMarks">Indicates whether to look for byte order marks at the beginning of the stream.</param>
public HtmlNodeNavigator(Stream stream, Encoding encoding, bool detectEncodingFromByteOrderMarks)
{
_doc.Load(stream, encoding, detectEncodingFromByteOrderMarks);
Reset();
}
/// <summary>
/// Initializes a new instance of the HtmlNavigator and loads an HTML document from a stream.
/// </summary>
/// <param name="stream">The input stream.</param>
/// <param name="encoding">The character encoding to use.</param>
/// <param name="detectEncodingFromByteOrderMarks">Indicates whether to look for byte order marks at the beginning of the stream.</param>
/// <param name="buffersize">The minimum buffer size.</param>
public HtmlNodeNavigator(Stream stream, Encoding encoding, bool detectEncodingFromByteOrderMarks, int buffersize)
{
_doc.Load(stream, encoding, detectEncodingFromByteOrderMarks, buffersize);
Reset();
}
/// <summary>
/// Initializes a new instance of the HtmlNavigator and loads an HTML document from a TextReader.
/// </summary>
/// <param name="reader">The TextReader used to feed the HTML data into the document.</param>
public HtmlNodeNavigator(TextReader reader)
{
_doc.Load(reader);
Reset();
}
/// <summary>
/// Initializes a new instance of the HtmlNavigator and loads an HTML document from a file.
/// </summary>
/// <param name="path">The complete file path to be read.</param>
public HtmlNodeNavigator(string path)
{
_doc.Load(path);
Reset();
}
/// <summary>
/// Initializes a new instance of the HtmlNavigator and loads an HTML document from a file.
/// </summary>
/// <param name="path">The complete file path to be read.</param>
/// <param name="detectEncodingFromByteOrderMarks">Indicates whether to look for byte order marks at the beginning of the file.</param>
public HtmlNodeNavigator(string path, bool detectEncodingFromByteOrderMarks)
{
_doc.Load(path, detectEncodingFromByteOrderMarks);
Reset();
}
/// <summary>
/// Initializes a new instance of the HtmlNavigator and loads an HTML document from a file.
/// </summary>
/// <param name="path">The complete file path to be read.</param>
/// <param name="encoding">The character encoding to use.</param>
public HtmlNodeNavigator(string path, Encoding encoding)
{
_doc.Load(path, encoding);
Reset();
}
/// <summary>
/// Initializes a new instance of the HtmlNavigator and loads an HTML document from a file.
/// </summary>
/// <param name="path">The complete file path to be read.</param>
/// <param name="encoding">The character encoding to use.</param>
/// <param name="detectEncodingFromByteOrderMarks">Indicates whether to look for byte order marks at the beginning of the file.</param>
public HtmlNodeNavigator(string path, Encoding encoding, bool detectEncodingFromByteOrderMarks)
{
_doc.Load(path, encoding, detectEncodingFromByteOrderMarks);
Reset();
}
/// <summary>
/// Initializes a new instance of the HtmlNavigator and loads an HTML document from a file.
/// </summary>
/// <param name="path">The complete file path to be read.</param>
/// <param name="encoding">The character encoding to use.</param>
/// <param name="detectEncodingFromByteOrderMarks">Indicates whether to look for byte order marks at the beginning of the file.</param>
/// <param name="buffersize">The minimum buffer size.</param>
public HtmlNodeNavigator(string path, Encoding encoding, bool detectEncodingFromByteOrderMarks, int buffersize)
{
_doc.Load(path, encoding, detectEncodingFromByteOrderMarks, buffersize);
Reset();
}
#endregion
#region Properties
/// <summary>
/// Gets the base URI for the current node.
/// Always returns string.Empty in the case of HtmlNavigator implementation.
/// </summary>
public override string BaseURI
{
get
{
InternalTrace(">");
return _nametable.GetOrAdd(string.Empty);
}
}
/// <summary>
/// Gets the current HTML document.
/// </summary>
public HtmlDocument CurrentDocument
{
get { return _doc; }
}
/// <summary>
/// Gets the current HTML node.
/// </summary>
public HtmlNode CurrentNode
{
get { return _currentnode; }
}
/// <summary>
/// Gets a value indicating whether the current node has child nodes.
/// </summary>
public override bool HasAttributes
{
get
{
InternalTrace(">" + (_currentnode.Attributes.Count > 0));
return (_currentnode.Attributes.Count > 0);
}
}
/// <summary>
/// Gets a value indicating whether the current node has child nodes.
/// </summary>
public override bool HasChildren
{
get
{
InternalTrace(">" + (_currentnode.ChildNodes.Count > 0));
return (_currentnode.ChildNodes.Count > 0);
}
}
/// <summary>
/// Gets a value indicating whether the current node is an empty element.
/// </summary>
public override bool IsEmptyElement
{
get
{
InternalTrace(">" + !HasChildren);
// REVIEW: is this ok?
return !HasChildren;
}
}
/// <summary>
/// Gets the name of the current HTML node without the namespace prefix.
/// </summary>
public override string LocalName
{
get
{
if (_attindex != -1)
{
InternalTrace("att>" + _currentnode.Attributes[_attindex].Name);
return _nametable.GetOrAdd(_currentnode.Attributes[_attindex].Name);
}
InternalTrace("node>" + _currentnode.Name);
return _nametable.GetOrAdd(_currentnode.Name);
}
}
/// <summary>
/// Gets the qualified name of the current node.
/// </summary>
public override string Name
{
get
{
InternalTrace(">" + _currentnode.Name);
return _nametable.GetOrAdd(_currentnode.Name);
}
}
/// <summary>
/// Gets the namespace URI (as defined in the W3C Namespace Specification) of the current node.
/// Always returns string.Empty in the case of HtmlNavigator implementation.
/// </summary>
public override string NamespaceURI
{
get
{
InternalTrace(">");
return _nametable.GetOrAdd(string.Empty);
}
}
/// <summary>
/// Gets the <see cref="XmlNameTable"/> associated with this implementation.
/// </summary>
public override XmlNameTable NameTable
{
get
{
InternalTrace(null);
return _nametable;
}
}
/// <summary>
/// Gets the type of the current node.
/// </summary>
public override XPathNodeType NodeType
{
get
{
switch (_currentnode.NodeType)
{
case HtmlNodeType.Comment:
InternalTrace(">" + XPathNodeType.Comment);
return XPathNodeType.Comment;
case HtmlNodeType.Document:
InternalTrace(">" + XPathNodeType.Root);
return XPathNodeType.Root;
case HtmlNodeType.Text:
InternalTrace(">" + XPathNodeType.Text);
return XPathNodeType.Text;
case HtmlNodeType.Element:
{
if (_attindex != -1)
{
InternalTrace(">" + XPathNodeType.Attribute);
return XPathNodeType.Attribute;
}
InternalTrace(">" + XPathNodeType.Element);
return XPathNodeType.Element;
}
default:
throw new NotImplementedException("Internal error: Unhandled HtmlNodeType: " +
_currentnode.NodeType);
}
}
}
/// <summary>
/// Gets the prefix associated with the current node.
/// Always returns string.Empty in the case of HtmlNavigator implementation.
/// </summary>
public override string Prefix
{
get
{
InternalTrace(null);
return _nametable.GetOrAdd(string.Empty);
}
}
/// <summary>
/// Gets the text value of the current node.
/// </summary>
public override string Value
{
get
{
InternalTrace("nt=" + _currentnode.NodeType);
switch (_currentnode.NodeType)
{
case HtmlNodeType.Comment:
InternalTrace(">" + ((HtmlCommentNode) _currentnode).Comment);
return ((HtmlCommentNode) _currentnode).Comment;
case HtmlNodeType.Document:
InternalTrace(">");
return "";
case HtmlNodeType.Text:
InternalTrace(">" + ((HtmlTextNode) _currentnode).Text);
return ((HtmlTextNode) _currentnode).Text;
case HtmlNodeType.Element:
{
if (_attindex != -1)
{
InternalTrace(">" + _currentnode.Attributes[_attindex].Value);
return _currentnode.Attributes[_attindex].Value;
}
return _currentnode.InnerText;
}
default:
throw new NotImplementedException("Internal error: Unhandled HtmlNodeType: " +
_currentnode.NodeType);
}
}
}
/// <summary>
/// Gets the xml:lang scope for the current node.
/// Always returns string.Empty in the case of HtmlNavigator implementation.
/// </summary>
public override string XmlLang
{
get
{
InternalTrace(null);
return _nametable.GetOrAdd(string.Empty);
}
}
#endregion
#region Public Methods
/// <summary>
/// Creates a new HtmlNavigator positioned at the same node as this HtmlNavigator.
/// </summary>
/// <returns>A new HtmlNavigator object positioned at the same node as the original HtmlNavigator.</returns>
public override XPathNavigator Clone()
{
InternalTrace(null);
return new HtmlNodeNavigator(this);
}
/// <summary>
/// Gets the value of the HTML attribute with the specified LocalName and NamespaceURI.
/// </summary>
/// <param name="localName">The local name of the HTML attribute.</param>
/// <param name="namespaceURI">The namespace URI of the attribute. Unsupported with the HtmlNavigator implementation.</param>
/// <returns>The value of the specified HTML attribute. String.Empty or null if a matching attribute is not found or if the navigator is not positioned on an element node.</returns>
public override string GetAttribute(string localName, string namespaceURI)
{
InternalTrace("localName=" + localName + ", namespaceURI=" + namespaceURI);
HtmlAttribute att = _currentnode.Attributes[localName];
if (att == null)
{
InternalTrace(">null");
return null;
}
InternalTrace(">" + att.Value);
return att.Value;
}
/// <summary>
/// Returns the value of the namespace node corresponding to the specified local name.
/// Always returns string.Empty for the HtmlNavigator implementation.
/// </summary>
/// <param name="name">The local name of the namespace node.</param>
/// <returns>Always returns string.Empty for the HtmlNavigator implementation.</returns>
public override string GetNamespace(string name)
{
InternalTrace("name=" + name);
return string.Empty;
}
/// <summary>
/// Determines whether the current HtmlNavigator is at the same position as the specified HtmlNavigator.
/// </summary>
/// <param name="other">The HtmlNavigator that you want to compare against.</param>
/// <returns>true if the two navigators have the same position, otherwise, false.</returns>
public override bool IsSamePosition(XPathNavigator other)
{
HtmlNodeNavigator nav = other as HtmlNodeNavigator;
if (nav == null)
{
InternalTrace(">false");
return false;
}
InternalTrace(">" + (nav._currentnode == _currentnode));
return (nav._currentnode == _currentnode);
}
/// <summary>
/// Moves to the same position as the specified HtmlNavigator.
/// </summary>
/// <param name="other">The HtmlNavigator positioned on the node that you want to move to.</param>
/// <returns>true if successful, otherwise false. If false, the position of the navigator is unchanged.</returns>
public override bool MoveTo(XPathNavigator other)
{
HtmlNodeNavigator nav = other as HtmlNodeNavigator;
if (nav == null)
{
InternalTrace(">false (nav is not an HtmlNodeNavigator)");
return false;
}
InternalTrace("moveto oid=" + nav.GetHashCode()
+ ", n:" + nav._currentnode.Name
+ ", a:" + nav._attindex);
if (nav._doc == _doc)
{
_currentnode = nav._currentnode;
_attindex = nav._attindex;
InternalTrace(">true");
return true;
}
// we don't know how to handle that
InternalTrace(">false (???)");
return false;
}
/// <summary>
/// Moves to the HTML attribute with matching LocalName and NamespaceURI.
/// </summary>
/// <param name="localName">The local name of the HTML attribute.</param>
/// <param name="namespaceURI">The namespace URI of the attribute. Unsupported with the HtmlNavigator implementation.</param>
/// <returns>true if the HTML attribute is found, otherwise, false. If false, the position of the navigator does not change.</returns>
public override bool MoveToAttribute(string localName, string namespaceURI)
{
InternalTrace("localName=" + localName + ", namespaceURI=" + namespaceURI);
int index = _currentnode.Attributes.GetAttributeIndex(localName);
if (index == -1)
{
InternalTrace(">false");
return false;
}
_attindex = index;
InternalTrace(">true");
return true;
}
/// <summary>
/// Moves to the first sibling of the current node.
/// </summary>
/// <returns>true if the navigator is successful moving to the first sibling node, false if there is no first sibling or if the navigator is currently positioned on an attribute node.</returns>
public override bool MoveToFirst()
{
if (_currentnode.ParentNode == null)
{
InternalTrace(">false");
return false;
}
if (_currentnode.ParentNode.FirstChild == null)
{
InternalTrace(">false");
return false;
}
_currentnode = _currentnode.ParentNode.FirstChild;
InternalTrace(">true");
return true;
}
/// <summary>
/// Moves to the first HTML attribute.
/// </summary>
/// <returns>true if the navigator is successful moving to the first HTML attribute, otherwise, false.</returns>
public override bool MoveToFirstAttribute()
{
if (!HasAttributes)
{
InternalTrace(">false");
return false;
}
_attindex = 0;
InternalTrace(">true");
return true;
}
/// <summary>
/// Moves to the first child of the current node.
/// </summary>
/// <returns>true if there is a first child node, otherwise false.</returns>
public override bool MoveToFirstChild()
{
if (!_currentnode.HasChildNodes)
{
InternalTrace(">false");
return false;
}
_currentnode = _currentnode.ChildNodes[0];
InternalTrace(">true");
return true;
}
/// <summary>
/// Moves the XPathNavigator to the first namespace node of the current element.
/// Always returns false for the HtmlNavigator implementation.
/// </summary>
/// <param name="scope">An XPathNamespaceScope value describing the namespace scope.</param>
/// <returns>Always returns false for the HtmlNavigator implementation.</returns>
public override bool MoveToFirstNamespace(XPathNamespaceScope scope)
{
InternalTrace(null);
return false;
}
/// <summary>
/// Moves to the node that has an attribute of type ID whose value matches the specified string.
/// </summary>
/// <param name="id">A string representing the ID value of the node to which you want to move. This argument does not need to be atomized.</param>
/// <returns>true if the move was successful, otherwise false. If false, the position of the navigator is unchanged.</returns>
public override bool MoveToId(string id)
{
InternalTrace("id=" + id);
HtmlNode node = _doc.GetElementbyId(id);
if (node == null)
{
InternalTrace(">false");
return false;
}
_currentnode = node;
InternalTrace(">true");
return true;
}
/// <summary>
/// Moves the XPathNavigator to the namespace node with the specified local name.
/// Always returns false for the HtmlNavigator implementation.
/// </summary>
/// <param name="name">The local name of the namespace node.</param>
/// <returns>Always returns false for the HtmlNavigator implementation.</returns>
public override bool MoveToNamespace(string name)
{
InternalTrace("name=" + name);
return false;
}
/// <summary>
/// Moves to the next sibling of the current node.
/// </summary>
/// <returns>true if the navigator is successful moving to the next sibling node, false if there are no more siblings or if the navigator is currently positioned on an attribute node. If false, the position of the navigator is unchanged.</returns>
public override bool MoveToNext()
{
if (_currentnode.NextSibling == null)
{
InternalTrace(">false");
return false;
}
InternalTrace("_c=" + _currentnode.CloneNode(false).OuterHtml);
InternalTrace("_n=" + _currentnode.NextSibling.CloneNode(false).OuterHtml);
_currentnode = _currentnode.NextSibling;
InternalTrace(">true");
return true;
}
/// <summary>
/// Moves to the next HTML attribute.
/// </summary>
/// <returns></returns>
public override bool MoveToNextAttribute()
{
InternalTrace(null);
if (_attindex >= (_currentnode.Attributes.Count - 1))
{
InternalTrace(">false");
return false;
}
_attindex++;
InternalTrace(">true");
return true;
}
/// <summary>
/// Moves the XPathNavigator to the next namespace node.
/// Always returns falsefor the HtmlNavigator implementation.
/// </summary>
/// <param name="scope">An XPathNamespaceScope value describing the namespace scope.</param>
/// <returns>Always returns false for the HtmlNavigator implementation.</returns>
public override bool MoveToNextNamespace(XPathNamespaceScope scope)
{
InternalTrace(null);
return false;
}
/// <summary>
/// Moves to the parent of the current node.
/// </summary>
/// <returns>true if there is a parent node, otherwise false.</returns>
public override bool MoveToParent()
{
if (_currentnode.ParentNode == null)
{
InternalTrace(">false");
return false;
}
_currentnode = _currentnode.ParentNode;
InternalTrace(">true");
return true;
}
/// <summary>
/// Moves to the previous sibling of the current node.
/// </summary>
/// <returns>true if the navigator is successful moving to the previous sibling node, false if there is no previous sibling or if the navigator is currently positioned on an attribute node.</returns>
public override bool MoveToPrevious()
{
if (_currentnode.PreviousSibling == null)
{
InternalTrace(">false");
return false;
}
_currentnode = _currentnode.PreviousSibling;
InternalTrace(">true");
return true;
}
/// <summary>
/// Moves to the root node to which the current node belongs.
/// </summary>
public override void MoveToRoot()
{
_currentnode = _doc.DocumentNode;
InternalTrace(null);
}
#endregion
#region Internal Methods
[Conditional("TRACE")]
internal void InternalTrace(object traceValue)
{
if (!Trace)
{
return;
}
StackFrame sf = new StackFrame(1, true);
string name = sf.GetMethod().Name;
string nodename = _currentnode == null ? "(null)" : _currentnode.Name;
string nodevalue;
if (_currentnode == null)
{
nodevalue = "(null)";
}
else
{
switch (_currentnode.NodeType)
{
case HtmlNodeType.Comment:
nodevalue = ((HtmlCommentNode) _currentnode).Comment;
break;
case HtmlNodeType.Document:
nodevalue = "";
break;
case HtmlNodeType.Text:
nodevalue = ((HtmlTextNode) _currentnode).Text;
break;
default:
nodevalue = _currentnode.CloneNode(false).OuterHtml;
break;
}
}
System.Diagnostics.Trace.WriteLine(string.Format("oid={0},n={1},a={2},v={3},{4}", GetHashCode(), nodename, _attindex, nodevalue, traceValue), "N!" + name);
}
#endregion
#region Private Methods
private void Reset()
{
InternalTrace(null);
_currentnode = _doc.DocumentNode;
_attindex = -1;
}
#endregion
}
}
+29
View File
@@ -0,0 +1,29 @@
// HtmlAgilityPack V1.0 - Simon Mourier <simon underscore mourier at hotmail dot com>
namespace HtmlAgilityPack
{
/// <summary>
/// Represents the type of a node.
/// </summary>
public enum HtmlNodeType
{
/// <summary>
/// The root of a document.
/// </summary>
Document,
/// <summary>
/// An HTML element.
/// </summary>
Element,
/// <summary>
/// An HTML comment.
/// </summary>
Comment,
/// <summary>
/// A text node is always the child of an element or a document node.
/// </summary>
Text,
}
}
+92
View File
@@ -0,0 +1,92 @@
// HtmlAgilityPack V1.0 - Simon Mourier <simon underscore mourier at hotmail dot com>
namespace HtmlAgilityPack
{
/// <summary>
/// Represents a parsing error found during document parsing.
/// </summary>
public class HtmlParseError
{
#region Fields
private HtmlParseErrorCode _code;
private int _line;
private int _linePosition;
private string _reason;
private string _sourceText;
private int _streamPosition;
#endregion
#region Constructors
internal HtmlParseError(
HtmlParseErrorCode code,
int line,
int linePosition,
int streamPosition,
string sourceText,
string reason)
{
_code = code;
_line = line;
_linePosition = linePosition;
_streamPosition = streamPosition;
_sourceText = sourceText;
_reason = reason;
}
#endregion
#region Properties
/// <summary>
/// Gets the type of error.
/// </summary>
public HtmlParseErrorCode Code
{
get { return _code; }
}
/// <summary>
/// Gets the line number of this error in the document.
/// </summary>
public int Line
{
get { return _line; }
}
/// <summary>
/// Gets the column number of this error in the document.
/// </summary>
public int LinePosition
{
get { return _linePosition; }
}
/// <summary>
/// Gets a description for the error.
/// </summary>
public string Reason
{
get { return _reason; }
}
/// <summary>
/// Gets the the full text of the line containing the error.
/// </summary>
public string SourceText
{
get { return _sourceText; }
}
/// <summary>
/// Gets the absolute stream position of this error in the document, relative to the start of the document.
/// </summary>
public int StreamPosition
{
get { return _streamPosition; }
}
#endregion
}
}
@@ -0,0 +1,34 @@
// HtmlAgilityPack V1.0 - Simon Mourier <simon underscore mourier at hotmail dot com>
namespace HtmlAgilityPack
{
/// <summary>
/// Represents the type of parsing error.
/// </summary>
public enum HtmlParseErrorCode
{
/// <summary>
/// A tag was not closed.
/// </summary>
TagNotClosed,
/// <summary>
/// A tag was not opened.
/// </summary>
TagNotOpened,
/// <summary>
/// There is a charset mismatch between stream and declared (META) encoding.
/// </summary>
CharsetMismatch,
/// <summary>
/// An end tag was not required.
/// </summary>
EndTagNotRequired,
/// <summary>
/// An end tag is invalid at this position.
/// </summary>
EndTagInvalidHere
}
}
+69
View File
@@ -0,0 +1,69 @@
// HtmlAgilityPack V1.0 - Simon Mourier <simon underscore mourier at hotmail dot com>
namespace HtmlAgilityPack
{
/// <summary>
/// Represents an HTML text node.
/// </summary>
public class HtmlTextNode : HtmlNode
{
#region Fields
private string _text;
#endregion
#region Constructors
internal HtmlTextNode(HtmlDocument ownerdocument, int index)
:
base(HtmlNodeType.Text, ownerdocument, index)
{
}
#endregion
#region Properties
/// <summary>
/// Gets or Sets the HTML between the start and end tags of the object. In the case of a text node, it is equals to OuterHtml.
/// </summary>
public override string InnerHtml
{
get { return OuterHtml; }
set { _text = value; }
}
/// <summary>
/// Gets or Sets the object and its content in HTML.
/// </summary>
public override string OuterHtml
{
get
{
if (_text == null)
{
return base.OuterHtml;
}
return _text;
}
}
/// <summary>
/// Gets or Sets the text of the node.
/// </summary>
public string Text
{
get
{
if (_text == null)
{
return base.OuterHtml;
}
return _text;
}
set { _text = value; }
}
#endregion
}
}
+907
View File
@@ -0,0 +1,907 @@
// HtmlAgilityPack V1.0 - Simon Mourier <simon underscore mourier at hotmail dot com>
using System;
using System.IO;
using System.Net;
using System.Text;
using System.Xml;
using System.Xml.Serialization;
using System.Xml.Xsl;
using Microsoft.Win32;
namespace HtmlAgilityPack
{
/// <summary>
/// A utility class to get HTML document from HTTP.
/// </summary>
public class HtmlWeb
{
#region Delegates
/// <summary>
/// Represents the method that will handle the PostResponse event.
/// </summary>
public delegate void PostResponseHandler(HttpWebRequest request, HttpWebResponse response);
/// <summary>
/// Represents the method that will handle the PreHandleDocument event.
/// </summary>
public delegate void PreHandleDocumentHandler(HtmlDocument document);
/// <summary>
/// Represents the method that will handle the PreRequest event.
/// </summary>
public delegate bool PreRequestHandler(HttpWebRequest request);
#endregion
#region Fields
private bool _autoDetectEncoding = true;
private bool _cacheOnly;
private string _cachePath;
private bool _fromCache;
private int _requestDuration;
private Uri _responseUri;
private HttpStatusCode _statusCode = HttpStatusCode.OK;
private int _streamBufferSize = 1024;
private bool _useCookies;
private bool _usingCache;
/// <summary>
/// Occurs after an HTTP request has been executed.
/// </summary>
public PostResponseHandler PostResponse;
/// <summary>
/// Occurs before an HTML document is handled.
/// </summary>
public PreHandleDocumentHandler PreHandleDocument;
/// <summary>
/// Occurs before an HTTP request is executed.
/// </summary>
public PreRequestHandler PreRequest;
#endregion
#region Properties
/// <summary>
/// Gets or Sets a value indicating if document encoding must be automatically detected.
/// </summary>
public bool AutoDetectEncoding
{
get { return _autoDetectEncoding; }
set { _autoDetectEncoding = value; }
}
/// <summary>
/// Gets or Sets a value indicating whether to get document only from the cache.
/// If this is set to true and document is not found in the cache, nothing will be loaded.
/// </summary>
public bool CacheOnly
{
get { return _cacheOnly; }
set
{
if ((value) && !UsingCache)
{
throw new HtmlWebException("Cache is not enabled. Set UsingCache to true first.");
}
_cacheOnly = value;
}
}
/// <summary>
/// Gets or Sets the cache path. If null, no caching mechanism will be used.
/// </summary>
public string CachePath
{
get { return _cachePath; }
set { _cachePath = value; }
}
/// <summary>
/// Gets a value indicating if the last document was retrieved from the cache.
/// </summary>
public bool FromCache
{
get { return _fromCache; }
}
/// <summary>
/// Gets the last request duration in milliseconds.
/// </summary>
public int RequestDuration
{
get { return _requestDuration; }
}
/// <summary>
/// Gets the URI of the Internet resource that actually responded to the request.
/// </summary>
public Uri ResponseUri
{
get { return _responseUri; }
}
/// <summary>
/// Gets the last request status.
/// </summary>
public HttpStatusCode StatusCode
{
get { return _statusCode; }
}
/// <summary>
/// Gets or Sets the size of the buffer used for memory operations.
/// </summary>
public int StreamBufferSize
{
get { return _streamBufferSize; }
set
{
if (_streamBufferSize <= 0)
{
throw new ArgumentException("Size must be greater than zero.");
}
_streamBufferSize = value;
}
}
/// <summary>
/// Gets or Sets a value indicating if cookies will be stored.
/// </summary>
public bool UseCookies
{
get { return _useCookies; }
set { _useCookies = value; }
}
/// <summary>
/// Gets or Sets a value indicating whether the caching mechanisms should be used or not.
/// </summary>
public bool UsingCache
{
get
{
if (_cachePath == null)
{
return false;
}
return _usingCache;
}
set
{
if ((value) && (_cachePath == null))
{
throw new HtmlWebException("You need to define a CachePath first.");
}
_usingCache = value;
}
}
#endregion
#region Public Methods
/// <summary>
/// Gets the MIME content type for a given path extension.
/// </summary>
/// <param name="extension">The input path extension.</param>
/// <param name="def">The default content type to return if any error occurs.</param>
/// <returns>The path extension's MIME content type.</returns>
public static string GetContentTypeForExtension(string extension, string def)
{
if (string.IsNullOrEmpty(extension))
{
return def;
}
string contentType = "";
try
{
RegistryKey reg = Registry.ClassesRoot;
reg = reg.OpenSubKey(extension, false);
if (reg != null) contentType = (string)reg.GetValue("", def);
}
catch (Exception)
{
contentType = def;
}
return contentType;
}
/// <summary>
/// Gets the path extension for a given MIME content type.
/// </summary>
/// <param name="contentType">The input MIME content type.</param>
/// <param name="def">The default path extension to return if any error occurs.</param>
/// <returns>The MIME content type's path extension.</returns>
public static string GetExtensionForContentType(string contentType, string def)
{
if (string.IsNullOrEmpty(contentType))
{
return def;
}
string ext = "";
try
{
RegistryKey reg = Registry.ClassesRoot;
reg = reg.OpenSubKey(@"MIME\Database\Content Type\" + contentType, false);
if (reg != null) ext = (string)reg.GetValue("Extension", def);
}
catch (Exception)
{
ext = def;
}
return ext;
}
/// <summary>
/// Creates an instance of the given type from the specified Internet resource.
/// </summary>
/// <param name="url">The requested URL, such as "http://Myserver/Mypath/Myfile.asp".</param>
/// <param name="type">The requested type.</param>
/// <returns>An newly created instance.</returns>
public object CreateInstance(string url, Type type)
{
return CreateInstance(url, null, null, type);
}
/// <summary>
/// Creates an instance of the given type from the specified Internet resource.
/// </summary>
/// <param name="htmlUrl">The requested URL, such as "http://Myserver/Mypath/Myfile.asp".</param>
/// <param name="xsltUrl">The URL that specifies the XSLT stylesheet to load.</param>
/// <param name="xsltArgs">An <see cref="XsltArgumentList"/> containing the namespace-qualified arguments used as input to the transform.</param>
/// <param name="type">The requested type.</param>
/// <returns>An newly created instance.</returns>
public object CreateInstance(string htmlUrl, string xsltUrl, XsltArgumentList xsltArgs, Type type)
{
return CreateInstance(htmlUrl, xsltUrl, xsltArgs, type, null);
}
/// <summary>
/// Creates an instance of the given type from the specified Internet resource.
/// </summary>
/// <param name="htmlUrl">The requested URL, such as "http://Myserver/Mypath/Myfile.asp".</param>
/// <param name="xsltUrl">The URL that specifies the XSLT stylesheet to load.</param>
/// <param name="xsltArgs">An <see cref="XsltArgumentList"/> containing the namespace-qualified arguments used as input to the transform.</param>
/// <param name="type">The requested type.</param>
/// <param name="xmlPath">A file path where the temporary XML before transformation will be saved. Mostly used for debugging purposes.</param>
/// <returns>An newly created instance.</returns>
public object CreateInstance(string htmlUrl, string xsltUrl, XsltArgumentList xsltArgs, Type type,
string xmlPath)
{
StringWriter sw = new StringWriter();
XmlTextWriter writer = new XmlTextWriter(sw);
if (xsltUrl == null)
{
LoadHtmlAsXml(htmlUrl, writer);
}
else
{
if (xmlPath == null)
{
LoadHtmlAsXml(htmlUrl, xsltUrl, xsltArgs, writer);
}
else
{
LoadHtmlAsXml(htmlUrl, xsltUrl, xsltArgs, writer, xmlPath);
}
}
writer.Flush();
StringReader sr = new StringReader(sw.ToString());
XmlTextReader reader = new XmlTextReader(sr);
XmlSerializer serializer = new XmlSerializer(type);
object o;
try
{
o = serializer.Deserialize(reader);
}
catch (InvalidOperationException ex)
{
throw new Exception(ex + ", --- xml:" + sw);
}
return o;
}
/// <summary>
/// Gets an HTML document from an Internet resource and saves it to the specified file.
/// </summary>
/// <param name="url">The requested URL, such as "http://Myserver/Mypath/Myfile.asp".</param>
/// <param name="path">The location of the file where you want to save the document.</param>
public void Get(string url, string path)
{
Get(url, path, "GET");
}
/// <summary>
/// Gets an HTML document from an Internet resource and saves it to the specified file. - Proxy aware
/// </summary>
/// <param name="url">The requested URL, such as "http://Myserver/Mypath/Myfile.asp".</param>
/// <param name="path">The location of the file where you want to save the document.</param>
/// <param name="proxy"></param>
/// <param name="credentials"></param>
public void Get(string url, string path, WebProxy proxy, NetworkCredential credentials)
{
Get(url, path, proxy, credentials, "GET");
}
/// <summary>
/// Gets an HTML document from an Internet resource and saves it to the specified file.
/// </summary>
/// <param name="url">The requested URL, such as "http://Myserver/Mypath/Myfile.asp".</param>
/// <param name="path">The location of the file where you want to save the document.</param>
/// <param name="method">The HTTP method used to open the connection, such as GET, POST, PUT, or PROPFIND.</param>
public void Get(string url, string path, string method)
{
Uri uri = new Uri(url);
if ((uri.Scheme == Uri.UriSchemeHttps) ||
(uri.Scheme == Uri.UriSchemeHttp))
{
Get(uri, method, path, null, null, null);
}
else
{
throw new HtmlWebException("Unsupported uri scheme: '" + uri.Scheme + "'.");
}
}
/// <summary>
/// Gets an HTML document from an Internet resource and saves it to the specified file. Understands Proxies
/// </summary>
/// <param name="url">The requested URL, such as "http://Myserver/Mypath/Myfile.asp".</param>
/// <param name="path">The location of the file where you want to save the document.</param>
/// <param name="credentials"></param>
/// <param name="method">The HTTP method used to open the connection, such as GET, POST, PUT, or PROPFIND.</param>
/// <param name="proxy"></param>
public void Get(string url, string path, WebProxy proxy, NetworkCredential credentials, string method)
{
Uri uri = new Uri(url);
if ((uri.Scheme == Uri.UriSchemeHttps) ||
(uri.Scheme == Uri.UriSchemeHttp))
{
Get(uri, method, path, null, proxy, credentials);
}
else
{
throw new HtmlWebException("Unsupported uri scheme: '" + uri.Scheme + "'.");
}
}
/// <summary>
/// Gets the cache file path for a specified url.
/// </summary>
/// <param name="uri">The url fo which to retrieve the cache path. May not be null.</param>
/// <returns>The cache file path.</returns>
public string GetCachePath(Uri uri)
{
if (uri == null)
{
throw new ArgumentNullException("uri");
}
if (!UsingCache)
{
throw new HtmlWebException("Cache is not enabled. Set UsingCache to true first.");
}
string cachePath;
if (uri.AbsolutePath == "/")
{
cachePath = Path.Combine(_cachePath, ".htm");
}
else
{
cachePath = Path.Combine(_cachePath, (uri.Host + uri.AbsolutePath).Replace('/', '\\'));
}
return cachePath;
}
/// <summary>
/// Gets an HTML document from an Internet resource.
/// </summary>
/// <param name="url">The requested URL, such as "http://Myserver/Mypath/Myfile.asp".</param>
/// <returns>A new HTML document.</returns>
public HtmlDocument Load(string url)
{
return Load(url, "GET");
}
/// <summary>
/// Gets an HTML document from an Internet resource.
/// </summary>
/// <param name="url">The requested URL, such as "http://Myserver/Mypath/Myfile.asp".</param>
/// <param name="proxyHost">Host to use for Proxy</param>
/// <param name="proxyPort">Port the Proxy is on</param>
/// <param name="userId">User Id for Authentication</param>
/// <param name="password">Password for Authentication</param>
/// <returns>A new HTML document.</returns>
public HtmlDocument Load(string url, string proxyHost, int proxyPort, string userId, string password)
{
//Create my proxy
WebProxy myProxy = new WebProxy(proxyHost, proxyPort);
myProxy.BypassProxyOnLocal = true;
//Create my credentials
NetworkCredential myCreds = null;
if ((userId != null) && (password != null))
{
myCreds = new NetworkCredential(userId, password);
CredentialCache credCache = new CredentialCache();
//Add the creds
credCache.Add(myProxy.Address, "Basic", myCreds);
credCache.Add(myProxy.Address, "Digest", myCreds);
}
return Load(url, "GET", myProxy, myCreds);
}
/// <summary>
/// Loads an HTML document from an Internet resource.
/// </summary>
/// <param name="url">The requested URL, such as "http://Myserver/Mypath/Myfile.asp".</param>
/// <param name="method">The HTTP method used to open the connection, such as GET, POST, PUT, or PROPFIND.</param>
/// <returns>A new HTML document.</returns>
public HtmlDocument Load(string url, string method)
{
Uri uri = new Uri(url);
HtmlDocument doc;
if ((uri.Scheme == Uri.UriSchemeHttps) ||
(uri.Scheme == Uri.UriSchemeHttp))
{
doc = LoadUrl(uri, method, null, null);
}
else
{
if (uri.Scheme == Uri.UriSchemeFile)
{
doc = new HtmlDocument();
doc.OptionAutoCloseOnEnd = false;
doc.OptionAutoCloseOnEnd = true;
doc.DetectEncodingAndLoad(url, _autoDetectEncoding);
}
else
{
throw new HtmlWebException("Unsupported uri scheme: '" + uri.Scheme + "'.");
}
}
if (PreHandleDocument != null)
{
PreHandleDocument(doc);
}
return doc;
}
/// <summary>
/// Loads an HTML document from an Internet resource.
/// </summary>
/// <param name="url">The requested URL, such as "http://Myserver/Mypath/Myfile.asp".</param>
/// <param name="method">The HTTP method used to open the connection, such as GET, POST, PUT, or PROPFIND.</param>
/// <param name="proxy">Proxy to use with this request</param>
/// <param name="credentials">Credentials to use when authenticating</param>
/// <returns>A new HTML document.</returns>
public HtmlDocument Load(string url, string method, WebProxy proxy, NetworkCredential credentials)
{
Uri uri = new Uri(url);
HtmlDocument doc;
if ((uri.Scheme == Uri.UriSchemeHttps) ||
(uri.Scheme == Uri.UriSchemeHttp))
{
doc = LoadUrl(uri, method, proxy, credentials);
}
else
{
if (uri.Scheme == Uri.UriSchemeFile)
{
doc = new HtmlDocument();
doc.OptionAutoCloseOnEnd = false;
doc.OptionAutoCloseOnEnd = true;
doc.DetectEncodingAndLoad(url, _autoDetectEncoding);
}
else
{
throw new HtmlWebException("Unsupported uri scheme: '" + uri.Scheme + "'.");
}
}
if (PreHandleDocument != null)
{
PreHandleDocument(doc);
}
return doc;
}
/// <summary>
/// Loads an HTML document from an Internet resource and saves it to the specified XmlTextWriter.
/// </summary>
/// <param name="htmlUrl">The requested URL, such as "http://Myserver/Mypath/Myfile.asp".</param>
/// <param name="writer">The XmlTextWriter to which you want to save.</param>
public void LoadHtmlAsXml(string htmlUrl, XmlTextWriter writer)
{
HtmlDocument doc = Load(htmlUrl);
doc.Save(writer);
}
/// <summary>
/// Loads an HTML document from an Internet resource and saves it to the specified XmlTextWriter, after an XSLT transformation.
/// </summary>
/// <param name="htmlUrl">The requested URL, such as "http://Myserver/Mypath/Myfile.asp".</param>
/// <param name="xsltUrl">The URL that specifies the XSLT stylesheet to load.</param>
/// <param name="xsltArgs">An XsltArgumentList containing the namespace-qualified arguments used as input to the transform.</param>
/// <param name="writer">The XmlTextWriter to which you want to save.</param>
public void LoadHtmlAsXml(string htmlUrl, string xsltUrl, XsltArgumentList xsltArgs, XmlTextWriter writer)
{
LoadHtmlAsXml(htmlUrl, xsltUrl, xsltArgs, writer, null);
}
/// <summary>
/// Loads an HTML document from an Internet resource and saves it to the specified XmlTextWriter, after an XSLT transformation.
/// </summary>
/// <param name="htmlUrl">The requested URL, such as "http://Myserver/Mypath/Myfile.asp". May not be null.</param>
/// <param name="xsltUrl">The URL that specifies the XSLT stylesheet to load.</param>
/// <param name="xsltArgs">An XsltArgumentList containing the namespace-qualified arguments used as input to the transform.</param>
/// <param name="writer">The XmlTextWriter to which you want to save.</param>
/// <param name="xmlPath">A file path where the temporary XML before transformation will be saved. Mostly used for debugging purposes.</param>
public void LoadHtmlAsXml(string htmlUrl, string xsltUrl, XsltArgumentList xsltArgs, XmlTextWriter writer,
string xmlPath)
{
if (htmlUrl == null)
{
throw new ArgumentNullException("htmlUrl");
}
HtmlDocument doc = Load(htmlUrl);
if (xmlPath != null)
{
XmlTextWriter w = new XmlTextWriter(xmlPath, doc.Encoding);
doc.Save(w);
w.Close();
}
if (xsltArgs == null)
{
xsltArgs = new XsltArgumentList();
}
// add some useful variables to the xslt doc
xsltArgs.AddParam("url", "", htmlUrl);
xsltArgs.AddParam("requestDuration", "", RequestDuration);
xsltArgs.AddParam("fromCache", "", FromCache);
XslCompiledTransform xslt = new XslCompiledTransform();
xslt.Load(xsltUrl);
xslt.Transform(doc, xsltArgs, writer);
}
#endregion
#region Private Methods
private static void FilePreparePath(string target)
{
if (File.Exists(target))
{
FileAttributes atts = File.GetAttributes(target);
File.SetAttributes(target, atts & ~FileAttributes.ReadOnly);
}
else
{
string dir = Path.GetDirectoryName(target);
if (!Directory.Exists(dir))
{
Directory.CreateDirectory(dir);
}
}
}
private static DateTime RemoveMilliseconds(DateTime t)
{
return new DateTime(t.Year, t.Month, t.Day, t.Hour, t.Minute, t.Second, 0);
}
// ReSharper disable UnusedMethodReturnValue.Local
private static long SaveStream(Stream stream, string path, DateTime touchDate, int streamBufferSize)
// ReSharper restore UnusedMethodReturnValue.Local
{
FilePreparePath(path);
FileStream fs = new FileStream(path, FileMode.Create, FileAccess.Write);
BinaryReader br = null;
BinaryWriter bw = null;
long len = 0;
try
{
br = new BinaryReader(stream);
bw = new BinaryWriter(fs);
byte[] buffer;
do
{
buffer = br.ReadBytes(streamBufferSize);
len += buffer.Length;
if (buffer.Length > 0)
{
bw.Write(buffer);
}
} while (buffer.Length > 0);
}
finally
{
if (br != null)
{
br.Close();
}
if (bw != null)
{
bw.Flush();
bw.Close();
}
if (fs != null)
{
fs.Close();
}
}
File.SetLastWriteTime(path, touchDate);
return len;
}
private HttpStatusCode Get(Uri uri, string method, string path, HtmlDocument doc, IWebProxy proxy,
ICredentials creds)
{
string cachePath = null;
HttpWebRequest req;
bool oldFile = false;
req = WebRequest.Create(uri) as HttpWebRequest;
req.Method = method;
if (proxy != null)
{
if (creds != null)
{
proxy.Credentials = creds;
req.Credentials = creds;
}
else
{
proxy.Credentials = CredentialCache.DefaultCredentials;
req.Credentials = CredentialCache.DefaultCredentials;
}
req.Proxy = proxy;
}
_fromCache = false;
_requestDuration = 0;
int tc = Environment.TickCount;
if (UsingCache)
{
cachePath = GetCachePath(req.RequestUri);
if (File.Exists(cachePath))
{
req.IfModifiedSince = File.GetLastAccessTime(cachePath);
oldFile = true;
}
}
if (_cacheOnly)
{
if (!File.Exists(cachePath))
{
throw new HtmlWebException("File was not found at cache path: '" + cachePath + "'");
}
if (path != null)
{
IOLibrary.CopyAlways(cachePath, path);
// touch the file
File.SetLastWriteTime(path, File.GetLastWriteTime(cachePath));
}
_fromCache = true;
return HttpStatusCode.NotModified;
}
if (_useCookies)
{
req.CookieContainer = new CookieContainer();
}
if (PreRequest != null)
{
// allow our user to change the request at will
if (!PreRequest(req))
{
return HttpStatusCode.ResetContent;
}
// dump cookie
// if (_useCookies)
// {
// foreach(Cookie cookie in req.CookieContainer.GetCookies(req.RequestUri))
// {
// HtmlLibrary.Trace("Cookie " + cookie.Name + "=" + cookie.Value + " path=" + cookie.Path + " domain=" + cookie.Domain);
// }
// }
}
HttpWebResponse resp;
try
{
resp = req.GetResponse() as HttpWebResponse;
}
catch (WebException we)
{
_requestDuration = Environment.TickCount - tc;
resp = (HttpWebResponse)we.Response;
if (resp == null)
{
if (oldFile)
{
if (path != null)
{
IOLibrary.CopyAlways(cachePath, path);
// touch the file
File.SetLastWriteTime(path, File.GetLastWriteTime(cachePath));
}
return HttpStatusCode.NotModified;
}
throw;
}
}
catch (Exception)
{
_requestDuration = Environment.TickCount - tc;
throw;
}
// allow our user to get some info from the response
if (PostResponse != null)
{
PostResponse(req, resp);
}
_requestDuration = Environment.TickCount - tc;
_responseUri = resp.ResponseUri;
bool html = IsHtmlContent(resp.ContentType);
Encoding respenc;
if ((resp.ContentEncoding != null) && (resp.ContentEncoding.Length > 0))
{
respenc = Encoding.GetEncoding(resp.ContentEncoding);
}
else
{
respenc = null;
}
if (resp.StatusCode == HttpStatusCode.NotModified)
{
if (UsingCache)
{
_fromCache = true;
if (path != null)
{
IOLibrary.CopyAlways(cachePath, path);
// touch the file
File.SetLastWriteTime(path, File.GetLastWriteTime(cachePath));
}
return resp.StatusCode;
}
else
{
// this should *never* happen...
throw new HtmlWebException("Server has send a NotModifed code, without cache enabled.");
}
}
Stream s = resp.GetResponseStream();
if (s != null)
{
if (UsingCache)
{
// NOTE: LastModified does not contain milliseconds, so we remove them to the file
SaveStream(s, cachePath, RemoveMilliseconds(resp.LastModified), _streamBufferSize);
// save headers
SaveCacheHeaders(req.RequestUri, resp);
if (path != null)
{
// copy and touch the file
IOLibrary.CopyAlways(cachePath, path);
File.SetLastWriteTime(path, File.GetLastWriteTime(cachePath));
}
}
else
{
// try to work in-memory
if ((doc != null) && (html))
{
if (respenc != null)
{
doc.Load(s, respenc);
}
else
{
doc.Load(s, true);
}
}
}
resp.Close();
}
return resp.StatusCode;
}
private string GetCacheHeader(Uri requestUri, string name, string def)
{
// note: some headers are collection (ex: www-authenticate)
// we don't handle that here
XmlDocument doc = new XmlDocument();
doc.Load(GetCacheHeadersPath(requestUri));
XmlNode node =
doc.SelectSingleNode("//h[translate(@n, 'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')='" +
name.ToUpper() + "']");
if (node == null)
{
return def;
}
// attribute should exist
return node.Attributes[name].Value;
}
private string GetCacheHeadersPath(Uri uri)
{
//return Path.Combine(GetCachePath(uri), ".h.xml");
return GetCachePath(uri) + ".h.xml";
}
private bool IsCacheHtmlContent(string path)
{
string ct = GetContentTypeForExtension(Path.GetExtension(path), null);
return IsHtmlContent(ct);
}
private bool IsHtmlContent(string contentType)
{
return contentType.ToLower().StartsWith("text/html");
}
private HtmlDocument LoadUrl(Uri uri, string method, WebProxy proxy, NetworkCredential creds)
{
HtmlDocument doc = new HtmlDocument();
doc.OptionAutoCloseOnEnd = false;
doc.OptionFixNestedTags = true;
_statusCode = Get(uri, method, null, doc, proxy, creds);
if (_statusCode == HttpStatusCode.NotModified)
{
// read cached encoding
doc.DetectEncodingAndLoad(GetCachePath(uri));
}
return doc;
}
private void SaveCacheHeaders(Uri requestUri, HttpWebResponse resp)
{
// we cache the original headers aside the cached document.
string file = GetCacheHeadersPath(requestUri);
XmlDocument doc = new XmlDocument();
doc.LoadXml("<c></c>");
XmlNode cache = doc.FirstChild;
foreach (string header in resp.Headers)
{
XmlNode entry = doc.CreateElement("h");
XmlAttribute att = doc.CreateAttribute("n");
att.Value = header;
entry.Attributes.Append(att);
att = doc.CreateAttribute("v");
att.Value = resp.Headers[header];
entry.Attributes.Append(att);
cache.AppendChild(entry);
}
doc.Save(file);
}
#endregion
}
}
+24
View File
@@ -0,0 +1,24 @@
// HtmlAgilityPack V1.0 - Simon Mourier <simon underscore mourier at hotmail dot com>
using System;
namespace HtmlAgilityPack
{
/// <summary>
/// Represents an exception thrown by the HtmlWeb utility class.
/// </summary>
public class HtmlWebException : Exception
{
#region Constructors
/// <summary>
/// Creates an instance of the HtmlWebException.
/// </summary>
/// <param name="message">The exception's message.</param>
public HtmlWebException(string message)
: base(message)
{
}
#endregion
}
}
+28
View File
@@ -0,0 +1,28 @@
// HtmlAgilityPack V1.0 - Simon Mourier <simon underscore mourier at hotmail dot com>
using System.IO;
namespace HtmlAgilityPack
{
internal struct IOLibrary
{
#region Internal Methods
internal static void CopyAlways(string source, string target)
{
if (!File.Exists(source))
return;
Directory.CreateDirectory(Path.GetDirectoryName(target));
MakeWritable(target);
File.Copy(source, target, true);
}
internal static void MakeWritable(string path)
{
if (!File.Exists(path))
return;
File.SetAttributes(path, File.GetAttributes(path) & ~FileAttributes.ReadOnly);
}
#endregion
}
}
+27
View File
@@ -0,0 +1,27 @@
Microsoft Permissive License (Ms-PL)
This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software.
1. Definitions
The terms “reproduce,” “reproduction,” “derivative works,” and “distribution” have the same meaning here as under U.S. copyright law.
A “contribution” is the original software, or any additions or changes to the software.
A “contributor” is any person that distributes its contribution under this license.
“Licensed patents” are a contributor’s patent claims that read directly on its contribution.
2. Grant of Rights
(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.
(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.
3. Conditions and Limitations
(A) No Trademark License- This license does not grant you rights to use any contributors’ name, logo, or trademarks.
(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.
(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.
(D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.
(E) The software is licensed “as-is.” You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.
(F) If you distribute the software or derivative works with programs you develop, you agree to indemnify, defend, and hold harmless all contributors from any claims, including attorneys’ fees, related to the distribution or use of your programs. For clarity, you have no such obligations to a contributor for any claims based solely on the unmodified contributions of that contributor.
(G) If you make any additions or changes to the original software, you may only distribute them under a new namespace. In addition, you will clearly identify your changes or additions as your own.
+453
View File
@@ -0,0 +1,453 @@
// HtmlAgilityPack V1.0 - Simon Mourier <simon underscore mourier at hotmail dot com>
using System;
using System.IO;
using System.Text;
namespace HtmlAgilityPack
{
/// <summary>
/// Represents a document with mixed code and text. ASP, ASPX, JSP, are good example of such documents.
/// </summary>
public class MixedCodeDocument
{
#region Fields
private int _c;
internal MixedCodeDocumentFragmentList _codefragments;
private MixedCodeDocumentFragment _currentfragment;
internal MixedCodeDocumentFragmentList _fragments;
private int _index;
private int _line;
private int _lineposition;
private ParseState _state;
private Encoding _streamencoding;
internal string _text;
internal MixedCodeDocumentFragmentList _textfragments;
/// <summary>
/// Gets or sets the token representing code end.
/// </summary>
public string TokenCodeEnd = "%>";
/// <summary>
/// Gets or sets the token representing code start.
/// </summary>
public string TokenCodeStart = "<%";
/// <summary>
/// Gets or sets the token representing code directive.
/// </summary>
public string TokenDirective = "@";
/// <summary>
/// Gets or sets the token representing response write directive.
/// </summary>
public string TokenResponseWrite = "Response.Write ";
private string TokenTextBlock = "TextBlock({0})";
#endregion
#region Constructors
/// <summary>
/// Creates a mixed code document instance.
/// </summary>
public MixedCodeDocument()
{
_codefragments = new MixedCodeDocumentFragmentList(this);
_textfragments = new MixedCodeDocumentFragmentList(this);
_fragments = new MixedCodeDocumentFragmentList(this);
}
#endregion
#region Properties
/// <summary>
/// Gets the code represented by the mixed code document seen as a template.
/// </summary>
public string Code
{
get
{
string s = "";
int i = 0;
foreach (MixedCodeDocumentFragment frag in _fragments)
{
switch (frag._type)
{
case MixedCodeDocumentFragmentType.Text:
s += TokenResponseWrite + string.Format(TokenTextBlock, i) + "\n";
i++;
break;
case MixedCodeDocumentFragmentType.Code:
s += ((MixedCodeDocumentCodeFragment) frag).Code + "\n";
break;
}
}
return s;
}
}
/// <summary>
/// Gets the list of code fragments in the document.
/// </summary>
public MixedCodeDocumentFragmentList CodeFragments
{
get { return _codefragments; }
}
/// <summary>
/// Gets the list of all fragments in the document.
/// </summary>
public MixedCodeDocumentFragmentList Fragments
{
get { return _fragments; }
}
/// <summary>
/// Gets the encoding of the stream used to read the document.
/// </summary>
public Encoding StreamEncoding
{
get { return _streamencoding; }
}
/// <summary>
/// Gets the list of text fragments in the document.
/// </summary>
public MixedCodeDocumentFragmentList TextFragments
{
get { return _textfragments; }
}
#endregion
#region Public Methods
/// <summary>
/// Create a code fragment instances.
/// </summary>
/// <returns>The newly created code fragment instance.</returns>
public MixedCodeDocumentCodeFragment CreateCodeFragment()
{
return (MixedCodeDocumentCodeFragment) CreateFragment(MixedCodeDocumentFragmentType.Code);
}
/// <summary>
/// Create a text fragment instances.
/// </summary>
/// <returns>The newly created text fragment instance.</returns>
public MixedCodeDocumentTextFragment CreateTextFragment()
{
return (MixedCodeDocumentTextFragment) CreateFragment(MixedCodeDocumentFragmentType.Text);
}
/// <summary>
/// Loads a mixed code document from a stream.
/// </summary>
/// <param name="stream">The input stream.</param>
public void Load(Stream stream)
{
Load(new StreamReader(stream));
}
/// <summary>
/// Loads a mixed code document from a stream.
/// </summary>
/// <param name="stream">The input stream.</param>
/// <param name="detectEncodingFromByteOrderMarks">Indicates whether to look for byte order marks at the beginning of the file.</param>
public void Load(Stream stream, bool detectEncodingFromByteOrderMarks)
{
Load(new StreamReader(stream, detectEncodingFromByteOrderMarks));
}
/// <summary>
/// Loads a mixed code document from a stream.
/// </summary>
/// <param name="stream">The input stream.</param>
/// <param name="encoding">The character encoding to use.</param>
public void Load(Stream stream, Encoding encoding)
{
Load(new StreamReader(stream, encoding));
}
/// <summary>
/// Loads a mixed code document from a stream.
/// </summary>
/// <param name="stream">The input stream.</param>
/// <param name="encoding">The character encoding to use.</param>
/// <param name="detectEncodingFromByteOrderMarks">Indicates whether to look for byte order marks at the beginning of the file.</param>
public void Load(Stream stream, Encoding encoding, bool detectEncodingFromByteOrderMarks)
{
Load(new StreamReader(stream, encoding, detectEncodingFromByteOrderMarks));
}
/// <summary>
/// Loads a mixed code document from a stream.
/// </summary>
/// <param name="stream">The input stream.</param>
/// <param name="encoding">The character encoding to use.</param>
/// <param name="detectEncodingFromByteOrderMarks">Indicates whether to look for byte order marks at the beginning of the file.</param>
/// <param name="buffersize">The minimum buffer size.</param>
public void Load(Stream stream, Encoding encoding, bool detectEncodingFromByteOrderMarks, int buffersize)
{
Load(new StreamReader(stream, encoding, detectEncodingFromByteOrderMarks, buffersize));
}
/// <summary>
/// Loads a mixed code document from a file.
/// </summary>
/// <param name="path">The complete file path to be read.</param>
public void Load(string path)
{
Load(new StreamReader(path));
}
/// <summary>
/// Loads a mixed code document from a file.
/// </summary>
/// <param name="path">The complete file path to be read.</param>
/// <param name="detectEncodingFromByteOrderMarks">Indicates whether to look for byte order marks at the beginning of the file.</param>
public void Load(string path, bool detectEncodingFromByteOrderMarks)
{
Load(new StreamReader(path, detectEncodingFromByteOrderMarks));
}
/// <summary>
/// Loads a mixed code document from a file.
/// </summary>
/// <param name="path">The complete file path to be read.</param>
/// <param name="encoding">The character encoding to use.</param>
public void Load(string path, Encoding encoding)
{
Load(new StreamReader(path, encoding));
}
/// <summary>
/// Loads a mixed code document from a file.
/// </summary>
/// <param name="path">The complete file path to be read.</param>
/// <param name="encoding">The character encoding to use.</param>
/// <param name="detectEncodingFromByteOrderMarks">Indicates whether to look for byte order marks at the beginning of the file.</param>
public void Load(string path, Encoding encoding, bool detectEncodingFromByteOrderMarks)
{
Load(new StreamReader(path, encoding, detectEncodingFromByteOrderMarks));
}
/// <summary>
/// Loads a mixed code document from a file.
/// </summary>
/// <param name="path">The complete file path to be read.</param>
/// <param name="encoding">The character encoding to use.</param>
/// <param name="detectEncodingFromByteOrderMarks">Indicates whether to look for byte order marks at the beginning of the file.</param>
/// <param name="buffersize">The minimum buffer size.</param>
public void Load(string path, Encoding encoding, bool detectEncodingFromByteOrderMarks, int buffersize)
{
Load(new StreamReader(path, encoding, detectEncodingFromByteOrderMarks, buffersize));
}
/// <summary>
/// Loads the mixed code document from the specified TextReader.
/// </summary>
/// <param name="reader">The TextReader used to feed the HTML data into the document.</param>
public void Load(TextReader reader)
{
_codefragments.Clear();
_textfragments.Clear();
// all pseudo constructors get down to this one
StreamReader sr = reader as StreamReader;
if (sr != null)
{
_streamencoding = sr.CurrentEncoding;
}
_text = reader.ReadToEnd();
reader.Close();
Parse();
}
/// <summary>
/// Loads a mixed document from a text
/// </summary>
/// <param name="html">The text to load.</param>
public void LoadHtml(string html)
{
Load(new StringReader(html));
}
/// <summary>
/// Saves the mixed document to the specified stream.
/// </summary>
/// <param name="outStream">The stream to which you want to save.</param>
public void Save(Stream outStream)
{
StreamWriter sw = new StreamWriter(outStream, GetOutEncoding());
Save(sw);
}
/// <summary>
/// Saves the mixed document to the specified stream.
/// </summary>
/// <param name="outStream">The stream to which you want to save.</param>
/// <param name="encoding">The character encoding to use.</param>
public void Save(Stream outStream, Encoding encoding)
{
StreamWriter sw = new StreamWriter(outStream, encoding);
Save(sw);
}
/// <summary>
/// Saves the mixed document to the specified file.
/// </summary>
/// <param name="filename">The location of the file where you want to save the document.</param>
public void Save(string filename)
{
StreamWriter sw = new StreamWriter(filename, false, GetOutEncoding());
Save(sw);
}
/// <summary>
/// Saves the mixed document to the specified file.
/// </summary>
/// <param name="filename">The location of the file where you want to save the document.</param>
/// <param name="encoding">The character encoding to use.</param>
public void Save(string filename, Encoding encoding)
{
StreamWriter sw = new StreamWriter(filename, false, encoding);
Save(sw);
}
/// <summary>
/// Saves the mixed document to the specified StreamWriter.
/// </summary>
/// <param name="writer">The StreamWriter to which you want to save.</param>
public void Save(StreamWriter writer)
{
Save((TextWriter) writer);
}
/// <summary>
/// Saves the mixed document to the specified TextWriter.
/// </summary>
/// <param name="writer">The TextWriter to which you want to save.</param>
public void Save(TextWriter writer)
{
writer.Flush();
}
#endregion
#region Internal Methods
internal MixedCodeDocumentFragment CreateFragment(MixedCodeDocumentFragmentType type)
{
switch (type)
{
case MixedCodeDocumentFragmentType.Text:
return new MixedCodeDocumentTextFragment(this);
case MixedCodeDocumentFragmentType.Code:
return new MixedCodeDocumentCodeFragment(this);
default:
throw new NotSupportedException();
}
}
internal Encoding GetOutEncoding()
{
if (_streamencoding != null)
return _streamencoding;
return Encoding.Default;
}
#endregion
#region Private Methods
private void IncrementPosition()
{
_index++;
if (_c == 10)
{
_lineposition = 1;
_line++;
}
else
_lineposition++;
}
private void Parse()
{
_state = ParseState.Text;
_index = 0;
_currentfragment = CreateFragment(MixedCodeDocumentFragmentType.Text);
while (_index < _text.Length)
{
_c = _text[_index];
IncrementPosition();
switch (_state)
{
case ParseState.Text:
if (_index + TokenCodeStart.Length < _text.Length)
{
if (_text.Substring(_index - 1, TokenCodeStart.Length) == TokenCodeStart)
{
_state = ParseState.Code;
_currentfragment.Length = _index - 1 - _currentfragment.Index;
_currentfragment = CreateFragment(MixedCodeDocumentFragmentType.Code);
SetPosition();
continue;
}
}
break;
case ParseState.Code:
if (_index + TokenCodeEnd.Length < _text.Length)
{
if (_text.Substring(_index - 1, TokenCodeEnd.Length) == TokenCodeEnd)
{
_state = ParseState.Text;
_currentfragment.Length = _index + TokenCodeEnd.Length - _currentfragment.Index;
_index += TokenCodeEnd.Length;
_lineposition += TokenCodeEnd.Length;
_currentfragment = CreateFragment(MixedCodeDocumentFragmentType.Text);
SetPosition();
continue;
}
}
break;
}
}
_currentfragment.Length = _index - _currentfragment.Index;
}
private void SetPosition()
{
_currentfragment.Line = _line;
_currentfragment._lineposition = _lineposition;
_currentfragment.Index = _index - 1;
_currentfragment.Length = 0;
}
#endregion
#region Nested type: ParseState
private enum ParseState
{
Text,
Code
}
#endregion
}
}
@@ -0,0 +1,51 @@
// HtmlAgilityPack V1.0 - Simon Mourier <simon underscore mourier at hotmail dot com>
namespace HtmlAgilityPack
{
/// <summary>
/// Represents a fragment of code in a mixed code document.
/// </summary>
public class MixedCodeDocumentCodeFragment : MixedCodeDocumentFragment
{
#region Fields
private string _code;
#endregion
#region Constructors
internal MixedCodeDocumentCodeFragment(MixedCodeDocument doc)
:
base(doc, MixedCodeDocumentFragmentType.Code)
{
}
#endregion
#region Properties
/// <summary>
/// Gets the fragment code text.
/// </summary>
public string Code
{
get
{
if (_code == null)
{
_code = FragmentText.Substring(Doc.TokenCodeStart.Length,
FragmentText.Length - Doc.TokenCodeEnd.Length -
Doc.TokenCodeStart.Length - 1).Trim();
if (_code.StartsWith("="))
{
_code = Doc.TokenResponseWrite + _code.Substring(1, _code.Length - 1);
}
}
return _code;
}
set { _code = value; }
}
#endregion
}
}
@@ -0,0 +1,95 @@
// HtmlAgilityPack V1.0 - Simon Mourier <simon underscore mourier at hotmail dot com>
namespace HtmlAgilityPack
{
/// <summary>
/// Represents a base class for fragments in a mixed code document.
/// </summary>
public abstract class MixedCodeDocumentFragment
{
#region Fields
internal MixedCodeDocument Doc;
private string _fragmentText;
internal int Index;
internal int Length;
private int _line;
internal int _lineposition;
internal MixedCodeDocumentFragmentType _type;
#endregion
#region Constructors
internal MixedCodeDocumentFragment(MixedCodeDocument doc, MixedCodeDocumentFragmentType type)
{
Doc = doc;
_type = type;
switch (type)
{
case MixedCodeDocumentFragmentType.Text:
Doc._textfragments.Append(this);
break;
case MixedCodeDocumentFragmentType.Code:
Doc._codefragments.Append(this);
break;
}
Doc._fragments.Append(this);
}
#endregion
#region Properties
/// <summary>
/// Gets the fragement text.
/// </summary>
public string FragmentText
{
get
{
if (_fragmentText == null)
{
_fragmentText = Doc._text.Substring(Index, Length);
}
return FragmentText;
}
internal set { _fragmentText = value; }
}
/// <summary>
/// Gets the type of fragment.
/// </summary>
public MixedCodeDocumentFragmentType FragmentType
{
get { return _type; }
}
/// <summary>
/// Gets the line number of the fragment.
/// </summary>
public int Line
{
get { return _line; }
internal set { _line = value; }
}
/// <summary>
/// Gets the line position (column) of the fragment.
/// </summary>
public int LinePosition
{
get { return _lineposition; }
}
/// <summary>
/// Gets the fragment position in the document's stream.
/// </summary>
public int StreamPosition
{
get { return Index; }
}
#endregion
}
}
@@ -0,0 +1,236 @@
// HtmlAgilityPack V1.0 - Simon Mourier <simon underscore mourier at hotmail dot com>
using System;
using System.Collections;
namespace HtmlAgilityPack
{
/// <summary>
/// Represents a list of mixed code fragments.
/// </summary>
public class MixedCodeDocumentFragmentList : IEnumerable
{
#region Fields
private MixedCodeDocument _doc;
private ArrayList _items = new ArrayList();
#endregion
#region Constructors
internal MixedCodeDocumentFragmentList(MixedCodeDocument doc)
{
_doc = doc;
}
#endregion
#region Properties
///<summary>
/// Gets the Document
///</summary>
public MixedCodeDocument Doc
{
get { return _doc; }
}
/// <summary>
/// Gets the number of fragments contained in the list.
/// </summary>
public int Count
{
get { return _items.Count; }
}
/// <summary>
/// Gets a fragment from the list using its index.
/// </summary>
public MixedCodeDocumentFragment this[int index]
{
get { return _items[index] as MixedCodeDocumentFragment; }
}
#endregion
#region IEnumerable Members
/// <summary>
/// Gets an enumerator that can iterate through the fragment list.
/// </summary>
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
#endregion
#region Public Methods
/// <summary>
/// Appends a fragment to the list of fragments.
/// </summary>
/// <param name="newFragment">The fragment to append. May not be null.</param>
public void Append(MixedCodeDocumentFragment newFragment)
{
if (newFragment == null)
{
throw new ArgumentNullException("newFragment");
}
_items.Add(newFragment);
}
/// <summary>
/// Gets an enumerator that can iterate through the fragment list.
/// </summary>
public MixedCodeDocumentFragmentEnumerator GetEnumerator()
{
return new MixedCodeDocumentFragmentEnumerator(_items);
}
/// <summary>
/// Prepends a fragment to the list of fragments.
/// </summary>
/// <param name="newFragment">The fragment to append. May not be null.</param>
public void Prepend(MixedCodeDocumentFragment newFragment)
{
if (newFragment == null)
{
throw new ArgumentNullException("newFragment");
}
_items.Insert(0, newFragment);
}
/// <summary>
/// Remove a fragment from the list of fragments. If this fragment was not in the list, an exception will be raised.
/// </summary>
/// <param name="fragment">The fragment to remove. May not be null.</param>
public void Remove(MixedCodeDocumentFragment fragment)
{
if (fragment == null)
{
throw new ArgumentNullException("fragment");
}
int index = GetFragmentIndex(fragment);
if (index == -1)
{
throw new IndexOutOfRangeException();
}
RemoveAt(index);
}
/// <summary>
/// Remove all fragments from the list.
/// </summary>
public void RemoveAll()
{
_items.Clear();
}
/// <summary>
/// Remove a fragment from the list of fragments, using its index in the list.
/// </summary>
/// <param name="index">The index of the fragment to remove.</param>
public void RemoveAt(int index)
{
//MixedCodeDocumentFragment frag = (MixedCodeDocumentFragment) _items[index];
_items.RemoveAt(index);
}
#endregion
#region Internal Methods
internal void Clear()
{
_items.Clear();
}
internal int GetFragmentIndex(MixedCodeDocumentFragment fragment)
{
if (fragment == null)
{
throw new ArgumentNullException("fragment");
}
for (int i = 0; i < _items.Count; i++)
{
if ((_items[i]) == fragment)
{
return i;
}
}
return -1;
}
#endregion
#region Nested type: MixedCodeDocumentFragmentEnumerator
/// <summary>
/// Represents a fragment enumerator.
/// </summary>
public class MixedCodeDocumentFragmentEnumerator : IEnumerator
{
#region Fields
private int _index;
private ArrayList _items;
#endregion
#region Constructors
internal MixedCodeDocumentFragmentEnumerator(ArrayList items)
{
_items = items;
_index = -1;
}
#endregion
#region Properties
/// <summary>
/// Gets the current element in the collection.
/// </summary>
public MixedCodeDocumentFragment Current
{
get { return (MixedCodeDocumentFragment) (_items[_index]); }
}
#endregion
#region IEnumerator Members
/// <summary>
/// Gets the current element in the collection.
/// </summary>
object IEnumerator.Current
{
get { return (Current); }
}
/// <summary>
/// Advances the enumerator to the next element of the collection.
/// </summary>
/// <returns>true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection.</returns>
public bool MoveNext()
{
_index++;
return (_index < _items.Count);
}
/// <summary>
/// Sets the enumerator to its initial position, which is before the first element in the collection.
/// </summary>
public void Reset()
{
_index = -1;
}
#endregion
}
#endregion
}
}
@@ -0,0 +1,19 @@
// HtmlAgilityPack V1.0 - Simon Mourier <simon underscore mourier at hotmail dot com>
namespace HtmlAgilityPack
{
/// <summary>
/// Represents the type of fragment in a mixed code document.
/// </summary>
public enum MixedCodeDocumentFragmentType
{
/// <summary>
/// The fragment contains code.
/// </summary>
Code,
/// <summary>
/// The fragment contains text.
/// </summary>
Text,
}
}
@@ -0,0 +1,32 @@
// HtmlAgilityPack V1.0 - Simon Mourier <simon underscore mourier at hotmail dot com>
namespace HtmlAgilityPack
{
/// <summary>
/// Represents a fragment of text in a mixed code document.
/// </summary>
public class MixedCodeDocumentTextFragment : MixedCodeDocumentFragment
{
#region Constructors
internal MixedCodeDocumentTextFragment(MixedCodeDocument doc)
:
base(doc, MixedCodeDocumentFragmentType.Text)
{
}
#endregion
#region Properties
/// <summary>
/// Gets the fragment text.
/// </summary>
public string Text
{
get { return FragmentText; }
set { FragmentText = value; }
}
#endregion
}
}
+35
View File
@@ -0,0 +1,35 @@
// HtmlAgilityPack V1.0 - Simon Mourier <simon underscore mourier at hotmail dot com>
namespace HtmlAgilityPack
{
internal class NameValuePair
{
#region Fields
internal readonly string Name;
internal string Value;
#endregion
#region Constructors
internal NameValuePair()
{
}
internal NameValuePair(string name)
:
this()
{
Name = name;
}
internal NameValuePair(string name, string value)
:
this(name)
{
Value = value;
}
#endregion
}
}
+101
View File
@@ -0,0 +1,101 @@
// HtmlAgilityPack V1.0 - Simon Mourier <simon underscore mourier at hotmail dot com>
using System;
using System.Collections;
namespace HtmlAgilityPack
{
internal class NameValuePairList
{
#region Fields
internal readonly string Text;
private ArrayList _allPairs;
private Hashtable _pairsWithName;
#endregion
#region Constructors
internal NameValuePairList() :
this(null)
{
}
internal NameValuePairList(string text)
{
Text = text;
_allPairs = new ArrayList();
_pairsWithName = new Hashtable();
Parse(text);
}
#endregion
#region Internal Methods
internal static string GetNameValuePairsValue(string text, string name)
{
NameValuePairList l = new NameValuePairList(text);
return l.GetNameValuePairValue(name);
}
internal ArrayList GetNameValuePairs(string name)
{
if (name == null)
return _allPairs;
return _pairsWithName[name] as ArrayList;
}
internal string GetNameValuePairValue(string name)
{
if (name == null)
throw new ArgumentNullException();
ArrayList al = GetNameValuePairs(name);
if (al == null)
return null;
// return first item
NameValuePair nvp = al[0] as NameValuePair;
return nvp != null ? nvp.Value : string.Empty;
}
#endregion
#region Private Methods
private void Parse(string text)
{
_allPairs.Clear();
_pairsWithName.Clear();
if (text == null)
return;
string[] p = text.Split(';');
foreach (string pv in p)
{
if (pv.Length == 0)
continue;
string[] onep = pv.Split(new char[] {'='}, 2);
if (onep.Length==0)
continue;
NameValuePair nvp = new NameValuePair(onep[0].Trim().ToLower());
nvp.Value = onep.Length < 2 ? "" : onep[1];
_allPairs.Add(nvp);
// index by name
ArrayList al = _pairsWithName[nvp.Name] as ArrayList;
if (al == null)
{
al = new ArrayList();
_pairsWithName[nvp.Name] = al;
}
al.Add(nvp);
}
}
#endregion
}
}
+156
View File
@@ -0,0 +1,156 @@
// HtmlAgilityPack V1.0 - Simon Mourier <simon underscore mourier at hotmail dot com>
namespace HtmlAgilityPack
{
/// <summary>
/// A utility class to compute CRC32.
/// </summary>
public class Crc32
{
#region Fields
private uint _crc32;
#endregion
#region Static Members
private static uint[] crc_32_tab = // CRC polynomial 0xedb88320
{
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f,
0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2,
0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,
0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9,
0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172,
0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c,
0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,
0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423,
0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106,
0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,
0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d,
0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e,
0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,
0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,
0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7,
0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0,
0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa,
0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81,
0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a,
0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84,
0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,
0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb,
0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc,
0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e,
0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,
0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55,
0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28,
0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d,
0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f,
0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38,
0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242,
0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,
0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69,
0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2,
0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc,
0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693,
0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94,
0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d
};
#endregion
#region Properties
internal uint CheckSum
{
get { return _crc32; }
set { _crc32 = value; }
}
#endregion
#region Public Methods
/// <summary>
/// Compute a checksum for a given array of bytes.
/// </summary>
/// <param name="bytes">The array of bytes to compute the checksum for.</param>
/// <returns>The computed checksum.</returns>
public static uint CRC32Bytes(byte[] bytes)
{
uint oldcrc32;
oldcrc32 = 0xFFFFFFFF;
int len = bytes.Length;
for (int i = 0; len > 0; i++)
{
--len;
oldcrc32 = UPDC32(bytes[len], oldcrc32);
}
return ~oldcrc32;
}
/// <summary>
/// Compute a checksum for a given string.
/// </summary>
/// <param name="text">The string to compute the checksum for.</param>
/// <returns>The computed checksum.</returns>
public static uint CRC32String(string text)
{
uint oldcrc32;
oldcrc32 = 0xFFFFFFFF;
int len = text.Length;
ushort uCharVal;
byte lowByte, hiByte;
for (int i = 0; len > 0; i++)
{
--len;
uCharVal = text[len];
unchecked
{
lowByte = (byte) (uCharVal & 0x00ff);
hiByte = (byte) (uCharVal >> 8);
}
oldcrc32 = UPDC32(hiByte, oldcrc32);
oldcrc32 = UPDC32(lowByte, oldcrc32);
}
return ~oldcrc32;
}
#endregion
#region Internal Methods
internal uint AddToCRC32(int c)
{
return AddToCRC32((ushort) c);
}
internal uint AddToCRC32(ushort c)
{
byte lowByte, hiByte;
lowByte = (byte) (c & 0x00ff);
hiByte = (byte) (c >> 8);
_crc32 = UPDC32(hiByte, _crc32);
_crc32 = UPDC32(lowByte, _crc32);
return ~_crc32;
}
#endregion
#region Private Methods
private static uint UPDC32(byte octet, uint crc)
{
return (crc_32_tab[((crc) ^ (octet)) & 0xff] ^ ((crc) >> 8));
}
#endregion
}
}
+12 -3
View File
@@ -13,7 +13,7 @@ ASSEMBLED_DOCS = \
EXTRA_DIST = \
abc-removal.txt \
AgilityPack.dll \
aot-compiler.txt \
api-style.css \
assembly-bundle \
check-exports \
@@ -24,6 +24,7 @@ EXTRA_DIST = \
docs.make \
documented \
embedded-api \
exception-handling.txt \
exceptions \
exdoc \
file-share-modes \
@@ -34,11 +35,13 @@ EXTRA_DIST = \
internal-calls \
ir-desc \
jit-imt \
jit-regalloc \
jit-thoughts \
jit-trampolines \
local-regalloc.txt \
magic.diff \
mini-doc.txt \
mini-porting.txt \
mono-api-metadata.html \
mono-file-formats.config\
mono-file-formats.source\
@@ -59,6 +62,7 @@ EXTRA_DIST = \
ssapre.txt \
stack-alignment \
stack-overflow.txt \
thread-safety.txt \
threading \
toc.xml \
TODO \
@@ -68,12 +72,14 @@ EXTRA_DIST = \
dist-hook:
$(mkdir_p) $(distdir)/sources
$(mkdir_p) $(distdir)/svgs
$(mkdir_p) $(distdir)/HtmlAgilityPack
cp sources/* $(distdir)/sources
cp svgs/* $(distdir)/svgs
cp HtmlAgilityPack/* $(distdir)/HtmlAgilityPack
clean-local:
-rm -Rf $(srcdir)/html
-rm -f $(srcdir)/deploy/* $(srcdir)/convert.exe*
-rm -f $(srcdir)/deploy/* $(srcdir)/convert.exe* $(srcdir)/AgilityPack.dll*
-cd $(srcdir) && rm -f $(ASSEMBLED_DOCS)
monoapi.zip: monoapi.tree
@@ -101,5 +107,8 @@ $(srcdir)/deploy/.stamp: convert.exe Makefile.am
extract: $(srcdir)/deploy/.stamp
convert.exe: convert.cs AgilityPack.dll
cd $(srcdir) && $(MAKE) PROFILE=net_1_1 -f docs.make topdir=$(mcs_topdir_from_srcdir) convert.exe
cd $(srcdir) && $(MAKE) PROFILE=net_2_0 -f docs.make topdir=$(mcs_topdir_from_srcdir) convert.exe
AgilityPack.dll:
cd $(srcdir) && $(MAKE) PROFILE=net_2_0 -f docs.make topdir=$(mcs_topdir_from_srcdir) AgilityPack.dll
+2 -10
View File
@@ -1,9 +1,3 @@
Documentation is now maintained on the mono wiki:
http://www.mono-project.com/Mono:Runtime:Documentation
Older documents or documents which were not yet migrated to the wiki are kept here.
* Scripts to maintain the Mono VM internal API
Layout
@@ -64,10 +58,8 @@ PROGRAMS
* convert.cs
Converts an HTML file into a valid XML document, uses the
AgilityPack.dll. The sources to this DLL live in GNOME CVS
module beagle/Filters/AgilityPack.
A binary is shipped for our convenience.
AgilityPack.dll. The sources to this DLL live in the
HtmlAgilityPack folder, and are a prerequisite for convert.exe.
DATAFILES:
---------
+393
View File
@@ -0,0 +1,393 @@
Mono Ahead Of Time Compiler
===========================
The Ahead of Time compilation feature in Mono allows Mono to
precompile assemblies to minimize JIT time, reduce memory
usage at runtime and increase the code sharing across multiple
running Mono application.
To precompile an assembly use the following command:
mono --aot -O=all assembly.exe
The `--aot' flag instructs Mono to ahead-of-time compile your
assembly, while the -O=all flag instructs Mono to use all the
available optimizations.
* Caching metadata
------------------
Besides code, the AOT file also contains cached metadata information which allows
the runtime to avoid certain computations at runtime, like the computation of
generic vtables. This reduces both startup time, and memory usage. It is possible
to create an AOT image which contains only this cached information and no code by
using the 'metadata-only' option during compilation:
mono --aot=metadata-only assembly.exe
This works even on platforms where AOT is not normally supported.
* Position Independent Code
---------------------------
On x86 and x86-64 the code generated by Ahead-of-Time compiled
images is position-independent code. This allows the same
precompiled image to be reused across multiple applications
without having different copies: this is the same way in which
ELF shared libraries work: the code produced can be relocated
to any address.
The implementation of Position Independent Code had a
performance impact on Ahead-of-Time compiled images but
compiler bootstraps are still faster than JIT-compiled images,
specially with all the new optimizations provided by the Mono
engine.
* How to support Position Independent Code in new Mono Ports
------------------------------------------------------------
Generated native code needs to reference various runtime
structures/functions whose address is only known at run
time. JITted code can simple embed the address into the native
code, but AOT code needs to do an indirection. This
indirection is done through a table called the Global Offset
Table (GOT), which is similar to the GOT table in the Elf
spec. When the runtime saves the AOT image, it saves some
information for each method describing the GOT table entries
used by that method. When loading a method from an AOT image,
the runtime will fill out the GOT entries needed by the
method.
* Computing the address of the GOT
Methods which need to access the GOT first need to compute its
address. On the x86 it is done by code like this:
call <IP + 5>
pop ebx
add <OFFSET TO GOT>, ebx
<save got addr to a register>
The variable representing the got is stored in
cfg->got_var. It is allways allocated to a global register to
prevent some problems with branches + basic blocks.
* Referencing GOT entries
Any time the native code needs to access some other runtime
structure/function (i.e. any time the backend calls
mono_add_patch_info ()), the code pointed by the patch needs
to load the value from the got. For example, instead of:
call <ABSOLUTE ADDR>
it needs to do:
call *<OFFSET>(<GOT REG>)
Here, the <OFFSET> can be 0, it will be fixed up by the AOT compiler.
For more examples on the changes required, see
svn diff -r 37739:38213 mini-x86.c
* The Program Linkage Table
As in ELF, calls made from AOT code do not go through the GOT. Instead, a direct call is
made to an entry in the Program Linkage Table (PLT). This is based on the fact that on
most architectures, call instructions use a displacement instead of an absolute address, so
they are already position independent. An PLT entry is usually a jump instruction, which
initially points to some trampoline code which transfers control to the AOT loader, which
will compile the called method, and patch the PLT entry so that further calls are made
directly to the called method.
If the called method is in the same assembly, and does not need initialization (i.e. it
doesn't have GOT slots etc), then the call is made directly, bypassing the PLT.
* Implementation
----------------
** The Precompiled File Format
-----------------------------
We use the native object format of the platform. That way it
is possible to reuse existing tools like objdump and the
dynamic loader. All we need is a working assembler, i.e. we
write out a text file which is then passed to gas (the gnu
assembler) to generate the object file.
The precompiled image is stored in a file next to the original
assembly that is precompiled with the native extension for a shared
library (on Linux its ".so" to the generated file).
For example: basic.exe -> basic.exe.so; corlib.dll -> corlib.dll.so
To avoid symbol lookup overhead and to save space, some things like the
compiled code of the individual methods are not identified by specific symbols
like method_code_1234. Instead, they are stored in one big array and the
offsets inside this array are stored in another array, requiring just two
symbols. The offsets array is usually named 'FOO_offsets', where FOO is the
array the offsets refer to, like 'methods', and 'method_offsets'.
Generating code using an assembler and linker has some disadvantages:
- it requires GNU binutils or an equivalent package to be installed on the
machine running the aot compilation.
- it is slow.
There is some support in the aot compiler for directly emitting elf files, but
its not complete (yet).
The following things are saved in the object file and can be
looked up using the equivalent to dlsym:
mono_assembly_guid
A copy of the assembly GUID.
mono_aot_version
The format of the AOT file format.
mono_aot_opt_flags
The optimizations flags used to build this
precompiled image.
method_infos
Contains additional information needed by the runtime for using the
precompiled method, like the GOT entries it uses.
method_info_offsets
Maps method indexes to offsets in the method_infos array.
mono_icall_table
A table that lists all the internal calls
references by the precompiled image.
mono_image_table
A list of assemblies referenced by this AOT
module.
methods
The precompiled code itself.
method_offsets
Maps method indexes to offsets in the methods array.
ex_info
Contains information about methods which is rarely used during normal execution,
like exception and debug info.
ex_info_offsets
Maps method indexes to offsets in the ex_info array.
class_info
Contains precomputed metadata used to speed up various runtime functions.
class_info_offsets
Maps class indexes to offsets in the class_info array.
class_name_table
A hash table mapping class names to class indexes. Used to speed up
mono_class_from_name ().
plt
The Program Linkage Table
plt_info
Contains information needed to find the method belonging to a given PLT entry.
** Source file structure
-----------------------------
The AOT infrastructure is split into two files, aot-compiler.c and
aot-runtime.c. aot-compiler.c contains the AOT compiler which is invoked by
--aot, while aot-runtime.c contains the runtime support needed for loading
code and other things from the aot files.
** Compilation process
----------------------------
AOT compilation consists of the following stages:
- collecting the methods to be compiled.
- compiling them using the JIT.
- emitting the JITted code and other information into an assembly file (.s).
- assembling the file using the system assembler.
- linking the resulting object file into a shared library using the system
linker.
** Handling compiled code
----------------------------
Each method is identified by a method index. For normal methods, this is
equivalent to its index in the METHOD metadata table. For runtime generated
methods (wrappers), it is an arbitrary number.
Compiled code is created by invoking the JIT, requesting it to created AOT
code instead of normal code. This is done by the compile_method () function.
The output of the JIT is compiled code and a set of patches (relocations). Each
relocation specifies an offset inside the compiled code, and a runtime object
whose address is accessed at that offset.
Patches are described by a MonoJumpInfo structure. From the perspective
of the AOT compiler, there are two kinds of patches:
- calls, which require an entry in the PLT table.
- everything else, which require an entry in the GOT table.
How patches is handled is described in the next section.
After all the method are compiled, they are emitted into the output file into
a byte array called 'methods', The emission
is done by the emit_method_code () and emit_and_reloc_code () functions. Each
piece of compiled code is identified by the local symbol .Lm_<method index>.
While compiled code is emitted, all the locations which have an associated patch
are rewritten using a platform specific process so the final generated code will
refer to the plt and got entries belonging to the patches.
The compiled code array
can be accessed using the 'methods' global symbol.
** Handling patches
----------------------------
Before a piece of AOTed code can be used, the GOT entries used by it must be
filled out with the addresses of runtime objects. Those objects are identified
by MonoJumpInfo structures. These stuctures are saved in a serialized form in
the AOT file, so the AOT loader can deconstruct them. The serialization is done
by the encode_patch () function, while the deserialization is done by the
decode_patch_info () function.
Every method has an associated method info blob inside the 'method_info' byte
array in the AOT file. This contains all the information required to load the
method at runtime:
- the first got entry used by the method.
- the number of got entries used by the method.
- the serialized patch info for the got entries.
Some patches, like vtables, icalls are very common, so instead of emitting their
info every time they are used by a method, we emit the info only once into a
byte array named 'got_info', and only emit an index into this array for every
access.
** The Procedure Linkage Table (PLT)
------------------------------------
Our PLT is similar to the elf PLT, it is used to handle calls between methods.
If method A needs to call method B, then an entry is allocated in the PLT for
method B, and A calls that entry instead of B directly. This is useful because
in some cases the runtime needs to do some processing the first time B is
called.
There are two cases:
- if B is in another assembly, then it needs to be looked up, then JITted or the
corresponding AOT code needs to be found.
- if B is in the same assembly, but has got slots, then the got slots need to be
initialized.
If none of these cases is true, then the PLT is not used, and the call is made
directly to the native code of the target method.
A PLT entry is usually implemented by a jump though a jump table, where the
jump table entries are initially filled up with the address of a trampoline so
the runtime can get control, and after the native code of the called method is
created/found, the jump table entry is changed to point to the native code.
All PLT entries also embed a integer offset after the jump which indexes into
the 'plt_info' table, which stores the information required to find the called
method. The PLT is emitted by the emit_plt () function.
** Exception/Debug info
----------------------------
Each compiled method has some additional info generated by the JIT, usable
for debugging (IL offset-native offset maps) and exception handling
(saved registers, native offsets of try/catch clauses). Since this info is
rarely needed, it is saved into a separate byte array called 'ex_info'.
** Cached metadata
---------------------------
When the runtime loads a class, it needs to compute a variety of information
which is not readily available in the metadata, like the instance size,
vtable, whenever the class has a finalizer/type initializer etc. Computing this
information requires a lot of time, causes the loading of lots of metadata,
and it usually involves the creation of many runtime data structures
(MonoMethod/MonoMethodSignature etc), which are long living, and usually persist
for the lifetime of the app. To avoid this, we compute the required information
at aot compilation time, and save it into the aot image, into an array called
'class_info'. The runtime can query this information using the
mono_aot_get_cached_class_info () function, and if the information is available,
it can avoid computing it.
** Full AOT mode
-------------------------
Some platforms like the iphone prohibit JITted code, using technical and/or
legal means. This is a significant problem for the mono runtime, since it
generates a lot of code dynamically, using either the JIT or more low-level
code generation macros. To solve this, the AOT compiler is able to function in
full-aot or aot-only mode, where it generates and saves all the neccesary code
in the aot image, so at runtime, no code needs to be generated.
There are two kinds of code which needs to be considered:
- wrapper methods, that is methods whose IL is generated dynamically by the
runtime. They are handled by generating them in the add_wrappers () function,
then emitting them the same way as the 'normal' methods. The only problem is
that these methods do not have a methoddef token, so we need a separate table
in the aot image ('wrapper_info') to find their method index.
- trampolines and other small hand generated pieces of code. They are handled
in an ad-hoc way in the emit_trampolines () function.
* Performance considerations
----------------------------
Using AOT code is a trade-off which might lead to higher or
slower performance, depending on a lot of circumstances. Some
of these are:
- AOT code needs to be loaded from disk before being used, so
cold startup of an application using AOT code MIGHT be
slower than using JITed code. Warm startup (when the code is
already in the machines cache) should be faster. Also,
JITing code takes time, and the JIT compiler also need to
load additional metadata for the method from the disk, so
startup can be faster even in the cold startup case.
- AOT code is usually compiled with all optimizations turned
on, while JITted code is usually compiled with default
optimizations, so the generated code in the AOT case should
be faster.
- JITted code can directly access runtime data structures and
helper functions, while AOT code needs to go through an
indirection (the GOT) to access them, so it will be slower
and somewhat bigger as well.
- When JITting code, the JIT compiler needs to load a lot of
metadata about methods and types into memory.
- JITted code has better locality, meaning that if A method
calls B, then the native code for A and B is usually quite
close in memory, leading to better cache behaviour thus
improved performance. In contrast, the native code of
methods inside the AOT file is in a somewhat random order.
* Future Work
-------------
- Currently, when an AOT module is loaded, all of its
dependent assemblies are also loaded eagerly, and these
assemblies need to be exactly the same as the ones loaded
when the AOT module was created ('hard binding'). Non-hard
binding should be allowed.
- On x86, the generated code uses call 0, pop REG, add
GOTOFFSET, REG to materialize the GOT address. Newer
versions of gcc use a separate function to do this, maybe we
need to do the same.
- Currently, we get vtable addresses from the GOT. Another
solution would be to store the data from the vtables in the
.bss section, so accessing them would involve less
indirection.
+27
View File
@@ -0,0 +1,27 @@
Call Sites
Extracted from emails from Paolo Molaro
There are 3 basic different kinds of call sites:
1) normal calls:
call relative_displacement
2) virtual calls:
call *positive_offset(%register)
3) interface calls:
mov constant, %imt_register
call *negative_offset(%register)
The above is what happens on x86 and amd64, with different values of
%imt_register for each arch (this register is a constant, but it could
change with different mono builds, it should be likely one of
constants the runtime comunicates to the debugger). %register can
change depending on the callsite based on the register allocator
choices. Note that the constant for the interface calls won't
necessarily be a MonoMethod address: this could change in the future
to a simple number.
In all the 3 cases the JIT trampolines will need to inspect the call
site, but only in the first case the call site will be changed.
-3
View File
@@ -1,3 +0,0 @@
/.stamp
/*.html
/api-style.css
+3
View File
@@ -10,6 +10,9 @@ ASSEMBLED_DOCS = \
convert.exe: convert.cs AgilityPack.dll
$(CSCOMPILE) -out:$@ $< -r:AgilityPack.dll
AgilityPack.dll:
$(CSCOMPILE) -target:library -out:$@ HtmlAgilityPack/*.cs
monoapi.zip: monoapi.tree
@test -f $@ || { rm -f $< && $(MAKE) $<; }
monoapi.tree: toc.xml docs.make
+330
View File
@@ -0,0 +1,330 @@
Exception Handling In the Mono Runtime
--------------------------------------
* Introduction
--------------
There are many types of exceptions which the runtime needs to
handle. These are:
- exceptions thrown from managed code using the 'throw' or 'rethrow' CIL
instructions.
- exceptions thrown by some IL instructions like InvalidCastException thrown
by the 'castclass' CIL instruction.
- exceptions thrown by runtime code
- synchronous signals received while in managed code
- synchronous signals received while in native code
- asynchronous signals
Since exception handling is very arch dependent, parts of the
exception handling code reside in the arch specific
exceptions-<ARCH>.c files. The architecture independent parts
are in mini-exceptions.c. The different exception types listed
above are generated in different parts of the runtime, but
ultimately, they all end up in the mono_handle_exception ()
function in mini-exceptions.c.
* Exceptions throw programmatically from managed code
-----------------------------------------------------
These exceptions are thrown from managed code using 'throw' or
'rethrow' CIL instructions. The JIT compiler will translate
them to a call to a helper function called
'mono_arch_throw/rethrow_exception'.
These helper functions do not exist at compile time, they are
created dynamically at run time by the code in the
exceptions-<ARCH>.c files.
They perform various stack manipulation magic, then call a
helper function usually named throw_exception (), which does
further processing in C code, then calls
mono_handle_exception() to do the rest.
* Exceptions thrown implicitly from managed code
------------------------------------------------
These exceptions are thrown by some IL instructions when
something goes wrong. When the JIT needs to throw such an
exception, it emits a forward conditional branch and remembers
its position, along with the exception which needs to be
emitted. This is usually done in macros named
EMIT_COND_SYSTEM_EXCEPTION in the mini-<ARCH>.c files.
After the machine code for the method is emitted, the JIT
calls the arch dependent mono_arch_emit_exceptions () function
which will add the exception throwing code to the end of the
method, and patches up the previous forward branches so they
will point to this code.
This has the advantage that the rarely-executed exception
throwing code is kept separate from the method body, leading
to better icache performance.
The exception throwing code braches to the dynamically
generated mono_arch_throw_corlib_exception helper function,
which will create the proper exception object, does some stack
manipulation, then calls throw_exception ().
* Exceptions thrown by runtime code
-----------------------------------
These exceptions are usually thrown by the implementations of
InternalCalls (icalls). First an appropriate exception object
is created with the help of various helper functions in
metadata/exception.c, which has a separate helper function for
allocating each kind of exception object used by the runtime
code. Then the mono_raise_exception () function is called to
actually throw the exception. That function never returns.
An example:
if (something_is_wrong)
mono_raise_exception (mono_get_exception_index_out_of_range ());
mono_raise_exception () simply passes the exception to the JIT
side through an API, where it will be received by helper
created by mono_arch_throw_exception (). From now on, it is
treated as an exception thrown from managed code.
* Synchronous signals
---------------------
For performance reasons, the runtime does not do same checks
required by the CLI spec. Instead, it relies on the CPU to do
them. The two main checks which are omitted are null-pointer
checks, and arithmetic checks. When a null pointer is
dereferenced by JITted code, the CPU will notify the kernel
through an interrupt, and the kernel will send a SIGSEGV
signal to the process. The runtime installs a signal handler
for SIGSEGV, which is sigsegv_signal_handler () in mini.c. The
signal handler creates the appropriate exception object and
calls mono_handle_exception () with it. Arithmetic exceptions
like division by zero are handled similarly.
* Synchronous signals in native code
------------------------------------
Receiving a signal such as SIGSEGV while in native code means
something very bad has happened. Because of this, the runtime
will abort after trying to print a managed plus a native stack
trace. The logic is in the mono_handle_native_sigsegv ()
function.
Note that there are two kinds of native code which can be the
source of the signal:
- code inside the runtime
- code inside a native library loaded by an application, ie. libgtk+
* Stack overflow checking
-------------------------
Stack overflow exceptions need special handling. When a thread
overflows its stack, the kernel sends it a normal SIGSEGV
signal, but the signal handler tries to execute on the same as
the thread leading to a further SIGSEGV which will terminate
the thread. A solution is to use an alternative signal stack
supported by UNIX operating systems through the sigaltstack
(2) system call. When a thread starts up, the runtime will
install an altstack using the mono_setup_altstack () function
in mini-exceptions.c. When a SIGSEGV is received, the signal
handler checks whenever the fault address is near the bottom
of the threads normal stack. If it is, a
StackOverflowException is created instead of a
NullPointerException. This exception is handled like any other
exception, with some minor differences.
There are two reasons why sigaltstack is disabled by default:
* The main problem with sigaltstack() is that the stack
employed by it is not visible to the GC and it is possible
that the GC will miss it.
* Working sigaltstack support is very much os/kernel/libc
dependent, so it is disabled by default.
* Asynchronous signals
----------------------
Async signals are used by the runtime to notify a thread that
it needs to change its state somehow. Currently, it is used
for implementing thread abort/suspend/resume.
Handling async signals correctly is a very hard problem,
since the receiving thread can be in basically any state upon
receipt of the signal. It can execute managed code, native
code, it can hold various managed/native locks, or it can be
in a process of acquiring them, it can be starting up,
shutting down etc. Most of the C APIs used by the runtime are
not asynch-signal safe, meaning it is not safe to call them
from an async signal handler. In particular, the pthread
locking functions are not async-safe, so if a signal handler
interrupted code which was in the process of acquiring a lock,
and the signal handler tries to acquire a lock, the thread
will deadlock. Unfortunately, the current signal handling
code does acquire locks, so sometimes it does deadlock.
When receiving an async signal, the signal handler first tries
to determine whenever the thread was executing managed code
when it was interrupted. If it did, then it is safe to
interrupt it, so a ThreadAbortException is constructed and
thrown. If the thread was executing native code, then it is
generally not safe to interrupt it. In this case, the runtime
sets a flag then returns from the signal handler. That flag is
checked every time the runtime returns from native code to
managed code, and the exception is thrown then. Also, a
platform specific mechanism is used to cause the thread to
interrupt any blocking operation it might be doing.
The async signal handler is in sigusr1_signal_handler () in
mini.c, while the logic which determines whenever an exception
is safe to be thrown is in mono_thread_request_interruption
().
* Stack unwinding during exception handling
-------------------------------------------
The execution state of a thread during exception handling is
stored in an arch-specific structure called MonoContext. This
structure contains the values of all the CPU registers
relevant during exception handling, which usually means:
- IP (instruction pointer)
- SP (stack pointer)
- FP (frame pointer)
- callee saved registers
Callee saved registers are the registers which are required by
any procedure to be saved/restored before/after using
them. They are usually defined by each platforms ABI
(Application Binary Interface). For example, on x86, they are
EBX, ESI and EDI.
The code which calls mono_handle_exception () is required to
construct the initial MonoContext. How this is done depends on
the caller. For exceptions thrown from managed code, the
mono_arch_throw_exception helper function saves the values of
the required registers and passes them to throw_exception (),
which will save them in the MonoContext structure. For
exceptions thrown from signal handlers, the MonoContext
stucture is initialized from the signal info received from the
kernel.
During exception handling, the runtime needs to 'unwind' the
stack, i.e. given the state of the thread at a stack frame,
construct the state at its callers. Since this is platform
specific, it is done by a platform specific function called
mono_arch_find_jit_info ().
Two kinds of stack frames need handling:
- Managed frames are easier. The JIT will store some
information about each managed method, like which
callee-saved registers it uses. Based on this information,
mono_arch_find_jit_info () can find the values of the
registers on the thread stack, and restore them.
- Native frames are problematic, since we have no information
about how to unwind through them. Some compilers generate
unwind information for code, some don't. Also, there is no
general purpose library to obtain and decode this unwind
information. So the runtime uses a different solution. When
managed code needs to call into native code, it does through
a managed->native wrapper function, which is generated by
the JIT. This function is responsible for saving the machine
state into a per-thread structure called MonoLMF (Last
Managed Frame). These LMF structures are stored on the
threads stack, and are linked together using one of their
fields. When the unwinder encounters a native frame, it
simply pops one entry of the LMF 'stack', and uses it to
restore the frame state to the moment before control passed
to native code. In effect, all successive native frames are
skipped together.
Problems/future work
--------------------
1. Async signal safety
----------------------
The current async signal handling code is not async safe, so
it can and does deadlock in practice. It needs to be rewritten
to avoid taking locks at least until it can determine that it
was interrupting managed code.
Another problem is the managed stack frame unwinding code. It
blindly assumes that if the IP points into a managed frame,
then all the callee saved registers + the stack pointer are
saved on the stack. This is not true if the thread was
interrupted while executing the method prolog/epilog.
2. Raising exceptions from native code
--------------------------------------
Currently, exceptions are raised by calling
mono_raise_exception () in the middle of runtime code. This
has two problems:
- No cleanup is done, ie. if the caller of the function which
throws an exception has taken locks, or allocated memory,
that is not cleaned up. For this reason, it is only safe to
call mono_raise_exception () 'very close' to managed code,
ie. in the icall functions themselves.
- To allow mono_raise_exception () to unwind through native
code, we need to save the LMF structures which can add a lot
of overhead even in the common case when no exception is
thrown. So this is not zero-cost exception handling.
An alternative might be to use a JNI style
set-pending-exception API. Runtime code could call
mono_set_pending_exception (), then return to its caller with
an error indication allowing the caller to clean up. When
execution returns to managed code, then managed->native
wrapper could check whenever there is a pending exception and
throw it if neccesary. Since we already check for pending
thread interruption, this would have no overhead, allowing us
to drop the LMF saving/restoring code, or significant parts of
it.
4. libunwind
------------
There is an OSS project called libunwind which is a standalone
stack unwinding library. It is currently in development, but
it is used by default by gcc on ia64 for its stack
unwinding. The mono runtime also uses it on ia64. It has
several advantages in relation to our current unwinding code:
- it has a platform independent API, i.e. the same unwinding
code can be used on multiple platforms.
- it can generate unwind tables which are correct at every
instruction, i.e. can be used for unwinding from async
signals.
- given sufficient unwind info generated by a C compiler, it
can unwind through C code.
- most of its API is async-safe
- it implements the gcc C++ exception handling API, so in
theory it can be used to implement mixed-language exception
handling (i.e. C++ exception caught in mono, mono exception
caught in C++).
- it is MIT licensed
The biggest problem with libuwind is its platform support. ia64 support is
complete/well tested, while support for other platforms is missing/incomplete.
http://www.hpl.hp.com/research/linux/libunwind/
+223
View File
@@ -0,0 +1,223 @@
-*- outline -*-
Generic code sharing
====================
* Porting
** Generic class init trampoline
The generic class init trampoline is very similar to the class init
trampoline, with the exception that the VTable of the class to be
inited is passed in a register, MONO_ARCH_VTABLE_REG. That register
can be the same as the IMT register.
The call to the generic class init trampoline is never patched because
the VTable is not constant - it depends on the type arguments of the
class/method doing the call to the trampoline. For that reason, the
trampoline needs a fast path for the case that the class is already
inited, i.e. the trampoline needs to check the initialized bit of the
MonoVTable and immediately return if it is set. See tramp-x86.c for
how to portably figure out the number of the bit in the bit-field that
needs to be checked.
Since the MONO_ARCH_VTABLE_REG is needed by the generic class init
trampoline function (in mini-trampolines.c) it needs to be saved by
the generic trampoline code in the register save block which is passed
to the trampoline. This also applies to the RGCTX fetch trampoline
(see below).
Like the normal class init trampoline, the result of the generic class
init trampoline function is not a pointer to code that needs to be
jumped to. Instead, just like for the class init trampoline, the
generic trampoline code must return to the caller instead of jumping
to the returned value. The same applies for the RGCTX fetch
trampoline (see below).
** RGCTX register
Generic shared code needs access to type information. This
information is contained in a RGCTX for non-generic methods and in an
MRGCTX for generic methods. It is passed in one of several ways,
depending on the type of the called method:
1. Non-generic non-static methods of reference types have access to
the RGCTX via the "this" argument (this->vtable->rgctx).
2. Non-generic static methods of reference types and non-generic
methods of value types need to be passed a pointer to the
caller's class's VTable in the MONO_ARCH_RGCTX_REG register.
3. Generic methods need to be passed a pointer to the MRGCTX in the
MONO_ARCH_RGCTX_REG register.
The MONO_ARCH_RGCTX_REG must not be clobbered by trampolines.
MONO_ARCH_RGCTX_REG can be the same as the IMT register for now, but
this might change in the future when we implement virtual generic
method calls (more) efficiently.
This register lifetime starts at the call site that loads it and
ends in the callee prologue when it is either discarded or stored
into a local variable.
It's better to avoid registers used for argument passing for the RGCTX
as it would make the code dealing with calling conventions code a lot
harder.
** Method prologue
Generic shared code that have a RGCTX receive it in RGCTX_REG. There
must be a check in mono_arch_emit_prolog for MonoCompile::rgctx_var
and if set store it. See mini-x86.c for reference.
** Dealing with types
Types passed to arch functions might be type parameters
(MONO_TYPE_(M)VAR) if the MonoGenericSharingContext* argument is
non-NULL. For example, an argument or return type in a method passed
to mono_arch_find_this_argument() could be a MONO_TYPE_VAR. To guard
for that case use mini_get_basic_type_from_generic() on the type. See
get_call_info() in mini-x86.c, for example.
** (M)RGCTX lazy fetch trampoline
The purpose of the lazy fetch trampoline is to fetch a slot from an
(M)RGCTX which might not be inited, yet. In the latter case, it needs
to go make a transition to unmanaged code to fill the slot. This is
the layout of a RGCTX:
+---------------------------------+
| next | slot 0 | slot 1 | slot 2 |
+--|------------------------------+
|
+-----+
| +---------------------------------
+->| next | slot 3 | slot 4 | slot 5 ....
+--|------------------------------
|
+-----+
| +------------------------------------
+->| next | slot 10 | slot 11 | slot 12 ....
+--|---------------------------------
.
.
.
For fetching a slot from a RGCTX the trampoline is passed a pointer
(as a normal integer argument) to the VTable. From there it has to
fetch the pointer to the RGCTX, which might be null. Then it has to
traverse the correct number of "next" links, each of which might be
NULL. Arriving at the right array it needs to fetch the slot, which
might also be NULL. If any of the NULL cases, the trampoline must
transition to unmanaged code to potentially setup the RGCTX and fill
the slot. Here is pseudo-code for fetching slot 11:
; vtable ptr in r1
; fetch RGCTX array 0
r2 = *(r1 + offsetof(MonoVTable, runtime_generic_context))
if r2 == NULL goto unmanaged
; fetch RGCTX array 1
r2 = *r2
if r2 == NULL goto unmanaged
; fetch RGCTX array 2
r2 = *r2
if r2 == NULL goto unmanaged
; fetch slot 11
r2 = *(r2 + 2 * sizeof (gpointer))
if r2 == NULL goto unmanaged
return r2
unmanaged:
jump unmanaged_fetch_code
The number of slots in the arrays must be obtained from the function
mono_class_rgctx_get_array_size().
The MRGCTX case is different in two aspects. First, the trampoline is
not passed a pointer to a VTable, but a pointer directly to the
MRGCTX, which is guaranteed not to be NULL (any of the next pointers
and any of the slots can be NULL, though). Second, the layout of the
first array is slightly different, in that the first two slots are
occupied by a pointers to the class's VTable and to the method's
method_inst. The next pointer is in the third slot and the first
actual slot, "slot 0", in the fourth:
+--------------------------------------------------------+
| vtable | method_inst | next | slot 0 | slot 1 | slot 2 |
+-------------------------|------------------------------+
.
.
All other arrays have the same layout as the RGCTX ones, except
possibly for their length.
The function to create the trampoline,
mono_arch_create_rgctx_lazy_fetch_trampoline(), gets passed an encoded
slot number. Use the macro MONO_RGCTX_SLOT_IS_MRGCTX to query whether
a trampoline for an MRGCTX is needed, as opposed to one for a RGCTX.
Use MONO_RGCTX_SLOT_INDEX to get the index of the slot (like 2 for
"slot 2" as above).
The unmanaged fetch code is yet another trampoline created via
mono_arch_create_specific_trampoline(), of type
MONO_TRAMPOLINE_RGCTX_LAZY_FETCH. It's given the slot number as the
trampoline argument. In addition, the pointer to the VTable/MRGCTX is
passed in MONO_ARCH_VTABLE_REG (like the VTable to the generic class
init trampoline - see above).
Like the class init and generic class init trampolines, the RGCTX
fetch trampoline code doesn't return code that must be jumped to, so,
like for those trampolines (see above), the generic trampoline code
must do a normal return instead.
* Getting generics information about a stack frame
If a method is compiled with generic sharing, its MonoJitInfo has
has_generic_jit_info set. In that case, the MonoJitInfo is followed
(after the MonoJitExceptionInfo array) by a MonoGenericJitInfo.
The MonoGenericJitInfo contains information about the location of the
this/vtable/MRGCTX variable, if the has_this flag is set. If that is
the case, there are two possibilities:
1. this_in_reg is set. this_reg is the number of the register where
the variable is stored.
2. this_in_reg is not set. The variable is stored at offset
this_offset from the address in the register with number
this_reg.
The variable can either point to the "this" object, to a vtable or to
an MRGCTX:
1. If the method is a non-generic non-static method of a reference
type, the variable points to the "this" object.
2. If the method is a non-generic static method or a non-generic
method of a value type, the variable points to the vtable of the
class.
3. If the method is a generic method, the variable points to the
MRGCTX of the method.
* Layout of the MRGCTX
The MRGCTX is a structure that starts with
MonoMethodRuntimeGenericContext, which contains a pointer to the
vtable of the class and a pointer to the MonoGenericInst with the type
arguments for the method.
* Blog posts about generic code sharing
http://schani.wordpress.com/2007/09/22/generics-sharing-in-mono/
http://schani.wordpress.com/2007/10/12/the-trouble-with-shared-generics/
http://schani.wordpress.com/2007/10/15/a-quick-generics-sharing-update/
http://schani.wordpress.com/2008/01/29/other-types/
http://schani.wordpress.com/2008/02/25/generic-types-are-lazy/
http://schani.wordpress.com/2008/03/10/sharing-static-methods/
http://schani.wordpress.com/2008/04/22/sharing-everything-and-saving-memory/
http://schani.wordpress.com/2008/06/02/sharing-generic-methods/
http://schani.wordpress.com/2008/06/27/another-generic-sharing-update/
+283
View File
@@ -0,0 +1,283 @@
Register Allocation
===================
The current JIT implementation uses a tree matcher to generate code. We use a
simple algorithm to allocate registers in trees, and limit the number of used
temporary register to 4 when evaluating trees. So we can use 2 registers for
global register allocation.
Register Allocation for Trees
=============================
We always evaluate trees from left to right. When there are no more registers
available we need to spill values to memory. Here is the simplified algorithm.
gboolean
tree_allocate_regs (tree, exclude_reg)
{
if (!tree_allocate_regs (tree->left, -1))
return FALSE;
if (!tree_allocate_regs (tree->right, -1)) {
tree->left->spilled == TRUE;
free_used_regs (tree->left);
if (!tree_allocate_regs (tree->right, tree->left->reg))
return FALSE;
}
free_used_regs (tree->left);
free_used_regs (tree->right);
/* try to allocate a register (reg != exclude_reg) */
if ((tree->reg = next_free_reg (exclude_reg)) != -1)
return TRUE;
return FALSE;
}
The emit routing actually spills the registers:
tree_emit (tree)
{
tree_emit (tree->left);
if (tree->left->spilled)
save_reg (tree->left->reg);
tree_emit (tree->right);
if (tree->left->spilled)
restore_reg (tree->left->reg);
emit_code (tree);
}
Global Register Allocation
==========================
TODO.
Local Register Allocation
=========================
This section describes the cross-platform local register allocator which is
in the file mini-codegen.c.
The input to the allocator is a basic block which contains linear IL, ie.
instructions of the form:
DEST <- SRC1 OP SRC2
where DEST, SRC1, and SRC2 are virtual registers (vregs). The job of the
allocator is to assign hard or physical registers (hregs) to each virtual
registers so the vreg references in the instructions can be replaced with their
assigned hreg, allowing machine code to be generated later.
The allocator needs information about the number and types of arguments of
instructions. It takes this information from the machine description files. It
also needs arch specific information, like the number and type of the hard
registers. It gets this information from arch-specific macros.
Currently, the vregs and hregs are partitioned into two classes: integer and
floating point.
The allocator consists of two phases: In the first phase, a forward pass is
made over the instructions, collecting liveness information for vregs. In the
second phase, a backward pass is made over the instructions, assigning
registers. This backward mode of operation makes understanding the allocator
somewhat difficult to understand, but leads to better code in most cases.
Allocator state
===============
The state of the allocator is stored in two arrays: iassign and isymbolic.
iassign maps vregs to hregs, while isymbolic is the opposite.
For a vreg, iassign [vreg] can contain the following values:
* -1 vreg has no assigned hreg
* hreg index (>= 0) vreg is assigned to the given hreg. This means
later instructions (which we have already
processed due to the backward direction) expect
the value of vreg to be found in hreg.
* spill slot index (< -1) vreg is spilled to the given spill slot. This
means later instructions expect the value of
vreg to be found on the stack in the given
spill slot.
Also, the allocator keeps track of which hregs are free and which are used.
This information is stored in a bitmask called ifree_mask.
There is a similar set of data structures for floating point registers.
Spilling
========
When an allocator needs a free hreg, but all of them are assigned, it needs to
free up one of them. It does this by spilling the contents of the vreg which
is currently assigned to the selected hreg. Since later instructions expect
the vreg to be found in the selected hreg, the allocator emits a spill-load
instruction to load the value from the spill slot into the hreg after the
currently processed instruction. When the vreg which is spilled is a
destination in an instruction, the allocator will emit a spill-store to store
the value into the spill slot.
Fixed registers
===============
Some architectures, notably x86/amd64 require that the arguments/results of
some instructions be assigned to specific hregs. An example is the shift
opcodes on x86, where the second argument must be in ECX. The allocator
has support for this. It tries to allocate the vreg to the required hreg. If
thats not possible, then it will emit compensation code which moves values to
the correct registers before/after the instruction.
Fixed registers are mainly used on x86, but they are useful on more regular
architectures on well, for example to model that after a call instruction, the
return of the call is in a specific register.
A special case of fixed registers is two address architectures, like the x86,
where the instructions place their results into their first argument. This is
modelled in the allocator by allocating SRC1 and DEST to the same hreg.
Global registers
================
Some variables might already be allocated to hardware registers during the
global allocation phase. In this case, SRC1, SRC2 and DEST might already be
a hardware register. The allocator needs to do nothing in this case, except
when the architecture uses fixed registers, in which case it needs to emit
compensation code.
Register pairs
==============
64 bit arithmetic on 32 bit machines requires instructions whose arguments are
not registers, but register pairs. The allocator has support for this, both
for freely allocatable register pairs, and for register pairs which are
constrained to specific hregs (EDX:EAX on x86).
Floating point stack
====================
The x86 architecture uses a floating point register stack instead of a set of
fp registers. The allocator supports this by keeping track of the height of the
fp stack, and spilling/loading values from the stack as neccesary.
Calls
=====
Calls need special handling for two reasons: first, they will clobber all
caller-save registers, meaning their contents will need to be spilled. Also,
some architectures pass arguments in registers. The registers used for
passing arguments are usually the same as the ones used for local allocation,
so the allocator needs to handle them specially. This is done as follows:
the MonoInst for the call instruction contains a map mapping vregs which
contain the argument values to hregs where the argument needs to be placed,
like this (on amd64):
R33 -> RDI
R34 -> RSI
...
When the allocator processes the call instruction, it allocates the vregs
in the map to their associated hregs. So the call instruction is processed as
if having a variable number of arguments which fixed register assignments.
An example:
R33 <- 1
R34 <- 2
call
When the call instruction is processed, R33 is assigned to RDI, and R34 is
assigned to RSI. Later, when the two assignment instructions are processed,
R33 and R34 are already assigned to a hreg, so they are replaced with the
associated hreg leading to the following final code:
RDI <- 1
RSI <- 1
call
Machine description files
=========================
A typical entry in the machine description files looks like this:
shl: dest:i src1:i src2:s clob:1 len:2
The allocator is only interested in the dest,src1,src2 and clob fields.
It understands the following values for the dest, src1, src2 fields:
i - integer register
f - fp register
b - base register (same as i, but the instruction does not modify the reg)
m - fp register, even if an fp stack is used (no fp stack tracking)
It understands the following values for the clob field:
1 - sreg1 needs to be the same as dreg
c - instruction clobbers the caller-save registers
Beside these values, an architecture can define additional values (like the 's'
in the example). The allocator depends on a set of arch-specific macros to
convert these values to information it needs during allocation.
Arch specific macros
====================
These macros usually receive a value from the machine description file (like
the 's' in the example). The examples below are for x86.
/*
* A bitmask selecting the caller-save registers (these are used for local
* allocation).
*/
#define MONO_ARCH_CALLEE_REGS X86_CALLEE_REGS
/*
* A bitmask selecting the callee-saved registers (these are usually used for
* global allocation).
*/
#define MONO_ARCH_CALLEE_SAVED_REGS X86_CALLER_REGS
/* Same for the floating point registers */
#define MONO_ARCH_CALLEE_FREGS 0
#define MONO_ARCH_CALLEE_SAVED_FREGS 0
/* Whenever the target uses a floating point stack */
#define MONO_ARCH_USE_FPSTACK TRUE
/* The size of the floating point stack */
#define MONO_ARCH_FPSTACK_SIZE 6
/*
* Given a descriptor value from the machine description file, return the fixed
* hard reg corresponding to that value.
*/
#define MONO_ARCH_INST_FIXED_REG(desc) ((desc == 's') ? X86_ECX : ((desc == 'a') ? X86_EAX : ((desc == 'd') ? X86_EDX : ((desc == 'y') ? X86_EAX : ((desc == 'l') ? X86_EAX : -1)))))
/*
* A bitmask selecting the hregs which can be used for allocating sreg2 for
* a given instruction.
*/
#define MONO_ARCH_INST_SREG2_MASK(ins) (((ins [MONO_INST_CLOB] == 'a') || (ins [MONO_INST_CLOB] == 'd')) ? (1 << X86_EDX) : 0)
/*
* Given a descriptor value, return whenever it denotes a register pair.
*/
#define MONO_ARCH_INST_IS_REGPAIR(desc) (desc == 'l' || desc == 'L')
/*
* Given a descriptor value, and the first register of a regpair, return a
* bitmask selecting the hregs which can be used for allocating the second
* register of the regpair.
*/
#define MONO_ARCH_INST_REGPAIR_REG2(desc,hreg1) (desc == 'l' ? X86_EDX : -1)
+32
View File
@@ -0,0 +1,32 @@
Metadata memory management
--------------------------
Most metadata structures have a lifetime which is equal to the MonoImage where they are
loaded from. These structures should be allocated from the memory pool of the
corresponding MonoImage. The memory pool is protected by the loader lock.
Examples of metadata structures in this category:
- MonoClass
- MonoMethod
- MonoType
Memory owned by these structures should be allocated from the image mempool as well.
Examples include: klass->methods, klass->fields, method->signature etc.
Generics complicates things. A generic class could have many instantinations where the
generic arguments are from different assemblies. Where should we allocate memory for
instantinations ? We can allocate from the mempool of the image which contains the
generic type definition, but that would mean that the instantinations would remain in
memory even after the assemblies containing their type arguments are unloaded, leading
to a memory leak. Therefore, we do the following:
- data structures representing the generic definitions are allocated from the image
mempool as usual. These include:
- generic class definition (MonoGenericClass->container_class)
- generic method definitions
- type parameters (MonoGenericParam)
- data structures representing inflated classes/images are allocated from the heap. These
structures are kept in a cache, indexed by type arguments of the instantinations. When
an assembly is unloaded, this cache is searched and all instantinations referencing
types from the assembly are freed. This is done by mono_metadata_clean_for_image ()
in metadata.c. The structures handled this way include:
- MonoGenericClass
- MonoGenericInst
- inflated MonoMethods
+531
View File
@@ -0,0 +1,531 @@
Mono JIT porting guide.
Paolo Molaro ([email protected])
* Introduction
This documents describes the process of porting the mono JIT
to a new CPU architecture. The new mono JIT has been designed
to make porting easier though at the same time enable the port
to take full advantage from the new architecture features and
instructions. Knowledge of the mini architecture (described in
the mini-doc.txt file) is a requirement for understanding this
guide, as well as an earlier document about porting the mono
interpreter (available on the web site).
There are six main areas that a port needs to implement to
have a fully-functional JIT for a given architecture:
1) instruction selection
2) native code emission
3) call conventions and register allocation
4) method trampolines
5) exception handling
6) minor helper methods
To take advantage of some not-so-common processor features
(for example conditional execution of instructions as may be
found on ARM or ia64), it may be needed to develop an
high-level optimization, but doing so is not a requirement for
getting the JIT to work.
We'll see in more details each of the steps required, note,
though, that a new port may just as well start from a
cut&paste of an existing port to a similar architecture (for
example from x86 to amd64, or from powerpc to sparc).
The architecture specific code is split from the rest of the
JIT, for example the x86 specific code and data is all
included in the following files in the distribution:
mini-x86.h mini-x86.c
inssel-x86.brg
cpu-pentium.md
tramp-x86.c
exceptions-x86.c
I suggest a similar split for other architectures as well.
Note that this document is still incomplete: some sections are
only sketched and some are missing, but the important info to
get a port going is already described.
* Architecture-specific instructions and instruction selection.
The JIT already provides a set of instructions that can be
easily mapped to a great variety of different processor
instructions. Sometimes it may be necessary or advisable to
add a new instruction that represent more closely an
instruction in the architecture. Note that a mini instruction
can be used to represent also a short sequence of CPU
low-level instructions, but note that each instruction
represents the minimum amount of code the instruction
scheduler will handle (i.e., the scheduler won't schedule the
instructions that compose the low-level sequence as individual
instructions, but just the whole sequence, as an indivisible
block).
New instructions are created by adding a line in the
mini-ops.h file, assigning an opcode and a name. To specify
the input and output for the instruction, there are two
different places, depending on the context in which the
instruction gets used.
If the instruction is used in the tree representation, the
input and output types are defined by the BURG rules in the
*.brg files (the usual non-terminals are 'reg' to represent a
normal register, 'lreg' to represent a register or two that
hold a 64 bit value, freg for a floating point register).
If an instruction is used as a low-level CPU instruction, the
info is specified in a machine description file. The
description file is processed by the genmdesc program to
provide a data structure that can be easily used from C code
to query the needed info about the instruction.
As an example, let's consider the add instruction for both x86
and ppc:
x86 version:
add: dest:i src1:i src2:i len:2 clob:1
ppc version:
add: dest:i src1:i src2:i len:4
Note that the instruction takes two input integer registers on
both CPU, but on x86 the first source register is clobbered
(clob:1) and the length in bytes of the instruction differs.
Note that integer adds and floating point adds use different
opcodes, unlike the IL language (64 bit add is done with two
instructions on 32 bit architectures, using a add that sets
the carry and an add with carry).
A specific CPU port may assign any meaning to the clob field
for an instruction since the value will be processed in an
arch-specific file anyway.
See the top of the existing cpu-pentium.md file for more info
on other fields: the info may or may not be applicable to a
different CPU, in this latter case the info can be ignored.
The code in mini.c together with the BURG rules in inssel.brg,
inssel-float.brg and inssel-long32.brg provides general
purpose mappings from the tree representation to a set of
instructions that should be easily implemented in any
architecture. To allow for additional arch-specific
functionality, an arch-specific BURG file can be used: in this
file arch-specific instructions can be selected that provide
better performance than the general instructions or that
provide functionality that is needed by the JIT but that
cannot be expressed in a general enough way.
As an example, x86 has the special instruction "push" to make
it easier to implement the default call convention (passing
arguments on the stack): almost all the other architectures
don't have such an instruction (and don't need it anyway), so
we added a special rule in the inssel-x86.brg file for it.
So, one of the first things needed in a port is to write a
cpu-$(arch).md machine description file and fill it with the
needed info. As a start, only a few instructions can be
specified, like the ones required to do simple integer
operations. The default rules of the instruction selector will
emit the common instructions and so we're ready to go for the
next step in porting the JIT.
*) Native code emission
Since the first step in porting mono to a new CPU is to port
the interpreter, there should be already a file that allows
the emission of binary native code in a buffer for the
architecture. This file should be placed in the
mono/arch/$(arch)/
directory.
The bulk of the code emission happens in the mini-$(arch).c
file, in a function called mono_arch_output_basic_block
(). This function takes a basic block, walks the list of
instructions in the block and emits the binary code for each.
Optionally a peephole optimization pass is done on the basic
block, but this can be left for later, when the port actually
works.
This function is very simple, there is just a big switch on
the instruction opcode and in the corresponding case the
functions or macros to emit the binary native code are
used. Note that in this function the lengths of the
instructions are used to determine if the buffer for the code
needs enlarging.
To complete the code emission for a method, a few other
functions need implementing as well:
mono_arch_emit_prolog ()
mono_arch_emit_epilog ()
mono_arch_patch_code ()
mono_arch_emit_prolog () will emit the code to setup the stack
frame for a method, optionally call the callbacks used in
profiling and tracing, and move the arguments to their home
location (in a caller-save register if the variable was
allocated to one, or in a stack location if the argument was
passed in a volatile register and wasn't allocated a
non-volatile one). caller-save registers used by the function
are saved in the prolog as well.
mono_arch_emit_epilog () will emit the code needed to return
from the function, optionally calling the profiling or tracing
callbacks. At this point the basic blocks or the code that was
moved out of the normal flow for the function can be emitted
as well (this is usually done to provide better info for the
static branch predictor). In the epilog, caller-save
registers are restored if they were used.
Note that, to help exception handling and stack unwinding,
when there is a transition from managed to unmanaged code,
some special processing needs to be done (basically, saving
all the registers and setting up the links in the Last Managed
Frame structure).
When the epilog has been emitted, the upper level code
arranges for the buffer of memory that contains the native
code to be copied in an area of executable memory and at this
point, instructions that use relative addressing need to be
patched to have the right offsets: this work is done by
mono_arch_patch_code ().
* Call conventions and register allocation
To account for the differences in the call conventions, a few functions need to
be implemented.
mono_arch_allocate_vars () assigns to both arguments and local
variables the offset relative to the frame register where they
are stored, dead variables are simply discarded. The total
amount of stack needed is calculated.
mono_arch_call_opcode () is the function that more closely
deals with the call convention on a given system. For each
argument to a function call, an instruction is created that
actually puts the argument where needed, be it the stack or a
specific register. This function can also re-arrange th order
of evaluation when multiple arguments are involved if needed
(like, on x86 arguments are pushed on the stack in reverse
order). The function needs to carefully take into accounts
platform specific issues, like how structures are returned as
well as the differences in size and/or alignment of managed
and corresponding unmanaged structures.
The other chunk of code that needs to deal with the call
convention and other specifics of a CPU, is the local register
allocator, implemented in a function named
mono_arch_local_regalloc (). The local allocator deals with a
basic block at a time and basically just allocates registers
for temporary values during expression evaluation, spilling
and unspilling as necessary.
The local allocator needs to take into account clobbering
information, both during simple instructions and during
function calls and it needs to deal with other
architecture-specific weirdnesses, like instructions that take
inputs only in specific registers or output only is some.
Some effort will be put later in moving most of the local
register allocator to a common file so that the code can be
shared more for similar, risc-like CPUs. The register
allocator does a first pass on the instructions in a block,
collecting liveness information and in a backward pass on the
same list performs the actual register allocation, inserting
the instructions needed to spill values, if necessary.
The cross-platform local register allocator is now implemented
and it is documented in the jit-regalloc file.
When this part of code is implemented, some testing can be
done with the generated code for the new architecture. Most
helpful is the use of the --regression command line switch to
run the regression tests (basic.cs, for example).
Note that the JIT will try to initialize the runtime, but it
may not be able yet to compile and execute complex code:
commenting most of the code in the mini_init() function in
mini.c is needed to let the JIT just compile the regression
tests. Also, using multiple -v switches on the command line
makes the JIT dump an increasing amount of information during
compilation.
Values loaded into registers need to be extened as needed by
the ECMA specs:
*) integers smaller than 4 bytes are extended to int32 values
*) 32 bit floats are extended to double precision (in particular
this means that currently all the floating point operations operate
on doubles)
* Method trampolines
To get better startup performance, the JIT actually compiles a
method only when needed. To achieve this, when a call to a
method is compiled, we actually emit a call to a magic
trampoline. The magic trampoline is a function written in
assembly that invokes the compiler to compile the given method
and jumps to the newly compiled code, ensuring the arguments
it received are passed correctly to the actual method.
Before jumping to the new code, though, the magic trampoline
takes care of patching the call site so that next time the
call will go directly to the method instead of the
trampoline. How does this all work?
mono_arch_create_jit_trampoline () creates a small function
that just preserves the arguments passed to it and adds an
additional argument (the method to compile) before calling the
generic trampoline. This small function is called the specific
trampoline, because it is method-specific (the method to
compile is hard-code in the instruction stream).
The generic trampoline saves all the arguments that could get
clobbered and calls a C function that will do two things:
*) actually call the JIT to compile the method
*) identify the calling code so that it can be patched to call directly
the actual method
If the 'this' argument to a method is a boxed valuetype that
is passed to a method that expects just a pointer to the data,
an additional unboxing trampoline will need to be inserted as
well.
* Exception handling
Exception handling is likely the most difficult part of the
port, as it needs to deal with unwinding (both managed and
unmanaged code) and calling catch and filter blocks. It also
needs to deal with signals, because mono takes advantage of
the MMU in the CPU and of the operation system to handle
dereferences of the NULL pointer. Some of the function needed
to implement the mechanisms are:
mono_arch_get_throw_exception () returns a function that takes
an exception object and invokes an arch-specific function that
will enter the exception processing. To do so, all the
relevant registers need to be saved and passed on.
mono_arch_handle_exception () this function takes the
exception thrown and a context that describes the state of the
CPU at the time the exception was thrown. The function needs
to implement the exception handling mechanism, so it makes a
search for an handler for the exception and if none is found,
it follows the unhandled exception path (that can print a
trace and exit or just abort the current thread). The
difficulty here is to unwind the stack correctly, by restoring
the register state at each call site in the call chain,
calling finally, filters and handler blocks while doing so.
As part of exception handling a couple of internal calls need
to be implemented as well.
ves_icall_get_frame_info () returns info about a specific
frame.
mono_jit_walk_stack () walks the stack and calls a callback with info for
each frame found.
ves_icall_get_trace () return an array of StackFrame objects.
** Code generation for filter/finally handlers
Filter and finally handlers are called from 2 different locations:
1.) from within the method containing the exception clauses
2.) from the stack unwinding code
To make this possible we implement them like subroutines,
ending with a "return" statement. The subroutine does not save
the base pointer, because we need access to the local
variables of the enclosing method. Its is possible that
instructions inside those handlers modify the stack pointer,
thus we save the stack pointer at the start of the handler,
and restore it at the end. We have to use a "call" instruction
to execute such finally handlers.
The MIR code for filter and finally handlers looks like:
OP_START_HANDLER
...
OP_END_FINALLY | OP_ENDFILTER(reg)
OP_START_HANDLER: should save the stack pointer somewhere
OP_END_FINALLY: restores the stack pointers and returns.
OP_ENDFILTER (reg): restores the stack pointers and returns the value in "reg".
** Calling finally/filter handlers
There is a special opcode to call those handler, its called
OP_CALL_HANDLER. It simple emits a call instruction.
Its a bit more complex to call handler from outside (in the
stack unwinding code), because we have to restore the whole
context of the method first. After that we simply emit a call
instruction to invoke the handler. Its usually possible to use
the same code to call filter and finally handlers (see
arch_get_call_filter).
** Calling catch handlers
Catch handlers are always called from the stack unwinding
code. Unlike finally clauses or filters, catch handler never
return. Instead we simply restore the whole context, and
restart execution at the catch handler.
** Passing Exception objects to catch handlers and filters.
We use a local variable to store exception objects. The stack
unwinding code must store the exception object into this
variable before calling catch handler or filter.
* Minor helper methods
A few minor helper methods are referenced from the arch-independent code.
Some of them are:
*) mono_arch_cpu_optimizations ()
This function returns a mask of optimizations that
should be enabled for the current CPU and a mask of
optimizations that should be excluded, instead.
*) mono_arch_regname ()
Returns the name for a numeric register.
*) mono_arch_get_allocatable_int_vars ()
Returns a list of variables that can be allocated to
the integer registers in the current architecture.
*) mono_arch_get_global_int_regs ()
Returns a list of caller-save registers that can be
used to allocate variables in the current method.
*) mono_arch_instrument_mem_needs ()
*) mono_arch_instrument_prolog ()
*) mono_arch_instrument_epilog ()
Functions needed to implement the profiling interface.
* Testing the port
The JIT has a set of regression tests in *.cs files inside the
mini directory.
The usual method of testing a port is by compiling these tests on
another machine with a working runtime by typing 'make rcheck',
then copying TestDriver.dll and *.exe to the mini directory. The
tests can be run by typing:
./mono --regression <exe file name>
The suggested order for working through these tests is the
following:
- basic.exe
- basic-long.exe
- basic-float.exe
- basic-calls.exe
- objects.exe
- arrays.exe
- exceptions.exe
- iltests.exe
- generics.exe
* Writing regression tests
Regression tests for the JIT should be written for any bug
found in the JIT in one of the *.cs files in the mini
directory. Eventually all the operations of the JIT should be
tested (including the ones that get selected only when some
specific optimization is enabled).
* Platform specific optimizations
An example of a platform-specific optimization is the peephole
optimization: we look at a small window of code at a time and
we replace one or more instructions with others that perform
better for the given architecture or CPU.
* 64 bit support tips, by Zoltan Varga ([email protected])
For a 64-bit port of the Mono runtime, you will typically do
the following:
* need to use inssel-long.brg instead of
inssel-long32.brg.
* need to implement lots of new opcodes:
OP_I<OP> is 32 bit op
OP_L<OP> and CEE_<OP> are 64 bit ops
The 64 bit version of an existing port might share the code
with the 32 bit port (for example SPARC/SPARV9), or it might
be separate (x86/AMD64).
That will depend on the similarities of the two instructions
sets/ABIs etc.
The runtime and most parts of the JIT are 64 bit clean
at this point, so the only parts which require changing are
the arch dependent files.
* Function descriptors
Some ABIs, like those for IA64 and PPC64, don't use direct
function pointers, but so called function descriptors. A
function descriptor is a short data structure which contains
at least a pointer to the code of the function and a pointer
to a GOT/TOC, which needs to be loaded into a specific
register prior to jumping to the function. Global variables
and large constants are accessed through that register.
Mono does not need function descriptors for the JITted code,
but we need to handle them when calling unmanaged code and we
need to create them when passing managed code to unmanaged
code.
mono_create_ftnptr() creates a function descriptor for a piece
of generated code within a specific domain.
mono_get_addr_from_ftnptr() returns the pointer to the native
code in a function descriptor. Never use this function to
generate a jump to a function without loading the GOT/TOC
register unless the function descriptor was created by
mono_create_ftnptr().
See the sources for IA64 and PPC64 on when to create and when
to dereference function descriptors. On PPC64 function
descriptors for various generated helper functions (in
exceptions-ppc.c and tramp-ppc.c) are generated in front of
the code they refer to (see ppc_create_pre_code_ftnptr()). On
IA64 they are created separately.
* Emulated opcodes
Mini has code for emulating quite a few opcodes, most notably
operations on longs, int/float conversions and atomic
operations. If an architecture wishes such an opcode to be
emulated, mini produces icalls instead of those opcodes. This
should only be considered when the operation cannot be
implemented efficiently and thus the overhead occured by the
icall is not relatively large. Emulation of operations is
controlled by #defines in the arch header, but the naming is
not consistent. They usually start with MONO_ARCH_EMULATE_,
MONO_ARCH_NO_EMULATE_ and MONO_ARCH_HAVE_.
* Generic code sharing
Generic code sharing is optional. See the file
"generic-sharing" for information on how to support it on an
architecture.
+113
View File
@@ -0,0 +1,113 @@
1. Thread safety of metadata structures
----------------------------------------
1.1 Synchronization of read-only data
-------------------------------------
Read-only data is data which is not modified after creation, like the
actual binary metadata in the metadata tables.
There are three kinds of threads with regards to read-only data:
- readers
- the creator of the data
- the destroyer of the data
Most threads are readers.
- synchronization between readers is not neccesary
- synchronization between the writers is done using locks.
- synchronization between the readers and the creator is done by not exposing
the data to readers before it is fully constructed.
- synchronization between the readers and the destroyer: TBD.
1.2 Deadlock prevention plan
----------------------------
Hold locks for the shortest time possible. Avoid calling functions inside
locks which might obtain global locks (i.e. locks known outside this module).
1.3 Locks
----------
1.3.1 Simple locks
------------------
There are a lot of global data structures which can be protected by a 'simple' lock. Simple means:
- the lock protects only this data structure or it only protects the data structures in a given C module.
An example would be the appdomains list in domain.c
- the lock is only held for a short amount of time, and no other lock is acquired inside this simple lock. Thus there is
no possibility of deadlock.
1.3.2 The class loader lock
---------------------------
This locks is held by the class loading routines in class.c and loader.c. It
protects the various caches inside MonoImage which are used by these modules.
1.3.3 The domain lock
---------------------
Each appdomain has a lock which protects the per-domain data structures.
1.3.4 The locking hierarchy
---------------------------
It is useful to model locks by a locking hierarchy, which is a relation between locks, which is reflexive, transitive,
and antisymmetric, in other words, a lattice. If a thread wants to acquire a lock B, while already holding A, it can only
do it if A < B. If all threads work this way, then no deadlocks can occur.
Our locking hierarchy so far looks like this:
<DOMAIN LOCK>
\
<CLASS LOADER LOCK>
\ \
<SIMPLE LOCK 1> <SIMPLE LOCK 2>
1.4 Notes
----------
Some common scenarios:
- if a function needs to access a data structure, then it should lock it itself, and do not count on its caller locking it.
So for example, the image->class_cache hash table would be locked by mono_class_get().
- there are lots of places where a runtime data structure is created and stored in a cache. In these places, care must be
taken to avoid multiple threads creating the same runtime structure, for example, two threads might call mono_class_get ()
with the same class name. There are two choices here:
<enter mutex>
<check that item is created>
if (created) {
<leave mutex>
return item
}
<create item>
<store it in cache>
<leave mutex>
This is the easiest solution, but it requires holding the lock for the whole time which might create a scalability problem, and could also lead to deadlock.
<enter mutex>
<check that item is created>
<leave mutex>
if (created) {
return item
}
<create item>
<enter mutex>
<check that item is created>
if (created) {
/* Another thread already created and stored the same item */
<free our item>
<leave mutex>
return orig item
}
else {
<store item in cache>
<leave mutex>
return item
}
This solution does not present scalability problems, but the created item might be hard to destroy (like a MonoClass).
- lazy initialization of hashtables etc. is not thread safe
-21
View File
@@ -1,21 +0,0 @@
/
/depcomp
/config.guess
/config.sub
/ltmain.sh
/eglib-*.tar.gz
/missing
/install-sh
/compile
/Makefile
/Makefile.in
/stamp-h1
/config.h.in
/libtool
/autom4te.cache
/aclocal.m4
/config.log
/configure
/config.h
/config.status
/INSTALL
-8
View File
@@ -1,8 +0,0 @@
set(SUBDIRS src test)
autoheader("config.h" null)
foreach(subdir ${SUBDIRS})
add_subdirectory(${subdir})
endforeach()
+5
View File
@@ -1,3 +1,8 @@
2009-12-03 Zoltan Varga <[email protected]>
* src/gmisc-unix.c (g_get_user_name): Avoid returning NULL if the env
var is not set.
2009-09-26 Gonzalo Paniagua Javier <[email protected]>
* test/queue.c: new tests.
-6
View File
@@ -1,6 +0,0 @@
/
/Makefile
/Makefile.in
/.libs
/.deps
/eglib-config.h
-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})
+2
View File
@@ -110,6 +110,8 @@ const char *
g_get_user_name (void)
{
const char *retName = g_getenv ("USER");
if (!retName)
retName = "somebody";
return retName;
}
-17
View File
@@ -1,17 +0,0 @@
/
/Makefile.in
/configure
/libtool
/aclocal.m4
/Makefile
/config.h
/config.h.in
/config.status
/stamp-h1
/autom4te.cache
/.libs
/.deps
/test-glib
/test-eglib
/test-glib.exe
/test-eglib.exe
-7
View File
@@ -1,7 +0,0 @@
/Makefile.in
/.libs
/.deps
/Makefile
/*.o
/*.lo
/*.la
-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 -1
View File
@@ -28,7 +28,7 @@
#include <malloc.h>
#define ALLOCA _alloca
#else
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
#if defined(__FreeBSD__) || defined(__NetBSD__)
#include <stdlib.h>
#else
#include <alloca.h>
-24
View File
@@ -1,24 +0,0 @@
/aclocal.m4
/config.cache
/config.guess
/config.h
/config.h.in
/config.log
/config.status
/config.sub
/configure
/libtool
/ltmain.sh
/ltconfig
/Makefile
/Makefile.in
/stamp-h
/stamp-h.in
/*.lo
/.deps
/.libs
/*.la
/*.o
/autom4te.cache
/libgc-mono.pc
/libgc-mono-*.tar.gz
-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})
+3 -37
View File
@@ -3,11 +3,6 @@
* solaris_threads.c (GC_get_orig_stack_size): Remove the annoying 'Large stack
limit' warning.
2009-07-20 Geoff Norton <[email protected]>
* darwin_stop_world.c: Fix the x86 version guards to use Apple's
properly defined macros.
2009-07-02 jonas echterhoff <[email protected]>
* darwin_stop_world.c: make debugger code compile on
@@ -16,49 +11,20 @@
* pthread_support.c: give mach ports to the debugger instead of pthreads,
as those can be iterated over from another executable.
2009-06-22 Neale Ferguson <[email protected]>
2009-09-29 Zoltan Varga <[email protected]>
* include/private/gc_locks.h: Fix typo in 390 version of GC_compare_and_exchange
and define a null memory barrier.
2009-06-16 Geoff Norton <[email protected]>
* include/private/gcconfig.h: Disable static scanning on this platform
* misc.c: Enable platform-specific disabling of static scanning
2009-06-06 Zoltan Varga <[email protected]>
* CMakeLists.txt: Fix handling of powerpc and the selection of
threads. Delete commented out stuff.
* CMakeLists.txt: CMake build file for libgc.
2009-05-18 Miguel de Icaza <[email protected]>
* include/private/gcconfig.h: Add support for Linux on the PS3
* solaris_threads.c (GC_thr_daemon): Don't crash if GC_lookup_thread () returns
NULL.
2009-04-28 Zoltan Varga <[email protected]>
* misc.c (GC_init): Avoid casting an lvalue. Fixes part of #498692.
2009-04-24 Kostyantyn Gushtin, Yevgen Kiruha, Serhiy Naumenko, Serhiy
Stetskovych and Ian Dichkovsky <[email protected]>
* include/private/gcconfig.h: Changes to support 64-bit ABI on MIPS.
Add an additional condition for a proper defining of ALIGNMENT
and CPP_WORDSZ.
2009-04-10 Zoltan Varga <[email protected]>
* include/private/gc_locks.h (GC_test_and_set): Merge a change from libgc
7.1's libatomic-ops to fix the ppc build with gcc 4.4.
2009-02-23 Zoltan Varga <[email protected]>
* os_dep.c (GC_init_linux_data_start): Avoid the call to GC_find_limit ()
if GC_no_dls is TRUE, as it is not needed and it complicates debugging since
it causes a SIGSEGV.
2009-01-18 Zoltan Varga <[email protected]>
* include/private/gcconfig.h: Applied patch from Koushik Dutta
+2 -23
View File
@@ -2,13 +2,6 @@
# if defined(GC_DARWIN_THREADS)
#include <AvailabilityMacros.h>
#include "mono/utils/mono-compiler.h"
#ifdef MONO_DEBUGGER_SUPPORTED
#include "include/libgc-mono-debugger.h"
#endif
/* From "Inside Mac OS X - Mach-O Runtime Architecture" published by Apple
Page 49:
"The space beneath the stack pointer, where a new stack frame would normally
@@ -112,8 +105,7 @@ void GC_push_all_stacks() {
if(r != KERN_SUCCESS) ABORT("thread_get_state failed");
#if defined(I386)
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
#if defined(_STRUCT_X86_EXCEPTION_STATE32)
lo = state.__esp;
GC_push_one(state.__eax);
@@ -358,7 +350,7 @@ void GC_push_all_stacks() {
(natural_t *)&info, &outCount);
if(r != KERN_SUCCESS) continue;
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
#if defined(_STRUCT_X86_EXCEPTION_STATE32)
lo = (void*)info.__esp;
hi = (ptr_t)FindTopOfStack(info.__esp);
@@ -690,17 +682,4 @@ void GC_darwin_register_mach_handler_thread(mach_port_t thread) {
GC_use_mach_handler_thread = 1;
}
#ifdef MONO_DEBUGGER_SUPPORTED
GCThreadFunctions *gc_thread_vtable = NULL;
void *
GC_mono_debugger_get_stack_ptr (void)
{
GC_thread me;
me = GC_lookup_thread (pthread_self ());
return &me->stop_info.stack_ptr;
}
#endif
#endif
-2
View File
@@ -1,2 +0,0 @@
/Makefile
/Makefile.in
-2
View File
@@ -1,2 +0,0 @@
/Makefile
/Makefile.in
-2
View File
@@ -1,2 +0,0 @@
/Makefile
/Makefile.in
@@ -10,12 +10,6 @@
struct thread_stop_info {
mach_port_t mach_thread;
int signal;
word last_stop_count; /* GC_last_stop_count value when thread */
/* last successfully handled a suspend */
/* signal. */
ptr_t stack_ptr; /* Valid only when stopped. */
};
struct GC_mach_thread {
+1 -2
View File
@@ -565,7 +565,7 @@
# endif /* ALPHA */
# if defined(S390)
# if !defined(GENERIC_COMPARE_AND_SWAP)
inline static GC_bool GC_compare_and_exchange(volatile GC_word *addr,
inline static GC_bool GC_compare_and_exchange(volatile C_word *addr,
GC_word old, GC_word new_val)
{
int retval;
@@ -583,7 +583,6 @@
return retval == 0;
}
# endif
# define GC_memory_barrier()
# endif
# if !defined(GENERIC_COMPARE_AND_SWAP)
/* Returns the original value of *addr. */
+1 -27
View File
@@ -334,7 +334,6 @@
# define ARM
# define mach_type_known
# define DARWIN_DONT_PARSE_STACK
# define GC_DONT_REGISTER_MAIN_STATIC_DATA
# endif
# endif
# if defined(NeXT) && defined(mc68000)
@@ -805,7 +804,6 @@
# define STACKBOTTOM ((ptr_t) LMGetCurStackBase())
# define DATAEND /* not needed */
# endif
# ifdef LINUX
# if defined(__powerpc64__)
# define ALIGNMENT 8
@@ -884,20 +882,6 @@
# define DATASTART GC_data_start
# define DYNAMIC_LOADING
# endif
# ifdef SN_TARGET_PS3
# define NO_GETENV
# define CPP_WORDSZ 32
# define ALIGNMENT 4
extern int _end [];
// extern int _dso_handle[];
extern int __bss_start;
# define DATAEND (_end)
# define DATASTART (__bss_start)
# define STACKBOTTOM ((ptr_t) ps3_get_stack_bottom ())
# define USE_GENERIC_PUSHREGS
# endif
# ifdef NOSYS
# define ALIGNMENT 4
# define OS_TYPE "NOSYS"
@@ -1392,12 +1376,7 @@
# define DATAEND (_end)
extern int __data_start[];
# define DATASTART ((ptr_t)(__data_start))
# if defined(_MIPS_SZPTR) && (_MIPS_SZPTR == 64)
# define ALIGNMENT 8
# define CPP_WORDSZ 64
# else
# define ALIGNMENT 4
# endif
# define ALIGNMENT 4
# define USE_GENERIC_PUSH_REGS
# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 2 || __GLIBC__ > 2
# define LINUX_STACKBOTTOM
@@ -2384,13 +2363,8 @@
GC_amiga_get_mem((size_t)bytes + GC_page_size) \
+ GC_page_size-1)
# else
# if defined(SN_TARGET_PS3)
extern void *ps3_get_mem (size_t size);
# define GET_MEM(bytes) (struct hblk*) ps3_get_mem (bytes)
# else
extern ptr_t GC_unix_get_mem();
# define GET_MEM(bytes) (struct hblk *)GC_unix_get_mem(bytes)
#endif
# endif
# endif
# endif
-2
View File
@@ -81,8 +81,6 @@
/* dyn_load.c isn't linked in. */
#ifdef DYNAMIC_LOADING
# define GC_REGISTER_MAIN_STATIC_DATA() GC_register_main_static_data()
#elif defined(GC_DONT_REGISTER_MAIN_STATIC_DATA)
# define GC_REGISTER_MAIN_STATIC_DATA() FALSE
#else
# define GC_REGISTER_MAIN_STATIC_DATA() TRUE
#endif
+3 -12
View File
@@ -54,7 +54,7 @@
# endif
# include <stdio.h>
# if defined(MSWINCE) || defined (SN_TARGET_PS3)
# if defined(MSWINCE)
# define SIGSEGV 0 /* value is irrelevant */
# else
# include <signal.h>
@@ -336,13 +336,6 @@ char *GC_parse_map_entry(char *buf_ptr, word *start, word *end,
{
extern ptr_t GC_find_limit();
if (GC_no_dls)
/*
* Not needed, avoids the SIGSEGV caused by GC_find_limit which
* complicates debugging.
*/
return;
# ifdef LINUX
/* Try the easy approaches first: */
if ((ptr_t)__data_start != 0) {
@@ -511,7 +504,7 @@ void GC_enable_signals(void)
# if !defined(PCR) && !defined(AMIGA) && !defined(MSWIN32) \
&& !defined(MSWINCE) \
&& !defined(MACOS) && !defined(DJGPP) && !defined(DOS4GW) \
&& !defined(NOSYS) && !defined(ECOS) && !defined(SN_TARGET_PS3)
&& !defined(NOSYS) && !defined(ECOS)
# if defined(sigmask) && !defined(UTS4) && !defined(HURD)
/* Use the traditional BSD interface */
@@ -1456,10 +1449,8 @@ void GC_register_data_segments()
/* hanging from it. We're on thin ice here ... */
extern caddr_t sbrk();
GC_ASSERT(DATASTART);
GC_add_roots_inner(DATASTART, (char *)sbrk(0), FALSE);
# else
GC_ASSERT(DATASTART);
GC_add_roots_inner(DATASTART, (char *)(DATAEND), FALSE);
# if defined(DATASTART2)
GC_add_roots_inner(DATASTART2, (char *)(DATAEND2), FALSE);
@@ -1514,7 +1505,7 @@ void GC_register_data_segments()
# if !defined(OS2) && !defined(PCR) && !defined(AMIGA) \
&& !defined(MSWIN32) && !defined(MSWINCE) \
&& !defined(MACOS) && !defined(DOS4GW) && !defined(SN_TARGET_PS3)
&& !defined(MACOS) && !defined(DOS4GW)
# ifdef SUNOS4
extern caddr_t sbrk();
+2 -10
View File
@@ -1010,11 +1010,7 @@ void GC_thr_init()
t -> flags = DETACHED | MAIN_THREAD;
#ifdef MONO_DEBUGGER_SUPPORTED
if (gc_thread_vtable && gc_thread_vtable->thread_created)
# ifdef GC_DARWIN_THREADS
gc_thread_vtable->thread_created (mach_thread_self (), &t->stop_info.stack_ptr);
# else
gc_thread_vtable->thread_created (pthread_self (), &t->stop_info.stack_ptr);
# endif
gc_thread_vtable->thread_created (pthread_self (), &t->stop_info.stack_ptr);
#endif
GC_stop_init();
@@ -1328,11 +1324,7 @@ void * GC_start_routine_head(void * arg, void *base_addr,
# endif /* IA64 */
#ifdef MONO_DEBUGGER_SUPPORTED
if (gc_thread_vtable && gc_thread_vtable->thread_created)
# ifdef GC_DARWIN_THREADS
gc_thread_vtable->thread_created (mach_thread_self(), &me->stop_info.stack_ptr);
# else
gc_thread_vtable->thread_created (my_pthread, &me->stop_info.stack_ptr);
# endif
gc_thread_vtable->thread_created (my_pthread, &me->stop_info.stack_ptr);
#endif
UNLOCK();
+14 -12
View File
@@ -787,18 +787,20 @@ void * GC_thr_daemon(void * dummy)
UNLOCK();
} else {
t = GC_lookup_thread(departed);
GC_multithreaded--;
if (!(t -> flags & CLIENT_OWNS_STACK)) {
GC_stack_free(t -> stack, t -> stack_size);
}
if (t -> flags & DETACHED) {
GC_delete_thread(departed);
} else {
t -> status = status;
t -> flags |= FINISHED;
cond_signal(&(t -> join_cv));
cond_broadcast(&GC_prom_join_cv);
}
GC_multithreaded--;
if (t) {
if (!(t -> flags & CLIENT_OWNS_STACK)) {
GC_stack_free(t -> stack, t -> stack_size);
}
if (t -> flags & DETACHED) {
GC_delete_thread(departed);
} else {
t -> status = status;
t -> flags |= FINISHED;
cond_signal(&(t -> join_cv));
cond_broadcast(&GC_prom_join_cv);
}
}
UNLOCK();
}
}
Loaded 100 of 6572 files, more files were not shown because too many files have changed in this diff. Show more