Compare commits

...
Author SHA1 Message Date
Zoltan Varga ef79d2e0eb Fix the mcs-compileall test target. 2014-11-20 12:53:39 -05:00
Zoltan Varga 3d6ebf929e Remove net 2.0 dependencies from mcs tests. 2014-11-20 04:34:07 -05:00
Zoltan Varga ea3575cfaa Remove build system support for the net 2.0/3.5 profiles. 2014-11-20 04:18:02 -05:00
Zoltan Varga 3130eb18ce Fix a warning. 2014-11-20 00:06:03 -05:00
Zoltan Varga 9d3d8a5c53 Fix a warning. 2014-11-20 00:05:36 -05:00
Miguel de Icaza 716b78c578 Add referencesource submodule 2014-11-19 21:01:39 -05:00
Zoltan Varga 5644d157c8 Merge pull request #1411 from jbevain/sdb-frame-domain
[sdb] Expose the domain of the stack frames
2014-11-19 20:51:34 -05:00
Zoltan Varga 2c7265d6b9 [jit] Remove an unused interpeter file. 2014-11-19 19:20:02 -05:00
Zoltan Varga fb033c5301 [jit] Remove some unused defines. 2014-11-19 19:13:01 -05:00
Mark Probst d1b51438d1 [sgen] Remove dead code. 2014-11-19 12:46:39 -08:00
Miguel de Icaza 014f882aea Merge pull request #1415 from ermshiperete/FixTruncatedButton
[MWF] Fix bug that truncates button text
2014-11-19 14:05:03 -05:00
Zoltan Varga b464556d05 Merge pull request #1414 from ExonyLimited/process-vmswap
Process.PagedMemorySize64 now returns value from /proc/PID/status
2014-11-19 13:58:25 -05:00
Eberhard Beilharz da058bf8a4 [MWF] Fix bug that truncates button text
A previous change (885b065e) accidentally calculated the text size
in some places without padding. This resulted in a slightly to small
text rectangle, causing the text to be truncated.
2014-11-19 19:48:27 +01:00
Marek Safar 87f59dce24 Fixes build 2014-11-19 18:07:52 +01:00
Marek Safar 4de9aa838b [corlib] Capture awaited task exception stack. First part of #18629 2014-11-19 17:41:52 +01:00
Craig Minihan 1cc51f63ee Process.PagedMemorySize64 now returns value from /proc/PID/status 2014-11-19 08:07:37 -08:00
Rolf Bjarne Kvinge fbf1077afd Fix typo, there is no profile called 'xammaci'. 2014-11-19 10:29:33 +01:00
Mark Probst 38d9679d82 Merge pull request #1413 from BrzVlad/bin-prot-io
System calls for binary protocol writing
2014-11-18 17:59:16 -08:00
Vlad Brezae 66acb4f3e1 [sgen] Don't use standard C API for binary protocol IO.
This prevents deadlocks from libc locks when interrupting.
2014-11-18 17:56:01 -08:00
Zoltan Varga fccff0d9bb [sdb] Avoid asserts on shutdown when the appdomain unload callbacks are called on the debugger thread during shutdown. Fixes #24342. 2014-11-18 20:54:12 -05:00
Vlad Brezae 3c1147121e [sgen] Fix binary protocol build 2014-11-18 17:36:50 -08:00
Zoltan Varga 672a02e177 [jit] Fix the calculation of the epilog size for EH info. Fixes #24577. 2014-11-18 16:53:26 -05:00
Rodrigo Kumpera 4f2e8dfddd [runtime] Replace mono_method_get_signature(_full) with the _checked variant. 2014-11-18 16:51:07 -05:00
Rodrigo Kumpera f8de60d964 [runtime] Introduce mono_method_get_signature_checked as the MonoError variant of mono_method_get_signature_full. 2014-11-18 16:51:06 -05:00
Rodrigo Kumpera d67dd77506 [runtime] Remove monodiet.c. 2014-11-18 16:51:06 -05:00
Zoltan Varga 9347782b8b [jit] Remove an assert from mono_arch_find_jit_info () on x86 which can be hit when a profiler stack walk is done while in a jump trampoline. 2014-11-18 16:03:51 -05:00
Rodrigo Kumpera 939fa90ceb [jit] Use _checked variant of mono_field_from_token. 2014-11-18 14:04:10 -05:00
Rodrigo Kumpera e94e5e5ac1 [runtime] Use _checked variant of mono_field_from_token. 2014-11-18 14:04:10 -05:00
Rodrigo Kumpera 01f892bdb5 [jit] Use MonoError when possible for error handling. 2014-11-18 14:04:09 -05:00
Rodrigo Kumpera d1c8e68397 [jit] Add a JIT failure mode that uses MonoError. 2014-11-18 14:04:09 -05:00
Rodrigo Kumpera c544d330dd [runtime] more loader error cleanup. 2014-11-18 14:04:09 -05:00
Ludovic Henry c9c80ce2ce [runtime] Fix #24605 "counters not enabled" message in monodis and peverify 2014-11-18 11:51:43 -05:00
Marek Safar 383daff454 [eval] Don't assumen all captured types have storey assigned 2014-11-18 16:51:11 +01:00
Marek Safar 281934e127 [mcs] Remove primary constructors and declaration expressions from C#6 2014-11-18 14:44:16 +01:00
Jb Evain 567834db69 [Mono.Debugger.Soft] Add test for StackFrame.Domain
Assert that the property returns the proper domain for the stack frame.
2014-11-18 14:12:36 +01:00
Marek Safar 2cee8a135e [mcs] Fix error reporting for incomplete attribute target. Fixes #24537 2014-11-18 14:11:59 +01:00
Jb Evain 2729751fcf [Mono.Debugger.Soft] Implement StackFrame.Domain
This property uses the new CMD_STACK_FRAME_GET_DOMAIN command
to retrieve and cache the domain in which the stack frame
is executing.

Bump the protocol version to match the runtime.
2014-11-18 14:10:53 +01:00
Jb Evain f37be5d96b [sdb] Add command CMD_STACK_FRAME_GET_DOMAIN
This command returns the domain in which the stack frame is executing

Bump protocol version.
2014-11-18 14:09:15 +01:00
Marek Safar 20c5941b4c [mcs] Less cascading errors 2014-11-18 13:40:56 +01:00
Marek Safar b9e6127506 [mcs] Makes flow analysis of goto/goto case significantly faster. Fixes #24511 2014-11-18 10:28:55 +01:00
Zoltan Varga df8abf4920 [jit] Fix a class initialization race which happens if a class initializer initializes a got slot before it finishes running. Fixes #23242. 2014-11-17 21:44:35 -05:00
Zoltan Varga 6b7a11a77b [aot] Disable COM support in AOT code, the COM wrapper code doesn't play well with AOT. 2014-11-17 17:42:35 -05:00
Mark Probst 40c30b5288 Merge pull request #1406 from BrzVlad/monitor-resurrect
Keep the monitor link to the object active also in the resurrection case
2014-11-17 14:17:32 -08:00
Rodrigo Kumpera 3ad76e42b2 Merge pull request #1388 from schani/fix-23401
Fix 23401
2014-11-17 17:17:04 -05:00
Zoltan Varga b3e8e1fa20 [runtime] Avoid crashes when a non-runtime thread receives a SIGQUIT. 2014-11-17 17:03:41 -05:00
Sebastien Pouliot 59b80fb93b Merge pull request #1408 from brendanzagaeski/signed-xml-bug-7716
[System.Security] Fix SignedXml bug #7716 with tests
2014-11-17 16:32:54 -05:00
Zoltan Varga e52d20ed7d [arm] Applied patch from Richard Dunkley <[email protected]>. Fix complication problems with newer gcc versions. Fixes #24588. 2014-11-17 15:46:39 -05:00
Brendan Zagaeski c5375566d5 [System.Security] Fix SignedXml bug #7716 with tests
The underlying problem for bug 7716 [1] was that the Mono C14N XML
canonicalizer was not sorting the XML attributes in the same order as
Microsoft .NET's canonicalizer.

The C14N specification [2] states: "the attributes are sorted
lexicographically by attribute name (based on Unicode character code
points)." This wording suggests that the order of attributes should be
strictly ascending based on Unicode byte value. This commit changes the
attribute sort order to match the specification.

The new tests pass on Windows, fail on Mono before this change, and
succeed on Mono after this change.

[1] https://bugzilla.xamarin.com/show_bug.cgi?id=7716
[2] http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html
2014-11-17 15:45:53 -05:00
Vlad Brezae 09edaaf4d4 Keep the monitor link to the object active also in the resurrection case.
The MonoThreadsSync data field contains a weak reference to the object that uses the structure, which should be a tracking one.
2014-11-17 12:23:32 -08:00
Rodrigo Kumpera c12c27a9a9 Merge pull request #1405 from mono/revert-1289-stackframe
Revert "Improved exception stack frame displayed data."
2014-11-17 14:39:43 -05:00
Rodrigo Kumpera 7e7fce7bf1 Revert "Improved exception stack frame displayed data." 2014-11-17 14:37:41 -05:00
Rodrigo Kumpera f256f515de Merge pull request #1289 from esdrubal/stackframe
Improved exception stack frame displayed data.
2014-11-17 12:44:35 -05:00
Marcos Henrich 937c7233d2 Changed METHOD_EXIT_IL_OFFSET back to 0xffffff.
The previous value was -2, that could introduce comparison issues.
Added flag MONO_SEQ_POINT_FLAG_EXIT_IL that is used to encode the exit IL, this avoids a 4 byte IL offset delta.
2014-11-17 20:47:43 +08:00
Marcos Henrich 8bf7d26eaa Added out_buf parameter to encode_var_int and decode_var_int. 2014-11-17 18:20:15 +08:00
Marcos Henrich c6fb27e6e9 Renamed seq_point_info_write_size to seq_point_info_get_write_size. 2014-11-17 17:54:51 +08:00
Marcos Henrich 0f2444e940 MonoSeqPointInfo data is now compressed.
Encode data MonoSeqPointInfo len, has_debug_data and alloc_data into a single variable int.
2014-11-17 17:54:50 +08:00
Marcos Henrich 698e12809f MonoSeqPointInfo no longer uses a GByteArray.
GByteArray requires too much memory, we still use GByteArray to build the buffer but when its done we store in MonoSeqPointInfo a copy.
2014-11-17 17:54:49 +08:00
Marcos Henrich 95b1a5bbf9 Merged SeqPoint.next_array with SeqPoint.array. 2014-11-17 17:54:49 +08:00
Marcos Henrich 63dce7b8e3 SeqPoint next array is no longer allocated by default.
Next array will only be allocated if has_debug_data is true.
2014-11-17 17:54:48 +08:00
Marcos Henrich ba7b9fc562 Added size of sequence points to mono jit stats. 2014-11-17 17:54:48 +08:00
Marcos Henrich 49b7ef4442 Ignore seq points of entry and exit IL offsets.
Those seq points are only required for debugging.
2014-11-17 17:54:47 +08:00
Marcos Henrich 6dea3629f7 Changed mini-exceptions functions to get IL offsets from seq point.
mono_walk_stack_full and ves_icall_get_trace are now using find_prev_seq_point_for_native_offset to retrieve IL offsets.
2014-11-17 17:54:46 +08:00
Marcos Henrich e8412d602f Sequence points debug data is no longer store by default.
Debug data is only stored when cfg->gen_seq_points_debug_data is true.
2014-11-17 17:54:45 +08:00
Marcos Henrich d55bb757b3 Sequence points are now generated by default. 2014-11-17 17:54:23 +08:00
Marcos Henrich 4c8d5ee138 Changed METHOD_EXIT_IL_OFFSET to -2
The new value produces lower deltas and does not overflow when using variable integer encoding.
2014-11-15 03:44:10 +08:00
Marcos Henrich 49c48add7b aot-runtime and aot-compiler now use seq_point_info_read/write. 2014-11-15 03:44:09 +08:00
Marcos Henrich eecf7a8ab5 Added methods to read and write MonoSeqPointInfo. 2014-11-15 03:44:09 +08:00
Marcos Henrich 09bd838116 SeqPoint are now kept in memory with a compact encoding.
MonoSeqPointInfo has now a pointer to a buffer containing encoded sequence points, and to a buffer containing next values.
As there is no longer an array of SeqPoint ready to be read, SeqPointIterator was added.
2014-11-15 03:44:08 +08:00
Marcos Henrich d07e74a3f1 Moved sequence point logic to seq-points.h and seq-points.c 2014-11-15 03:44:07 +08:00
Marcos Henrich afc92f22dc Improved exception stack frame displayed data.
Added stack frame method address display.
2014-11-15 03:43:54 +08:00
Marcos Henrich 20523739f8 Added to StackFrame a field for the method address.
Incremented MONO_CORLIB_VERSION.
2014-11-15 03:34:31 +08:00
Zoltan Varga 4f237e0ce1 [runtime] Fix the errors in edb931dfb9 so it actually works. 2014-11-13 22:26:14 -05:00
Mark Probst 06b8128992 [sgen] Add a FIXME. 2014-11-13 15:46:05 -08:00
Mark Probst 7bd3bd73d5 [sgen] Never mark from two threads at the same time.
We don't update mark bits atomically, so we can't have two threads
marking at the same time, which means we have to stop the concurrent
collector worker thread while we do work in the main GC thread.  That
includes nursery collections, because they also touch mark bits.

Also problematic are mod-union updates.  The worker threads can add
global remsets, which they do in the main cardtable.  This will conflict
with updating the mod-union table, so having the workers stopped also
applies there.
2014-11-13 15:46:01 -08:00
Mark Probst e12085b4c9 [sgen] Reorganize sgen_perform_collection for clarity. 2014-11-13 15:44:28 -08:00
Mark Probst 1624ec14c3 [sgen] Make check-mark-bits work again. 2014-11-13 15:44:28 -08:00
Mark Probst b87d9685bb [sgen] Scan the whole nursery in the finish mark pause.
Before we do all the major heap work in the finish mark pause of a
concurrent collection, we perform a nursery collection, for simplicity's
sake.

The nursery collection left pinned objects in the nursery, without
following their references into the major heap, so the major heap work
had to scan those objects again.  There was no special provisioning
for this—major mark would do the pinning again, and we would
automatically end up scanning the objects again.

The way we determine the stack end for the GC thread, however,
had the effect of making pinning non-deterministic.  We would
conservatively scan part of the GC thread's stack, which was
subject to change, to pinning again might result in less or more
objects pinned.

The proper solution would be to determine the stack end correctly,
but for now we will just the whole nursery.
2014-11-13 15:44:27 -08:00
Mark Probst 537665b54e [sgen] Only count cards for STW protocol if heavy is enabled. 2014-11-13 15:44:26 -08:00
Mark Probst 3639ee61f1 [sgen] Binary protocol entry for pin stage. 2014-11-13 15:44:15 -08:00
Mark Probst fbfe8518ce [sgen] Add missing volatile. 2014-11-13 15:44:14 -08:00
Rolf Bjarne Kvinge 597183658e [System] Ignore two tests which are failing due to external factors changing.
See https://bugzilla.xamarin.com/show_bug.cgi?id=24340
2014-11-14 00:31:16 +01:00
Jonathan Pryor 6299445e81 [mono-api-html] Allow ignoring addition of property setters.
As mentioned in commit 789517f8, I'm trying to compare inter-API level
differences in Mono.Android.dll, and want to reduce as much
"meaningless noise" as possible -- changes which don't meaningfully
break API or ABI.

Among those "meaningless" changes are the addition of property setters
to properties. Adding a setter doesn't break API or ABI.

Add a `mono-api-html --ignore-changes-property-setters` option.

  --ignore-changes-property-setters:
      Ignore the addition of property setters.

      If a source property contains a getter and the target property
      contains both a getter and a setter, do not flag this as a
      change.
2014-11-13 13:36:45 -05:00
Jonathan Pryor 09d16b7265 [mono-api-html] Make --ignore-changes-virtual less lenient.
As mentioned in commit 789517f8, the intentino of
`mono-api-html --ignore-changes-virtual` is so that when a method is
changed from non-virtual to virtual or override, or from virtual to
override, a "Removed member" message isn't triggered.

However, the previous implementation was too lenient. While *adding*
virtual to the method is fine, *removing* is NOT fine, as that would
be an API breaking change (e.g. all classes which attempt to override
a previously virtual method could no longer do so).

Make the virtual check stricter so that virtual/override to
non-virtual changes are not ignored.
2014-11-13 13:36:45 -05:00
Marek Safar 3d293f5a71 [xbuild] Add 14.0 toolchain 2014-11-13 18:37:43 +01:00
Marek Safar 4697ef6e77 [mcs] More updates to auto-properties v6 implementation 2014-11-13 17:19:04 +01:00
Zoltan Varga a32054ece9 [jit] Fix gshared and aot support for --debug=casts. 2014-11-12 20:12:44 -05:00
Zoltan Varga cdfb430b48 [jit] Fix --debug=casts support for casts in gshared methods. 2014-11-12 19:58:27 -05:00
Jonathan Pryor 789517f878 [mono-api-html] Allow ignoring parameter names, virtual.
I've been trying to review API diffs in Xamarin.Android between API
levels, but the diffs are "noisy" because Google will change parameter
names at-will, or will change a non-virtual method into a virtual
method, or a virtual method into an override, all of which are
acceptable changes but individually generate a Removed line in
mono-api-html output, and manually removing the *hundreds* of changes
is error-prone.

Add two new option flags to mono-api-html:

  --ignore-changes-parameter-names:
      Ignore changes in constructor and method parameter names.

      If parameter names change between <reference.xml> and
      <assembly.xml>, don't report a change for the constructor or
      method.

  --ignore-changes-virtual:
      Ignore changes in "virtual-ness".

      If a method or property changes from non-virtual to virtual,
      non-virtual to override, or virtual to override, don't report a
      change for the member.
2014-11-12 17:34:21 -05:00
Rodrigo Kumpera b486e8372e [runtime] Fix a deadlock introduced in the last commit. 2014-11-12 16:49:30 -05:00
Rodrigo Kumpera 363e4bb2a6 [runtime] What MonoImage::ptr_cache with the image lock. Do optimistic locking here too. 2014-11-12 11:29:07 -05:00
Rodrigo Kumpera 2ef2b0d754 [runtime] Replace the loader lock when protecting the global module map. 2014-11-12 11:29:06 -05:00
Rodrigo Kumpera c6b845ea23 Add comment on one usage of the loader lock. 2014-11-12 11:29:06 -05:00
Rodrigo Kumpera 0526aa45e0 [runtime] Protect MonoImage::files with the image lock and make image loading optimistic. 2014-11-12 11:29:06 -05:00
Rodrigo Kumpera 4fe5a46e55 Change mono_class_from_generic_parameter to use the image lock.
We change the function to use the lock/validate pattern. This is both
more scalable and enables us to use the image lock, since the amount of
work done with it held is now trivial.
2014-11-12 11:29:06 -05:00
Rodrigo Kumpera 532420cc64 Reduce usage of the loader lock in method lookup.
The function mono_method_inflated_lookup no longer needs the loader lock to be held
as the hashtable is now protected by the imageset lock.

This means that mono_class_inflate_generic_method_full_checked doesn't need to take the
loader lock.

The function mono_method_set_generic_container uses mono_image_property_insert which takes
the image lock and not the loader lock. Adjust the locking comment.
2014-11-12 11:29:06 -05:00
Zoltan Varga 50e286b2e7 Fix the mobile build. 2014-11-11 20:11:45 -05:00
Zoltan Varga 60d83a46e7 [aot] Avoid an assert when AOTing a non-mobile mscorlib in a runtime with COM disabled. 2014-11-11 20:11:45 -05:00
Ludovic Henry 83fac07316 [perfcounters,proflog,mprof-report] Add support for Performance Counters sampling in the log profiler 2014-11-11 13:46:47 -05:00
Ludovic Henry 7b59f2dcf1 [counters,proflog] Add mono_counters_on_register/delete callbacks + Use them in proflog
This is used for counters that are defined after runtime initialization. It implies that TYPE_SAMPLE_COUNTERS_DESC can now be emitted at any time, and not only once.
2014-11-11 13:40:29 -05:00
Ludovic Henry 734b0e9d32 [counters] Make API thread safe 2014-11-11 13:40:28 -05:00
Ludovic Henry fcfb6c2935 [perf-counters] Fix return of the same counter even with different a counter parameter
The same counter instance would be returned if we use the "instance" parameter instead of the "counter"
parameter. Also it is the name of the counter that is stored in mono_perfcounter_create (mono-perfcounters.c:1488).
2014-11-11 13:40:27 -05:00
Ludovic Henry dc139819ea [perf-counters] Declare shared data header type directly after creation
Fix the following bug : shared_data_find_room return twice the same memory region because it was not marked as "in use" by setting the header.ftype value.
This bug is triggered when we want to create a new shared area (for example a new FTYPE_INSTANCE area) while creating another area (for example a new FTYPE_CATEGORY).
2014-11-11 13:40:27 -05:00
Ludovic Henry 38f2bff71d [perf-counters] Fix bug on SharedCounter decoding
The structure of the encoded SharedCounter is as follow :
 - compressed data type : 1 byte
 - index in the category : 1 byte
 - name of the counter : null terminated string
 - help of the counter : null terminated string
2014-11-11 13:40:26 -05:00
Marek Safar b82016bf29 [xbuild] Change default tools profile 2014-11-11 18:49:30 +01:00
Marek Safar eed64a2729 [corlib] Fix culture info error message. Fixes #24431 2014-11-11 15:53:04 +01:00
Marek Safar 9ddd46b890 [mcs] Extended pragma warning syntax 2014-11-11 15:42:05 +01:00
Marek Safar 31b2d60549 [mcs] Use same result bucket for extension method lookup in all types of using expression 2014-11-11 11:25:28 +01:00
Zoltan Varga c09cd684b4 Add a test for #24419. 2014-11-10 20:54:12 -05:00
Zoltan Varga 5dd3347588 [jit] Remove some special casing from LDTOKEN, it doesn't seem to be needed. Fixes #24419. 2014-11-10 20:49:21 -05:00
Rodrigo Kumpera 5a2ef1b76f [runtime] Remove the second signal used by profiling and now multiplex distribution and sampling with the same signal. 2014-11-10 18:42:05 -05:00
Rodrigo Kumpera e6c3ff7551 [runtime] Introduce new MonoThread API for signal multiplexing. It's a provisional API until we figure out more of how it's suposed to work. 2014-11-10 18:41:25 -05:00
Rodrigo Kumpera 4d12ed3356 [profiler] Guard against null sbuff when serializing statistical data. 2014-11-10 18:41:20 -05:00
Rodrigo Kumpera a18dffad0d [profiler] Fix statistical backtraces to work and collect as many frames as possible.
This is a jumbo commit that addresses multiple issues with statistical backtrace collection:

1) It's not possible to reliably collect MonoMethod* so we check that they exist before
serializing to the .mlpd file and retrieve in sync context.

2) It was reporting the generic instance MonoMethod* under gsharing. Those methods are
not reported to the profiler since they are never compiled. They would turn out as unknowns.

3) Collecting IL offsets from async context is currently impossible to be done safely, so it's
now disabled. The way we'll do it in the future is by serializing the sequence point table when
JIT'ing.

4) The way we used to collect frames in statistical ignored all frames until the first LMF, which
discards a lot of them under statistical mode. We now properly pass sigcontext and have it been consumed.
In the future we should simply use the callchain mode.
2014-11-10 18:41:15 -05:00
Rodrigo Kumpera 3aa7f41bed [runtime] Changes mono_stack_walk_async_safe API to be truly async safe.
This is a very very tricky API, so we restrict the returned data to be what's really
possible under sig context.
2014-11-10 18:41:11 -05:00
Rodrigo Kumpera 412ed8153a [runtime] Harden the profiler signal handlers against not fully attached threads and HP reentrancy. 2014-11-10 18:41:05 -05:00
Zoltan Varga 25e04fa019 Revert "Disable building the NET 2.0 profile by default."
This reverts commit 458c9456f0.

This still breaks the build.
2014-11-10 17:46:34 -05:00
Zoltan Varga 458c9456f0 Disable building the NET 2.0 profile by default. 2014-11-10 15:43:53 -05:00
Zoltan Varga a8c183ac63 [jit] Get rid of the mono_arch_sigctx_to_monoctx()/monoctx_to_sigctx () functions, use mono_sigctx_to_monoctx()/monoctx_to_sigctx() instead. 2014-11-10 14:31:29 -05:00
Zoltan Varga a87062a145 [jit] Use xmm5 as an fp scratch register on winx64. 2014-11-10 14:04:23 -05:00
Jonathan Pryor 7f0da57a65 Merge pull request #1393 from akoeplinger/refresh-mdoc-expected
[mdoc] Refreshed the en.expected.importecmadoc files to fix errors after the recent XML changes

Output was generated on .NET, and thus is canonical.
2014-11-10 13:52:11 -05:00
Marek Safar 7c024c1d5a [mcs] Encode more win32 version info attributes. Fixes #23981 2014-11-10 16:09:38 +01:00
Marek Safar b7a8bfc7ad Merge pull request #1334 from ztone/delegate
Fix PrepareEmit error when evaluating delegates
2014-11-10 12:03:23 +01:00
Zoltan Varga 7e056cd346 [jit] Move the ppc sigctx<->monoctx conversion code to mono-context.c. 2014-11-10 05:22:04 -05:00
Zoltan Varga 1af68a199e Remove some dead code. 2014-11-10 05:06:51 -05:00
Zoltan Varga 0d1555dbd5 Fix the android build. 2014-11-09 21:41:43 -05:00
Miguel de Icaza fb3468e61c Merge pull request #1390 from woodsb02/FreeBSDMacNetworkInterfaces
Freebsd to use Mac NetworkInterface code instead of Linux NetworkInterface code
2014-11-09 20:17:50 -05:00
Zoltan Varga ab1c14290f Merge pull request #1392 from ludovic-henry/pr34-proflog-counters-sample-shutdown
[proflog] Add counters sampling on profiler shutdown and startup
2014-11-09 18:30:15 -05:00
Zoltan Varga 690a646c5e Merge pull request #1395 from ludovic-henry/pr38-proflog-only-counters
[proflog] Add onlycounters parameters which disable event dumping
2014-11-08 13:27:28 -05:00
Ludovic Henry bbfb0e86f3 [proflog] Add countersonly parameters which disable event dumping
This is useful in the case of the benchmarking suite because we are only interested in the counters, and they represent a minimal part of the output file size.
2014-11-08 10:40:34 -05:00
Zoltan Varga a255b522cb Fix a uninitialized variable warning. 2014-11-07 18:50:26 -05:00
Zoltan Varga 7d319221f1 Fix a problem introduced by e19f539121. 2014-11-07 16:53:22 -05:00
Zoltan Varga e19f539121 [amd64] Make xmm6:xmm15 callee saved on winx64 as required by the ABI. 2014-11-07 15:33:57 -05:00
Mark Probst 730d0ccd6f Merge pull request #1385 from BrzVlad/fin-hash
[sgen] Use hash based on current address for finalization hashes.
2014-11-07 12:14:48 -08:00
Alexander Köplinger 0442cdbc19 [System] Fixed formatting of new ClientWebSocket test and disabled it
We need to have an implementation for HttpListenerContext.AcceptWebSocketAsync () first before it works.
2014-11-07 20:16:51 +01:00
Alexander Köplinger 59d2397abc Merge branch 'patch-1' of https://github.com/ReubenBond/mono into ReubenBond-patch-1 2014-11-07 20:14:29 +01:00
Miguel de Icaza c97100c88d Merge pull request #1394 from kjpou1/master
Fix GetUsing to output the using name instead of -> using Mono.CSharp.Na...
2014-11-07 12:20:29 -05:00
Kenneth Pouncey de3ff228dc Add space 2014-11-07 16:59:42 +01:00
Kenneth Pouncey 3664e4c5a7 Add space 2014-11-07 16:57:41 +01:00
Kenneth Pouncey db2381da04 Fix GetUsing to output the using name instead of -> using Mono.CSharp.NamespaceExpression; <- for every using statement that was set
+ Fix NRE when source_file or source_file.Usings is null. This will now return back an empty string or empty List
+ **Note** that we are returning the ToString() value of NamespaceExpression which is the full resolved namespace of "System.Drawing" instead of "Drawing".
+ Add ToString override for NamespaceExpression to return the full resolved name of the namespace.
2014-11-07 16:41:05 +01:00
Atsushi Eno 367d417207 [Mono.Posix] consider nano time info in UnixFileSystemInfo.Last*Time.
Before this change, those Last*Time properties returned only based on
seconds (truncated), which could cause inaccurate time comparison.
Consider code like this:

var fileUpdated = DateTime.Now;
...
File.WriteAllText (path, "foobar");
...
if (fileUpdated > new UnixFileInfo (path).LastWriteTime)
   OnUpdatedFile (path);

This could always result in raising update event, even if there was
no update after writing.

Last*Time With milliseconds makes it very unlikely to happen.
2014-11-07 20:42:25 +08:00
Alexander Köplinger e1900d6dc2 [mdoc] Refreshed the en.expected.importecmadoc files to fix errors after the recent XML changes
The XML work in 661430fd1f and bf39f5aec0 changed the whitespace handling, so the mdoc test suite failed.
Refreshing the files makes them identical to what MS.NET produces and fixes the mdoc tests.
2014-11-07 12:34:26 +01:00
Atsushi Eno bf39f5aec0 [xml] XmlElement.InnserXml seems to preserve whitespaces.
Fix for mdoc test regression (see commit comments on #661430f).
2014-11-07 15:35:40 +08:00
Zoltan Varga edb931dfb9 [runtime] Use a separate signal with the SA_RESTART flag set for suspending/resuming threads during debugging on android, since lots of android native code cannot handle the interruptions caused by the normal abort signal. Fixes #22968/#23987. 2014-11-06 19:44:57 -05:00
Ludovic Henry e41c4efed5 [proflog] Add counters sampling on runtime initialized 2014-11-06 15:25:04 -05:00
Ludovic Henry 8a1db154e1 [proflog] Add counters sampling on profiler shutdown 2014-11-06 15:17:17 -05:00
Ben Woods ba998de3c9 Freebsd to use Mac NetworkInterface code instead of Linux NetworkInterface code 2014-11-06 17:27:36 +08:00
Mark Probst b9061f8807 [sgen] When out of memory, finish concurrent with scanning whole nursery. Fixes #23401.
If we run out of memory during the nursery collection in the finishing collection pause,
there will be late-pinned objects in the nursery: pinned objects that were not pinned
from conservative roots (or cementing).  We need to scan those, too, so in that case
we just walk the nursery and scan all objects.
2014-11-05 16:27:02 -08:00
Mark Probst 9bf45cc5ba [sgen] Make check-mark-bits also scan nursery objects. 2014-11-05 16:27:02 -08:00
Mark Probst d69d4c2472 [sgen] Optional check that the concurrent collector doesn't update references. 2014-11-05 16:27:02 -08:00
Mark Probst 9ed222bd75 [sgen] Add assertions. 2014-11-05 16:27:02 -08:00
Mark Probst 2ba7fb3a36 [sgen] Move heap checks before pinning. 2014-11-05 16:27:01 -08:00
Mark Probst b479e83275 [sgen] Stop concurrent worker during concurrent update and nursery collections.
The two collectors stepped on each other's toes.  Specifically, updating the mod union
card table while the worker thread might mark cards in the card table will not work.

The simplest solution for now is to stop the worker thread during concurrent updates
and nursery collections.  In the future we can have the thread help with the nursery
collection.
2014-11-05 16:27:01 -08:00
Mark Probst 72bd6b96fb [sgen] Remove workers_marking - workers are always marking. 2014-11-05 16:27:01 -08:00
Mark Probst 5479dd7e38 [sgen] Implement a proper state machine for workers.
What we had previously was an impromptu state machine that was
badly implemented, hard to reason about, and not easily extensible.
2014-11-05 16:27:01 -08:00
Mark Probst ef8f07687d [sgen] Fix build with heavy binary protocol. 2014-11-05 16:27:00 -08:00
Mark Probst 47287a6784 [sgen] Fix cementing with concurrent M&S.
Cementing can happen during a concurrent collection when processing
the cardtable.  We use a separate cementing hash during concurrent
collections but we didn't pin objects from there.
2014-11-05 16:27:00 -08:00
Zoltan Varga 363302f71f Install Mono.Cecil in the net 4.5 profile. 2014-11-05 17:31:48 -05:00
Zoltan Varga ed65bc251d Revert "Disable building the NET 2.0 profile by default."
This reverts commit fe265502cc.

Revert this for now as it breaks too much stuff.
2014-11-05 16:57:00 -05:00
Marcos Henrich 570cb1a10a Changed script DateTime.Now_Test.sh to use the compiled csharp.exe. 2014-11-05 16:38:39 +00:00
Marcos Henrich b324cecd4f TZ display name changes no longer reset adjustment rules.
Reset of adjustment rules is mandatory when the base offset is changed because the rules are relative to the base offset.
Adjustment rules are now kept until the base offset changes.
2014-11-05 16:30:13 +00:00
Radek Doulik d8aad87c88 [linker] blacklist System.Net.Sockets.MulticastOption fields
- merge fix for https://bugzilla.xamarin.com/show_bug.cgi?id=21578
   the MulticastOption's 'private IPAddress local' field was
   removed by linker and the app crashed later at runtime.
 - when System.Net.Sockets.MulticastOption object
   is passed to System.Net.Sockets.Socket.SetSocketOption
   and thru it to System.Net.Sockets.Socket.SetSocketOption_internal
   it accesses passed object fields
   (thru few more native calls).
2014-11-05 13:00:37 +01:00
Zoltan Varga 1ea6921beb Merge pull request #1387 from akoeplinger/improve-bug652331_2
[System.ServiceModel] Fixed Bug652331_2 test that failed on Jenkins by increasing timeout
2014-11-04 23:18:11 -05:00
Zoltan Varga 2a11a2f11b [arm] Fix OP_LOCALLOC on arm so it correctly adjusts sp with the param area size even if the size is large. Fixes #24221. 2014-11-04 22:45:23 -05:00
Rodrigo Kumpera d51f34fd21 [profiler] Expose new profiling modes and allow sampling rate to be set when using signal-based sampling. 2014-11-04 19:30:02 -05:00
Rodrigo Kumpera 9522723493 [profiler] Add new profiler API mono_profiler_set_statistical_mode that gives control to statistical mode and sampling rate. 2014-11-04 19:30:02 -05:00
Rodrigo Kumpera 53cd89d23a [profiler] Fix signal based profiling to sample all registered threads.
The current signal profiling code depended on invalid linux behavior of setitimer
allowing multiple threads to register for the same timer. Linux kernel 2.6.12 fixed
this and only the main thread gets the signal. Always.

The correct POSIX behavior happens on OSX/iOS.

On Linux we could use timer_create and SIGEV_THREAD_ID but that would not work on iOS/OSX
since it's specific to it. Given that little detail, I'll leave implementing it as an
exercise to the reader.

The solution, which aims to be as portable as possible, is to use a pair of signals and
have the first one fire the second one against all other threads.

We use a pair of signals since it's not well defined which thread will receive the signal
so detecting this from the signal is non-trivial.
2014-11-04 19:30:02 -05:00
Rodrigo Kumpera f34e6426f9 Make mono_threads_pthread_kill available to mach targets. 2014-11-04 19:30:01 -05:00
Zoltan Varga 82cfc3ea31 Make the build in docs/ uses the net 4.5 profile. 2014-11-04 18:24:27 -05:00
Zoltan Varga fe265502cc Disable building the NET 2.0 profile by default. 2014-11-04 17:49:18 -05:00
Zoltan Varga f6da6fa9ea Fix the loadable llvm build. 2014-11-04 16:44:39 -05:00
Zoltan Varga f812f43d2e [llvm] Add beginnings of support for emitting dwarf debug info for LLVM code. Not enabled yet, since it would clash with the dwarf info emitted by the AOT compiler for JITted code. 2014-11-04 16:20:05 -05:00
Alexander Köplinger d3ee9252da [System.ServiceModel] Fixed Bug652331_2 test that failed on Jenkins by increasing timeout
Looks like the test takes quite a while so 10 seconds was just too short. Increasing the timeout to 20s seems to fix it.
2014-11-04 21:17:26 +01:00
Jonathan Pryor c84d28ca73 [mscorlib] Marshal.GetExceptionForHR() takes an errorInfo parameter.
Parameter names are part of the ABI because of C#4 named parameter.
Consequently, they *must* be consistent with .NET, and .NET a
parameter name of "errorInfo", *not* "errorInfoPtr" [0]:

	public static Exception GetExceptionForHR(
		int errorCode,
		IntPtr errorInfo
	)

Change the parameter name from `errorCodeInfo` to `errorCode` so that
the parameter name is consistent with .NET.

[0]: http://msdn.microsoft.com/en-us/library/3xade62s(v=vs.100).aspx
2014-11-04 14:26:32 -05:00
Alexander Köplinger fc02486d6a Fix NET_2_0 build 2014-11-04 10:49:57 +01:00
Miguel de Icaza 9bb11ade6d Merge pull request #1363 from martinjt/AddMembershipPasswordAttribute
Added the MembershipPasswordAttribute class and associated unit tests
2014-11-04 12:51:53 -05:00
Vlad Brezae b160f1e3b7 [sgen] Use hash based on current address for finalization hashes.
Extend functionality of SgenPointerQueue.

The purpose of this commit is to avoid dependency between GC code and the obtaining of the hash from the object's synchronisation field, which might require additional processing.
2014-11-03 17:30:31 -08:00
Zoltan Varga 92c91d75f0 [jit] Factor out duplicate code from the castclass/unbox.any opcode implementation. 2014-11-03 17:53:21 -05:00
Martin Thwaites 1c6da6b912 Added the MembershipPasswordAttribute class and associated unit tests 2014-11-03 21:40:44 +00:00
Zoltan Varga 7b4bd74b4d [jit] Reenable the more efficient cast code in gshared methods. 2014-11-03 16:06:46 -05:00
Marcos Henrich e5fc5450dd Merge pull request #1185 from esdrubal/http-reuse
Allow stream reuse when InputStream has been disposed.
2014-11-03 11:41:13 +00:00
Miguel de Icaza 09308892bd Merge pull request #1347 from ermshiperete/ImproveEllipsisHandling
[MWF] Improve ellipsis handling
2014-11-02 12:36:49 -05:00
Alexander Köplinger 57feacab95 Add missing newline in .sources file, should fix build 2014-10-31 23:07:28 +01:00
Miguel de Icaza 716c7ad122 [asp.net] Implement the EventHandlerTaskAsyncHelper and HttpTaskAsyncHandler classes; Manually bring Pull Request 1365 from Kornel Pal 2014-11-01 21:23:15 -04:00
Miguel de Icaza 0afdce4e37 Merge pull request #1371 from martinjt/AddClientDisconnectedToken
Add ClientDisconnectedToken property to HttpResponseBase and Wrapper as ...
2014-11-01 20:50:48 -04:00
Miguel de Icaza 5c23f1e15d Set ReadEntityBodyMode default to Classic to force clients to use the old method
for reading the input stream.

According to the MSDN docs, if ReadEntityBodyMode returns "Classic" the code should use
the old method to read the input stream (HttpRequestBase.InputStream) which is fully
implemented in mono.

Manually applied patch from martinjt
2014-11-01 20:49:10 -04:00
Miguel de Icaza b11044a9a6 [asp.net] Implement the EventHandlerTaskAsyncHelper and HttpTaskAsyncHandler classes; Manually bring Pull Request 1365 from Kornel Pal 2014-11-01 20:48:12 -04:00
Miguel de Icaza e4d8f21cf6 Merge pull request #1163 from AerisG222/more_mvc_fixes
Add missing elements to allow MVC5.2 site to run
2014-11-01 20:36:49 -04:00
Atsushi Eno 661430fd1f [xml] XmlDocument.ReadNode() should not special case XmlTextReader.
Added test case that proves this change (by baulig).
2014-11-01 00:06:05 +08:00
Miguel de Icaza 3fd4901a23 Merge pull request #960 from ermshiperete/ShowHelp
[MWF] Partially implement Help.ShowHelp
2014-10-31 11:20:20 -04:00
João Matos 100ecb4f0f Merge pull request #1360 from madewokherd/winuncpath
File URI's without a host are not UNC paths on Windows.
2014-10-31 13:52:33 +00:00
Mark Probst 000c018169 [sgen] Add an explanatory comment about OOM. 2014-10-30 16:28:03 -07:00
Zoltan Varga f85a6bc77c [runtime] Fix the android build with ndk r10c. 2014-10-30 18:44:05 -04:00
Rodrigo Kumpera f05e658a2d Merge pull request #1381 from schani/fix-23401
Fix 23401
2014-10-30 18:43:36 -04:00
Zoltan Varga dbfee6a340 [aot] Remove some obsolete TODOs. 2014-10-30 17:56:19 -04:00
Zoltan Varga bf6fea51af [aot] Use the info->tramp_page_code_offsets array on arm as well. 2014-10-30 17:52:33 -04:00
Zoltan Varga 74d2172cd1 Fix a warning. 2014-10-30 17:28:31 -04:00
Zoltan Varga b40386d4f4 Add the -Qunused-arguments warning to CPPFLAGS too. 2014-10-30 17:28:22 -04:00
Zoltan Varga 7c162f952c [llvm] Remove the unused LLVM_MAJOR_VERSION/LLVM_MINOR_VERSION defines. 2014-10-30 17:23:18 -04:00
Alexander Köplinger 3c533de4a8 Add files that were forgotten in 6af7989628, which is the re-apply of 950d9c8a56 2014-10-30 22:16:35 +01:00
Mark Probst 5eec4d0c84 [sgen] Don't store pin queue addresses, only indexes. Fixes #24084.
The pin queue can get relocated as a side-effect of resizing when late
pinning happens, so we can't count on pointers into it to remain valid.
2014-10-30 13:34:44 -07:00
Mark Probst 45fc2e14fd [sgen] Fix crash in late pinning.
Our code assumed that late-pinned objects don't have a tag, but they
obviously have the pin tag, so use the safe function.
2014-10-30 13:30:26 -07:00
Mark Probst 03494c7387 [sgen] Don't loop endlessly when out of memory. 2014-10-30 13:30:26 -07:00
Ryan J. Melena ef13507552 Revert incorrect changes from commit 950d9c8a56
Correctly handle null value deserialization in non-generic Deserialize(string, Type) method.
2014-10-30 16:19:40 -04:00
Miguel de Icaza 6af7989628 Re-apply the patch, there isa fix for it 2014-10-30 16:19:07 -04:00
Zoltan Varga f269254917 [Mono.Data.Tds] Allow sending of text data longer than 4000 characters by using a different column type. Fixes #21172. 2014-10-30 14:39:44 -04:00
Miguel de Icaza 112079b844 Revert this patch, as it broke the test suite 2014-10-30 13:54:33 -04:00
Jonathan Pryor ac1dcc6ade [System.Core/Android] Update TimeZone database self test.
Add Makefile rules to automagically download the TimeZone database
from the Android target $(ADB_TARGET), and build the tzi.exe app.

	$ make android-dump-tzdata ADB_TARGET=-d
	# downloads timezone data into ./android/tzdb.
	# dumps timezone data into ./android/tzdata
	# builds ./tzi.exe

	# Show adjustment rules for a given timezone dump
	$ mono tzi.exe -i=tzdata/Asia/Amman

Add `tzi.exe -R` option to show the TimeZoneInfo.GetAdjustmentRules()
output for all encountered timezones.

Add `tzi.exe -o=PATH` option to dump the TimeZone data to disk for
interrogation.

Add `tzi.exe -i=PATH` option to read in the specified TimeZone data
file and dump the rules contained therein.

Update usage comments.
2014-10-30 12:42:37 -04:00
Zoltan Varga dacc3f8c5d Merge pull request #944 from ermshiperete/bug-novell-496138
Improve COM error handling
2014-10-29 19:06:05 -04:00
Zoltan Varga 6a738caa5a [corlib] Add some missing memory barriers to the ConcurrentQueue methods to order memory operations. Fixes #22788. 2014-10-29 17:14:10 -04:00
Zoltan Varga bd715a7c5e Merge pull request #1378 from DynamicDevices/ajl/warnings
[libgc] Eliminate warning about redefinition of GC_WIN32_THREADS
2014-10-29 15:03:31 -04:00
Miguel de Icaza c265540e76 Merge pull request #1337 from RyanMelenaNoesis/master
Additional JWT Security Token Support
2014-10-29 15:02:30 -04:00
Alexis Christoforides d585381555 Bump Mono version -> 3.12.1 2014-10-29 13:16:04 -04:00
Zoltan Varga dcdc8414df [llvm] Disable the extension of i8/i16 arguments to i32 on arm64, since the ios calling convention passes them differently than i32. Fixes #22800. 2014-10-29 12:55:31 -04:00
Alex J Lennon 41981cdca1 [libgc] Eliminate warning about redefinition of GC_WIN32_THREADS
Makefile defines GC_WIN32_THREADS as 1 but gc_config_macros was
redefining as defined but with no value.

Signed-off-by: Alex J Lennon <[email protected]>
2014-10-29 14:27:01 +01:00
Zoltan Varga 2e8f21d4f2 [llvm] Fix a regression caused by 6ec1ebf990. Do the direct call rewrite only if the caller and callee signature matches. 2014-10-28 23:30:44 -04:00
Zoltan Varga 7e8a11f888 [runtime] Disable the check for overlapping reference and non-reference fields, too much code depends on this to work. 2014-10-28 17:08:09 -04:00
Neale Ferguson 872e97cb30 Add OP_LREM_IMM support;Add implementation of mono_arch_get_delegate_virtual_invoke_impl 2014-10-28 14:48:45 -04:00
Marcos Henrich 36c9c006bc Merge pull request #1298 from esdrubal/uploadfileasync
Fixes missing ContentType on WebClient.UploadFileTaskAsync
2014-10-28 18:21:22 +00:00
Marcos Henrich 137718d9b4 Merge pull request #1321 from esdrubal/currentsystemtimezone
CurrentSystemTimeZone.GetUtcOffset now supports multiple DST periods.
2014-10-28 18:18:54 +00:00
Zoltan Varga 424d1cdc8b Merge pull request #1376 from StephenMcConnel/bug-24109
Zero out pointers to freed memory in AudioDevice
2014-10-28 13:40:28 -04:00
Stephen McConnel 328defdcde Zero out pointers to freed memory in AudioDevice
This fixes https://bugzilla.xamarin.com/show_bug.cgi?id=24109.
2014-10-28 12:10:43 -05:00
Alexis Christoforides e0dab7749a Merge pull request #1373 from michaldobrodenka/master
Fix for random ObjectDiposedException in DispatcherCB class when connecting
2014-10-28 12:48:14 -04:00
João Matos e4b431e3a5 Merge pull request #1369 from DynamicDevices/ajl/appveyor
[CI] Add appveyor.yml configuration file to support Windows build
2014-10-28 16:47:19 +00:00
Zoltan Varga 039ffcafca Merge pull request #1374 from directhex/master
Add missing header file to s390x_sources
2014-10-28 01:08:37 -04:00
Alexis Christoforides 717c6de1cc [System.IO] Phase 2 of revamping KeventWatcher (FileSystemWatcher implementation for OS X/kqueue). Dozens of bugs and reliability issues fixed.
FileSystemWatcher.cs: Fixed multicast events.
SearchPattern.cs :  Fixed issue where case insensitivity was not being honored.
KeventWatcher.cs:
* Fixed several race conditions
* Fixed file descriptor duplication & leaks
* thread-safe/cleaner state transitions for watcher, and much cleaner stopping
* Now uses fsw.Filter parameter and respects IncludeSubdirectories = false. Use fsw.Filter to watch very large trees
* Added more error handling + OnError event
* Lots of behavior/reliability fixes and optimizations for Monitor() loop
* Fixed kevent/timespec struct definitions (for 64-bit build)
2014-10-27 21:20:16 -04:00
Cody Russell 13fd028ee8 [System.IO] Reimplemented much of the kqueue-based file watcher so that watching subdirectories works.
Reworked a lot of the internals of the kqueue FileSystemWatcher. There
is now a separate thread and a separate kqueue for each FileSystemWatcher
object.

https://bugzilla.xamarin.com/show_bug.cgi?id=16259
2014-10-27 21:20:16 -04:00
Zoltan Varga 80ca0394cd [jit] Fix the decomposition of OP_IREM_IMM on arm64. 2014-10-27 20:55:51 -04:00
Jo Shields 8b80178115 Add missing header file to s390x_sources, otherwise a required header file for s390x builds is missing from tarball builds. 2014-10-27 22:51:47 +00:00
Ludovic Henry 447975c12c [threadpool] Fix race condition on threads variable cleanup 2014-10-27 12:28:19 -04:00
michaldobrodenka 7174b069cf Fix for ObjectDiposedException in DispatcherCB class
https://bugzilla.xamarin.com/show_bug.cgi?id=23700
2014-10-27 13:28:59 +01:00
Martin Thwaites b7b94a8024 Add ClientDisconnectedToken property to HttpResponseBase and Wrapper as default None 2014-10-26 23:42:54 +00:00
Miguel de Icaza 45d831259b Merge pull request #1368 from martinjt/SuppressFormsAuthRedirect
Implement the SuppressFormsAuthenticationRedirect properties
2014-10-26 18:53:05 -04:00
Zoltan Varga c170351fde Merge pull request #1366 from DynamicDevices/ajl/win32build
Fix Windows build by including wstcpip.h before winsock.h is included
2014-10-26 11:17:39 -04:00
Mike Morano d35449e99b Add/update missing bits in order to support MVC5.2. 2014-10-26 11:14:08 -04:00
Martin Thwaites e55e70f8c7 Implement the SuppressFormsAuthenticationRedirect properties 2014-10-26 14:55:41 +00:00
Zoltan Varga 5a234d5d16 Merge pull request #1367 from kornelpal/dolt-mingw32
[build] Enable dolt on mingw32
2014-10-26 10:07:51 -04:00
Kornel Pal 0635a83c89 [build] Enable dolt on mingw32 2014-10-26 14:49:45 +01:00
Alex J Lennon ff1817f017 [CI] Add appveyor.yml configuration file to support Windows build
Adds a configuration file to facilitate build of Mono with Cygwin
on Appveyor Windows-based build workers.

Dependencies are installed on a clean Appveyor build image for
each build and the result of the 'make install' step is stored
as a build output 'artifact' for further testing or deployment.

Signed-off-by: Alex J Lennon <[email protected]>
2014-10-26 14:06:08 +01:00
Alex J Lennon d663c9f65c Fix Windows build by including wstcpip.h before winsock.h is included
Error generated by socket-io.c was:

/usr/i686-pc-mingw32/sys-root/mingw/include/ws2tcpip.h:38:2:
error: #error "ws2tcpip.h is not compatible with winsock.h.
Include winsock2.h instead."

Signed-off-by: Alex J Lennon <[email protected]>
2014-10-26 12:49:59 +01:00
Stone Gislason f1108aabba [eval] Fix delegate; add caching for PrepareEmit
The delegate class did not use the internal cache flag as other type definitions which caused the next evaluation to fail.
2014-10-26 01:15:37 +01:00
Zoltan Varga 8f9a74f2f6 Merge pull request #1364 from muojp/addDotNet45_SocketCtor
[System] Added missing ctor to Socket for initializing dual-mode socket
2014-10-25 17:24:53 -04:00
Kei Nakazawa dc30595ace [System] Added missing ctor to Socket for initializing dual-mode socket
- Ref: https://bugzilla.xamarin.com/show_bug.cgi?id=20048
 - Mono currently doesn't support 2-args Socket ctor added in .NET 4.5
 - Absence of this ctor prevents KestrelHttpServer (web server for
   ASP.NET vNext: https://github.com/aspnet/KestrelHttpServer ) test
   code from working
 - I hesitated to put IPv4 only implementation, but full dual stack
   (IPv4/v6) support would need bunch of works to be done. So, I pinned
   supported protocol of new ctor to IPv4. Also, I filed v4/v6 support
   issue as a MonoTODO entry inside the source code.
2014-10-26 02:57:22 +09:00
Eberhard Beilharz 5d869be794 [MWF] Improve ellipsis handling
- Don't subtract room for ellipsis. Ellipsis should be
  handled by the renderer so we shouldn't reserve space for it.
  Otherwise we end up not getting ellipsis (because the renderer
  thinks there is enough space available), or we don't use up the
  available space.
- Don't allow text to go below button if we want to show ellipsis.
2014-10-24 22:38:56 +02:00
Eberhard Beilharz ab361102db [MWF] Display visual feedback on pressed button (#23869)
When a button is pressed the image and the text needs to be rendered one
pixel to the right and to the bottom so that there is some visual
feedback of the button press. Previously this was only the case if
TextImageRelation was set to Overlay.
2014-10-24 22:26:59 +02:00
Jonathan Pryor f7fd52ad18 [mscorlib/Android] TimeZoneInfo.Local.Id should be "Local".
On Mono/.NET, TimeZoneInfo.Local has a TimeZoneInfo.Id value of
"Local" and a TimeZoneInfo.DisplayName value of "Local":

	$ csharp
	csharp> TimeZoneInfo.Local.Id;
	"Local"
	csharp> TimeZoneInfo.Local.DisplayName;
	"Local"

That isn't the case on Xamarin.Android, which returns the timezoneinfo
ID value from both DisplayName and Id, e.g. TimeZoneInfo.Local could
have Id and DisplayName values of "Australia/Sydney".

Rework things so that the TimeZoneInfo.Id and TimeZoneInfo.DisplayName
properties return "Local" on Xamarin.Android for the instance returned
from TimeZoneInfo.Local, just like normal Mono/.NET does.
2014-10-24 15:56:13 -04:00
Miguel de Icaza 84472a332e Merge pull request #1348 from ermshiperete/ImproveButtonTextLayout
[MWF] Improve button text layout
2014-10-24 14:44:29 -04:00
Miguel de Icaza c19e821763 Merge pull request #1357 from emergent-design/master
Include /dev/ttyACM in the search for serial port devices
2014-10-24 14:43:49 -04:00
Miguel de Icaza e867622025 Merge pull request #1362 from echampet/dupfix
Webapp stuck with "Key duplication when adding: httpModules"
2014-10-24 14:43:00 -04:00
Etienne CHAMPETIER c46234bf0c HttpApplication: if there is an exception in InitOnce, output it on the Console
Signed-off-by: Etienne CHAMPETIER <[email protected]>
2014-10-24 16:17:10 +02:00
Etienne CHAMPETIER 9b7b75d7ec WebConfigurationManager: simplify call to ConfigurationSection.GetRuntimeObject ()
this call come from an obfuscation contest :) ?

Signed-off-by: Etienne CHAMPETIER <[email protected]>
2014-10-24 16:17:01 +02:00
Etienne CHAMPETIER 3fd3541704 WebConfigurationManager: protect GetSection
all public static should be thread-safe

Signed-off-by: Etienne CHAMPETIER <[email protected]>
2014-10-24 16:16:55 +02:00
Etienne CHAMPETIER 8630afbd9b HttpApplication: set StatusCode = 500 when we send an exception to the client
Signed-off-by: Etienne CHAMPETIER <[email protected]>
2014-10-24 16:16:47 +02:00
Jo Shields 8da186ea62 Merge pull request #1361 from akoeplinger/fix-forms
[MWF] Use overload of Marshal.PtrToStringUni that reads up until the first null instead of explicitly specifying length
2014-10-24 13:23:15 +01:00
Atsushi Eno 976be34045 [xml] XmlTextReader: Value was wrong after ReadAttributeValue() on xml declaration. 2014-10-24 12:20:09 +08:00
Zoltan Varga e6b335e7f7 [runtime] Remove build system support for the interpreter. 2014-10-23 23:01:28 -04:00
Atsushi Eno 3d9a2b7175 [relaxng] fix default namespace handling in compact syntax.
Also had to disable RNC tests that depended on vanished web resource...
2014-10-24 07:14:58 +08:00
Alexander Köplinger ede4f3a8c6 [MWF] Use overload of Marshal.PtrToStringUni that reads up until the first null instead of explicitly specifying length
This fixes the two tests broken by 0ac61b03fc
2014-10-24 00:11:03 +02:00
Vincent Povirk dd68e53636 File URI's without a host are not UNC paths on Windows.
NUnit breaks when these URI's are treated as UNC paths, so I have no way of
running the tests on Windows without this change to see if it broke anything.
Not all URI tests pass, but the ones that fail seem unrelated to my change.

On Unix, the tests all work, but of course on Unix this is a no-op.

This commit licensed as MIT/X11.
2014-10-23 16:12:30 -05:00
Zoltan Varga e1da8e304d [jit] Use NULLIFY_INS () to nullify instructions and use MONO_INST_NEW to create phi node instructions to avoid asserts in the spill pass. Fixes #24006. 2014-10-23 14:47:19 -04:00
Zoltan Varga 2d3dd5a40a [runtime] Fix a regression introduced by 8d9f05ea9a. Only do the check for overlapping fields when the size of the type is known. 2014-10-23 14:04:32 -04:00
Zoltan Varga 87f4b14752 [jit] Print out methods which failed to JIT when using --regression. 2014-10-23 13:56:38 -04:00
Ludovic Henry 916abe5f57 [bcl] Restore ThreadPool number of threads configuration after each test 2014-10-23 11:00:47 -04:00
Zoltan Varga 8d9f05ea9a [runtime] Add checks for overlapping reference and non-reference fields when using explicit layout. Fixes #23954. 2014-10-22 18:20:41 -04:00
Zoltan Varga de8ca8fdf6 Merge pull request #1358 from madewokherd/win32build
Fix win32 build.
2014-10-22 17:47:48 -04:00
Zoltan Varga 6ec1ebf990 [llvm] Rewrite the way direct calls are made between llvm methods. Previously all calls were made to plt entries and the plt entry symbols were aliased to point to the corresponding method if the method was directly callable using the .set assembler directive. This doesn't seem to work with newer LLVM/CLANG versions, so do this completely on the LLVM side using Value::replaceAllUsesWith (). Fixes #23976. 2014-10-22 17:14:00 -04:00
Ludovic Henry a142d922aa [threadpool] Fix deadlock/starvation of the thread pool
The issue was with the new heuristic of the thread pool which would not create new threads, leading to deadlock between dependent tasks.
The fix is to check if every worker threads are sleeping, waiting or joining, and if that's the case, then we create a new thread because we might be in the case where the tasks being currently run depends on one still being enqueued in the cq or one of the wsq.

The following tests would previously fail :

1) MonoTests.System.Threading.Tasks.TaskTests.DoubleWaitTest :   #1
  Expected: True
  But was:  False

at MonoTests.System.Threading.Tasks.TaskTests.<DoubleWaitTest>m__27 () [0x00077] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs:800
at MonoTests.System.Threading.Tasks.ParallelTestHelper.Repeat (System.Action action, Int32 numRun) [0x00007] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/Test/System.Threading.Tasks/ParallelTestHelper.cs:48
at MonoTests.System.Threading.Tasks.TaskTests.DoubleWaitTest () [0x00000] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs:790
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00054] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:230

2) MonoTests.System.Threading.Tasks.TaskTests.HideSchedulerTest :   #1
  Expected: True
  But was:  False

at MonoTests.System.Threading.Tasks.TaskTests.HideSchedulerTest () [0x0003d] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs:1914
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00054] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:230

3) MonoTests.System.Threading.Tasks.TaskTests.WaitAll_TimeoutWithExceptionsAfter :   #1
  Expected: True
  But was:  False

at MonoTests.System.Threading.Tasks.TaskTests.WaitAll_TimeoutWithExceptionsAfter () [0x00070] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs:317
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00054] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:230

4) MonoTests.System.Threading.Tasks.TaskTests.WaitAll_TimeoutWithExceptionsBefore :   #1
  Expected: True
  But was:  False

at MonoTests.System.Threading.Tasks.TaskTests.WaitAll_TimeoutWithExceptionsBefore () [0x00070] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs:341
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00054] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:230

5) MonoTests.System.Threading.Tasks.TaskTests.WaitAnyTest :   #3
  Expected: not -1
  But was:  -1

at MonoTests.System.Threading.Tasks.TaskTests.<WaitAnyTest>m__0 () [0x00026] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs:142
at MonoTests.System.Threading.Tasks.ParallelTestHelper.Repeat (System.Action action, Int32 numRun) [0x00007] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/Test/System.Threading.Tasks/ParallelTestHelper.cs:48
at MonoTests.System.Threading.Tasks.ParallelTestHelper.Repeat (System.Action action) [0x00000] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/Test/System.Threading.Tasks/ParallelTestHelper.cs:42
at MonoTests.System.Threading.Tasks.TaskTests.WaitAnyTest () [0x00000] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs:128
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00054] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:230

6) MonoTests.System.Threading.Tasks.TaskTests.WaitChildTestCase :   #0b
  Expected: True
  But was:  False

at MonoTests.System.Threading.Tasks.TaskTests.<WaitChildTestCase>m__25 () [0x0006d] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs:705
at MonoTests.System.Threading.Tasks.ParallelTestHelper.Repeat (System.Action action, Int32 numRun) [0x00007] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/Test/System.Threading.Tasks/ParallelTestHelper.cs:48
at MonoTests.System.Threading.Tasks.TaskTests.WaitChildTestCase () [0x00000] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs:684
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00054] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:230

7) MonoTests.System.Threading.Tasks.TaskTests.WaitingForChildrenToComplete :   #3
  Expected: True
  But was:  False

at MonoTests.System.Threading.Tasks.TaskTests.WaitingForChildrenToComplete () [0x00048] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs:734
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00054] in /Users/ludovic/Xamarin/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:230
2014-10-22 17:09:11 -04:00
Vincent Povirk 21656fd89f Fix win32 build.
This commit licensed as MIT/X11.
2014-10-22 15:19:39 -05:00
Zoltan Varga bb86670c28 [bcl] Fix races in task tests. 2014-10-22 14:22:17 -04:00
Dan Parnham 87e7f1c2d7 Included /dev/ttyACM in the search for serial port devices, since CDC ACM is a standard
protocol for emulating serial ports over USB.
2014-10-22 16:21:20 +01:00
Ludovic Henry e15463e38a [sgen] Add GC max collection time counter 2014-10-21 15:28:59 -07:00
Ludovic Henry c4f72def57 [sgen] Add memory governor allocated size counter 2014-10-21 15:28:59 -07:00
Ludovic Henry 2a14bc4dad [sgen] Fix assertion error on 32bits 2014-10-21 10:03:31 -04:00
Jo Shields 63eb94b524 Merge pull request #1356 from martinjt/ReadEntityV2
Removed erroneously added property to HttpRequestBase in pull #1353
2014-10-21 14:17:36 +01:00
Zoltan Varga 066bdb9c24 [jit] Add some micro-optimizations to speed up the AOT compiler. 2014-10-20 22:51:49 -04:00
Zoltan Varga a26b297e11 Fix a warning. 2014-10-20 20:49:01 -04:00
Ludovic Henry 18cd82b380 [sgen] Adjust internal allocator block size to slot size.
The internal allocator used size segregated blocks which were always
16k large.  Since we have quite a few different size classes this led
to a lot of allocation even for very small programs.

We now use block sizes that are determined by the slot size and are as
small as possible.  They're power-of-two multiples of the page size,
so we end up with blocks of 4k, 8k and 16k.
2014-10-20 16:24:06 -07:00
Ludovic Henry 1daac38948 [sgen] Add assertion on power of 2 for internal allocator section size 2014-10-20 16:24:05 -07:00
Ludovic Henry 4619f9f070 [sgen] Add internal allocator default sizes usage statistic 2014-10-20 16:24:05 -07:00
Ludovic Henry d3788f892f [sgen] Utility function to compute number of unfaulted pages. 2014-10-20 16:24:05 -07:00
Ludovic Henry 26364535a0 [sgen] Cleanup some allocation code 2014-10-20 16:24:05 -07:00
Zoltan Varga 639413ef89 Fix the build after the signals changes. 2014-10-20 19:19:27 -04:00
Zoltan Varga 6716d439e9 [jit] Remove some unused definitions. 2014-10-20 18:22:40 -04:00
Zoltan Varga c3bd8334a3 Fix a typo. 2014-10-20 18:08:19 -04:00
Zoltan Varga 8410c9bb00 [runtime] Clean up the signal handling code by moving the signal handler signature definitions to mono-signal-handler.h and using them everywhere. 2014-10-20 18:07:24 -04:00
Ryan Melena 950d9c8a56 Additional JWT Security Token Support
Fix line endings.  Add test for JavaScriptSerializer.Deserialize(string input, Type targetType).
2014-10-20 16:00:16 -05:00
Mark Probst 5ae9f7d93f [sgen] Fix allowance calculation.
The formula for calculating allowance was not only overly complicated
but completely broken, which resulted in the allowance always being the
minimum (4 times the nursery size).  That resulted in too frequent garbage
collections when the heap grew larger.

Now we do something very similar to what Boehm does: Allow the heap
to grow by a third before the next major collection happens.
2014-10-20 13:40:50 -07:00
Martin Thwaites ce348f12da Removed erroneously added property to HttpRequestBase in pull #1353 2014-10-20 21:34:27 +01:00
Miguel de Icaza 643ad918e0 Merge pull request #1354 from martinjt/RequestAbort
Implement Request.Abort()
2014-10-20 10:04:35 -04:00
Miguel de Icaza e9ef2be437 Merge pull request #1353 from martinjt/ReadEntityBodyMode
Implement the ReadEntityBodyMode properties
2014-10-20 10:04:00 -04:00
Martin Thwaites 7eeb7f14f3 Implement Request.Abort() 2014-10-18 22:31:14 +01:00
Martin Thwaites 0db6c1418f Implement the ReadEntityBodyMode properties 2014-10-18 21:55:47 +01:00
Rodrigo Kumpera 6edd8bf89e [runtime] Don't define ucontext_t for android if PLATFORM is not android. 2014-10-17 15:37:14 -04:00
Zoltan Varga b67c4fe1c5 Fix a warning. 2014-10-17 12:14:26 -04:00
Zoltan Varga 36bfeec103 Fix a warning. 2014-10-16 18:35:55 -04:00
Zoltan Varga 77f9b3dc10 Fix a warning. 2014-10-16 17:11:19 -04:00
Zoltan Varga ddb83ce172 [bcl] Add an AppDomain.DoUnhandledException () internal method which can be used to invoke the UnhandledException event handlers. 2014-10-16 16:03:49 -04:00
Zoltan Varga 6f53824f35 [io-layer] Make _wapi_shm_enabled () inline so more code can be optimized away if shared handles are disabled. 2014-10-16 13:53:56 -04:00
Zoltan Varga 97866fc145 [io-layer] Remove more dead process code, add comments. 2014-10-16 12:59:11 -04:00
Paolo Molaro c5d4e39545 [jit] Fix -O=precomp option to skip generic methods and not crash. 2014-10-16 10:40:45 -04:00
Eberhard Beilharz 1189d3706a [MWF] Use full available height for text
This is especially relevant if we have to shrink the width because of
padding. In this case it is possible that MeasureString calculated that
the string would fit in one line, but because of padding we reduce the
width. If the button is large enough we want to display additional lines
even if MeasureString told us we only need one line.
2014-10-16 14:09:24 +02:00
Eberhard Beilharz 885b065e06 [MWF] Use full width for measuring text
Previously we applied the padding twice.
2014-10-16 14:08:53 +02:00
Zoltan Varga 45deb48384 [io-layer] Allocate the process name dynamically to make WapiHandle_process smaller. 2014-10-15 18:56:01 -04:00
Zoltan Varga b0077e8c2a [io-layer] Remove WapiHandle_process.self field, its no longer needed. 2014-10-15 18:50:09 -04:00
Zoltan Varga 1784575ef2 Include ucontext.h on android if it exists. 2014-10-15 17:22:08 -04:00
Zoltan Varga 5a4cd56c04 [runtime] Add a 'shared_handles' --enable-minimal option, same as --disable-shared-handles. 2014-10-15 17:18:21 -04:00
Zoltan Varga 04967b8dba Fix a warning. 2014-10-15 17:17:41 -04:00
Zoltan Varga ba6a479e5d [io-layer] Remove another usage of getdtablesize (). 2014-10-15 16:52:56 -04:00
Zoltan Varga 179fbf4b23 [runtime] Use getrlimit () to obtain the size of the fd table instead of getdtablesize () which is getting deprecated in Android. 2014-10-15 16:45:19 -04:00
Zoltan Varga 8e6ae13499 [io-layer] More coding convention/formatting fixes. 2014-10-15 16:28:47 -04:00
Zoltan Varga b58da19a66 [corlib] Implement MonoGenericClass:GetCustomAttributes () for created types. Fixes #23769. 2014-10-15 15:21:53 -04:00
Zoltan Varga 2ec479b762 [io-layer] Fix the linux build. 2014-10-15 15:08:54 -04:00
Zoltan Varga bf87077ac9 [io-layer] Make process handles non-shared. Fixes #23423. 2014-10-15 15:01:31 -04:00
João Matos e78e74cc1c Fixed linking on MinGW. 2014-10-15 14:37:25 -04:00
Zoltan Varga 727f8fe28d [jit] Fix the return of vtypes containing a single fp member from pinvoke methods on osx/x86. Fixes #23813. 2014-10-15 12:54:16 -04:00
Rodrigo Kumpera a9f31e63db [build] Rework the buildver dep check. 2014-10-14 18:12:08 -04:00
Zoltan Varga 30ed59ce3e Revert "Fixed buildver generated headers automake dependency tracking."
This reverts commit 8f41328a78.

Revert this for now as it breaks the parallel build.
2014-10-14 15:59:24 -04:00
Zoltan Varga 60d10d5464 Merge pull request #1341 from smortex/patch-2
Fix build on FreeBSD
2014-10-14 14:12:19 -04:00
Romain Tartière 54f5b48d44 Protect #include <unistd.h>
Protect inclusion as reported by @vargaz
2014-10-14 20:03:29 +02:00
Zoltan Varga 88ed113252 Merge pull request #1340 from smortex/patch-1
Add missing header
2014-10-14 13:49:53 -04:00
Romain Tartière 855bb5648b Fix build on FreeBSD
pid_t (used at line 216) is available on Linux in `unistd.h` and so on on FreeBSD (`sys/types.h` to be precise, included in `unistd.h`), yet on FreeBSD this header is not automatically included.
2014-10-14 19:48:31 +02:00
Romain Tartière 55fc7c277f Add missing header 2014-10-14 19:42:44 +02:00
Zoltan Varga 123d9a05db Merge pull request #1339 from tritao/master
Fixed buildver generated headers automake dependency tracking.
2014-10-14 12:54:48 -04:00
João Matos 8f41328a78 Fixed buildver generated headers automake dependency tracking.
We now include buildver-sgen/boehm.h in BUILT_SOURCES to have proper dependency tracking for these generated files.

Fixes the MinGW OSX cross build.
2014-10-14 11:46:36 -04:00
Zoltan Varga 4cba98f8c0 [runtime] Fix an SRE assert. Fixes #19039. 2014-10-13 18:39:56 -04:00
Zoltan Varga 3b484c1fcb Merge pull request #1335 from nlhepler/master
Fix relocatable mono
2014-10-13 13:56:29 -04:00
Lance Hepler e3abaa85d8 Fix relocatable mono 2014-10-13 09:32:30 -07:00
Marek Safar 10b5567b3d [mcs] A pointer-type may be used as the type of a volatile field. Fixes #23770 2014-10-13 12:28:08 +02:00
Zoltan Varga 6e4ab1d3eb [runtime] Remove some dead code from the io-layer process code, avoid mixing ifdefs with control flow. 2014-10-12 18:03:02 -04:00
Marek Habersack abb760f376 Merge pull request #1333 from joero74/ignore-missing-host
Prevent NullReferenceException in case of missing Host
2014-10-10 18:36:50 +02:00
Joerg Rosenkranz f927c83afe Prevent NullReferenceException in case of missing Host
Do not throw a NullReferenceException when Host variable is not set.
Ignore the calls to RegisterObject and UnregisterObject instead.
2014-10-10 16:23:22 +02:00
Zoltan Varga 5f2f74f5de [runtime] Rewrite io-layer process code to reduce duplication and make it conform to the mono coding conventions. 2014-10-09 21:46:01 -04:00
Zoltan Varga 02be6a4f28 [runtime] Use explicit initialization in the io-layer process code instead of pthread_once (). Get rid of the WAPI_PROCESS_HANDLE_OFFSET code which was only used in shared mode. 2014-10-09 16:49:13 -04:00
Zoltan Varga e1af46ef45 [runtime] More win32 build fixes. 2014-10-09 16:21:56 -04:00
Zoltan Varga a487812e61 runtime] Really use WinXP SP2 as the minimum version on the msvc builds too. Update project files with newly
added/removed sources.
2014-10-09 15:51:49 -04:00
Zoltan Varga eea8080dad [runtime] Use WinXP SP2 as the minimum version on the msvc builds too. 2014-10-09 15:20:06 -04:00
Mark Probst a68a793383 Merge pull request #1326 from BrzVlad/master
[sgen] Fix pointer access.
2014-10-09 11:43:03 -07:00
Zoltan Varga 92d86659ca [runtime] Remove pre WinXP SP2 windows support code. 2014-10-09 14:04:31 -04:00
Zoltan Varga 4109ab0ee4 [runtime] Use the functionality in mono-proclib.c to get the current pid, remove duplicate code from the io-layer. 2014-10-09 14:04:31 -04:00
Zoltan Varga 43fd14b9d8 [runtime] Use the functionality in mono-proclib.c to enumerate processes, remove duplicate code from the io-layer. 2014-10-09 14:04:31 -04:00
Alexis Christoforides e92af12248 Fix oops in DataContractJsonSerializer fix 2014-10-08 22:04:34 -07:00
Zoltan Varga 17edd267ab [bcl] Use List instead of ArrayList () in a few places. 2014-10-08 16:12:01 -04:00
Zoltan Varga c33600f57d [bcl] Free strings allocated using Marshal.SecureStringToBSTR () using Marshal.ZeroFreeBSTR (). 2014-10-08 15:12:35 -04:00
Marek Safar 114a27e57c Merge pull request #1330 from esdrubal/blockingcollection
Improved BlockingCollection.AddAny.
2014-10-08 15:02:54 -04:00
Ludovic Henry 98ce3f76b2 [threaddpool] Fix deadlock in thread pool with monitor thread (2nd attempt)
Because the monitor thread was not marked as background thread, remove_and_abort_threads (threads.c:2807) would mark it as needed to be waited to shutdown the runtime, and wait_for_tids (threads.c:2652) would then wait indefinitely for it to finish. The issue was that the monitor was waiting on the semaphore monitor_sem, and thus would never exit.

Thread 7 (Thread 0x1c13 of process 99776):
#0  0x00007fff86590a56 in ?? () from /usr/lib/system/libsystem_kernel.dylib
#1  0x00000001003cc03a in mono_sem_wait (sem=0x1004f7f50, alertable=0) at mono-semaphore.c:103
#2  0x00000001002cef41 in monitor_thread (unused=0x0) at threadpool.c:898
#3  0x00000001002cb78f in start_wrapper_internal (data=0x10500abf0) at threads.c:657
#4  0x00000001002cb4a1 in start_wrapper (data=0x10500abf0) at threads.c:704
#5  0x00000001003d61d4 in inner_start_thread (arg=0x7fff5fbfe500) at mono-threads-posix.c:84
#6  0x00007fff8e7c9899 in _pthread_body () from /usr/lib/system/libsystem_pthread.dylib
#7  0x00007fff8e7c972a in _pthread_start () from /usr/lib/system/libsystem_pthread.dylib
#8  0x00007fff8e7cdfc9 in thread_start () from /usr/lib/system/libsystem_pthread.dylib
#9  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x1503 of process 99776):
#0  0x00007fff86594716 in ?? () from /usr/lib/system/libsystem_kernel.dylib
#1  0x00007fff8e7cbc3b in _pthread_cond_wait () from /usr/lib/system/libsystem_pthread.dylib
#2  0x000000010039cfaa in _wapi_handle_timedwait_signal_handle (handle=0xa55, timeout=0x0, alertable=1, poll=0) at handles.c:1595
#3  0x000000010039d03d in _wapi_handle_wait_signal_handle (handle=0xa55, alertable=1) at handles.c:1540
#4  0x00000001003b7ba3 in WaitForSingleObjectEx (handle=0xa55, timeout=4294967295, alertable=1) at wait.c:194
#5  0x00000001003b865d in WaitForMultipleObjectsEx (numobjects=1, handles=0x7fff5fbff1f8, waitall=1, timeout=4294967295, alertable=1) at wait.c:516
#6  0x00000001002c75df in wait_for_tids (wait=0x7fff5fbff1f8, timeout=4294967295) at threads.c:2658
#7  0x00000001002c70e5 in mono_thread_manage () at threads.c:2951
#8  0x00000001000d551b in mono_main (argc=6, argv=0x7fff5fbff9e8) at driver.c:2021
#9  0x0000000100001bd1 in mono_main_with_options (argc=6, argv=0x7fff5fbff9e8) at ./main.c:91
#10 0x00000001000017d3 in main (argc=6, argv=0x7fff5fbff9e8) at ./main.c:122

Thanks @akoeplinger for the help debugging
2014-10-08 14:39:18 -04:00
Marcos Henrich 54844b08ef Refactored AddToAny and TakeFromAny to reuse code. 2014-10-08 12:59:42 +01:00
Marcos Henrich 7724a608a5 Improved BlockingCollection.AddAny. Fixes #22775.
AddAny no longer consumes OperationCanceledException.
AddAny no longer blocks while adding an item to the first collection when its full.
2014-10-08 12:16:36 +01:00
Marcos Henrich 0e13745ec2 Test BlockCollection.AddAny. Covers #22775. 2014-10-08 11:58:26 +01:00
Marcos Henrich 00c918e0a9 BlockingCollection.Add was adding one more item than it should. 2014-10-08 11:51:59 +01:00
Marcos Henrich 7e034defbc Test that BlockingCollection.Add blocks when there is no more space. 2014-10-08 10:41:14 +01:00
Zoltan Varga f51b9a4bb2 [jit] Extract the ctor calling code from the NEWOBJ implementation into a separate function. 2014-10-07 20:44:28 -04:00
Zoltan Varga c01afa20e8 [jit] Clean up the jit failure handling code a bit, move the the bulk of the eror handling macros into functions, unify the cleanup code at the end of mono_method_to_ir (). 2014-10-07 20:21:09 -04:00
Alexis Christoforides 71e152accc [bcl] Implement KnownTypes for DataContractJsonSerializer. Fixes #23058 and polymorphism support.
Also discarded old __type hint behavior in JsonSerializationReader that potentially allowed any loaded type to be instantiated.
2014-10-07 16:24:41 -07:00
Alexis Christoforides fbea921536 [tests] Add tests for Bug #23058 and polymorphism/known types in DataContractJsonSerializer. 2014-10-07 16:24:41 -07:00
Ludovic Henry 478f99f398 [threaddpool] Fix deadlock in thread pool with monitor thread
Because the monitor thread was not marked as background thread, remove_and_abort_threads (threads.c:2807) would mark it as needed to be waited to shutdown the runtime, and wait_for_tids (threads.c:2652) would then wait indefinitely for it to finish. The issue was that the monitor was waiting on the semaphore monitor_sem, and thus would never exit.

Thread 7 (Thread 0x1c13 of process 99776):
#0  0x00007fff86590a56 in ?? () from /usr/lib/system/libsystem_kernel.dylib
#1  0x00000001003cc03a in mono_sem_wait (sem=0x1004f7f50, alertable=0) at mono-semaphore.c:103
#2  0x00000001002cef41 in monitor_thread (unused=0x0) at threadpool.c:898
#3  0x00000001002cb78f in start_wrapper_internal (data=0x10500abf0) at threads.c:657
#4  0x00000001002cb4a1 in start_wrapper (data=0x10500abf0) at threads.c:704
#5  0x00000001003d61d4 in inner_start_thread (arg=0x7fff5fbfe500) at mono-threads-posix.c:84
#6  0x00007fff8e7c9899 in _pthread_body () from /usr/lib/system/libsystem_pthread.dylib
#7  0x00007fff8e7c972a in _pthread_start () from /usr/lib/system/libsystem_pthread.dylib
#8  0x00007fff8e7cdfc9 in thread_start () from /usr/lib/system/libsystem_pthread.dylib
#9  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x1503 of process 99776):
#0  0x00007fff86594716 in ?? () from /usr/lib/system/libsystem_kernel.dylib
#1  0x00007fff8e7cbc3b in _pthread_cond_wait () from /usr/lib/system/libsystem_pthread.dylib
#2  0x000000010039cfaa in _wapi_handle_timedwait_signal_handle (handle=0xa55, timeout=0x0, alertable=1, poll=0) at handles.c:1595
#3  0x000000010039d03d in _wapi_handle_wait_signal_handle (handle=0xa55, alertable=1) at handles.c:1540
#4  0x00000001003b7ba3 in WaitForSingleObjectEx (handle=0xa55, timeout=4294967295, alertable=1) at wait.c:194
#5  0x00000001003b865d in WaitForMultipleObjectsEx (numobjects=1, handles=0x7fff5fbff1f8, waitall=1, timeout=4294967295, alertable=1) at wait.c:516
#6  0x00000001002c75df in wait_for_tids (wait=0x7fff5fbff1f8, timeout=4294967295) at threads.c:2658
#7  0x00000001002c70e5 in mono_thread_manage () at threads.c:2951
#8  0x00000001000d551b in mono_main (argc=6, argv=0x7fff5fbff9e8) at driver.c:2021
#9  0x0000000100001bd1 in mono_main_with_options (argc=6, argv=0x7fff5fbff9e8) at ./main.c:91
#10 0x00000001000017d3 in main (argc=6, argv=0x7fff5fbff9e8) at ./main.c:122
2014-10-07 18:15:04 -04:00
Zoltan Varga ac2d851398 [jit] Reduce code duplication in the inlining code. 2014-10-07 15:43:17 -04:00
Marek Safar c74ca49869 Merge pull request #1329 from esdrubal/httputility
HttpQSCollection.ToString now url encodes values.
2014-10-07 14:31:50 -04:00
Alexis Christoforides c677be429f Merge pull request #1327 from ermshiperete/Xamarin-23168
[MWF] Pass graphics when calculating button text and image
2014-10-07 11:30:52 -07:00
Jonathan Pryor 8b90653ff3 [System.Core/Android] Fix standalone unit tests.
Commit 5564dad1 broke the self-test (for testing on the developer
machine, not an Android target). Fixup the comment so that appropriate
data is grabbed and used for testing, and improve
AndroidTimeZones.GetDefaultTimeZoneName() so that the default timezone
ID can be specified via the __XA_OVERRIDE_TIMEZONE_ID__ environment
variable for testing.

Finally, demonstrate TimeZoneInfo.GetUtcOffset(DateTime) use so that I
can get better insight into the timezone data stored within the
database:

	$ __XA_OVERRIDE_TIMEZONE_ID__=America/New_York ANDROID_ROOT=`pwd` ANDROID_DATA=`pwd` mono --debug tzi.exe --offset=1969-01-01
	Using DateTime Offset: 1/1/1969 12:00:00 AM
	DB type: System.AndroidTzData
	name=Africa/Abidjan                           Africa/Abidjan                          From Offset: 00:00:00
	name=Africa/Accra                             Africa/Accra                            From Offset: 00:00:00
	name=Africa/Addis_Ababa                       Africa/Addis_Ababa                      From Offset: 03:00:00
	...
2014-10-07 13:59:49 -04:00
Marcos Henrich 843fe0b3c6 HttpQSCollection.ToString now url encodes values. Fixes 22557. 2014-10-07 18:50:45 +01:00
Marcos Henrich 6abce1e8d8 Test HttpQSCollection.ToString url encoding. Covers #22557. 2014-10-07 18:45:50 +01:00
Zoltan Varga 10c2cc4d3f [runtime] Move the MonoJit/MonoJitInfoTable code to a separate file from domain.c. 2014-10-07 13:26:12 -04:00
Zoltan Varga 7cfd463841 [runtime] Factor out some duplicate code from the MonoJitInfo creation code. 2014-10-07 13:03:41 -04:00
Zoltan Varga 04f89bb6fe Merge pull request #1328 from vkargov/master
[runtime] Take correct domain information from StackFrameInfo for each stack frame.
2014-10-07 12:45:52 -04:00
Eberhard Beilharz aab88e769c [MWF] Pass graphics when calculating button text and image
This fixes a problem with calculating the text width of a button
which caused the text to get truncated under certain circumstances
instead of being wrapped. This fixes Xamarin-23168.

Change-Id: Iac0d8a2720a99cf5433e05d5123a04c4b019e493
2014-10-07 17:34:44 +02:00
Vladimir Kargov 4cda578c6a [runtime] Take correct domain information from StackFrameInfo for each stack frame. 2014-10-07 19:30:31 +04:00
Rodrigo Kumpera bd002446fc Merge pull request #1179 from ludovic-henry/pr25-threadpool
[threadpool] Improve heuristic to approach optimal number of threads based on workload
2014-10-07 10:34:43 -04:00
Marcos Henrich fa2c2870e5 Added missing files to projects csproj files. 2014-10-07 14:03:29 +01:00
Marcos Henrich a1e558f6c6 Reset stream position before doing CopyToAsync.
CopyToAsync begins copying at the current position.
2014-10-07 09:53:01 +01:00
Marcos Henrich aea4abc755 Call SetupRequestAsync only after ContentType changes. Fixes 19529. 2014-10-07 09:52:54 +01:00
Alexis Christoforides 14d49cce10 [runtime] Fix another lost canary change 2014-10-06 17:02:23 -07:00
Zoltan Varga f533903590 Kill timed-out tests when using the managed test runner. 2014-10-06 16:13:54 -04:00
Vlad Brezae 7ecf25c7a1 [sgen] Fix pointer access.
Thanks to @martinpotter for finding the bug.
2014-10-06 12:19:52 -07:00
Zoltan Varga 5a22dacd4e [bcl] Remove some verbose test output. 2014-10-06 14:56:32 -04:00
Marcos Henrich 457c87c69f TimeZoneInfo.CreateLocal now handles environment variable TZ. 2014-10-06 15:57:13 +01:00
Rodrigo Kumpera b97e3209b3 [runtime] Silence a warning that has not helped us fix anything. 2014-10-06 10:54:16 -04:00
Marcos Henrich 27d26c36cc Added bash script to test DateTime.Now.
The test changes TZ environment variable and compares DateTime.Now with system date.
The test checks all the timezones installed in /usr/share/zoneinfo/.
2014-10-06 15:32:45 +01:00
Alexis Christoforides d29a341e73 [runtime] Fix canary oops 2014-10-05 23:08:48 -07:00
Alexis Christoforides ee90d5ff1d [runtime] Implement 'nursery-canaries' option for SGen. 2014-10-05 22:32:53 -07:00
Alexis Christoforides 84110040aa [runtime] Convert String.InternalSetLength to an icall. Needed for canary support.
The change does not have a negative impact on StringBuilder performance; under variable-string-length microbenchmarks it seems to perform ~15-20% faster than the managed implementation.
2014-10-05 22:21:15 -07:00
Alexis Christoforides d8ae2993ef [runtime] Implement nursery canaries.
Use the new MONO_GC_DEBUG option "nursery-canaries"  to suffix each nursery object with a canary (guard) word, which is checked on each minor collection. Can be used to detect/debug
heap corruption issues.

Adding canaries to LOS is also easy if wanted - not sure about major heap.
2014-10-05 22:16:27 -07:00
Marek Safar 153d104c07 [system.xml] Make XmlSerializer work even when XmlTextReader has explicitly set its resolver 2014-10-05 17:58:02 -04:00
Marek Safar 58105a4dc6 [system.xml] Add missing 4.0 property 2014-10-05 15:44:55 -04:00
Marek Safar f39cc88e58 [corlib] Notify parent task when child task uses NotOnFaulted. Fixes #23594 2014-10-05 14:36:05 -04:00
Zoltan Varga 9e573872f0 [arm] Increase size of tls_get opcode to 24. 2014-10-05 00:04:58 -04:00
Marcos Henrich 2a73a83d89 Use TZ transitions when AdjustementRules are ignored. Fixes 23170.
In some cases the timezone transitions provided by iOS are not convertible to AdjustmentRules because of changes on the base offset.
Now we store the transitions so they can be used instead of an incomplete list of AdjustmentRules.
2014-10-04 17:32:03 +01:00
Marcos Henrich 97c6bc06ea Refactored TimeZoneInfo.GetUtcOffset.
Added GetUtcOffset auxiliar methods with bool out parameter that is true when the given DateTime is a DST.
2014-10-04 16:46:47 +01:00
Marcos Henrich 1a92f4e90b TimeZoneInfo.IsDaylightSavingTime now uses GetUtcOffset. 2014-10-03 17:43:47 +01:00
Marcos Henrich 374e1b13e0 TimeZoneInfo.GetUtcOffset now handles all DateTimeKinds.
Removed GetUtcOffset cohesion with TimeZoneInfo.IsDaylightSavingTime.
2014-10-03 17:43:32 +01:00
Marcos Henrich 09fc592499 Created helper method TimeZoneInfo.IsInDST. 2014-10-03 10:38:13 +02:00
Marcos Henrich 306ac05ea1 Removed repeated logic from TimeZoneInfo.ConvertTimeToUtc. 2014-10-03 10:38:13 +02:00
Marcos Henrich d6848d1ef6 ConvertTimeToUtc no longer relies in DateTime.ToUniversalTime. 2014-10-03 10:38:12 +02:00
Marcos Henrich b863d3c58d Simplified TimeZone.ToLocalTime.
Old code was producing invalid DST dates.
2014-10-03 10:38:11 +02:00
Marcos Henrich 411d4aa0bb Test TimeZoneInfo.GetUtcOffset with multiple DST and DateTimeKind. 2014-10-03 10:38:11 +02:00
Marcos Henrich 8ab9a76c7e Updated TimeZoneInfoTest.DSTTransisions to correct .NET behavior. 2014-10-03 10:38:10 +02:00
Alexis Christoforides b0cff959e4 [runtime] Fix allocation size calculation for strings in 64-bit builds.
Depending on alignment and packing, part of the string might be inside the MonoString struct boundaries. This e.g. shows up on 64-bit builds of mono where we were allocating 4 extra bytes per string.
2014-10-02 21:04:39 -07:00
Zoltan Varga 6e27f984ab [bcl] Use random ports for the HttpListener tests. 2014-10-02 23:29:53 -04:00
Zoltan Varga af33ad4eaa [jit] Implement 5dbf97e660 for calls made from NEWOBJ too. Fixes #23557. 2014-10-02 21:29:51 -04:00
Zoltan Varga 7a430acd77 [jit] Get rid of unused MONO_ARCH_THIS_AS_FIRST_ARG define. 2014-10-02 20:40:38 -04:00
Zoltan Varga 9523b73148 [arm] Implement handler block guards. 2014-10-02 20:35:42 -04:00
Zoltan Varga f862057fb1 [amd64] Simplify mono_arch_install_handler_block_guard (). 2014-10-02 19:04:27 -04:00
Zoltan Varga c1fe551f9c [arm] Increase the length of the tls_get opcode. 2014-10-02 18:41:42 -04:00
Chris Hamons 4c6a463678 [mono-api-html] Add filter for new namespaces/types
- Reviewed by Sebastien
2014-10-02 15:35:21 -05:00
Zoltan Varga e7778f3fd5 Fix a warning. 2014-10-02 16:06:24 -04:00
Zoltan Varga 4437ecea91 Fix the arm build. 2014-10-02 16:06:01 -04:00
Zoltan Varga 1317d99cae [sgen] Reorganize sgen-archdep.h to remove unused defines. 2014-10-02 15:49:00 -04:00
Zoltan Varga 1e709688bb [jit] Remove unused defines. 2014-10-02 14:32:11 -04:00
Zoltan Varga da3b7dd271 [amd64] Define MONO_ARCH_NOMAP32BIT on all non-linux platforms instead of defining it once for each platform. 2014-10-02 14:23:15 -04:00
Sebastien Pouliot 3e3fe21e7f Revert "Finish test changes started in 7ece665d16714db0979bde5df254231c5be24f10"
This reverts commit d171cdf5e2.
2014-10-02 13:45:11 -04:00
Sebastien Pouliot d525ff73e1 Revert "Refresh HashAlgorithmTest to match changed NullStream behaviour in 8b9c60075f7b97fe88c3c588968977ff9bcf8c28"
This reverts commit 7ece665d16.
2014-10-02 13:44:58 -04:00
Sebastien Pouliot 16dbea555d Revert "Missing Args checks."
This reverts commit 8b9c60075f.
2014-10-02 13:44:35 -04:00
Marcos Henrich 709d2c58ad Removed unused CurrentSystemTimeZone fields and methods. 2014-10-02 09:31:06 +01:00
Marcos Henrich 9be262f8cc CurrentSystemTimeZone.GetUtcOffset now supports multiple DST periods.
DateTime.Now was returning wrong values when system TimeZone had more than one daylight saving time.
Fixes 22648.
2014-10-02 09:31:06 +01:00
Marcos Henrich 88297792e7 TimeZoneInfo is now always present in corlib.
Prior to net_4_0 TimeZoneInfo is a private class.
2014-10-02 09:31:06 +01:00
Zoltan Varga aa73f76a34 [jit] Define NOMAP32BIT on winx64. 2014-10-01 22:49:29 -04:00
Mark Probst b86bd886d6 [sgen] Fix concurrent mark with split nursery. 2014-10-01 14:52:07 -07:00
Zoltan Varga c856758e54 [jit] Remove the unused MONO_DISABLE_PENDING_EXCEPTIONS env var, the functionality it disable is not experimental anymore. 2014-10-01 16:42:47 -04:00
Zoltan Varga d659d7540d [x86] Remove the now unused push based parameter passing code. 2014-10-01 16:36:27 -04:00
Jonathan Pryor 87454f9f83 Merge pull request #1306 from joelmartinez/docs-privateinterface
mdoc no longer documents private interfaces
2014-10-01 15:23:08 -04:00
Rodrigo Kumpera 0ac61b03fc [corlib] Fix UnicodeEncoding GetMaxByteCount and GetMaxCharCount to return the same values as .net. 2014-10-01 15:11:20 -04:00
Zoltan Varga 52834175e1 [runtime] Add a missing call to mono_thread_notify_pending_exc_fn () to the thread abort code. 2014-10-01 15:02:25 -04:00
Zoltan Varga 9aaf79b055 Fix some warnings by not including utils/mono-threads.h into threads-types.h. 2014-10-01 14:27:18 -04:00
Zoltan Varga fc7c8e9765 [jit] Make each CASTCLASS_CACHE patch unique by generating a unique identifier from the method index and an per-method counter. Fixes #23478. 2014-09-30 22:12:53 -04:00
Jo Shields d171cdf5e2 Finish test changes started in 7ece665d16 2014-09-30 14:51:13 +01:00
Jo Shields a49bd2664f Add new cert-sync command to scripts/.gitignore 2014-09-30 13:22:00 +01:00
Jo Shields 7ece665d16 Refresh HashAlgorithmTest to match changed NullStream behaviour in 8b9c60075f 2014-09-30 13:22:00 +01:00
Marek Safar 497481742a [mcs] Undo bool loads normalization from byte arrays 2014-09-30 13:02:32 +02:00
Marek Safar 999e88dcd5 [mcs] Correctly identify constant switch section when value match is not section start. Fixes #23475 2014-09-30 11:12:24 +02:00
Marek Safar 01ffcd4145 [mcs] struct initializers are still experimental 2014-09-30 09:48:41 +02:00
Marek Safar 2476a1b728 Merge pull request #1318 from AlexanderBekrenev/baa-membershipuser
MembershipUser::UpdateUser method fix
2014-09-29 22:28:19 -09:00
Alexander Bekrenev c9044d71bb MembershipUser::UpdateUser method fix 2014-09-30 10:46:14 +04:00
Mark Probst 4e3ca74fcb Fix build on pre-C99 compilers. 2014-09-29 13:52:00 -07:00
Ludovic Henry ada4b4b06f [sgen] Remove useless internal allocation 2014-09-29 16:16:31 -04:00
Zoltan Varga 1fbdf06d04 [runtime] Enable the new interrupt code on ios. 2014-09-29 14:30:19 -04:00
Mark Probst c70c3c429a [sgen] Don't use callback for pinning cemented objects. 2014-09-29 11:04:03 -07:00
Mark Probst a12c4b8099 [sgen] Tag block pointers with whether the blocks contain references. 2014-09-29 11:04:02 -07:00
Mark Probst e8efdfa360 [sgen] Macro abstractions for pointer tagging. 2014-09-29 11:04:02 -07:00
Mark Probst ac83118056 [sgen] Shift, don't divide, just to make sure. 2014-09-29 11:04:02 -07:00
Mark Probst 70980c0cde [sgen] Move SGen statistics out of gc-internal.h.
This introduced a dependency from sgen-conf.h to a lot of compilation units
in metadata, leading to long build times when experimenting with SGen.
2014-09-29 11:04:02 -07:00
Mark Probst 0cfc7008a0 [sgen] Don't unroll run-length scanning loop. 2014-09-29 11:04:01 -07:00
Mark Probst 8e714a70a1 [sgen] Keep allocated blocks in array instead of linked list.
We were spending a lot of time in major_iterate_live_block_ranges() on
the lcscbench benchmark, mainly from following the linked block list.
This change makes it much faster.
2014-09-29 11:04:01 -07:00
Mark Probst 18ee4f22a3 [sgen] Move GRAY_OBJECT_ENQUEUE/DEQUEUE to sgen-gray.h. 2014-09-29 11:04:01 -07:00
Mark Probst 62df12c0e4 [sgen] Move HEAVY_STAT macro to sgen-conf.h.
That's where we define HEAVY_STATISTICS, too.
2014-09-29 11:04:01 -07:00
Mark Probst aa82365b6b [sgen] Scoping fix in a macro. 2014-09-29 11:04:01 -07:00
Mark Probst 0f7be7ca38 [sgen] Heavy statistics counters for scanned object descriptors. 2014-09-29 11:04:00 -07:00
Mark Probst aa8cabc373 [sgen] do-while loop instead of 1-unrolled while loop in bitmap scan. 2014-09-29 11:04:00 -07:00
Mark Probst 53b798f915 [sgen] Added some comments. 2014-09-29 11:04:00 -07:00
Mark Probst 533b11a0f6 [sgen] Simplify sgen_drain_gray_stack().
This seems to have accumulated code duplication by accident.
2014-09-29 11:03:59 -07:00
Mark Probst 78408ae100 [sgen] Free gray queue sections after GC, not at start of next.
We trim the free list of the gray queue to a maximum number of
sections, but we did it at each collection start, so the extraneous
sections were kept around between collections.
2014-09-29 11:03:59 -07:00
Mark Probst 72c15bb6f2 [sgen] Enqueue objects with their descriptors.
At the point where we enqueue objects we have already fetched their
descriptors, and when we later scan them (after dequeuing) we need the
descriptor again, so we avoid cache misses by enqueuing them together.
2014-09-29 11:03:59 -07:00
Mark Probst 96e37d79b3 [sgen] Pass descriptor, not vtable, to OBJ_COMPLEX_ARR_FOREACH_PTR.
Later on, when we enqueue objects with their GC descriptors, we won't
load the vtable before scanning (because we'll already have the
descriptor), so the scanning macros shouldn't take them as arguments.
2014-09-29 11:03:59 -07:00
Mark Probst 003488cc2a [sgen] GrayQueueEntry struct instead of just char*.
This makes it easier to later enqueue the GC descriptor with the
object.
2014-09-29 11:03:58 -07:00
Mark Probst c2022b34b7 [sgen] Remove obsolete check in #ifdef.
That macro doesn't exist anymore.
2014-09-29 11:03:58 -07:00
Mark Probst d07b7650c7 [sgen] Abstract block info->block via macro.
If we want to experiment with putting the block info into the block this
makes it easy.
2014-09-29 11:03:58 -07:00
Mark Probst 050ee93a67 [sgen] Implement get_and_reset_num_major_objects_marked() for non-conc, too.
This is used for profiling and debugging.  There's no reason to only
have it for concurrent.
2014-09-29 11:03:58 -07:00
Mark Probst 8a005b8290 [sgen] Remove parallel collector.
This was almost completely untested and performance was
erratic.
2014-09-29 11:03:57 -07:00
Mark Probst 06ba93fd0e [sgen] Remove SGen fixed heap configuration.
It's not well-tested, not widely used, we can surpass its speed with
upcoming improvements and we won't put those into the fixed
configuration because it's too much of a diversion.
2014-09-29 11:03:57 -07:00
Marek Safar 2a4230fe3b [facades] Add ComInterfaceType type forwarder 2014-09-29 19:50:29 +02:00
Zoltan Varga 67297b2710 Fix a warning. 2014-09-29 13:37:03 -04:00
Zoltan Varga 7968a8df16 [x86] Reenable the no pushes code again. 2014-09-29 13:01:52 -04:00
Marek Safar f1ca57ebb3 [mcs] Don't consider loads from captured local cheap 2014-09-29 16:44:46 +02:00
Marek Safar 5d762ffe93 [mcs] null operator on unconstrained generic values 2014-09-29 16:44:46 +02:00
Alexander Köplinger 22a218578a Updated links in CONTRIBUTING.md 2014-09-29 14:11:06 +02:00
Marek Safar 84f9d58737 [mcs] Handle crash in binary operators when enum is used and nullable type is undefined 2014-09-29 11:41:35 +02:00
Marek Safar 1e5638b59c Merge pull request #1316 from Therzok/addSealed
Improvements in CorCompare
2014-09-28 21:27:08 -09:00
Zoltan Varga 75eb6a9caf Revert "[jit] Enable deadce on fp instructions on x86. Fixes #23392."
This reverts commit a32e2c7fe6.

Revert this as it breaks the build.
2014-09-29 01:06:50 -04:00
Zoltan Varga b533e2abac Fix a warning. 2014-09-28 19:57:52 -04:00
Zoltan Varga 9ac8be28af [bcl] Add AppDomain.FirstChangeException event, not implemented yet. 2014-09-28 19:56:53 -04:00
Zoltan Varga 5d3a42dc0f [runtime] Disallow generic classes with explicit layout. Fixes #23438. 2014-09-28 19:44:23 -04:00
Marius Ungureanu 63f50e9a1a [CorCompare] Add pointer as a class type. 2014-09-28 23:50:39 +03:00
Marius Ungureanu a5439f9646 [CorCompare] Add sealed methods parsing. 2014-09-28 23:48:58 +03:00
Marek Safar f289255ed5 Merge pull request #1315 from rjvdboon/BootstrapContext
Add System.IdentityModel.BootstrapContext to .Net 4.5 profile, fixes #22560
2014-09-27 20:59:02 -09:00
Zoltan Varga 657b6caad6 [runtime] Implement and enable the new interrupt code on amd64. 2014-09-28 01:50:51 -04:00
rjvdboon 2f9fb9e888 more coding style changes 2014-09-27 21:32:46 +02:00
rjvdboon d90ab2a697 Adhere to mono coding guidelines. 2014-09-27 21:27:44 +02:00
Marek Safar bb12899b3a [corlib] Timespan ticks formatting rewrite. Fixes #23376 2014-09-27 16:41:46 +02:00
Marek Safar bd3f6f5abc Merge pull request #1314 from alesliehughes/master
Add basic implement of ManagementObjectSearcher
2014-09-27 02:13:34 -09:00
Alistair Leslie-Hughes 13e0175fc8 Add basic implement of ManagementObjectSearcher
This change is released under the MIT license.
2014-09-27 20:16:32 +10:00
Zoltan Varga a32e2c7fe6 [jit] Enable deadce on fp instructions on x86. Fixes #23392. 2014-09-26 19:48:21 -04:00
Zoltan Varga cca43a2d34 [sdb] Add an option to make debugger invokes virtual. Part of the fix for #23385. 2014-09-26 18:16:17 -04:00
Sebastien Pouliot f234e421ae Merge pull request #1282 from madrang/MinorChangesOfPull1281
Add missing argument validations and set disposed flag to true once Dispose is called
2014-09-26 16:24:22 -04:00
Sebastien Pouliot c648f28f54 [corlib] Move iOS-specific code to a separate file for System.Environment 2014-09-26 15:40:34 -04:00
Ludovic Henry 62edb78cd6 [threadpool] Put the monitor thread to sleep if there has been no tasks for the past 5 seconds (NON_BUSY_INTERATION * SAMPLES_PERIOD)
This should improve a lot power consumption, because this avoir having a thread waking up every 500ms keeping the CPU awake.
2014-09-26 15:06:43 -04:00
Ludovic Henry 681a0061ad [threadpool] Remove process_idle_times so monitor_thread is the only function to change the number of threads 2014-09-26 15:06:42 -04:00
Ludovic Henry c93f120211 [threadpool] Add heuristic to approach the optimal number of threads 2014-09-26 15:06:42 -04:00
Ludovic Henry 1210628a04 [threadpool] Add suspend pushing to a WSQ 2014-09-26 15:06:42 -04:00
Sebastien Pouliot 1641a095bb [Mono.Security] Clear Certificates after Import or Remove [part of PR #1004]
PR: https://github.com/mono/mono/pull/1004

commit: https://github.com/rahvee/mono/commit/9fa2a1928a50114eb144202b939269f3f8d823f2

Modified to match Mono guidelines.
2014-09-26 14:35:20 -04:00
Marek Safar 0567e7763e [mcs] Check for true/false user operators on unwrapped nullable type. Fixes #23199 2014-09-26 20:34:01 +02:00
Rodrigo Kumpera aa11aa6184 Revert "[runtime] Implement lazy resolution of array interfaces."
This reverts commit 6ee08cf772.

This broke corlib compilation in a very weird way. Reverting it for now as I have no idea on why things break.
2014-09-26 14:12:32 -04:00
Rodrigo Kumpera 0e37ed19be Revert "[runtime] Remove a bit chunk of what's dead code now."
This reverts commit cab1c00168.
2014-09-26 14:12:22 -04:00
Marek Safar 96b46d1ad0 [mcs] Add check for parameterless user constructor used as default parameter value 2014-09-26 14:31:40 +02:00
Marek Safar a59c434f46 Merge pull request #1312 from esdrubal/xmltext
Property with attribute XmlTest is now set from ReadString only.
2014-09-26 02:47:15 -09:00
Marcos Henrich 916121f3d7 Property with attribute XmlTest is now set from ReadString only.
Before the change when the property default value was not null or empty the deserialized value would be the concatenation of the default value and the serialized value.
The correct behavior is to use the serialized value only.
Fixes 18908.
2014-09-26 10:35:57 +01:00
Marcos Henrich 007413298d Test Xml serialization of a property with attribute XmlText.
The tested property has a default value that is not null.
Covers 18908.
2014-09-26 10:31:51 +01:00
Marek Safar c5cf618a14 [mcs] Fix codegen for coalescing operator involving user operator conversion to result type 2014-09-26 09:27:49 +02:00
Zoltan Varga 6c4bc5f9d7 [aot] Pass additional arguments to llc on x86. 2014-09-25 17:12:17 -04:00
Robert J. van der Boon 11049f9dd7 Added serialization of SecurityToken with Handler 2014-09-26 05:39:48 +09:00
Rodrigo Kumpera cab1c00168 [runtime] Remove a bit chunk of what's dead code now. 2014-09-25 16:23:24 -04:00
Rodrigo Kumpera 6ee08cf772 [runtime] Implement lazy resolution of array interfaces.
To resolve casting we make all relevant interfaces to use the generic variance casting code.
This only affected ICollection`1 and IList`1, which are not terribly popular.

To fix dispatch we augment vtable resolution to treat those interfaces as variant and use
the already in place machinery.

Memory reduction numbers for the corlib test suite:

Initialized classes 8004 -> 7470 (7% reduction)
Corlib mempool size: 2719832 -> 2678872 (1.5% reduction)

Inflated classes 4500: 3.972 (12% reduction)
Inflated signatures size: 166128 -> 139812 (16% reduction)
Inflated methods size: 565152 -> 485664 (15$ reduction)
2014-09-25 16:23:23 -04:00
rjvdboon 4d7a441967 Update unit tests for binary serialization 2014-09-25 22:09:21 +02:00
rjvdboon 8d405e7aa1 Change unittest to not use the UserNameSecurityTokenHandler base class (as it does not-exist in mono) 2014-09-25 21:33:22 +02:00
Marek Safar 410af9c0cc Merge pull request #1309 from esdrubal/json
Improved Json deserialization of floating-point numbers.
2014-09-25 07:42:36 -09:00
Joel Martinez 8f2377e855 [mdoc] No longer documenting explicitly implemented private interface members.
https://bugzilla.xamarin.com/show_bug.cgi?id=18411

If a class explicitly implements an internal interface, those members will no
longer be documented, nor will the interface show up in the class' signature.
This allows for a library to hide internal implementation details that an end
user would not be able to take advantage of (ie. can't cast to internal
interface to call methods).

Includes test (check-monodocer-internal-interface)  added to makefile.
2014-09-25 10:41:42 -04:00
Marcos Henrich 92a4fd26ac Improved Json deserialization of floating-point numbers.
When DataContractJsonSerializer was created from type object, deserialization of floating.point numbers was not possible.
Fixes 21583.
2014-09-25 15:30:46 +01:00
Marcos Henrich ee71f0a1e6 Test Json deserialization of a floating-point number as object.
Covers 21583.
2014-09-25 15:15:38 +01:00
Miguel de Icaza 40ccf510c6 Merge pull request #1307 from esdrubal/servicemodelrss
Rss20ItemFormatter.ReadFrom now sets Id when guid is PermaLink.
2014-09-25 09:52:23 -04:00
Marcos Henrich d7c598b74c Rss20ItemFormatter.ReadFrom now sets Id when guid is PermaLink.
Fixes 23262.
2014-09-25 13:38:59 +01:00
Marcos Henrich 5ddcc07c67 Test Rss20ItemFormatter.ReadFrom Guid. Covers 23262. 2014-09-25 13:36:40 +01:00
Mark Probst 294e5214b2 [sgen] Don't get time twice at the same time. 2014-09-24 16:31:19 -07:00
Ludovic Henry 546831886e [sgen] Add concurrent collector counter for time spent during concurrent phase 2014-09-24 16:31:19 -07:00
Ludovic Henry 5d4b1f978b [sgen] Add major concurrent collector stw time to "Major GC time" counter 2014-09-24 16:31:18 -07:00
Miguel de Icaza 4320e844e9 Merge pull request #1304 from slluis/mac-proxy-autoconfig
[System.Net] Add support for .pac proxy config scripts on mac
2014-09-24 11:17:33 -04:00
Lluis Sanchez f5f69e540e [System.Net] Add support for .pac proxy config scripts on mac 2014-09-24 16:50:15 +02:00
Miguel de Icaza c6ab899595 [System] Fix most warnings on the System test suite 2014-09-24 10:43:46 -04:00
Marcos Henrich 67ea9985cb UriParserTest.GetComponents_Ftp2 now uses the variable 'ftp2'. 2014-09-24 12:22:30 +01:00
João Matos e150fde4e2 Fixed TLS detection to check for TARGET_MACH instead of __APPLE__.
In the case of cross-compiling to x86 Linux from OSX we'd hit compilation issues here.
2014-09-24 12:21:35 +01:00
João Matos de0543fbea Added support for cross-compiling to x86 Linux/Android. 2014-09-24 12:21:34 +01:00
Marek Safar 1d94d1770d [mcs] More tweaks to conditional tokenizer. Fixes #23319 2014-09-24 12:29:06 +02:00
Jo Shields ff165854bd Move llvm_init_inner inside #ifdef ENABLE_LLVM
This should fix c30a3e46d2 failing to link properly with ld 2.22 and GCC 4.9.1, on Linux, with non-LLVM builds.

./.libs/libmini.a(libmini_la-mini.o): In function `llvm_init_inner':
mini.c:(.text+0x1182b): undefined reference to `mono_llvm_init'
/usr/bin/ld: .libs/libmonoboehm-2.0.so.1.0.0: hidden symbol `mono_llvm_init' isn't defined
/usr/bin/ld: final link failed: Bad value
2014-09-24 10:40:03 +01:00
Atsushi Eno db5275ca56 [xlinq] fix bug #23318 - XComment.ToString() accepts "invalid" values.
Before it passes the value to XmlWriter.WriteComment(), it replaces
invalid values to valid form.
2014-09-24 15:30:32 +08:00
Zoltan Varga da335abfba Merge pull request #1301 from Unity-Technologies/fix-isuserprotected
Fix Win32 call in IsUserProtected. Usage was incorrect and freeing the w...
2014-09-23 18:59:15 -04:00
Zoltan Varga 2b5078c306 [bcl] Fix the RenameTpThread test, renaming a tp thread should not fail. 2014-09-23 18:40:34 -04:00
Zoltan Varga a8185f3374 [jit] Fix LLVM support on amd64 which got broken by the epilog size changes. 2014-09-23 18:36:23 -04:00
Zoltan Varga c30a3e46d2 [aot] Fix running with a loadable llvm module in aot-cache mode. 2014-09-23 18:26:18 -04:00
Marcos Henrich feacff0185 Revert "Uri made from UNIX path and RelativeOrAbsolute is now relative."
This reverts commit 116f4d2749.
2014-09-23 22:30:24 +01:00
Rodrigo Kumpera 6fe521be5c Merge pull request #1302 from mono/revert-1300-unixrelativeorabsolute
Revert "Uri made from UNIX path and RelativeOrAbsolute is now relative."
2014-09-23 17:12:10 -04:00
Rodrigo Kumpera 7d3eaf50a8 Revert "Uri made from UNIX path and RelativeOrAbsolute is now relative." 2014-09-23 17:05:30 -04:00
Michael Hutchinson 18186487ee Environment.IsRunningOnWindows can be true on MOBILE 2014-09-23 15:03:09 -04:00
Sebastien Pouliot d127a1a911 [System.Data] Add new file to the mobile_* sources build (to fix XI build) 2014-09-23 14:23:12 -04:00
Zoltan Varga 42173889e7 [jit] Fix EH on amd64 which got broken by d5a18ba292. 2014-09-23 14:16:16 -04:00
Rodrigo Kumpera 7c7ae04f7f Merge pull request #1299 from esdrubal/uriuserinfo
UriParseComponents no longer decodes '@' in UserInfo.
2014-09-23 14:00:13 -04:00
Marcos Henrich 30ec69fd50 Allow stream reuse when InputStream has been disposed.
If InputStream is disposed FlushInput now sets it to null so a new one can be created.
2014-09-23 18:44:49 +01:00
Marcos Henrich 6a249a5611 Test connection reuse. 2014-09-23 18:44:49 +01:00
Marcos Henrich 116f4d2749 Uri made from UNIX path and RelativeOrAbsolute is now relative.
This was changed because the path might be a relative http path and should take precedence over an absolute UNIX path.
2014-09-23 18:01:38 +01:00
Jonathan Chambers d56a23750b Fix Win32 call in IsUserProtected. Usage was incorrect and freeing the wrong parameter causing a memory corruption. 2014-09-23 12:54:44 -04:00
Miguel de Icaza 0699e4da36 Fix warnings in mscorlib's Test suite + bring a couple more tests + fix thread rename test 2014-09-23 10:56:04 -04:00
Marcos Henrich b89b5c46d6 Test WebClient.UploadFileTaskAsync ContentType. Covers 19529. 2014-09-23 15:30:50 +01:00
Marek Safar 84ab6a7833 Merge pull request #1300 from esdrubal/unixrelativeorabsolute
Uri made from UNIX path and RelativeOrAbsolute is now relative.
2014-09-23 05:11:15 -09:00
Marcos Henrich b6874fa16b Uri made from UNIX path and RelativeOrAbsolute is now relative.
Fixes 22954.
2014-09-23 14:32:59 +01:00
Marcos Henrich f6f80d5e4d Test that Uri made from UNIX path and RelativeOrAbsolute is relative. 2014-09-23 14:27:35 +01:00
Marcos Henrich 2d52cec1ce Merge pull request #1203 from esdrubal/protect
KeyPairPresistence now tries to fix folder permissions.
2014-09-23 13:58:19 +01:00
Marcos Henrich e074772e92 UriParseComponents no longer decodes '@' in UserInfo. Fixes 23246. 2014-09-23 12:42:11 +01:00
Marcos Henrich b63c44670a Test Uri.UserInfo with percentage encoded '@'. 2014-09-23 12:42:10 +01:00
Marcos Henrich 2cf751f7f7 Fixed additional Uri.UserInfo char consumed after an escaped char. 2014-09-23 12:42:10 +01:00
Marcos Henrich ac52aece46 Test Uri.UserInfo with escaped 'a'. 2014-09-23 12:42:09 +01:00
Zoltan Varga 745a2b16ec [aot] Add an 'options' argument to the AOT cache configuration where additional --aot= options can be passed. 2014-09-22 21:11:03 -04:00
Zoltan Varga b0523c4ee8 [aot] Add more verbose aot cache logging, fix failure detection. 2014-09-22 20:52:53 -04:00
Zoltan Varga 627fc398ad [aot] Make --aot=llvm actually work by passing the flag down to the JIT. 2014-09-22 20:18:33 -04:00
Zoltan Varga 19619d925e [aot] Fix a regression introduced by 82c15fa592. 2014-09-22 20:11:22 -04:00
Zoltan Varga 82c15fa592 [aot] Add an 'llvm' aot option which does the same as --llvm. This allows running the AOT compiler with LLVM enabled in aot cache mode. 2014-09-22 20:03:48 -04:00
Zoltan Varga 40ca3ae249 [llvm] Fix support for unaligned offsets in the store_membase_imm opcodes. Fixes #23267. 2014-09-22 18:52:54 -04:00
Ludovic Henry 24013364b7 [sgen] Use memcpy to copy object
It is faster by around 5-6% on copy heavy gc stress tests.
2014-09-22 14:52:16 -07:00
Zoltan Varga 16d9d07821 [runtime] Allow renaming of threadpool threads. Fixes #23206. 2014-09-22 17:07:26 -04:00
Zoltan Varga 74b76bdc11 [runtime] Fix the lookup of nested types which have a namespace. Fixes #21653. 2014-09-22 16:20:25 -04:00
Marek Safar 0f36581baa [mcs] Populate inherited constraints member cache from types not only base types. Fixes #23017 2014-09-22 22:12:49 +02:00
Marek Safar b99e7ab957 Fixes commit ef94fbfd9c 2014-09-22 22:12:49 +02:00
Marius Ungureanu 32318db8cf Fixup to ef94fbfd9c
Thanks @ezavaleta
2014-09-22 21:16:13 +03:00
Marek Safar ef94fbfd9c [corlib] Update en-NZ designators. Fixes #22212 2014-09-22 17:30:35 +02:00
Marek Safar 5ad92e6b10 [mcs] declaration expression after ref/out argument 2014-09-22 17:30:34 +02:00
Miguel de Icaza fb3a6d1cd2 Merge pull request #1295 from nealef/master
Add SqlCredential support to SqlClient/Tds
2014-09-22 10:41:58 -04:00
Rodrigo Kumpera c47fab9285 Merge pull request #1296 from directhex/master
Add a tool which can sync the Mono cert store from an arbitrary cert bundle
2014-09-22 10:29:33 -04:00
Jo Shields 452073b91e Add a tool which can sync the Mono cert store from an arbitrary cert bundle (i.e. every trusted CA.pem in one big text file). This is a format used by most Linux distributions, so allows Mono packagers to automatically integrate the Mono cert store with the OS cert store. 2014-09-22 14:02:03 +01:00
Zoltan Varga 5f9c74f4c5 [runtime] Fix mono_sigctx_to_monoctx () on win32. 2014-09-22 01:16:00 -04:00
Zoltan Varga df43380ea6 [runtime] Fix the win32 build. 2014-09-22 01:01:11 -04:00
Zoltan Varga ab5dda7fba Fix warnings. 2014-09-22 06:46:23 +02:00
Zoltan Varga 12bceb1700 [jit] Fix the handler block trampolines on windows. 2014-09-22 06:44:54 +02:00
Zoltan Varga f930824ea9 [runtime] Enable the fastpath in CEE_MONO_JIT_ATTACH on windows. 2014-09-22 06:44:54 +02:00
Zoltan Varga e0a408f702 [runtime] Treat the tls key as the tls offset on windows, since they are the same. 2014-09-22 06:44:53 +02:00
Zoltan Varga 12dc660454 [runtime] Enable fp elimination on winx64. 2014-09-21 23:07:30 -04:00
Zoltan Varga ac2e2c7703 [runtime] Disable a few more tests on windows which hang on winx64. 2014-09-21 22:48:42 -04:00
Zoltan Varga d5a18ba292 [jit] Enable the pushless call code on windows too, get rid of the non-pushless code. 2014-09-21 22:21:41 -04:00
Zoltan Varga dfb8d2ac8e [jit] Implement the pushless call code on winx64. 2014-09-21 22:01:03 -04:00
Zoltan Varga ea77b1f9fb [jit] Enable monitor fast paths on win64. 2014-09-22 01:45:28 +02:00
Zoltan Varga 558750f053 [runtime] Fix the windows build. 2014-09-21 17:42:45 -04:00
Zoltan Varga e2e74c95e6 [runtime] Fix the unregistration of our exception handler on windows. Fixes #23221. 2014-09-21 14:54:24 -04:00
rjvdboon edca3467ce Added System.IdentityModel.Tokens.BootstrapContext including tests. 2014-09-20 22:44:34 +02:00
Zoltan Varga ca51c3b026 [runtime] Enable the new interrupt code on arm linux. 2014-09-20 02:43:47 -04:00
Zoltan Varga d4b4c2dbbc [runtime] Add wrappers around the wapi interrupt functions to mono-threads to reduce the amount of #ifdef WIN32 blocks in threads.c. 2014-09-19 17:51:14 -04:00
Sebastien Pouliot 23042a0aa3 Fix typo (and XI builds) 2014-09-19 16:48:37 -04:00
Sebastien Pouliot 64b8e0c063 [System.Numerics] Fix unit test to succeed on different culture (XI runs tests them on several cultures) 2014-09-19 16:30:16 -04:00
Neale Ferguson a83e9cf4aa Add SqlCredential support -
- Tds.cs: Use SecureString objects for passwords; Add method to retrieve string from SecureString
- Tds42.cs: Use SecureString for passwords
- Tds50.cs: Use SecureString for passwords
- Tds70.cs: Use SecureString for passwords
- TdsConnectionParameters.cs: Use SecureString for passwords; Initialize Password parameter as cleared string; Add indicator for when password is set
- SqlConnection.cs: Use SecureString for passwords; Add SqlConnect method that accepts an SqlCredential along with the Connection string; Perform checking of parameters to ensure user/password not specified in connection string if credentials have been specified or using credentials when domain login is specified.
- SqlCredential.cs: Add new class with support for credentials
- System.Data.dll.sources: Add SqlCredential.cs to the build list
2014-09-19 11:52:52 -04:00
Ludovic Henry 05d341392c [sgen] Fix wbarrier use if we define SGEN_HEAVY_BINARY_PROTOCOL, HEAVY_STATISTICS or XDOMAIN_CHECKS_IN_WBARRIER 2014-09-19 11:14:48 -04:00
Miguel de Icaza af429ecfd0 Merge pull request #1245 from StephenMcConnel/bug-22483
Fix scrolling in SWF.ListView.EnsureVisible(int index)
2014-09-19 10:17:09 -04:00
Miguel de Icaza d2c021407d Merge pull request #1287 from akoeplinger/fix-appconfig-performancecounters
[System] Add performanceCounters element to System.Diagnostics app.config configuration section
2014-09-19 10:15:05 -04:00
Miguel de Icaza 3461617bc2 Merge pull request #1290 from directhex/master
Put KeyPairPersistence load into a try{}catch{} block.
2014-09-19 10:13:55 -04:00
Miguel de Icaza 605c8771b8 Merge pull request #1273 from joelmartinez/docs-unified-fix
bugfix for mdoc update with --dropns feature
2014-09-19 10:11:01 -04:00
Ludovic Henry fcb9de513a [utils] Fix force inlining compilation error with gcc on linux
[02131]   CC       libmonoruntimesgen_la-sgen-marksweep.lo
[02131] In file included from sgen-major-copy-object.h:35:0,
[02131]                  from sgen-marksweep.c:1128:
[02131] sgen-copy-object.h:38:1: warning: always_inline function might not be inlinable [-Wattributes]
[02131]  par_copy_object_no_checks (char *destination, MonoVTable *vt, void *obj, mword objsize, SgenGrayQueue *queue)
[02131]  ^
[02131] sgen-marksweep.c: In function 'par_copy_object_no_checks':
[02131] sgen-copy-object.h:38:1: error: function 'par_copy_object_no_checks' can never be copied because it saves address of local label in a static variable
[02131] make[3]: *** [libmonoruntimesgen_la-sgen-marksweep.lo] Error 1
[02131] make[3]: Leaving directory `/root/rpmbuild/BUILD/mono-3.10.1/mono/metadata'
[02131] make[2]: *** [all-recursive] Error 1
[02131] make[2]: Leaving directory `/root/rpmbuild/BUILD/mono-3.10.1/mono'
[02131] make[1]: *** [all-recursive] Error 1
[02131] make[1]: Leaving directory `/root/rpmbuild/BUILD/mono-3.10.1'
[02131] make: *** [all] Error 2
[02131] error: Bad exit status from /var/tmp/rpm-tmp.YxcUOE (%build)
2014-09-19 09:46:09 -04:00
Marek Safar 7ad366c25a [mcs] Improve scoring of failed overload resolution. Fixes #22989 2014-09-19 00:09:35 +02:00
Ludovic Henry d1ffd5a794 [utils] Use MONO_ALWAYS_INLINE + Add MONO_NEVER_INLINE 2014-09-18 16:42:00 -04:00
Jo Shields 3552179bda Put KeyPairPersistence load into a try{}catch{} block.
Kpp.Load() will throw an unhandled exception if _filename (a folder to use as the key store) does not exist and it cannot be created.

This is an entirely valid thing to have happen - cert importing into the machine store (mozroots --import --machine --sync) as root will create a /usr/share/.mono/certs/ folder, but will not create /usr/share/.mono/keypairs - and since the root user owns /usr/share/.mono/, if the user tries to enumerate the certificates in /usr/share/.mono/certs/, they get 0 certificates returned due to the unhandled exception dropping each loaded certificate on the floor.

Closes: Xamarin bug 23015
2014-09-18 17:32:06 +01:00
Marek Safar eb6781f3cd [mcs] Fix output type inference when parameters after first one depend on fixed first set. Fixes #23024 2014-09-18 14:47:19 +02:00
Marek Safar 548dca4730 [mcs] Better check for parameterless constructor overload 2014-09-18 10:10:46 +02:00
Zoltan Varga a4024ba4ae [sdb] Use new style interrupt on win32 if available. 2014-09-17 22:49:02 -04:00
Zoltan Varga 8ed233ef06 [runtime] Use the windows CONTEXT<->MonoContext conversion code to mono-context.c, simplify some code. 2014-09-17 22:37:18 -04:00
Zoltan Varga 4fc8068d2a [runtime] Implement the new suspend infrastructure on windows. 2014-09-17 18:25:00 -04:00
Zoltan Varga 28179361ec [sdb] Implement support for win64. 2014-09-17 15:21:11 -04:00
Marek Safar d62679a4a4 [xbuild] Workaround for issues with CreateItem task where metadata are not generated due to up-to-data inputs. Fixes #23022 2014-09-17 20:22:36 +02:00
Zoltan Varga e2f24086a8 Merge pull request #1288 from ylatuya/patch-2
[mkbundle] Fix check for dos2unix
2014-09-17 14:03:43 -04:00
Jonathan Pryor 818b81ef40 [runtime] Use statfs(2) on Android.
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=23077

Reverts commit 53ce92470.

Commit 53ce92470 disabled use of statfs(2) on Android, for unspecified
reasons. (My *suspicion* is that the Android version mono was
originally ported to didn't have statfs(2), but I can neither confirm
nor deny that guess.)

Android has supported statfs(2) since API-4 Android v1.6 (in that
statfs(2) is in the header files); what's missing is MNT_RDONLY. What
IS present is MS_RDONLY, which appears to serve the same purpose.

Re-enable use of statfs(2) and use MS_RDONLY when building against the
Android NDK.
2014-09-17 12:56:44 -04:00
Andoni Morales Alastruey 753f233a31 [mkbundle] Fix check for dos2unix
This fixes the command to check for dos2unix and makes mkbundle usable again with mingw.
We need first to redirect the standard input, otherwise the check always fails with an InvalidOperationException and set CreateNoWindow=false to avoid spawning a new window.
2014-09-17 16:17:33 +02:00
Marek Safar 4f719f9ce9 [xbuild] Fix few crashes when task loading fails 2014-09-17 11:19:57 +02:00
Zoltan Varga 5dbf97e660 [jit] Make calls from gshared to gsharedvt sharable methods indirect since otherwise at runtime we might find an instantiation and we cannot patch the call, leading to performance problems. Fixes #23021. 2014-09-16 23:17:54 -04:00
Michael Hutchinson 2804d6af37 Fix mobile and mobile_static profiles
And bring them to parity with monodroid and monotouch
2014-09-16 19:14:20 -04:00
Martin Baulig 87622fc711 [WCF]: Update to my last fix for bug #22129.
The problem already starts when creating the OperationDescription; we need
to also look at the End* method here to correctly parse the reply parameters.

Then ClientRuntimeChannel.Process needs to distinguish between sync/async
and copy the out/byref parameters when needed.
2014-09-16 21:34:20 +02:00
Zoltan Varga 4e1e37519a [runtime] Make stack walks done by the sampling profiler async safe. 2014-09-16 15:07:55 -04:00
Marek Safar 9aed010782 [mcs] struct parameterless instance constructors 2014-09-16 19:19:32 +02:00
Zoltan Varga 80b14d356f [runtime] Disable VS warnings C4273 (inconsistent dll linkage), and C4005 (macro redefinition). The former occurs becase we mark exported function declarations using MONO_API, but not the definitions. The latter occurs because we define _WINSOCKAPI_. 2014-09-15 23:30:40 -04:00
Zoltan Varga 557390ee46 [runtime] Fix the my_g_bit_nth_msf () function for win64. 2014-09-15 22:10:23 -04:00
Zoltan Varga 02f48039b1 [runtime] Add support for setting the thread name on windows. On windows, this will only work when running under a debugger. 2014-09-15 19:14:09 -04:00
Zoltan Varga ae030203e7 [arm64] Increase some opcode sizes. Fixes #23026. 2014-09-15 18:09:43 -04:00
Zoltan Varga fad438976c [runtime] Fix an assert in w32_dlerror () on winx64. 2014-09-15 17:35:05 -04:00
Marek Safar 240cf239a2 [xbuild] More tweaks to tool path setup 2014-09-15 22:25:11 +02:00
Zoltan Varga 64f6eb2d1d [aot] Use gsharedvt for collection types instantiated with generic structs as well. 2014-09-15 15:31:38 -04:00
Marcos Henrich 1531798bbe Added missing files to projects csproj files. 2014-09-15 19:14:48 +01:00
Marek Safar 2320d0dc40 [mcs] Revert usage of closed delegates for compiler generated anonymous method 2014-09-15 18:34:20 +02:00
Rodrigo Kumpera 6ea08668a2 Merge pull request #1280 from nealef/master
Maximum large object size should be limited by SSIZE_MAX not SIZE_MAX.
2014-09-15 12:31:16 -04:00
Martin Baulig 8b10d9bb0b [WCF]: Copy out/ref parameters on async call; bug #22129. 2014-09-15 18:25:54 +02:00
Marek Safar b7fb736254 Merge pull request #1286 from esdrubal/xmlnullablearrayitem
XmlSerializer nullable array items.
2014-09-15 07:20:02 -09:00
Marcos Henrich 5fc6ecd7c7 If not specified assume that array items are nullable. Fixes #19012. 2014-09-15 16:57:13 +01:00
Marcos Henrich 8790297c85 Test xml serialization of nullable array items. Covers #19012. 2014-09-15 16:55:31 +01:00
Marek Safar 1afc866f87 [xbuild] Workaround for null log service (which should never be null) 2014-09-15 17:37:49 +02:00
Marek Safar 52cdea5c0a Merge pull request #1257 from esdrubal/xmloptional
Added optional serialization based on ShouldSerialize{V}.
2014-09-15 03:44:30 -09:00
Marcos Henrich be02242f8b Ignore method ShouldSerialize if it is a generic. 2014-09-15 13:02:00 +01:00
Marcos Henrich 85650c7528 Test serialization wen class has method bool ShouldSerialize<T>().
.NET throws an exception but it should have no effect on the serialization.
2014-09-15 13:02:00 +01:00
Marcos Henrich 79de2b62f9 Added optional serialization based on ShouldSerialize{V}.
SerializationCodeGenerator and XmlSerializationWriterInterpreter will no longer serialize an attribute named {V} if its object has a method named ShouldSerialize{V}() that returns false.
{V}Specified now is also checked to be true before serializating the attribute even if it is a property that is not settable.
Fixes #1852.
2014-09-15 13:02:00 +01:00
Marcos Henrich 17ad50a165 Added test for optional {V}Specified and ShouldSerialize{V}.
{V}Specified is a property or field and ShouldSerialize{V} is a method that can be set to false if we do not want to serialize an attribute with name {V}.
2014-09-15 13:02:00 +01:00
Marcos Henrich 1ec4bd5c26 Fixed NullReferenceException. 2014-09-15 13:01:04 +01:00
Marek Safar 7439e997ac [xbuild] Use ToolPath when building ToolTask execution path. Fixes #22981 2014-09-15 13:38:40 +02:00
Alexander Köplinger d77664ceb0 [System] Add performanceCounters element to System.Diagnostics app.config configuration section
See http://msdn.microsoft.com/en-us/library/ms229387(v=vs.110).aspx for details about the element.
The value that is set by the element isn't currently used in Mono, but applications using it in their app.config crash otherwise (e.g. http://stackoverflow.com/questions/25741651).
2014-09-14 07:45:11 +02:00
Marc-Andre Ferland 8b9c60075f Missing Args checks. 2014-09-14 00:28:33 -04:00
Marc-Andre Ferland 6354f74888 Missing setting disposed to true 2014-09-14 00:27:25 -04:00
Zoltan Varga 777f69153c [runtime] Remove an unused interpreter file. 2014-09-13 13:59:03 -04:00
Marek Safar 7f2825301e [mcs] nullable property pattern 2014-09-13 12:43:41 +02:00
Zoltan Varga a1f58d35be [runtime] Fix the windows build. Define _WINSOCKAPI_ to fix the compilation problems when windows.h is included before winsock2.h: http://stackoverflow.com/questions/1372480/c-redefinition-header-files. 2014-09-12 20:07:05 -04:00
Joel Martinez 6c1bf0d17e [mdoc] consolidated dropns and dropns-assemblies into a single parameter.
Based on pull request feedback, this is a simpler usage, and meets our required use-case. A sample version of this parameter would be: `--dropns MyUnifiedAssembly=MyDroppedPrefix`
2014-09-12 17:22:06 -04:00
Rodrigo Kumpera a8392ba567 [runtime] Improve thread dumping reliability by doing it while holding the fat locks.
We take the loader and the root domain locks before doing a thread dump. This reduces the odds
of us suspending a thread that holds either of them and deadlocking, for example, while decoding
AOT JIs.
2014-09-12 14:18:39 -04:00
Neale Ferguson f065a289f6 Maximum large object size should be limited by SSIZE_MAX not SIZE_MAX.
The latter appears to be a hangover from 32-bit systems.
2014-09-12 11:37:52 -04:00
Neale Ferguson 3f740f3d94 Fixes 19752 -
Users have been complaining about strange errors arising when using the OracleClient classes.
I have tracked it down to the OciDefineHandle and OciDefineByPos calls, and OracleParameter
handling of amanged objects by unmanaged code. Currently two of the parameters passed to the
above OCI  call are short variables. They are passed as "ref" fields as Oracle uses their
address to put size and indicator data once the data is fetched. However, being defined as
short means that they are eligible for being moved during garbage collection. Thus if that
field is moved between the OciDefineByPos call and the fetch of the data then what Oracle is
pointing to may no longer be variable. I'm thinking it may be better to define these fields as
IntPtr and allocate them and retrieve their values via Marshal.ReadInt16. As for OracleParameter,
it uses a managed object "indicator" that is also used in a similar way. This reference is replaced
by a IntPtr and a get/set method to access the contents.
2014-09-12 11:25:57 -04:00
Marek Safar 300876b229 [mcs] Don't use `1 naming for compiler generated second level and deeper nested types. Fixes #22893 2014-09-12 15:20:26 +02:00
Zoltan Varga 7f6a46403d Merge pull request #1276 from Therzok/master
Add concurrent hashtable test to gitignore.
2014-09-11 20:58:12 -04:00
Zoltan Varga f0d2ee46f8 Merge pull request #1275 from ranma42/fix-lib64
Fix build with lib64 folder for arch-specific libraries
2014-09-11 20:57:48 -04:00
Sebastien Pouliot 90bb9c6d00 [System] Fix building unit tests under the mobile profile 2014-09-11 20:43:21 -04:00
Zoltan Varga 41339d95c6 [jit] Always pass the imt arg to interface calls in gsharedvt methods. Fixes #22624. 2014-09-11 17:57:11 -04:00
Joel Martinez c842249d72 [mdoc] Formatting feedback from pull #1273 2014-09-11 15:43:28 -04:00
Marek Safar 9fd3c7ac4b [mcs] property pattern 2014-09-11 19:40:51 +02:00
Rolf Bjarne Kvinge 550d314e51 Don't throw TimeZoneNotFoundExceptions when iOS gives us invalid data.
iOS 8 GM lists "Asia/Chita" among its time zones, but when requesting
the time zone data for that time zone, no data is returned.

With this change we ignore time zones without any data when fetching
all the timezones on the system.
2014-09-11 19:04:00 +02:00
Marek Safar 0083728e19 Merge pull request #1278 from esdrubal/datetimegmt
GMT DateTimeOffset is now properly parsed.
2014-09-11 05:29:27 -09:00
Marcos Henrich e73499b337 GMT DateTimeOffset is now properly parsed. Fixes #22851.
GMT date formats set useutc to true, so now useutc is checked to init DateTimeOffset with a zero offset.
2014-09-11 15:12:36 +01:00
Marcos Henrich b818408b16 Test that offset is zero when date ends with GMT. Covers #22851. 2014-09-11 15:11:42 +01:00
Marek Safar b946785022 Merge pull request #1277 from esdrubal/calendarsdaysinyear
Improved CalendricalCalculations fixed_from_dmy methods.
2014-09-11 03:17:52 -09:00
Marcos Henrich 468160e712 Improved CalendricalCalculations fixed_from_dmy methods. Fixes #21930.
In some cases fixed_from_dmy is used with the month parameter greater than the number of months of that year.
Year is now incremented until month parameter is valid.
2014-09-11 12:54:36 +01:00
Marcos Henrich da04211894 Test Calendar.DaysInYear. Covers #21930. 2014-09-11 12:53:25 +01:00
Ungureanu Marius 924a954d1f Add concurrent hashtable test to gitignore. 2014-09-11 13:39:57 +03:00
Marek Safar 1242b4b82c [corlib] Enumerate all subdirectories including the first one. Fixes #22857 2014-09-11 11:20:44 +02:00
Marek Safar 1eb9ba45c4 [system] Fixes failing test 2014-09-11 10:31:26 +02:00
Andrea Canciani d2f391c80c Do not hardcode lib path
The changes from 3408b8e5f1 cause
regressions in distros which do not use lib as folder for
arch-specific libraries, like Fedora x86_64.

Instead, reloc_libdir should be used (as in data/mono.pc.in).

This change is released under the MIT/X11 license.
2014-09-11 08:50:47 +02:00
Zoltan Varga 2c11b2ea4a [aot] Avoid a stack overflow if profiler enter-leave events are requested in the full-aot mode. 2014-09-10 19:14:57 -04:00
Zoltan Varga 7912295bc9 [runtime] Fix the RESOLTION_SCOPE->RESOLUTION_SCOPE typo. 2014-09-10 19:07:04 -04:00
Joel Martinez 582b370761 [mdoc] added -dropns-assemblies parameter.
Will now only replace the namespace when the type or member is in a listed assembly
2014-09-10 16:54:54 -04:00
Zoltan Varga d3624fa257 [runtime] Redirect runtime logging to asl_log only on ios, not when running the cross compiler. 2014-09-10 14:24:11 -04:00
Marek Safar 1d63659429 Merge pull request #1271 from akoeplinger/fix-switch-ctor
[System] Fixed Diagnostics.Switch ctor behavior for null parameters
2014-09-10 08:19:20 -09:00
Alexander Köplinger 29abf6790d [System] Fixed Diagnostics.Switch ctor behavior for null parameters
Passing null to the displayName or description ctor parameter on MS.NET makes them equal to an empty string.
Fixed the Mono behavior to match .NET.
2014-09-10 19:09:34 +02:00
Marek Safar 6d07ad8e7a [system.net.http] Encode ContentDisposition name. Fixes #18422 2014-09-10 19:09:27 +02:00
Marek Safar 9050d9cba1 [mcs] Remove value type constrained type parameter instantiation optimization to handle parameterless struct constructors 2014-09-10 19:09:27 +02:00
Marek Safar 156c7cf97a Merge pull request #1270 from esdrubal/xmlimplicit
When needed serialized objects are now implicitly converted.
2014-09-10 08:08:26 -09:00
Marcos Henrich f8ff518ebe When needed serialized objects are now implicitly converted.
Fixes #20403.
2014-09-10 17:25:44 +01:00
Marcos Henrich 5fdbad2444 Changed method ImplicitConvert to internal static. 2014-09-10 17:24:38 +01:00
Marcos Henrich 0804720aaa ImplicitConvert was using method with wrong parameter and return type. 2014-09-10 17:23:44 +01:00
Marcos Henrich f008d4afb6 Test XmlSerialization of element that requires implicit conversion.
Covers #20403.
2014-09-10 16:30:03 +01:00
Martin Baulig bbbcc73bde [websocket]: Fix ClientWebSocket.ReceiveAsync() with small buffer; bug #22704.
When calling ClientWebSocket.ReceiveAsync() with a buffer that's smaller than
the received chunk, we need to cache the header until next call.
2014-09-10 17:09:43 +02:00
Alexander Köplinger 0537cb3c2a Fix the build 2014-09-10 14:26:36 +02:00
Marek Safar 95b09a1a79 Merge pull request #1269 from Therzok/refactorSwitches
[SourceSwitch] Refactor a piece of code.
2014-09-10 02:01:15 -09:00
Marius Ungureanu 6e5e8d7915 Fix build failure caused by #1267. 2014-09-10 13:59:49 +03:00
Marius Ungureanu 462c6b08e9 [SourceSwitch] Refactor a piece of code. 2014-09-10 13:04:10 +03:00
Marek Safar ebe2a3df1d [system.net.http] Handle Content-Disposition in textual form as well. 2014-09-10 09:48:26 +02:00
Marek Safar 5846c52247 Merge pull request #1267 from ramtinkermani/master
The ShouldTrace method's conditions are fixed to correctly trace the events based...
2014-09-09 20:40:10 -09:00
ramtin 6cb9a04fca Unit Tests for SourceSwitch. Counting the number of events traced based on the Trace Level 2014-09-09 15:07:14 -07:00
Marek Safar 5e9eba8ffb [system.net.http] Tokenize dash only in range values. Fixes #22764 2014-09-09 23:41:49 +02:00
Rodrigo Kumpera 65f17c2c26 [jit] Fix error handling in a few places in the jit. 2014-09-09 16:34:55 -04:00
Rodrigo Kumpera 00f631312f [runtime] Fix error handling in mono_metadata_parse_mh_full. 2014-09-09 16:34:54 -04:00
Rodrigo Kumpera 666ea5f867 [runtime] Update reflection.c to use mono_class_get_checked. 2014-09-09 16:34:54 -04:00
Rodrigo Kumpera 3bbedfebb7 [runtime] Update marshal.c to use mono_class_get_checked. 2014-09-09 16:34:54 -04:00
Rodrigo Kumpera a17da53c37 [runtime] Cleanup usage of mono_class_get to object.c 2014-09-09 16:34:54 -04:00
Rodrigo Kumpera 6382fd247d [runtime] Cleanup usage of mono_class_get in loader.c 2014-09-09 16:34:54 -04:00
Rodrigo Kumpera a94aa47cd8 [runtime] Make icall use mono_class_get_checked. 2014-09-09 16:34:53 -04:00
Rodrigo Kumpera ec7be0fd36 [utils] Add mono_error_convert_to_exception. 2014-09-09 16:34:53 -04:00
Rodrigo Kumpera 4b726a17b8 Introduce mono_class_from_name_case_checked 2014-09-09 16:34:53 -04:00
Rodrigo Kumpera 7dd6476b8e [runtime] Use MonoError in exception.c 2014-09-09 16:34:53 -04:00
Rodrigo Kumpera 2ed68d65e8 [runtime] Change mono_type_get_full to use MonoError properly. 2014-09-09 16:34:53 -04:00
Rodrigo Kumpera 3968beaced [runtime] Introduce MonoError to mono_type_create_from_typespec. 2014-09-09 16:34:52 -04:00
Rodrigo Kumpera 5fa8e1abe7 [runtime] Plug MonoError into another function. 2014-09-09 16:34:52 -04:00
Rodrigo Kumpera 6d60ff581c [runtime] Introduce MonoError to mono_class_get_full.
Introduce MonoError into callers of mono_class_get_full.

Make mono_class_get not abort on failure until all callers are fixed.
2014-09-09 16:34:52 -04:00
Rodrigo Kumpera 5c8ab13f0c Add mono_class_get_checked to mono_class_create_from_typedef. 2014-09-09 16:34:52 -04:00
Rodrigo Kumpera 32e2bb7c39 [runtime] Change mono_type_get_full to use mono_class_get_checked. 2014-09-09 16:34:52 -04:00
Rodrigo Kumpera a824dde30f [runtime] Change do_mono_metadata_parse_type to use mono_class_get_checked 2014-09-09 16:34:51 -04:00
Rodrigo Kumpera 3ee5d36ec7 [runtime] Introduce mono_class_get_checked. 2014-09-09 16:34:51 -04:00
Rodrigo Kumpera 57cce937d8 [runtime] Introduce mono_class_from_typeref_checked and replace usage of the old one with it.
This is another step into wiring up MonoError into the typeloading codebase. This is
one more function that needs it.
2014-09-09 16:34:51 -04:00
Rodrigo Kumpera efa5a5ad17 [utils] Add mono_error_set_assembly_load_simple to ease producing an error message for ref only assemblies. 2014-09-09 16:34:51 -04:00
Rodrigo Kumpera 82c38c4409 [metadata] Replace mono_class_get_full with a saner pair of mono_class_get and mono_class_inflate_generic_class_checked. 2014-09-09 16:34:51 -04:00
Rodrigo Kumpera d3da468965 [runtime] Expose mono_class_inflate_generic_class_checked to the internal API. 2014-09-09 16:34:50 -04:00
Rodrigo Kumpera 2006bf3f44 Add deprecation notice for mono_class_get_full. 2014-09-09 16:34:50 -04:00
ramtin 59be7ba9c5 The ShouldTrace conditions are fixed to correctly trace the events based on the Level 2014-09-09 11:50:06 -07:00
Marcos Henrich bb296086c0 TimeFormat "zzz" is only valid after a date. 2014-09-09 17:44:00 +01:00
Marek Safar ccbd0b1a0d Merge pull request #1266 from esdrubal/datetimenewformat
Added time format with only offset.
2014-09-09 05:29:34 -09:00
Rodrigo Kumpera a27d7ee86d Merge pull request #1248 from kumpera/kill_the_interpreter
[runtime] Remove the interpreter.
2014-09-09 09:15:01 -04:00
Rodrigo Kumpera 8602eed8f7 [cleanup] Remove more old files. 2014-09-09 09:14:37 -04:00
Marcos Henrich a27a42b99b Added time format with only offset. Fixes #22558. 2014-09-09 12:49:00 +01:00
Marcos Henrich cf7319008b Test DateTimeOffset.Parse with format yyyy-dd-MMzzz. Covers #22558. 2014-09-09 12:41:27 +01:00
Jo Shields 4f8114aabd Fix "make dist" error
ad8236ebb8 broke "make dist", by removing Makefile.am.in whilst leaving it in EXTRA_DIST
2014-09-09 11:30:52 +01:00
Ludovic Henry 749171e917 [sgen] Tweak internal class allocator sizes to add highly used on
We observed on multiples benchmarks that most internal allocations are for 8, 16, 296 (32bits), 328 (64bits), 504 (32bits) and 1016 (64bits) bytes of memory. To minimize waste, we added these memory sizes to the default allocator sizes.
2014-09-09 11:16:09 +02:00
Atsushi Eno 2b72c6bdf2 [aspnet/ajax] fix bug #6512 (by Mikkel Kruse Johnsen) - don't deserialize GET parameters. 2014-09-09 15:09:27 +08:00
Zoltan Varga c8e73660db Merge pull request #1263 from madewokherd/begindecls
Use G_BEGIN_DECLS instead of __BEGIN_DECLS.
2014-09-08 22:40:43 -04:00
Joel Martinez dc17504d3f [mdoc] New make test, reproduces issue with --dropns when run with a secondary assembly that doesn't drop the specified namespace 2014-09-08 20:45:16 -04:00
Zoltan Varga 4373bd213a [aot] Really fix the aot-cache logging. Rework how mscorlib is handled in the aot cache. 2014-09-08 20:25:49 -04:00
Zoltan Varga f574898b09 [aot] Fix a crash in the aot cache code if MONO_LOG_LEVEL is set. 2014-09-08 20:01:21 -04:00
Zoltan Varga ceb74f4118 Merge pull request #1264 from madewokherd/vasprintf
Avoid use of vasprintf.
2014-09-08 18:49:55 -04:00
Joel Martinez 41c28a59bb [mdoc] New make test for the --dropns functionality 2014-09-08 17:54:05 -04:00
Vincent Povirk 83924ebb2c Avoid use of vasprintf.
This is not available on mingw-w64, and the extra allocation is unnecessary.

This commit licensed as MIT/X11.
2014-09-08 15:48:20 -05:00
Vincent Povirk 3c920be3e5 Use G_BEGIN_DECLS instead of __BEGIN_DECLS.
__BEGIN_DECLS isn't available in mingw-w64.

This commit licensed as MIT/X11.
2014-09-08 13:54:48 -05:00
Marek Safar 27b3636cef Merge pull request #1262 from esdrubal/uriserializationinfo
Added support for UriComponents.SerializationInfoString.
2014-09-08 05:40:33 -09:00
Marcos Henrich ea6b8960d0 Added support for UriComponents.SerializationInfoString. Fixes #21571. 2014-09-08 22:21:02 +08:00
Marcos Henrich d2d338fe26 Test UriComponents.SerializationInfoString. Covers #21571. 2014-09-08 22:09:52 +08:00
Marek Safar 4bd9820eaa Merge pull request #1253 from esdrubal/datetimeiso8601
DateTime.Parse now handles unlimited number of fractional digits.
2014-09-08 03:52:54 -09:00
Marek Safar 14f56f6aea [system.numerics] Unify handling of default ctor and zero. Fixes #22591 2014-09-08 14:50:39 +02:00
Marek Safar 88bc5cee97 [mcs] switch statement with recursive pattern matching 2014-09-08 11:48:52 +02:00
Marek Safar 92ff3c372d [system.net.http] Make SendAsync state free to handle recursive calls. Fixes #22724 2014-09-08 11:48:51 +02:00
Rodrigo Kumpera 128f297b84 Merge pull request #1260 from khellang/patch-2
Added less media type
2014-09-07 12:26:57 -04:00
Rodrigo Kumpera 247bf1f21c Merge pull request #1259 from khellang/patch-1
Updated WOFF to official media type
2014-09-07 12:26:37 -04:00
Kristian Hellang d595c66bbd Added less media type 2014-09-07 17:24:37 +02:00
Kristian Hellang 788c95a0e0 Updated WOFF to official media type
See http://www.w3.org/TR/WOFF/#appendix-b for the media type registration
2014-09-07 17:19:42 +02:00
Marek Safar e207bf76ab Merge pull request #1258 from akoeplinger/unify-test-namespaces
Cleanup namespace names of class lib tests to follow convention
2014-09-06 21:25:38 -09:00
Zoltan Varga f8365f7900 [gsharedvt] Allow the SIZEOF opcode in gsharedvt code if it doesn't reference a gsharedvt type. Fixes #22711. 2014-09-06 00:38:38 -04:00
Marcos Henrich 1852905c44 Test that wrong ISO8601 dates throw FormatException. 2014-09-05 21:31:53 +08:00
Alexander Köplinger ddcfc42070 Cleanup namespace names of class lib tests to follow convention
A couple of the test suites didn't follow the MonoTests.<namespace of class under test> naming convention for the namespace.
2014-09-04 18:55:58 +02:00
Marcos Henrich db57c23c29 DateTime.Parse now handles unlimited number of fractional digits.
This change was made because .NET can parse ISO8601 format with an unlimited number of fractional digits.
Fixes #22417.
2014-09-03 18:29:58 +08:00
Marcos Henrich 17972cec4f Added test ISO8601FractionalDigits.
Covers #22417.
2014-09-03 18:27:28 +08:00
Rodrigo Kumpera 6bee6a7b18 [runtime] Remove the interpreter. 2014-09-01 13:27:03 -04:00
Stephen McConnel 44acb717d8 Fix scrolling in SWF.ListView.EnsureVisible(int index)
This fixes https://bugzilla.xamarin.com/show_bug.cgi?id=22483
2014-08-29 12:25:48 -05:00
Marcos Henrich 8e9da60e99 KeyPairPresistence now tries to fix folder permissions.
An exception is no longer thrown if the folder permissions can be fixed.
Fixes bug 19274.
2014-08-12 19:08:37 +01:00
Reuben Bond eeac252404 Test ClientWebSocket.SendAsync EndOfMessage 2014-06-21 14:57:56 +10:00
Reuben Bond bbbe1e52d3 ClientWebSocket: SendAsync endOfMessage inverted.
endOfMessage should indicate whether or not additional message parts will follow the current one. Currently, the meaning in ClientWebSocket.cs is inverted: !endOfMessage indicates that no more parts will follow the current one.

See the WebSockets RFC, 'frame-fin' at the top of http://tools.ietf.org/html/rfc6455#page-31.
Also see the MSDN docs for SendAsync: http://msdn.microsoft.com/en-us/library/system.net.websockets.websocket.sendasync(v=vs.110).aspx
2014-06-20 16:48:36 +10:00
MarkS 707051b342 [MWF] Partially implement Help.ShowHelp 2014-03-17 12:30:16 +01:00
Eberhard Beilharz 2d420bfb7a Set ErrorInfo in Marshal.GetHRForException
Marshal.GetHRForException had a MonoTODO because it needs to set
the errorinfo object so that exceptions get properly passed to
unmanaged code. Since not all managed exceptions have a corresponding
HR value but we might need to get to the original thrown exception
we implement a ManagedErrorInfo helper class that implements the
IErrorInfo interface but also stores the exception.

In GetExceptionForHR we check if the errorinfo we get is a
ManagedErrorInfo. If it is we return the exception stored in there
(if it converts to the same error code), otherwise we construct a new
exception.
2014-03-13 18:55:39 +01:00
Eberhard Beilharz 554d6abf4c Properly convert COM error codes to C# exceptions
Also use additional information provided by IErrorInfo to fill in
exception details.

To make use of IErrorInfo on Linux a suitable implementation has to be
provided, e.g. by including libcom plus adding a mapping from
oleauth32.dll to the shared library that provides the implementation.

This completes mono bug 496138
(https://bugzilla.novell.com/show_bug.cgi?id=496138)
2014-03-13 18:53:57 +01:00
798 changed files with 21275 additions and 24778 deletions

No files matched your search

+3
View File
@@ -25,3 +25,6 @@
[submodule "external/ikdasm"]
path = external/ikdasm
url = git://github.com/mono/ikdasm.git
[submodule "external/referencesource"]
path = external/referencesource
url = git://github.com/mono/referencesource
+2 -2
View File
@@ -5,7 +5,7 @@ When contributing to the Mono project, please follow the [Mono Coding
Guidelines][1]. We have been using a coding style for many years,
please make your patches conform to these guidelines.
[1] http://www.mono-project.com/Coding_Guidelines
[1] http://www.mono-project.com/community/contributing/coding-guidelines/
Etiquette
=========
@@ -68,7 +68,7 @@ status of your pull request. If it succeeded and we like the changes,
a maintainer will likely merge it. Otherwise, you can amend your pull
request to fix build breakage and Jenkins will test it again.
[2] http://monojenkins.cloudapp.net
[2] http://jenkins.mono-project.com/
# Inactivity
-4
View File
@@ -494,16 +494,12 @@ Directory Roadmap
* `dis/` - CIL executable Disassembler
* `cli/` - Common code for the JIT and the interpreter.
* `io-layer/` - The I/O layer and system abstraction for
emulating the .NET IO model.
* `cil/` - Common Intermediate Representation, XML
definition of the CIL bytecodes.
* `interp/` - Interpreter for CLI executables (obsolete).
* `arch/` - Architecture specific portions.
* `man/` - Manual pages for the various Mono commands and programs.
+1 -1
View File
@@ -26,7 +26,7 @@ i?86-*-linux*|i?86-apple-darwin*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-li
|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*|sparc*-*-linux*|mips*-*-linux*|x86_64-apple-darwin*|aarch64*)
pic_options='-fPIC'
;;
?86-pc-cygwin*|i?86-pc-cygwin*)
?86-pc-cygwin*|i?86-pc-cygwin*|i?86-pc-mingw32*)
pic_options='-DDLL_EXPORT'
;;
i?86-apple-darwin*|arm-apple-darwin*)
+98
View File
@@ -0,0 +1,98 @@
#
# Appveyor configuration file for CI build of Mono on Windows (under Cygwin)
#
# For further details see http://www.appveyor.com
#
# Use 'unstable' Appveyor build worker image as Appveyor have added Cygwin to this for us
os: Unstable
#
# Custom environment variables
#
environment:
global:
CYG_ROOT: C:/cygwin
CYG_MIRROR: http://cygwin.mirror.constant.com
CYG_CACHE: C:/cygwin/var/cache/setup
NSIS_ROOT: C:\nsis
#
# Initialisation prior to pulling the Mono repository
#
init:
- 'echo Building Mono for Windows'
- 'echo System architecture: %PLATFORM%'
- 'echo Repo build branch is: %APPVEYOR_REPO_BRANCH%'
- 'echo Build folder is: %APPVEYOR_BUILD_FOLDER%'
# Attempt to ensure we don't try to convert line endings to Win32 CRLF as this will cause build to fail
- 'git config --global core.autocrlf input'
#
# Install needed build dependencies
#
install:
# NOTE: Already installed on current Appveyor unstable image
# - 'echo Retrieving Cygwin'
# - 'appveyor DownloadFile http://cygwin.com/setup-x86.exe -FileName %CYGROOT%/setup-x86.exe'
- 'echo Setting up Cygwin dependencies'
- '%CYG_ROOT%\setup-x86.exe -qnNdO -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_CACHE%" -P autoconf -P automake -P bison -P gcc-core -P gcc-g++ -P mingw-runtime -P mingw-binutils -P mingw-gcc-core -P mingw-gcc-g++ -P mingw-pthreads -P mingw-w32api -P libtool -P make -P python -P gettext-devel -P gettext -P intltool -P libiconv -P pkg-config -P git -P wget -P curl > NUL'
- 'echo Check Cygwin setup'
- '%CYG_ROOT%/bin/bash -lc "cygcheck -dc cygwin"'
- 'echo Done setting up Cygwin'
- 'echo Retrieving NSIS'
- 'appveyor DownloadFile "http://sunet.dl.sourceforge.net/project/nsis/NSIS 2/2.46/nsis-2.46-setup.exe" -FileName nsissetup.exe'
- 'echo Setting up NSIS'
- 'nsissetup.exe /S /D=%NSIS_ROOT%'
- 'echo Done setting up NSIS'
#
# NOTE: msbuild doesn't work at present so use Cygwin to build
#
#build:
# project: C:\projects\mono\msvc\mono.sln
# verbosity: detailed
# Cygwin build script
#
# NOTES:
#
# The stdin/stdout file descriptor appears not to be valid for the Appveyor
# build which causes failures as certain functions attempt to redirect
# default file handles. Ensure a dummy file descriptor is opened with exec.
#
build_script:
- cmd: 'echo Cygwin root is: %CYG_ROOT%'
- cmd: 'echo Build folder is: %APPVEYOR_BUILD_FOLDER%'
- cmd: 'echo Repo build branch is: %APPVEYOR_REPO_BRANCH%'
- cmd: 'echo Repo build commit is: %APPVEYOR_REPO_COMMIT%'
- cmd: 'echo Autogen running...'
- cmd: '%CYG_ROOT%/bin/bash -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; NOCONFIGURE=1 ./autogen.sh --prefix=/usr/local --with-preview=yes"'
- cmd: 'echo Configure running...'
- cmd: '%CYG_ROOT%/bin/bash -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; ./configure --host=i686-pc-mingw32"'
- cmd: 'echo Pulling monolite latest...'
- cmd: '%CYG_ROOT%/bin/bash -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; make get-monolite-latest"'
- cmd: 'echo Make running...'
- cmd: '%CYG_ROOT%/bin/bash -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; make"'
- cmd: 'echo Installing...'
- cmd: 'mkdir %APPVEYOR_BUILD_FOLDER%\install'
- cmd: '%CYG_ROOT%/bin/bash --login -lc "export CYGWIN=winsymlinks:native; mount \"$APPVEYOR_BUILD_FOLDER\install\" /usr/local; cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; make install; umount /usr/local"'
# - cmd: 'echo Building package...'
# - cmd: 'cd %APPVEYOR_BUILD_FOLDER%'
# - cmd: '%NSIS_ROOT%\makensis /DMILESTONE=%APPVEYOR_REPO_BRANCH% /DSOURCE_INSTALL_DIR=%APPVEYOR_BUILD_FOLDER\install\*.* /DBUILDNUM=%APPVEYOR_BUILD_VERSION% monowiz.win32.nsi'
# - cmd: 'Building distribution...'
# - cmd: '%CYG_ROOT%/bin/bash -lc "export CYGWIN=winsymlinks:native; cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; make dist"'
#
# Disable tests for now
#
test: off
#
# NOTE: Currently this is the Mono installation tree. In future we will create an installation package artifact.
# It has to be relative to the project path. Thus we have installed to within the build tree.
#
artifacts:
- path: install
name: mono-binaries
type: zip
+28 -68
View File
@@ -1,7 +1,7 @@
# Process this file with autoconf to produce a configure script.
#AC_PREREQ([2.62])
AC_INIT(mono, [3.10.1],
AC_INIT(mono, [3.12.1],
[http://bugzilla.xamarin.com/enter_bug.cgi?classification=Mono])
AC_CONFIG_SRCDIR([README.md])
@@ -115,9 +115,9 @@ case "$host" in
AC_DEFINE(MINGW_CROSS_COMPILE,1,[Cross-compiling using MinGW])
fi
HOST_CC="gcc"
# Windows 2000 is required that includes Internet Explorer 5.01
# Windows XP SP2 is required
CPPFLAGS="$CPPFLAGS -DWINVER=0x0502 -D_WIN32_WINNT=0x0502 -D_WIN32_IE=0x0501 -D_UNICODE -DUNICODE -DWIN32_THREADS -DFD_SETSIZE=1024"
LDFLAGS="$LDFLAGS -lmswsock -lws2_32 -lole32 -loleaut32 -lpsapi -lversion -ladvapi32 -lwinmm -lkernel32"
LDFLAGS="$LDFLAGS -lmswsock -lws2_32 -lole32 -loleaut32 -lpsapi -lversion -ladvapi32 -lwinmm -lkernel32 -liphlpapi"
libmono_cflags="-mms-bitfields -mwindows"
libmono_ldflags="-mms-bitfields -mwindows"
libdl=
@@ -578,6 +578,7 @@ else
fi
CFLAGS="$CFLAGS -g $WARN"
CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -g"
CPPFLAGS="$CPPFLAGS -g $WARN"
# Where's the 'mcs' source tree?
if test -d $srcdir/mcs; then
@@ -767,7 +768,7 @@ 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, appdomains, verifier,
reflection_emit, reflection_emit_save, large_code, logging, com, ssa, generics, attach, jit, simd, soft_debug, perfcounters, normalization, assembly_remapping, shared_perfcounters, remoting,
security, sgen_remset, sgen_marksweep_par, sgen_marksweep_fixed, sgen_marksweep_fixed_par, sgen_copying.],
security, sgen_remset, sgen_marksweep_par, sgen_marksweep_fixed, sgen_marksweep_fixed_par, sgen_copying, shared_handles.],
[
for feature in `echo "$enable_minimal" | sed -e "s/,/ /g"`; do
eval "mono_feature_disable_$feature='yes'"
@@ -941,6 +942,11 @@ if test "x$mono_feature_disable_sgen_copying" = "xyes"; then
AC_MSG_NOTICE([Disabled major=copying support in SGEN.])
fi
if test "x$mono_feature_disable_shared_handles" = "xyes"; then
AC_DEFINE(DISABLE_SHARED_HANDLES, 1, [Disable inter-process shared handles])
AC_SUBST(DISABLE_SHARED_HANDLES)
fi
AC_ARG_ENABLE(executables, [ --disable-executables disable the build of the runtime executables], enable_executables=$enableval, enable_executables=yes)
AM_CONDITIONAL(DISABLE_EXECUTABLES, test x$enable_executables = xno)
@@ -1194,7 +1200,7 @@ if test x$target_win32 = xno; then
AC_CHECK_HEADERS(execinfo.h)
AC_CHECK_HEADERS(sys/auxv.h)
AC_CHECK_HEADERS(sys/auxv.h sys/resource.h)
AC_CHECK_FUNCS(getgrgid_r)
AC_CHECK_FUNCS(getgrnam_r)
@@ -1213,6 +1219,7 @@ if test x$target_win32 = xno; then
AC_CHECK_FUNCS(dl_iterate_phdr)
AC_CHECK_FUNCS(dladdr)
AC_CHECK_FUNCS(sysconf)
AC_CHECK_FUNCS(getrlimit)
AC_CHECK_FUNCS(sched_setaffinity)
AC_CHECK_FUNCS(sched_getcpu)
@@ -2282,6 +2289,7 @@ if test "x$ac_cv_have_dev_random" = "xno" \
fi
AC_MSG_CHECKING([if inter-process shared handles are requested])
# Same as --enable-minimal=shared_handles
AC_ARG_ENABLE(shared-handles, [ --disable-shared-handles disable inter-process shared handles], try_shared_handles=$enableval, try_shared_handles=yes)
AC_MSG_RESULT($try_shared_handles)
if test "x$try_shared_handles" != "xyes"; then
@@ -2452,8 +2460,6 @@ if test "x$enable_llvm" = "xyes"; then
# Should be something like '2.6' or '2.7svn'
llvm_version=`$LLVM_CONFIG --version`
major_version=`echo $llvm_version | cut -c 1`
minor_version=`echo $llvm_version | cut -c 3`
llvm_api_version=`$LLVM_CONFIG --mono-api-version 2>/dev/null`
AC_MSG_CHECKING(LLVM version)
AC_MSG_RESULT($llvm_version)
@@ -2474,14 +2480,8 @@ if test "x$enable_llvm" = "xyes"; then
AC_MSG_ERROR([Compiling with stock LLVM is not supported, please use the Mono LLVM repo at https://github.com/mono/llvm, with the GIT branch which matches this version of mono, i.e. 'mono-2-10' for Mono 2.10.])
fi
AC_DEFINE_UNQUOTED(LLVM_MAJOR_VERSION, $major_version, [Major version of LLVM libraries])
AC_DEFINE_UNQUOTED(LLVM_MINOR_VERSION, $minor_version, [Minor version of LLVM libraries])
AC_DEFINE_UNQUOTED(LLVM_VERSION, "$llvm_version", [Full version of LLVM libraties])
# Have to pass these on the command line since mini-llvm-cpp.h already includes
# llvm's config.h
LLVM_CXXFLAGS="$LLVM_CXXFLAGS -DLLVM_MAJOR_VERSION=$major_version -DLLVM_MINOR_VERSION=$minor_version"
AC_SUBST(LLVM_CFLAGS)
AC_SUBST(LLVM_CXXFLAGS)
AC_SUBST(LLVM_LIBS)
@@ -2498,8 +2498,6 @@ AM_CONDITIONAL(LOADED_LLVM, [test x$enable_loadedllvm = xyes])
TARGET="unknown"
ACCESS_UNALIGNED="yes"
JIT_SUPPORTED=no
INTERP_SUPPORTED=no
LIBC="libc.so.6"
INTL="libc.so.6"
SQLITE="libsqlite.so.0"
@@ -2512,7 +2510,6 @@ XINERAMA="libXinerama.so.1"
sizeof_register="SIZEOF_VOID_P"
jit_wanted=true
interp_wanted=false
sgen_supported=false
boehm_supported=true
case "$host" in
@@ -2521,7 +2518,6 @@ case "$host" in
arch_target=mips;
sgen_supported=true
ACCESS_UNALIGNED="no"
JIT_SUPPORTED=yes
AC_MSG_CHECKING(for mips n32)
AC_TRY_COMPILE([],[
@@ -2539,7 +2535,6 @@ case "$host" in
i*86-*-*)
TARGET=X86;
arch_target=x86;
JIT_SUPPORTED=yes
case $host_os in
solaris*)
LIBC="libc.so"
@@ -2585,7 +2580,6 @@ case "$host" in
x86_64-*-* | amd64-*-*)
TARGET=AMD64;
arch_target=amd64;
JIT_SUPPORTED=yes
if test "x$ac_cv_sizeof_void_p" = "x4"; then
AC_DEFINE(__mono_ilp32__, 1, [64 bit mode with 4 byte longs and pointers])
sizeof_register=8
@@ -2617,7 +2611,6 @@ case "$host" in
TARGET=IA64
arch_target=ia64
ACCESS_UNALIGNED="no"
JIT_SUPPORTED=yes
LIBC="libc.so.6.1"
INTL="libc.so.6.1"
AC_CHECK_LIB(unwind, _U_dyn_register, [], [AC_MSG_ERROR(library libunwind not found)])
@@ -2630,7 +2623,6 @@ case "$host" in
TARGET=SPARC
fi
arch_target=sparc;
JIT_SUPPORTED=yes
ACCESS_UNALIGNED="no"
case $host_os in
linux*) ;;
@@ -2663,7 +2655,6 @@ case "$host" in
CPPFLAGS="$CPPFLAGS -D__mono_ppc__"
fi
arch_target=ppc;
JIT_SUPPORTED=yes
case $host_os in
linux*|darwin*)
sgen_supported=true
@@ -2674,7 +2665,6 @@ case "$host" in
TARGET=ARM;
arch_target=arm;
ACCESS_UNALIGNED="no"
JIT_SUPPORTED=yes
CPPFLAGS="$CPPFLAGS -D__ARM_EABI__"
sgen_supported=true
;;
@@ -2682,7 +2672,6 @@ case "$host" in
TARGET=ARM;
arch_target=arm;
ACCESS_UNALIGNED="no"
JIT_SUPPORTED=yes
sgen_supported=true
AOT_SUPPORTED="yes"
CPPFLAGS="$CPPFLAGS -D__ARM_EABI__"
@@ -2692,7 +2681,6 @@ case "$host" in
# TARGET=ARM;
# arch_target=arm;
# ACCESS_UNALIGNED="no"
# JIT_SUPPORTED=yes
# sgen_supported=true
# AOT_SUPPORTED="no"
# ;;
@@ -2700,7 +2688,6 @@ case "$host" in
# https://lkml.org/lkml/2012/7/15/133
TARGET=ARM64
arch_target=arm64
JIT_SUPPORTED=yes
sgen_supported=true
boehm_supported=false
;;
@@ -2708,7 +2695,6 @@ case "$host" in
TARGET=S390X;
arch_target=s390x;
ACCESS_UNALIGNED="yes"
JIT_SUPPORTED=yes
sgen_supported=true
CFLAGS="$CFLAGS -mbackchain -D__USE_STRING_INLINES"
;;
@@ -2724,9 +2710,7 @@ if test "x$host" != "x$target"; then
TARGET=ARM;
arch_target=arm;
ACCESS_UNALIGNED="no"
JIT_SUPPORTED=yes
CPPFLAGS="$CPPFLAGS -D__ARM_EABI__"
jit_wanted=true
# Can't use tls, since it depends on the runtime detection of tls offsets
# in mono-compiler.h
with_tls=pthread
@@ -2764,7 +2748,6 @@ if test "x$host" != "x$target"; then
# arch_target=arm
# AC_DEFINE(TARGET_ARM, 1, [...])
# ACCESS_UNALIGNED="no"
# JIT_SUPPORTED=yes
# sizeof_register=4
# CPPFLAGS="$CPPFLAGS \
# -D__ARM_EABI__ \
@@ -2774,7 +2757,6 @@ if test "x$host" != "x$target"; then
# -DDISABLE_SOCKETS \
# -DDISABLE_ATTACH \
# -DUSE_NEWLIB"
# jit_wanted=true
# Can't use tls, since it depends on the runtime detection of tls offsets
# in mono-compiler.h
# with_tls=pthread
@@ -2791,9 +2773,7 @@ if test "x$host" != "x$target"; then
AC_DEFINE(TARGET_ARM, 1, [...])
AC_DEFINE(TARGET_ANDROID, 1, [...])
ACCESS_UNALIGNED="no"
JIT_SUPPORTED=yes
CPPFLAGS="$CPPFLAGS -D__ARM_EABI__"
jit_wanted=true
# Can't use tls, since it depends on the runtime detection of tls offsets
# in mono-compiler.h
with_tls=pthread
@@ -2808,10 +2788,20 @@ if test "x$host" != "x$target"; then
;;
esac
;;
i686*-linux-*)
TARGET=X86;
arch_target=x86;
AC_DEFINE(TARGET_X86, 1, [...])
AC_DEFINE(TARGET_ANDROID, 1, [...])
CPPFLAGS="$CPPFLAGS"
sgen_supported=true
# Can't use tls, since it depends on the runtime detection of tls offsets
# in mono-compiler.h
with_tls=pthread
target_mach=no
;;
aarch64-*)
TARGET=ARM64
JIT_SUPPORTED=yes
jit_wanted=true
;;
*)
AC_MSG_ERROR([Cross compiling is not supported for target $target])
@@ -2934,27 +2924,7 @@ fi
AC_SUBST(SGEN_DEFINES)
AM_CONDITIONAL(SUPPORT_SGEN, test x$buildsgen = xyes)
USEJIT=false
if test x$JIT_SUPPORTED = xyes; then
if $jit_wanted; then
USEJIT=true
jit_status="Building and using the JIT"
else
if $interp_wanted; then
jit_status="Building the JIT, defaulting to the interpreter"
else
AC_ERROR(No JIT or interpreter support available or selected.)
fi
fi
else
if test x$interp_wanted = xtrue; then
jit_status="interpreter"
else
AC_ERROR(No JIT or interpreter support available or selected.)
fi
fi
AM_CONDITIONAL(USE_JIT, test x$USEJIT = xtrue)
jit_status="Building and using the JIT"
libsuffix=".so"
@@ -3229,7 +3199,7 @@ case "x$libgc" in
;;
esac
AC_ARG_WITH(profile2, [ --with-profile2=yes,no If you want to install the 2.0/3.5 FX (defaults to yes)], [], [with_profile2=yes])
AC_ARG_WITH(profile2, [ --with-profile2=yes,no If you want to install the 2.0/3.5 FX (defaults to yes)], [], [with_profile2=no])
AC_ARG_WITH(profile4, [ --with-profile4=yes,no If you want to install the 4.0 FX (defaults to yes)], [], [with_profile4=yes])
AC_ARG_WITH(profile4_5,[ --with-profile4_5=yes,no If you want to install the 4.5 FX (defaults to yes)], [], [with_profile4_5=yes])
AC_ARG_WITH(monodroid, [ --with-monodroid=yes,no If you want to build the MonoDroid assemblies (defaults to no)], [], [with_monodroid=no])
@@ -3305,7 +3275,6 @@ dnl Consistency settings
dnl
if test x$cross_compiling = xyes -o x$enable_mcs_build = xno; then
DISABLE_MCS_DOCS=yes
with_profile2=no
with_profile4=no
with_profile4_5=no
with_monodroid=no
@@ -3329,7 +3298,6 @@ AC_SUBST(OPROFILE_LIBS)
libmono_ldflags="$libmono_ldflags $LIBS"
AM_CONDITIONAL(INSTALL_2_0, [test "x$with_profile2" = xyes])
AM_CONDITIONAL(INSTALL_4_0, [test "x$with_profile4" = xyes])
AM_CONDITIONAL(INSTALL_4_5, [test "x$with_profile4_5" = xyes])
AM_CONDITIONAL(INSTALL_MONODROID, [test "x$with_monodroid" != "xno"])
@@ -3357,8 +3325,6 @@ AM_CONDITIONAL(HOST_ARM, test x$HOST = xARM)
AM_CONDITIONAL(HOST_ARM64, test x$HOST = xARM64)
AM_CONDITIONAL(CROSS_COMPILE, test "x$host" != "x$target")
AM_CONDITIONAL(JIT_SUPPORTED, test x$JIT_SUPPORTED = xyes)
AM_CONDITIONAL(INTERP_SUPPORTED, test x$interp_wanted = xtrue)
AM_CONDITIONAL(INCLUDED_LIBGC, test x$libgc = xincluded)
AC_SUBST(LIBC)
@@ -3378,11 +3344,7 @@ AC_SUBST(LDFLAGS)
mono_build_root=`pwd`
AC_SUBST(mono_build_root)
if test x$USEJIT = xtrue; then
mono_runtime=mono/mini/mono
else
mono_runtime=mono/interpreter/mint
fi
mono_runtime=mono/mini/mono
AC_SUBST(mono_runtime)
mono_cfg_root=$mono_build_root/runtime
@@ -3579,7 +3541,6 @@ mono/arch/arm/Makefile
mono/arch/arm64/Makefile
mono/arch/ia64/Makefile
mono/arch/mips/Makefile
mono/interpreter/Makefile
mono/tests/Makefile
mono/tests/tests-config
mono/tests/assemblyresolve/Makefile
@@ -3781,7 +3742,6 @@ echo "
LLVM Back End: $enable_llvm (dynamically loaded: $enable_loadedllvm)
Libraries:
.NET 2.0/3.5: $with_profile2
.NET 4.0: $with_profile4
.NET 4.5: $with_profile4_5
MonoDroid: $with_monodroid
-9
View File
@@ -26,17 +26,8 @@ else
SGENPCFILE=
endif
if JIT_SUPPORTED
if INTERP_SUPPORTED
pkgconfig_DATA= mono.pc mono-2.pc mint.pc dotnet.pc dotnet35.pc wcf.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc monodoc.pc mono-lineeditor.pc system.web.extensions_1.0.pc \
system.web.extensions.design_1.0.pc system.web.mvc.pc system.web.mvc2.pc system.web.mvc3.pc aspnetwebstack.pc reactive.pc xbuild12.pc $(SGENPCFILE)
else
pkgconfig_DATA= mono.pc mono-2.pc dotnet.pc dotnet35.pc wcf.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc monodoc.pc mono-lineeditor.pc system.web.extensions_1.0.pc \
system.web.extensions.design_1.0.pc system.web.mvc.pc system.web.mvc2.pc system.web.mvc3.pc aspnetwebstack.pc reactive.pc xbuild12.pc $(SGENPCFILE)
endif
else
pkgconfig_DATA= mint.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc monodoc.pc mono-lineeditor.pc
endif
DISTCLEANFILES= mono-2.pc mono.pc mint.pc dotnet.pc dotnet35.pc wcf.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc monodoc.pc mono-lineeditor.pc system.web.extensions_1.0.pc \
system.web.extensions.design_1.0.pc system.web.mvc.pc system.web.mvc2.pc system.web.mvc3.pc aspnetwebstack.pc reactive.pc $(SGENPCFILE) mono-sgen-gdb.py
+1 -1
View File
@@ -10,7 +10,7 @@
<dllmap dll="i:odbc32.dll" target="libiodbc.dylib" os="osx"/>
<dllmap dll="oci" target="libclntsh@libsuffix@" os="!windows"/>
<dllmap dll="db2cli" target="libdb2_36@libsuffix@" os="!windows"/>
<dllmap dll="MonoPosixHelper" target="@prefix@/lib/libMonoPosixHelper@libsuffix@" os="!windows" />
<dllmap dll="MonoPosixHelper" target="@prefix@/@reloc_libdir@/libMonoPosixHelper@libsuffix@" os="!windows" />
<dllmap dll="i:msvcrt" target="@LIBC@" os="!windows"/>
<dllmap dll="i:msvcrt.dll" target="@LIBC@" os="!windows"/>
<dllmap dll="sqlite" target="@SQLITE@" os="!windows"/>
+3 -3
View File
@@ -99,14 +99,14 @@ mono-file-formats.tree: $(srcdir)/docs.make $(srcdir)/Makefile.am $(srcdir)/depl
deploy/.stamp: convert.exe Makefile.am
$(mkdir_p) html
runtimedir=`cd ../runtime && pwd`; export runtimedir; \
MONO_PATH=../mcs/class/lib/net_2_0 perl $(srcdir)/exdoc -h $(srcdir) -t . $(srcdir)/../mono/*/*.c
MONO_PATH=../mcs/class/lib/net_4_5 perl $(srcdir)/exdoc -h $(srcdir) -t . $(srcdir)/../mono/*/*.c
touch $@
extract: deploy/.stamp
convert.exe: convert.cs AgilityPack.dll
$(TOOL_MAKE) PROFILE=net_2_0 convert.exe
$(TOOL_MAKE) PROFILE=net_4_5 convert.exe
AgilityPack.dll:
$(TOOL_MAKE) PROFILE=net_2_0 AgilityPack.dll
$(TOOL_MAKE) PROFILE=net_4_5 AgilityPack.dll
+1 -1
View File
@@ -26,7 +26,7 @@ i?86-*-linux*|i?86-apple-darwin*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-li
|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*|sparc*-*-linux*|mips*-*-linux*|x86_64-apple-darwin*|aarch64*)
pic_options='-fPIC'
;;
?86-pc-cygwin*|i?86-pc-cygwin*)
?86-pc-cygwin*|i?86-pc-cygwin*|i?86-pc-mingw32*)
pic_options='-DDLL_EXPORT'
;;
i?86-apple-darwin*|arm-apple-darwin*)
+1 -1
View File
@@ -176,7 +176,7 @@ default_stderr_handler (const gchar *message)
}
#elif MONOTOUCH
#elif defined(HOST_IOS)
#include <asl.h>
static int
Vendored Submodule
+1
Submodule external/referencesource added at 4e6dea7a9c.
+1 -1
View File
@@ -26,7 +26,7 @@ i?86-*-linux*|i?86-apple-darwin*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-li
|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*|sparc*-*-linux*|mips*-*-linux*|x86_64-apple-darwin*|aarch64*)
pic_options='-fPIC'
;;
?86-pc-cygwin*|i?86-pc-cygwin*)
?86-pc-cygwin*|i?86-pc-cygwin*|i?86-pc-mingw32*)
pic_options='-DDLL_EXPORT'
;;
i?86-apple-darwin*|arm-apple-darwin*)
+1 -1
View File
@@ -32,7 +32,7 @@
# define GC_LINUX_THREADS
#endif
#if defined(WIN32_THREADS)
# define GC_WIN32_THREADS
# define GC_WIN32_THREADS 1
#endif
#if defined(USE_LD_WRAP)
# define GC_USE_LD_WRAP
+9 -13
View File
@@ -1075,19 +1075,10 @@ first generation (of two). A larger nursery will usually speed up the
program but will obviously use more memory. The default nursery size
4 MB.
.TP
\fBmajor=\fIcollector\fR
Specifies which major collector to use. Options are `marksweep' for
the Mark&Sweep collector, `marksweep-conc' for concurrent Mark&Sweep,
`marksweep-par' for parallel Mark&Sweep, `marksweep-fixed' for
Mark&Sweep with a fixed heap, and `marksweep-fixed-par' for parallel
Mark&Sweep with a fixed heap. The Mark&Sweep collector is the default.
.TP
\fBmajor-heap-size=\fIsize\fR
Sets the size of the major heap (not including the large object space)
for the fixed-heap Mark&Sweep collector (i.e. `marksweep-fixed' and
`marksweep-fixed-par'). The size is in bytes, with optional suffixes
`k', `m' and `g' to specify kilo-, mega- and gigabytes, respectively.
The default is 512 megabytes.
\fBmajor=\fIcollector\fR Specifies which major collector to use.
Options are `marksweep' for the Mark&Sweep collector, and
`marksweep-conc' for concurrent Mark&Sweep. The non-concurrent
Mark&Sweep collector is the default.
.TP
\fBsoft-heap-limit=\fIsize\fR
Once the heap size gets larger than this size, ignore what the default
@@ -1266,6 +1257,11 @@ work, Mono needs to be compiled with the BINARY_PROTOCOL define on
sgen-gc.c. You can then use this command to explore the output
.nf
sgen-grep-binprot 0x1234 0x5678 < file
.TP
\fBnursery-canaries\fR
If set, objects allocated in the nursery are suffixed with a canary (guard)
word, which is checked on each minor collection. Can be used to detect/debug
heap corruption issues.
.fi
.ne
.RE
+5 -5
View File
@@ -6,16 +6,16 @@ SUBDIRS := build jay mcs class nunit24 ilasm tools tests errors docs
basic_SUBDIRS := build jay mcs class
build_SUBDIRS := build class mcs class/aot-compiler tools
net_2_0_SUBDIRS := build class nunit24 ilasm tools tests errors docs
monodroid_SUBDIRS := build class
monotouch_SUBDIRS := build class
monotouch_runtime_SUBDIRS := build class
xammac_SUBDIRS := build class
mobile_SUBDIRS := build class
net_3_5_SUBDIRS := build class tools/xbuild
mobile_static_SUBDIRS := build class
net_4_0_SUBDIRS := build class
net_4_5_SUBDIRS := build mcs class nunit24 ilasm tools tests errors docs
xbuild_12_SUBDIRS := build class tools/xbuild
xbuild_14_SUBDIRS := build class tools/xbuild
# List of test subdirs that should pass 100%
centum_tests := \
@@ -86,7 +86,7 @@ dir-check:
# fun specialty targets
PROFILES = net_2_0 net_3_5 net_4_0 net_4_5 xbuild_12
PROFILES = net_3_5 net_4_0 net_4_5 xbuild_12 xbuild_14
.PHONY: all-profiles $(STD_TARGETS:=-profiles)
all-profiles $(STD_TARGETS:=-profiles): %-profiles: profiles-do--%
@@ -105,16 +105,16 @@ profiles-do--run-test:
# Orchestrate the bootstrap here.
_boot_ = all clean install
$(_boot_:%=profile-do--xbuild_14--%): profile-do--xbuild_14--%: profile-do--net_4_5--%
$(_boot_:%=profile-do--xbuild_12--%): profile-do--xbuild_12--%: profile-do--net_4_5--%
$(_boot_:%=profile-do--net_4_5--%): profile-do--net_4_5--%: profile-do--build--%
$(_boot_:%=profile-do--net_4_0--%): profile-do--net_4_0--%: profile-do--build--%
$(_boot_:%=profile-do--net_3_5--%): profile-do--net_3_5--%: profile-do--net_2_0--%
$(_boot_:%=profile-do--monodroid--%): profile-do--monodroid--%: profile-do--build--%
$(_boot_:%=profile-do--monotouch--%): profile-do--monotouch--%: profile-do--build--%
$(_boot_:%=profile-do--monotouch_runtime--%): profile-do--monotouch_runtime--%: profile-do--build--%
$(_boot_:%=profile-do--xammac--%): profile-do--xammac--%: profile-do--build--%
$(_boot_:%=profile-do--mobile--%): profile-do--mobile--%: profile-do--build--%
$(_boot_:%=profile-do--net_2_0--%): profile-do--net_2_0--%: profile-do--build--%
$(_boot_:%=profile-do--mobile_static--%): profile-do--mobile_static--%: profile-do--build--%
$(_boot_:%=profile-do--build--%): profile-do--build--%: profile-do--basic--%
testcorlib:
+2 -1
View File
@@ -22,7 +22,8 @@ PROFILES = \
net_3_5 \
net_4_0 \
net_4_5 \
xbuild_12
xbuild_12 \
xbuild_14
COMMON_SRCS = \
Consts.cs.in \
+16 -1
View File
@@ -12,7 +12,22 @@ profile-check:
@:
DEFAULT_REFERENCES = -r:mscorlib.dll
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:MOBILE -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -nowarn:1699 -nostdlib -lib:$(topdir)/class/lib/$(PROFILE) $(DEFAULT_REFERENCES) $(PLATFORM_DEBUG_FLAGS)
PROFILE_MCS_FLAGS = \
-d:NET_1_1 \
-d:NET_2_0 \
-d:NET_2_1 \
-d:MOBILE \
-d:MOBILE_DYNAMIC \
-d:NET_3_5 \
-d:NET_4_0 \
-d:NET_4_5 \
-nowarn:1699 \
-nostdlib \
-lib:$(topdir)/class/lib/$(PROFILE) \
$(DEFAULT_REFERENCES) \
$(PLATFORM_DEBUG_FLAGS)
FRAMEWORK_VERSION = 2.1
NO_INSTALL = yes
+18 -1
View File
@@ -12,7 +12,24 @@ profile-check:
@:
DEFAULT_REFERENCES = -r:mscorlib.dll
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE -d:FULL_AOT_RUNTIME -d:DISABLE_REMOTING -d:DISABLE_COM -nowarn:1699 -nostdlib -lib:$(topdir)/class/lib/$(PROFILE) $(DEFAULT_REFERENCES) $(PLATFORM_DEBUG_FLAGS)
PROFILE_MCS_FLAGS = \
-d:NET_1_1 \
-d:NET_2_0 \
-d:NET_2_1 \
-d:NET_3_5 \
-d:NET_4_0 \
-d:NET_4_5 \
-d:MOBILE \
-d:FULL_AOT_RUNTIME \
-d:DISABLE_REMOTING \
-d:DISABLE_COM \
-nowarn:1699 \
-nostdlib \
-lib:$(topdir)/class/lib/$(PROFILE) \
$(DEFAULT_REFERENCES) \
$(PLATFORM_DEBUG_FLAGS)
FRAMEWORK_VERSION = 2.1
NO_TEST = yes
+18 -1
View File
@@ -12,7 +12,24 @@ profile-check:
@:
DEFAULT_REFERENCES = -r:mscorlib.dll
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE -d:MOBILE_DYNAMIC -d:MONODROID -nowarn:1699 -nostdlib -lib:$(topdir)/class/lib/$(PROFILE) $(DEFAULT_REFERENCES) $(PLATFORM_DEBUG_FLAGS)
PROFILE_MCS_FLAGS = \
-d:NET_1_1 \
-d:NET_2_0 \
-d:NET_2_1 \
-d:NET_3_5 \
-d:NET_4_0 \
-d:NET_4_5 \
-d:MOBILE \
-d:MOBILE_DYNAMIC \
-d:MONODROID \
-d:ANDROID \
-nowarn:1699 \
-nostdlib \
-lib:$(topdir)/class/lib/$(PROFILE) \
$(DEFAULT_REFERENCES) \
$(PLATFORM_DEBUG_FLAGS)
FRAMEWORK_VERSION = 2.1
NO_TEST = yes
+20 -2
View File
@@ -12,9 +12,27 @@ profile-check:
@:
DEFAULT_REFERENCES = -r:mscorlib.dll
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE -d:MONOTOUCH -d:DISABLE_REMOTING -d:DISABLE_COM -d:FULL_AOT_RUNTIME -nowarn:1699 -nostdlib -lib:$(topdir)/class/lib/$(PROFILE) $(DEFAULT_REFERENCES) $(PLATFORM_DEBUG_FLAGS)
PROFILE_MCS_FLAGS = \
-d:NET_1_1 \
-d:NET_2_0 \
-d:NET_2_1 \
-d:NET_3_5 \
-d:NET_4_0 \
-d:NET_4_5 \
-d:MOBILE \
-d:MONOTOUCH \
-d:DISABLE_REMOTING \
-d:DISABLE_COM \
-d:FULL_AOT_RUNTIME \
-nowarn:1699 \
-nostdlib \
-lib:$(topdir)/class/lib/$(PROFILE) \
$(DEFAULT_REFERENCES) \
$(PLATFORM_DEBUG_FLAGS)
FRAMEWORK_VERSION = 2.1
NO_TEST = yes
# the tuner takes care of the install
NO_INSTALL = yes
NO_INSTALL = yes
-16
View File
@@ -1,16 +0,0 @@
# -*- makefile -*-
BOOTSTRAP_PROFILE = build
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
# nuttzing!
profile-check:
@:
DEFAULT_REFERENCES = -r:mscorlib.dll
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -nowarn:1699 -nostdlib -lib:$(topdir)/class/lib/$(PROFILE) $(DEFAULT_REFERENCES) $(PLATFORM_DEBUG_FLAGS)
FRAMEWORK_VERSION = 2.0
XBUILD_VERSION = 2.0
-20
View File
@@ -1,20 +0,0 @@
# -*- makefile -*-
BOOTSTRAP_PROFILE = build
MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
# nuttzing!
profile-check:
@:
DEFAULT_REFERENCES = -r:mscorlib.dll
PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_3_5 -nowarn:1699 -nostdlib -lib:$(topdir)/class/lib/$(PROFILE) -lib:$(topdir)/class/lib/net_2_0 $(DEFAULT_REFERENCES) $(PLATFORM_DEBUG_FLAGS)
FRAMEWORK_VERSION = 3.5
XBUILD_VERSION = 3.5
TEST_HARNESS = $(topdir)/class/lib/net_2_0/nunit-console.exe
TEST_MONO_PATH = $(topdir)/class/lib/net_2_0
+7
View File
@@ -0,0 +1,7 @@
# -*- makefile -*-
include $(topdir)/build/profiles/net_4_5.make
PROFILE_MCS_FLAGS := $(PROFILE_MCS_FLAGS) -d:XBUILD_12 -d:XBUILD_14 -lib:$(topdir)/class/lib/net_4_5
XBUILD_VERSION = 14.0
@@ -107,7 +107,7 @@ namespace Commons.Xml.Relaxng.Rnc
public RelaxngPattern Parse (TextReader source, string baseUri, string defaultNamespace)
{
this.defaultNamespace = defaultNamespace;
this.defaultNamespace = defaultNamespace ?? string.Empty;
if (defaultNamespace != null && defaultNamespace.Length != 0)
nsmgr.AddNamespace (String.Empty, defaultNamespace);
try {
@@ -13,7 +13,7 @@ using System.Xml;
using Commons.Xml.Nvdl;
using NUnit.Framework;
namespace MonoTests.Commons.Xml.Nvdl
namespace MonoTests.Commons.Xml.Relaxng
{
[TestFixture]
public class NvdlValidatingReaderTests
@@ -95,5 +95,19 @@ start = mine";
r.Close ();
}
}
[Test]
public void SimpleDefaultNamespace ()
{
var g = RncParser.ParseRnc (new StringReader ("element e { empty }"));
var x = XmlReader.Create (new StringReader ("<e/>"));
var r = new RelaxngValidatingReader (x, g);
try {
while (!r.EOF)
r.Read ();
} finally {
r.Close ();
}
}
}
}
@@ -8,7 +8,7 @@ TEST_ARCHIVE = testSuite.zip
RNCTESTS = test/RNCTest.xml
RNCTEST_ARCHIVE = anglia-test-suite.zip
all : relaxngtest.exe anglia-test-runner.exe
all : relaxngtest.exe #anglia-test-runner.exe
relaxngtest.exe : relaxngtest.cs $(TESTS)
$(MCS_RUNTIME) $(MCS) -debug+ relaxngtest.cs -r:Commons.Xml.Relaxng.dll
@@ -40,6 +40,7 @@
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.COMException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComMemberType))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComSourceInterfacesAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComInterfaceType))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.IStream))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.STATSTG))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.CriticalHandle))]
+25 -23
View File
@@ -33,6 +33,7 @@ net_2_0_dirs := \
System.EnterpriseServices \
Mono.Data.Tds \
System.Data \
System.ComponentModel.DataAnnotations \
Accessibility \
Mono.WebBrowser \
System.Runtime.Serialization.Formatters.Soap \
@@ -81,7 +82,6 @@ net_2_0_dirs := \
System.ServiceModel \
System.Web.Extensions \
System.Web.Extensions.Design \
System.ComponentModel.DataAnnotations \
System.Web.DynamicData \
System.Web.Mvc2 \
Mono.C5 \
@@ -106,7 +106,7 @@ net_2_0_only_dirs := \
pcl_facade_dirs := Facades
mobile_dirs := \
mobile_common_dirs := \
corlib \
System \
System.Core \
@@ -134,19 +134,27 @@ mobile_dirs := \
System.Net \
System.Windows \
System.Xml.Serialization \
$(pcl_facade_dirs)
monodroid_dirs := \
Mono.CompilerServices.SymbolWriter \
Mono.CSharp \
Microsoft.CSharp \
$(pcl_facade_dirs)
mobile_static_dirs := \
$(mobile_common_dirs) \
Mono.Dynamic.Interpreter
mobile_dynamic_dirs := \
$(mobile_common_dirs) \
Mono.CompilerServices.SymbolWriter \
System.Net.Http
xammac_dirs := \
Mono.CompilerServices.SymbolWriter \
Mono.CSharp \
Microsoft.CSharp \
System.Net.Http
$(mobile_dynamic_dirs)
monodroid_dirs := \
$(mobile_dynamic_dirs)
monotouch_dirs := \
$(mobile_static_dirs)
monotouch_runtime_dirs := \
corlib \
@@ -155,11 +163,6 @@ monotouch_runtime_dirs := \
System.XML \
Mono.CSharp
monotouch_dirs := \
Mono.CSharp \
Microsoft.CSharp \
Mono.Dynamic.Interpreter
net_4_0_dirs := \
System.Numerics \
Microsoft.CSharp \
@@ -228,21 +231,20 @@ xbuild_4_0_dirs := \
$(xbuild_2_0_dirs) \
Microsoft.Build
net_2_0_SUBDIRS := $(net_2_0_dirs) $(net_2_0_only_dirs) $(xbuild_2_0_dirs) aot-compiler
monodroid_SUBDIRS := $(mobile_dirs) $(monodroid_dirs)
monotouch_SUBDIRS := $(mobile_dirs) $(monotouch_dirs)
monodroid_SUBDIRS := $(monodroid_dirs)
monotouch_SUBDIRS := $(monotouch_dirs)
monotouch_runtime_SUBDIRS := $(monotouch_runtime_dirs)
mobile_static_SUBDIRS := $(mobile_dirs)
mobile_SUBDIRS := $(mobile_dirs)
xammac_SUBDIRS := $(mobile_dirs) $(xammac_dirs)
net_3_5_SUBDIRS := $(xbuild_2_0_dirs)
mobile_static_SUBDIRS := $(mobile_static_dirs)
mobile_SUBDIRS := $(mobile_dynamic_dirs)
xammac_SUBDIRS := $(xammac_dirs)
net_4_0_SUBDIRS := $(net_2_0_dirs) $(net_4_0_dirs) $(net_4_0_only_dirs) $(xbuild_4_0_dirs)
net_4_5_SUBDIRS := $(net_2_0_dirs) $(net_4_0_dirs) $(net_4_5_dirs) $(xbuild_4_0_dirs) aot-compiler
xbuild_12_SUBDIRS := $(xbuild_4_0_dirs)
xbuild_14_SUBDIRS := $(xbuild_4_0_dirs)
include ../build/rules.make
SUBDIRS = $(net_2_0_dirs) $(net_2_0_only_dirs) $(mobile_dirs) $(monotouch_dirs) $(net_4_0_dirs) $(net_4_0_only_dirs) $(net_4_5_dirs)
SUBDIRS = $(net_2_0_dirs) $(net_2_0_only_dirs) $(mobile_static_dirs) $(mobile_dynamic_dirs) $(monotouch_dirs) $(monodroid_dirs) $(xammac_dirs) $(net_4_0_dirs) $(net_4_0_only_dirs) $(net_4_5_dirs)
DIST_ONLY_SUBDIRS = dlr aot-compiler $(xbuild_4_0_dirs)
@@ -175,7 +175,7 @@ namespace System.Windows.Forms {
Rectangle text_rectangle;
Rectangle image_rectangle;
ThemeEngine.Current.CalculateButtonTextAndImageLayout (this, out text_rectangle, out image_rectangle);
ThemeEngine.Current.CalculateButtonTextAndImageLayout (pevent.Graphics, this, out text_rectangle, out image_rectangle);
// Draw our button
if (this.FlatStyle == FlatStyle.Standard)
@@ -28,9 +28,14 @@
using System;
using System.Drawing;
using System.Diagnostics;
using System.IO;
namespace System.Windows.Forms
{
/// <summary>
/// http://msdn.microsoft.com/en-us/library/System.Windows.Forms.Help(v=vs.110).aspx
/// </summary>
public class Help
{
#region Constructor
@@ -42,7 +47,7 @@ namespace System.Windows.Forms
#region Public Static Methods
public static void ShowHelp (Control parent, string url)
{
ShowHelp(parent, url, HelpNavigator.TableOfContents, null);
ShowHelp (parent, url, null);
}
public static void ShowHelp (Control parent, string url, HelpNavigator navigator)
@@ -57,9 +62,7 @@ namespace System.Windows.Forms
public static void ShowHelp (Control parent, string url, string keyword)
{
if (keyword == null || keyword == String.Empty)
ShowHelp (parent, url, HelpNavigator.TableOfContents, null);
ShowHelp (parent, url, HelpNavigator.Topic, keyword);
ShowHelpTopic (url, keyword);
}
public static void ShowHelpIndex (Control parent, string url)
@@ -72,5 +75,55 @@ namespace System.Windows.Forms
{
}
#endregion // Public Static Methods
/// <summary>
/// Show a help file and topic using a help viewer
/// </summary>
/// <param name="helpFile">path to a .chm help file</param>
/// <param name="helpTopic">path to a topic in helpFile, or null</param>
private static void ShowHelpTopic (string helpFile, string helpTopic)
{
if (helpFile == null)
throw new ArgumentNullException ();
if (helpFile == String.Empty)
throw new ArgumentException ();
// Use forward slashes in helpFile path if needed
helpFile = helpFile.Replace (@"\", Path.DirectorySeparatorChar.ToString ());
string helpViewer = Environment.GetEnvironmentVariable ("MONO_HELP_VIEWER") ?? "chmsee";
string arguments = String.Format ("\"{0}\"", helpFile);
if (!String.IsNullOrEmpty (helpTopic)) {
if (!helpTopic.StartsWith ("/"))
helpTopic = "/" + helpTopic;
helpTopic = helpTopic.TrimEnd (' ');
arguments = String.Format ("\"{0}::{1}\"", helpFile, helpTopic);
}
try {
RunNonblockingProcess (helpViewer, arguments);
} catch (Exception e) {
// Don't crash if the help viewer couldn't be launched. There
// won't be an exception thrown if the help viewer can't find
// the help file; it's up to the help viewer to display such an error.
string message = String.Format ("The help viewer could not load. Maybe you don't have {0} installed or haven't set MONO_HELP_VIEWER. The specific error message was: {1}", helpViewer, e.Message);
Console.Error.WriteLine (message);
MessageBox.Show (message);
}
}
/// <remarks>
/// throws exception from Process.Start() if there was a problem starting
/// </remarks>
private static void RunNonblockingProcess (string command, string arguments)
{
using (Process process = new Process ()) {
process.StartInfo.FileName = command;
process.StartInfo.Arguments = arguments;
process.StartInfo.UseShellExecute = false;
process.Start ();
}
}
}
}
@@ -3663,7 +3663,8 @@ namespace System.Windows.Forms
if (View != View.Details) {
if (bounds.Left < 0)
h_scroll.Value += bounds.Left;
else if (bounds.Right > view_rect.Right)
// Don't shift right unless right-to-left layout is active. (Xamarin bug 22483)
else if (this.RightToLeftLayout && bounds.Right > view_rect.Right)
h_scroll.Value += (bounds.Right - view_rect.Right);
}
@@ -258,11 +258,19 @@ namespace System.Windows.Forms
StringFormat sf = FlagsToStringFormat (flags);
Size retval;
int proposedWidth;
if (proposedSize.Width == 0)
proposedWidth = Int32.MaxValue;
else {
proposedWidth = proposedSize.Width;
if ((flags & TextFormatFlags.NoPadding) == 0)
proposedWidth -= 9;
}
if (dc is Graphics)
retval = (dc as Graphics).MeasureString (text, font, proposedSize.Width == 0 ? Int32.MaxValue : proposedSize.Width, sf).ToSize ();
retval = (dc as Graphics).MeasureString (text, font, proposedWidth, sf).ToSize ();
else
retval = TextRenderer.MeasureString (text, font, proposedSize.Width == 0 ? Int32.MaxValue : proposedSize.Width, sf).ToSize ();
retval = TextRenderer.MeasureString (text, font, proposedWidth, sf).ToSize ();
if (retval.Width > 0 && (flags & TextFormatFlags.NoPadding) == 0)
retval.Width += 9;
@@ -484,9 +492,6 @@ namespace System.Windows.Forms
r.X += 2;
r.Width -= 2;
}
if ((flags & TextFormatFlags.WordEllipsis) == TextFormatFlags.WordEllipsis || (flags & TextFormatFlags.EndEllipsis) == TextFormatFlags.EndEllipsis || (flags & TextFormatFlags.WordBreak) == TextFormatFlags.WordBreak) {
r.Width -= 4;
}
if ((flags & TextFormatFlags.VerticalCenter) == TextFormatFlags.VerticalCenter && XplatUI.RunningOnUnix) {
r.Y -= 1;
}
@@ -698,7 +698,7 @@ namespace System.Windows.Forms
#region Button
public abstract Size CalculateButtonAutoSize (Button button);
public abstract void CalculateButtonTextAndImageLayout (ButtonBase b, out Rectangle textRectangle, out Rectangle imageRectangle);
public abstract void CalculateButtonTextAndImageLayout (Graphics g, ButtonBase b, out Rectangle textRectangle, out Rectangle imageRectangle);
public abstract void DrawButton (Graphics g, Button b, Rectangle textBounds, Rectangle imageBounds, Rectangle clipRectangle);
public abstract void DrawFlatButton (Graphics g, ButtonBase b, Rectangle textBounds, Rectangle imageBounds, Rectangle clipRectangle);
public abstract void DrawPopupButton (Graphics g, Button b, Rectangle textBounds, Rectangle imageBounds, Rectangle clipRectangle);
@@ -364,28 +364,29 @@ namespace System.Windows.Forms
return ret_size;
}
public override void CalculateButtonTextAndImageLayout (ButtonBase button, out Rectangle textRectangle, out Rectangle imageRectangle)
public override void CalculateButtonTextAndImageLayout (Graphics g, ButtonBase button, out Rectangle textRectangle, out Rectangle imageRectangle)
{
Image image = button.Image;
string text = button.Text;
Rectangle content_rect = button.PaddingClientRectangle;
Size text_size = TextRenderer.MeasureTextInternal (text, button.Font, content_rect.Size, button.TextFormatFlags, button.UseCompatibleTextRendering);
Size text_size = TextRenderer.MeasureTextInternal (g, text, button.Font, content_rect.Size, button.TextFormatFlags, button.UseCompatibleTextRendering);
Size image_size = image == null ? Size.Empty : image.Size;
textRectangle = Rectangle.Empty;
textRectangle = Rectangle.Inflate (content_rect, -4, -4);
imageRectangle = Rectangle.Empty;
bool displayEllipsis = (button.TextFormatFlags & (TextFormatFlags.EndEllipsis | TextFormatFlags.PathEllipsis | TextFormatFlags.WordEllipsis)) != 0;
switch (button.TextImageRelation) {
case TextImageRelation.Overlay:
// Overlay is easy, text always goes here
textRectangle = Rectangle.Inflate (content_rect, -4, -4);
if (button.Pressed)
textRectangle.Offset (1, 1);
// Image is dependent on ImageAlign
if (image == null)
if (image == null) {
if (button.Pressed)
textRectangle.Offset (1, 1);
return;
}
int image_x = 0;
int image_y = 0;
@@ -438,22 +439,20 @@ namespace System.Windows.Forms
imageRectangle = new Rectangle (image_x, image_y, image_width, image_height);
break;
case TextImageRelation.ImageAboveText:
content_rect.Inflate (-4, -4);
LayoutTextAboveOrBelowImage (content_rect, false, text_size, image_size, button.TextAlign, button.ImageAlign, out textRectangle, out imageRectangle);
LayoutTextAboveOrBelowImage (textRectangle, false, text_size, image_size, button.TextAlign, button.ImageAlign, displayEllipsis, out textRectangle, out imageRectangle);
break;
case TextImageRelation.TextAboveImage:
content_rect.Inflate (-4, -4);
LayoutTextAboveOrBelowImage (content_rect, true, text_size, image_size, button.TextAlign, button.ImageAlign, out textRectangle, out imageRectangle);
LayoutTextAboveOrBelowImage (textRectangle, true, text_size, image_size, button.TextAlign, button.ImageAlign, displayEllipsis, out textRectangle, out imageRectangle);
break;
case TextImageRelation.ImageBeforeText:
content_rect.Inflate (-4, -4);
LayoutTextBeforeOrAfterImage (content_rect, false, text_size, image_size, button.TextAlign, button.ImageAlign, out textRectangle, out imageRectangle);
LayoutTextBeforeOrAfterImage (textRectangle, false, text_size, image_size, button.TextAlign, button.ImageAlign, out textRectangle, out imageRectangle);
break;
case TextImageRelation.TextBeforeImage:
content_rect.Inflate (-4, -4);
LayoutTextBeforeOrAfterImage (content_rect, true, text_size, image_size, button.TextAlign, button.ImageAlign, out textRectangle, out imageRectangle);
LayoutTextBeforeOrAfterImage (textRectangle, true, text_size, image_size, button.TextAlign, button.ImageAlign, out textRectangle, out imageRectangle);
break;
}
if (button.Pressed)
textRectangle.Offset (1, 1);
}
private void LayoutTextBeforeOrAfterImage (Rectangle totalArea, bool textFirst, Size textSize, Size imageSize, System.Drawing.ContentAlignment textAlign, System.Drawing.ContentAlignment imageAlign, out Rectangle textRect, out Rectangle imageRect)
@@ -501,7 +500,7 @@ namespace System.Windows.Forms
imageRect = final_image_rect;
}
private void LayoutTextAboveOrBelowImage (Rectangle totalArea, bool textFirst, Size textSize, Size imageSize, System.Drawing.ContentAlignment textAlign, System.Drawing.ContentAlignment imageAlign, out Rectangle textRect, out Rectangle imageRect)
private void LayoutTextAboveOrBelowImage (Rectangle totalArea, bool textFirst, Size textSize, Size imageSize, System.Drawing.ContentAlignment textAlign, System.Drawing.ContentAlignment imageAlign, bool displayEllipsis, out Rectangle textRect, out Rectangle imageRect)
{
int element_spacing = 0; // Spacing between the Text and the Image
int total_height = textSize.Height + element_spacing + imageSize.Height;
@@ -537,17 +536,25 @@ namespace System.Windows.Forms
offset += (int)(2 * (excess_height / 3));
if (textFirst) {
final_text_rect = new Rectangle (AlignInRectangle (totalArea, textSize, textAlign).Left, totalArea.Top + offset, textSize.Width, textSize.Height);
var textHeight = excess_height >= 0 ? totalArea.Height - imageSize.Height - element_spacing: textSize.Height;
final_text_rect = new Rectangle (AlignInRectangle (totalArea, textSize, textAlign).Left, totalArea.Top + offset, textSize.Width, textHeight);
final_image_rect = new Rectangle (AlignInRectangle (totalArea, imageSize, imageAlign).Left, final_text_rect.Bottom + element_spacing, imageSize.Width, imageSize.Height);
}
else {
final_image_rect = new Rectangle (AlignInRectangle (totalArea, imageSize, imageAlign).Left, totalArea.Top + offset, imageSize.Width, imageSize.Height);
final_text_rect = new Rectangle (AlignInRectangle (totalArea, textSize, textAlign).Left, final_image_rect.Bottom + element_spacing, textSize.Width, textSize.Height);
var textHeight = excess_height >= 0 ? totalArea.Height - final_image_rect.Height : textSize.Height;
final_text_rect = new Rectangle (AlignInRectangle (totalArea, textSize, textAlign).Left, final_image_rect.Bottom + element_spacing, textSize.Width, textHeight);
if (final_text_rect.Bottom > totalArea.Bottom)
final_text_rect.Y = totalArea.Top;
}
if (displayEllipsis) {
// Don't use more space than is available otherwise ellipsis won't show
if (final_text_rect.Height > totalArea.Bottom)
final_text_rect.Height = totalArea.Bottom - final_text_rect.Top;
}
textRect = final_text_rect;
imageRect = final_image_rect;
}
@@ -1095,11 +1102,11 @@ namespace System.Windows.Forms
break;
case TextImageRelation.ImageAboveText:
content_rect.Inflate (-4, -4);
LayoutTextAboveOrBelowImage (content_rect, false, text_size, image_size, button.TextAlign, button.ImageAlign, out textRectangle, out imageRectangle);
LayoutTextAboveOrBelowImage (content_rect, false, text_size, image_size, button.TextAlign, button.ImageAlign, false, out textRectangle, out imageRectangle);
break;
case TextImageRelation.TextAboveImage:
content_rect.Inflate (-4, -4);
LayoutTextAboveOrBelowImage (content_rect, true, text_size, image_size, button.TextAlign, button.ImageAlign, out textRectangle, out imageRectangle);
LayoutTextAboveOrBelowImage (content_rect, true, text_size, image_size, button.TextAlign, button.ImageAlign, false, out textRectangle, out imageRectangle);
break;
case TextImageRelation.ImageBeforeText:
content_rect.Inflate (-4, -4);
@@ -1296,7 +1296,7 @@ namespace System.Windows.Forms {
buffer [i] = Marshal.ReadByte (prop, i);
Clipboard.Item = Encoding.UTF8.GetString (buffer);
} else if (property == UTF16_STRING) {
Clipboard.Item = Marshal.PtrToStringUni (prop, Encoding.Unicode.GetMaxCharCount ((int)nitems));
Clipboard.Item = Marshal.PtrToStringUni (prop);
} else if (property == RICHTEXTFORMAT)
Clipboard.Item = Marshal.PtrToStringAnsi(prop);
else if (DataFormats.ContainsFormat (property.ToInt32 ())) {
@@ -1018,13 +1018,27 @@ namespace Microsoft.Build.BuildEngine
if (!StartHandlerHasExecuted)
return;
if (EventArgs is ProjectStartedEventArgs)
ConsoleLogger.ProjectFinishedHandler (Sender, finished_args as ProjectFinishedEventArgs);
else if (EventArgs is TargetStartedEventArgs)
ConsoleLogger.TargetFinishedHandler (Sender, finished_args as TargetFinishedEventArgs);
else if (EventArgs is TaskStartedEventArgs)
ConsoleLogger.TaskFinishedHandler (Sender, finished_args as TaskFinishedEventArgs);
else if (!(EventArgs is BuildStartedEventArgs))
if (EventArgs is ProjectStartedEventArgs) {
var pfa = finished_args as ProjectFinishedEventArgs;
// FIXME: BuildFinishedHandlerActual sends us BuildFinishedEventArgs via PopEvent
if (pfa == null)
return;
ConsoleLogger.ProjectFinishedHandler (Sender, pfa);
} else if (EventArgs is TargetStartedEventArgs) {
var fa = finished_args as TargetFinishedEventArgs;
// FIXME: BuildFinishedHandlerActual sends us BuildFinishedEventArgs via PopEvent
if (fa == null)
return;
ConsoleLogger.TargetFinishedHandler (Sender, fa);
} else if (EventArgs is TaskStartedEventArgs) {
// FIXME: BuildFinishedHandlerActual sends us BuildFinishedEventArgs via PopEvent
if (!(finished_args is TaskFinishedEventArgs))
return;
ConsoleLogger.TaskFinishedHandler (Sender, (TaskFinishedEventArgs) finished_args);
} else if (!(EventArgs is BuildStartedEventArgs))
throw new InvalidOperationException ("Unexpected event on the stack, type: " + EventArgs.GetType ());
}
}
@@ -560,11 +560,8 @@ namespace Microsoft.Build.BuildEngine {
get {
// This is used as the fall back version if the
// project can't find a version to use
// Hard-coded to 2.0, so it allows even vs2005 projects
// to build correctly, as they won't have a ToolsVersion
// set!
return String.IsNullOrEmpty (defaultToolsVersion)
? "2.0"
? "4.0"
: defaultToolsVersion;
}
set {
@@ -99,8 +99,12 @@ namespace Microsoft.Build.BuildEngine {
try {
TaskExecutionMode taskExecutionMode;
string reason;
if (!BuildTargetNeeded (out reason)) {
bool skip_completely;
if (!BuildTargetNeeded (out reason, out skip_completely)) {
LogTargetSkipped (target, reason);
if (skip_completely)
return true;
taskExecutionMode = TaskExecutionMode.SkipAndSetOutput;
} else {
taskExecutionMode = TaskExecutionMode.Complete;
@@ -113,8 +117,27 @@ namespace Microsoft.Build.BuildEngine {
//FIXME: parsing attributes repeatedly
IBuildTask bt = target.BuildTasks [i];
// HACK: need some form of cross references checks
var tem = taskExecutionMode;
if (tem == TaskExecutionMode.SkipAndSetOutput) {
var bti = bt as BuildTask;
//
// BuildTargetNeeded checks only files timestamps but ignores any metadata dependencies
// that way we can end up in the situation when output metadata are populated but from
// incomplete dependencies.
//
// E.g.
// <CreateItem Include="$(IntermediateOutputPath)%(_PngImage.LogicalName)" AdditionalMetadata="LogicalName=%(_PngImage.LogicalName)">
// <Output TaskParameter="Include" />
// </CreateItem>
//
if (bti != null && bti.Name == "CreateItem")
tem = TaskExecutionMode.Complete;
}
TaskBatchingImpl batchingImpl = new TaskBatchingImpl (project);
bool task_result = batchingImpl.Build (bt, taskExecutionMode, out executeOnErrors);
bool task_result = batchingImpl.Build (bt, tem, out executeOnErrors);
if (task_result)
continue;
@@ -149,15 +172,17 @@ namespace Microsoft.Build.BuildEngine {
ParseAttribute (outputs);
}
bool BuildTargetNeeded (out string reason)
bool BuildTargetNeeded (out string reason, out bool skipCompletely)
{
reason = String.Empty;
ITaskItem [] inputFiles;
ITaskItem [] outputFiles;
DateTime youngestInput, oldestOutput;
skipCompletely = false;
if (String.IsNullOrEmpty (inputs.Trim ()))
if (String.IsNullOrEmpty (inputs.Trim ())) {
return true;
}
if (String.IsNullOrEmpty (outputs.Trim ())) {
project.ParentEngine.LogError ("Target {0} has inputs but no outputs specified.", name);
@@ -178,6 +203,7 @@ namespace Microsoft.Build.BuildEngine {
}
if (inputFiles == null || inputFiles.Length == 0) {
skipCompletely = true;
reason = String.Format ("No input files were specified for target {0}, skipping.", name);
return false;
}
@@ -112,6 +112,7 @@
<Compile Include="Microsoft.Build.BuildEngine\TaskBatchingImpl.cs" />
<Compile Include="Microsoft.Build.BuildEngine\TaskDatabase.cs" />
<Compile Include="Microsoft.Build.BuildEngine\TaskEngine.cs" />
<Compile Include="Microsoft.Build.BuildEngine\TaskExecutionMode.cs" />
<Compile Include="Microsoft.Build.BuildEngine\Token.cs" />
<Compile Include="Microsoft.Build.BuildEngine\Toolset.cs" />
<Compile Include="Microsoft.Build.BuildEngine\ToolsetCollection.cs" />
@@ -39,7 +39,9 @@ public static class Consts {
public static string BinPath {
get {
if (RunningOnMono ()) {
#if XBUILD_12
#if XBUILD_14
string profile = "xbuild_14";
#elif XBUILD_12
string profile = "xbuild_12";
#elif NET_4_5
string profile = "net_4_5";
@@ -54,7 +56,9 @@ public static class Consts {
var lib = Path.GetDirectoryName (Path.GetDirectoryName (corlib));
return Path.Combine (lib, profile);
} else {
#if XBUILD_12
#if XBUILD_14
return ToolLocationHelper.GetPathToBuildTools ("14.0");
#elif XBUILD_12
return ToolLocationHelper.GetPathToBuildTools ("12.0");
#elif NET_4_5
return ToolLocationHelper.GetPathToDotNetFramework (TargetDotNetFrameworkVersion.Version45);
@@ -71,7 +75,9 @@ public static class Consts {
public static string ToolsVersionString {
get {
#if XBUILD_12
#if XBUILD_14
return " ToolsVersion='14.0'";
#elif XBUILD_12
return " ToolsVersion='12.0'";
#elif NET_4_0
return " ToolsVersion='4.0'";
@@ -85,7 +91,9 @@ public static class Consts {
public static string GetTasksAsmPath ()
{
#if XBUILD_12
#if XBUILD_14
return Path.Combine (BinPath, "Microsoft.Build.Tasks.Core.dll");
#elif XBUILD_12
return Path.Combine (BinPath, "Microsoft.Build.Tasks.v12.0.dll");
#elif NET_4_0
return Path.Combine (BinPath, "Microsoft.Build.Tasks.v4.0.dll");
@@ -53,8 +53,13 @@ namespace Microsoft.Build.Utilities
#if XBUILD_12
Version451,
#endif
#if XBUILD_14
Version453,
#endif
#if XBUILD_12
#if XBUILD_14
VersionLatest = Version453
#elif XBUILD_12
VersionLatest = Version451
#elif NET_4_5
VersionLatest = Version45
@@ -233,11 +233,20 @@ namespace Microsoft.Build.Utilities
public static string GetPathToBuildTools (string toolsVersion)
{
if (toolsVersion != "12.0")
string path;
switch (toolsVersion) {
case "12.0":
path = "xbuild_12";
break;
case "14.0":
path = "xbuild_14";
break;
default:
return null;
}
if (Environment.GetEnvironmentVariable ("TESTING_MONO") != null)
return Path.Combine (lib_mono_dir, "xbuild_12");
return Path.Combine (lib_mono_dir, path);
if (runningOnDotNet) {
//see http://msdn.microsoft.com/en-us/library/vstudio/bb397428(v=vs.120).aspx
@@ -1,12 +1,14 @@
//
// ToolTask.cs: Base class for command line tool tasks.
//
// Author:
// Authors:
// Marek Sieradzki ([email protected])
// Ankit Jain ([email protected])
// Marek Safar ([email protected])
//
// (C) 2005 Marek Sieradzki
// Copyright 2009 Novell, Inc (http://www.novell.com)
// Copyright 2014 Xamarin Inc
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -90,12 +92,45 @@ namespace Microsoft.Build.Utilities
return true;
}
string CreateToolPath ()
{
string tp;
if (string.IsNullOrEmpty (ToolPath)) {
tp = GenerateFullPathToTool ();
if (string.IsNullOrEmpty (tp))
return null;
//
// GenerateFullPathToTool can return path including tool name
//
if (string.IsNullOrEmpty (ToolExe))
return tp;
tp = Path.GetDirectoryName (tp);
} else {
tp = ToolPath;
}
var path = Path.Combine (tp, ToolExe);
if (!File.Exists (path)) {
if (Log != null)
Log.LogError ("Tool executable '{0}' could not be found", path);
return null;
}
return path;
}
public override bool Execute ()
{
if (SkipTaskExecution ())
return true;
exitCode = ExecuteTool (GenerateFullPathToTool (), GenerateResponseFileCommands (),
var tool_path = CreateToolPath ();
if (tool_path == null)
return false;
exitCode = ExecuteTool (tool_path, GenerateResponseFileCommands (),
GenerateCommandLineCommands ());
// HandleTaskExecutionErrors is called only if exitCode != 0
@@ -289,14 +324,14 @@ namespace Microsoft.Build.Utilities
protected virtual string GenerateCommandLineCommands ()
{
return null;
return "";
}
protected abstract string GenerateFullPathToTool ();
protected virtual string GenerateResponseFileCommands ()
{
return null;
return "";
}
protected virtual string GetResponseFileSwitch (string responseFilePath)
@@ -26,6 +26,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
@@ -424,6 +425,53 @@ namespace MonoTests.Microsoft.Build.Utilities {
Assert.AreEqual (a.ToolPath, "Bar", "#5");
a.ToolPath = "";
Assert.AreEqual (a.ToolPath, "", "#6");
a.Execute ();
}
[Test]
public void Execute_1 ()
{
var t = new TestExecuteToolTask ();
t.OnExecuteTool = delegate { Assert.Fail ("#1"); };
t.BuildEngine = new MockBuildEngine ();
Assert.IsFalse (t.Execute (), "result");
}
[Test]
public void Execute_2 ()
{
var t = new TestExecuteToolTask ();
t.BuildEngine = new MockBuildEngine ();
t.ToolPath = Directory.GetCurrentDirectory ();
t.ToolExe = "Makefile";
t.OnExecuteTool = (pathToTool, responseFileCommands, commandLineCommands) => {
Assert.AreEqual (Path.Combine (Directory.GetCurrentDirectory (), "Makefile"), pathToTool, "#1");
Assert.AreEqual ("", responseFileCommands, "#2");
Assert.AreEqual ("", commandLineCommands, "#3");
};
Assert.IsTrue (t.Execute (), "result");
}
[Test]
public void Execute_3 ()
{
var t = new TestExecuteToolTask ();
t.FullPathToTool = "fpt";
t.BuildEngine = new MockBuildEngine ();
t.ToolExe = "Makefile.mk";
t.OnExecuteTool = (pathToTool, responseFileCommands, commandLineCommands) => {
Assert.AreEqual ("Makefile.mk", pathToTool, "#1");
Assert.AreEqual ("", responseFileCommands, "#2");
Assert.AreEqual ("", commandLineCommands, "#3");
};
Assert.IsFalse (t.Execute (), "result");
}
}
@@ -548,9 +596,86 @@ namespace MonoTests.Microsoft.Build.Utilities {
}
protected override string GenerateFullPathToTool ()
{
return "";
}
}
class MockBuildEngine : IBuildEngine
{
public int ColumnNumberOfTaskNode {
get {
return 0;
}
}
public bool ContinueOnError {
get {
throw new NotImplementedException ();
}
}
public int LineNumberOfTaskNode {
get {
return 0;
}
}
public string ProjectFileOfTaskNode {
get {
return "ProjectFileOfTaskNode";
}
}
public bool BuildProjectFile (string projectFileName, string[] targetNames, IDictionary globalProperties, IDictionary targetOutputs)
{
throw new NotImplementedException ();
}
public void LogCustomEvent (CustomBuildEventArgs e)
{
}
public void LogErrorEvent (BuildErrorEventArgs e)
{
Console.WriteLine (e.Message);
}
public void LogMessageEvent (BuildMessageEventArgs e)
{
}
public void LogWarningEvent (BuildWarningEventArgs e)
{
}
}
class TestExecuteToolTask : ToolTask
{
public Action<string, string, string> OnExecuteTool;
public string FullPathToTool;
protected override string ToolName {
get { return "TestTool.exe"; }
}
protected override bool CallHostObjectToExecute ()
{
return base.CallHostObjectToExecute ();
}
protected override string GenerateFullPathToTool ()
{
return FullPathToTool;
}
protected override int ExecuteTool (string pathToTool, string responseFileCommands, string commandLineCommands)
{
if (OnExecuteTool != null)
OnExecuteTool (pathToTool, responseFileCommands, commandLineCommands);
return 0;
}
}
}
@@ -263,6 +263,9 @@ namespace Microsoft.Build.Evaluation
#endif
#if XBUILD_12
AddToolset (new Toolset ("12.0", ToolLocationHelper.GetPathToBuildTools ("12.0"), this, null));
#endif
#if XBUILD_14
AddToolset (new Toolset ("14.0", ToolLocationHelper.GetPathToBuildTools ("14.0"), this, null));
#endif
default_tools_version = toolsets.First ().ToolsVersion;
}
+3 -1
View File
@@ -6,7 +6,9 @@ LIBRARY = Mono.CSharp.dll
LIB_MCS_FLAGS = -r:System.Core.dll -r:System.Xml.dll -r:System.dll
ifeq (monotouch, $(PROFILE))
MOBILE_STATIC := $(filter mobile_static monotouch, $(PROFILE))
ifdef MOBILE_STATIC
LIB_MCS_FLAGS += -d:IOS_REFLECTION
endif
@@ -146,6 +146,15 @@ namespace MonoTests.EvaluatorTest
Assert.IsTrue (Evaluator.Run ("x();"), "#2");
}
[Test]
public void CapturedLocalVariable ()
{
Evaluator.Run ("using System;");
var res = Evaluator.Evaluate("var x = 123; Action a = () => x++; a(); x;");
Assert.AreEqual (124, res);
}
#if NET_4_0
[Test]
public void DynamicStatement ()
@@ -104,7 +104,15 @@ namespace MonoTests.EvaluatorTest
{
Evaluator.Run ("class A { class B { } }");
Evaluator.Run ("var x = new A ();");
}
[Test]
public void DelegateType ()
{
Evaluator.Run ("public delegate int D();");
Evaluator.Run ("D d = delegate () { return 7; };");
object res = Evaluator.Evaluate ("d();");
Assert.AreEqual (7, res);
}
}
}
@@ -0,0 +1,13 @@
#include Mono.CSharp.dll.sources
../corlib/System.Reflection.Emit/AssemblyBuilderAccess.cs
../corlib/System.Reflection.Emit/FlowControl.cs
../corlib/System.Reflection.Emit/OpCode.cs
../corlib/System.Reflection.Emit/OpCodeNames.cs
../corlib/System.Reflection.Emit/OpCodes.cs
../corlib/System.Reflection.Emit/OpCodeType.cs
../corlib/System.Reflection.Emit/OperandType.cs
../corlib/System.Reflection.Emit/PEFileKinds.cs
../corlib/System.Reflection.Emit/Label.cs
../corlib/System.Reflection.Emit/MethodToken.cs
../corlib/System.Reflection.Emit/StackBehaviour.cs
monotouch.cs
@@ -1,13 +1,2 @@
#include Mono.CSharp.dll.sources
../corlib/System.Reflection.Emit/AssemblyBuilderAccess.cs
../corlib/System.Reflection.Emit/FlowControl.cs
../corlib/System.Reflection.Emit/OpCode.cs
../corlib/System.Reflection.Emit/OpCodeNames.cs
../corlib/System.Reflection.Emit/OpCodes.cs
../corlib/System.Reflection.Emit/OpCodeType.cs
../corlib/System.Reflection.Emit/OperandType.cs
../corlib/System.Reflection.Emit/PEFileKinds.cs
../corlib/System.Reflection.Emit/Label.cs
../corlib/System.Reflection.Emit/MethodToken.cs
../corlib/System.Reflection.Emit/StackBehaviour.cs
monotouch.cs
#include mobile_static_Mono.CSharp.dll.sources
monotouch.cs
-4
View File
@@ -9,8 +9,4 @@ LIB_MCS_FLAGS = /r:$(corlib) -keyfile:$(LIBRARY_SNK) -r:System.Core.dll -d:NET_3
NO_TEST = yes
ifneq (net_2_0, $(PROFILE))
NO_INSTALL = yes
endif
include ../../build/library.make
@@ -41,7 +41,9 @@ using System.ComponentModel;
using System.Diagnostics;
using System.Net.Sockets;
using System.Globalization;
using System.Security;
using System.Text;
using System.Runtime.InteropServices;
namespace Mono.Data.Tds.Protocol
{
@@ -1468,7 +1470,7 @@ namespace Mono.Data.Tds.Protocol
t3.Domain = this.connectionParms.DefaultDomain;
t3.Host = this.connectionParms.Hostname;
t3.Username = this.connectionParms.User;
t3.Password = this.connectionParms.Password;
t3.Password = GetPlainPassword(this.connectionParms.Password);
Comm.StartPacket (TdsPacketType.SspAuth); // 0x11
Comm.Append (t3.GetBytes ());
@@ -1919,6 +1921,20 @@ namespace Mono.Data.Tds.Protocol
comm.Skip(4);
}
public static string GetPlainPassword(SecureString secPass)
{
IntPtr plainString = IntPtr.Zero;
try
{
plainString = Marshal.SecureStringToGlobalAllocUnicode(secPass);
return Marshal.PtrToStringUni(plainString);
}
finally
{
Marshal.ZeroFreeGlobalAllocUnicode(plainString);
}
}
#endregion // Private Methods
#if NET_2_0
@@ -29,6 +29,7 @@
//
using System;
using System.Security;
namespace Mono.Data.Tds.Protocol {
public sealed class Tds42 : Tds
@@ -77,7 +78,7 @@ namespace Mono.Data.Tds.Protocol {
Comm.Append ((byte) (tmp.Length < 30 ? tmp.Length : 30));
// password (offset 62 0x3e)
tmp = Comm.Append (connectionParameters.Password, 30, pad);
tmp = Comm.Append (GetPlainPassword(connectionParameters.Password), 30, pad);
Comm.Append ((byte) (tmp.Length < 30 ? tmp.Length : 30));
// hostproc (offset 93 0x5d)
@@ -145,7 +146,7 @@ namespace Mono.Data.Tds.Protocol {
// remote passwords
Comm.Append (empty, 2, pad);
tmp = Comm.Append (connectionParameters.Password, 253, pad);
tmp = Comm.Append (GetPlainPassword(connectionParameters.Password), 253, pad);
Comm.Append ((byte) (tmp.Length < 253 ? tmp.Length + 2 : 253 + 2));
// tds version
@@ -31,6 +31,7 @@
using Mono.Data.Tds;
using System;
using System.Text;
using System.Security;
namespace Mono.Data.Tds.Protocol
{
@@ -118,7 +119,7 @@ namespace Mono.Data.Tds.Protocol
// password (offset 62 0x3e)
// 62-92
tmp = Comm.Append (connectionParameters.Password, 30, pad);
tmp = Comm.Append (GetPlainPassword(connectionParameters.Password), 30, pad);
Comm.Append ((byte) (tmp.Length < 30 ? tmp.Length : 30));
// hostproc (offset 93 0x5d)
@@ -187,7 +188,7 @@ namespace Mono.Data.Tds.Protocol
// remote passwords
// 202-457
Comm.Append (empty, 2, pad);
tmp = Comm.Append (connectionParameters.Password, 253, pad);
tmp = Comm.Append (GetPlainPassword(connectionParameters.Password), 253, pad);
Comm.Append ((byte) (tmp.Length < 253 ? tmp.Length + 2 : 253 + 2));
// tds version
@@ -37,6 +37,7 @@
using System;
using System.Globalization;
using System.Text;
using System.Security;
using Mono.Security.Protocol.Ntlm;
@@ -392,11 +393,12 @@ namespace Mono.Data.Tds.Protocol
return IsConnected;
}
private static string EncryptPassword (string pass)
private static string EncryptPassword (SecureString secPass)
{
int xormask = 0x5a5a;
int len = pass.Length;
int len = secPass.Length;
char[] chars = new char[len];
string pass = GetPlainPassword(secPass);
for (int i = 0; i < len; ++i) {
int c = ((int) (pass[i])) ^ xormask;
@@ -487,6 +489,19 @@ namespace Mono.Data.Tds.Protocol
Comm.Append ((byte) 0x00); // no param meta data name
Comm.Append ((byte) 0x00); // no status flags
// Convert BigNVarChar values larger than 4000 chars to nvarchar(max)
// Need to do this here so WritePreparedParameterInfo emit the
// correct data type
foreach (TdsMetaParameter param2 in parameters) {
var colType = param2.GetMetaType ();
if (colType == TdsColumnType.BigNVarChar) {
int size = param2.GetActualSize ();
if ((size >> 1) > 4000)
param2.Size = -1;
}
}
// Write sql as a parameter value - UCS2
TdsMetaParameter param = new TdsMetaParameter ("sql",
@@ -31,6 +31,7 @@
//
using System;
using System.Security;
namespace Mono.Data.Tds.Protocol
{
@@ -42,7 +43,8 @@ namespace Mono.Data.Tds.Protocol
public string Hostname;
public string Language;
public string LibraryName;
public string Password;
public SecureString Password;
public bool PasswordSet;
public string ProgName;
public string User;
public bool DomainLogin;
@@ -62,7 +64,8 @@ namespace Mono.Data.Tds.Protocol
Hostname = System.Net.Dns.GetHostName();
Language = String.Empty;
LibraryName = "Mono";
Password = String.Empty;
Password = new SecureString();
PasswordSet = false;
ProgName = "Mono";
User = String.Empty;
DomainLogin = false;
+2 -2
View File
@@ -27,11 +27,11 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace bug4786test
namespace MonoTests.Mono.Data.Tds
{
using NUnit.Framework;
using Mono.Data.Tds.Protocol;
using global::Mono.Data.Tds.Protocol;
using System;
using System.Net;
using System.Net.Sockets;
@@ -155,11 +155,12 @@ namespace Mono.Debugger.Soft
[Flags]
enum InvokeFlags {
NONE = 0x0,
DISABLE_BREAKPOINTS = 0x1,
SINGLE_THREADED = 0x2,
OUT_THIS = 0x4,
OUT_ARGS = 0x8,
NONE = 0,
DISABLE_BREAKPOINTS = 1,
SINGLE_THREADED = 2,
OUT_THIS = 4,
OUT_ARGS = 8,
VIRTUAL = 16,
}
enum ElementType {
@@ -416,7 +417,7 @@ namespace Mono.Debugger.Soft
* with newer runtimes, and vice versa.
*/
internal const int MAJOR_VERSION = 2;
internal const int MINOR_VERSION = 35;
internal const int MINOR_VERSION = 38;
enum WPSuspendPolicy {
NONE = 0,
@@ -584,7 +585,8 @@ namespace Mono.Debugger.Soft
enum CmdStackFrame {
GET_VALUES = 1,
GET_THIS = 2,
SET_VALUES = 3
SET_VALUES = 3,
GET_DOMAIN = 4,
}
enum CmdArrayRef {
@@ -2377,6 +2379,10 @@ namespace Mono.Debugger.Soft
SendReceive (CommandSet.STACK_FRAME, (int)CmdStackFrame.SET_VALUES, new PacketWriter ().WriteId (thread_id).WriteId (id).WriteInt (len).WriteInts (pos).WriteValues (values));
}
internal long StackFrame_GetDomain (long thread_id, long id) {
return SendReceive (CommandSet.STACK_FRAME, (int)CmdStackFrame.GET_DOMAIN, new PacketWriter ().WriteId (thread_id).WriteId (id)).ReadId ();
}
/*
* ARRAYS
*/
@@ -22,6 +22,11 @@ namespace Mono.Debugger.Soft
/*
* Return the values of out arguments
*/
ReturnOutArgs = 8
ReturnOutArgs = 8,
/*
* Do a virtual invoke
* Since protocol version 2.37
*/
Virtual = 16
}
}
@@ -307,6 +307,8 @@ namespace Mono.Debugger.Soft
f |= InvokeFlags.OUT_THIS;
if ((options & InvokeOptions.ReturnOutArgs) != 0)
f |= InvokeFlags.OUT_ARGS;
if ((options & InvokeOptions.Virtual) != 0)
f |= InvokeFlags.VIRTUAL;
InvokeAsyncResult r = new InvokeAsyncResult { AsyncState = state, AsyncWaitHandle = new ManualResetEvent (false), VM = vm, Thread = thread, Callback = callback };
thread.InvalidateFrames ();
@@ -7,6 +7,7 @@ namespace Mono.Debugger.Soft
public class StackFrame : Mirror
{
ThreadMirror thread;
AppDomainMirror domain;
MethodMirror method;
int il_offset;
Location location;
@@ -32,6 +33,16 @@ namespace Mono.Debugger.Soft
}
}
public AppDomainMirror Domain {
get {
vm.CheckProtocolVersion (2, 38);
if (domain == null)
domain = vm.GetDomain (vm.conn.StackFrame_GetDomain (thread.Id, Id));
return domain;
}
}
public MethodMirror Method {
get {
return method;
@@ -22,6 +22,10 @@ public class TestsBase
static string base_static_s = "C";
#pragma warning restore 0414
#pragma warning restore 0169
public virtual string virtual_method () {
return "V1";
}
}
public enum AnEnum {
@@ -1365,6 +1369,10 @@ public class Tests : TestsBase, ITest2
j = 5;
set_ip_2 ();
}
public override string virtual_method () {
return "V2";
}
}
class TypeLoadClass {
@@ -2137,6 +2137,11 @@ public class DebuggerTests
v = this_obj.InvokeMethod (e.Thread, m, null);
AssertValue (42, v);
// virtual call
m = t.BaseType.GetMethod ("virtual_method");
v = this_obj.InvokeMethod (e.Thread, m, null, InvokeOptions.Virtual);
AssertValue ("V2", v);
#if NET_4_5
// instance
m = t.GetMethod ("invoke_pass_ref");
@@ -2864,8 +2869,10 @@ public class DebuggerTests
var frames = e.Thread.GetFrames ();
Assert.AreEqual ("invoke_in_domain", frames [0].Method.Name);
Assert.AreEqual (domain, frames [0].Domain);
Assert.AreEqual ("invoke", frames [1].Method.Name);
Assert.AreEqual ("domains", frames [2].Method.Name);
Assert.AreEqual (vm.RootDomain, frames [2].Domain);
// Test breakpoints on already JITted methods in other domains
m = entry_point.DeclaringType.GetMethod ("invoke_in_domain_2");
+4 -2
View File
@@ -9,7 +9,9 @@ LIB_MCS_FLAGS = -r:System.dll -r:System.Core.dll \
-d:MONO_INTERPRETER \
-delaysign -keyfile:../mono.pub
ifeq (monotouch, $(subst _runtime,,$(PROFILE)))
MOBILE_STATIC := $(filter mobile_static monotouch monotouch_runtime, $(PROFILE))
ifdef MOBILE_STATIC
mono_dynamic_interpreter_deps = $(the_libdir_base)plaincore/System.Core.dll
LIB_MCS_FLAGS += -lib:$(the_libdir_base)plaincore
endif
@@ -21,4 +23,4 @@ $(the_libdir_base)Mono.Dynamic.Interpreter.dll: $(mono_dynamic_interpreter_deps)
$(the_libdir_base)plaincore/System.Core.dll:
(cd ../System.Core; $(MAKE) $@)
.NOTPARALLEL: $(the_libdir_base)plaincore/System.Core.dll
.NOTPARALLEL: $(the_libdir_base)plaincore/System.Core.dll
@@ -39,7 +39,7 @@ using NUnit.Framework;
#if NDESK_OPTIONS
namespace Tests.NDesk.Options
#else
namespace Tests.Mono.Options
namespace MonoTests.Mono.Options
#endif
{
[TestFixture]
@@ -46,7 +46,7 @@ using NUnit.Framework;
#if NDESK_OPTIONS
namespace Tests.NDesk.Options
#else
namespace Tests.Mono.Options
namespace MonoTests.Mono.Options
#endif
{
class FooConverter : TypeConverter {
@@ -39,7 +39,7 @@ using NUnit.Framework;
#if NDESK_OPTIONS
namespace Tests.NDesk.Options
#else
namespace Tests.Mono.Options
namespace MonoTests.Mono.Options
#endif
{
class DefaultOption : Option {
@@ -31,7 +31,7 @@ using System;
#if NDESK_OPTIONS
namespace Tests.NDesk.Options
#else
namespace Tests.Mono.Options
namespace MonoTests.Mono.Options
#endif
{
static class Utils {
@@ -195,6 +195,11 @@ namespace Mono.Unix.Native {
return FromTimeT (time);
}
public static DateTime ToDateTime (long time, long nanoTime)
{
return FromTimeT (time).AddMilliseconds (nanoTime / 1000);
}
public static long FromDateTime (DateTime time)
{
return ToTimeT (time);
@@ -192,7 +192,7 @@ namespace Mono.Unix {
}
public DateTime LastAccessTime {
get {AssertValid (); return Native.NativeConvert.ToDateTime (stat.st_atime);}
get {AssertValid (); return Native.NativeConvert.ToDateTime (stat.st_atime, stat.st_atime_nsec);}
}
public DateTime LastAccessTimeUtc {
@@ -200,7 +200,7 @@ namespace Mono.Unix {
}
public DateTime LastWriteTime {
get {AssertValid (); return Native.NativeConvert.ToDateTime (stat.st_mtime);}
get {AssertValid (); return Native.NativeConvert.ToDateTime (stat.st_mtime, stat.st_mtime_nsec);}
}
public DateTime LastWriteTimeUtc {
@@ -208,7 +208,7 @@ namespace Mono.Unix {
}
public DateTime LastStatusChangeTime {
get {AssertValid (); return Native.NativeConvert.ToDateTime (stat.st_ctime);}
get {AssertValid (); return Native.NativeConvert.ToDateTime (stat.st_ctime, stat.st_ctime_nsec);}
}
public DateTime LastStatusChangeTimeUtc {
@@ -221,15 +221,13 @@ namespace Mono.Security.Cryptography {
string msg = Locale.GetText ("Could not create user key store '{0}'.");
throw new CryptographicException (String.Format (msg, _userPath), e);
}
if (!ProtectUser (_userPath)) {
string msg = Locale.GetText ("Could not secure user key store '{0}'.");
throw new IOException (String.Format (msg, _userPath));
}
_userPathExists = true;
}
}
if (!IsUserProtected (_userPath) && !ProtectUser (_userPath)) {
string msg = Locale.GetText ("Could not secure user key store '{0}'.");
throw new IOException (String.Format (msg, _userPath));
}
}
// is it properly protected ?
if (!IsUserProtected (_userPath)) {
@@ -258,15 +256,13 @@ namespace Mono.Security.Cryptography {
string msg = Locale.GetText ("Could not create machine key store '{0}'.");
throw new CryptographicException (String.Format (msg, _machinePath), e);
}
if (!ProtectMachine (_machinePath)) {
string msg = Locale.GetText ("Could not secure machine key store '{0}'.");
throw new IOException (String.Format (msg, _machinePath));
}
_machinePathExists = true;
}
}
if (!IsMachineProtected (_machinePath) && !ProtectMachine (_machinePath)) {
string msg = Locale.GetText ("Could not secure machine key store '{0}'.");
throw new IOException (String.Format (msg, _machinePath));
}
}
// is it properly protected ?
if (!IsMachineProtected (_machinePath)) {
@@ -97,10 +97,26 @@ namespace Mono.Security.X509 {
// methods
public void Clear ()
{
/*
* Both _certificates and _crls extend CollectionBase, whose Clear() method calls OnClear() and
* OnClearComplete(), which should be overridden in derivative classes. So we should not worry about
* other threads that might be holding references to _certificates or _crls. They should be smart enough
* to handle this gracefully. And if not, it's their own fault.
*/
ClearCertificates ();
ClearCrls ();
}
void ClearCertificates()
{
if (_certificates != null)
_certificates.Clear ();
_certificates = null;
}
void ClearCrls ()
{
if (_crls != null)
_crls.Clear ();
_crls = null;
@@ -117,6 +133,7 @@ namespace Mono.Security.X509 {
fs.Write (data, 0, data.Length);
fs.Close ();
}
ClearCertificates (); // We have modified the store on disk. So forget the old state.
}
#if !NET_2_1
// Try to save privateKey if available..
@@ -141,6 +158,7 @@ namespace Mono.Security.X509 {
byte[] data = crl.RawData;
fs.Write (data, 0, data.Length);
}
ClearCrls (); // We have modified the store on disk. So forget the old state.
}
}
@@ -149,6 +167,7 @@ namespace Mono.Security.X509 {
string filename = Path.Combine (_storePath, GetUniqueName (certificate));
if (File.Exists (filename)) {
File.Delete (filename);
ClearCertificates (); // We have modified the store on disk. So forget the old state.
}
}
@@ -157,6 +176,7 @@ namespace Mono.Security.X509 {
string filename = Path.Combine (_storePath, GetUniqueName (crl));
if (File.Exists (filename)) {
File.Delete (filename);
ClearCrls (); // We have modified the store on disk. So forget the old state.
}
}
@@ -236,8 +256,13 @@ namespace Mono.Security.X509 {
cspParams.Flags = CspProviderFlags.UseMachineKeyStore;
KeyPairPersistence kpp = new KeyPairPersistence (cspParams);
if (!kpp.Load ())
try {
if (!kpp.Load ())
return cert;
}
catch {
return cert;
}
if (cert.RSA != null)
cert.RSA = new RSACryptoServiceProvider (cspParams);
+1 -1
View File
@@ -10,7 +10,7 @@ NO_TEST = yes
# This is a .NET 2.0+ only assembly
VALID_PROFILE := $(filter net_2_0 net_4_0 net_4_5, $(PROFILE))
VALID_PROFILE := $(filter net_4_0 net_4_5, $(PROFILE))
ifndef VALID_PROFILE
LIBRARY_NAME = dummy-Mono.Simd.dll
NO_INSTALL = yes
@@ -12,7 +12,7 @@ CLEAN_FILES += $(STRING_MESSAGES)
EXTRA_DISTFILES = \
src/ComponentModel/Strings.resx
VALID_PROFILE := $(filter net_4_0 net_4_5 monotouch monodroid xammac mobile_static, $(PROFILE))
VALID_PROFILE := $(filter net_4_0 net_4_5 monotouch monodroid xammac mobile mobile_static, $(PROFILE))
ifndef VALID_PROFILE
LIBRARY_NAME = dummy-System.ComponentModel.Composition.dll
NO_INSTALL = yes
@@ -18,7 +18,7 @@ endif
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
# This is a .NET 3.5+ assembly
VALID_PROFILE := $(filter net_2_0 net_4_0 net_4_5 monotouch monodroid xammac mobile_static, $(PROFILE))
VALID_PROFILE := $(filter net_2_0 net_4_0 net_4_5 monotouch monodroid xammac mobile mobile_static, $(PROFILE))
ifndef VALID_PROFILE
LIBRARY_NAME = dummy-System.ComponentModel.DataAnnotations.dll
NO_INSTALL = yes
@@ -0,0 +1 @@
#include net_4_5_System.ComponentModel.DataAnnotations.dll.sources
+24 -6
View File
@@ -10,17 +10,16 @@ ifneq (2.1, $(FRAMEWORK_VERSION))
LIB_MCS_FLAGS += -d:NET_3_5 -nowarn:1720
endif
ifeq (monodroid, $(PROFILE))
LIB_MCS_FLAGS += -d:FEATURE_CORE_DLR,FEATURE_REFEMIT,ANDROID
endif
MOBILE_DYNAMIC := $(filter monodroid xammac mobile, $(PROFILE))
MOBILE_STATIC := $(filter mobile_static monotouch monotouch_runtime, $(PROFILE))
ifeq (xammac, $(PROFILE))
ifdef MOBILE_DYNAMIC
LIB_MCS_FLAGS += -d:FEATURE_CORE_DLR,FEATURE_REFEMIT
endif
system_core_plain_libdir = $(the_libdir_base)plaincore
ifeq (monotouch, $(subst _runtime,,$(PROFILE)))
ifdef MOBILE_STATIC
extra_test_flags := -exclude:NotWorkingInterpreter
system_core_library_deps = $(the_libdir_base)Mono.Dynamic.Interpreter.dll $(system_core_plain_libdir)/System.Core.dll
LIB_MCS_FLAGS += -d:FEATURE_CORE_DLR
@@ -72,4 +71,23 @@ ifneq ($(PROFILE),basic)
csproj-local:
$(MAKE) csproj-local intermediate=plaincore/
endif
endif
endif
#
# Android TimeZoneInfo testing....
#
tzi.exe: ../corlib/System/AndroidPlatform.cs $(wildcard System/TimeZone*.cs) ../../build/common/Consts.cs ../Mono.Options/Mono.Options/Options.cs
mcs /debug+ /out:$@ /unsafe "/d:INSIDE_CORLIB;MONODROID;NET_4_0;LIBC;SELF_TEST" $^
android-pull-tzdb:
mkdir -p android/tzdb/usr/share/zoneinfo
mkdir -p android/tzdb/misc/zoneinfo/zoneinfo
android_root=`adb shell echo '$$ANDROID_ROOT' | tr -d "\r"` ; \
android_data=`adb shell echo '$$ANDROID_DATA' | tr -d "\r"` ; \
adb $(ADB_TARGET) pull $$android_root/usr/share/zoneinfo android/tzdb/usr/share/zoneinfo ; \
adb $(ADB_TARGET) pull $$android_data/misc/zoneinfo/tzdata android/tzdb/misc/zoneinfo
mkdir -p android/tzdb/
android-dump-tzdata: tzi.exe android-pull-tzdb
__XA_OVERRIDE_TIMEZONE_ID__=America/New_York ANDROID_ROOT=`pwd` ANDROID_DATA=`pwd` mono --debug tzi.exe -o android/tzdata
@@ -24,13 +24,16 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#if (INSIDE_CORLIB && NET_4_0) || (!INSIDE_CORLIB && (NET_3_5 && !NET_4_0 && !MOBILE))
#if INSIDE_CORLIB || (NET_3_5 && !NET_4_0 && !MOBILE)
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace System
{
public sealed partial class TimeZoneInfo {
#if NET_4_0 || !INSIDE_CORLIB
public
#endif
sealed partial class TimeZoneInfo {
[SerializableAttribute]
#if MOBILE
[TypeForwardedFrom (Consts.AssemblySystem_Core)]
@@ -246,6 +246,7 @@ namespace System {
tzdataPath, offset, length, r, buffer.Length));
}
TimeZoneInfo.DumpTimeZoneDataToFile (id, buffer);
return buffer;
}
}
@@ -453,29 +454,29 @@ namespace System {
: db.GetAvailableIds ();
}
static TimeZoneInfo _GetTimeZone (string name)
static TimeZoneInfo _GetTimeZone (string id, string name)
{
if (db == null)
return null;
byte[] buffer = db.GetTimeZoneData (name);
if (buffer == null)
return null;
return TimeZoneInfo.ParseTZBuffer (name, buffer, buffer.Length);
return TimeZoneInfo.ParseTZBuffer (id, buffer, buffer.Length);
}
internal static TimeZoneInfo GetTimeZone (string id)
internal static TimeZoneInfo GetTimeZone (string id, string name)
{
if (id != null) {
if (id == "GMT" || id == "UTC")
return new TimeZoneInfo (id, TimeSpan.FromSeconds (0), id, id, id, null, true);
if (id.StartsWith ("GMT"))
if (name != null) {
if (name == "GMT" || name == "UTC")
return new TimeZoneInfo (id, TimeSpan.FromSeconds (0), id, name, name, null, disableDaylightSavingTime:true);
if (name.StartsWith ("GMT"))
return new TimeZoneInfo (id,
TimeSpan.FromSeconds (ParseNumericZone (id)),
id, id, id, null, true);
TimeSpan.FromSeconds (ParseNumericZone (name)),
id, name, name, null, disableDaylightSavingTime:true);
}
try {
return _GetTimeZone (id);
return _GetTimeZone (id, name);
} catch (Exception) {
return null;
}
@@ -533,12 +534,12 @@ namespace System {
static readonly object _lock = new object ();
static TimeZoneInfo defaultZone;
internal static TimeZoneInfo Default {
internal static TimeZoneInfo Local {
get {
lock (_lock) {
if (defaultZone != null)
return defaultZone;
return defaultZone = GetTimeZone (GetDefaultTimeZoneName ());
return defaultZone = GetTimeZone ("Local", GetDefaultTimeZoneName ());
}
}
}
@@ -553,7 +554,10 @@ namespace System {
{
IntPtr value = IntPtr.Zero;
int n = 0;
string defaultTimeZone;
string defaultTimeZone = Environment.GetEnvironmentVariable ("__XA_OVERRIDE_TIMEZONE_ID__");
if (!string.IsNullOrEmpty (defaultTimeZone))
return defaultTimeZone;
// Used by the tests
if (Environment.GetEnvironmentVariable ("__XA_USE_JAVA_DEFAULT_TIMEZONE_ID__") == null)
@@ -576,25 +580,52 @@ namespace System {
#if SELF_TEST
/*
* Compile:
* mcs /out:tzi.exe /unsafe "/d:INSIDE_CORLIB;MONODROID;NET_4_0;LIBC;SELF_TEST" System/TimeZone*.cs ../../build/common/Consts.cs ../Mono.Options/Mono.Options/Options.cs
* mcs /debug+ /out:tzi.exe /unsafe "/d:INSIDE_CORLIB;MONODROID;NET_4_0;LIBC;SELF_TEST" ../corlib/System/AndroidPlatform.cs System/TimeZone*.cs ../../build/common/Consts.cs ../Mono.Options/Mono.Options/Options.cs
* Prep:
* mkdir -p usr/share/zoneinfo
* mkdir -p android/tzdb/usr/share/zoneinfo
* mkdir -p android/tzdb/misc/zoneinfo/zoneinfo
* android_root=`adb shell echo '$ANDROID_ROOT' | tr -d "\r"`
* adb pull $android_root/usr/share/zoneinfo usr/share/zoneinfo
* android_data=`adb shell echo '$ANDROID_DATA' | tr -d "\r"`
* adb pull $android_root/usr/share/zoneinfo android/tzdb/usr/share/zoneinfo
* adb pull $android_data/misc/zoneinfo/tzdata android/tzdb/misc/zoneinfo
* Run:
* ANDROID_ROOT=`pwd` mono tzi.exe
* # Dump all timezone names
* __XA_OVERRIDE_TIMEZONE_ID__=America/New_York ANDROID_ROOT=`pwd` ANDROID_DATA=`pwd` mono --debug tzi.exe --offset=1969-01-01
*
* # Dump TimeZone data to files under path `tzdata`
* __XA_OVERRIDE_TIMEZONE_ID__=America/New_York ANDROID_ROOT=`pwd` ANDROID_DATA=`pwd` mono --debug tzi.exe -o android/tzdata
*
* # Dump TimeZone rules for specific timezone data (as dumped above)
* mono tzi.exe --offset=2012-10-24 -i=tzdata/Asia/Amman
*/
static void Main (string[] args)
{
DateTime? offset = null;
Func<IAndroidTimeZoneDB> c = () => GetDefaultTimeZoneDB ();
bool dump_rules = false;
Mono.Options.OptionSet p = null;
p = new Mono.Options.OptionSet () {
{ "i=",
"TimeZone data {FILE} to parse and dump",
v => DumpTimeZoneFile (v, offset)
},
{ "o=",
"Write TimeZone data files to {PATH}",
v => TimeZoneInfo.TimeZoneDataExportPath = v
},
{ "T=", "Create AndroidTzData from {PATH}.", v => {
c = () => new AndroidTzData (v);
} },
{ "Z=", "Create ZoneInfoDB from {DIR}.", v => {
c = () => new ZoneInfoDB (v);
} },
{ "offset=", "Show timezone info offset for DateTime {OFFSET}.", v => {
offset = DateTime.Parse (v);
Console.WriteLine ("Using DateTime Offset: {0}", offset);
} },
{ "R|dump-rules",
"Show timezone info offset for DateTime {OFFSET}.",
v => dump_rules = v != null },
{ "help", "Show this message and exit", v => {
p.WriteOptionDescriptions (Console.Out);
Environment.Exit (0);
@@ -606,9 +637,16 @@ namespace System {
foreach (var id in GetAvailableIds ()) {
Console.Write ("name={0,-40}", id);
try {
TimeZoneInfo zone = _GetTimeZone (id);
if (zone != null)
Console.Write (" {0}", zone);
TimeZoneInfo zone = _GetTimeZone (id, id);
if (zone != null) {
Console.Write (" {0,-40}", zone);
if (offset.HasValue) {
Console.Write ("From Offset: {0}", zone.GetUtcOffset (offset.Value));
}
if (dump_rules) {
WriteZoneRules (zone);
}
}
else {
Console.Write (" ERROR:null");
}
@@ -619,6 +657,53 @@ namespace System {
Console.WriteLine ();
}
}
static void WriteZoneRules (TimeZoneInfo zone)
{
var rules = zone.GetAdjustmentRules ();
for (int i = 0; i < rules.Length; ++i) {
var rule = rules [i];
Console.WriteLine ();
Console.Write ("\tAdjustmentRules[{0,3}]: DaylightDelta={1}; DateStart={2:yyyy-MM}; DateEnd={3:yyyy-MM}; DaylightTransitionStart={4:D2}-{5:D2}T{6}; DaylightTransitionEnd={7:D2}-{8:D2}T{9}",
i,
rule.DaylightDelta,
rule.DateStart, rule.DateEnd,
rule.DaylightTransitionStart.Month, rule.DaylightTransitionStart.Day, rule.DaylightTransitionStart.TimeOfDay.TimeOfDay,
rule.DaylightTransitionEnd.Month, rule.DaylightTransitionEnd.Day, rule.DaylightTransitionEnd.TimeOfDay.TimeOfDay);
}
}
static void DumpTimeZoneFile (string path, DateTime? time)
{
var buffer = File.ReadAllBytes (path);
var zone = ParseTZBuffer (path, buffer, buffer.Length);
Console.Write ("Rules for: {0}", path);
WriteZoneRules (zone);
Console.WriteLine ();
if (time.HasValue) {
var offset = zone.GetUtcOffset (time.Value);
var isDst = zone.IsDaylightSavingTime (time.Value);
Console.WriteLine ("\tDate({0}): Offset({1}) IsDST({2})", time.Value, offset, isDst);
}
}
#endif
}
#if SELF_TEST
static string TimeZoneDataExportPath;
#endif
internal static void DumpTimeZoneDataToFile (string id, byte[] buffer)
{
#if SELF_TEST
int p = id.LastIndexOf ('/');
var o = Path.Combine (TimeZoneDataExportPath,
p >= 0 ? id.Substring (0, p) : id);
if (p >= 0)
o = Path.Combine (o, id.Substring (p+1));
Directory.CreateDirectory (Path.GetDirectoryName (o));
using (var f = File.OpenWrite (o))
f.Write (buffer, 0, buffer.Length);
#endif
}
}
@@ -64,12 +64,15 @@ namespace System {
[DllImport ("__Internal")]
extern static IntPtr monotouch_timezone_get_data (string name, ref int size);
static Stream GetMonoTouchData (string name)
static Stream GetMonoTouchData (string name, bool throw_on_error = true)
{
int size = 0;
IntPtr data = monotouch_timezone_get_data (name, ref size);
if (size <= 0)
throw new TimeZoneNotFoundException ();
if (size <= 0) {
if (throw_on_error)
throw new TimeZoneNotFoundException ();
return null;
}
unsafe {
var s = new UnmanagedMemoryStream ((byte*) data, size);
@@ -24,7 +24,7 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#if (INSIDE_CORLIB && NET_4_0) || (!INSIDE_CORLIB && (NET_3_5 && !NET_4_0 && !MOBILE))
#if INSIDE_CORLIB || (NET_3_5 && !NET_4_0 && !MOBILE)
using System.Collections.Generic;
using System.Globalization;
@@ -33,7 +33,10 @@ using System.Text;
namespace System
{
public partial class TimeZoneInfo
#if NET_4_0 || !INSIDE_CORLIB
public
#endif
partial class TimeZoneInfo
{
public static TimeZoneInfo FromSerializedString (string source)
{
@@ -24,14 +24,17 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#if (INSIDE_CORLIB && NET_4_0) || (!INSIDE_CORLIB && (NET_3_5 && !NET_4_0 && !MOBILE))
#if INSIDE_CORLIB || (NET_3_5 && !NET_4_0 && !MOBILE)
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace System
{
public sealed partial class TimeZoneInfo
#if NET_4_0 || !INSIDE_CORLIB
public
#endif
sealed partial class TimeZoneInfo
{
[SerializableAttribute]
#if MOBILE
+170 -45
View File
@@ -35,7 +35,7 @@ using System.Threading;
[assembly:TypeForwardedTo (typeof(TimeZoneInfo))]
#elif (INSIDE_CORLIB && NET_4_0) || (!INSIDE_CORLIB && (NET_3_5 && !NET_4_0 && !MOBILE))
#elif INSIDE_CORLIB || (NET_3_5 && !NET_4_0 && !MOBILE)
using System.Collections.Generic;
using System.Collections.ObjectModel;
@@ -57,7 +57,10 @@ namespace System
[TypeForwardedFrom (Consts.AssemblySystemCore_3_5)]
#endif
[SerializableAttribute]
public sealed partial class TimeZoneInfo : IEquatable<TimeZoneInfo>, ISerializable, IDeserializationCallback
#if NET_4_0 || !INSIDE_CORLIB
public
#endif
sealed partial class TimeZoneInfo : IEquatable<TimeZoneInfo>, ISerializable, IDeserializationCallback
{
TimeSpan baseUtcOffset;
public TimeSpan BaseUtcOffset {
@@ -100,15 +103,31 @@ namespace System
}
}
/*
TimeZone transitions are stored when there is a change on the base offset.
*/
private List<KeyValuePair<DateTime, TimeType>> transitions;
static TimeZoneInfo CreateLocal ()
{
#if MONODROID
return AndroidTimeZones.Default;
return AndroidTimeZones.Local;
#elif MONOTOUCH
using (Stream stream = GetMonoTouchData (null)) {
return BuildFromStream ("Local", stream);
}
#elif LIBC
var tz = Environment.GetEnvironmentVariable ("TZ");
if (tz != null) {
if (tz == String.Empty)
return Utc;
try {
return FindSystemTimeZoneByFileName (tz, Path.Combine (TimeZoneDirectory, tz));
} catch {
return Utc;
}
}
try {
return FindSystemTimeZoneByFileName ("Local", "/etc/localtime");
} catch {
@@ -332,8 +351,7 @@ namespace System
if (dateTime.Kind == DateTimeKind.Utc)
return dateTime;
//FIXME: do not rely on DateTime implementation !
return DateTime.SpecifyKind (dateTime.ToUniversalTime (), DateTimeKind.Utc);
return ConvertTimeToUtc (dateTime, TimeZoneInfo.Local);
}
public static DateTime ConvertTimeToUtc (DateTime dateTime, TimeZoneInfo sourceTimeZone)
@@ -350,15 +368,9 @@ namespace System
if (sourceTimeZone.IsInvalidTime (dateTime))
throw new ArgumentException ("dateTime parameter is an invalid time");
if (dateTime.Kind == DateTimeKind.Utc && sourceTimeZone == TimeZoneInfo.Utc)
return dateTime;
if (dateTime.Kind == DateTimeKind.Utc)
return dateTime;
if (dateTime.Kind == DateTimeKind.Local)
return ConvertTimeToUtc (dateTime);
if (sourceTimeZone.IsAmbiguousTime (dateTime) || !sourceTimeZone.IsDaylightSavingTime (dateTime))
return DateTime.SpecifyKind (dateTime - sourceTimeZone.BaseUtcOffset, DateTimeKind.Utc);
else {
@@ -415,7 +427,7 @@ namespace System
}
#endif
#if MONODROID
var timeZoneInfo = AndroidTimeZones.GetTimeZone (id);
var timeZoneInfo = AndroidTimeZones.GetTimeZone (id, id);
if (timeZoneInfo == null)
throw new TimeZoneNotFoundException ();
return timeZoneInfo;
@@ -644,14 +656,16 @@ namespace System
#endif
#if MONODROID
foreach (string id in AndroidTimeZones.GetAvailableIds ()) {
var tz = AndroidTimeZones.GetTimeZone (id);
var tz = AndroidTimeZones.GetTimeZone (id, id);
if (tz != null)
systemTimeZones.Add (tz);
}
#elif MONOTOUCH
if (systemTimeZones.Count == 0) {
foreach (string name in GetMonoTouchNames ()) {
using (Stream stream = GetMonoTouchData (name)) {
using (Stream stream = GetMonoTouchData (name, false)) {
if (stream == null)
continue;
systemTimeZones.Add (BuildFromStream (name, stream));
}
}
@@ -682,13 +696,8 @@ namespace System
public TimeSpan GetUtcOffset (DateTime dateTime)
{
if (IsDaylightSavingTime (dateTime)) {
AdjustmentRule rule = GetApplicableRule (dateTime);
if (rule != null)
return BaseUtcOffset + rule.DaylightDelta;
}
return BaseUtcOffset;
bool isDST;
return GetUtcOffset (dateTime, out isDST);
}
public TimeSpan GetUtcOffset (DateTimeOffset dateTimeOffset)
@@ -696,6 +705,82 @@ namespace System
throw new NotImplementedException ();
}
private TimeSpan GetUtcOffset (DateTime dateTime, out bool isDST)
{
isDST = false;
TimeZoneInfo tz = this;
if (dateTime.Kind == DateTimeKind.Utc)
tz = TimeZoneInfo.Utc;
if (dateTime.Kind == DateTimeKind.Local)
tz = TimeZoneInfo.Local;
bool isTzDst;
var tzOffset = GetUtcOffset (dateTime, tz, out isTzDst);
if (tz == this) {
isDST = isTzDst;
return tzOffset;
}
var utcTicks = dateTime.Ticks - tzOffset.Ticks;
if (utcTicks < 0 || utcTicks > DateTime.MaxValue.Ticks)
return BaseUtcOffset;
var utcDateTime = new DateTime (utcTicks, DateTimeKind.Utc);
return GetUtcOffset (utcDateTime, this, out isDST);
}
private static TimeSpan GetUtcOffset (DateTime dateTime, TimeZoneInfo tz, out bool isDST)
{
if (dateTime.Kind == DateTimeKind.Local && tz != TimeZoneInfo.Local)
throw new Exception ();
isDST = false;
if (tz == TimeZoneInfo.Utc)
return TimeSpan.Zero;
TimeSpan offset;
if (tz.TryGetTransitionOffset(dateTime, out offset, out isDST))
return offset;
if (dateTime.Kind == DateTimeKind.Utc) {
var utcRule = tz.GetApplicableRule (dateTime);
if (utcRule != null && tz.IsInDST (utcRule, dateTime)) {
isDST = true;
return tz.BaseUtcOffset + utcRule.DaylightDelta;
}
return tz.BaseUtcOffset;
}
var stdTicks = dateTime.Ticks - tz.BaseUtcOffset.Ticks;
if (stdTicks < 0 || stdTicks > DateTime.MaxValue.Ticks)
return tz.BaseUtcOffset;
var stdUtcDateTime = new DateTime (stdTicks, DateTimeKind.Utc);
var tzRule = tz.GetApplicableRule (stdUtcDateTime);
DateTime dstUtcDateTime = DateTime.MinValue;
if (tzRule != null) {
var dstTicks = stdUtcDateTime.Ticks - tzRule.DaylightDelta.Ticks;
if (dstTicks < 0 || dstTicks > DateTime.MaxValue.Ticks)
return tz.BaseUtcOffset;
dstUtcDateTime = new DateTime (dstTicks, DateTimeKind.Utc);
}
if (tzRule != null && tz.IsInDST (tzRule, stdUtcDateTime) && tz.IsInDST (tzRule, dstUtcDateTime)) {
isDST = true;
return tz.BaseUtcOffset + tzRule.DaylightDelta;
}
return tz.BaseUtcOffset;
}
public bool HasSameRules (TimeZoneInfo other)
{
if (other == null)
@@ -750,6 +835,16 @@ namespace System
throw new NotImplementedException ();
}
private bool IsInDST (AdjustmentRule rule, DateTime dateTime)
{
// Check whether we're in the dateTime year's DST period
if (IsInDSTForYear (rule, dateTime, dateTime.Year))
return true;
// We might be in the dateTime previous year's DST period
return IsInDSTForYear (rule, dateTime, dateTime.Year - 1);
}
bool IsInDSTForYear (AdjustmentRule rule, DateTime dateTime, int year)
{
DateTime DST_start = TransitionPoint (rule.DaylightTransitionStart, year);
@@ -772,25 +867,11 @@ namespace System
if (!SupportsDaylightSavingTime)
return false;
//FIXME: do not rely on DateTime implementation !
if ((dateTime.Kind == DateTimeKind.Local || dateTime.Kind == DateTimeKind.Unspecified) && this == TimeZoneInfo.Local)
return dateTime.IsDaylightSavingTime ();
//FIXME: do not rely on DateTime implementation !
if (dateTime.Kind == DateTimeKind.Local && this != TimeZoneInfo.Utc)
return IsDaylightSavingTime (DateTime.SpecifyKind (dateTime.ToUniversalTime (), DateTimeKind.Utc));
AdjustmentRule rule = GetApplicableRule (dateTime.Date);
if (rule == null)
return false;
// Check whether we're in the dateTime year's DST period
if (IsInDSTForYear (rule, dateTime, dateTime.Year))
return true;
bool isDst;
GetUtcOffset (dateTime, out isDst);
// We might be in the dateTime previous year's DST period
return IsInDSTForYear (rule, dateTime, dateTime.Year - 1);
return isDst;
}
public bool IsDaylightSavingTime (DateTimeOffset dateTimeOffset)
@@ -967,6 +1048,40 @@ namespace System
return null;
}
private bool TryGetTransitionOffset (DateTime dateTime, out TimeSpan offset,out bool isDst)
{
offset = BaseUtcOffset;
isDst = false;
if (transitions == null)
return false;
//Transitions are always in standard time
DateTime date = dateTime;
if (dateTime.Kind == DateTimeKind.Local && this != TimeZoneInfo.Local)
date = date.ToUniversalTime () + BaseUtcOffset;
if (dateTime.Kind == DateTimeKind.Utc && this != TimeZoneInfo.Utc)
date = date + BaseUtcOffset;
for (var i = transitions.Count - 1; i >= 0; i--) {
var pair = transitions [i];
DateTime ttime = pair.Key;
TimeType ttype = pair.Value;
if (ttime > date)
continue;
offset = new TimeSpan (0, 0, ttype.Offset);
isDst = ttype.IsDst;
return true;
}
return false;
}
private static DateTime TransitionPoint (TransitionTime transition, int year)
{
if (transition.IsFixedDateRule)
@@ -1057,16 +1172,19 @@ namespace System
bool dst_observed = false;
DateTime dst_start = DateTime.MinValue;
List<AdjustmentRule> adjustmentRules = new List<AdjustmentRule> ();
bool storeTransition = false;
for (int i = 0; i < transitions.Count; i++) {
var pair = transitions [i];
DateTime ttime = pair.Key;
TimeType ttype = pair.Value;
if (!ttype.IsDst) {
if (standardDisplayName != ttype.Name || baseUtcOffset.TotalSeconds != ttype.Offset) {
if (standardDisplayName != ttype.Name)
standardDisplayName = ttype.Name;
daylightDisplayName = null;
if (baseUtcOffset.TotalSeconds != ttype.Offset) {
baseUtcOffset = new TimeSpan (0, 0, ttype.Offset);
if (adjustmentRules.Count > 0) // We ignore AdjustmentRules but store transitions.
storeTransition = true;
adjustmentRules = new List<AdjustmentRule> ();
dst_observed = false;
}
@@ -1099,25 +1217,32 @@ namespace System
}
dst_observed = false;
} else {
if (daylightDisplayName != ttype.Name || dstDelta.TotalSeconds != ttype.Offset - baseUtcOffset.TotalSeconds) {
if (daylightDisplayName != ttype.Name)
daylightDisplayName = ttype.Name;
if (dstDelta.TotalSeconds != ttype.Offset - baseUtcOffset.TotalSeconds)
dstDelta = new TimeSpan(0, 0, ttype.Offset) - baseUtcOffset;
}
dst_start = ttime;
dst_observed = true;
}
}
if (adjustmentRules.Count == 0) {
TimeZoneInfo tz;
if (adjustmentRules.Count == 0 && !storeTransition) {
TimeType t = (TimeType)time_types [0];
if (standardDisplayName == null) {
standardDisplayName = t.Name;
baseUtcOffset = new TimeSpan (0, 0, t.Offset);
}
return CreateCustomTimeZone (id, baseUtcOffset, id, standardDisplayName);
tz = CreateCustomTimeZone (id, baseUtcOffset, id, standardDisplayName);
} else {
return CreateCustomTimeZone (id, baseUtcOffset, id, standardDisplayName, daylightDisplayName, ValidateRules (adjustmentRules).ToArray ());
tz = CreateCustomTimeZone (id, baseUtcOffset, id, standardDisplayName, daylightDisplayName, ValidateRules (adjustmentRules).ToArray ());
}
if (storeTransition)
tz.transitions = transitions;
return tz;
}
static Dictionary<int, string> ParseAbbreviations (byte [] buffer, int index, int count)
@@ -232,7 +232,7 @@ namespace MonoTests.System
DateTime afterDST = new DateTime (2007, 10, 28, 2, 0, 0, DateTimeKind.Unspecified);
Assert.IsFalse (london.IsDaylightSavingTime (beforeDST), "Just before DST");
Assert.IsTrue (london.IsDaylightSavingTime (startDST), "the first seconds of DST");
Assert.IsTrue (london.IsDaylightSavingTime (endDST), "The last seconds of DST");
Assert.IsFalse (london.IsDaylightSavingTime (endDST), "The last seconds of DST");
Assert.IsFalse (london.IsDaylightSavingTime (afterDST), "Just after DST");
}
@@ -804,6 +804,143 @@ namespace MonoTests.System
Assert.IsTrue (london.Equals (deserialized));
}
}
[TestFixture]
public class MultipleDaylightSavingTimeTests {
private TimeZoneInfo cairo;
private DateTime dst1Start;
private DateTime dst1End;
private DateTime dst2Start;
private DateTime dst2End;
private TimeSpan baseUtcOffset;
private TimeSpan dstUtcOffset;
private TimeSpan dstOffset;
[SetUp]
public void CreateTimeZones ()
{
/*
From 1/1/2014 12:00:00 AM to 6/30/2014 12:00:00 AM
Delta: 01:00:00
Begins at 12:00 AM on 16 May
Ends at 1:00 AM on 29 June
From 7/1/2014 12:00:00 AM to 12/31/2014 12:00:00 AM
Delta: 01:00:00
Begins at 12:00 AM on 29 July
Ends at 12:00 AM on 26 September
*/
dst1Start = new DateTime (2014, 5, 16);
dst1End = new DateTime (2014, 6, 29);
dst2Start = new DateTime (2014, 7, 29);
dst2End = new DateTime (2014, 9, 26);
baseUtcOffset = new TimeSpan (2, 0, 0);
dstUtcOffset = new TimeSpan (3, 0, 0);
dstOffset = dstUtcOffset - baseUtcOffset;
var rule1 = TimeZoneInfo.AdjustmentRule.CreateAdjustmentRule (
new DateTime (2014, 1, 1), new DateTime (2014, 6, 30), dstOffset,
CreateFixedDateRule (dst1Start), CreateFixedDateRule (dst1End));
var rule2 = TimeZoneInfo.AdjustmentRule.CreateAdjustmentRule (
new DateTime (2014, 7, 1), new DateTime (2014, 12, 31), dstOffset,
CreateFixedDateRule (dst2Start), CreateFixedDateRule (dst2End));
cairo = TimeZoneInfo.CreateCustomTimeZone ("Africa/Cairo", baseUtcOffset, "Africa/Cairo", "EET", "EEST",
new [] {rule1, rule2});
}
private static TimeZoneInfo.TransitionTime CreateFixedDateRule (DateTime dateTime)
{
var time = new DateTime (dateTime.Ticks - dateTime.Date.Ticks);
return TimeZoneInfo.TransitionTime.CreateFixedDateRule (time, dateTime.Month, dateTime.Day);
}
[Test]
public void GetUtcOffset_FromUTC ()
{
var d = dst1Start.Add (-baseUtcOffset);
d = DateTime.SpecifyKind (d, DateTimeKind.Utc);
Assert.AreEqual(baseUtcOffset, cairo.GetUtcOffset (d.Add (new TimeSpan(0,0,0,-1))));
Assert.AreEqual(dstUtcOffset, cairo.GetUtcOffset (d));
Assert.AreEqual(dstUtcOffset, cairo.GetUtcOffset (d.Add (new TimeSpan(0,0,0, 1))));
d = dst1End.Add (-baseUtcOffset-dstOffset);
d = DateTime.SpecifyKind (d, DateTimeKind.Utc);
Assert.AreEqual(dstUtcOffset, cairo.GetUtcOffset (d.Add (new TimeSpan(0,0,0,-1))));
Assert.AreEqual(baseUtcOffset, cairo.GetUtcOffset (d));
Assert.AreEqual(baseUtcOffset, cairo.GetUtcOffset (d.Add (new TimeSpan(0,0,0, 1))));
d = dst2Start.Add (-baseUtcOffset);
d = DateTime.SpecifyKind (d, DateTimeKind.Utc);
Assert.AreEqual(baseUtcOffset, cairo.GetUtcOffset (d.Add (new TimeSpan(0,0,0,-1))));
Assert.AreEqual(dstUtcOffset, cairo.GetUtcOffset (d));
Assert.AreEqual(dstUtcOffset, cairo.GetUtcOffset (d.Add (new TimeSpan(0,0,0, 1))));
d = dst2End.Add (-baseUtcOffset-dstOffset);
d = DateTime.SpecifyKind (d, DateTimeKind.Utc);
Assert.AreEqual(dstUtcOffset, cairo.GetUtcOffset (d.Add (new TimeSpan(0,0,0,-1))));
Assert.AreEqual(baseUtcOffset, cairo.GetUtcOffset (d));
Assert.AreEqual(baseUtcOffset, cairo.GetUtcOffset (d.Add (new TimeSpan(0,0,0, 1))));
}
[Test]
public void GetUtcOffset_FromLocal ()
{
var d = dst1Start.Add (-baseUtcOffset);
d = DateTime.SpecifyKind (d, DateTimeKind.Utc);
d = d.ToLocalTime ();
Assert.AreEqual(baseUtcOffset, cairo.GetUtcOffset (d.Add (new TimeSpan(0,0,0,-1))));
Assert.AreEqual(dstUtcOffset, cairo.GetUtcOffset (d));
Assert.AreEqual(dstUtcOffset, cairo.GetUtcOffset (d.Add (new TimeSpan(0,0,0, 1))));
d = dst1End.Add (-baseUtcOffset-dstOffset);
d = DateTime.SpecifyKind (d, DateTimeKind.Utc);
d = d.ToLocalTime ();
Assert.AreEqual(dstUtcOffset, cairo.GetUtcOffset (d.Add (new TimeSpan(0,0,0,-1))));
Assert.AreEqual(baseUtcOffset, cairo.GetUtcOffset (d));
Assert.AreEqual(baseUtcOffset, cairo.GetUtcOffset (d.Add (new TimeSpan(0,0,0, 1))));
d = dst2Start.Add (-baseUtcOffset);
d = DateTime.SpecifyKind (d, DateTimeKind.Utc);
d = d.ToLocalTime ();
Assert.AreEqual(baseUtcOffset, cairo.GetUtcOffset (d.Add (new TimeSpan(0,0,0,-1))));
Assert.AreEqual(dstUtcOffset, cairo.GetUtcOffset (d));
Assert.AreEqual(dstUtcOffset, cairo.GetUtcOffset (d.Add (new TimeSpan(0,0,0, 1))));
d = dst2End.Add (-baseUtcOffset-dstOffset);
d = DateTime.SpecifyKind (d, DateTimeKind.Utc);
d = d.ToLocalTime ();
Assert.AreEqual(dstUtcOffset, cairo.GetUtcOffset (d.Add (new TimeSpan(0,0,0,-1))));
Assert.AreEqual(baseUtcOffset, cairo.GetUtcOffset (d));
Assert.AreEqual(baseUtcOffset, cairo.GetUtcOffset (d.Add (new TimeSpan(0,0,0, 1))));
}
[Test]
public void GetUtcOffset_FromUnspecified ()
{
var d = dst1Start.Add (dstOffset);
Assert.AreEqual(baseUtcOffset, cairo.GetUtcOffset (d.Add (new TimeSpan(0,0,0,-1))));
Assert.AreEqual(dstUtcOffset, cairo.GetUtcOffset (d));
Assert.AreEqual(dstUtcOffset, cairo.GetUtcOffset (d.Add (new TimeSpan(0,0,0, 1))));
d = dst1End.Add (-dstOffset);
Assert.AreEqual(dstUtcOffset, cairo.GetUtcOffset (d.Add (new TimeSpan(0,0,0,-1))));
Assert.AreEqual(baseUtcOffset, cairo.GetUtcOffset (d));
Assert.AreEqual(baseUtcOffset, cairo.GetUtcOffset (d.Add (new TimeSpan(0,0,0, 1))));
d = dst2Start.Add (dstOffset);
Assert.AreEqual(baseUtcOffset, cairo.GetUtcOffset (d.Add (new TimeSpan(0,0,0,-1))));
Assert.AreEqual(dstUtcOffset, cairo.GetUtcOffset (d));
Assert.AreEqual(dstUtcOffset, cairo.GetUtcOffset (d.Add (new TimeSpan(0,0,0, 1))));
d = dst2End.Add (-dstOffset);
Assert.AreEqual(dstUtcOffset, cairo.GetUtcOffset (d.Add (new TimeSpan(0,0,0,-1))));
Assert.AreEqual(baseUtcOffset, cairo.GetUtcOffset (d));
Assert.AreEqual(baseUtcOffset, cairo.GetUtcOffset (d.Add (new TimeSpan(0,0,0, 1))));
}
}
}
}
#endif
@@ -1,109 +1,4 @@
Assembly/AssemblyInfo.cs
System/Actions.cs
System/Funcs.cs
System/InvalidTimeZoneException.cs
System/TimeZoneInfo.AdjustmentRule.cs
System/TimeZoneInfo.cs
System/TimeZoneInfo.Serialization.cs
System/TimeZoneInfo.TransitionTime.cs
System/TimeZoneNotFoundException.cs
System/Util.cs
System.Runtime.CompilerServices/DynamicAttribute.cs
System.Runtime.CompilerServices/ExecutionScope.cs
System.Runtime.CompilerServices/ExtensionAttribute.cs
System.Runtime.CompilerServices/IStrongBox.cs
System.Runtime.CompilerServices/StrongBox_T.cs
System.Linq/Check.cs
System.Linq/Enumerable.cs
System.Linq/QueryableEnumerable.cs
System.Linq/QueryableTransformer.cs
System.Linq/Grouping.cs
System.Linq/IGrouping.cs
System.Linq/IOrderedQueryable.cs
System.Linq/IOrderedQueryable_T.cs
System.Linq/IOrderedEnumerable_T.cs
System.Linq/IQueryable.cs
System.Linq/IQueryable_T.cs
System.Linq/Lookup.cs
System.Linq/ILookup_T.cs
System.Linq/OrderedEnumerable.cs
System.Linq/OrderedSequence.cs
System.Linq/Queryable.cs
System.Linq/QuickSort.cs
System.Linq/SortContext.cs
System.Linq/SortDirection.cs
System.Linq/SortSequenceContext.cs
System.Linq/IQueryProvider.cs
System.Collections.Generic/HashSet.cs
System.Security.Cryptography/Aes.cs
System.Threading/LockRecursionPolicy.cs
System.Threading/ReaderWriterLockSlim.cs
System.Threading/ThreadLockState.cs
System.Threading/ReaderWriterLockSlimExtensions.cs
System.Linq.Parallel.QueryNodes/QueryBaseNode.cs
System.Linq.Parallel.QueryNodes/QueryCastNode.cs
System.Linq.Parallel.QueryNodes/QueryChildNode.cs
System.Linq.Parallel.QueryNodes/QueryConcatNode.cs
System.Linq.Parallel.QueryNodes/QueryDefaultEmptyNode.cs
System.Linq.Parallel.QueryNodes/QueryGroupByNode.cs
System.Linq.Parallel.QueryNodes/QueryHeadWorkerNode.cs
System.Linq.Parallel.QueryNodes/QueryJoinNode.cs
System.Linq.Parallel.QueryNodes/QueryMuxNode.cs
System.Linq.Parallel.QueryNodes/QueryOptionNode.cs
System.Linq.Parallel.QueryNodes/QueryOrderByNode.cs
System.Linq.Parallel.QueryNodes/QueryOrderGuardNode.cs
System.Linq.Parallel.QueryNodes/QueryOrderedStreamNode.cs
System.Linq.Parallel.QueryNodes/QueryReverseNode.cs
System.Linq.Parallel.QueryNodes/QuerySelectManyNode.cs
System.Linq.Parallel.QueryNodes/QuerySelectNode.cs
System.Linq.Parallel.QueryNodes/QuerySetNode.cs
System.Linq.Parallel.QueryNodes/QueryStartNode.cs
System.Linq.Parallel.QueryNodes/QueryStreamNode.cs
System.Linq.Parallel.QueryNodes/QueryWhereNode.cs
System.Linq.Parallel.QueryNodes/QueryZipNode.cs
System.Linq.Parallel.QueryNodes/SetInclusion.cs
System.Linq.Parallel.QueryNodes/WrapHelper.cs
System.Linq.Parallel/AggregationList.cs
System.Linq.Parallel/ConcurrentGrouping.cs
System.Linq.Parallel/ConcurrentLookup.cs
System.Linq.Parallel/INodeVisitor.cs
System.Linq.Parallel/IVisitableNode.cs
System.Linq.Parallel/OrderingEnumerator.cs
System.Linq.Parallel/ParallelExecuter.cs
System.Linq.Parallel/ParallelPartitioner.cs
System.Linq.Parallel/ParallelQueryEnumerator.cs
System.Linq.Parallel/ParallelQuickSort.cs
System.Linq.Parallel/QueryCheckerVisitor.cs
System.Linq.Parallel/QueryIsOrderedVisitor.cs
System.Linq.Parallel/QueryOptions.cs
System.Linq.Parallel/RangeList.cs
System.Linq.Parallel/RepeatList.cs
System.Linq.Parallel/ReverseList.cs
System.Linq.Parallel/StripPartitioner.cs
System.Linq.Parallel/TemporaryArea.cs
System.Linq/EnumerableExecutor.cs
System.Linq/EnumerableExecutor_T.cs
System.Linq/EnumerableQuery.cs
System.Linq/EnumerableQuery_T.cs
System.Linq/OrderedParallelQuery.cs
System.Linq/ParallelEnumerable.cs
System.Linq/ParallelExecutionMode.cs
System.Linq/ParallelMergeOptions.cs
System.Linq/ParallelQuery.cs
System.IO.MemoryMappedFiles/MemoryMappedFile.cs
System.IO.MemoryMappedFiles/MemoryMappedFileAccess.cs
System.IO.MemoryMappedFiles/MemoryMappedFileOptions.cs
System.IO.MemoryMappedFiles/MemoryMappedFileRights.cs
System.IO.MemoryMappedFiles/MemoryMappedFileSecurity.cs
System.IO.MemoryMappedFiles/MemoryMappedViewStream.cs
System.IO.MemoryMappedFiles/MemoryMappedViewAccessor.cs
Microsoft.Win32.SafeHandles/SafeMemoryMappedFileHandle.cs
Microsoft.Win32.SafeHandles/SafeMemoryMappedViewHandle.cs
System.IO/HandleInheritability.cs
System.Threading.Tasks/TaskExtensions.cs
System.Linq.Expressions/Extensions.cs
System.Linq.Expressions/ExpressionTransformer.cs
../dlr/Runtime/Microsoft.Scripting.Core/Ast/DynamicExpression.cs
../dlr/Runtime/Microsoft.Scripting.Core/Compiler/Closure.cs
System.Linq.Expressions/DynamicExpressionVisitor.cs
#include mobile_common_System.Core.dll.sources
#include dynamic_System.Core.dll.sources
@@ -0,0 +1,108 @@
Assembly/AssemblyInfo.cs
System/Actions.cs
System/Funcs.cs
System/InvalidTimeZoneException.cs
System/TimeZoneInfo.AdjustmentRule.cs
System/TimeZoneInfo.cs
System/TimeZoneInfo.Serialization.cs
System/TimeZoneInfo.TransitionTime.cs
System/TimeZoneNotFoundException.cs
System/Util.cs
System.Runtime.CompilerServices/DynamicAttribute.cs
System.Runtime.CompilerServices/ExecutionScope.cs
System.Runtime.CompilerServices/ExtensionAttribute.cs
System.Runtime.CompilerServices/IStrongBox.cs
System.Runtime.CompilerServices/StrongBox_T.cs
System.Linq/Check.cs
System.Linq/Enumerable.cs
System.Linq/QueryableEnumerable.cs
System.Linq/QueryableTransformer.cs
System.Linq/Grouping.cs
System.Linq/IGrouping.cs
System.Linq/IOrderedQueryable.cs
System.Linq/IOrderedQueryable_T.cs
System.Linq/IOrderedEnumerable_T.cs
System.Linq/IQueryable.cs
System.Linq/IQueryable_T.cs
System.Linq/Lookup.cs
System.Linq/ILookup_T.cs
System.Linq/OrderedEnumerable.cs
System.Linq/OrderedSequence.cs
System.Linq/Queryable.cs
System.Linq/QuickSort.cs
System.Linq/SortContext.cs
System.Linq/SortDirection.cs
System.Linq/SortSequenceContext.cs
System.Linq/IQueryProvider.cs
System.Collections.Generic/HashSet.cs
System.Security.Cryptography/Aes.cs
System.Threading/LockRecursionPolicy.cs
System.Threading/ReaderWriterLockSlim.cs
System.Threading/ThreadLockState.cs
System.Threading/ReaderWriterLockSlimExtensions.cs
System.Linq.Parallel.QueryNodes/QueryBaseNode.cs
System.Linq.Parallel.QueryNodes/QueryCastNode.cs
System.Linq.Parallel.QueryNodes/QueryChildNode.cs
System.Linq.Parallel.QueryNodes/QueryConcatNode.cs
System.Linq.Parallel.QueryNodes/QueryDefaultEmptyNode.cs
System.Linq.Parallel.QueryNodes/QueryGroupByNode.cs
System.Linq.Parallel.QueryNodes/QueryHeadWorkerNode.cs
System.Linq.Parallel.QueryNodes/QueryJoinNode.cs
System.Linq.Parallel.QueryNodes/QueryMuxNode.cs
System.Linq.Parallel.QueryNodes/QueryOptionNode.cs
System.Linq.Parallel.QueryNodes/QueryOrderByNode.cs
System.Linq.Parallel.QueryNodes/QueryOrderGuardNode.cs
System.Linq.Parallel.QueryNodes/QueryOrderedStreamNode.cs
System.Linq.Parallel.QueryNodes/QueryReverseNode.cs
System.Linq.Parallel.QueryNodes/QuerySelectManyNode.cs
System.Linq.Parallel.QueryNodes/QuerySelectNode.cs
System.Linq.Parallel.QueryNodes/QuerySetNode.cs
System.Linq.Parallel.QueryNodes/QueryStartNode.cs
System.Linq.Parallel.QueryNodes/QueryStreamNode.cs
System.Linq.Parallel.QueryNodes/QueryWhereNode.cs
System.Linq.Parallel.QueryNodes/QueryZipNode.cs
System.Linq.Parallel.QueryNodes/SetInclusion.cs
System.Linq.Parallel.QueryNodes/WrapHelper.cs
System.Linq.Parallel/AggregationList.cs
System.Linq.Parallel/ConcurrentGrouping.cs
System.Linq.Parallel/ConcurrentLookup.cs
System.Linq.Parallel/INodeVisitor.cs
System.Linq.Parallel/IVisitableNode.cs
System.Linq.Parallel/OrderingEnumerator.cs
System.Linq.Parallel/ParallelExecuter.cs
System.Linq.Parallel/ParallelPartitioner.cs
System.Linq.Parallel/ParallelQueryEnumerator.cs
System.Linq.Parallel/ParallelQuickSort.cs
System.Linq.Parallel/QueryCheckerVisitor.cs
System.Linq.Parallel/QueryIsOrderedVisitor.cs
System.Linq.Parallel/QueryOptions.cs
System.Linq.Parallel/RangeList.cs
System.Linq.Parallel/RepeatList.cs
System.Linq.Parallel/ReverseList.cs
System.Linq.Parallel/StripPartitioner.cs
System.Linq.Parallel/TemporaryArea.cs
System.Linq/EnumerableExecutor.cs
System.Linq/EnumerableExecutor_T.cs
System.Linq/EnumerableQuery.cs
System.Linq/EnumerableQuery_T.cs
System.Linq/OrderedParallelQuery.cs
System.Linq/ParallelEnumerable.cs
System.Linq/ParallelExecutionMode.cs
System.Linq/ParallelMergeOptions.cs
System.Linq/ParallelQuery.cs
System.IO.MemoryMappedFiles/MemoryMappedFile.cs
System.IO.MemoryMappedFiles/MemoryMappedFileAccess.cs
System.IO.MemoryMappedFiles/MemoryMappedFileOptions.cs
System.IO.MemoryMappedFiles/MemoryMappedFileRights.cs
System.IO.MemoryMappedFiles/MemoryMappedFileSecurity.cs
System.IO.MemoryMappedFiles/MemoryMappedViewStream.cs
System.IO.MemoryMappedFiles/MemoryMappedViewAccessor.cs
Microsoft.Win32.SafeHandles/SafeMemoryMappedFileHandle.cs
Microsoft.Win32.SafeHandles/SafeMemoryMappedViewHandle.cs
System.IO/HandleInheritability.cs
System.Threading.Tasks/TaskExtensions.cs
System.Linq.Expressions/Extensions.cs
System.Linq.Expressions/ExpressionTransformer.cs
../dlr/Runtime/Microsoft.Scripting.Core/Ast/DynamicExpression.cs
../dlr/Runtime/Microsoft.Scripting.Core/Compiler/Closure.cs
System.Linq.Expressions/DynamicExpressionVisitor.cs
@@ -0,0 +1,2 @@
#include mobile_common_System.Core.dll.sources
#include interpreter_System.Core.dll.sources
@@ -1,4 +1,4 @@
#include mobile_System.Core.dll.sources
#include mobile_common_System.Core.dll.sources
#include dynamic_System.Core.dll.sources
@@ -1,3 +1,3 @@
#include mobile_System.Core.dll.sources
#include mobile_common_System.Core.dll.sources
#include interpreter_System.Core.dll.sources
System/TimeZoneInfo.MonoTouch.cs
@@ -1,4 +1,4 @@
#include mobile_System.Core.dll.sources
#include mobile_common_System.Core.dll.sources
#include dynamic_System.Core.dll.sources
+1 -6
View File
@@ -12,17 +12,12 @@ LIB_MCS_FLAGS = \
/resource:./src/DbLinq/Schema/Dbml/DbmlSchema.xsd,DbLinq.Schema.Dbml.DbmlSchema.xsd \
/d:MONO_STRICT /d:MONO_DEPLOY -warn:1
ifeq (2.0, $(FRAMEWORK_VERSION))
# This is a .NET 3.5 only assembly, but built during the 2.0 build
LIB_MCS_FLAGS += -d:NET_3_5 -nowarn:1720
endif
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
EXTRA_DISTFILES = src/DbLinq/Schema/Dbml/DbmlSchema.xsd
# This is a .NET 3.5+ assembly
VALID_PROFILE := $(filter net_2_0 net_4_0 net_4_5, $(PROFILE))
VALID_PROFILE := $(filter net_4_0 net_4_5, $(PROFILE))
ifndef VALID_PROFILE
LIBRARY_NAME = dummy-System.Data.Linq.dll
NO_INSTALL = yes
@@ -95,7 +95,7 @@ namespace System.Data.OracleClient.Oci
IntPtr valuep,
int value_sz,
[MarshalAs (UnmanagedType.U2)] OciDataType dty,
ref short indp,
IntPtr indp,
IntPtr alenp,
IntPtr rcodep,
uint maxarr_len,
@@ -111,7 +111,7 @@ namespace System.Data.OracleClient.Oci
ref IntPtr valuep,
int value_sz,
[MarshalAs (UnmanagedType.U2)] OciDataType dty,
ref short indp,
IntPtr indp,
IntPtr alenp,
IntPtr rcodep,
uint maxarr_len,
@@ -127,7 +127,7 @@ namespace System.Data.OracleClient.Oci
byte[] valuep,
int value_sz,
[MarshalAs (UnmanagedType.U2)] OciDataType dty,
ref short indp,
IntPtr indp,
IntPtr alenp,
IntPtr rcodep,
uint maxarr_len,
@@ -142,7 +142,7 @@ namespace System.Data.OracleClient.Oci
IntPtr valuep,
int value_sz,
[MarshalAs (UnmanagedType.U2)] OciDataType dty,
ref short indp,
IntPtr indp,
IntPtr alenp,
IntPtr rcodep,
uint maxarr_len,
@@ -157,7 +157,7 @@ namespace System.Data.OracleClient.Oci
byte[] valuep,
int value_sz,
[MarshalAs (UnmanagedType.U2)] OciDataType dty,
ref short indp,
IntPtr indp,
IntPtr alenp,
IntPtr rcodep,
uint maxarr_len,
@@ -172,7 +172,7 @@ namespace System.Data.OracleClient.Oci
ref IntPtr valuep,
int value_sz,
[MarshalAs (UnmanagedType.U2)] OciDataType dty,
ref short indp,
IntPtr indp,
IntPtr alenp,
IntPtr rcodep,
uint maxarr_len,
@@ -193,8 +193,8 @@ namespace System.Data.OracleClient.Oci
IntPtr valuep,
int value_sz,
[MarshalAs (UnmanagedType.U4)] OciDataType dty,
ref short indp,
ref short rlenp,
IntPtr indp,
IntPtr rlenp,
IntPtr rcodep,
uint mode);
@@ -206,8 +206,8 @@ namespace System.Data.OracleClient.Oci
ref IntPtr valuep,
int value_sz,
[MarshalAs (UnmanagedType.U4)] OciDataType dty,
ref short indp,
ref short rlenp,
IntPtr indp,
IntPtr rlenp,
IntPtr rcodep,
uint mode);
@@ -547,7 +547,7 @@ namespace System.Data.OracleClient.Oci
IntPtr valuep,
int value_sz,
OciDataType dty,
ref short indp,
IntPtr indp,
IntPtr alenp,
IntPtr rcodep,
uint maxarr_len,
@@ -558,7 +558,7 @@ namespace System.Data.OracleClient.Oci
Trace.WriteLineIf(traceOci, "OCIBindByName", "OCI");
#endif
return OciNativeCalls.OCIBindByName (stmtp, out bindpp, errhp, placeholder, placeh_len, valuep,
value_sz, dty, ref indp, alenp, rcodep, maxarr_len, curelp, mode);
value_sz, dty, indp, alenp, rcodep, maxarr_len, curelp, mode);
}
internal static int OCIBindByNameRef (IntPtr stmtp,
@@ -569,7 +569,7 @@ namespace System.Data.OracleClient.Oci
ref IntPtr valuep,
int value_sz,
OciDataType dty,
ref short indp,
IntPtr indp,
IntPtr alenp,
IntPtr rcodep,
uint maxarr_len,
@@ -580,7 +580,7 @@ namespace System.Data.OracleClient.Oci
Trace.WriteLineIf(traceOci, "OCIBindByName", "OCI");
#endif
return OciNativeCalls.OCIBindByNameRef (stmtp, out bindpp, errhp, placeholder, placeh_len, ref valuep,
value_sz, dty, ref indp, alenp, rcodep, maxarr_len, curelp, mode);
value_sz, dty, indp, alenp, rcodep, maxarr_len, curelp, mode);
}
internal static int OCIBindByNameBytes (IntPtr stmtp,
@@ -591,7 +591,7 @@ namespace System.Data.OracleClient.Oci
byte[] valuep,
int value_sz,
[MarshalAs (UnmanagedType.U2)] OciDataType dty,
ref short indp,
IntPtr indp,
IntPtr alenp,
IntPtr rcodep,
uint maxarr_len,
@@ -602,7 +602,7 @@ namespace System.Data.OracleClient.Oci
Trace.WriteLineIf(traceOci, "OCIBindByName", "OCI");
#endif
return OciNativeCalls.OCIBindByNameBytes (stmtp, out bindpp, errhp, placeholder, placeh_len, valuep,
value_sz, dty, ref indp, alenp, rcodep, maxarr_len, curelp, mode);
value_sz, dty, indp, alenp, rcodep, maxarr_len, curelp, mode);
}
internal static int OCIBindByPos (IntPtr stmtp,
@@ -612,7 +612,7 @@ namespace System.Data.OracleClient.Oci
IntPtr valuep,
int value_sz,
[MarshalAs (UnmanagedType.U2)] OciDataType dty,
ref short indp,
IntPtr indp,
IntPtr alenp,
IntPtr rcodep,
uint maxarr_len,
@@ -623,7 +623,7 @@ namespace System.Data.OracleClient.Oci
Trace.WriteLineIf(traceOci, "OCIBindByPos", "OCI");
#endif
return OciNativeCalls.OCIBindByPos (stmtp, out bindpp, errhp, position, valuep,
value_sz, dty, ref indp, alenp, rcodep, maxarr_len, curelp, mode);
value_sz, dty, indp, alenp, rcodep, maxarr_len, curelp, mode);
}
internal static int OCIBindByPosRef (IntPtr stmtp,
@@ -633,7 +633,7 @@ namespace System.Data.OracleClient.Oci
ref IntPtr valuep,
int value_sz,
[MarshalAs (UnmanagedType.U2)] OciDataType dty,
ref short indp,
IntPtr indp,
IntPtr alenp,
IntPtr rcodep,
uint maxarr_len,
@@ -644,7 +644,7 @@ namespace System.Data.OracleClient.Oci
Trace.WriteLineIf(traceOci, "OCIBindByPos", "OCI");
#endif
return OciNativeCalls.OCIBindByPosRef (stmtp, out bindpp, errhp, position, ref valuep,
value_sz, dty, ref indp, alenp, rcodep, maxarr_len, curelp, mode);
value_sz, dty, indp, alenp, rcodep, maxarr_len, curelp, mode);
}
internal static int OCIBindByPosBytes (IntPtr stmtp,
@@ -654,7 +654,7 @@ namespace System.Data.OracleClient.Oci
byte[] valuep,
int value_sz,
[MarshalAs (UnmanagedType.U2)] OciDataType dty,
ref short indp,
IntPtr indp,
IntPtr alenp,
IntPtr rcodep,
uint maxarr_len,
@@ -665,7 +665,7 @@ namespace System.Data.OracleClient.Oci
Trace.WriteLineIf(traceOci, "OCIBindByPos", "OCI");
#endif
return OciNativeCalls.OCIBindByPosBytes (stmtp, out bindpp, errhp, position, valuep,
value_sz, dty, ref indp, alenp, rcodep, maxarr_len, curelp, mode);
value_sz, dty, indp, alenp, rcodep, maxarr_len, curelp, mode);
}
[DllImport ("oci")]
@@ -723,8 +723,8 @@ namespace System.Data.OracleClient.Oci
IntPtr valuep,
int value_sz,
OciDataType dty,
ref short indp,
ref short rlenp,
IntPtr indp,
IntPtr rlenp,
IntPtr rcodep,
uint mode)
{
@@ -732,7 +732,7 @@ namespace System.Data.OracleClient.Oci
Trace.WriteLineIf(traceOci, "OCIDefineByPos", "OCI");
#endif
return OciNativeCalls.OCIDefineByPos (stmtp, out defnpp, errhp, position, valuep,
value_sz, dty, ref indp, ref rlenp, rcodep, mode);
value_sz, dty, indp, rlenp, rcodep, mode);
}
internal static int OCIDefineByPosPtr (IntPtr stmtp,
@@ -742,8 +742,8 @@ namespace System.Data.OracleClient.Oci
ref IntPtr valuep,
int value_sz,
OciDataType dty,
ref short indp,
ref short rlenp,
IntPtr indp,
IntPtr rlenp,
IntPtr rcodep,
uint mode)
{
@@ -751,7 +751,7 @@ namespace System.Data.OracleClient.Oci
Trace.WriteLineIf(traceOci, "OCIDefineByPosPtr", "OCI");
#endif
return OciNativeCalls.OCIDefineByPosPtr (stmtp, out defnpp, errhp, position, ref valuep,
value_sz, dty, ref indp, ref rlenp, rcodep, mode);
value_sz, dty, indp, rlenp, rcodep, mode);
}
internal static int OCIDescriptorFree (IntPtr hndlp,
@@ -32,16 +32,16 @@ namespace System.Data.OracleClient.Oci
//IntPtr handle;
IntPtr value;
short indicator;
IntPtr indicator;
//OracleType type;
OciDataType ociType;
OciDataType definedType;
int definedSize;
short rlenp = 0;
IntPtr rlenp;
//short precision;
short scale;
Type fieldType;
//string name;
string name;
// Oracle defines the LONG VARCHAR and LONG VARRAW to have a size of 2 to the 31 power - 5
// see DefineLongVarChar and DefineLongVarRaw
@@ -70,11 +70,13 @@ namespace System.Data.OracleClient.Oci
{
OciParameterDescriptor parameter = ((OciStatementHandle) Parent).GetParameter (position);
//name = parameter.GetName ();
name = parameter.GetName ();
definedType = parameter.GetDataType ();
definedSize = parameter.GetDataSize ();
//precision = parameter.GetPrecision ();
scale = parameter.GetScale ();
rlenp = OciCalls.AllocateClear (sizeof(short));
indicator = OciCalls.AllocateClear (sizeof(short));
Define (position, connection);
@@ -103,7 +105,7 @@ namespace System.Data.OracleClient.Oci
}
internal bool IsNull {
get { return (indicator == -1); }
get { return (Indicator == -1); }
}
internal short Scale {
@@ -111,7 +113,13 @@ namespace System.Data.OracleClient.Oci
}
internal short Size {
get { return rlenp; }
get { return(Marshal.ReadInt16(rlenp)); }
set { Marshal.WriteInt16(rlenp, value); }
}
internal short Indicator {
get { return(Marshal.ReadInt16(indicator)); }
set { Marshal.WriteInt16(indicator, value); }
}
internal IntPtr Value {
@@ -192,8 +200,8 @@ namespace System.Data.OracleClient.Oci
ref value,
definedSize,
ociType,
ref indicator,
ref rlenp,
indicator,
rlenp,
IntPtr.Zero,
0);
@@ -222,8 +230,8 @@ namespace System.Data.OracleClient.Oci
value,
definedSize,
ociType,
ref indicator,
ref rlenp,
indicator,
rlenp,
IntPtr.Zero,
0);
@@ -261,11 +269,11 @@ namespace System.Data.OracleClient.Oci
value,
definedSize,
ociType,
ref indicator,
ref rlenp,
indicator,
rlenp,
IntPtr.Zero, 0);
rlenp = (short) definedSize;
Size = (short) definedSize;
if (status != 0) {
OciErrorInfo info = ErrorHandle.HandleError ();
@@ -291,8 +299,8 @@ namespace System.Data.OracleClient.Oci
value,
maxByteCount,
ociType,
ref indicator,
ref rlenp,
indicator,
rlenp,
IntPtr.Zero,
0);
OciErrorHandle.ThrowExceptionIfError (ErrorHandle, status);
@@ -312,10 +320,10 @@ namespace System.Data.OracleClient.Oci
ErrorHandle,
position + 1,
value,
definedSize * 2,
definedSize,
ociType,
ref indicator,
ref rlenp,
indicator,
rlenp,
IntPtr.Zero,
0);
@@ -357,8 +365,8 @@ namespace System.Data.OracleClient.Oci
ref value,
definedSize,
ociType,
ref indicator,
ref rlenp,
indicator,
rlenp,
IntPtr.Zero,
0);
@@ -386,8 +394,8 @@ namespace System.Data.OracleClient.Oci
value,
definedSize,
ociType,
ref indicator,
ref rlenp,
indicator,
rlenp,
IntPtr.Zero, 0);
if (status != 0) {
@@ -415,8 +423,8 @@ namespace System.Data.OracleClient.Oci
value,
definedSize,
ociType,
ref indicator,
ref rlenp,
indicator,
rlenp,
IntPtr.Zero, 0);
if (status != 0) {
@@ -459,8 +467,8 @@ namespace System.Data.OracleClient.Oci
ref value,
definedSize,
ociType,
ref indicator,
ref rlenp,
indicator,
rlenp,
IntPtr.Zero,
0);
@@ -487,6 +495,8 @@ namespace System.Data.OracleClient.Oci
}
disposed = true;
} finally {
Marshal.FreeHGlobal (indicator);
Marshal.FreeHGlobal (rlenp);
base.Dispose (disposing);
value = IntPtr.Zero;
}
@@ -37,12 +37,13 @@ using System.Text;
namespace System.Data.OracleClient
{
[TypeConverter (typeof(OracleParameter.OracleParameterConverter))]
public sealed class OracleParameter :
public sealed class OracleParameter :
#if NET_2_0
DbParameter, IDbDataParameter, ICloneable
DbParameter, IDbDataParameter, ICloneable,
#else
MarshalByRefObject, IDbDataParameter, IDataParameter, ICloneable
MarshalByRefObject, IDbDataParameter, IDataParameter, ICloneable,
#endif
IDisposable
{
#region Fields
@@ -66,6 +67,7 @@ namespace System.Data.OracleClient
object value = DBNull.Value;
OciLobLocator lobLocator; // only if Blob or Clob
IntPtr bindOutValue = IntPtr.Zero;
IntPtr indicator = IntPtr.Zero;
OciDateTimeDescriptor dateTimeDesc;
IntPtr cursor = IntPtr.Zero;
@@ -77,7 +79,6 @@ namespace System.Data.OracleClient
bool useRef;
OciDataType bindType;
short indicator;
int bindSize;
bool sizeManuallySet;
@@ -104,6 +105,7 @@ namespace System.Data.OracleClient
this.value = value.value;
this.lobLocator = value.lobLocator;
this.oracleTypeSet = value.oracleTypeSet;
this.indicator = OciCalls.AllocateClear (sizeof(short));
}
public OracleParameter ()
@@ -119,6 +121,7 @@ namespace System.Data.OracleClient
this.srcVersion = DataRowVersion.Current;
this.value = null;
this.oracleTypeSet = false;
this.indicator = OciCalls.AllocateClear (sizeof(short));
}
public OracleParameter (string name, object value)
@@ -129,6 +132,7 @@ namespace System.Data.OracleClient
srcColumn = string.Empty;
SourceVersion = DataRowVersion.Current;
InferOracleType (value);
this.indicator = OciCalls.AllocateClear (sizeof(short));
#if NET_2_0
// Find the OciType before inferring for the size
if (value != null && value != DBNull.Value) {
@@ -173,6 +177,7 @@ namespace System.Data.OracleClient
OracleType = oracleType;
SourceColumn = sourceColumn;
SourceVersion = sourceVersion;
this.indicator = OciCalls.AllocateClear (sizeof(short));
}
#endif
@@ -199,6 +204,12 @@ namespace System.Data.OracleClient
OracleType = oracleType;
SourceColumn = srcColumn;
SourceVersion = srcVersion;
this.indicator = OciCalls.AllocateClear (sizeof(short));
}
~OracleParameter ()
{
Dispose(false);
}
#endregion // Constructors
@@ -210,6 +221,11 @@ namespace System.Data.OracleClient
set { container = value; }
}
internal short Indicator {
get { return (Marshal.ReadInt16(indicator)); }
set { Marshal.WriteInt16(indicator, value); }
}
#if !NET_2_0
[Browsable (false)]
[RefreshProperties (RefreshProperties.All)]
@@ -453,7 +469,6 @@ namespace System.Data.OracleClient
}
if (isnull == true && direction == ParameterDirection.Input) {
indicator = 0;
bindType = OciDataType.VarChar2;
bindSize = 0;
} else {
@@ -465,7 +480,6 @@ namespace System.Data.OracleClient
case OciDataType.CharZ:
case OciDataType.OciString:
bindType = OciDataType.String;
indicator = 0;
svalue = "\0";
// convert value from managed type to type to marshal
if (direction == ParameterDirection.Input ||
@@ -558,7 +572,7 @@ namespace System.Data.OracleClient
dt = DateTime.MinValue;
sDate = "";
if (isnull)
indicator = -1;
Indicator = -1;
else if (v is String) {
sDate = (string) v;
dt = DateTime.Parse (sDate);
@@ -594,7 +608,7 @@ namespace System.Data.OracleClient
case OciDataType.Float:
case OciDataType.Number:
bindType = OciDataType.String;
indicator = 0;
Indicator = 0;
svalue = "\0";
// convert value from managed type to type to marshal
if (direction == ParameterDirection.Input ||
@@ -638,7 +652,7 @@ namespace System.Data.OracleClient
bindSize = Size + 5; // 4 bytes prepended for length, bytes, 1 byte NUL character
indicator = 0;
Indicator = 0;
svalue = "\0";
// convert value from managed type to type to marshal
if (direction == ParameterDirection.Input ||
@@ -758,7 +772,7 @@ namespace System.Data.OracleClient
case OciDataType.VarRaw:
bindType = OciDataType.VarRaw;
bindSize = Size + 2; // include 2 bytes prepended to hold the length
indicator = 0;
Indicator = 0;
bytes = new byte [bindSize];
if (direction == ParameterDirection.Input ||
direction == ParameterDirection.InputOutput) {
@@ -784,7 +798,7 @@ namespace System.Data.OracleClient
case OciDataType.LongVarRaw:
bindType = OciDataType.LongVarRaw;
bindSize = Size + 4; // include 4 bytes prepended to hold the length
indicator = 0;
Indicator = 0;
bytes = new byte [bindSize];
if (direction == ParameterDirection.Input ||
direction == ParameterDirection.InputOutput) {
@@ -854,7 +868,7 @@ namespace System.Data.OracleClient
ref bindValue,
bindSize,
bindType,
ref indicator,
indicator,
IntPtr.Zero,
IntPtr.Zero,
0,
@@ -870,7 +884,7 @@ namespace System.Data.OracleClient
ref bindValue,
bindSize,
bindType,
ref indicator,
indicator,
IntPtr.Zero,
IntPtr.Zero,
0,
@@ -887,7 +901,7 @@ namespace System.Data.OracleClient
ref cursor,
bindSize,
bindType,
ref indicator,
indicator,
IntPtr.Zero,
IntPtr.Zero,
0,
@@ -903,7 +917,7 @@ namespace System.Data.OracleClient
bytes,
bindSize,
bindType,
ref indicator,
indicator,
IntPtr.Zero,
IntPtr.Zero,
0,
@@ -919,7 +933,7 @@ namespace System.Data.OracleClient
bindValue,
bindSize,
bindType,
ref indicator,
indicator,
IntPtr.Zero,
IntPtr.Zero,
0,
@@ -1251,7 +1265,7 @@ namespace System.Data.OracleClient
// used to update the parameter value
// for Output, the output of InputOutput, and Return parameters
value = DBNull.Value;
if (indicator == -1)
if (Indicator == -1)
return;
int rsize = 0;
@@ -1453,6 +1467,22 @@ namespace System.Data.OracleClient
return buffer;
}
public void Dispose ()
{
Dispose (true);
}
void Dispose (bool disposing)
{
if (disposing) {
GC.SuppressFinalize(this);
}
if (indicator != IntPtr.Zero) {
Marshal.FreeHGlobal (indicator);
indicator = IntPtr.Zero;
}
}
#endregion // Methods
internal sealed class OracleParameterConverter : ExpandableObjectConverter
@@ -1,2 +1 @@
#include System.Data.Services.Client.dll.sources
./Client/AssemblyAttributes.cs
#include net_4_5_System.Data.Services.Client.dll.sources
@@ -26,9 +26,11 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Data.Services;
using NUnit.Framework;
namespace System.Data.Services.Tests {
namespace MonoTests.System.Data.Services {
[TestFixture]
public class ChangeInterceptorAttributeTests {
[Test]
@@ -45,4 +47,4 @@ namespace System.Data.Services.Tests {
Assert.AreEqual ("setName", ci.EntitySetName);
}
}
}
}
@@ -26,9 +26,11 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Data.Services;
using NUnit.Framework;
namespace System.Data.Services.Tests {
namespace MonoTests.System.Data.Services {
[TestFixture]
public class DataServiceExceptionTests {
[Test]
@@ -68,4 +70,4 @@ namespace System.Data.Services.Tests {
Assert.AreEqual (inner, ex.InnerException);
}
}
}
}
@@ -26,9 +26,11 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Data.Services;
using NUnit.Framework;
namespace System.Data.Services.Tests {
namespace MonoTests.System.Data.Services {
[TestFixture]
public class DataServiceTests {
[Test]
@@ -79,4 +81,4 @@ namespace System.Data.Services.Tests {
this.OnStartProcessingRequest (args);
}
}
}
}
Loaded 100 of 798 files, more files were not shown because too many files have changed in this diff. Show more