mono.git
13 years agoAdd script to update Cecil from upstream
Jb Evain [Wed, 1 Dec 2010 15:46:22 +0000 (16:46 +0100)]
Add script to update Cecil from upstream

13 years agoFixed env path setting.
Paolo Molaro [Wed, 1 Dec 2010 14:46:04 +0000 (15:46 +0100)]
Fixed env path setting.

13 years ago[ReaderWriterLockSlim] Fix for #656353. Add corresponding unit test.
Jérémie Laval [Wed, 1 Dec 2010 14:36:06 +0000 (14:36 +0000)]
[ReaderWriterLockSlim] Fix for #656353. Add corresponding unit test.

When in SupportsRecursion mode, a test was not including proper state check for short-circuiting.

13 years agoAdd an asm (""); to the body of __jit_debug_register_code () to prevent gcc from
Zoltan Varga [Wed, 1 Dec 2010 14:33:34 +0000 (15:33 +0100)]
Add an asm (""); to the body of __jit_debug_register_code () to prevent gcc from
eliminating calls to it.

13 years agoLog profiler: added test suite.
Paolo Molaro [Wed, 1 Dec 2010 14:13:49 +0000 (15:13 +0100)]
Log profiler: added test suite.

13 years agoExport mono_xdebug_flush ().
Zoltan Varga [Wed, 1 Dec 2010 13:38:58 +0000 (14:38 +0100)]
Export mono_xdebug_flush ().

13 years agoMake sgen-los.c into a proper C module.
Zoltan Varga [Wed, 1 Dec 2010 13:04:21 +0000 (14:04 +0100)]
Make sgen-los.c into a proper C module.

13 years agoFix thread attaching
Rodrigo Kumpera [Wed, 1 Dec 2010 11:55:28 +0000 (09:55 -0200)]
Fix thread attaching

13 years agoMove the DEBUG() macro to sgen-gc.h and resurrect debug logging in the major collectors.
Zoltan Varga [Wed, 1 Dec 2010 05:21:15 +0000 (06:21 +0100)]
Move the DEBUG() macro to sgen-gc.h and resurrect debug logging in the major collectors.

13 years agoAdd response file suport to Mono.Options.
Jonathan Pryor [Wed, 1 Dec 2010 05:06:44 +0000 (00:06 -0500)]
Add response file suport to Mono.Options.

Response file support is an "opt-in" feature, performed by adding a
ResponseFileSource to the OptionSet initialization logic:

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

Response files make use of the new "ArgumentSource" support, which
acts as a low-level argument pre-processor, allowing processing of
arguments _before_ Option processing is performed.

13 years agoFix some warnings.
Zoltan Varga [Wed, 1 Dec 2010 04:55:57 +0000 (05:55 +0100)]
Fix some warnings.

13 years agoEmit write barriers for multi-dim Array.Set (). Fixes #656128.
Zoltan Varga [Wed, 1 Dec 2010 04:52:16 +0000 (05:52 +0100)]
Emit write barriers for multi-dim Array.Set (). Fixes #656128.

13 years agoHandle LOS objects in describe_ptr ().
Zoltan Varga [Wed, 1 Dec 2010 04:51:35 +0000 (05:51 +0100)]
Handle LOS objects in describe_ptr ().

13 years agoFix a few more cases of bad token verification.
Rodrigo Kumpera [Wed, 1 Dec 2010 03:28:00 +0000 (01:28 -0200)]
Fix a few more cases of bad token verification.

* verify.c (do_load_function_ptr): Handle wrappers
correctly.

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

* verify.c (do_ldstr): Handle wrappers correctly.

13 years agoAdd regression test for #647267
Rodrigo Kumpera [Wed, 1 Dec 2010 03:09:56 +0000 (01:09 -0200)]
Add regression test for #647267

13 years agoMarshal char taking Charset into account.
Rodrigo Kumpera [Wed, 1 Dec 2010 03:05:21 +0000 (01:05 -0200)]
Marshal char taking Charset into account.

* metadata.c (mono_type_to_unmanaged): Return
the appropriate type for char based on unicode option.

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

Fixes #647267

13 years agoTests update
Marek Safar [Tue, 30 Nov 2010 19:09:59 +0000 (19:09 +0000)]
Tests update

13 years agoImport parameter default values using TypeCode
Marek Safar [Tue, 30 Nov 2010 18:06:46 +0000 (18:06 +0000)]
Import parameter default values using TypeCode

13 years agoRemove remaining typeof
Marek Safar [Tue, 30 Nov 2010 16:52:55 +0000 (16:52 +0000)]
Remove remaining typeof

13 years agoRead dynamic attribute using CustomAttributeData
Marek Safar [Tue, 30 Nov 2010 15:47:08 +0000 (15:47 +0000)]
Read dynamic attribute using CustomAttributeData

13 years agoAdd mono_gc_alloc_mature and use it for threads.
Rodrigo Kumpera [Tue, 30 Nov 2010 17:24:48 +0000 (15:24 -0200)]
Add mono_gc_alloc_mature and use it for threads.

* gc.c: Implement mono_gc_alloc_mature
for boehm and null-gc.

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

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

* threads.c (create_thread_object): Ditto.

13 years agoCheck for null and valuetypes.
Rodrigo Kumpera [Tue, 30 Nov 2010 16:52:41 +0000 (14:52 -0200)]
Check for null and valuetypes.

* CustomAttributeBuilder.cs (Initialize): Check if we are
not passing null as values to valuetypes as this is invalid.

Fixes #515938

13 years agoAdd name reference tests to all readers/writers.
Atsushi Eno [Tue, 30 Nov 2010 16:15:03 +0000 (01:15 +0900)]
Add name reference tests to all readers/writers.

13 years agoFix a crash when signature decoding fails.
Rodrigo Kumpera [Tue, 30 Nov 2010 16:19:16 +0000 (14:19 -0200)]
Fix a crash when signature decoding fails.

* class.c (check_interface_method_override): Check if
signatures decoded correctly before comparing them.

Fixes #541815

13 years agoFix the ldftn to ldvirtftn feature.
Rodrigo Kumpera [Tue, 30 Nov 2010 14:25:34 +0000 (12:25 -0200)]
Fix the ldftn to ldvirtftn feature.

* mini-trampolines.c (mono_delegate_trampoline): A ldftn
is only to be promoted to a ldvirtftn if the target method
belongs to an abstract class. This fixes mcs/test/test-283.

13 years agoMerge branch 'master' of github.com:mono/mono
Rodrigo Kumpera [Tue, 30 Nov 2010 16:06:26 +0000 (14:06 -0200)]
Merge branch 'master' of github.com:mono/mono

13 years agoFix token checking for dynamic methods.
Rodrigo Kumpera [Tue, 30 Nov 2010 16:05:54 +0000 (14:05 -0200)]
Fix token checking for dynamic methods.

13 years agoAdd test xml files.
Atsushi Eno [Tue, 30 Nov 2010 15:30:56 +0000 (00:30 +0900)]
Add test xml files.

13 years agoAdd name reference test (not working).
Atsushi Eno [Tue, 30 Nov 2010 15:30:23 +0000 (00:30 +0900)]
Add name reference test (not working).

13 years agoEmit optional default value-type parameter using nullref
Marek Safar [Tue, 30 Nov 2010 13:25:40 +0000 (13:25 +0000)]
Emit optional default value-type parameter using nullref

13 years agoMove core predefined types into a new class
Marek Safar [Tue, 30 Nov 2010 12:31:02 +0000 (12:31 +0000)]
Move core predefined types into a new class

13 years agoAdd initial reflection dependant code
Marek Safar [Tue, 30 Nov 2010 10:14:36 +0000 (10:14 +0000)]
Add initial reflection dependant code

13 years agoMove metadata importer out of compiler context finally
Marek Safar [Tue, 30 Nov 2010 08:33:53 +0000 (08:33 +0000)]
Move metadata importer out of compiler context finally

13 years agoNew test
Marek Safar [Tue, 30 Nov 2010 08:33:05 +0000 (08:33 +0000)]
New test

13 years agoAdd another XData test case.
Atsushi Eno [Tue, 30 Nov 2010 11:06:58 +0000 (20:06 +0900)]
Add another XData test case.

Though I wonder how to serialize XData then... :-?

13 years agoempty namespace should be successfully parsed.
Atsushi Eno [Tue, 30 Nov 2010 11:03:38 +0000 (20:03 +0900)]
empty namespace should be successfully parsed.

13 years agoLog profiler: BSD/win32 portability fixes.
Paolo Molaro [Tue, 30 Nov 2010 10:05:18 +0000 (11:05 +0100)]
Log profiler: BSD/win32 portability fixes.

13 years agoCall GetObject only once per current member.
Atsushi Eno [Tue, 30 Nov 2010 09:22:11 +0000 (18:22 +0900)]
Call GetObject only once per current member.

Previous code was errorneous if there is an array inside a collection.

13 years agoFill List's implementation details gap.
Atsushi Eno [Tue, 30 Nov 2010 06:45:43 +0000 (15:45 +0900)]
Fill List's implementation details gap.

13 years agoDo not retrive properties with get parameters (indexers).
Atsushi Eno [Tue, 30 Nov 2010 06:40:19 +0000 (15:40 +0900)]
Do not retrive properties with get parameters (indexers).

13 years agoAdd another test xml file.
Atsushi Eno [Tue, 30 Nov 2010 06:20:03 +0000 (15:20 +0900)]
Add another test xml file.

13 years agoAdd another reader/writer test, for List of Array.
Atsushi Eno [Tue, 30 Nov 2010 06:19:09 +0000 (15:19 +0900)]
Add another reader/writer test, for List of Array.

13 years agoRenamed test files.
Atsushi Eno [Tue, 30 Nov 2010 05:48:47 +0000 (14:48 +0900)]
Renamed test files.

13 years agoExtract XamlObjectReaderTest class into another file. Files are to be renamed.
Atsushi Eno [Tue, 30 Nov 2010 05:45:17 +0000 (14:45 +0900)]
Extract XamlObjectReaderTest class into another file. Files are to be renamed.

13 years agoFix randomly failing unit test
Sebastien Pouliot [Tue, 30 Nov 2010 03:21:52 +0000 (22:21 -0500)]
Fix randomly failing unit test

* MachineKeySectionUtilsTest.cs: Do not assume xor will change a byte

13 years agoAdd MakeBinary test for ArrayIndex expressions
Jb Evain [Mon, 29 Nov 2010 21:51:38 +0000 (22:51 +0100)]
Add MakeBinary test for ArrayIndex expressions

13 years agoFix Expression.MakeBinary so it can return ArrayIndex nodes
Daniel Sell [Mon, 29 Nov 2010 21:49:31 +0000 (22:49 +0100)]
Fix Expression.MakeBinary so it can return ArrayIndex nodes

13 years agoDon't allow zero index tokens on IL streams.
Rodrigo Kumpera [Mon, 29 Nov 2010 21:58:08 +0000 (19:58 -0200)]
Don't allow zero index tokens on IL streams.

* verify.c (token_bounds_check): Check if token index is zero.

Fixes #651682

13 years agoCheck imported custom attributes based on name only
Marek Safar [Mon, 29 Nov 2010 18:41:24 +0000 (18:41 +0000)]
Check imported custom attributes based on name only

13 years agoMade type member kind logic more flexible
Marek Safar [Mon, 29 Nov 2010 16:15:14 +0000 (16:15 +0000)]
Made type member kind logic more flexible

13 years agoDon't special case value type constraint
Marek Safar [Mon, 29 Nov 2010 14:57:02 +0000 (14:57 +0000)]
Don't special case value type constraint

13 years agoAdd sanity check for imported static fixed buffer
Marek Safar [Mon, 29 Nov 2010 12:52:58 +0000 (12:52 +0000)]
Add sanity check for imported static fixed buffer

13 years agoRemove some junk I left by accident
Rodrigo Kumpera [Mon, 29 Nov 2010 21:25:57 +0000 (19:25 -0200)]
Remove some junk I left by accident

13 years agoFix crasher in core clr security.
Rodrigo Kumpera [Mon, 29 Nov 2010 21:20:42 +0000 (19:20 -0200)]
Fix crasher in core clr security.

* security-core-clr.c (get_default_ctor): Handle nulls in
MonoClass::methods.

Fixes #569542

13 years agoDon't mono_class_init when creating a token.
Rodrigo Kumpera [Mon, 29 Nov 2010 21:06:54 +0000 (19:06 -0200)]
Don't mono_class_init when creating a token.

* reflection.c (mono_image_create_token): Don't mono_class_init
here as it's not needed and break mcs for cases doing
typeof() over broken types.

Fixes a TLE in #653211

13 years agoWIP
Rodrigo Kumpera [Mon, 29 Nov 2010 20:13:31 +0000 (18:13 -0200)]
WIP

13 years ago[sgen] Recompute heap boundaries at each major collection.
Mark Probst [Thu, 25 Nov 2010 14:08:32 +0000 (15:08 +0100)]
[sgen] Recompute heap boundaries at each major collection.

Previously we updated heap boundaries when a new block was allocated,
but no updates were performed for freed blocks, resulting in a
constant increase in the heap boundaries which can lead to unnecessary
work during pinning.

Now we recompute the heap boundaries during the sweep phase at each
major collection.

13 years agoFix amd64 build.
Zoltan Varga [Mon, 29 Nov 2010 16:34:10 +0000 (17:34 +0100)]
Fix amd64 build.

13 years agoForgot old header file in profiler.c.
Paolo Molaro [Mon, 29 Nov 2010 16:16:07 +0000 (17:16 +0100)]
Forgot old header file in profiler.c.

13 years agoMake dist fixed in profiler.
Paolo Molaro [Mon, 29 Nov 2010 16:12:58 +0000 (17:12 +0100)]
Make dist fixed in profiler.

13 years agoFix a crash on MassTransit.
Rodrigo Kumpera [Mon, 29 Nov 2010 16:22:04 +0000 (14:22 -0200)]
Fix a crash on MassTransit.

* class.c (make_generic_param_class): Don't assert if parent
is broken.

Fixes #653211

13 years agoAdd support for the internal boehm-gc on OpenBSD
Robert Nagy [Mon, 29 Nov 2010 14:56:37 +0000 (15:56 +0100)]
Add support for the internal boehm-gc on OpenBSD

13 years agoAdd support for the internal boehm-gc on OpenBSD
Robert Nagy [Mon, 29 Nov 2010 14:53:41 +0000 (15:53 +0100)]
Add support for the internal boehm-gc on OpenBSD

13 years agoProfiler: reomved the old builtin default profiler.
Paolo Molaro [Mon, 29 Nov 2010 15:15:41 +0000 (16:15 +0100)]
Profiler: reomved the old builtin default profiler.

The new log profiler is now used automatically instead of the old
default profiler.

13 years agoM linux performance counters.
Paolo Molaro [Mon, 29 Nov 2010 15:14:06 +0000 (16:14 +0100)]
M linux performance counters.
Added missing file for

13 years agoSupport attribute validation.
Atsushi Eno [Mon, 29 Nov 2010 15:10:36 +0000 (00:10 +0900)]
Support attribute validation.

13 years agoUse AttributeSchemaType as it is 2.0 API. This fixes incorrectly skipped type validation.
Atsushi Eno [Mon, 29 Nov 2010 15:09:13 +0000 (00:09 +0900)]
Use AttributeSchemaType as it is 2.0 API. This fixes incorrectly skipped type validation.

13 years agoHandle more type conversion.
Atsushi Eno [Mon, 29 Nov 2010 15:08:40 +0000 (00:08 +0900)]
Handle more type conversion.

13 years agoLog profiler: portability checks.
Paolo Molaro [Mon, 29 Nov 2010 14:44:21 +0000 (15:44 +0100)]
Log profiler: portability checks.

13 years agoLog profiler: added statistical sampling mode.
Paolo Molaro [Mon, 29 Nov 2010 11:04:23 +0000 (12:04 +0100)]
Log profiler: added statistical sampling mode.

* man/mprof-report.1, log-profiler.txt: updated the documentation.
* decode.c: added jit report and sample report.
* proflog.h, proflog.c: implemented statistical sampling mode, using
either the mono built-in signal based sampling and the Linux
perforamnce counters perf subsystem. Unmanaged symbols are
currently available for ELF systems implementing dl_iterate_phdr()
or systems implementing dladdr().

13 years agoImplemented XDocument.Validate().
Atsushi Eno [Mon, 29 Nov 2010 12:39:16 +0000 (21:39 +0900)]
Implemented XDocument.Validate().

13 years agoReturn different instances of XmlSchemaInfo for each validated node in XmlSchemaValid...
Atsushi Eno [Mon, 29 Nov 2010 12:36:50 +0000 (21:36 +0900)]
Return different instances of XmlSchemaInfo for each validated node in XmlSchemaValidatingReader.

13 years agoTypeExtension and StaticExtension should now be correctly written and read.
Atsushi Eno [Mon, 29 Nov 2010 11:33:55 +0000 (20:33 +0900)]
TypeExtension and StaticExtension should now be correctly written and read.

13 years agoRefactoring Instance handling for consistent MarkupExtension reading.
Atsushi Eno [Mon, 29 Nov 2010 07:13:46 +0000 (16:13 +0900)]
Refactoring Instance handling for consistent MarkupExtension reading.

Removed tricky GetWrappedValue() while attempting to reduce its use (could
totally remove it out) to identify which parts these readers and writers need
it. Now It is in TypeExtensionMethods. Still needs fix for StaticExtension.

Add another tricky test case: List of Array (not working) which also involves
MarkupExtension.

13 years agoAwesome doc contributions from Adrian Kummerlaender
Miguel de Icaza [Sun, 28 Nov 2010 16:14:52 +0000 (11:14 -0500)]
Awesome doc contributions from Adrian Kummerlaender

13 years agoAwesome doc contributions from Adrian Kummerlaender
Miguel de Icaza [Sun, 28 Nov 2010 16:12:38 +0000 (11:12 -0500)]
Awesome doc contributions from Adrian Kummerlaender

13 years agoEnable test for #318677
Rodrigo Kumpera [Sat, 27 Nov 2010 18:11:46 +0000 (16:11 -0200)]
Enable test for #318677

13 years agoHandle fallthru to out of line blocks.
Rodrigo Kumpera [Sat, 27 Nov 2010 17:26:46 +0000 (15:26 -0200)]
Handle fallthru to out of line blocks.

* mini.c (mini_method_compile): Add a BR to all basic blocks
that fallthru blocks that are out of line.

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

Fixes #318677

13 years agoDisable finally_guard.exe on amd64 until it is fixed.
Zoltan Varga [Sat, 27 Nov 2010 08:17:24 +0000 (09:17 +0100)]
Disable finally_guard.exe on amd64 until it is fixed.

13 years agoFix corlib regression
Rodrigo Kumpera [Sat, 27 Nov 2010 05:20:29 +0000 (03:20 -0200)]
Fix corlib regression

13 years agoRemove some culture caching dead code
Rodrigo Kumpera [Sat, 27 Nov 2010 05:05:50 +0000 (03:05 -0200)]
Remove some culture caching dead code

13 years agoMove culture handling to Thread from InternalThread.
Rodrigo Kumpera [Sat, 27 Nov 2010 04:52:13 +0000 (02:52 -0200)]
Move culture handling to Thread from InternalThread.

* Thread.cs: Move culture data from InternalThread to Thread
and thus completely avoid the whole caching and serialization
nightmare. Even thou this is a cleanup it should speed up
multi-appdomain setups.

* threads.c: Remove culture caching machinery.

* icall-def.h: Ditto.

Fixes #318750 as a byproduct.

13 years agoFix an aot crash if field->type is not initialized.
Zoltan Varga [Sat, 27 Nov 2010 02:59:53 +0000 (03:59 +0100)]
Fix an aot crash if field->type is not initialized.

13 years agoAdd regression test for #317488
Rodrigo Kumpera [Sat, 27 Nov 2010 02:13:33 +0000 (00:13 -0200)]
Add regression test for #317488

13 years agoHandle another extension to delegates.
Rodrigo Kumpera [Sat, 27 Nov 2010 02:00:19 +0000 (00:00 -0200)]
Handle another extension to delegates.

* mini-trampolines.c (mono_delegate_trampoline): Handle the
case of a delegate created with ldftn on which the method token
points to an abstract method. This case behaves in the same way
as ldvirtftn.

Fixes #317488

13 years agoThrow an exception if a custom attr cannot be decoded. Fixes #656058.
Zoltan Varga [Sat, 27 Nov 2010 01:31:05 +0000 (02:31 +0100)]
Throw an exception if a custom attr cannot be decoded. Fixes #656058.

13 years agoUpdate the help message for --verify-all.
Zoltan Varga [Sat, 27 Nov 2010 00:53:58 +0000 (01:53 +0100)]
Update the help message for --verify-all.

13 years agoDefine MONO_ARCH_INIT_TOP_LMF_ENTRY for all architectures.
Zoltan Varga [Fri, 26 Nov 2010 21:43:52 +0000 (22:43 +0100)]
Define MONO_ARCH_INIT_TOP_LMF_ENTRY for all architectures.

13 years agoMerge branch 'master' of github.com:mono/mono
Zoltan Varga [Fri, 26 Nov 2010 21:28:09 +0000 (16:28 -0500)]
Merge branch 'master' of github.com:mono/mono

13 years agoRemove unused lmf->ebp field on arm.
Zoltan Varga [Fri, 26 Nov 2010 21:24:23 +0000 (16:24 -0500)]
Remove unused lmf->ebp field on arm.

13 years agoFix typo
Rodrigo Kumpera [Fri, 26 Nov 2010 17:42:05 +0000 (15:42 -0200)]
Fix typo

13 years agoFix those tests so they are verifiable.
Rodrigo Kumpera [Fri, 26 Nov 2010 17:29:47 +0000 (15:29 -0200)]
Fix those tests so they are verifiable.

13 years agoCheck TOS for compatibility with return type.
Rodrigo Kumpera [Fri, 26 Nov 2010 15:44:01 +0000 (13:44 -0200)]
Check TOS for compatibility with return type.

* method-to-ir.c (mono_method_to_ir): Check if TOS
is store compatible with the return type of the
current method.

Fixes #655497

13 years agoHandle dynamic methods inside the verifier.
Rodrigo Kumpera [Fri, 26 Nov 2010 14:31:11 +0000 (12:31 -0200)]
Handle dynamic methods inside the verifier.

* verify.c (mono_verifier_is_enabled_for_method):
A dynamic method has a different wrapper kind than regular
methods.

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

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

FIxes #655497 under sandbox.

13 years ago[Task] In every TaskFactory method accepting a Task array, we have to make a private...
Jérémie Laval [Fri, 26 Nov 2010 16:52:14 +0000 (16:52 +0000)]
[Task] In every TaskFactory method accepting a Task array, we have to make a private copy to avoid changes to the array content from the moment we register the continuation to when we call the callback

13 years ago[Task] Check if Task isn't finished before going into the Scheduler for Wait
Jérémie Laval [Fri, 26 Nov 2010 16:51:03 +0000 (16:51 +0000)]
[Task] Check if Task isn't finished before going into the Scheduler for Wait

13 years ago[Task] Set continuation status to WaitingForActivation in ContinueWithCore
Jérémie Laval [Fri, 26 Nov 2010 16:50:11 +0000 (16:50 +0000)]
[Task] Set continuation status to WaitingForActivation in ContinueWithCore

13 years ago[Task] Only launch continuation synchronously when the corresponding option in TaskCo...
Jérémie Laval [Fri, 26 Nov 2010 16:49:16 +0000 (16:49 +0000)]
[Task] Only launch continuation synchronously when the corresponding option in TaskContinuationOptions is set

13 years agoRemoved few custom attribute IsDefined calls
Marek Safar [Fri, 26 Nov 2010 15:46:46 +0000 (15:46 +0000)]
Removed few custom attribute IsDefined calls

13 years agoImport constants using their raw values only
Marek Safar [Fri, 26 Nov 2010 12:26:55 +0000 (12:26 +0000)]
Import constants using their raw values only